diff options
author | Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> | 2012-02-05 07:25:32 -0500 |
---|---|---|
committer | Nicolas Ferre <nicolas.ferre@atmel.com> | 2012-02-17 11:54:05 -0500 |
commit | 0d78171672a30e8ec8084f54a557e9948260356d (patch) | |
tree | 68d9406fbd277896eed3a8b0447f0729dd0b979c | |
parent | 11a25ea7e4f870a37093258f577e11cec703e37e (diff) |
ARM: at91: factorise duplicated at91sam9 idle
Remove duplicated at91sam9xxxx_idle() functions introduced
by commit c9dfafb "ARM: mach-at91: move special idle code out of line".
Replace by a generic at91sam9_idle() function in setup.c common
location.
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
-rw-r--r-- | arch/arm/mach-at91/at91sam9260.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9261.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9263.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9g45.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-at91/at91sam9rl.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-at91/clock.c | 8 | ||||
-rw-r--r-- | arch/arm/mach-at91/generic.h | 3 |
7 files changed, 16 insertions, 35 deletions
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c index 9ac8c6fe3363..e9653328092d 100644 --- a/arch/arm/mach-at91/at91sam9260.c +++ b/arch/arm/mach-at91/at91sam9260.c | |||
@@ -329,15 +329,9 @@ static void __init at91sam9260_ioremap_registers(void) | |||
329 | at91sam9_ioremap_smc(0, AT91SAM9260_BASE_SMC); | 329 | at91sam9_ioremap_smc(0, AT91SAM9260_BASE_SMC); |
330 | } | 330 | } |
331 | 331 | ||
332 | static void at91sam9260_idle(void) | ||
333 | { | ||
334 | at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK); | ||
335 | cpu_do_idle(); | ||
336 | } | ||
337 | |||
338 | static void __init at91sam9260_initialize(void) | 332 | static void __init at91sam9260_initialize(void) |
339 | { | 333 | { |
340 | arm_pm_idle = at91sam9260_idle; | 334 | arm_pm_idle = at91sam9_idle; |
341 | arm_pm_restart = at91sam9_alt_restart; | 335 | arm_pm_restart = at91sam9_alt_restart; |
342 | at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1) | 336 | at91_extern_irq = (1 << AT91SAM9260_ID_IRQ0) | (1 << AT91SAM9260_ID_IRQ1) |
343 | | (1 << AT91SAM9260_ID_IRQ2); | 337 | | (1 << AT91SAM9260_ID_IRQ2); |
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index ab76868f01f5..d7f51d6f957d 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c | |||
@@ -287,15 +287,9 @@ static void __init at91sam9261_ioremap_registers(void) | |||
287 | at91sam9_ioremap_smc(0, AT91SAM9261_BASE_SMC); | 287 | at91sam9_ioremap_smc(0, AT91SAM9261_BASE_SMC); |
288 | } | 288 | } |
289 | 289 | ||
290 | static void at91sam9261_idle(void) | ||
291 | { | ||
292 | at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK); | ||
293 | cpu_do_idle(); | ||
294 | } | ||
295 | |||
296 | static void __init at91sam9261_initialize(void) | 290 | static void __init at91sam9261_initialize(void) |
297 | { | 291 | { |
298 | arm_pm_idle = at91sam9261_idle; | 292 | arm_pm_idle = at91sam9_idle; |
299 | arm_pm_restart = at91sam9_alt_restart; | 293 | arm_pm_restart = at91sam9_alt_restart; |
300 | at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1) | 294 | at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1) |
301 | | (1 << AT91SAM9261_ID_IRQ2); | 295 | | (1 << AT91SAM9261_ID_IRQ2); |
diff --git a/arch/arm/mach-at91/at91sam9263.c b/arch/arm/mach-at91/at91sam9263.c index 247ab633abcc..8bdba2a04b16 100644 --- a/arch/arm/mach-at91/at91sam9263.c +++ b/arch/arm/mach-at91/at91sam9263.c | |||
@@ -308,15 +308,9 @@ static void __init at91sam9263_ioremap_registers(void) | |||
308 | at91sam9_ioremap_smc(1, AT91SAM9263_BASE_SMC1); | 308 | at91sam9_ioremap_smc(1, AT91SAM9263_BASE_SMC1); |
309 | } | 309 | } |
310 | 310 | ||
311 | static void at91sam9263_idle(void) | ||
312 | { | ||
313 | at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK); | ||
314 | cpu_do_idle(); | ||
315 | } | ||
316 | |||
317 | static void __init at91sam9263_initialize(void) | 311 | static void __init at91sam9263_initialize(void) |
318 | { | 312 | { |
319 | arm_pm_idle = at91sam9263_idle; | 313 | arm_pm_idle = at91sam9_idle; |
320 | arm_pm_restart = at91sam9_alt_restart; | 314 | arm_pm_restart = at91sam9_alt_restart; |
321 | at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1); | 315 | at91_extern_irq = (1 << AT91SAM9263_ID_IRQ0) | (1 << AT91SAM9263_ID_IRQ1); |
322 | 316 | ||
diff --git a/arch/arm/mach-at91/at91sam9g45.c b/arch/arm/mach-at91/at91sam9g45.c index 5b12192e52ec..5d2ff90ca85f 100644 --- a/arch/arm/mach-at91/at91sam9g45.c +++ b/arch/arm/mach-at91/at91sam9g45.c | |||
@@ -317,12 +317,6 @@ static struct at91_gpio_bank at91sam9g45_gpio[] __initdata = { | |||
317 | } | 317 | } |
318 | }; | 318 | }; |
319 | 319 | ||
320 | static void at91sam9g45_idle(void) | ||
321 | { | ||
322 | at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK); | ||
323 | cpu_do_idle(); | ||
324 | } | ||
325 | |||
326 | /* -------------------------------------------------------------------- | 320 | /* -------------------------------------------------------------------- |
327 | * AT91SAM9G45 processor initialization | 321 | * AT91SAM9G45 processor initialization |
328 | * -------------------------------------------------------------------- */ | 322 | * -------------------------------------------------------------------- */ |
@@ -343,7 +337,7 @@ static void __init at91sam9g45_ioremap_registers(void) | |||
343 | 337 | ||
344 | static void __init at91sam9g45_initialize(void) | 338 | static void __init at91sam9g45_initialize(void) |
345 | { | 339 | { |
346 | arm_pm_idle = at91sam9g45_idle; | 340 | arm_pm_idle = at91sam9_idle; |
347 | arm_pm_restart = at91sam9g45_restart; | 341 | arm_pm_restart = at91sam9g45_restart; |
348 | at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0); | 342 | at91_extern_irq = (1 << AT91SAM9G45_ID_IRQ0); |
349 | 343 | ||
diff --git a/arch/arm/mach-at91/at91sam9rl.c b/arch/arm/mach-at91/at91sam9rl.c index fd60e226a987..e86c50b19d66 100644 --- a/arch/arm/mach-at91/at91sam9rl.c +++ b/arch/arm/mach-at91/at91sam9rl.c | |||
@@ -292,15 +292,9 @@ static void __init at91sam9rl_ioremap_registers(void) | |||
292 | at91sam9_ioremap_smc(0, AT91SAM9RL_BASE_SMC); | 292 | at91sam9_ioremap_smc(0, AT91SAM9RL_BASE_SMC); |
293 | } | 293 | } |
294 | 294 | ||
295 | static void at91sam9rl_idle(void) | ||
296 | { | ||
297 | at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK); | ||
298 | cpu_do_idle(); | ||
299 | } | ||
300 | |||
301 | static void __init at91sam9rl_initialize(void) | 295 | static void __init at91sam9rl_initialize(void) |
302 | { | 296 | { |
303 | arm_pm_idle = at91sam9rl_idle; | 297 | arm_pm_idle = at91sam9_idle; |
304 | arm_pm_restart = at91sam9_alt_restart; | 298 | arm_pm_restart = at91sam9_alt_restart; |
305 | at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0); | 299 | at91_extern_irq = (1 << AT91SAM9RL_ID_IRQ0); |
306 | 300 | ||
diff --git a/arch/arm/mach-at91/clock.c b/arch/arm/mach-at91/clock.c index a5291e0e7004..d1b4e0707e4d 100644 --- a/arch/arm/mach-at91/clock.c +++ b/arch/arm/mach-at91/clock.c | |||
@@ -28,6 +28,8 @@ | |||
28 | #include <mach/at91_pmc.h> | 28 | #include <mach/at91_pmc.h> |
29 | #include <mach/cpu.h> | 29 | #include <mach/cpu.h> |
30 | 30 | ||
31 | #include <asm/proc-fns.h> | ||
32 | |||
31 | #include "clock.h" | 33 | #include "clock.h" |
32 | #include "generic.h" | 34 | #include "generic.h" |
33 | 35 | ||
@@ -818,3 +820,9 @@ static int __init at91_clock_reset(void) | |||
818 | return 0; | 820 | return 0; |
819 | } | 821 | } |
820 | late_initcall(at91_clock_reset); | 822 | late_initcall(at91_clock_reset); |
823 | |||
824 | void at91sam9_idle(void) | ||
825 | { | ||
826 | at91_sys_write(AT91_PMC_SCDR, AT91_PMC_PCK); | ||
827 | cpu_do_idle(); | ||
828 | } | ||
diff --git a/arch/arm/mach-at91/generic.h b/arch/arm/mach-at91/generic.h index 7e8280e798c1..4e322f3492bf 100644 --- a/arch/arm/mach-at91/generic.h +++ b/arch/arm/mach-at91/generic.h | |||
@@ -56,6 +56,9 @@ struct device; | |||
56 | extern void at91_irq_suspend(void); | 56 | extern void at91_irq_suspend(void); |
57 | extern void at91_irq_resume(void); | 57 | extern void at91_irq_resume(void); |
58 | 58 | ||
59 | /* idle */ | ||
60 | extern void at91sam9_idle(void); | ||
61 | |||
59 | /* reset */ | 62 | /* reset */ |
60 | extern void at91_ioremap_rstc(u32 base_addr); | 63 | extern void at91_ioremap_rstc(u32 base_addr); |
61 | extern void at91sam9_alt_restart(char, const char *); | 64 | extern void at91sam9_alt_restart(char, const char *); |