aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9260.c
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-at91/at91sam9260.c')
-rw-r--r--arch/arm/mach-at91/at91sam9260.c53
1 files changed, 9 insertions, 44 deletions
diff --git a/arch/arm/mach-at91/at91sam9260.c b/arch/arm/mach-at91/at91sam9260.c
index 1addfef73b6c..cb397be14448 100644
--- a/arch/arm/mach-at91/at91sam9260.c
+++ b/arch/arm/mach-at91/at91sam9260.c
@@ -27,41 +27,6 @@
27#include "generic.h" 27#include "generic.h"
28#include "clock.h" 28#include "clock.h"
29 29
30static struct map_desc at91sam9260_sram_desc[] __initdata = {
31 {
32 .virtual = AT91_IO_VIRT_BASE - AT91SAM9260_SRAM0_SIZE,
33 .pfn = __phys_to_pfn(AT91SAM9260_SRAM0_BASE),
34 .length = AT91SAM9260_SRAM0_SIZE,
35 .type = MT_DEVICE,
36 }, {
37 .virtual = AT91_IO_VIRT_BASE - AT91SAM9260_SRAM0_SIZE - AT91SAM9260_SRAM1_SIZE,
38 .pfn = __phys_to_pfn(AT91SAM9260_SRAM1_BASE),
39 .length = AT91SAM9260_SRAM1_SIZE,
40 .type = MT_DEVICE,
41 }
42};
43
44static struct map_desc at91sam9g20_sram_desc[] __initdata = {
45 {
46 .virtual = AT91_IO_VIRT_BASE - AT91SAM9G20_SRAM0_SIZE,
47 .pfn = __phys_to_pfn(AT91SAM9G20_SRAM0_BASE),
48 .length = AT91SAM9G20_SRAM0_SIZE,
49 .type = MT_DEVICE,
50 }, {
51 .virtual = AT91_IO_VIRT_BASE - AT91SAM9G20_SRAM0_SIZE - AT91SAM9G20_SRAM1_SIZE,
52 .pfn = __phys_to_pfn(AT91SAM9G20_SRAM1_BASE),
53 .length = AT91SAM9G20_SRAM1_SIZE,
54 .type = MT_DEVICE,
55 }
56};
57
58static struct map_desc at91sam9xe_sram_desc[] __initdata = {
59 {
60 .pfn = __phys_to_pfn(AT91SAM9XE_SRAM_BASE),
61 .type = MT_DEVICE,
62 }
63};
64
65/* -------------------------------------------------------------------- 30/* --------------------------------------------------------------------
66 * Clocks 31 * Clocks
67 * -------------------------------------------------------------------- */ 32 * -------------------------------------------------------------------- */
@@ -334,20 +299,20 @@ static void __init at91sam9xe_map_io(void)
334 sram_size = SZ_16K; 299 sram_size = SZ_16K;
335 } 300 }
336 301
337 at91sam9xe_sram_desc->virtual = AT91_IO_VIRT_BASE - sram_size; 302 at91_init_sram(0, AT91SAM9XE_SRAM_BASE, sram_size);
338 at91sam9xe_sram_desc->length = sram_size;
339
340 iotable_init(at91sam9xe_sram_desc, ARRAY_SIZE(at91sam9xe_sram_desc));
341} 303}
342 304
343static void __init at91sam9260_map_io(void) 305static void __init at91sam9260_map_io(void)
344{ 306{
345 if (cpu_is_at91sam9xe()) 307 if (cpu_is_at91sam9xe()) {
346 at91sam9xe_map_io(); 308 at91sam9xe_map_io();
347 else if (cpu_is_at91sam9g20()) 309 } else if (cpu_is_at91sam9g20()) {
348 iotable_init(at91sam9g20_sram_desc, ARRAY_SIZE(at91sam9g20_sram_desc)); 310 at91_init_sram(0, AT91SAM9G20_SRAM0_BASE, AT91SAM9G20_SRAM0_SIZE);
349 else 311 at91_init_sram(1, AT91SAM9G20_SRAM1_BASE, AT91SAM9G20_SRAM1_SIZE);
350 iotable_init(at91sam9260_sram_desc, ARRAY_SIZE(at91sam9260_sram_desc)); 312 } else {
313 at91_init_sram(0, AT91SAM9260_SRAM0_BASE, AT91SAM9260_SRAM0_SIZE);
314 at91_init_sram(1, AT91SAM9260_SRAM1_BASE, AT91SAM9260_SRAM1_SIZE);
315 }
351} 316}
352 317
353static void __init at91sam9260_initialize(void) 318static void __init at91sam9260_initialize(void)