at91: introduce commom AT91_BASE_SYS
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Sat, 23 Apr 2011 07:28:34 +0000 (15:28 +0800)
committerArnd Bergmann <arnd@arndb.de>
Thu, 28 Jul 2011 15:07:28 +0000 (15:07 +0000)
On all at91 except rm9200 and x40 have the System Controller starts
at address 0xffffc000 and has a size of 16KiB.

On rm9200 it's start at 0xfffe4000 of 111KiB with non reserved data starting
at 0xfffff000

This patch removes the individual definitions of AT91_BASE_SYS and
replaces them with a common version at base 0xfffffc000 and size 16KiB
and map the same memory space

Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
Cc: Patrice Vilchez <patrice.vilchez@atmel.com>
54 files changed:
arch/arm/mach-at91/Makefile
arch/arm/mach-at91/at91cap9.c
arch/arm/mach-at91/at91rm9200.c
arch/arm/mach-at91/at91sam9260.c
arch/arm/mach-at91/at91sam9261.c
arch/arm/mach-at91/at91sam9263.c
arch/arm/mach-at91/at91sam9g45.c
arch/arm/mach-at91/at91sam9rl.c
arch/arm/mach-at91/board-1arm.c
arch/arm/mach-at91/board-afeb-9260v1.c
arch/arm/mach-at91/board-cam60.c
arch/arm/mach-at91/board-cap9adk.c
arch/arm/mach-at91/board-carmeva.c
arch/arm/mach-at91/board-cpu9krea.c
arch/arm/mach-at91/board-cpuat91.c
arch/arm/mach-at91/board-csb337.c
arch/arm/mach-at91/board-csb637.c
arch/arm/mach-at91/board-eb9200.c
arch/arm/mach-at91/board-ecbat91.c
arch/arm/mach-at91/board-eco920.c
arch/arm/mach-at91/board-flexibity.c
arch/arm/mach-at91/board-foxg20.c
arch/arm/mach-at91/board-gsia18s.c
arch/arm/mach-at91/board-kafa.c
arch/arm/mach-at91/board-kb9202.c
arch/arm/mach-at91/board-neocore926.c
arch/arm/mach-at91/board-pcontrol-g20.c
arch/arm/mach-at91/board-picotux200.c
arch/arm/mach-at91/board-qil-a9260.c
arch/arm/mach-at91/board-rm9200dk.c
arch/arm/mach-at91/board-rm9200ek.c
arch/arm/mach-at91/board-sam9-l9260.c
arch/arm/mach-at91/board-sam9260ek.c
arch/arm/mach-at91/board-sam9261ek.c
arch/arm/mach-at91/board-sam9263ek.c
arch/arm/mach-at91/board-sam9g20ek.c
arch/arm/mach-at91/board-sam9m10g45ek.c
arch/arm/mach-at91/board-sam9rlek.c
arch/arm/mach-at91/board-snapper9260.c
arch/arm/mach-at91/board-stamp9g20.c
arch/arm/mach-at91/board-usb-a9260.c
arch/arm/mach-at91/board-usb-a9263.c
arch/arm/mach-at91/board-yl-9200.c
arch/arm/mach-at91/generic.h
arch/arm/mach-at91/include/mach/at91cap9.h
arch/arm/mach-at91/include/mach/at91rm9200.h
arch/arm/mach-at91/include/mach/at91sam9260.h
arch/arm/mach-at91/include/mach/at91sam9261.h
arch/arm/mach-at91/include/mach/at91sam9263.h
arch/arm/mach-at91/include/mach/at91sam9g45.h
arch/arm/mach-at91/include/mach/at91sam9rl.h
arch/arm/mach-at91/include/mach/hardware.h
arch/arm/mach-at91/setup.c [new file with mode: 0644]
arch/arm/mach-at91/soc.h [new file with mode: 0644]

index 96966231920cb5af2b18a15677ef14494b2e39dd..bf57e8b1c9d0b513e604ed356d391a095cbbf10e 100644 (file)
@@ -2,7 +2,7 @@
 # Makefile for the linux kernel.
 #
 
-obj-y          := irq.o gpio.o
+obj-y          := irq.o gpio.o setup.o
 obj-m          :=
 obj-n          :=
 obj-           :=
index f1013d08bb5738b7670264841b6e8723c4c64f70..7ec9eeb64286ff6d9f990a9d2c7fc17d17f727ca 100644 (file)
 #include <mach/at91_rstc.h>
 #include <mach/at91_shdwc.h>
 
+#include "soc.h"
 #include "generic.h"
 #include "clock.h"
 
-static struct map_desc at91cap9_io_desc[] __initdata = {
+static struct map_desc at91cap9_sram_desc[] __initdata = {
        {
-               .virtual        = AT91_VA_BASE_SYS,
-               .pfn            = __phys_to_pfn(AT91_BASE_SYS),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE,
-       }, {
                .virtual        = AT91_IO_VIRT_BASE - AT91CAP9_SRAM_SIZE,
                .pfn            = __phys_to_pfn(AT91CAP9_SRAM_BASE),
                .length         = AT91CAP9_SRAM_SIZE,
@@ -339,14 +335,12 @@ static void at91cap9_poweroff(void)
  *  AT91CAP9 processor initialization
  * -------------------------------------------------------------------- */
 
-void __init at91cap9_map_io(void)
+static void __init at91cap9_map_io(void)
 {
-       /* Map peripherals */
-       iotable_init(at91cap9_io_desc, ARRAY_SIZE(at91cap9_io_desc));
+       iotable_init(at91cap9_sram_desc, ARRAY_SIZE(at91cap9_sram_desc));
 }
 
-void __init at91cap9_initialize(unsigned long main_clock)
-{
+static void __init at91cap9_initialize(unsigned long main_clock)
        at91_arch_reset = at91cap9_reset;
        pm_power_off = at91cap9_poweroff;
        at91_extern_irq = (1 << AT91CAP9_ID_IRQ0) | (1 << AT91CAP9_ID_IRQ1);
@@ -420,3 +414,8 @@ void __init at91cap9_init_interrupts(unsigned int priority[NR_AIC_IRQS])
        /* Enable GPIO interrupts */
        at91_gpio_irq_setup();
 }
+
+struct at91_soc __initdata at91cap9_soc = {
+       .map_io = at91cap9_map_io,
+       .init = at91cap9_initialize,
+};
index 83a1a3fee5549be3f7cb92a8bb50335e9150509e..489f4d90f274f236dc2f6cc0374b1b1218dcea37 100644 (file)
 #include <mach/at91_st.h>
 #include <mach/cpu.h>
 
+#include "soc.h"
 #include "generic.h"
 #include "clock.h"
 
 static struct map_desc at91rm9200_io_desc[] __initdata = {
        {
-               .virtual        = AT91_VA_BASE_SYS,
-               .pfn            = __phys_to_pfn(AT91_BASE_SYS),
-               .length         = SZ_4K,
-               .type           = MT_DEVICE,
-       }, {
                .virtual        = AT91_VA_BASE_EMAC,
                .pfn            = __phys_to_pfn(AT91RM9200_BASE_EMAC),
                .length         = SZ_16K,
@@ -315,13 +311,13 @@ void __init at91rm9200_set_type(int type)
 /* --------------------------------------------------------------------
  *  AT91RM9200 processor initialization
  * -------------------------------------------------------------------- */
-void __init at91rm9200_map_io(void)
+static void __init at91rm9200_map_io(void)
 {
        /* Map peripherals */
        iotable_init(at91rm9200_io_desc, ARRAY_SIZE(at91rm9200_io_desc));
 }
 
-void __init at91rm9200_initialize(unsigned long main_clock)
+static void __init at91rm9200_initialize(unsigned long main_clock)
 {
        at91_arch_reset = at91rm9200_reset;
        at91_extern_irq = (1 << AT91RM9200_ID_IRQ0) | (1 << AT91RM9200_ID_IRQ1)
@@ -394,3 +390,8 @@ void __init at91rm9200_init_interrupts(unsigned int priority[NR_AIC_IRQS])
        /* Enable GPIO interrupts */
        at91_gpio_irq_setup();
 }
+
+struct at91_soc __initdata at91rm9200_soc = {
+       .map_io = at91rm9200_map_io,
+       .init = at91rm9200_initialize,
+};
index 7d606b04d313c5800359849ddff022a827655d87..366c5d69393bbdd4e8acbbda94a22ffb7f5b0446 100644 (file)
 #include <mach/at91_rstc.h>
 #include <mach/at91_shdwc.h>
 
+#include "soc.h"
 #include "generic.h"
 #include "clock.h"
 
-static struct map_desc at91sam9260_io_desc[] __initdata = {
-       {
-               .virtual        = AT91_VA_BASE_SYS,
-               .pfn            = __phys_to_pfn(AT91_BASE_SYS),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE,
-       }
-};
-
 static struct map_desc at91sam9260_sram_desc[] __initdata = {
        {
                .virtual        = AT91_IO_VIRT_BASE - AT91SAM9260_SRAM0_SIZE,
@@ -349,11 +341,8 @@ static void __init at91sam9xe_map_io(void)
        iotable_init(at91sam9xe_sram_desc, ARRAY_SIZE(at91sam9xe_sram_desc));
 }
 
-void __init at91sam9260_map_io(void)
+static void __init at91sam9260_map_io(void)
 {
-       /* Map peripherals */
-       iotable_init(at91sam9260_io_desc, ARRAY_SIZE(at91sam9260_io_desc));
-
        if (cpu_is_at91sam9xe())
                at91sam9xe_map_io();
        else if (cpu_is_at91sam9g20())
@@ -362,7 +351,7 @@ void __init at91sam9260_map_io(void)
                iotable_init(at91sam9260_sram_desc, ARRAY_SIZE(at91sam9260_sram_desc));
 }
 
-void __init at91sam9260_initialize(unsigned long main_clock)
+static void __init at91sam9260_initialize(unsigned long main_clock)
 {
        at91_arch_reset = at91sam9_alt_reset;
        pm_power_off = at91sam9260_poweroff;
@@ -432,3 +421,8 @@ void __init at91sam9260_init_interrupts(unsigned int priority[NR_AIC_IRQS])
        /* Enable GPIO interrupts */
        at91_gpio_irq_setup();
 }
+
+struct at91_soc __initdata at91sam9260_soc = {
+       .map_io = at91sam9260_map_io,
+       .init = at91sam9260_initialize,
+};
index c1483168c97a523569ff04676cf7f964e7282313..a0081c081c32d8bef869fa0a26dbe96c87d010d7 100644 (file)
 #include <mach/at91_rstc.h>
 #include <mach/at91_shdwc.h>
 
+#include "soc.h"
 #include "generic.h"
 #include "clock.h"
 
-static struct map_desc at91sam9261_io_desc[] __initdata = {
-       {
-               .virtual        = AT91_VA_BASE_SYS,
-               .pfn            = __phys_to_pfn(AT91_BASE_SYS),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE,
-       },
-};
-
 static struct map_desc at91sam9261_sram_desc[] __initdata = {
        {
                .virtual        = AT91_IO_VIRT_BASE - AT91SAM9261_SRAM_SIZE,
@@ -302,18 +294,15 @@ static void at91sam9261_poweroff(void)
  *  AT91SAM9261 processor initialization
  * -------------------------------------------------------------------- */
 
-void __init at91sam9261_map_io(void)
+static void __init at91sam9261_map_io(void)
 {
-       /* Map peripherals */
-       iotable_init(at91sam9261_io_desc, ARRAY_SIZE(at91sam9261_io_desc));
-
        if (cpu_is_at91sam9g10())
                iotable_init(at91sam9g10_sram_desc, ARRAY_SIZE(at91sam9g10_sram_desc));
        else
                iotable_init(at91sam9261_sram_desc, ARRAY_SIZE(at91sam9261_sram_desc));
 }
 
-void __init at91sam9261_initialize(unsigned long main_clock)
+static void __init at91sam9261_initialize(unsigned long main_clock)
 {
        at91_arch_reset = at91sam9_alt_reset;
        pm_power_off = at91sam9261_poweroff;
@@ -383,3 +372,8 @@ void __init at91sam9261_init_interrupts(unsigned int priority[NR_AIC_IRQS])
        /* Enable GPIO interrupts */
        at91_gpio_irq_setup();
 }
+
+struct at91_soc __initdata at91sam9261_soc = {
+       .map_io = at91sam9261_map_io,
+       .init = at91sam9261_initialize,
+};
index dc28477d14ffa158e0e0ae8031815ada848b9c51..49f83dffd2aa6aab5627474d15cfc2985b163886 100644 (file)
 #include <mach/at91_rstc.h>
 #include <mach/at91_shdwc.h>
 
+#include "soc.h"
 #include "generic.h"
 #include "clock.h"
 
-static struct map_desc at91sam9263_io_desc[] __initdata = {
+static struct map_desc at91sam9263_sram_desc[] __initdata = {
        {
-               .virtual        = AT91_VA_BASE_SYS,
-               .pfn            = __phys_to_pfn(AT91_BASE_SYS),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE,
-       }, {
                .virtual        = AT91_IO_VIRT_BASE - AT91SAM9263_SRAM0_SIZE,
                .pfn            = __phys_to_pfn(AT91SAM9263_SRAM0_BASE),
                .length         = AT91SAM9263_SRAM0_SIZE,
@@ -313,13 +309,12 @@ static void at91sam9263_poweroff(void)
  *  AT91SAM9263 processor initialization
  * -------------------------------------------------------------------- */
 
-void __init at91sam9263_map_io(void)
+static void __init at91sam9263_map_io(void)
 {
-       /* Map peripherals */
-       iotable_init(at91sam9263_io_desc, ARRAY_SIZE(at91sam9263_io_desc));
+       iotable_init(at91sam9263_sram_desc, ARRAY_SIZE(at91sam9263_sram_desc));
 }
 
-void __init at91sam9263_initialize(unsigned long main_clock)
+static void __init at91sam9263_initialize(unsigned long main_clock)
 {
        at91_arch_reset = at91sam9_alt_reset;
        pm_power_off = at91sam9263_poweroff;
@@ -388,3 +383,8 @@ void __init at91sam9263_init_interrupts(unsigned int priority[NR_AIC_IRQS])
        /* Enable GPIO interrupts */
        at91_gpio_irq_setup();
 }
+
+struct at91_soc __initdata at91sam9263_soc = {
+       .map_io = at91sam9263_map_io,
+       .init = at91sam9263_initialize,
+};
index 11e214121b23cd45d413f2b19273b61ce039f940..877c320fce2b4a0b45351062c616aa4e0d72172e 100644 (file)
 #include <mach/at91_shdwc.h>
 #include <mach/cpu.h>
 
+#include "soc.h"
 #include "generic.h"
 #include "clock.h"
 
-static struct map_desc at91sam9g45_io_desc[] __initdata = {
+static struct map_desc at91sam9g45_sram_desc[] __initdata = {
        {
-               .virtual        = AT91_VA_BASE_SYS,
-               .pfn            = __phys_to_pfn(AT91_BASE_SYS),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE,
-       }, {
                .virtual        = AT91_IO_VIRT_BASE - AT91SAM9G45_SRAM_SIZE,
                .pfn            = __phys_to_pfn(AT91SAM9G45_SRAM_BASE),
                .length         = AT91SAM9G45_SRAM_SIZE,
@@ -329,13 +325,12 @@ static void at91sam9g45_poweroff(void)
  *  AT91SAM9G45 processor initialization
  * -------------------------------------------------------------------- */
 
-void __init at91sam9g45_map_io(void)
+static void __init at91sam9g45_map_io(void)
 {
-       /* Map peripherals */
-       iotable_init(at91sam9g45_io_desc, ARRAY_SIZE(at91sam9g45_io_desc));
+       iotable_init(at91sam9g45_sram_desc, ARRAY_SIZE(at91sam9g45_sram_desc));
 }
 
-void __init at91sam9g45_initialize(unsigned long main_clock)
+static void __init at91sam9g45_initialize(unsigned long main_clock)
 {
        at91_arch_reset = at91sam9g45_reset;
        pm_power_off = at91sam9g45_poweroff;
@@ -404,3 +399,8 @@ void __init at91sam9g45_init_interrupts(unsigned int priority[NR_AIC_IRQS])
        /* Enable GPIO interrupts */
        at91_gpio_irq_setup();
 }
+
+struct at91_soc __initdata at91sam9g45_soc = {
+       .map_io = at91sam9g45_map_io,
+       .init = at91sam9g45_initialize,
+};
index 29dff18ed1309bb7442e4078c5e01a60ff056134..8ff7720b3e4a4b80ca627d005a2b5ae0591258d0 100644 (file)
 #include <mach/at91_rstc.h>
 #include <mach/at91_shdwc.h>
 
+#include "soc.h"
 #include "generic.h"
 #include "clock.h"
 
-static struct map_desc at91sam9rl_io_desc[] __initdata = {
-       {
-               .virtual        = AT91_VA_BASE_SYS,
-               .pfn            = __phys_to_pfn(AT91_BASE_SYS),
-               .length         = SZ_16K,
-               .type           = MT_DEVICE,
-       },
-};
-
 static struct map_desc at91sam9rl_sram_desc[] __initdata = {
        {
                .pfn            = __phys_to_pfn(AT91SAM9RL_SRAM_BASE),
@@ -287,13 +279,10 @@ static void at91sam9rl_poweroff(void)
  *  AT91SAM9RL processor initialization
  * -------------------------------------------------------------------- */
 
-void __init at91sam9rl_map_io(void)
+static void __init at91sam9rl_map_io(void)
 {
        unsigned long cidr, sram_size;
 
-       /* Map peripherals */
-       iotable_init(at91sam9rl_io_desc, ARRAY_SIZE(at91sam9rl_io_desc));
-
        cidr = at91_sys_read(AT91_DBGU_CIDR);
 
        switch (cidr & AT91_CIDR_SRAMSIZ) {
@@ -312,7 +301,7 @@ void __init at91sam9rl_map_io(void)
        iotable_init(at91sam9rl_sram_desc, ARRAY_SIZE(at91sam9rl_sram_desc));
 }
 
-void __init at91sam9rl_initialize(unsigned long main_clock)
+static void __init at91sam9rl_initialize(unsigned long main_clock)
 {
        at91_arch_reset = at91sam9_alt_reset;
        pm_power_off = at91sam9rl_poweroff;
@@ -381,3 +370,8 @@ void __init at91sam9rl_init_interrupts(unsigned int priority[NR_AIC_IRQS])
        /* Enable GPIO interrupts */
        at91_gpio_irq_setup();
 }
+
+struct at91_soc __initdata at91sam9rl_soc = {
+       .map_io = at91sam9rl_map_io,
+       .init = at91sam9rl_initialize,
+};
index ab1d463aa47d4c3c72d6df44f590bec8a767d24e..e588a9e15e7998dfb2b16562ab866b76727846a4 100644 (file)
@@ -46,7 +46,7 @@ static void __init onearm_init_early(void)
        at91rm9200_set_type(ARCH_REVISON_9200_PQFP);
 
        /* Initialize processor: 18.432 MHz crystal */
-       at91rm9200_initialize(18432000);
+       at91_initialize(18432000);
 
        /* DBGU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -97,7 +97,7 @@ static void __init onearm_board_init(void)
 MACHINE_START(ONEARM, "Ajeco 1ARM single board computer")
        /* Maintainer: Lennert Buytenhek <buytenh@wantstofly.org> */
        .timer          = &at91rm9200_timer,
-       .map_io         = at91rm9200_map_io,
+       .map_io         = at91_map_io,
        .init_early     = onearm_init_early,
        .init_irq       = onearm_init_irq,
        .init_machine   = onearm_board_init,
index a4924de48c36300e0121371ef0435e1ff4a8e43d..7cd1cb2f01037680e03e9a12ce5f8f91efbd34d4 100644 (file)
@@ -51,7 +51,7 @@
 static void __init afeb9260_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
-       at91sam9260_initialize(18432000);
+       at91_initialize(18432000);
 
        /* DBGU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -219,7 +219,7 @@ static void __init afeb9260_board_init(void)
 MACHINE_START(AFEB9260, "Custom afeb9260 board")
        /* Maintainer: Sergey Lapin <slapin@ossfans.org> */
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9260_map_io,
+       .map_io         = at91_map_io,
        .init_early     = afeb9260_init_early,
        .init_irq       = afeb9260_init_irq,
        .init_machine   = afeb9260_board_init,
index 148fccb9a25a4e9c5d10ec2740bd4e3a48195af0..bdc52e641e6dd13f8a7f9e15eea073e8ccb69c0a 100644 (file)
@@ -48,7 +48,7 @@
 static void __init cam60_init_early(void)
 {
        /* Initialize processor: 10 MHz crystal */
-       at91sam9260_initialize(10000000);
+       at91_initialize(10000000);
 
        /* DBGU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -199,7 +199,7 @@ static void __init cam60_board_init(void)
 MACHINE_START(CAM60, "KwikByte CAM60")
        /* Maintainer: KwikByte */
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9260_map_io,
+       .map_io         = at91_map_io,
        .init_early     = cam60_init_early,
        .init_irq       = cam60_init_irq,
        .init_machine   = cam60_board_init,
index cdb65d483250f8b8acf5a91495a878710f716cec..d04a6a0f3dd8322dd573a2205d33d48350ee7462 100644 (file)
@@ -53,7 +53,7 @@
 static void __init cap9adk_init_early(void)
 {
        /* Initialize processor: 12 MHz crystal */
-       at91cap9_initialize(12000000);
+       at91_initialize(12000000);
 
        /* Setup the LEDs: USER1 and USER2 LED for cpu/timer... */
        at91_init_leds(AT91_PIN_PA10, AT91_PIN_PA11);
@@ -397,7 +397,7 @@ static void __init cap9adk_board_init(void)
 MACHINE_START(AT91CAP9ADK, "Atmel AT91CAP9A-DK")
        /* Maintainer: Stelian Pop <stelian.pop@leadtechdesign.com> */
        .timer          = &at91sam926x_timer,
-       .map_io         = at91cap9_map_io,
+       .map_io         = at91_map_io,
        .init_early     = cap9adk_init_early,
        .init_irq       = cap9adk_init_irq,
        .init_machine   = cap9adk_board_init,
index f36b18687494a5548ace1b4a534cee7cb284aa1d..0a92b7a7c2178f450eb5b6ec35a9b57410ea392e 100644 (file)
@@ -43,7 +43,7 @@
 static void __init carmeva_init_early(void)
 {
        /* Initialize processor: 20.000 MHz crystal */
-       at91rm9200_initialize(20000000);
+       at91_initialize(20000000);
 
        /* DBGU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -163,7 +163,7 @@ static void __init carmeva_board_init(void)
 MACHINE_START(CARMEVA, "Carmeva")
        /* Maintainer: Conitec Datasystems */
        .timer          = &at91rm9200_timer,
-       .map_io         = at91rm9200_map_io,
+       .map_io         = at91_map_io,
        .init_early     = carmeva_init_early,
        .init_irq       = carmeva_init_irq,
        .init_machine   = carmeva_board_init,
index 980511084fe4179e9965568f26cb9a6d174380e9..01128f9a0597046f0ff7e443dd86b85b990a07a6 100644 (file)
@@ -50,7 +50,7 @@
 static void __init cpu9krea_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
-       at91sam9260_initialize(18432000);
+       at91_initialize(18432000);
 
        /* DGBU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -376,7 +376,7 @@ MACHINE_START(CPUAT9G20, "Eukrea CPU9G20")
 #endif
        /* Maintainer: Eric Benard - EUKREA Electromatique */
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9260_map_io,
+       .map_io         = at91_map_io,
        .init_early     = cpu9krea_init_early,
        .init_irq       = cpu9krea_init_irq,
        .init_machine   = cpu9krea_board_init,
index 6daabe3907a1d7cdaa033147de021114ce6727d2..0692606b9fee98230b443ef23634adde4d512b9a 100644 (file)
@@ -57,7 +57,7 @@ static void __init cpuat91_init_early(void)
        at91rm9200_set_type(ARCH_REVISON_9200_PQFP);
 
        /* Initialize processor: 18.432 MHz crystal */
-       at91rm9200_initialize(18432000);
+       at91_initialize(18432000);
 
        /* DBGU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -180,7 +180,7 @@ static void __init cpuat91_board_init(void)
 MACHINE_START(CPUAT91, "Eukrea")
        /* Maintainer: Eric Benard - EUKREA Electromatique */
        .timer          = &at91rm9200_timer,
-       .map_io         = at91rm9200_map_io,
+       .map_io         = at91_map_io,
        .init_early     = cpuat91_init_early,
        .init_irq       = cpuat91_init_irq,
        .init_machine   = cpuat91_board_init,
index d98bcec1dfe000d6dc667081f36655a6206bf5fa..923cccb7948da8ea58dcfd1d6cfb199a322b7f59 100644 (file)
@@ -46,7 +46,7 @@
 static void __init csb337_init_early(void)
 {
        /* Initialize processor: 3.6864 MHz crystal */
-       at91rm9200_initialize(3686400);
+       at91_initialize(3686400);
 
        /* Setup the LEDs */
        at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
@@ -258,7 +258,7 @@ static void __init csb337_board_init(void)
 MACHINE_START(CSB337, "Cogent CSB337")
        /* Maintainer: Bill Gatliff */
        .timer          = &at91rm9200_timer,
-       .map_io         = at91rm9200_map_io,
+       .map_io         = at91_map_io,
        .init_early     = csb337_init_early,
        .init_irq       = csb337_init_irq,
        .init_machine   = csb337_board_init,
index 019aab4e20b01394aba18eb89580e2ed729b08a6..51131cad1abb718054a9ccf8c4fcfee188764766 100644 (file)
@@ -43,7 +43,7 @@
 static void __init csb637_init_early(void)
 {
        /* Initialize processor: 3.6864 MHz crystal */
-       at91rm9200_initialize(3686400);
+       at91_initialize(3686400);
 
        /* DBGU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -139,7 +139,7 @@ static void __init csb637_board_init(void)
 MACHINE_START(CSB637, "Cogent CSB637")
        /* Maintainer: Bill Gatliff */
        .timer          = &at91rm9200_timer,
-       .map_io         = at91rm9200_map_io,
+       .map_io         = at91_map_io,
        .init_early     = csb637_init_early,
        .init_irq       = csb637_init_irq,
        .init_machine   = csb637_board_init,
index e9484535cbc81f213b77bf617068721a037a3b9a..705071cbd232b6184ef16bb9ced59bd49c3c8af1 100644 (file)
@@ -43,7 +43,7 @@
 static void __init eb9200_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
-       at91rm9200_initialize(18432000);
+       at91_initialize(18432000);
 
        /* DBGU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -121,7 +121,7 @@ static void __init eb9200_board_init(void)
 
 MACHINE_START(ATEB9200, "Embest ATEB9200")
        .timer          = &at91rm9200_timer,
-       .map_io         = at91rm9200_map_io,
+       .map_io         = at91_map_io,
        .init_early     = eb9200_init_early,
        .init_irq       = eb9200_init_irq,
        .init_machine   = eb9200_board_init,
index a6f57faa10a7f1dbc202c6d320c03854fff54982..a9f106a2bd2c15f9a26e80f70beb6c7c7bda1a13 100644 (file)
@@ -49,7 +49,7 @@ static void __init ecb_at91init_early(void)
        at91rm9200_set_type(ARCH_REVISON_9200_PQFP);
 
        /* Initialize processor: 18.432 MHz crystal */
-       at91rm9200_initialize(18432000);
+       at91_initialize(18432000);
 
        /* Setup the LEDs */
        at91_init_leds(AT91_PIN_PC7, AT91_PIN_PC7);
@@ -173,7 +173,7 @@ static void __init ecb_at91board_init(void)
 MACHINE_START(ECBAT91, "emQbit's ECB_AT91")
        /* Maintainer: emQbit.com */
        .timer          = &at91rm9200_timer,
-       .map_io         = at91rm9200_map_io,
+       .map_io         = at91_map_io,
        .init_early     = ecb_at91init_early,
        .init_irq       = ecb_at91init_irq,
        .init_machine   = ecb_at91board_init,
index bfc0062d1483f61e0a1d7026ca9a859a41253840..8639fbde96694b6795c81aff939ce7bb81c086e6 100644 (file)
@@ -35,7 +35,7 @@ static void __init eco920_init_early(void)
        /* Set cpu type: PQFP */
        at91rm9200_set_type(ARCH_REVISON_9200_PQFP);
 
-       at91rm9200_initialize(18432000);
+       at91_initialize(18432000);
 
        /* Setup the LEDs */
        at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
@@ -135,7 +135,7 @@ static void __init eco920_board_init(void)
 MACHINE_START(ECO920, "eco920")
        /* Maintainer: Sascha Hauer */
        .timer          = &at91rm9200_timer,
-       .map_io         = at91rm9200_map_io,
+       .map_io         = at91_map_io,
        .init_early     = eco920_init_early,
        .init_irq       = eco920_init_irq,
        .init_machine   = eco920_board_init,
index 466c063b8d218257eae472407a24c5b58773b9b9..f45583ed5a66b937774a63e181d58c8d8eeb49f7 100644 (file)
@@ -40,7 +40,7 @@
 static void __init flexibity_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
-       at91sam9260_initialize(18432000);
+       at91_initialize(18432000);
 
        /* DBGU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -155,7 +155,7 @@ static void __init flexibity_board_init(void)
 MACHINE_START(FLEXIBITY, "Flexibity Connect")
        /* Maintainer: Maxim Osipov */
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9260_map_io,
+       .map_io         = at91_map_io,
        .init_early     = flexibity_init_early,
        .init_irq       = flexibity_init_irq,
        .init_machine   = flexibity_board_init,
index e2d1dc9eff452f09d0459b3191ebaaac387709c0..b78442b21361d10b135ddda25fd791ffa0851aff 100644 (file)
@@ -60,7 +60,7 @@
 static void __init foxg20_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
-       at91sam9260_initialize(18432000);
+       at91_initialize(18432000);
 
        /* DBGU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -267,7 +267,7 @@ static void __init foxg20_board_init(void)
 MACHINE_START(ACMENETUSFOXG20, "Acme Systems srl FOX Board G20")
        /* Maintainer: Sergio Tanzilli */
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9260_map_io,
+       .map_io         = at91_map_io,
        .init_early     = foxg20_init_early,
        .init_irq       = foxg20_init_irq,
        .init_machine   = foxg20_board_init,
index 1d4f36b3cb275d0b27ce83e8a187201efc36402b..6588143461fdc4d02e1b0678e9b7fd721646ad02 100644 (file)
@@ -577,7 +577,7 @@ static void __init gsia18s_board_init(void)
 
 MACHINE_START(GSIA18S, "GS_IA18_S")
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9260_map_io,
+       .map_io         = at91_map_io,
        .init_early     = gsia18s_init_early,
        .init_irq       = init_irq,
        .init_machine   = gsia18s_board_init,
index 9b003ff744ba4c87d3746001de09125a36fe7657..d26b960cf9c447f32f4386c90538b69c6852b99b 100644 (file)
@@ -46,7 +46,7 @@ static void __init kafa_init_early(void)
        at91rm9200_set_type(ARCH_REVISON_9200_PQFP);
 
        /* Initialize processor: 18.432 MHz crystal */
-       at91rm9200_initialize(18432000);
+       at91_initialize(18432000);
 
        /* Set up the LEDs */
        at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4);
@@ -99,7 +99,7 @@ static void __init kafa_board_init(void)
 MACHINE_START(KAFA, "Sperry-Sun KAFA")
        /* Maintainer: Sergei Sharonov */
        .timer          = &at91rm9200_timer,
-       .map_io         = at91rm9200_map_io,
+       .map_io         = at91_map_io,
        .init_early     = kafa_init_early,
        .init_irq       = kafa_init_irq,
        .init_machine   = kafa_board_init,
index a813a74b65f9e296aba3d4d31af7f48913dd87e2..a4d8153024281500ff4758591263dd5105aa16d1 100644 (file)
@@ -48,7 +48,7 @@ static void __init kb9202_init_early(void)
        at91rm9200_set_type(ARCH_REVISON_9200_PQFP);
 
        /* Initialize processor: 10 MHz crystal */
-       at91rm9200_initialize(10000000);
+       at91_initialize(10000000);
 
        /* Set up the LEDs */
        at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18);
@@ -140,7 +140,7 @@ static void __init kb9202_board_init(void)
 MACHINE_START(KB9200, "KB920x")
        /* Maintainer: KwikByte, Inc. */
        .timer          = &at91rm9200_timer,
-       .map_io         = at91rm9200_map_io,
+       .map_io         = at91_map_io,
        .init_early     = kb9202_init_early,
        .init_irq       = kb9202_init_irq,
        .init_machine   = kb9202_board_init,
index 961e805db68c21f7bde7db486d43126e57e31cd5..26a4c631baf4f5a5e923f60e30a8b77544c38f70 100644 (file)
@@ -54,7 +54,7 @@
 static void __init neocore926_init_early(void)
 {
        /* Initialize processor: 20 MHz crystal */
-       at91sam9263_initialize(20000000);
+       at91_initialize(20000000);
 
        /* DBGU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -388,7 +388,7 @@ static void __init neocore926_board_init(void)
 MACHINE_START(NEOCORE926, "ADENEO NEOCORE 926")
        /* Maintainer: ADENEO */
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9263_map_io,
+       .map_io         = at91_map_io,
        .init_early     = neocore926_init_early,
        .init_irq       = neocore926_init_irq,
        .init_machine   = neocore926_board_init,
index 21a21af258784336c94a7b374b883a26f6652d82..7651e7f936555279c1e6062ea0409a814b7c9691 100644 (file)
@@ -223,7 +223,7 @@ static void __init pcontrol_g20_board_init(void)
 MACHINE_START(PCONTROL_G20, "PControl G20")
        /* Maintainer: pgsellmann@portner-elektronik.at */
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9260_map_io,
+       .map_io         = at91_map_io,
        .init_early     = pcontrol_g20_init_early,
        .init_irq       = init_irq,
        .init_machine   = pcontrol_g20_board_init,
index 756cc2a745ddd16c5ac5f1f3a23cc10aac4fe158..c7294f88abeed11e549d8ecf484091f417a37785 100644 (file)
@@ -46,7 +46,7 @@
 static void __init picotux200_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
-       at91rm9200_initialize(18432000);
+       at91_initialize(18432000);
 
        /* DBGU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -124,7 +124,7 @@ static void __init picotux200_board_init(void)
 MACHINE_START(PICOTUX2XX, "picotux 200")
        /* Maintainer: Kleinhenz Elektronik GmbH */
        .timer          = &at91rm9200_timer,
-       .map_io         = at91rm9200_map_io,
+       .map_io         = at91_map_io,
        .init_early     = picotux200_init_early,
        .init_irq       = picotux200_init_irq,
        .init_machine   = picotux200_board_init,
index d1a6001b0bd86b7a931ff0c8f86e710a85ae67eb..68e31a905c3ca26c556210d39f53fecf2aaea319 100644 (file)
@@ -51,7 +51,7 @@
 static void __init ek_init_early(void)
 {
        /* Initialize processor: 12.000 MHz crystal */
-       at91sam9260_initialize(12000000);
+       at91_initialize(12000000);
 
        /* DBGU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -269,7 +269,7 @@ static void __init ek_board_init(void)
 MACHINE_START(QIL_A9260, "CALAO QIL_A9260")
        /* Maintainer: calao-systems */
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9260_map_io,
+       .map_io         = at91_map_io,
        .init_early     = ek_init_early,
        .init_irq       = ek_init_irq,
        .init_machine   = ek_board_init,
index aef9627710b0cee79ce885abb8b6e1be60df1bf5..97c6f211b11f0e1b88b7147bdd272e2b97502b1f 100644 (file)
@@ -48,7 +48,7 @@
 static void __init dk_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
-       at91rm9200_initialize(18432000);
+       at91_initialize(18432000);
 
        /* Setup the LEDs */
        at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2);
@@ -228,7 +228,7 @@ static void __init dk_board_init(void)
 MACHINE_START(AT91RM9200DK, "Atmel AT91RM9200-DK")
        /* Maintainer: SAN People/Atmel */
        .timer          = &at91rm9200_timer,
-       .map_io         = at91rm9200_map_io,
+       .map_io         = at91_map_io,
        .init_early     = dk_init_early,
        .init_irq       = dk_init_irq,
        .init_machine   = dk_board_init,
index 015a02183080973619b389bf406c98ee87ba91af..72aa8bfbfc50a297fd8e53863290a7c9e5276d40 100644 (file)
@@ -48,7 +48,7 @@
 static void __init ek_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
-       at91rm9200_initialize(18432000);
+       at91_initialize(18432000);
 
        /* Setup the LEDs */
        at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2);
@@ -194,7 +194,7 @@ static void __init ek_board_init(void)
 MACHINE_START(AT91RM9200EK, "Atmel AT91RM9200-EK")
        /* Maintainer: SAN People/Atmel */
        .timer          = &at91rm9200_timer,
-       .map_io         = at91rm9200_map_io,
+       .map_io         = at91_map_io,
        .init_early     = ek_init_early,
        .init_irq       = ek_init_irq,
        .init_machine   = ek_board_init,
index aaf1bf0989b3c1635e40e6314456cd7189594d77..93c36bd95fd8579ba0e1cf03c9da0a290b544d39 100644 (file)
@@ -47,7 +47,7 @@
 static void __init ek_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
-       at91sam9260_initialize(18432000);
+       at91_initialize(18432000);
 
        /* Setup the LEDs */
        at91_init_leds(AT91_PIN_PA9, AT91_PIN_PA6);
@@ -213,7 +213,7 @@ static void __init ek_board_init(void)
 MACHINE_START(SAM9_L9260, "Olimex SAM9-L9260")
        /* Maintainer: Olimex */
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9260_map_io,
+       .map_io         = at91_map_io,
        .init_early     = ek_init_early,
        .init_irq       = ek_init_irq,
        .init_machine   = ek_board_init,
index 5c240743c5b7ebec2650c8871ac4ba1a45b418c0..044a40cdb222b1e26059698633e16372e8d87b0c 100644 (file)
@@ -53,7 +53,7 @@
 static void __init ek_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
-       at91sam9260_initialize(18432000);
+       at91_initialize(18432000);
 
        /* DBGU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -354,7 +354,7 @@ static void __init ek_board_init(void)
 MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK")
        /* Maintainer: Atmel */
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9260_map_io,
+       .map_io         = at91_map_io,
        .init_early     = ek_init_early,
        .init_irq       = ek_init_irq,
        .init_machine   = ek_board_init,
index b60c22b6e2411ad35455825b2ff4f916b62e66e4..d8e0aa08009a2607375996323ae119bb959826f5 100644 (file)
@@ -57,7 +57,7 @@
 static void __init ek_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
-       at91sam9261_initialize(18432000);
+       at91_initialize(18432000);
 
        /* Setup the LEDs */
        at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14);
@@ -621,7 +621,7 @@ MACHINE_START(AT91SAM9G10EK, "Atmel AT91SAM9G10-EK")
 #endif
        /* Maintainer: Atmel */
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9261_map_io,
+       .map_io         = at91_map_io,
        .init_early     = ek_init_early,
        .init_irq       = ek_init_irq,
        .init_machine   = ek_board_init,
index 9bbdc92ea194b5a5f898c727e65fce60fae5bcf2..d72a30cba3643d8150e35de981fddf63d25a03c2 100644 (file)
@@ -56,7 +56,7 @@
 static void __init ek_init_early(void)
 {
        /* Initialize processor: 16.367 MHz crystal */
-       at91sam9263_initialize(16367660);
+       at91_initialize(16367660);
 
        /* DBGU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -452,7 +452,7 @@ static void __init ek_board_init(void)
 MACHINE_START(AT91SAM9263EK, "Atmel AT91SAM9263-EK")
        /* Maintainer: Atmel */
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9263_map_io,
+       .map_io         = at91_map_io,
        .init_early     = ek_init_early,
        .init_irq       = ek_init_irq,
        .init_machine   = ek_board_init,
index 1325a50101a812065aa617f245987a50a6198c41..98e026ad8b785c8e7ca6f9bcfb120f2501bc180a 100644 (file)
@@ -64,7 +64,7 @@ static int inline ek_have_2mmc(void)
 static void __init ek_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
-       at91sam9260_initialize(18432000);
+       at91_initialize(18432000);
 
        /* DBGU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -404,7 +404,7 @@ static void __init ek_board_init(void)
 MACHINE_START(AT91SAM9G20EK, "Atmel AT91SAM9G20-EK")
        /* Maintainer: Atmel */
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9260_map_io,
+       .map_io         = at91_map_io,
        .init_early     = ek_init_early,
        .init_irq       = ek_init_irq,
        .init_machine   = ek_board_init,
@@ -413,7 +413,7 @@ MACHINE_END
 MACHINE_START(AT91SAM9G20EK_2MMC, "Atmel AT91SAM9G20-EK 2 MMC Slot Mod")
        /* Maintainer: Atmel */
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9260_map_io,
+       .map_io         = at91_map_io,
        .init_early     = ek_init_early,
        .init_irq       = ek_init_irq,
        .init_machine   = ek_board_init,
index 33eaa135f2480a4fc58df6db1eaeb82133fbd1d6..2df5d4140b155788e4dfe77560225d68303f98a7 100644 (file)
@@ -50,7 +50,7 @@
 static void __init ek_init_early(void)
 {
        /* Initialize processor: 12.000 MHz crystal */
-       at91sam9g45_initialize(12000000);
+       at91_initialize(12000000);
 
        /* DGBU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -422,7 +422,7 @@ static void __init ek_board_init(void)
 MACHINE_START(AT91SAM9M10G45EK, "Atmel AT91SAM9M10G45-EK")
        /* Maintainer: Atmel */
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9g45_map_io,
+       .map_io         = at91_map_io,
        .init_early     = ek_init_early,
        .init_irq       = ek_init_irq,
        .init_machine   = ek_board_init,
index effb399a80a689ce5993e7526715ebb875b0d4a3..defbca479c0e1e576edbd2ca60c646f1aee45f74 100644 (file)
@@ -41,7 +41,7 @@
 static void __init ek_init_early(void)
 {
        /* Initialize processor: 12.000 MHz crystal */
-       at91sam9rl_initialize(12000000);
+       at91_initialize(12000000);
 
        /* DBGU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -330,7 +330,7 @@ static void __init ek_board_init(void)
 MACHINE_START(AT91SAM9RLEK, "Atmel AT91SAM9RL-EK")
        /* Maintainer: Atmel */
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9rl_map_io,
+       .map_io         = at91_map_io,
        .init_early     = ek_init_early,
        .init_irq       = ek_init_irq,
        .init_machine   = ek_board_init,
index 3eb0a1153cc8f2ee50c5f5e2f6afd1947173de78..c600b1491e44df27a042a0efda9df0c302dfdd78 100644 (file)
@@ -42,7 +42,7 @@
 
 static void __init snapper9260_init_early(void)
 {
-       at91sam9260_initialize(18432000);
+       at91_initialize(18432000);
 
        /* Debug on ttyS0 */
        at91_register_uart(0, 0, 0);
@@ -179,7 +179,7 @@ static void __init snapper9260_board_init(void)
 
 MACHINE_START(SNAPPER_9260, "Bluewater Systems Snapper 9260/9G20 module")
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9260_map_io,
+       .map_io         = at91_map_io,
        .init_early     = snapper9260_init_early,
        .init_irq       = snapper9260_init_irq,
        .init_machine   = snapper9260_board_init,
index 5e5c85688f5f5a59ade095ec246952ef4750419e..e65efdaf9c4bb83b987852d1ba20a36620e5b157 100644 (file)
@@ -35,7 +35,7 @@
 void __init stamp9g20_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
-       at91sam9260_initialize(18432000);
+       at91_initialize(18432000);
 
        /* DGBU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -299,7 +299,7 @@ static void __init stamp9g20evb_board_init(void)
 MACHINE_START(PORTUXG20, "taskit PortuxG20")
        /* Maintainer: taskit GmbH */
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9260_map_io,
+       .map_io         = at91_map_io,
        .init_early     = portuxg20_init_early,
        .init_irq       = init_irq,
        .init_machine   = portuxg20_board_init,
@@ -308,7 +308,7 @@ MACHINE_END
 MACHINE_START(STAMP9G20, "taskit Stamp9G20")
        /* Maintainer: taskit GmbH */
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9260_map_io,
+       .map_io         = at91_map_io,
        .init_early     = stamp9g20evb_init_early,
        .init_irq       = init_irq,
        .init_machine   = stamp9g20evb_board_init,
index 0e784e6fedec3641acf2b2ebf502b4d682fe91dc..afc3b04d877b7f35ed1bd1f58d098c3a9c0ae76f 100644 (file)
@@ -51,7 +51,7 @@
 static void __init ek_init_early(void)
 {
        /* Initialize processor: 12.000 MHz crystal */
-       at91sam9260_initialize(12000000);
+       at91_initialize(12000000);
 
        /* DBGU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -229,7 +229,7 @@ static void __init ek_board_init(void)
 MACHINE_START(USB_A9260, "CALAO USB_A9260")
        /* Maintainer: calao-systems */
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9260_map_io,
+       .map_io         = at91_map_io,
        .init_early     = ek_init_early,
        .init_irq       = ek_init_irq,
        .init_machine   = ek_board_init,
index cf626dd14b2ccc6c914790641e523989cfe66413..25357e007a58da187d89bd69555b79a573f90349 100644 (file)
@@ -50,7 +50,7 @@
 static void __init ek_init_early(void)
 {
        /* Initialize processor: 12.00 MHz crystal */
-       at91sam9263_initialize(12000000);
+       at91_initialize(12000000);
 
        /* DBGU on ttyS0. (Rx & Tx only) */
        at91_register_uart(0, 0, 0);
@@ -245,7 +245,7 @@ static void __init ek_board_init(void)
 MACHINE_START(USB_A9263, "CALAO USB_A9263")
        /* Maintainer: calao-systems */
        .timer          = &at91sam926x_timer,
-       .map_io         = at91sam9263_map_io,
+       .map_io         = at91_map_io,
        .init_early     = ek_init_early,
        .init_irq       = ek_init_irq,
        .init_machine   = ek_board_init,
index c208cc334d7df8421e34ea004b8380c374159791..e8a8ab9d4ede688a55d786c1c6b558cfb79535fd 100644 (file)
@@ -56,7 +56,7 @@ static void __init yl9200_init_early(void)
        at91rm9200_set_type(ARCH_REVISON_9200_PQFP);
 
        /* Initialize processor: 18.432 MHz crystal */
-       at91rm9200_initialize(18432000);
+       at91_initialize(18432000);
 
        /* Setup the LEDs D2=PB17 (timer), D3=PB16 (cpu) */
        at91_init_leds(AT91_PIN_PB16, AT91_PIN_PB17);
@@ -599,7 +599,7 @@ static void __init yl9200_board_init(void)
 MACHINE_START(YL9200, "uCdragon YL-9200")
        /* Maintainer: S.Birtles */
        .timer          = &at91rm9200_timer,
-       .map_io         = at91rm9200_map_io,
+       .map_io         = at91_map_io,
        .init_early     = yl9200_init_early,
        .init_irq       = yl9200_init_irq,
        .init_machine   = yl9200_board_init,
index 8ff3418f3430d91e8b5ab765e8beff54db127be9..3e9af0df13f0aca990bd7759c07e58889afc738e 100644 (file)
 #include <linux/clkdev.h>
 
  /* Map io */
-extern void __init at91rm9200_map_io(void);
-extern void __init at91sam9260_map_io(void);
-extern void __init at91sam9261_map_io(void);
-extern void __init at91sam9263_map_io(void);
-extern void __init at91sam9rl_map_io(void);
-extern void __init at91sam9g45_map_io(void);
-extern void __init at91x40_map_io(void);
-extern void __init at91cap9_map_io(void);
+extern void __init at91_map_io(void);
 
  /* Processors */
 extern void __init at91rm9200_set_type(int type);
-extern void __init at91rm9200_initialize(unsigned long main_clock);
-extern void __init at91sam9260_initialize(unsigned long main_clock);
-extern void __init at91sam9261_initialize(unsigned long main_clock);
-extern void __init at91sam9263_initialize(unsigned long main_clock);
-extern void __init at91sam9rl_initialize(unsigned long main_clock);
-extern void __init at91sam9g45_initialize(unsigned long main_clock);
+extern void __init at91_initialize(unsigned long main_clock);
 extern void __init at91x40_initialize(unsigned long main_clock);
-extern void __init at91cap9_initialize(unsigned long main_clock);
 
  /* Interrupts */
 extern void __init at91rm9200_init_interrupts(unsigned int priority[]);
index 665993849a7b99f44fc97a8d06578b0578971ecc..c5df1e8f19557854199b08b767935f358d4307c0 100644 (file)
@@ -75,7 +75,6 @@
 #define AT91CAP9_BASE_EMAC             0xfffbc000
 #define AT91CAP9_BASE_ADC              0xfffc0000
 #define AT91CAP9_BASE_ISI              0xfffc4000
-#define AT91_BASE_SYS                  0xffffe200
 
 /*
  * System Peripherals (offset from AT91_BASE_SYS)
index 99e0f8d02d7bc492727def41a71dfbe8e11e2536..e4037b500302d1571701937c4547bc4f33e53e14 100644 (file)
@@ -74,7 +74,6 @@
 #define AT91RM9200_BASE_SSC1   0xfffd4000
 #define AT91RM9200_BASE_SSC2   0xfffd8000
 #define AT91RM9200_BASE_SPI    0xfffe0000
-#define AT91_BASE_SYS          0xfffff000
 
 
 /*
index 8b6bf835cd733cf88ebc9fab564381d125b2a40a..9a791165913f07f2a50489130a4fd9fecbb681b2 100644 (file)
@@ -76,7 +76,6 @@
 #define AT91SAM9260_BASE_TC4           0xfffdc040
 #define AT91SAM9260_BASE_TC5           0xfffdc080
 #define AT91SAM9260_BASE_ADC           0xfffe0000
-#define AT91_BASE_SYS                  0xffffe800
 
 /*
  * System Peripherals (offset from AT91_BASE_SYS)
index eafbddaf523c9e702d2316f66b62bd07e01f2df6..ce596204cefa6c23cde9de020693a9ebe77fcabb 100644 (file)
@@ -60,7 +60,6 @@
 #define AT91SAM9261_BASE_SSC2          0xfffc4000
 #define AT91SAM9261_BASE_SPI0          0xfffc8000
 #define AT91SAM9261_BASE_SPI1          0xfffcc000
-#define AT91_BASE_SYS                  0xffffea00
 
 
 /*
index e2d348213a7be7ca8796aa3dff77efda48e56f06..f1b92961a2b19a5d883d503dead47d70e0e4e5cd 100644 (file)
@@ -70,7 +70,6 @@
 #define AT91SAM9263_BASE_EMAC          0xfffbc000
 #define AT91SAM9263_BASE_ISI           0xfffc4000
 #define AT91SAM9263_BASE_2DGE          0xfffc8000
-#define AT91_BASE_SYS                  0xffffe000
 
 /*
  * System Peripherals (offset from AT91_BASE_SYS)
index 659304aa73d939176d6197acd548e50370e0e821..2c611b9a01389a7915734e590bbd7caee2acebf9 100644 (file)
@@ -82,7 +82,6 @@
 #define AT91SAM9G45_BASE_TC3           0xfffd4000
 #define AT91SAM9G45_BASE_TC4           0xfffd4040
 #define AT91SAM9G45_BASE_TC5           0xfffd4080
-#define AT91_BASE_SYS                  0xffffe200
 
 /*
  * System Peripherals (offset from AT91_BASE_SYS)
index 41dbbe61055c5c5ad50d1d66c1e7e0f08805af5c..1aabacd315d4adb74874fbd71e2532081e58e941 100644 (file)
@@ -64,7 +64,6 @@
 #define AT91SAM9RL_BASE_TSC    0xfffd0000
 #define AT91SAM9RL_BASE_UDPHS  0xfffd4000
 #define AT91SAM9RL_BASE_AC97C  0xfffd8000
-#define AT91_BASE_SYS          0xffffc000
 
 
 /*
index 1008b9fb50741ecf77a979ff2fc239f78f781632..483478d8be6b06ccf7debddb61ac8a2b26145918 100644 (file)
 #error "Unsupported AT91 processor"
 #endif
 
+#if !defined(CONFIG_ARCH_AT91X40)
+/*
+ * On all at91 except rm9200 and x40 have the System Controller starts
+ * at address 0xffffc000 and has a size of 16KiB.
+ *
+ * On rm9200 it's start at 0xfffe4000 of 111KiB with non reserved data starting
+ * at 0xfffff000
+ *
+ * Removes the individual definitions of AT91_BASE_SYS and
+ * replaces them with a common version at base 0xfffffc000 and size 16KiB
+ * and map the same memory space
+ */
+#define AT91_BASE_SYS  0xffffc000
+#endif
 
 /*
  * Peripheral identifiers/interrupts.
diff --git a/arch/arm/mach-at91/setup.c b/arch/arm/mach-at91/setup.c
new file mode 100644 (file)
index 0000000..096eb98
--- /dev/null
@@ -0,0 +1,63 @@
+/*
+ * Copyright (C) 2007 Atmel Corporation.
+ * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Under GPLv2
+ */
+
+#include <linux/module.h>
+#include <linux/io.h>
+
+#include <asm/mach/map.h>
+
+#include <mach/hardware.h>
+#include <mach/cpu.h>
+
+#include "soc.h"
+#include "generic.h"
+
+struct at91_soc __initdata at91_boot_soc;
+
+static struct map_desc at91_io_desc __initdata = {
+       .virtual        = AT91_VA_BASE_SYS,
+       .pfn            = __phys_to_pfn(AT91_BASE_SYS),
+       .length         = SZ_16K,
+       .type           = MT_DEVICE,
+};
+
+void __init at91_map_io(void)
+{
+       /* Map peripherals */
+       iotable_init(&at91_io_desc, 1);
+
+       if (cpu_is_at91cap9())
+               at91_boot_soc = at91cap9_soc;
+       else if (cpu_is_at91rm9200())
+               at91_boot_soc = at91rm9200_soc;
+       else if (cpu_is_at91sam9260())
+               at91_boot_soc = at91sam9260_soc;
+       else if (cpu_is_at91sam9261())
+               at91_boot_soc = at91sam9261_soc;
+       else if (cpu_is_at91sam9263())
+               at91_boot_soc = at91sam9263_soc;
+       else if (cpu_is_at91sam9g10())
+               at91_boot_soc = at91sam9261_soc;
+       else if (cpu_is_at91sam9g20())
+               at91_boot_soc = at91sam9260_soc;
+       else if (cpu_is_at91sam9g45())
+               at91_boot_soc = at91sam9g45_soc;
+       else if (cpu_is_at91sam9rl())
+               at91_boot_soc = at91sam9rl_soc;
+       else if (cpu_is_at91sam9x5())
+               at91_boot_soc = at91sam9x5_soc;
+       else
+               panic("Impossible to detect the SOC type");
+
+       if (at91_boot_soc.map_io)
+               at91_boot_soc.map_io();
+}
+
+void __init at91_initialize(unsigned long main_clock)
+{
+       at91_boot_soc.init(main_clock);
+}
diff --git a/arch/arm/mach-at91/soc.h b/arch/arm/mach-at91/soc.h
new file mode 100644 (file)
index 0000000..6d7a18f
--- /dev/null
@@ -0,0 +1,20 @@
+/*
+ * Copyright (C) 2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Under GPLv2
+ */
+
+struct at91_soc {
+       void (*map_io)(void);
+       void (*init)(unsigned long main_clock);
+};
+
+extern struct at91_soc at91_boot_soc;
+extern struct at91_soc at91cap9_soc;
+extern struct at91_soc at91rm9200_soc;
+extern struct at91_soc at91sam9260_soc;
+extern struct at91_soc at91sam9261_soc;
+extern struct at91_soc at91sam9263_soc;
+extern struct at91_soc at91sam9g45_soc;
+extern struct at91_soc at91sam9rl_soc;
+extern struct at91_soc at91sam9x5_soc;