hc
2024-05-10 ee930fffee469d076998274a2ca55e13dc1efb67
kernel/include/soc/rockchip/rockchip_opp_select.h
....@@ -78,6 +78,8 @@
7878 u32 low_rm;
7979 u32 current_rm;
8080 u32 target_rm;
81
+ u32 pvtpll_clk_id;
82
+ bool pvtpll_low_temp;
8183 };
8284
8385 #if IS_ENABLED(CONFIG_ROCKCHIP_OPP)
....@@ -87,8 +89,9 @@
8789 int *volt_sel, int *scale_sel);
8890 void rockchip_pvtpll_calibrate_opp(struct rockchip_opp_info *info);
8991 void rockchip_pvtpll_add_length(struct rockchip_opp_info *info);
92
+void rockchip_init_pvtpll_table(struct rockchip_opp_info *info, int bin);
9093 void rockchip_of_get_pvtm_sel(struct device *dev, struct device_node *np,
91
- char *reg_name, int process,
94
+ char *reg_name, int bin, int process,
9295 int *volt_sel, int *scale_sel);
9396 void rockchip_of_get_bin_sel(struct device *dev, struct device_node *np,
9497 int bin, int *scale_sel);
....@@ -102,11 +105,16 @@
102105 char *porp_name, struct volt_rm_table **table);
103106 void rockchip_get_opp_data(const struct of_device_id *matches,
104107 struct rockchip_opp_info *info);
108
+int rockchip_get_soc_info(struct device *dev, struct device_node *np, int *bin,
109
+ int *process);
105110 void rockchip_get_scale_volt_sel(struct device *dev, char *lkg_name,
106111 char *reg_name, int bin, int process,
107112 int *scale, int *volt_sel);
108113 struct opp_table *rockchip_set_opp_prop_name(struct device *dev, int process,
109114 int volt_sel);
115
+struct opp_table *rockchip_set_opp_supported_hw(struct device *dev,
116
+ struct device_node *np,
117
+ int bin, int volt_sel);
110118 int rockchip_adjust_power_scale(struct device *dev, int scale);
111119 int rockchip_get_read_margin(struct device *dev,
112120 struct rockchip_opp_info *opp_info,
....@@ -125,6 +133,8 @@
125133 int rockchip_init_opp_table(struct device *dev,
126134 struct rockchip_opp_info *info,
127135 char *lkg_name, char *reg_name);
136
+void rockchip_uninit_opp_table(struct device *dev,
137
+ struct rockchip_opp_info *info);
128138 #else
129139 static inline int rockchip_of_get_leakage(struct device *dev, char *lkg_name,
130140 int *leakage)
....@@ -147,9 +157,14 @@
147157 {
148158 }
149159
160
+static inline void rockchip_init_pvtpll_table(struct rockchip_opp_info *info,
161
+ int bin)
162
+{
163
+}
164
+
150165 static inline void rockchip_of_get_pvtm_sel(struct device *dev,
151166 struct device_node *np,
152
- char *reg_name, int process,
167
+ char *reg_name, int bin, int process,
153168 int *volt_sel, int *scale_sel)
154169 {
155170 }
....@@ -191,6 +206,12 @@
191206 struct rockchip_opp_info *info)
192207 {
193208 }
209
+static inline int rockchip_get_soc_info(struct device *dev,
210
+ struct device_node *np, int *bin,
211
+ int *process)
212
+{
213
+ return -EOPNOTSUPP;
214
+}
194215
195216 static inline void rockchip_get_scale_volt_sel(struct device *dev,
196217 char *lkg_name, char *reg_name,
....@@ -202,6 +223,13 @@
202223 static inline struct opp_table *rockchip_set_opp_prop_name(struct device *dev,
203224 int process,
204225 int volt_sel)
226
+{
227
+ return ERR_PTR(-EOPNOTSUPP);
228
+}
229
+
230
+static inline struct opp_table *rockchip_set_opp_supported_hw(struct device *dev,
231
+ struct device_node *np,
232
+ int bin, int volt_sel)
205233 {
206234 return ERR_PTR(-EOPNOTSUPP);
207235 }
....@@ -248,6 +276,11 @@
248276 return -EOPNOTSUPP;
249277 }
250278
279
+static inline void rockchip_uninit_opp_table(struct device *dev,
280
+ struct rockchip_opp_info *info)
281
+{
282
+}
283
+
251284 #endif /* CONFIG_ROCKCHIP_OPP */
252285
253286 #endif