diff options
Diffstat (limited to 'arch/arm/mach-at91/at91sam9261.c')
-rw-r--r-- | arch/arm/mach-at91/at91sam9261.c | 22 |
1 files changed, 21 insertions, 1 deletions
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c index 3acd7d7e6a42..4ecf37996c77 100644 --- a/arch/arm/mach-at91/at91sam9261.c +++ b/arch/arm/mach-at91/at91sam9261.c | |||
@@ -16,6 +16,7 @@ | |||
16 | #include <asm/irq.h> | 16 | #include <asm/irq.h> |
17 | #include <asm/mach/arch.h> | 17 | #include <asm/mach/arch.h> |
18 | #include <asm/mach/map.h> | 18 | #include <asm/mach/map.h> |
19 | #include <mach/cpu.h> | ||
19 | #include <mach/at91sam9261.h> | 20 | #include <mach/at91sam9261.h> |
20 | #include <mach/at91_pmc.h> | 21 | #include <mach/at91_pmc.h> |
21 | #include <mach/at91_rstc.h> | 22 | #include <mach/at91_rstc.h> |
@@ -30,7 +31,11 @@ static struct map_desc at91sam9261_io_desc[] __initdata = { | |||
30 | .pfn = __phys_to_pfn(AT91_BASE_SYS), | 31 | .pfn = __phys_to_pfn(AT91_BASE_SYS), |
31 | .length = SZ_16K, | 32 | .length = SZ_16K, |
32 | .type = MT_DEVICE, | 33 | .type = MT_DEVICE, |
33 | }, { | 34 | }, |
35 | }; | ||
36 | |||
37 | static struct map_desc at91sam9261_sram_desc[] __initdata = { | ||
38 | { | ||
34 | .virtual = AT91_IO_VIRT_BASE - AT91SAM9261_SRAM_SIZE, | 39 | .virtual = AT91_IO_VIRT_BASE - AT91SAM9261_SRAM_SIZE, |
35 | .pfn = __phys_to_pfn(AT91SAM9261_SRAM_BASE), | 40 | .pfn = __phys_to_pfn(AT91SAM9261_SRAM_BASE), |
36 | .length = AT91SAM9261_SRAM_SIZE, | 41 | .length = AT91SAM9261_SRAM_SIZE, |
@@ -38,6 +43,15 @@ static struct map_desc at91sam9261_io_desc[] __initdata = { | |||
38 | }, | 43 | }, |
39 | }; | 44 | }; |
40 | 45 | ||
46 | static struct map_desc at91sam9g10_sram_desc[] __initdata = { | ||
47 | { | ||
48 | .virtual = AT91_IO_VIRT_BASE - AT91SAM9G10_SRAM_SIZE, | ||
49 | .pfn = __phys_to_pfn(AT91SAM9G10_SRAM_BASE), | ||
50 | .length = AT91SAM9G10_SRAM_SIZE, | ||
51 | .type = MT_DEVICE, | ||
52 | }, | ||
53 | }; | ||
54 | |||
41 | /* -------------------------------------------------------------------- | 55 | /* -------------------------------------------------------------------- |
42 | * Clocks | 56 | * Clocks |
43 | * -------------------------------------------------------------------- */ | 57 | * -------------------------------------------------------------------- */ |
@@ -263,6 +277,12 @@ void __init at91sam9261_initialize(unsigned long main_clock) | |||
263 | /* Map peripherals */ | 277 | /* Map peripherals */ |
264 | iotable_init(at91sam9261_io_desc, ARRAY_SIZE(at91sam9261_io_desc)); | 278 | iotable_init(at91sam9261_io_desc, ARRAY_SIZE(at91sam9261_io_desc)); |
265 | 279 | ||
280 | if (cpu_is_at91sam9g10()) | ||
281 | iotable_init(at91sam9g10_sram_desc, ARRAY_SIZE(at91sam9g10_sram_desc)); | ||
282 | else | ||
283 | iotable_init(at91sam9261_sram_desc, ARRAY_SIZE(at91sam9261_sram_desc)); | ||
284 | |||
285 | |||
266 | at91_arch_reset = at91sam9261_reset; | 286 | at91_arch_reset = at91sam9261_reset; |
267 | pm_power_off = at91sam9261_poweroff; | 287 | pm_power_off = at91sam9261_poweroff; |
268 | at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1) | 288 | at91_extern_irq = (1 << AT91SAM9261_ID_IRQ0) | (1 << AT91SAM9261_ID_IRQ1) |