diff options
Diffstat (limited to 'arch/arm/mach-at91rm9200/at91rm9200.c')
-rw-r--r-- | arch/arm/mach-at91rm9200/at91rm9200.c | 42 |
1 files changed, 20 insertions, 22 deletions
diff --git a/arch/arm/mach-at91rm9200/at91rm9200.c b/arch/arm/mach-at91rm9200/at91rm9200.c index dcf6136fedf9..a92e9a495b07 100644 --- a/arch/arm/mach-at91rm9200/at91rm9200.c +++ b/arch/arm/mach-at91rm9200/at91rm9200.c | |||
@@ -14,8 +14,10 @@ | |||
14 | 14 | ||
15 | #include <asm/mach/arch.h> | 15 | #include <asm/mach/arch.h> |
16 | #include <asm/mach/map.h> | 16 | #include <asm/mach/map.h> |
17 | #include <asm/arch/at91rm9200.h> | ||
18 | #include <asm/arch/at91_pmc.h> | ||
19 | #include <asm/arch/at91_st.h> | ||
17 | 20 | ||
18 | #include <asm/hardware.h> | ||
19 | #include "generic.h" | 21 | #include "generic.h" |
20 | #include "clock.h" | 22 | #include "clock.h" |
21 | 23 | ||
@@ -26,32 +28,12 @@ static struct map_desc at91rm9200_io_desc[] __initdata = { | |||
26 | .length = SZ_4K, | 28 | .length = SZ_4K, |
27 | .type = MT_DEVICE, | 29 | .type = MT_DEVICE, |
28 | }, { | 30 | }, { |
29 | .virtual = AT91_VA_BASE_SPI, | ||
30 | .pfn = __phys_to_pfn(AT91RM9200_BASE_SPI), | ||
31 | .length = SZ_16K, | ||
32 | .type = MT_DEVICE, | ||
33 | }, { | ||
34 | .virtual = AT91_VA_BASE_EMAC, | 31 | .virtual = AT91_VA_BASE_EMAC, |
35 | .pfn = __phys_to_pfn(AT91RM9200_BASE_EMAC), | 32 | .pfn = __phys_to_pfn(AT91RM9200_BASE_EMAC), |
36 | .length = SZ_16K, | 33 | .length = SZ_16K, |
37 | .type = MT_DEVICE, | 34 | .type = MT_DEVICE, |
38 | }, { | 35 | }, { |
39 | .virtual = AT91_VA_BASE_TWI, | 36 | .virtual = AT91_IO_VIRT_BASE - AT91RM9200_SRAM_SIZE, |
40 | .pfn = __phys_to_pfn(AT91RM9200_BASE_TWI), | ||
41 | .length = SZ_16K, | ||
42 | .type = MT_DEVICE, | ||
43 | }, { | ||
44 | .virtual = AT91_VA_BASE_MCI, | ||
45 | .pfn = __phys_to_pfn(AT91RM9200_BASE_MCI), | ||
46 | .length = SZ_16K, | ||
47 | .type = MT_DEVICE, | ||
48 | }, { | ||
49 | .virtual = AT91_VA_BASE_UDP, | ||
50 | .pfn = __phys_to_pfn(AT91RM9200_BASE_UDP), | ||
51 | .length = SZ_16K, | ||
52 | .type = MT_DEVICE, | ||
53 | }, { | ||
54 | .virtual = AT91_SRAM_VIRT_BASE, | ||
55 | .pfn = __phys_to_pfn(AT91RM9200_SRAM_BASE), | 37 | .pfn = __phys_to_pfn(AT91RM9200_SRAM_BASE), |
56 | .length = AT91RM9200_SRAM_SIZE, | 38 | .length = AT91RM9200_SRAM_SIZE, |
57 | .type = MT_DEVICE, | 39 | .type = MT_DEVICE, |
@@ -222,6 +204,16 @@ static struct at91_gpio_bank at91rm9200_gpio[] = { | |||
222 | } | 204 | } |
223 | }; | 205 | }; |
224 | 206 | ||
207 | static void at91rm9200_reset(void) | ||
208 | { | ||
209 | /* | ||
210 | * Perform a hardware reset with the use of the Watchdog timer. | ||
211 | */ | ||
212 | at91_sys_write(AT91_ST_WDMR, AT91_ST_RSTEN | AT91_ST_EXTEN | 1); | ||
213 | at91_sys_write(AT91_ST_CR, AT91_ST_WDRST); | ||
214 | } | ||
215 | |||
216 | |||
225 | /* -------------------------------------------------------------------- | 217 | /* -------------------------------------------------------------------- |
226 | * AT91RM9200 processor initialization | 218 | * AT91RM9200 processor initialization |
227 | * -------------------------------------------------------------------- */ | 219 | * -------------------------------------------------------------------- */ |
@@ -230,6 +222,12 @@ void __init at91rm9200_initialize(unsigned long main_clock, unsigned short banks | |||
230 | /* Map peripherals */ | 222 | /* Map peripherals */ |
231 | iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc)); | 223 | iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc)); |
232 | 224 | ||
225 | at91_arch_reset = at91rm9200_reset; | ||
226 | at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1) | ||
227 | | (1 << AT91RM9200_ID_IRQ2) | (1 << AT91RM9200_ID_IRQ3) | ||
228 | | (1 << AT91RM9200_ID_IRQ4) | (1 << AT91RM9200_ID_IRQ5) | ||
229 | | (1 << AT91RM9200_ID_IRQ6); | ||
230 | |||
233 | /* Init clock subsystem */ | 231 | /* Init clock subsystem */ |
234 | at91_clock_init(main_clock); | 232 | at91_clock_init(main_clock); |
235 | 233 | ||