aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91
diff options
context:
space:
mode:
authorWenyou Yang <wenyou.yang@atmel.com>2015-03-08 23:45:35 -0400
committerNicolas Ferre <nicolas.ferre@atmel.com>2015-03-13 06:12:06 -0400
commit09fc78a601e59de89f125c8e6739fd21a7e2fd01 (patch)
tree8b89d0c57b93ed42b4eb3c1ad8af16432b34a083 /arch/arm/mach-at91
parent896bc871a4a2db13212831749d21ffa7f405c73b (diff)
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')
-rw-r--r--arch/arm/mach-at91/Kconfig13
-rw-r--r--arch/arm/mach-at91/Makefile2
-rw-r--r--arch/arm/mach-at91/pm.c12
3 files changed, 2 insertions, 25 deletions
diff --git a/arch/arm/mach-at91/Kconfig b/arch/arm/mach-at91/Kconfig
index cd0e996565b3..89276fb0052a 100644
--- a/arch/arm/mach-at91/Kconfig
+++ b/arch/arm/mach-at91/Kconfig
@@ -118,19 +118,6 @@ endif # SOC_SAM_V4_V5
118 118
119comment "AT91 Feature Selections" 119comment "AT91 Feature Selections"
120 120
121config AT91_SLOW_CLOCK
122 bool "Suspend-to-RAM disables main oscillator"
123 depends on SUSPEND
124 help
125 Select this if you want Suspend-to-RAM to save the most power
126 possible (without powering off the CPU) by disabling the PLLs
127 and main oscillator so that only the 32 KiHz clock is available.
128
129 When only that slow-clock is available, some peripherals lose
130 functionality. Many can't issue wakeup events unless faster
131 clocks are available. Some lose their operating state and
132 need to be completely re-initialized.
133
134config AT91_TIMER_HZ 121config AT91_TIMER_HZ
135 int "Kernel HZ (jiffies per second)" 122 int "Kernel HZ (jiffies per second)"
136 range 32 1024 123 range 32 1024
diff --git a/arch/arm/mach-at91/Makefile b/arch/arm/mach-at91/Makefile
index 827fdbcce1c7..103c256ecb8b 100644
--- a/arch/arm/mach-at91/Makefile
+++ b/arch/arm/mach-at91/Makefile
@@ -13,7 +13,7 @@ obj-$(CONFIG_SOC_SAMA5) += sama5.o
13 13
14# Power Management 14# Power Management
15obj-$(CONFIG_PM) += pm.o 15obj-$(CONFIG_PM) += pm.o
16obj-$(CONFIG_AT91_SLOW_CLOCK) += pm_slowclock.o 16obj-$(CONFIG_PM) += pm_slowclock.o
17 17
18ifeq ($(CONFIG_PM_DEBUG),y) 18ifeq ($(CONFIG_PM_DEBUG),y)
19CFLAGS_pm.o += -DDEBUG 19CFLAGS_pm.o += -DDEBUG
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);
123static void (*slow_clock)(void __iomem *pmc, void __iomem *ramc0, 123static void (*slow_clock)(void __iomem *pmc, void __iomem *ramc0,
124 void __iomem *ramc1, int memctrl); 124 void __iomem *ramc1, int memctrl);
125 125
126#ifdef CONFIG_AT91_SLOW_CLOCK
127extern void at91_slow_clock(void __iomem *pmc, void __iomem *ramc0, 126extern void at91_slow_clock(void __iomem *pmc, void __iomem *ramc0,
128 void __iomem *ramc1, int memctrl); 127 void __iomem *ramc1, int memctrl);
129extern u32 at91_slow_clock_sz; 128extern u32 at91_slow_clock_sz;
130#endif
131 129
132static int at91_pm_enter(suspend_state_t state) 130static int at91_pm_enter(suspend_state_t state)
133{ 131{
@@ -151,10 +149,9 @@ static int at91_pm_enter(suspend_state_t state)
151 * turning off the main oscillator; reverse on wakeup. 149 * turning off the main oscillator; reverse on wakeup.
152 */ 150 */
153 if (slow_clock) { 151 if (slow_clock) {
154#ifdef CONFIG_AT91_SLOW_CLOCK
155 /* copy slow_clock handler to SRAM, and call it */ 152 /* copy slow_clock handler to SRAM, and call it */
156 memcpy(slow_clock, at91_slow_clock, at91_slow_clock_sz); 153 memcpy(slow_clock, at91_slow_clock, at91_slow_clock_sz);
157#endif 154
158 slow_clock(at91_pmc_base, at91_ramc_base[0], 155 slow_clock(at91_pmc_base, at91_ramc_base[0],
159 at91_ramc_base[1], 156 at91_ramc_base[1],
160 at91_pm_data.memctrl); 157 at91_pm_data.memctrl);
@@ -263,7 +260,6 @@ static __init void at91_dt_ramc(void)
263 at91_pm_set_standby(standby); 260 at91_pm_set_standby(standby);
264} 261}
265 262
266#ifdef CONFIG_AT91_SLOW_CLOCK
267static void __init at91_pm_sram_init(void) 263static void __init at91_pm_sram_init(void)
268{ 264{
269 struct gen_pool *sram_pool; 265 struct gen_pool *sram_pool;
@@ -300,16 +296,10 @@ static void __init at91_pm_sram_init(void)
300 sram_pbase = gen_pool_virt_to_phys(sram_pool, sram_base); 296 sram_pbase = gen_pool_virt_to_phys(sram_pool, sram_base);
301 slow_clock = __arm_ioremap_exec(sram_pbase, at91_slow_clock_sz, false); 297 slow_clock = __arm_ioremap_exec(sram_pbase, at91_slow_clock_sz, false);
302} 298}
303#endif
304
305 299
306static void __init at91_pm_init(void) 300static void __init at91_pm_init(void)
307{ 301{
308#ifdef CONFIG_AT91_SLOW_CLOCK
309 at91_pm_sram_init(); 302 at91_pm_sram_init();
310#endif
311
312 pr_info("AT91: Power Management%s\n", (slow_clock ? " (with slow clock mode)" : ""));
313 303
314 if (at91_cpuidle_device.dev.platform_data) 304 if (at91_cpuidle_device.dev.platform_data)
315 platform_device_register(&at91_cpuidle_device); 305 platform_device_register(&at91_cpuidle_device);