diff options
author | Michal Simek <monstr@monstr.eu> | 2012-03-30 12:10:03 +0200 |
---|---|---|
committer | Michal Simek <monstr@monstr.eu> | 2012-03-30 12:10:03 +0200 |
commit | 6a4770e335bd4df0a4577146f76e116ab6e23f40 (patch) | |
tree | 305056c20b6ccf3a4fed00e9e32f3a1dd039cd70 /arch/arm/mach-at91/at91rm9200.c | |
parent | microblaze: Fix stack usage in PAGE_SIZE copy_tofrom_user (diff) | |
parent | Merge tag 'sh-for-linus' of git://github.com/pmundt/linux-sh (diff) | |
download | linux-6a4770e335bd4df0a4577146f76e116ab6e23f40.tar.xz linux-6a4770e335bd4df0a4577146f76e116ab6e23f40.zip |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux-2.6 into next
Diffstat (limited to 'arch/arm/mach-at91/at91rm9200.c')
-rw-r--r-- | arch/arm/mach-at91/at91rm9200.c | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/arch/arm/mach-at91/at91rm9200.c b/arch/arm/mach-at91/at91rm9200.c index 99c3174e24a2..364c19357e60 100644 --- a/arch/arm/mach-at91/at91rm9200.c +++ b/arch/arm/mach-at91/at91rm9200.c @@ -15,6 +15,7 @@ #include <asm/irq.h> #include <asm/mach/arch.h> #include <asm/mach/map.h> +#include <asm/system_misc.h> #include <mach/at91rm9200.h> #include <mach/at91_pmc.h> #include <mach/at91_st.h> @@ -289,13 +290,22 @@ static struct at91_gpio_bank at91rm9200_gpio[] __initdata = { } }; +static void at91rm9200_idle(void) +{ + /* + * Disable the processor clock. The processor will be automatically + * re-enabled by an interrupt or by a reset. + */ + at91_pmc_write(AT91_PMC_SCDR, AT91_PMC_PCK); +} + static void at91rm9200_restart(char mode, const char *cmd) { /* * Perform a hardware reset with the use of the Watchdog timer. */ - at91_sys_write(AT91_ST_WDMR, AT91_ST_RSTEN | AT91_ST_EXTEN | 1); - at91_sys_write(AT91_ST_CR, AT91_ST_WDRST); + at91_st_write(AT91_ST_WDMR, AT91_ST_RSTEN | AT91_ST_EXTEN | 1); + at91_st_write(AT91_ST_CR, AT91_ST_WDRST); } /* -------------------------------------------------------------------- @@ -310,10 +320,13 @@ static void __init at91rm9200_map_io(void) static void __init at91rm9200_ioremap_registers(void) { + at91rm9200_ioremap_st(AT91RM9200_BASE_ST); + at91_ioremap_ramc(0, AT91RM9200_BASE_MC, 256); } static void __init at91rm9200_initialize(void) { + arm_pm_idle = at91rm9200_idle; arm_pm_restart = at91rm9200_restart; at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1) | (1 << AT91RM9200_ID_IRQ2) | (1 << AT91RM9200_ID_IRQ3) |