mirror of
https://github.com/RT-Thread/rt-thread.git
synced 2026-02-06 17:12:01 +08:00
[DM/FIXUP] Fixup CLK
1. Default return OK when input NULL (if is not necessary in device). 2. Support object parse in OFW. 3. Support CLK depends fix auto. 4. Fixup rt_clk_array_prepare_enable and rt_clk_array_disable_unprepare. Signed-off-by: GuEe-GUI <2991707448@qq.com>
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -16,6 +16,8 @@
|
||||
#include <ref.h>
|
||||
#include <drivers/ofw.h>
|
||||
|
||||
#define RT_CLK_NODE_OBJ_NAME "CLKNP"
|
||||
|
||||
struct rt_clk_ops;
|
||||
struct rt_reset_control_node;
|
||||
|
||||
@@ -37,6 +39,8 @@ struct rt_clk_node
|
||||
* };
|
||||
* We assume the 'N' is the max value of element in 'clock-indices' if OFW.
|
||||
*/
|
||||
struct rt_object rt_parent;
|
||||
|
||||
rt_list_t list;
|
||||
rt_list_t children_nodes;
|
||||
|
||||
@@ -74,6 +78,8 @@ struct rt_clk
|
||||
const char *con_id;
|
||||
|
||||
rt_ubase_t rate;
|
||||
int prepare_count;
|
||||
int enable_count;
|
||||
|
||||
void *fw_node;
|
||||
void *priv;
|
||||
|
||||
@@ -69,6 +69,9 @@ struct ofw_obj_cmp_list
|
||||
|
||||
static const struct ofw_obj_cmp_list ofw_obj_cmp_list[] =
|
||||
{
|
||||
#ifdef RT_USING_CLK
|
||||
{ "#clock-cells", RT_CLK_NODE_OBJ_NAME, sizeof(struct rt_clk_node) },
|
||||
#endif
|
||||
{ "#power-domain-cells", RT_POWER_DOMAIN_PROXY_OBJ_NAME, sizeof(struct rt_dm_power_domain_proxy) },
|
||||
{ "#power-domain-cells", RT_POWER_DOMAIN_OBJ_NAME, sizeof(struct rt_dm_power_domain) },
|
||||
};
|
||||
|
||||
Reference in New Issue
Block a user