diff options
author | Juergen Beisert <jbe@pengutronix.de> | 2011-11-28 17:00:39 +0100 |
---|---|---|
committer | Juergen Beisert <jbe@pengutronix.de> | 2012-07-17 16:52:50 +0200 |
commit | 1c2e313351b0f39615a4bb612d114502f81b87da (patch) | |
tree | b49804ab661b4774bf205051cf3422fe4aed822b | |
parent | 4ccd1af9b56db0d1703276eca6e5f2ce5d300094 (diff) | |
download | OSELAS.BSP-Pengutronix-Mini6410-1c2e313351b0f39615a4bb612d114502f81b87da.tar.gz OSELAS.BSP-Pengutronix-Mini6410-1c2e313351b0f39615a4bb612d114502f81b87da.tar.xz |
Kernel-3.1: save power as long some internal units are not used
Signed-off-by: Juergen Beisert <jbe@pengutronix.de>
3 files changed, 65 insertions, 0 deletions
diff --git a/configs/platform-friendlyarm-mini6410/Changelog b/configs/platform-friendlyarm-mini6410/Changelog index c27a116..7f69883 100644 --- a/configs/platform-friendlyarm-mini6410/Changelog +++ b/configs/platform-friendlyarm-mini6410/Changelog @@ -5,6 +5,7 @@ * Kernel 3.1: - fix the real 1Wire driver for the Mini6410 + - save power as long some internal units are not used 2011-11-23 Juergen Beisert <jbe@pengutronix.de> diff --git a/configs/platform-friendlyarm-mini6410/patches/linux-3.1/ARM_S3C64xx_Power_gate_unused_domains.patch b/configs/platform-friendlyarm-mini6410/patches/linux-3.1/ARM_S3C64xx_Power_gate_unused_domains.patch new file mode 100644 index 0000000..cbcc710 --- /dev/null +++ b/configs/platform-friendlyarm-mini6410/patches/linux-3.1/ARM_S3C64xx_Power_gate_unused_domains.patch @@ -0,0 +1,62 @@ +From: Mark Brown <broonie@opensource.wolfsonmicro.com> +Subject: [PATCH] ARM: S3C64xx: Power gate unused domains + +The S3C64xx CPUs have power gating support with a series of software +controllable power domains in the SoC. To take full advantage of these +we should implement runtime PM support but since several of the IP blocks +have no in tree drivers (and at this point aren't likely to acquire such +drivers) we can get some benefit from the hardware much more easily if +we just turn those blocks off unconditionally. This will cut down on the +leakage these domains generate without interfering with active usage. + +Do this for: + - Domain G: 3D acceleration + - Domain V: MFC + - Domain I: JPEG and camera interface + - Domain P: 2D acceleration, TV encoder and scaler + +This is easy to reverse if any of these devices do acquire drivers in the +future or as part of out of tree patches for them. + +Signed-off-by: Mark Brown <broonie@opensource.wolfsonmicro.com> +--- + arch/arm/mach-s3c64xx/pm.c | 15 +++++++++++++++ + 1 file changed, 15 insertions(+) + +Index: linux-3.1/arch/arm/mach-s3c64xx/pm.c +=================================================================== +--- linux-3.1.orig/arch/arm/mach-s3c64xx/pm.c ++++ linux-3.1/arch/arm/mach-s3c64xx/pm.c +@@ -85,6 +85,8 @@ static struct sleep_save misc_save[] = { + SAVE_ITEM(S3C64XX_MEM0CONSLP0), + SAVE_ITEM(S3C64XX_MEM0CONSLP1), + SAVE_ITEM(S3C64XX_MEM1CONSLP), ++ ++ SAVE_ITEM(S3C64XX_NORMAL_CFG), + }; + + void s3c_pm_configure_extint(void) +@@ -177,10 +179,23 @@ static void s3c64xx_pm_prepare(void) + + static int s3c64xx_pm_init(void) + { ++ u32 val; ++ + pm_cpu_prep = s3c64xx_pm_prepare; + pm_cpu_sleep = s3c64xx_cpu_suspend; + pm_uart_udivslot = 1; + ++ /* ++ * Unconditionally disable power domains that contain only ++ * blocks which have no mainline driver support. ++ */ ++ val = __raw_readl(S3C64XX_NORMAL_CFG); ++ val &= ~(S3C64XX_NORMALCFG_DOMAIN_G_ON | ++ S3C64XX_NORMALCFG_DOMAIN_V_ON | ++ S3C64XX_NORMALCFG_DOMAIN_I_ON | ++ S3C64XX_NORMALCFG_DOMAIN_P_ON); ++ __raw_writel(val, S3C64XX_NORMAL_CFG); ++ + #ifdef CONFIG_S3C_PM_DEBUG_LED_SMDK + gpio_request(S3C64XX_GPN(12), "DEBUG_LED0"); + gpio_request(S3C64XX_GPN(13), "DEBUG_LED1"); diff --git a/configs/platform-friendlyarm-mini6410/patches/linux-3.1/series b/configs/platform-friendlyarm-mini6410/patches/linux-3.1/series index 5256ec5..f00e3d4 100644 --- a/configs/platform-friendlyarm-mini6410/patches/linux-3.1/series +++ b/configs/platform-friendlyarm-mini6410/patches/linux-3.1/series @@ -64,4 +64,6 @@ mini6410_ow_backlight.patch mini6410_ow_touchscreen.patch add_1wire_driver_to_mini6410.diff +ARM_S3C64xx_Power_gate_unused_domains.patch + set-marker.diff |