.. | .. |
---|
39 | 39 | .set_rate_and_parent = &omap3_noncore_dpll_set_rate_and_parent, |
---|
40 | 40 | .determine_rate = &omap4_dpll_regm4xen_determine_rate, |
---|
41 | 41 | .get_parent = &omap2_init_dpll_parent, |
---|
| 42 | + .save_context = &omap3_core_dpll_save_context, |
---|
| 43 | + .restore_context = &omap3_core_dpll_restore_context, |
---|
42 | 44 | }; |
---|
43 | 45 | #else |
---|
44 | 46 | static const struct clk_ops dpll_m4xen_ck_ops = {}; |
---|
.. | .. |
---|
62 | 64 | .set_rate_and_parent = &omap3_noncore_dpll_set_rate_and_parent, |
---|
63 | 65 | .determine_rate = &omap3_noncore_dpll_determine_rate, |
---|
64 | 66 | .get_parent = &omap2_init_dpll_parent, |
---|
| 67 | + .save_context = &omap3_noncore_dpll_save_context, |
---|
| 68 | + .restore_context = &omap3_noncore_dpll_restore_context, |
---|
65 | 69 | }; |
---|
66 | 70 | |
---|
67 | 71 | static const struct clk_ops dpll_no_gate_ck_ops = { |
---|
.. | .. |
---|
72 | 76 | .set_parent = &omap3_noncore_dpll_set_parent, |
---|
73 | 77 | .set_rate_and_parent = &omap3_noncore_dpll_set_rate_and_parent, |
---|
74 | 78 | .determine_rate = &omap3_noncore_dpll_determine_rate, |
---|
| 79 | + .save_context = &omap3_noncore_dpll_save_context, |
---|
| 80 | + .restore_context = &omap3_noncore_dpll_restore_context |
---|
75 | 81 | }; |
---|
76 | 82 | #else |
---|
77 | 83 | static const struct clk_ops dpll_core_ck_ops = {}; |
---|
.. | .. |
---|
159 | 165 | struct clk_hw_omap *clk_hw = to_clk_hw_omap(hw); |
---|
160 | 166 | struct dpll_data *dd = clk_hw->dpll_data; |
---|
161 | 167 | struct clk *clk; |
---|
| 168 | + const struct clk_init_data *init = hw->init; |
---|
162 | 169 | |
---|
163 | 170 | clk = of_clk_get(node, 0); |
---|
164 | 171 | if (IS_ERR(clk)) { |
---|
165 | | - pr_debug("clk-ref missing for %s, retry later\n", |
---|
166 | | - node->name); |
---|
| 172 | + pr_debug("clk-ref missing for %pOFn, retry later\n", |
---|
| 173 | + node); |
---|
167 | 174 | if (!ti_clk_retry_init(node, hw, _register_dpll)) |
---|
168 | 175 | return; |
---|
169 | 176 | |
---|
.. | .. |
---|
175 | 182 | clk = of_clk_get(node, 1); |
---|
176 | 183 | |
---|
177 | 184 | if (IS_ERR(clk)) { |
---|
178 | | - pr_debug("clk-bypass missing for %s, retry later\n", |
---|
179 | | - node->name); |
---|
| 185 | + pr_debug("clk-bypass missing for %pOFn, retry later\n", |
---|
| 186 | + node); |
---|
180 | 187 | if (!ti_clk_retry_init(node, hw, _register_dpll)) |
---|
181 | 188 | return; |
---|
182 | 189 | |
---|
.. | .. |
---|
186 | 193 | dd->clk_bypass = __clk_get_hw(clk); |
---|
187 | 194 | |
---|
188 | 195 | /* register the clock */ |
---|
189 | | - clk = ti_clk_register(NULL, &clk_hw->hw, node->name); |
---|
| 196 | + clk = ti_clk_register_omap_hw(NULL, &clk_hw->hw, node->name); |
---|
190 | 197 | |
---|
191 | 198 | if (!IS_ERR(clk)) { |
---|
192 | | - omap2_init_clk_hw_omap_clocks(&clk_hw->hw); |
---|
193 | 199 | of_clk_add_provider(node, of_clk_src_simple_get, clk); |
---|
194 | | - kfree(clk_hw->hw.init->parent_names); |
---|
195 | | - kfree(clk_hw->hw.init); |
---|
| 200 | + kfree(init->parent_names); |
---|
| 201 | + kfree(init); |
---|
196 | 202 | return; |
---|
197 | 203 | } |
---|
198 | 204 | |
---|
199 | 205 | cleanup: |
---|
200 | 206 | kfree(clk_hw->dpll_data); |
---|
201 | | - kfree(clk_hw->hw.init->parent_names); |
---|
202 | | - kfree(clk_hw->hw.init); |
---|
| 207 | + kfree(init->parent_names); |
---|
| 208 | + kfree(init); |
---|
203 | 209 | kfree(clk_hw); |
---|
204 | 210 | } |
---|
205 | 211 | |
---|
.. | .. |
---|
226 | 232 | |
---|
227 | 233 | parent_name = of_clk_get_parent_name(node, 0); |
---|
228 | 234 | if (!parent_name) { |
---|
229 | | - pr_err("%s must have parent\n", node->name); |
---|
| 235 | + pr_err("%pOFn must have parent\n", node); |
---|
230 | 236 | return; |
---|
231 | 237 | } |
---|
232 | 238 | |
---|
.. | .. |
---|
259 | 265 | #endif |
---|
260 | 266 | |
---|
261 | 267 | /* register the clock */ |
---|
262 | | - clk = ti_clk_register(NULL, &clk_hw->hw, name); |
---|
| 268 | + clk = ti_clk_register_omap_hw(NULL, &clk_hw->hw, name); |
---|
263 | 269 | |
---|
264 | | - if (IS_ERR(clk)) { |
---|
| 270 | + if (IS_ERR(clk)) |
---|
265 | 271 | kfree(clk_hw); |
---|
266 | | - } else { |
---|
267 | | - omap2_init_clk_hw_omap_clocks(&clk_hw->hw); |
---|
| 272 | + else |
---|
268 | 273 | of_clk_add_provider(node, of_clk_src_simple_get, clk); |
---|
269 | | - } |
---|
270 | 274 | } |
---|
271 | 275 | #endif |
---|
272 | 276 | |
---|
.. | .. |
---|
288 | 292 | struct dpll_data *dd = NULL; |
---|
289 | 293 | u8 dpll_mode = 0; |
---|
290 | 294 | |
---|
291 | | - dd = kzalloc(sizeof(*dd), GFP_KERNEL); |
---|
| 295 | + dd = kmemdup(ddt, sizeof(*dd), GFP_KERNEL); |
---|
292 | 296 | clk_hw = kzalloc(sizeof(*clk_hw), GFP_KERNEL); |
---|
293 | 297 | init = kzalloc(sizeof(*init), GFP_KERNEL); |
---|
294 | 298 | if (!dd || !clk_hw || !init) |
---|
295 | 299 | goto cleanup; |
---|
296 | | - |
---|
297 | | - memcpy(dd, ddt, sizeof(*dd)); |
---|
298 | 300 | |
---|
299 | 301 | clk_hw->dpll_data = dd; |
---|
300 | 302 | clk_hw->ops = &clkhwops_omap3_dpll; |
---|
.. | .. |
---|
305 | 307 | |
---|
306 | 308 | init->num_parents = of_clk_get_parent_count(node); |
---|
307 | 309 | if (!init->num_parents) { |
---|
308 | | - pr_err("%s must have parent(s)\n", node->name); |
---|
| 310 | + pr_err("%pOFn must have parent(s)\n", node); |
---|
309 | 311 | goto cleanup; |
---|
310 | 312 | } |
---|
311 | 313 | |
---|
.. | .. |
---|
404 | 406 | |
---|
405 | 407 | if ((of_machine_is_compatible("ti,omap3630") || |
---|
406 | 408 | of_machine_is_compatible("ti,omap36xx")) && |
---|
407 | | - !strcmp(node->name, "dpll5_ck")) |
---|
| 409 | + of_node_name_eq(node, "dpll5_ck")) |
---|
408 | 410 | of_ti_dpll_setup(node, &omap3_dpll5_ck_ops, &dd); |
---|
409 | 411 | else |
---|
410 | 412 | of_ti_dpll_setup(node, &omap3_dpll_ck_ops, &dd); |
---|