forked from ~ljy/RK356X_SDK_RELEASE

hc
2024-05-10 37f49e37ab4cb5d0bc4c60eb5c6d4dd57db767bb
kernel/drivers/clk/ti/clock.h
....@@ -20,10 +20,13 @@
2020 struct clk_hw hw;
2121 struct clk_omap_reg reg;
2222 u8 shift;
23
- u8 width;
2423 u8 flags;
2524 s8 latch;
25
+ u16 min;
26
+ u16 max;
27
+ u16 mask;
2628 const struct clk_div_table *table;
29
+ u32 context;
2730 };
2831
2932 #define to_clk_omap_divider(_hw) container_of(_hw, struct clk_omap_divider, hw)
....@@ -36,6 +39,7 @@
3639 u8 shift;
3740 s8 latch;
3841 u8 flags;
42
+ u8 saved_parent;
3943 };
4044
4145 #define to_clk_omap_mux(_hw) container_of(_hw, struct clk_omap_mux, hw)
....@@ -80,6 +84,13 @@
8084 #define CLKF_SW_SUP BIT(5)
8185 #define CLKF_HW_SUP BIT(6)
8286 #define CLKF_NO_IDLEST BIT(7)
87
+
88
+#define CLKF_SOC_MASK GENMASK(11, 8)
89
+
90
+#define CLKF_SOC_NONSEC BIT(8)
91
+#define CLKF_SOC_DRA72 BIT(9)
92
+#define CLKF_SOC_DRA74 BIT(10)
93
+#define CLKF_SOC_DRA76 BIT(11)
8394
8495 #define CLK(dev, con, ck) \
8596 { \
....@@ -184,9 +195,16 @@
184195 extern const struct omap_clkctrl_data omap4_clkctrl_data[];
185196 extern const struct omap_clkctrl_data omap5_clkctrl_data[];
186197 extern const struct omap_clkctrl_data dra7_clkctrl_data[];
198
+extern const struct omap_clkctrl_data dra7_clkctrl_compat_data[];
199
+extern struct ti_dt_clk dra7xx_compat_clks[];
187200 extern const struct omap_clkctrl_data am3_clkctrl_data[];
201
+extern const struct omap_clkctrl_data am3_clkctrl_compat_data[];
202
+extern struct ti_dt_clk am33xx_compat_clks[];
188203 extern const struct omap_clkctrl_data am4_clkctrl_data[];
204
+extern const struct omap_clkctrl_data am4_clkctrl_compat_data[];
205
+extern struct ti_dt_clk am43xx_compat_clks[];
189206 extern const struct omap_clkctrl_data am438x_clkctrl_data[];
207
+extern const struct omap_clkctrl_data am438x_clkctrl_compat_data[];
190208 extern const struct omap_clkctrl_data dm814_clkctrl_data[];
191209 extern const struct omap_clkctrl_data dm816_clkctrl_data[];
192210
....@@ -194,6 +212,8 @@
194212
195213 struct clk *ti_clk_register(struct device *dev, struct clk_hw *hw,
196214 const char *con);
215
+struct clk *ti_clk_register_omap_hw(struct device *dev, struct clk_hw *hw,
216
+ const char *con);
197217 int ti_clk_add_alias(struct device *dev, struct clk *clk, const char *con);
198218 void ti_clk_add_aliases(void);
199219
....@@ -202,8 +222,7 @@
202222 struct clk_hw *ti_clk_build_component_mux(struct ti_clk_mux *setup);
203223
204224 int ti_clk_parse_divider_data(int *div_table, int num_dividers, int max_div,
205
- u8 flags, u8 *width,
206
- const struct clk_div_table **table);
225
+ u8 flags, struct clk_omap_divider *div);
207226
208227 int ti_clk_get_reg_addr(struct device_node *node, int index,
209228 struct clk_omap_reg *reg);
....@@ -212,7 +231,6 @@
212231 ti_of_clk_init_cb_t func);
213232 int ti_clk_add_component(struct device_node *node, struct clk_hw *hw, int type);
214233
215
-void omap2_init_clk_hw_omap_clocks(struct clk_hw *hw);
216234 int of_ti_clk_autoidle_setup(struct device_node *node);
217235 void omap2_clk_enable_init_clocks(const char **clk_names, u8 num_clocks);
218236
....@@ -233,7 +251,9 @@
233251 extern const struct clk_ops ti_clk_mux_ops;
234252 extern const struct clk_ops omap_gate_clk_ops;
235253
236
-void omap2_init_clk_clkdm(struct clk_hw *hw);
254
+extern struct ti_clk_features ti_clk_features;
255
+
256
+int omap2_init_clk_clkdm(struct clk_hw *hw);
237257 int omap2_clkops_enable_clkdm(struct clk_hw *hw);
238258 void omap2_clkops_disable_clkdm(struct clk_hw *hw);
239259
....@@ -290,6 +310,7 @@
290310 unsigned long *parent_rate);
291311 int omap4_dpll_regm4xen_determine_rate(struct clk_hw *hw,
292312 struct clk_rate_request *req);
313
+int omap2_clk_for_each(int (*fn)(struct clk_hw_omap *hw));
293314
294315 extern struct ti_clk_ll_ops *ti_clk_ll_ops;
295316