aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-at91/at91sam9261.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-05-09 15:20:09 -0400
committerArnd Bergmann <arnd@arndb.de>2011-07-28 11:07:29 -0400
commitf0051d82a68abcf35418d49db1c82e6f0e514d78 (patch)
tree5a14645bdefe2a3c4671f456d4eb6595956c68ca /arch/arm/mach-at91/at91sam9261.c
parent51ddec7617bd0d4c73c44a8862faac5d7d97eb03 (diff)
at91: factorize sram init
Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Cc: Nicolas Ferre <nicolas.ferre@atmel.com> Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
Diffstat (limited to 'arch/arm/mach-at91/at91sam9261.c')
-rw-r--r--arch/arm/mach-at91/at91sam9261.c22
1 files changed, 2 insertions, 20 deletions
diff --git a/arch/arm/mach-at91/at91sam9261.c b/arch/arm/mach-at91/at91sam9261.c
index 8f97bd4a5268..d522b47e30b5 100644
--- a/arch/arm/mach-at91/at91sam9261.c
+++ b/arch/arm/mach-at91/at91sam9261.c
@@ -26,24 +26,6 @@
26#include "generic.h" 26#include "generic.h"
27#include "clock.h" 27#include "clock.h"
28 28
29static struct map_desc at91sam9261_sram_desc[] __initdata = {
30 {
31 .virtual = AT91_IO_VIRT_BASE - AT91SAM9261_SRAM_SIZE,
32 .pfn = __phys_to_pfn(AT91SAM9261_SRAM_BASE),
33 .length = AT91SAM9261_SRAM_SIZE,
34 .type = MT_DEVICE,
35 },
36};
37
38static struct map_desc at91sam9g10_sram_desc[] __initdata = {
39 {
40 .virtual = AT91_IO_VIRT_BASE - AT91SAM9G10_SRAM_SIZE,
41 .pfn = __phys_to_pfn(AT91SAM9G10_SRAM_BASE),
42 .length = AT91SAM9G10_SRAM_SIZE,
43 .type = MT_DEVICE,
44 },
45};
46
47/* -------------------------------------------------------------------- 29/* --------------------------------------------------------------------
48 * Clocks 30 * Clocks
49 * -------------------------------------------------------------------- */ 31 * -------------------------------------------------------------------- */
@@ -297,9 +279,9 @@ static void at91sam9261_poweroff(void)
297static void __init at91sam9261_map_io(void) 279static void __init at91sam9261_map_io(void)
298{ 280{
299 if (cpu_is_at91sam9g10()) 281 if (cpu_is_at91sam9g10())
300 iotable_init(at91sam9g10_sram_desc, ARRAY_SIZE(at91sam9g10_sram_desc)); 282 at91_init_sram(0, AT91SAM9G10_SRAM_BASE, AT91SAM9G10_SRAM_SIZE);
301 else 283 else
302 iotable_init(at91sam9261_sram_desc, ARRAY_SIZE(at91sam9261_sram_desc)); 284 at91_init_sram(0, AT91SAM9261_SRAM_BASE, AT91SAM9261_SRAM_SIZE);
303} 285}
304 286
305static void __init at91sam9261_initialize(void) 287static void __init at91sam9261_initialize(void)