[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:
GuEe-GUI
2024-11-20 11:08:28 +08:00
committed by Rbb666
parent bdf4da8ee1
commit b6dff44054
3 changed files with 137 additions and 123 deletions
+6
View File
@@ -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;