diff options
author | Sekhar Nori <nsekhar@ti.com> | 2009-10-22 15:12:14 +0530 |
---|---|---|
committer | Kevin Hilman <khilman@deeprootsystems.com> | 2009-11-25 10:21:37 -0800 |
commit | 1960e693ac12ae5fe518309d6a63a44c93fad9e7 (patch) | |
tree | 9d1faa09d38ec0f243e52bada89b53e2b20cfb89 /arch/arm/mach-davinci/devices-da8xx.c | |
parent | a6c0f6eca1173e9d44f1f0fb9ecc832abd7d77d6 (diff) |
davinci: DA8XX/OMAP-L1XX: add support for cpuidle driver register
This patch provides a function to help register cpuidle driver
on da8xx/omap-l1xx platforms.
Signed-off-by: Sekhar Nori <nsekhar@ti.com>
Signed-off-by: Kevin Hilman <khilman@deeprootsystems.com>
Diffstat (limited to 'arch/arm/mach-davinci/devices-da8xx.c')
-rw-r--r-- | arch/arm/mach-davinci/devices-da8xx.c | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/arch/arm/mach-davinci/devices-da8xx.c b/arch/arm/mach-davinci/devices-da8xx.c index fda83f82a5fe..dd2d32c4ce86 100644 --- a/arch/arm/mach-davinci/devices-da8xx.c +++ b/arch/arm/mach-davinci/devices-da8xx.c @@ -19,6 +19,7 @@ #include <mach/common.h> #include <mach/time.h> #include <mach/da8xx.h> +#include <mach/cpuidle.h> #include "clock.h" @@ -486,3 +487,32 @@ int da8xx_register_rtc(void) return platform_device_register(&da8xx_rtc_device); } + +static struct resource da8xx_cpuidle_resources[] = { + { + .start = DA8XX_DDR2_CTL_BASE, + .end = DA8XX_DDR2_CTL_BASE + SZ_32K - 1, + .flags = IORESOURCE_MEM, + }, +}; + +/* DA8XX devices support DDR2 power down */ +static struct davinci_cpuidle_config da8xx_cpuidle_pdata = { + .ddr2_pdown = 1, +}; + + +static struct platform_device da8xx_cpuidle_device = { + .name = "cpuidle-davinci", + .num_resources = ARRAY_SIZE(da8xx_cpuidle_resources), + .resource = da8xx_cpuidle_resources, + .dev = { + .platform_data = &da8xx_cpuidle_pdata, + }, +}; + +int __init da8xx_register_cpuidle(void) +{ + return platform_device_register(&da8xx_cpuidle_device); +} + |