Skip to content

Commit ca43ea3

Browse files
Rajendra NayakPaul Walmsley
authored andcommitted
ARM: OMAP2+: hwmod: Add a new flag to handle SIDLE in SWSUP only in active
Some IPs (like UART) need the sidle mode to be controlled in SW only while they are active. Once they go inactive, they need the IP to be put back in HW control so they are also wakeup capable. The flag HWMOD_SWSUP_SIDLE takes care of IPs which need the sidle mode to be *always* controlled in SWSUP. We now have a need to control IPs sidle mode in SWSUP only while its active. So define a new flag 'HWMOD_SWSUP_SIDLE_ACT' to help the framework know about these new IP requirements. Tested-by: Vaibhav Bedia <vaibhav.bedia@ti.com> Tested-by: Sourav Poddar <sourav.poddar@ti.com> Signed-off-by: Rajendra Nayak <rnayak@ti.com> Signed-off-by: Santosh Shilimkar <santosh.shilimkar@ti.com> Reviewed-by: Kevin Hilman <khilman@linaro.org> Tested-by: Kevin Hilman <khilman@linaro.org> # OMAP4/Panda Signed-off-by: Paul Walmsley <paul@pwsan.com>
1 parent 3551317 commit ca43ea3

2 files changed

Lines changed: 6 additions & 1 deletion

File tree

‎arch/arm/mach-omap2/omap_hwmod.c‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1356,7 +1356,8 @@ static void _enable_sysc(struct omap_hwmod *oh)
13561356

13571357
clkdm = _get_clkdm(oh);
13581358
if (sf & SYSC_HAS_SIDLEMODE) {
1359-
if (oh->flags & HWMOD_SWSUP_SIDLE) {
1359+
if (oh->flags & HWMOD_SWSUP_SIDLE ||
1360+
oh->flags & HWMOD_SWSUP_SIDLE_ACT) {
13601361
idlemode = HWMOD_IDLEMODE_NO;
13611362
} else {
13621363
if (sf & SYSC_HAS_ENAWAKEUP)

‎arch/arm/mach-omap2/omap_hwmod.h‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -463,6 +463,9 @@ struct omap_hwmod_omap4_prcm {
463463
* is kept in force-standby mode. Failing to do so causes PM problems
464464
* with musb on OMAP3630 at least. Note that musb has a dedicated register
465465
* to control MSTANDBY signal when MIDLEMODE is set to force-standby.
466+
* HWMOD_SWSUP_SIDLE_ACT: omap_hwmod code should manually bring the module
467+
* out of idle, but rely on smart-idle to the put it back in idle,
468+
* so the wakeups are still functional (Only known case for now is UART)
466469
*/
467470
#define HWMOD_SWSUP_SIDLE (1 << 0)
468471
#define HWMOD_SWSUP_MSTANDBY (1 << 1)
@@ -476,6 +479,7 @@ struct omap_hwmod_omap4_prcm {
476479
#define HWMOD_EXT_OPT_MAIN_CLK (1 << 9)
477480
#define HWMOD_BLOCK_WFI (1 << 10)
478481
#define HWMOD_FORCE_MSTANDBY (1 << 11)
482+
#define HWMOD_SWSUP_SIDLE_ACT (1 << 12)
479483

480484
/*
481485
* omap_hwmod._int_flags definitions

0 commit comments

Comments
 (0)