aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-omap2/cm33xx.c
diff options
context:
space:
mode:
authorTero Kristo <t-kristo@ti.com>2014-10-27 11:39:23 -0400
committerTony Lindgren <tony@atomide.com>2014-10-27 11:39:23 -0400
commit021b6ff05c4a17cb20d71c05e251ea7f80b1c516 (patch)
tree93df0c5995581095d8c2838f1aabe566322ec5c5 /arch/arm/mach-omap2/cm33xx.c
parent7632a02f80eb99e942999e522b2eb0f6592ea5b5 (diff)
ARM: OMAP2+: CM: add common API for cm_wait_module_ready
This patch consolidates the parameters provided for the SoC specific cm_*_wait_module_ready calls, adds the missing cm_ll_data function pointers and uses the now generic call from the mach-omap2 board code. SoC specific *_wait_module_ready calls are also made static so they can only be accessed through the generic CM driver API only. Signed-off-by: Tero Kristo <t-kristo@ti.com> Tested-by: Nishanth Menon <nm@ti.com> Signed-off-by: Tony Lindgren <tony@atomide.com>
Diffstat (limited to 'arch/arm/mach-omap2/cm33xx.c')
-rw-r--r--arch/arm/mach-omap2/cm33xx.c9
1 files changed, 7 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/cm33xx.c b/arch/arm/mach-omap2/cm33xx.c
index e02988fd237f..e022a8d57060 100644
--- a/arch/arm/mach-omap2/cm33xx.c
+++ b/arch/arm/mach-omap2/cm33xx.c
@@ -226,15 +226,18 @@ void am33xx_cm_clkdm_force_wakeup(u16 inst, u16 cdoffs)
226 226
227/** 227/**
228 * am33xx_cm_wait_module_ready - wait for a module to be in 'func' state 228 * am33xx_cm_wait_module_ready - wait for a module to be in 'func' state
229 * @part: PRCM partition, ignored for AM33xx
229 * @inst: CM instance register offset (*_INST macro) 230 * @inst: CM instance register offset (*_INST macro)
230 * @clkctrl_offs: Module clock control register offset (*_CLKCTRL macro) 231 * @clkctrl_offs: Module clock control register offset (*_CLKCTRL macro)
232 * @bit_shift: bit shift for the register, ignored for AM33xx
231 * 233 *
232 * Wait for the module IDLEST to be functional. If the idle state is in any 234 * Wait for the module IDLEST to be functional. If the idle state is in any
233 * the non functional state (trans, idle or disabled), module and thus the 235 * the non functional state (trans, idle or disabled), module and thus the
234 * sysconfig cannot be accessed and will probably lead to an "imprecise 236 * sysconfig cannot be accessed and will probably lead to an "imprecise
235 * external abort" 237 * external abort"
236 */ 238 */
237int am33xx_cm_wait_module_ready(u16 inst, u16 clkctrl_offs) 239static int am33xx_cm_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs,
240 u8 bit_shift)
238{ 241{
239 int i = 0; 242 int i = 0;
240 243
@@ -359,7 +362,9 @@ struct clkdm_ops am33xx_clkdm_operations = {
359 .clkdm_clk_disable = am33xx_clkdm_clk_disable, 362 .clkdm_clk_disable = am33xx_clkdm_clk_disable,
360}; 363};
361 364
362static struct cm_ll_data am33xx_cm_ll_data; 365static struct cm_ll_data am33xx_cm_ll_data = {
366 .wait_module_ready = &am33xx_cm_wait_module_ready,
367};
363 368
364int __init am33xx_cm_init(void) 369int __init am33xx_cm_init(void)
365{ 370{