diff options
author | Paul Walmsley <paul@pwsan.com> | 2009-12-08 18:34:15 -0500 |
---|---|---|
committer | paul <paul@twilight.(none)> | 2009-12-11 19:00:43 -0500 |
commit | 726072e5dd459e3831d1dd4308ba469ff3ded419 (patch) | |
tree | 1e79dcd2e26bcb3eb3fd232d30e17a83f0e73c48 /arch/arm/plat-omap/include | |
parent | b835d0142196466c5ff3695b90cff1e3ea635c8e (diff) |
OMAP3 hwmod: Add automatic OCP_SYSCONFIG AUTOIDLE handling
This patch fills in the OCP_SYSCONFIG.AUTOIDLE handling in the OMAP
hwmod code.
After this patch, the hwmod code will set the module AUTOIDLE bit
(generally <module>.OCP_SYSCONFIG.AUTOIDLE) to 1 by default upon
enable. If the hwmod flag HWMOD_NO_OCP_AUTOIDLE is set, AUTOIDLE will
be set to 0 upon enable. Upon module disable, AUTOIDLE will be set to
1.
Enabling module autoidle should save some power. The only reason to
not set the OCP_SYSCONFIG.AUTOIDLE bit is if there is a bug in the
module RTL, e.g., the MPUINTC block on OMAP3.
Comments from Kevin Hilman <khilman@deeprootsystems.com> inspired this patch,
and Kevin tested an earlier version of this patch.
Signed-off-by: Paul Walmsley <paul@pwsan.com>
Tested-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/plat-omap/include')
-rw-r--r-- | arch/arm/plat-omap/include/plat/omap_hwmod.h | 8 |
1 files changed, 7 insertions, 1 deletions
diff --git a/arch/arm/plat-omap/include/plat/omap_hwmod.h b/arch/arm/plat-omap/include/plat/omap_hwmod.h index dbdd123eca16..643a9727de35 100644 --- a/arch/arm/plat-omap/include/plat/omap_hwmod.h +++ b/arch/arm/plat-omap/include/plat/omap_hwmod.h | |||
@@ -50,6 +50,8 @@ struct omap_device; | |||
50 | #define SYSC_ENAWAKEUP_MASK (1 << SYSC_ENAWAKEUP_SHIFT) | 50 | #define SYSC_ENAWAKEUP_MASK (1 << SYSC_ENAWAKEUP_SHIFT) |
51 | #define SYSC_SOFTRESET_SHIFT 1 | 51 | #define SYSC_SOFTRESET_SHIFT 1 |
52 | #define SYSC_SOFTRESET_MASK (1 << SYSC_SOFTRESET_SHIFT) | 52 | #define SYSC_SOFTRESET_MASK (1 << SYSC_SOFTRESET_SHIFT) |
53 | #define SYSC_AUTOIDLE_SHIFT 0 | ||
54 | #define SYSC_AUTOIDLE_MASK (1 << SYSC_AUTOIDLE_SHIFT) | ||
53 | 55 | ||
54 | /* OCP SYSSTATUS bit shifts/masks */ | 56 | /* OCP SYSSTATUS bit shifts/masks */ |
55 | #define SYSS_RESETDONE_SHIFT 0 | 57 | #define SYSS_RESETDONE_SHIFT 0 |
@@ -294,13 +296,17 @@ struct omap_hwmod_omap4_prcm { | |||
294 | * SDRAM controller, etc. | 296 | * SDRAM controller, etc. |
295 | * HWMOD_INIT_NO_IDLE: don't idle this module at boot - important for SDRAM | 297 | * HWMOD_INIT_NO_IDLE: don't idle this module at boot - important for SDRAM |
296 | * controller, etc. | 298 | * controller, etc. |
299 | * HWMOD_NO_AUTOIDLE: disable module autoidle (OCP_SYSCONFIG.AUTOIDLE) | ||
300 | * when module is enabled, rather than the default, which is to | ||
301 | * enable autoidle | ||
297 | * HWMOD_SET_DEFAULT_CLOCKACT: program CLOCKACTIVITY bits at startup | 302 | * HWMOD_SET_DEFAULT_CLOCKACT: program CLOCKACTIVITY bits at startup |
298 | */ | 303 | */ |
299 | #define HWMOD_SWSUP_SIDLE (1 << 0) | 304 | #define HWMOD_SWSUP_SIDLE (1 << 0) |
300 | #define HWMOD_SWSUP_MSTANDBY (1 << 1) | 305 | #define HWMOD_SWSUP_MSTANDBY (1 << 1) |
301 | #define HWMOD_INIT_NO_RESET (1 << 2) | 306 | #define HWMOD_INIT_NO_RESET (1 << 2) |
302 | #define HWMOD_INIT_NO_IDLE (1 << 3) | 307 | #define HWMOD_INIT_NO_IDLE (1 << 3) |
303 | #define HWMOD_SET_DEFAULT_CLOCKACT (1 << 4) | 308 | #define HWMOD_NO_OCP_AUTOIDLE (1 << 4) |
309 | #define HWMOD_SET_DEFAULT_CLOCKACT (1 << 5) | ||
304 | 310 | ||
305 | /* | 311 | /* |
306 | * omap_hwmod._int_flags definitions | 312 | * omap_hwmod._int_flags definitions |