summaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/pm.c
diff options
context:
space:
mode:
authorWenyou Yang <wenyou.yang@atmel.com>2015-03-09 04:45:35 +0100
committerNicolas Ferre <nicolas.ferre@atmel.com>2015-03-13 11:12:06 +0100
commit09fc78a601e59de89f125c8e6739fd21a7e2fd01 (patch)
tree8b89d0c57b93ed42b4eb3c1ad8af16432b34a083 /arch/arm/mach-at91/pm.c
parentARM: at91: move "select SRAM" under SOC_AT91SAM9 and SOC_SAMA5 (diff)
downloadlinux-09fc78a601e59de89f125c8e6739fd21a7e2fd01.tar.xz
linux-09fc78a601e59de89f125c8e6739fd21a7e2fd01.zip
ARM: at91/pm: remove CONFIG_AT91_SLOW_CLOCK config option
The slow clock always exists, selecting CONFIG_AT91_SLOW_CLOCK config is unnecessary for the suspend to memory mode. For this mode the master clock should always switch to the slow clock. Signed-off-by: Wenyou Yang <wenyou.yang@atmel.com> Acked-by: Alexandre Belloni <alexandre.belloni@free-electrons.com> Tested-by: Sylvain Rochet <sylvain.rochet@finsecur.com> Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91/pm.c')
-rw-r--r--arch/arm/mach-at91/pm.c12
1 files changed, 1 insertions, 11 deletions
diff --git a/arch/arm/mach-at91/pm.c b/arch/arm/mach-at91/pm.c
index a4473dcd0f7c..ea4d888994af 100644
--- a/arch/arm/mach-at91/pm.c
+++ b/arch/arm/mach-at91/pm.c
@@ -123,11 +123,9 @@ EXPORT_SYMBOL(at91_suspend_entering_slow_clock);
static void (*slow_clock)(void __iomem *pmc, void __iomem *ramc0,
void __iomem *ramc1, int memctrl);
-#ifdef CONFIG_AT91_SLOW_CLOCK
extern void at91_slow_clock(void __iomem *pmc, void __iomem *ramc0,
void __iomem *ramc1, int memctrl);
extern u32 at91_slow_clock_sz;
-#endif
static int at91_pm_enter(suspend_state_t state)
{
@@ -151,10 +149,9 @@ static int at91_pm_enter(suspend_state_t state)
* turning off the main oscillator; reverse on wakeup.
*/
if (slow_clock) {
-#ifdef CONFIG_AT91_SLOW_CLOCK
/* copy slow_clock handler to SRAM, and call it */
memcpy(slow_clock, at91_slow_clock, at91_slow_clock_sz);
-#endif
+
slow_clock(at91_pmc_base, at91_ramc_base[0],
at91_ramc_base[1],
at91_pm_data.memctrl);
@@ -263,7 +260,6 @@ static __init void at91_dt_ramc(void)
at91_pm_set_standby(standby);
}
-#ifdef CONFIG_AT91_SLOW_CLOCK
static void __init at91_pm_sram_init(void)
{
struct gen_pool *sram_pool;
@@ -300,16 +296,10 @@ static void __init at91_pm_sram_init(void)
sram_pbase = gen_pool_virt_to_phys(sram_pool, sram_base);
slow_clock = __arm_ioremap_exec(sram_pbase, at91_slow_clock_sz, false);
}
-#endif
-
static void __init at91_pm_init(void)
{
-#ifdef CONFIG_AT91_SLOW_CLOCK
at91_pm_sram_init();
-#endif
-
- pr_info("AT91: Power Management%s\n", (slow_clock ? " (with slow clock mode)" : ""));
if (at91_cpuidle_device.dev.platform_data)
platform_device_register(&at91_cpuidle_device);