summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorRajendra Nayak <rnayak@ti.com>2012-03-27 15:28:31 +0530
committerXavier Boudet <x-boudet@ti.com>2012-07-10 17:26:53 +0200
commit36adf146af3b5b926e1028e48111f3e6a02e8943 (patch)
tree18c7c40456fcc688bce8c62bde196c1ef0ba6ef1
parent1454cf74bb70ab02c15aaef85dabea32bea5d13e (diff)
ARM: OMAP: hwmod: Fix error handling in functions used OMAP4 onwards
Some functions like _omap4_disable_module() and _omap4_wait_target_disable() are (will be) used on all OMAPs OMAP4 and beyond which support module level control. Fix the error checks in these functions to return if called on any platform pre OMAP4 (i.e OMAP2 and OMAP3) instead of checking for !cpu_is_omap44xx(). This avoids having to update the error check with a '&& !cpu_is_omap54xx()' when OMAP5 is introduced and possibly similar updates when further OMAP generations are added. Signed-off-by: Rajendra Nayak <rnayak@ti.com>
-rw-r--r--arch/arm/mach-omap2/omap_hwmod.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/arch/arm/mach-omap2/omap_hwmod.c b/arch/arm/mach-omap2/omap_hwmod.c
index dee3840ab54e..bfbf11328bec 100644
--- a/arch/arm/mach-omap2/omap_hwmod.c
+++ b/arch/arm/mach-omap2/omap_hwmod.c
@@ -763,7 +763,7 @@ static void _enable_module(struct omap_hwmod *oh)
*/
static int _omap4_wait_target_disable(struct omap_hwmod *oh)
{
- if (!cpu_is_omap44xx() && !cpu_is_omap54xx())
+ if (cpu_is_omap24xx() || cpu_is_omap34xx())
return 0;
if (!oh)
@@ -793,7 +793,7 @@ static int _omap4_disable_module(struct omap_hwmod *oh)
int v;
/* The module mode does not exist prior OMAP4 */
- if (!cpu_is_omap44xx() && !cpu_is_omap54xx())
+ if (cpu_is_omap24xx() || cpu_is_omap34xx())
return -EINVAL;
if (!oh->clkdm || !oh->prcm.omap4.modulemode)