From 021b6ff05c4a17cb20d71c05e251ea7f80b1c516 Mon Sep 17 00:00:00 2001 From: Tero Kristo Date: Mon, 27 Oct 2014 08:39:23 -0700 Subject: 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 Tested-by: Nishanth Menon Signed-off-by: Tony Lindgren --- arch/arm/mach-omap2/cm33xx.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) (limited to 'arch/arm/mach-omap2/cm33xx.c') 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) /** * am33xx_cm_wait_module_ready - wait for a module to be in 'func' state + * @part: PRCM partition, ignored for AM33xx * @inst: CM instance register offset (*_INST macro) * @clkctrl_offs: Module clock control register offset (*_CLKCTRL macro) + * @bit_shift: bit shift for the register, ignored for AM33xx * * Wait for the module IDLEST to be functional. If the idle state is in any * the non functional state (trans, idle or disabled), module and thus the * sysconfig cannot be accessed and will probably lead to an "imprecise * external abort" */ -int am33xx_cm_wait_module_ready(u16 inst, u16 clkctrl_offs) +static int am33xx_cm_wait_module_ready(u8 part, s16 inst, u16 clkctrl_offs, + u8 bit_shift) { int i = 0; @@ -359,7 +362,9 @@ struct clkdm_ops am33xx_clkdm_operations = { .clkdm_clk_disable = am33xx_clkdm_clk_disable, }; -static struct cm_ll_data am33xx_cm_ll_data; +static struct cm_ll_data am33xx_cm_ll_data = { + .wait_module_ready = &am33xx_cm_wait_module_ready, +}; int __init am33xx_cm_init(void) { -- cgit