OMAP: hwmod: Set autoidle after smartidle during _sysc_enable
Subsystems (4)
PATCH 1/1 OMAP: hwmod: Set autoidle after smartidle during _sysc_enable
OMAP USBOTG module has a requirement to set the autoidle bit only after setting smartidle bit. Modified the _sys_enable api to set the smartidle first and then the autoidle bit. Setting this will not have any impact on the other modules.
--- arch/arm/mach-omap2/omap_hwmod.c | 18 ++++++++++++------ 1 file changed, 12 insertions(+), 6 deletions(-)
arch/arm/mach-omap2/omap_hwmod.c +12 -6
@@ -654,12 +654,6 @@ static void _sysc_enable(struct omap_hwm_set_master_standbymode (oh, idlemode, &v); } -if (sf &SYSC_HAS_AUTOIDLE ) { - idlemode = (oh->flags &HWMOD_NO_OCP_AUTOIDLE ) ? -0 :1 ; -_set_module_autoidle (oh, idlemode, &v); - } -/* XXX OCP ENAWAKEUP bit? */ /*
@@ -672,6 +666,18 @@ static void _sysc_enable(struct omap_hwm_set_clockactivity (oh, oh->class->sysc->clockact, &v);_write_sysconfig (v, oh); + +/* +* Set the autoidle bit only after setting the smartidle bit +* as this is requirement for some modules like USBOTG. +* Setting this will not have any impact on the other modules. +*/ +if (sf &SYSC_HAS_AUTOIDLE ) { + idlemode = (oh->flags &HWMOD_NO_OCP_AUTOIDLE ) ? +0 :1 ; +_set_module_autoidle (oh, idlemode, &v); +_write_sysconfig (v, oh); + } }/**
Paul,
Quoted 9 lines
-----Original Message-----
From: Kalliguddi, Hema
Sent: Friday, September 24, 2010 9:17 AM
To: [email protected]
Cc: Kalliguddi, Hema; Basak, Partha; Balbi, Felipe; Tony Lindgren; Kevin Hilman; Cousson, Benoit; Paul Walmsley
Subject: [PATCH] OMAP: hwmod: Set autoidle after smartidle during_sysc_enable
Quoted 7 lines
OMAP USBOTG module has a requirement to set the autoidle bit only after setting smartidle bit. Modified the
_sys_enableapi to set the smartidle
first and then the autoidle bit. Setting this will not have any impact on the
other modules.
Review comments from Benoit and Sergie are fixed in this patch. Benoit acked the older version of the patch and you had asked me re-post with Review comments incorporated.
http://www.mail-archive.com/[email protected]/msg35464.html
Quoted 48 lines
Signed-off-by Hema HK <[email protected]>Signed-off-by Basak, Partha <[email protected]>Cc Felipe Balbi <[email protected]>Cc Tony Lindgren <[email protected]>Cc Kevin Hilman <[email protected]>Cc Cousson, Benoit <[email protected]>Cc Paul Walmsley <[email protected]>---
arch/arm/mach-omap2/omap_hwmod.c| 18 ++++++++++++------1 file changed, 12 insertions(+), 6 deletions(-)Index:
linux-omap-pm/arch/arm/mach-omap2/omap_hwmod.c
===================================================================arch/arm/mach-omap2/omap_hwmod.c +12
-6@@ -654,12 +654,6 @@ static void _sysc_enable(struct omap_hwm_set_master_standbymode (oh, idlemode, &v); } -if (sf &SYSC_HAS_AUTOIDLE ) { - idlemode = (oh->flags &HWMOD_NO_OCP_AUTOIDLE ) ? -0 :1 ; -_set_module_autoidle (oh, idlemode, &v); - } -/* XXX OCP ENAWAKEUP bit? */ /* @@ -672,6 +666,18 @@ static void _sysc_enable(struct omap_hwm_set_clockactivity (oh, oh->class->sysc->clockact, &v);_write_sysconfig (v, oh); + +/* +* Set the autoidle bit only after setting the smartidle bit +* as this is requirement for some modules like USBOTG. +* Setting this will not have any impact on the other modules. +*/ +if (sf &SYSC_HAS_AUTOIDLE ) { + idlemode = (oh->flags &HWMOD_NO_OCP_AUTOIDLE ) ? +0 :1 ; +_set_module_autoidle (oh, idlemode, &v); +_write_sysconfig (v, oh); + } }/**
Paul Walmsley
maintainerHello Hema,
Quoted 5 lines · Hema HK
OMAP USBOTG module has a requirement to set the autoidle bit only after setting smartidle bit. Modified the
_sys_enableapi to set the smartidle first and then the autoidle bit. Setting this will not have any impact on the other modules.
Quoted 7 lines
Signed-off-by Hema HK <[email protected]>Signed-off-by Basak, Partha <[email protected]>Cc Felipe Balbi <[email protected]>Cc Tony Lindgren <[email protected]>Cc Kevin Hilman <[email protected]>Cc Cousson, Benoit <[email protected]>Cc Paul Walmsley <[email protected]>
Thanks, added Benoît's ack, updated this to apply after Rajendra's ENAWAKEUP patch, and queued for 2.6.37.
- Paul