Merge branch 'soc-core' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/renes...
authorOlof Johansson <olof@lixom.net>
Sun, 13 May 2012 04:19:32 +0000 (21:19 -0700)
committerArnd Bergmann <arnd@arndb.de>
Mon, 14 May 2012 13:57:21 +0000 (15:57 +0200)
* 'soc-core' of git://git.kernel.org/pub/scm/linux/kernel/git/rafael/renesas:
  ARM: mach-shmobile: clock-r8a7740: use followparent_recalc on usb24s
  ARM: mach-shmobile: clock-r8a7740: add MMCIF clock
  ARM: mach-shmobile: clock-r8a7740: add SDHI clock
  ARM: mach-shmobile: clock-r8a7740: add USB clock
  ARM: mach-shmobile: clock-r8a7740: add FSI clock
  ARM: mach-shmobile: r8a7740: cleanup I2C workaround method
  ARM: mach-shmobile: r8a7740: add gpio_irq support
  ARM: mach-shmobile: sh7372: Add FSI DMAEngine support
  ARM / mach-shmobile: Use preset_lpj with calibrate_delay()
  + renesas fixes and v3.4-rc6

Signed-off-by: Arnd Bergmann <arnd@arndb.de>
110 files changed:
arch/arm/Kconfig
arch/arm/boot/dts/at91sam9260.dtsi [new file with mode: 0644]
arch/arm/boot/dts/at91sam9263.dtsi [new file with mode: 0644]
arch/arm/boot/dts/at91sam9263ek.dts [new file with mode: 0644]
arch/arm/boot/dts/at91sam9g20.dtsi
arch/arm/boot/dts/at91sam9g20ek.dts [new file with mode: 0644]
arch/arm/boot/dts/at91sam9g20ek_2mmc.dts [new file with mode: 0644]
arch/arm/boot/dts/at91sam9g20ek_common.dtsi [new file with mode: 0644]
arch/arm/boot/dts/at91sam9n12.dtsi [new file with mode: 0644]
arch/arm/boot/dts/at91sam9n12ek.dts [new file with mode: 0644]
arch/arm/boot/dts/ethernut5.dts [new file with mode: 0644]
arch/arm/boot/dts/kizbox.dts [new file with mode: 0644]
arch/arm/boot/dts/tny_a9260.dts [new file with mode: 0644]
arch/arm/boot/dts/tny_a9260_common.dtsi [new file with mode: 0644]
arch/arm/boot/dts/tny_a9263.dts [new file with mode: 0644]
arch/arm/boot/dts/tny_a9g20.dts [new file with mode: 0644]
arch/arm/boot/dts/usb_a9260.dts [new file with mode: 0644]
arch/arm/boot/dts/usb_a9260_common.dtsi [new file with mode: 0644]
arch/arm/boot/dts/usb_a9263.dts [new file with mode: 0644]
arch/arm/boot/dts/usb_a9g20.dts
arch/arm/configs/at91_dt_defconfig [new file with mode: 0644]
arch/arm/configs/at91rm9200_defconfig
arch/arm/mach-at91/Kconfig
arch/arm/mach-at91/Makefile
arch/arm/mach-at91/Makefile.boot
arch/arm/mach-at91/at91rm9200.c
arch/arm/mach-at91/at91rm9200_devices.c
arch/arm/mach-at91/at91sam9260.c
arch/arm/mach-at91/at91sam9260_devices.c
arch/arm/mach-at91/at91sam9261.c
arch/arm/mach-at91/at91sam9261_devices.c
arch/arm/mach-at91/at91sam9263.c
arch/arm/mach-at91/at91sam9263_devices.c
arch/arm/mach-at91/at91sam9g45.c
arch/arm/mach-at91/at91sam9g45_devices.c
arch/arm/mach-at91/at91sam9n12.c [new file with mode: 0644]
arch/arm/mach-at91/at91sam9rl.c
arch/arm/mach-at91/at91sam9rl_devices.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-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-dt.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-rsi-ews.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-a926x.c
arch/arm/mach-at91/board-yl-9200.c
arch/arm/mach-at91/clock.c
arch/arm/mach-at91/cpuidle.c
arch/arm/mach-at91/generic.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/at91sam9n12.h [new file with mode: 0644]
arch/arm/mach-at91/include/mach/at91sam9n12_matrix.h [new file with mode: 0644]
arch/arm/mach-at91/include/mach/at91sam9rl.h
arch/arm/mach-at91/include/mach/at91sam9x5.h
arch/arm/mach-at91/include/mach/board.h
arch/arm/mach-at91/include/mach/cpu.h
arch/arm/mach-at91/include/mach/hardware.h
arch/arm/mach-at91/include/mach/uncompress.h
arch/arm/mach-at91/pm.c
arch/arm/mach-at91/pm.h
arch/arm/mach-at91/pm_slowclock.S
arch/arm/mach-at91/setup.c
arch/arm/mach-at91/soc.h
arch/arm/mach-ux500/board-mop500-uib.c
arch/arm/mach-ux500/cache-l2x0.c
arch/arm/mach-ux500/clock.c
arch/arm/mach-ux500/cpu-db8500.c
arch/arm/mach-ux500/cpu.c
arch/arm/mach-ux500/id.c
arch/arm/mach-ux500/include/mach/db8500-regs.h
arch/arm/mach-ux500/include/mach/hardware.h
arch/arm/mach-ux500/include/mach/id.h
arch/arm/mach-ux500/include/mach/irqs.h
arch/arm/mach-ux500/platsmp.c
arch/arm/mach-ux500/timer.c
drivers/char/hw_random/Kconfig
drivers/cpufreq/db8500-cpufreq.c
drivers/input/touchscreen/Kconfig
drivers/rtc/Kconfig

index 36586dba6fa6e0af6260dce3827cfe1495c7f592..b3727c29d7107ac3e7e68e2579eb214751b41ba5 100644 (file)
@@ -340,8 +340,8 @@ config ARCH_AT91
        select IRQ_DOMAIN
        select NEED_MACH_IO_H if PCCARD
        help
-         This enables support for systems based on the Atmel AT91RM9200,
-         AT91SAM9 processors.
+         This enables support for systems based on Atmel
+         AT91RM9200 and AT91SAM9* processors.
 
 config ARCH_BCMRING
        bool "Broadcom BCMRING"
diff --git a/arch/arm/boot/dts/at91sam9260.dtsi b/arch/arm/boot/dts/at91sam9260.dtsi
new file mode 100644 (file)
index 0000000..f4605ff
--- /dev/null
@@ -0,0 +1,238 @@
+/*
+ * at91sam9260.dtsi - Device Tree Include file for AT91SAM9260 family SoC
+ *
+ *  Copyright (C) 2011 Atmel,
+ *                2011 Nicolas Ferre <nicolas.ferre@atmel.com>,
+ *                2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+       model = "Atmel AT91SAM9260 family SoC";
+       compatible = "atmel,at91sam9260";
+       interrupt-parent = <&aic>;
+
+       aliases {
+               serial0 = &dbgu;
+               serial1 = &usart0;
+               serial2 = &usart1;
+               serial3 = &usart2;
+               serial4 = &usart3;
+               serial5 = &usart4;
+               serial6 = &usart5;
+               gpio0 = &pioA;
+               gpio1 = &pioB;
+               gpio2 = &pioC;
+               tcb0 = &tcb0;
+               tcb1 = &tcb1;
+       };
+       cpus {
+               cpu@0 {
+                       compatible = "arm,arm926ejs";
+               };
+       };
+
+       memory {
+               reg = <0x20000000 0x04000000>;
+       };
+
+       ahb {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               apb {
+                       compatible = "simple-bus";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       aic: interrupt-controller@fffff000 {
+                               #interrupt-cells = <2>;
+                               compatible = "atmel,at91rm9200-aic";
+                               interrupt-controller;
+                               reg = <0xfffff000 0x200>;
+                       };
+
+                       ramc0: ramc@ffffea00 {
+                               compatible = "atmel,at91sam9260-sdramc";
+                               reg = <0xffffea00 0x200>;
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               compatible = "atmel,at91rm9200-pmc";
+                               reg = <0xfffffc00 0x100>;
+                       };
+
+                       rstc@fffffd00 {
+                               compatible = "atmel,at91sam9260-rstc";
+                               reg = <0xfffffd00 0x10>;
+                       };
+
+                       shdwc@fffffd10 {
+                               compatible = "atmel,at91sam9260-shdwc";
+                               reg = <0xfffffd10 0x10>;
+                       };
+
+                       pit: timer@fffffd30 {
+                               compatible = "atmel,at91sam9260-pit";
+                               reg = <0xfffffd30 0xf>;
+                               interrupts = <1 4>;
+                       };
+
+                       tcb0: timer@fffa0000 {
+                               compatible = "atmel,at91rm9200-tcb";
+                               reg = <0xfffa0000 0x100>;
+                               interrupts = <17 4 18 4 19 4>;
+                       };
+
+                       tcb1: timer@fffdc000 {
+                               compatible = "atmel,at91rm9200-tcb";
+                               reg = <0xfffdc000 0x100>;
+                               interrupts = <26 4 27 4 28 4>;
+                       };
+
+                       pioA: gpio@fffff400 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffff400 0x100>;
+                               interrupts = <2 4>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                       };
+
+                       pioB: gpio@fffff600 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffff600 0x100>;
+                               interrupts = <3 4>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                       };
+
+                       pioC: gpio@fffff800 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffff800 0x100>;
+                               interrupts = <4 4>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                       };
+
+                       dbgu: serial@fffff200 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfffff200 0x200>;
+                               interrupts = <1 4>;
+                               status = "disabled";
+                       };
+
+                       usart0: serial@fffb0000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfffb0000 0x200>;
+                               interrupts = <6 4>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               status = "disabled";
+                       };
+
+                       usart1: serial@fffb4000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfffb4000 0x200>;
+                               interrupts = <7 4>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               status = "disabled";
+                       };
+
+                       usart2: serial@fffb8000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfffb8000 0x200>;
+                               interrupts = <8 4>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               status = "disabled";
+                       };
+
+                       usart3: serial@fffd0000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfffd0000 0x200>;
+                               interrupts = <23 4>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               status = "disabled";
+                       };
+
+                       usart4: serial@fffd4000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfffd4000 0x200>;
+                               interrupts = <24 4>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               status = "disabled";
+                       };
+
+                       usart5: serial@fffd8000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfffd8000 0x200>;
+                               interrupts = <25 4>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               status = "disabled";
+                       };
+
+                       macb0: ethernet@fffc4000 {
+                               compatible = "cdns,at32ap7000-macb", "cdns,macb";
+                               reg = <0xfffc4000 0x100>;
+                               interrupts = <21 4>;
+                               status = "disabled";
+                       };
+
+                       usb1: gadget@fffa4000 {
+                               compatible = "atmel,at91rm9200-udc";
+                               reg = <0xfffa4000 0x4000>;
+                               interrupts = <10 4>;
+                               status = "disabled";
+                       };
+               };
+
+               nand0: nand@40000000 {
+                       compatible = "atmel,at91rm9200-nand";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       reg = <0x40000000 0x10000000
+                              0xffffe800 0x200
+                             >;
+                       atmel,nand-addr-offset = <21>;
+                       atmel,nand-cmd-offset = <22>;
+                       gpios = <&pioC 13 0
+                                &pioC 14 0
+                                0
+                               >;
+                       status = "disabled";
+               };
+
+               usb0: ohci@00500000 {
+                       compatible = "atmel,at91rm9200-ohci", "usb-ohci";
+                       reg = <0x00500000 0x100000>;
+                       interrupts = <20 4>;
+                       status = "disabled";
+               };
+       };
+
+       i2c@0 {
+               compatible = "i2c-gpio";
+               gpios = <&pioA 23 0 /* sda */
+                        &pioA 24 0 /* scl */
+                       >;
+               i2c-gpio,sda-open-drain;
+               i2c-gpio,scl-open-drain;
+               i2c-gpio,delay-us = <2>;        /* ~100 kHz */
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+};
diff --git a/arch/arm/boot/dts/at91sam9263.dtsi b/arch/arm/boot/dts/at91sam9263.dtsi
new file mode 100644 (file)
index 0000000..0209913
--- /dev/null
@@ -0,0 +1,220 @@
+/*
+ * at91sam9263.dtsi - Device Tree Include file for AT91SAM9263 family SoC
+ *
+ *  Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2 only.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+       model = "Atmel AT91SAM9263 family SoC";
+       compatible = "atmel,at91sam9263";
+       interrupt-parent = <&aic>;
+
+       aliases {
+               serial0 = &dbgu;
+               serial1 = &usart0;
+               serial2 = &usart1;
+               serial3 = &usart2;
+               gpio0 = &pioA;
+               gpio1 = &pioB;
+               gpio2 = &pioC;
+               gpio3 = &pioD;
+               gpio4 = &pioE;
+               tcb0 = &tcb0;
+       };
+       cpus {
+               cpu@0 {
+                       compatible = "arm,arm926ejs";
+               };
+       };
+
+       memory {
+               reg = <0x20000000 0x08000000>;
+       };
+
+       ahb {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               apb {
+                       compatible = "simple-bus";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       aic: interrupt-controller@fffff000 {
+                               #interrupt-cells = <2>;
+                               compatible = "atmel,at91rm9200-aic";
+                               interrupt-controller;
+                               reg = <0xfffff000 0x200>;
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               compatible = "atmel,at91rm9200-pmc";
+                               reg = <0xfffffc00 0x100>;
+                       };
+
+                       ramc: ramc@ffffe200 {
+                               compatible = "atmel,at91sam9260-sdramc";
+                               reg = <0xffffe200 0x200
+                                      0xffffe800 0x200>;
+                       };
+
+                       pit: timer@fffffd30 {
+                               compatible = "atmel,at91sam9260-pit";
+                               reg = <0xfffffd30 0xf>;
+                               interrupts = <1 4>;
+                       };
+
+                       tcb0: timer@fff7c000 {
+                               compatible = "atmel,at91rm9200-tcb";
+                               reg = <0xfff7c000 0x100>;
+                               interrupts = <19 4>;
+                       };
+
+                       rstc@fffffd00 {
+                               compatible = "atmel,at91sam9260-rstc";
+                               reg = <0xfffffd00 0x10>;
+                       };
+
+                       shdwc@fffffd10 {
+                               compatible = "atmel,at91sam9260-shdwc";
+                               reg = <0xfffffd10 0x10>;
+                       };
+
+                       pioA: gpio@fffff200 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffff200 0x100>;
+                               interrupts = <2 4>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                       };
+
+                       pioB: gpio@fffff400 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffff400 0x100>;
+                               interrupts = <3 4>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                       };
+
+                       pioC: gpio@fffff600 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffff600 0x100>;
+                               interrupts = <4 4>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                       };
+
+                       pioD: gpio@fffff800 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffff800 0x100>;
+                               interrupts = <4 4>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                       };
+
+                       pioE: gpio@fffffa00 {
+                               compatible = "atmel,at91rm9200-gpio";
+                               reg = <0xfffffa00 0x100>;
+                               interrupts = <4 4>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                       };
+
+                       dbgu: serial@ffffee00 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xffffee00 0x200>;
+                               interrupts = <1 4>;
+                               status = "disabled";
+                       };
+
+                       usart0: serial@fff8c000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfff8c000 0x200>;
+                               interrupts = <7 4>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               status = "disabled";
+                       };
+
+                       usart1: serial@fff90000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfff90000 0x200>;
+                               interrupts = <8 4>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               status = "disabled";
+                       };
+
+                       usart2: serial@fff94000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfff94000 0x200>;
+                               interrupts = <9 4>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               status = "disabled";
+                       };
+
+                       macb0: ethernet@fffbc000 {
+                               compatible = "cdns,at32ap7000-macb", "cdns,macb";
+                               reg = <0xfffbc000 0x100>;
+                               interrupts = <21 4>;
+                               status = "disabled";
+                       };
+
+                       usb1: gadget@fff78000 {
+                               compatible = "atmel,at91rm9200-udc";
+                               reg = <0xfff78000 0x4000>;
+                               interrupts = <24 4>;
+                               status = "disabled";
+                       };
+               };
+
+               nand0: nand@40000000 {
+                       compatible = "atmel,at91rm9200-nand";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       reg = <0x40000000 0x10000000
+                              0xffffe000 0x200
+                             >;
+                       atmel,nand-addr-offset = <21>;
+                       atmel,nand-cmd-offset = <22>;
+                       gpios = <&pioA 22 0
+                                &pioD 15 0
+                                0
+                               >;
+                       status = "disabled";
+               };
+
+               usb0: ohci@00a00000 {
+                       compatible = "atmel,at91rm9200-ohci", "usb-ohci";
+                       reg = <0x00a00000 0x100000>;
+                       interrupts = <29 4>;
+                       status = "disabled";
+               };
+       };
+
+       i2c@0 {
+               compatible = "i2c-gpio";
+               gpios = <&pioB 4 0 /* sda */
+                        &pioB 5 0 /* scl */
+                       >;
+               i2c-gpio,sda-open-drain;
+               i2c-gpio,scl-open-drain;
+               i2c-gpio,delay-us = <2>;        /* ~100 kHz */
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+};
diff --git a/arch/arm/boot/dts/at91sam9263ek.dts b/arch/arm/boot/dts/at91sam9263ek.dts
new file mode 100644 (file)
index 0000000..f86ac4b
--- /dev/null
@@ -0,0 +1,156 @@
+/*
+ * at91sam9263ek.dts - Device Tree file for Atmel at91sam9263 reference board
+ *
+ *  Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2 only
+ */
+/dts-v1/;
+/include/ "at91sam9263.dtsi"
+
+/ {
+       model = "Atmel at91sam9263ek";
+       compatible = "atmel,at91sam9263ek", "atmel,at91sam9263", "atmel,at91sam9";
+
+       chosen {
+               bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock5 rw rootfstype=ubifs";
+       };
+
+       memory {
+               reg = <0x20000000 0x4000000>;
+       };
+
+       clocks {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               main_clock: clock@0 {
+                       compatible = "atmel,osc", "fixed-clock";
+                       clock-frequency = <16367660>;
+               };
+       };
+
+       ahb {
+               apb {
+                       dbgu: serial@ffffee00 {
+                               status = "okay";
+                       };
+
+                       usart0: serial@fff8c000 {
+                               status = "okay";
+                       };
+
+                       macb0: ethernet@fffbc000 {
+                               phy-mode = "rmii";
+                               status = "okay";
+                       };
+
+                       usb1: gadget@fff78000 {
+                               atmel,vbus-gpio = <&pioA 25 0>;
+                               status = "okay";
+                       };
+               };
+
+               nand0: nand@40000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "soft";
+                       nand-on-flash-bbt = <1>;
+                       status = "okay";
+
+                       at91bootstrap@0 {
+                               label = "at91bootstrap";
+                               reg = <0x0 0x20000>;
+                       };
+
+                       barebox@20000 {
+                               label = "barebox";
+                               reg = <0x20000 0x40000>;
+                       };
+
+                       bareboxenv@60000 {
+                               label = "bareboxenv";
+                               reg = <0x60000 0x20000>;
+                       };
+
+                       bareboxenv2@80000 {
+                               label = "bareboxenv2";
+                               reg = <0x80000 0x20000>;
+                       };
+
+                       oftree@80000 {
+                               label = "oftree";
+                               reg = <0xa0000 0x20000>;
+                       };
+
+                       kernel@a0000 {
+                               label = "kernel";
+                               reg = <0xc0000 0x400000>;
+                       };
+
+                       rootfs@4a0000 {
+                               label = "rootfs";
+                               reg = <0x4c0000 0x7800000>;
+                       };
+
+                       data@7ca0000 {
+                               label = "data";
+                               reg = <0x7cc0000 0x8340000>;
+                       };
+               };
+
+               usb0: ohci@00a00000 {
+                       num-ports = <2>;
+                       status = "okay";
+                       atmel,vbus-gpio = <&pioA 24 0
+                                          &pioA 21 0
+                                         >;
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               d3 {
+                       label = "d3";
+                       gpios = <&pioB 7 0>;
+                       linux,default-trigger = "heartbeat";
+               };
+
+               d2 {
+                       label = "d2";
+                       gpios = <&pioC 29 1>;
+                       linux,default-trigger = "nand-disk";
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               left_click {
+                       label = "left_click";
+                       gpios = <&pioC 5 1>;
+                       linux,code = <272>;
+                       gpio-key,wakeup;
+               };
+
+               right_click {
+                       label = "right_click";
+                       gpios = <&pioC 4 1>;
+                       linux,code = <273>;
+                       gpio-key,wakeup;
+               };
+       };
+
+       i2c@0 {
+               status = "okay";
+
+               24c512@50 {
+                       compatible = "24c512";
+                       reg = <0x50>;
+                       pagesize = <128>;
+               };
+       };
+};
index 773ef484037a91fd5613d26b2029a7c89f083eed..0eb1a753f79677fc659764170f725884f35cfda4 100644 (file)
 /*
  * at91sam9g20.dtsi - Device Tree Include file for AT91SAM9G20 family SoC
  *
- *  Copyright (C) 2011 Atmel,
- *                2011 Nicolas Ferre <nicolas.ferre@atmel.com>,
- *                2011 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *  Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
  *
- * Licensed under GPLv2 or later.
+ * Licensed under GPLv2.
  */
 
-/include/ "skeleton.dtsi"
+/include/ "at91sam9260.dtsi"
 
 / {
        model = "Atmel AT91SAM9G20 family SoC";
        compatible = "atmel,at91sam9g20";
-       interrupt-parent = <&aic>;
-
-       aliases {
-               serial0 = &dbgu;
-               serial1 = &usart0;
-               serial2 = &usart1;
-               serial3 = &usart2;
-               serial4 = &usart3;
-               serial5 = &usart4;
-               serial6 = &usart5;
-               gpio0 = &pioA;
-               gpio1 = &pioB;
-               gpio2 = &pioC;
-               tcb0 = &tcb0;
-               tcb1 = &tcb1;
-       };
-       cpus {
-               cpu@0 {
-                       compatible = "arm,arm926ejs";
-               };
-       };
 
        memory {
                reg = <0x20000000 0x08000000>;
        };
-
-       ahb {
-               compatible = "simple-bus";
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               apb {
-                       compatible = "simple-bus";
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-                       ranges;
-
-                       aic: interrupt-controller@fffff000 {
-                               #interrupt-cells = <2>;
-                               compatible = "atmel,at91rm9200-aic";
-                               interrupt-controller;
-                               reg = <0xfffff000 0x200>;
-                       };
-
-                       ramc0: ramc@ffffea00 {
-                               compatible = "atmel,at91sam9260-sdramc";
-                               reg = <0xffffea00 0x200>;
-                       };
-
-                       pmc: pmc@fffffc00 {
-                               compatible = "atmel,at91rm9200-pmc";
-                               reg = <0xfffffc00 0x100>;
-                       };
-
-                       rstc@fffffd00 {
-                               compatible = "atmel,at91sam9260-rstc";
-                               reg = <0xfffffd00 0x10>;
-                       };
-
-                       shdwc@fffffd10 {
-                               compatible = "atmel,at91sam9260-shdwc";
-                               reg = <0xfffffd10 0x10>;
-                       };
-
-                       pit: timer@fffffd30 {
-                               compatible = "atmel,at91sam9260-pit";
-                               reg = <0xfffffd30 0xf>;
-                               interrupts = <1 4>;
-                       };
-
-                       tcb0: timer@fffa0000 {
-                               compatible = "atmel,at91rm9200-tcb";
-                               reg = <0xfffa0000 0x100>;
-                               interrupts = <17 4 18 4 19 4>;
-                       };
-
-                       tcb1: timer@fffdc000 {
-                               compatible = "atmel,at91rm9200-tcb";
-                               reg = <0xfffdc000 0x100>;
-                               interrupts = <26 4 27 4 28 4>;
-                       };
-
-                       pioA: gpio@fffff400 {
-                               compatible = "atmel,at91rm9200-gpio";
-                               reg = <0xfffff400 0x100>;
-                               interrupts = <2 4>;
-                               #gpio-cells = <2>;
-                               gpio-controller;
-                               interrupt-controller;
-                       };
-
-                       pioB: gpio@fffff600 {
-                               compatible = "atmel,at91rm9200-gpio";
-                               reg = <0xfffff600 0x100>;
-                               interrupts = <3 4>;
-                               #gpio-cells = <2>;
-                               gpio-controller;
-                               interrupt-controller;
-                       };
-
-                       pioC: gpio@fffff800 {
-                               compatible = "atmel,at91rm9200-gpio";
-                               reg = <0xfffff800 0x100>;
-                               interrupts = <4 4>;
-                               #gpio-cells = <2>;
-                               gpio-controller;
-                               interrupt-controller;
-                       };
-
-                       dbgu: serial@fffff200 {
-                               compatible = "atmel,at91sam9260-usart";
-                               reg = <0xfffff200 0x200>;
-                               interrupts = <1 4>;
-                               status = "disabled";
-                       };
-
-                       usart0: serial@fffb0000 {
-                               compatible = "atmel,at91sam9260-usart";
-                               reg = <0xfffb0000 0x200>;
-                               interrupts = <6 4>;
-                               atmel,use-dma-rx;
-                               atmel,use-dma-tx;
-                               status = "disabled";
-                       };
-
-                       usart1: serial@fffb4000 {
-                               compatible = "atmel,at91sam9260-usart";
-                               reg = <0xfffb4000 0x200>;
-                               interrupts = <7 4>;
-                               atmel,use-dma-rx;
-                               atmel,use-dma-tx;
-                               status = "disabled";
-                       };
-
-                       usart2: serial@fffb8000 {
-                               compatible = "atmel,at91sam9260-usart";
-                               reg = <0xfffb8000 0x200>;
-                               interrupts = <8 4>;
-                               atmel,use-dma-rx;
-                               atmel,use-dma-tx;
-                               status = "disabled";
-                       };
-
-                       usart3: serial@fffd0000 {
-                               compatible = "atmel,at91sam9260-usart";
-                               reg = <0xfffd0000 0x200>;
-                               interrupts = <23 4>;
-                               atmel,use-dma-rx;
-                               atmel,use-dma-tx;
-                               status = "disabled";
-                       };
-
-                       usart4: serial@fffd4000 {
-                               compatible = "atmel,at91sam9260-usart";
-                               reg = <0xfffd4000 0x200>;
-                               interrupts = <24 4>;
-                               atmel,use-dma-rx;
-                               atmel,use-dma-tx;
-                               status = "disabled";
-                       };
-
-                       usart5: serial@fffd8000 {
-                               compatible = "atmel,at91sam9260-usart";
-                               reg = <0xfffd8000 0x200>;
-                               interrupts = <25 4>;
-                               atmel,use-dma-rx;
-                               atmel,use-dma-tx;
-                               status = "disabled";
-                       };
-
-                       macb0: ethernet@fffc4000 {
-                               compatible = "cdns,at32ap7000-macb", "cdns,macb";
-                               reg = <0xfffc4000 0x100>;
-                               interrupts = <21 4>;
-                               status = "disabled";
-                       };
-
-                       usb1: gadget@fffa4000 {
-                               compatible = "atmel,at91rm9200-udc";
-                               reg = <0xfffa4000 0x4000>;
-                               interrupts = <10 4>;
-                               status = "disabled";
-                       };
-               };
-
-               nand0: nand@40000000 {
-                       compatible = "atmel,at91rm9200-nand";
-                       #address-cells = <1>;
-                       #size-cells = <1>;
-                       reg = <0x40000000 0x10000000
-                              0xffffe800 0x200
-                             >;
-                       atmel,nand-addr-offset = <21>;
-                       atmel,nand-cmd-offset = <22>;
-                       gpios = <&pioC 13 0
-                                &pioC 14 0
-                                0
-                               >;
-                       status = "disabled";
-               };
-
-               usb0: ohci@00500000 {
-                       compatible = "atmel,at91rm9200-ohci", "usb-ohci";
-                       reg = <0x00500000 0x100000>;
-                       interrupts = <20 4>;
-                       status = "disabled";
-               };
-       };
-
-       i2c@0 {
-               compatible = "i2c-gpio";
-               gpios = <&pioA 23 0 /* sda */
-                        &pioA 24 0 /* scl */
-                       >;
-               i2c-gpio,sda-open-drain;
-               i2c-gpio,scl-open-drain;
-               i2c-gpio,delay-us = <2>;        /* ~100 kHz */
-               #address-cells = <1>;
-               #size-cells = <0>;
-               status = "disabled";
-       };
 };
diff --git a/arch/arm/boot/dts/at91sam9g20ek.dts b/arch/arm/boot/dts/at91sam9g20ek.dts
new file mode 100644 (file)
index 0000000..e5324bf
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * at91sam9g20ek.dts - Device Tree file for Atmel at91sam9g20ek board
+ *
+ * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2.
+ */
+/dts-v1/;
+/include/ "at91sam9g20ek_common.dtsi"
+
+/ {
+       model = "Atmel at91sam9g20ek";
+       compatible = "atmel,at91sam9g20ek", "atmel,at91sam9g20", "atmel,at91sam9";
+
+       leds {
+               compatible = "gpio-leds";
+
+               ds1 {
+                       label = "ds1";
+                       gpios = <&pioA 9 0>;
+                       linux,default-trigger = "heartbeat";
+               };
+
+               ds5 {
+                       label = "ds5";
+                       gpios = <&pioA 6 1>;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/at91sam9g20ek_2mmc.dts b/arch/arm/boot/dts/at91sam9g20ek_2mmc.dts
new file mode 100644 (file)
index 0000000..f1b2e14
--- /dev/null
@@ -0,0 +1,29 @@
+/*
+ * at91sam9g20ek_2mmc.dts - Device Tree file for Atmel at91sam9g20ek 2 MMC board
+ *
+ * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2.
+ */
+/dts-v1/;
+/include/ "at91sam9g20ek_common.dtsi"
+
+/ {
+       model = "Atmel at91sam9g20ek 2 mmc";
+       compatible = "atmel,at91sam9g20ek_2mmc", "atmel,at91sam9g20", "atmel,at91sam9";
+
+       leds {
+               compatible = "gpio-leds";
+
+               ds1 {
+                       label = "ds1";
+                       gpios = <&pioB 9 0>;
+                       linux,default-trigger = "heartbeat";
+               };
+
+               ds5 {
+                       label = "ds5";
+                       gpios = <&pioB 8 1>;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/at91sam9g20ek_common.dtsi b/arch/arm/boot/dts/at91sam9g20ek_common.dtsi
new file mode 100644 (file)
index 0000000..b06c0db
--- /dev/null
@@ -0,0 +1,142 @@
+/*
+ * at91sam9g20ek_common.dtsi - Device Tree file for Atmel at91sam9g20ek board
+ *
+ * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2.
+ */
+/include/ "at91sam9g20.dtsi"
+
+/ {
+
+       chosen {
+               bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock5 rw rootfstype=ubifs";
+       };
+
+       memory {
+               reg = <0x20000000 0x4000000>;
+       };
+
+       clocks {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               main_clock: clock@0 {
+                       compatible = "atmel,osc", "fixed-clock";
+                       clock-frequency = <18432000>;
+               };
+       };
+
+       ahb {
+               apb {
+                       dbgu: serial@fffff200 {
+                               status = "okay";
+                       };
+
+                       usart0: serial@fffb0000 {
+                               status = "okay";
+                       };
+
+                       usart1: serial@fffb4000 {
+                               status = "okay";
+                       };
+
+                       macb0: ethernet@fffc4000 {
+                               phy-mode = "rmii";
+                               status = "okay";
+                       };
+
+                       usb1: gadget@fffa4000 {
+                               atmel,vbus-gpio = <&pioC 5 0>;
+                               status = "okay";
+                       };
+               };
+
+               nand0: nand@40000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "soft";
+                       nand-on-flash-bbt;
+                       status = "okay";
+
+                       at91bootstrap@0 {
+                               label = "at91bootstrap";
+                               reg = <0x0 0x20000>;
+                       };
+
+                       barebox@20000 {
+                               label = "barebox";
+                               reg = <0x20000 0x40000>;
+                       };
+
+                       bareboxenv@60000 {
+                               label = "bareboxenv";
+                               reg = <0x60000 0x20000>;
+                       };
+
+                       bareboxenv2@80000 {
+                               label = "bareboxenv2";
+                               reg = <0x80000 0x20000>;
+                       };
+
+                       oftree@80000 {
+                               label = "oftree";
+                               reg = <0xa0000 0x20000>;
+                       };
+
+                       kernel@a0000 {
+                               label = "kernel";
+                               reg = <0xc0000 0x400000>;
+                       };
+
+                       rootfs@4a0000 {
+                               label = "rootfs";
+                               reg = <0x4c0000 0x7800000>;
+                       };
+
+                       data@7ca0000 {
+                               label = "data";
+                               reg = <0x7cc0000 0x8340000>;
+                       };
+               };
+
+               usb0: ohci@00500000 {
+                       num-ports = <2>;
+                       status = "okay";
+               };
+       };
+
+       i2c@0 {
+               status = "okay";
+
+               24c512@50 {
+                       compatible = "24c512";
+                       reg = <0x50>;
+               };
+
+               wm8731@1b {
+                       compatible = "wm8731";
+                       reg = <0x1b>;
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               btn3 {
+                       label = "Buttin 3";
+                       gpios = <&pioA 30 1>;
+                       linux,code = <0x103>;
+                       gpio-key,wakeup;
+               };
+
+               btn4 {
+                       label = "Buttin 4";
+                       gpios = <&pioA 31 1>;
+                       linux,code = <0x104>;
+                       gpio-key,wakeup;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/at91sam9n12.dtsi b/arch/arm/boot/dts/at91sam9n12.dtsi
new file mode 100644 (file)
index 0000000..cb84de7
--- /dev/null
@@ -0,0 +1,221 @@
+/*
+ * at91sam9n12.dtsi - Device Tree include file for AT91SAM9N12 SoC
+ *
+ *  Copyright (C) 2012 Atmel,
+ *                2012 Hong Xu <hong.xu@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+/include/ "skeleton.dtsi"
+
+/ {
+       model = "Atmel AT91SAM9N12 SoC";
+       compatible = "atmel,at91sam9n12";
+       interrupt-parent = <&aic>;
+
+       aliases {
+               serial0 = &dbgu;
+               serial1 = &usart0;
+               serial2 = &usart1;
+               serial3 = &usart2;
+               serial4 = &usart3;
+               gpio0 = &pioA;
+               gpio1 = &pioB;
+               gpio2 = &pioC;
+               gpio3 = &pioD;
+               tcb0 = &tcb0;
+               tcb1 = &tcb1;
+       };
+       cpus {
+               cpu@0 {
+                       compatible = "arm,arm926ejs";
+               };
+       };
+
+       memory {
+               reg = <0x20000000 0x10000000>;
+       };
+
+       ahb {
+               compatible = "simple-bus";
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               apb {
+                       compatible = "simple-bus";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       ranges;
+
+                       aic: interrupt-controller@fffff000 {
+                               #interrupt-cells = <2>;
+                               compatible = "atmel,at91rm9200-aic";
+                               interrupt-controller;
+                               reg = <0xfffff000 0x200>;
+                       };
+
+                       ramc0: ramc@ffffe800 {
+                               compatible = "atmel,at91sam9g45-ddramc";
+                               reg = <0xffffe800 0x200>;
+                       };
+
+                       pmc: pmc@fffffc00 {
+                               compatible = "atmel,at91rm9200-pmc";
+                               reg = <0xfffffc00 0x100>;
+                       };
+
+                       rstc@fffffe00 {
+                               compatible = "atmel,at91sam9g45-rstc";
+                               reg = <0xfffffe00 0x10>;
+                       };
+
+                       pit: timer@fffffe30 {
+                               compatible = "atmel,at91sam9260-pit";
+                               reg = <0xfffffe30 0xf>;
+                               interrupts = <1 4>;
+                       };
+
+                       shdwc@fffffe10 {
+                               compatible = "atmel,at91sam9x5-shdwc";
+                               reg = <0xfffffe10 0x10>;
+                       };
+
+                       tcb0: timer@f8008000 {
+                               compatible = "atmel,at91sam9x5-tcb";
+                               reg = <0xf8008000 0x100>;
+                               interrupts = <17 4>;
+                       };
+
+                       tcb1: timer@f800c000 {
+                               compatible = "atmel,at91sam9x5-tcb";
+                               reg = <0xf800c000 0x100>;
+                               interrupts = <17 4>;
+                       };
+
+                       dma: dma-controller@ffffec00 {
+                               compatible = "atmel,at91sam9g45-dma";
+                               reg = <0xffffec00 0x200>;
+                               interrupts = <20 4>;
+                       };
+
+                       pioA: gpio@fffff400 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfffff400 0x100>;
+                               interrupts = <2 4>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                       };
+
+                       pioB: gpio@fffff600 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfffff600 0x100>;
+                               interrupts = <2 4>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                       };
+
+                       pioC: gpio@fffff800 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfffff800 0x100>;
+                               interrupts = <3 4>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                       };
+
+                       pioD: gpio@fffffa00 {
+                               compatible = "atmel,at91sam9x5-gpio", "atmel,at91rm9200-gpio";
+                               reg = <0xfffffa00 0x100>;
+                               interrupts = <3 4>;
+                               #gpio-cells = <2>;
+                               gpio-controller;
+                               interrupt-controller;
+                       };
+
+                       dbgu: serial@fffff200 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xfffff200 0x200>;
+                               interrupts = <1 4>;
+                               status = "disabled";
+                       };
+
+                       usart0: serial@f801c000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf801c000 0x4000>;
+                               interrupts = <5 4>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               status = "disabled";
+                       };
+
+                       usart1: serial@f8020000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf8020000 0x4000>;
+                               interrupts = <6 4>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               status = "disabled";
+                       };
+
+                       usart2: serial@f8024000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf8024000 0x4000>;
+                               interrupts = <7 4>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               status = "disabled";
+                       };
+
+                       usart3: serial@f8028000 {
+                               compatible = "atmel,at91sam9260-usart";
+                               reg = <0xf8028000 0x4000>;
+                               interrupts = <8 4>;
+                               atmel,use-dma-rx;
+                               atmel,use-dma-tx;
+                               status = "disabled";
+                       };
+               };
+
+               nand0: nand@40000000 {
+                       compatible = "atmel,at91rm9200-nand";
+                       #address-cells = <1>;
+                       #size-cells = <1>;
+                       reg = < 0x40000000 0x10000000
+                               0xffffe000 0x00000600
+                               0xffffe600 0x00000200
+                               0x00100000 0x00100000
+                              >;
+                       atmel,nand-addr-offset = <21>;
+                       atmel,nand-cmd-offset = <22>;
+                       gpios = <&pioD 5 0
+                                &pioD 4 0
+                                0
+                               >;
+                       status = "disabled";
+               };
+
+               usb0: ohci@00500000 {
+                       compatible = "atmel,at91rm9200-ohci", "usb-ohci";
+                       reg = <0x00500000 0x00100000>;
+                       interrupts = <22 4>;
+                       status = "disabled";
+               };
+       };
+
+       i2c@0 {
+               compatible = "i2c-gpio";
+               gpios = <&pioA 30 0 /* sda */
+                        &pioA 31 0 /* scl */
+                       >;
+               i2c-gpio,sda-open-drain;
+               i2c-gpio,scl-open-drain;
+               i2c-gpio,delay-us = <2>;        /* ~100 kHz */
+               #address-cells = <1>;
+               #size-cells = <0>;
+               status = "disabled";
+       };
+};
diff --git a/arch/arm/boot/dts/at91sam9n12ek.dts b/arch/arm/boot/dts/at91sam9n12ek.dts
new file mode 100644 (file)
index 0000000..f4e43e3
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * at91sam9n12ek.dts - Device Tree file for AT91SAM9N12-EK board
+ *
+ *  Copyright (C) 2012 Atmel,
+ *                2012 Hong Xu <hong.xu@atmel.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+/include/ "at91sam9n12.dtsi"
+
+/ {
+       model = "Atmel AT91SAM9N12-EK";
+       compatible = "atmel,at91sam9n12ek", "atmel,at91sam9n12", "atmel,at91sam9";
+
+       chosen {
+               bootargs = "mem=128M console=ttyS0,115200 root=/dev/mtdblock1 rw rootfstype=jffs2";
+       };
+
+       memory {
+               reg = <0x20000000 0x10000000>;
+       };
+
+       clocks {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               main_clock: clock@0 {
+                       compatible = "atmel,osc", "fixed-clock";
+                       clock-frequency = <16000000>;
+               };
+       };
+
+       ahb {
+               apb {
+                       dbgu: serial@fffff200 {
+                               status = "okay";
+                       };
+               };
+
+               nand0: nand@40000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "soft";
+                       nand-on-flash-bbt;
+                       status = "okay";
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               d8 {
+                       label = "d8";
+                       gpios = <&pioB 4 1>;
+                       linux,default-trigger = "mmc0";
+               };
+
+               d9 {
+                       label = "d6";
+                       gpios = <&pioB 5 1>;
+                       linux,default-trigger = "nand-disk";
+               };
+
+               d10 {
+                       label = "d7";
+                       gpios = <&pioB 6 0>;
+                       linux,default-trigger = "heartbeat";
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               enter {
+                       label = "Enter";
+                       gpios = <&pioB 4 1>;
+                       linux,code = <28>;
+                       gpio-key,wakeup;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/ethernut5.dts b/arch/arm/boot/dts/ethernut5.dts
new file mode 100644 (file)
index 0000000..1ea9d34
--- /dev/null
@@ -0,0 +1,84 @@
+/*
+ * ethernut5.dts - Device Tree file for Ethernut 5 board
+ *
+ * Copyright (C) 2012 egnite GmbH <info@egnite.de>
+ *
+ * Licensed under GPLv2.
+ */
+/dts-v1/;
+/include/ "at91sam9260.dtsi"
+
+/ {
+       model = "Ethernut 5";
+       compatible = "egnite,ethernut5", "atmel,at91sam9260", "atmel,at91sam9";
+
+       chosen {
+               bootargs = "console=ttyS0,115200 root=/dev/mtdblock0 rw rootfstype=jffs2";
+       };
+
+       memory {
+               reg = <0x20000000 0x08000000>;
+       };
+
+       ahb {
+               apb {
+                       dbgu: serial@fffff200 {
+                               status = "okay";
+                       };
+
+                       usart0: serial@fffb0000 {
+                               status = "okay";
+                       };
+
+                       usart1: serial@fffb4000 {
+                               status = "okay";
+                       };
+
+                       macb0: ethernet@fffc4000 {
+                               phy-mode = "rmii";
+                               status = "okay";
+                       };
+
+                       usb1: gadget@fffa4000 {
+                               atmel,vbus-gpio = <&pioC 5 0>;
+                               status = "okay";
+                       };
+               };
+
+               nand0: nand@40000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "soft";
+                       nand-on-flash-bbt;
+                       status = "okay";
+
+                       gpios = <0
+                                &pioC 14 0
+                                0
+                               >;
+
+                       root@0 {
+                               label = "root";
+                               reg = <0x0 0x08000000>;
+                       };
+
+                       data@20000 {
+                               label = "data";
+                               reg = <0x08000000 0x38000000>;
+                       };
+               };
+
+               usb0: ohci@00500000 {
+                       num-ports = <2>;
+                       status = "okay";
+               };
+       };
+
+       i2c@0 {
+               status = "okay";
+
+               pcf8563@50 {
+                       compatible = "nxp,pcf8563";
+                       reg = <0x51>;
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/kizbox.dts b/arch/arm/boot/dts/kizbox.dts
new file mode 100644 (file)
index 0000000..e8814fe
--- /dev/null
@@ -0,0 +1,138 @@
+/*
+ * kizbox.dts - Device Tree file for Overkiz Kizbox board
+ *
+ * Copyright (C) 2012 Boris BREZILLON <linux-arm@overkiz.com>
+ *
+ * Licensed under GPLv2.
+ */
+/dts-v1/;
+/include/ "at91sam9g20.dtsi"
+
+/ {
+
+       model = "Overkiz kizbox";
+       compatible = "overkiz,kizbox", "atmel,at91sam9g20", "atmel,at91sam9";
+
+       chosen {
+               bootargs = "panic=5 ubi.mtd=1 rootfstype=ubifs root=ubi0:root";
+       };
+
+       memory {
+               reg = <0x20000000 0x2000000>;
+       };
+
+       clocks {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               main_clock: clock@0 {
+                       compatible = "atmel,osc", "fixed-clock";
+                       clock-frequency = <18432000>;
+               };
+       };
+
+       ahb {
+               apb {
+                       dbgu: serial@fffff200 {
+                               status = "okay";
+                       };
+
+                       usart0: serial@fffb0000 {
+                               status = "okay";
+                       };
+
+                       usart1: serial@fffb4000 {
+                               status = "okay";
+                       };
+
+                       macb0: ethernet@fffc4000 {
+                               phy-mode = "mii";
+                               status = "okay";
+                       };
+
+               };
+
+               nand0: nand@40000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "soft";
+                       status = "okay";
+
+                       bootloaderkernel@0 {
+                               label = "bootloader-kernel";
+                               reg = <0x0 0xc0000>;
+                       };
+
+                       ubi@c0000 {
+                               label = "ubi";
+                               reg = <0xc0000 0x7f40000>;
+                       };
+
+               };
+
+               usb0: ohci@00500000 {
+                       num-ports = <1>;
+                       status = "okay";
+               };
+       };
+
+       i2c@0 {
+               status = "okay";
+
+               pcf8563@51 {
+                       /* nxp pcf8563 rtc */
+                       compatible = "nxp,pcf8563";
+                       reg = <0x51>;
+               };
+
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               led1g {
+                       label = "led1:green";
+                       gpios = <&pioB 0 1>;
+                       linux,default-trigger = "none";
+               };
+
+               led1r {
+                       label = "led1:red";
+                       gpios = <&pioB 1 1>;
+                       linux,default-trigger = "none";
+               };
+
+               led2g {
+                       label = "led2:green";
+                       gpios = <&pioB 2 1>;
+                       linux,default-trigger = "none";
+                       default-state = "on";
+               };
+
+               led2r {
+                       label = "led2:red";
+                       gpios = <&pioB 3 1>;
+                       linux,default-trigger = "none";
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               reset {
+                       label = "reset";
+                       gpios = <&pioB 30 1>;
+                       linux,code = <0x100>;
+                       gpio-key,wakeup;
+               };
+
+               mode {
+                       label = "mode";
+                       gpios = <&pioB 31 1>;
+                       linux,code = <0x101>;
+                       gpio-key,wakeup;
+               };
+       };
+};
\ No newline at end of file
diff --git a/arch/arm/boot/dts/tny_a9260.dts b/arch/arm/boot/dts/tny_a9260.dts
new file mode 100644 (file)
index 0000000..367a16d
--- /dev/null
@@ -0,0 +1,15 @@
+/*
+ * tny_a9260.dts - Device Tree file for Caloa TNY A9260 board
+ *
+ * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2.
+ */
+/dts-v1/;
+/include/ "at91sam9260.dtsi"
+/include/ "tny_a9260_common.dtsi"
+
+/ {
+       model = "Calao TNY A9260";
+       compatible = "calao,tny-a9260", "atmel,at91sam9260", "atmel,at91sam9";
+};
diff --git a/arch/arm/boot/dts/tny_a9260_common.dtsi b/arch/arm/boot/dts/tny_a9260_common.dtsi
new file mode 100644 (file)
index 0000000..0e6d3de
--- /dev/null
@@ -0,0 +1,83 @@
+/*
+ * tny_a9260_common.dtsi - Device Tree file for Caloa TNY A926x board
+ *
+ * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2.
+ */
+
+/ {
+       chosen {
+               bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock6 rw rootfstype=ubifs";
+       };
+
+       memory {
+               reg = <0x20000000 0x4000000>;
+       };
+
+       clocks {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               main_clock: clock@0 {
+                       compatible = "atmel,osc", "fixed-clock";
+                       clock-frequency = <12000000>;
+               };
+       };
+
+       ahb {
+               apb {
+                       dbgu: serial@fffff200 {
+                               status = "okay";
+                       };
+               };
+
+               nand0: nand@40000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "soft";
+                       nand-on-flash-bbt;
+                       status = "okay";
+
+                       at91bootstrap@0 {
+                               label = "at91bootstrap";
+                               reg = <0x0 0x20000>;
+                       };
+
+                       barebox@20000 {
+                               label = "barebox";
+                               reg = <0x20000 0x40000>;
+                       };
+
+                       bareboxenv@60000 {
+                               label = "bareboxenv";
+                               reg = <0x60000 0x20000>;
+                       };
+
+                       bareboxenv2@80000 {
+                               label = "bareboxenv2";
+                               reg = <0x80000 0x20000>;
+                       };
+
+                       oftree@80000 {
+                               label = "oftree";
+                               reg = <0xa0000 0x20000>;
+                       };
+
+                       kernel@a0000 {
+                               label = "kernel";
+                               reg = <0xc0000 0x400000>;
+                       };
+
+                       rootfs@4a0000 {
+                               label = "rootfs";
+                               reg = <0x4c0000 0x7800000>;
+                       };
+
+                       data@7ca0000 {
+                               label = "data";
+                               reg = <0x7cc0000 0x8340000>;
+                       };
+               };
+       };
+};
diff --git a/arch/arm/boot/dts/tny_a9263.dts b/arch/arm/boot/dts/tny_a9263.dts
new file mode 100644 (file)
index 0000000..dee9c57
--- /dev/null
@@ -0,0 +1,97 @@
+/*
+ * usb_a9263.dts - Device Tree file for Caloa USB A9293 board
+ *
+ *  Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2 only
+ */
+/dts-v1/;
+/include/ "at91sam9263.dtsi"
+
+/ {
+       model = "Calao TNY A9263";
+       compatible = "atmel,tny-a9263", "atmel,at91sam9263", "atmel,at91sam9";
+
+       chosen {
+               bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock5 rw rootfstype=ubifs";
+       };
+
+       memory {
+               reg = <0x20000000 0x4000000>;
+       };
+
+       clocks {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               main_clock: clock@0 {
+                       compatible = "atmel,osc", "fixed-clock";
+                       clock-frequency = <12000000>;
+               };
+       };
+
+       ahb {
+               apb {
+                       dbgu: serial@ffffee00 {
+                               status = "okay";
+                       };
+
+                       usb1: gadget@fff78000 {
+                               atmel,vbus-gpio = <&pioB 11 0>;
+                               status = "okay";
+                       };
+               };
+
+               nand0: nand@40000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "soft";
+                       nand-on-flash-bbt;
+                       status = "okay";
+
+                       at91bootstrap@0 {
+                               label = "at91bootstrap";
+                               reg = <0x0 0x20000>;
+                       };
+
+                       barebox@20000 {
+                               label = "barebox";
+                               reg = <0x20000 0x40000>;
+                       };
+
+                       bareboxenv@60000 {
+                               label = "bareboxenv";
+                               reg = <0x60000 0x20000>;
+                       };
+
+                       bareboxenv2@80000 {
+                               label = "bareboxenv2";
+                               reg = <0x80000 0x20000>;
+                       };
+
+                       oftree@80000 {
+                               label = "oftree";
+                               reg = <0xa0000 0x20000>;
+                       };
+
+                       kernel@a0000 {
+                               label = "kernel";
+                               reg = <0xc0000 0x400000>;
+                       };
+
+                       rootfs@4a0000 {
+                               label = "rootfs";
+                               reg = <0x4c0000 0x7800000>;
+                       };
+
+                       data@7ca0000 {
+                               label = "data";
+                               reg = <0x7cc0000 0x8340000>;
+                       };
+               };
+       };
+
+       i2c@0 {
+               status = "okay";
+       };
+};
diff --git a/arch/arm/boot/dts/tny_a9g20.dts b/arch/arm/boot/dts/tny_a9g20.dts
new file mode 100644 (file)
index 0000000..e1ab64c
--- /dev/null
@@ -0,0 +1,15 @@
+/*
+ * tny_a9g20.dts - Device Tree file for Caloa TNY A9G20 board
+ *
+ * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2.
+ */
+/dts-v1/;
+/include/ "at91sam9g20.dtsi"
+/include/ "tny_a9260_common.dtsi"
+
+/ {
+       model = "Calao TNY A9G20";
+       compatible = "calao,tny-a9g20", "atmel,at91sam9g20", "atmel,at91sam9";
+};
diff --git a/arch/arm/boot/dts/usb_a9260.dts b/arch/arm/boot/dts/usb_a9260.dts
new file mode 100644 (file)
index 0000000..2962160
--- /dev/null
@@ -0,0 +1,23 @@
+/*
+ * usb_a9260.dts - Device Tree file for Caloa USB A9260 board
+ *
+ *  Copyright (C) 2011-2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+/dts-v1/;
+/include/ "at91sam9260.dtsi"
+/include/ "usb_a9260_common.dtsi"
+
+/ {
+       model = "Calao USB A9260";
+       compatible = "calao,usb-a9260", "atmel,at91sam9260", "atmel,at91sam9";
+
+       chosen {
+               bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock5 rw rootfstype=ubifs";
+       };
+
+       memory {
+               reg = <0x20000000 0x4000000>;
+       };
+};
diff --git a/arch/arm/boot/dts/usb_a9260_common.dtsi b/arch/arm/boot/dts/usb_a9260_common.dtsi
new file mode 100644 (file)
index 0000000..e70d229
--- /dev/null
@@ -0,0 +1,117 @@
+/*
+ * usb_a926x.dts - Device Tree file for Caloa USB A926x board
+ *
+ *  Copyright (C) 2011-2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+/ {
+       clocks {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               main_clock: clock@0 {
+                       compatible = "atmel,osc", "fixed-clock";
+                       clock-frequency = <12000000>;
+               };
+       };
+
+       ahb {
+               apb {
+                       dbgu: serial@fffff200 {
+                               status = "okay";
+                       };
+
+                       macb0: ethernet@fffc4000 {
+                               phy-mode = "rmii";
+                               status = "okay";
+                       };
+
+                       usb1: gadget@fffa4000 {
+                               atmel,vbus-gpio = <&pioC 5 0>;
+                               status = "okay";
+                       };
+               };
+
+               nand0: nand@40000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "soft";
+                       nand-on-flash-bbt;
+                       status = "okay";
+
+                       at91bootstrap@0 {
+                               label = "at91bootstrap";
+                               reg = <0x0 0x20000>;
+                       };
+
+                       barebox@20000 {
+                               label = "barebox";
+                               reg = <0x20000 0x40000>;
+                       };
+
+                       bareboxenv@60000 {
+                               label = "bareboxenv";
+                               reg = <0x60000 0x20000>;
+                       };
+
+                       bareboxenv2@80000 {
+                               label = "bareboxenv2";
+                               reg = <0x80000 0x20000>;
+                       };
+
+                       oftree@80000 {
+                               label = "oftree";
+                               reg = <0xa0000 0x20000>;
+                       };
+
+                       kernel@a0000 {
+                               label = "kernel";
+                               reg = <0xc0000 0x400000>;
+                       };
+
+                       rootfs@4a0000 {
+                               label = "rootfs";
+                               reg = <0x4c0000 0x7800000>;
+                       };
+
+                       data@7ca0000 {
+                               label = "data";
+                               reg = <0x7cc0000 0x8340000>;
+                       };
+               };
+
+               usb0: ohci@00500000 {
+                       num-ports = <2>;
+                       status = "okay";
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               user_led {
+                       label = "user_led";
+                       gpios = <&pioB 21 1>;
+                       linux,default-trigger = "heartbeat";
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               user_pb {
+                       label = "user_pb";
+                       gpios = <&pioB 10 1>;
+                       linux,code = <28>;
+                       gpio-key,wakeup;
+               };
+       };
+
+       i2c@0 {
+               status = "okay";
+       };
+};
diff --git a/arch/arm/boot/dts/usb_a9263.dts b/arch/arm/boot/dts/usb_a9263.dts
new file mode 100644 (file)
index 0000000..6fe05cc
--- /dev/null
@@ -0,0 +1,131 @@
+/*
+ * usb_a9263.dts - Device Tree file for Caloa USB A9293 board
+ *
+ *  Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
+ *
+ * Licensed under GPLv2 only
+ */
+/dts-v1/;
+/include/ "at91sam9263.dtsi"
+
+/ {
+       model = "Calao USB A9263";
+       compatible = "atmel,usb-a9263", "atmel,at91sam9263", "atmel,at91sam9";
+
+       chosen {
+               bootargs = "mem=64M console=ttyS0,115200 root=/dev/mtdblock5 rw rootfstype=ubifs";
+       };
+
+       memory {
+               reg = <0x20000000 0x4000000>;
+       };
+
+       clocks {
+               #address-cells = <1>;
+               #size-cells = <1>;
+               ranges;
+
+               main_clock: clock@0 {
+                       compatible = "atmel,osc", "fixed-clock";
+                       clock-frequency = <12000000>;
+               };
+       };
+
+       ahb {
+               apb {
+                       dbgu: serial@ffffee00 {
+                               status = "okay";
+                       };
+
+                       macb0: ethernet@fffbc000 {
+                               phy-mode = "rmii";
+                               status = "okay";
+                       };
+
+                       usb1: gadget@fff78000 {
+                               atmel,vbus-gpio = <&pioB 11 0>;
+                               status = "okay";
+                       };
+
+               };
+
+               nand0: nand@40000000 {
+                       nand-bus-width = <8>;
+                       nand-ecc-mode = "soft";
+                       nand-on-flash-bbt;
+                       status = "okay";
+
+                       at91bootstrap@0 {
+                               label = "at91bootstrap";
+                               reg = <0x0 0x20000>;
+                       };
+
+                       barebox@20000 {
+                               label = "barebox";
+                               reg = <0x20000 0x40000>;
+                       };
+
+                       bareboxenv@60000 {
+                               label = "bareboxenv";
+                               reg = <0x60000 0x20000>;
+                       };
+
+                       bareboxenv2@80000 {
+                               label = "bareboxenv2";
+                               reg = <0x80000 0x20000>;
+                       };
+
+                       oftree@80000 {
+                               label = "oftree";
+                               reg = <0xa0000 0x20000>;
+                       };
+
+                       kernel@a0000 {
+                               label = "kernel";
+                               reg = <0xc0000 0x400000>;
+                       };
+
+                       rootfs@4a0000 {
+                               label = "rootfs";
+                               reg = <0x4c0000 0x7800000>;
+                       };
+
+                       data@7ca0000 {
+                               label = "data";
+                               reg = <0x7cc0000 0x8340000>;
+                       };
+               };
+
+               usb0: ohci@00a00000 {
+                       num-ports = <2>;
+                       status = "okay";
+               };
+       };
+
+       leds {
+               compatible = "gpio-leds";
+
+               user_led {
+                       label = "user_led";
+                       gpios = <&pioB 21 0>;
+                       linux,default-trigger = "heartbeat";
+               };
+       };
+
+       gpio_keys {
+               compatible = "gpio-keys";
+               #address-cells = <1>;
+               #size-cells = <0>;
+
+               user_pb {
+                       label = "user_pb";
+                       gpios = <&pioB 10 1>;
+                       linux,code = <28>;
+                       gpio-key,wakeup;
+               };
+       };
+
+       i2c@0 {
+               status = "okay";
+       };
+};
index 7c2399c532e52990b17f98c6ce48908f0e3b11c3..2dacb16ce4ae811c12ea8008ccb6dbf31ca24489 100644 (file)
@@ -7,6 +7,7 @@
  */
 /dts-v1/;
 /include/ "at91sam9g20.dtsi"
+/include/ "usb_a9260_common.dtsi"
 
 / {
        model = "Calao USB A9G20";
                reg = <0x20000000 0x4000000>;
        };
 
-       clocks {
-               #address-cells = <1>;
-               #size-cells = <1>;
-               ranges;
-
-               main_clock: clock@0 {
-                       compatible = "atmel,osc", "fixed-clock";
-                       clock-frequency = <12000000>;
-               };
-       };
-
-       ahb {
-               apb {
-                       dbgu: serial@fffff200 {
-                               status = "okay";
-                       };
-
-                       macb0: ethernet@fffc4000 {
-                               phy-mode = "rmii";
-                               status = "okay";
-                       };
-
-                       usb1: gadget@fffa4000 {
-                               atmel,vbus-gpio = <&pioC 5 0>;
-                               status = "okay";
-                       };
-               };
-
-               nand0: nand@40000000 {
-                       nand-bus-width = <8>;
-                       nand-ecc-mode = "soft";
-                       nand-on-flash-bbt;
-                       status = "okay";
-
-                       at91bootstrap@0 {
-                               label = "at91bootstrap";
-                               reg = <0x0 0x20000>;
-                       };
-
-                       barebox@20000 {
-                               label = "barebox";
-                               reg = <0x20000 0x40000>;
-                       };
-
-                       bareboxenv@60000 {
-                               label = "bareboxenv";
-                               reg = <0x60000 0x20000>;
-                       };
-
-                       bareboxenv2@80000 {
-                               label = "bareboxenv2";
-                               reg = <0x80000 0x20000>;
-                       };
-
-                       kernel@a0000 {
-                               label = "kernel";
-                               reg = <0xa0000 0x400000>;
-                       };
-
-                       rootfs@4a0000 {
-                               label = "rootfs";
-                               reg = <0x4a0000 0x7800000>;
-                       };
-
-                       data@7ca0000 {
-                               label = "data";
-                               reg = <0x7ca0000 0x8360000>;
-                       };
-               };
-
-               usb0: ohci@00500000 {
-                       num-ports = <2>;
-                       status = "okay";
-               };
-       };
-
-       leds {
-               compatible = "gpio-leds";
-
-               user_led {
-                       label = "user_led";
-                       gpios = <&pioB 21 1>;
-                       linux,default-trigger = "heartbeat";
-               };
-       };
-
-       gpio_keys {
-               compatible = "gpio-keys";
-               #address-cells = <1>;
-               #size-cells = <0>;
-
-               user_pb {
-                       label = "user_pb";
-                       gpios = <&pioB 10 1>;
-                       linux,code = <28>;
-                       gpio-key,wakeup;
-               };
-       };
-
        i2c@0 {
-               status = "okay";
-
                rv3029c2@56 {
                        compatible = "rv3029c2";
                        reg = <0x56>;
diff --git a/arch/arm/configs/at91_dt_defconfig b/arch/arm/configs/at91_dt_defconfig
new file mode 100644 (file)
index 0000000..67bc571
--- /dev/null
@@ -0,0 +1,196 @@
+CONFIG_EXPERIMENTAL=y
+# CONFIG_LOCALVERSION_AUTO is not set
+# CONFIG_SWAP is not set
+CONFIG_SYSVIPC=y
+CONFIG_LOG_BUF_SHIFT=14
+CONFIG_BLK_DEV_INITRD=y
+CONFIG_CC_OPTIMIZE_FOR_SIZE=y
+CONFIG_KALLSYMS_ALL=y
+CONFIG_EMBEDDED=y
+CONFIG_SLAB=y
+CONFIG_MODULES=y
+CONFIG_MODULE_UNLOAD=y
+# CONFIG_LBDAF is not set
+# CONFIG_BLK_DEV_BSG is not set
+# CONFIG_IOSCHED_DEADLINE is not set
+# CONFIG_IOSCHED_CFQ is not set
+CONFIG_ARCH_AT91=y
+CONFIG_SOC_AT91SAM9260=y
+CONFIG_SOC_AT91SAM9263=y
+CONFIG_SOC_AT91SAM9G45=y
+CONFIG_SOC_AT91SAM9X5=y
+CONFIG_MACH_AT91SAM_DT=y
+CONFIG_AT91_PROGRAMMABLE_CLOCKS=y
+CONFIG_AT91_TIMER_HZ=128
+CONFIG_AEABI=y
+# CONFIG_OABI_COMPAT is not set
+CONFIG_LEDS=y
+CONFIG_LEDS_CPU=y
+CONFIG_UACCESS_WITH_MEMCPY=y
+CONFIG_ZBOOT_ROM_TEXT=0x0
+CONFIG_ZBOOT_ROM_BSS=0x0
+CONFIG_ARM_APPENDED_DTB=y
+CONFIG_ARM_ATAG_DTB_COMPAT=y
+CONFIG_CMDLINE="mem=128M console=ttyS0,115200 initrd=0x21100000,25165824 root=/dev/ram0 rw"
+CONFIG_KEXEC=y
+CONFIG_AUTO_ZRELADDR=y
+# CONFIG_CORE_DUMP_DEFAULT_ELF_HEADERS is not set
+CONFIG_NET=y
+CONFIG_PACKET=y
+CONFIG_UNIX=y
+CONFIG_INET=y
+CONFIG_IP_MULTICAST=y
+CONFIG_IP_PNP=y
+# CONFIG_INET_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET_XFRM_MODE_BEET is not set
+# CONFIG_INET_DIAG is not set
+CONFIG_IPV6=y
+# CONFIG_INET6_XFRM_MODE_TRANSPORT is not set
+# CONFIG_INET6_XFRM_MODE_TUNNEL is not set
+# CONFIG_INET6_XFRM_MODE_BEET is not set
+CONFIG_IPV6_SIT_6RD=y
+# CONFIG_WIRELESS is not set
+CONFIG_UEVENT_HELPER_PATH="/sbin/hotplug"
+CONFIG_DEVTMPFS=y
+CONFIG_DEVTMPFS_MOUNT=y
+# CONFIG_STANDALONE is not set
+# CONFIG_PREVENT_FIRMWARE_BUILD is not set
+CONFIG_MTD=y
+CONFIG_MTD_CMDLINE_PARTS=y
+CONFIG_MTD_CHAR=y
+CONFIG_MTD_BLOCK=y
+CONFIG_MTD_NAND=y
+CONFIG_MTD_NAND_ATMEL=y
+CONFIG_MTD_UBI=y
+CONFIG_MTD_UBI_GLUEBI=y
+CONFIG_PROC_DEVICETREE=y
+CONFIG_BLK_DEV_LOOP=y
+CONFIG_BLK_DEV_RAM=y
+CONFIG_BLK_DEV_RAM_COUNT=4
+CONFIG_BLK_DEV_RAM_SIZE=8192
+CONFIG_ATMEL_PWM=y
+CONFIG_ATMEL_TCLIB=y
+CONFIG_EEPROM_93CX6=m
+CONFIG_SCSI=y
+CONFIG_BLK_DEV_SD=y
+CONFIG_SCSI_MULTI_LUN=y
+# CONFIG_SCSI_LOWLEVEL is not set
+CONFIG_NETDEVICES=y
+CONFIG_MII=y
+CONFIG_MACB=y
+# CONFIG_NET_VENDOR_BROADCOM is not set
+# CONFIG_NET_VENDOR_CHELSIO is not set
+# CONFIG_NET_VENDOR_FARADAY is not set
+# CONFIG_NET_VENDOR_INTEL is not set
+# CONFIG_NET_VENDOR_MARVELL is not set
+# CONFIG_NET_VENDOR_MICREL is not set
+# CONFIG_NET_VENDOR_NATSEMI is not set
+# CONFIG_NET_VENDOR_SEEQ is not set
+# CONFIG_NET_VENDOR_SMSC is not set
+# CONFIG_NET_VENDOR_STMICRO is not set
+CONFIG_DAVICOM_PHY=y
+CONFIG_MICREL_PHY=y
+# CONFIG_WLAN is not set
+CONFIG_INPUT_POLLDEV=y
+# CONFIG_INPUT_MOUSEDEV_PSAUX is not set
+CONFIG_INPUT_MOUSEDEV_SCREEN_X=480
+CONFIG_INPUT_MOUSEDEV_SCREEN_Y=272
+CONFIG_INPUT_JOYDEV=y
+CONFIG_INPUT_EVDEV=y
+# CONFIG_KEYBOARD_ATKBD is not set
+CONFIG_KEYBOARD_GPIO=y
+# CONFIG_INPUT_MOUSE is not set
+CONFIG_INPUT_TOUCHSCREEN=y
+# CONFIG_SERIO is not set
+CONFIG_LEGACY_PTY_COUNT=4
+CONFIG_SERIAL_ATMEL=y
+CONFIG_SERIAL_ATMEL_CONSOLE=y
+CONFIG_HW_RANDOM=y
+CONFIG_I2C=y
+CONFIG_I2C_GPIO=y
+CONFIG_SPI=y
+CONFIG_SPI_ATMEL=y
+# CONFIG_HWMON is not set
+CONFIG_WATCHDOG=y
+CONFIG_AT91SAM9X_WATCHDOG=y
+CONFIG_SSB=m
+CONFIG_FB=y
+CONFIG_FB_MODE_HELPERS=y
+CONFIG_FB_ATMEL=y
+CONFIG_BACKLIGHT_LCD_SUPPORT=y
+# CONFIG_LCD_CLASS_DEVICE is not set
+CONFIG_BACKLIGHT_CLASS_DEVICE=y
+CONFIG_BACKLIGHT_ATMEL_LCDC=y
+# CONFIG_BACKLIGHT_GENERIC is not set
+CONFIG_FRAMEBUFFER_CONSOLE=y
+CONFIG_FRAMEBUFFER_CONSOLE_DETECT_PRIMARY=y
+CONFIG_FONTS=y
+CONFIG_FONT_8x8=y
+CONFIG_FONT_ACORN_8x8=y
+CONFIG_FONT_MINI_4x6=y
+CONFIG_LOGO=y
+# CONFIG_HID_SUPPORT is not set
+CONFIG_USB=y
+CONFIG_USB_ANNOUNCE_NEW_DEVICES=y
+CONFIG_USB_DEVICEFS=y
+# CONFIG_USB_DEVICE_CLASS is not set
+CONFIG_USB_EHCI_HCD=y
+CONFIG_USB_OHCI_HCD=y
+CONFIG_USB_ACM=y
+CONFIG_USB_STORAGE=y
+CONFIG_USB_SERIAL=y
+CONFIG_USB_SERIAL_GENERIC=y
+CONFIG_USB_SERIAL_FTDI_SIO=y
+CONFIG_USB_SERIAL_PL2303=y
+CONFIG_USB_GADGET=y
+CONFIG_USB_AT91=m
+CONFIG_USB_ATMEL_USBA=m
+CONFIG_USB_ETH=m
+CONFIG_USB_GADGETFS=m
+CONFIG_USB_CDC_COMPOSITE=m
+CONFIG_USB_G_ACM_MS=m
+CONFIG_USB_G_MULTI=m
+CONFIG_USB_G_MULTI_CDC=y
+CONFIG_MMC=y
+CONFIG_MMC_ATMELMCI=y
+CONFIG_NEW_LEDS=y
+CONFIG_LEDS_CLASS=y
+CONFIG_LEDS_GPIO=y
+CONFIG_LEDS_TRIGGERS=y
+CONFIG_LEDS_TRIGGER_TIMER=y
+CONFIG_LEDS_TRIGGER_HEARTBEAT=y
+CONFIG_LEDS_TRIGGER_GPIO=y
+CONFIG_RTC_CLASS=y
+CONFIG_RTC_DRV_AT91RM9200=y
+CONFIG_RTC_DRV_AT91SAM9=y
+CONFIG_DMADEVICES=y
+# CONFIG_IOMMU_SUPPORT is not set
+CONFIG_EXT2_FS=y
+CONFIG_FANOTIFY=y
+CONFIG_VFAT_FS=y
+CONFIG_TMPFS=y
+CONFIG_NFS_FS=y
+CONFIG_NFS_V3=y
+CONFIG_ROOT_NFS=y
+CONFIG_NLS_CODEPAGE_437=y
+CONFIG_NLS_CODEPAGE_850=y
+CONFIG_NLS_ISO8859_1=y
+CONFIG_STRIP_ASM_SYMS=y
+CONFIG_DEBUG_FS=y
+# CONFIG_SCHED_DEBUG is not set
+# CONFIG_DEBUG_BUGVERBOSE is not set
+# CONFIG_FTRACE is not set
+CONFIG_DEBUG_USER=y
+CONFIG_CRYPTO=y
+CONFIG_CRYPTO_ECB=y
+CONFIG_CRYPTO_AES=y
+CONFIG_CRYPTO_ARC4=y
+# CONFIG_CRYPTO_ANSI_CPRNG is not set
+CONFIG_CRYPTO_USER_API_HASH=m
+CONFIG_CRYPTO_USER_API_SKCIPHER=m
+# CONFIG_CRYPTO_HW is not set
+CONFIG_CRC_CCITT=m
+CONFIG_CRC_ITU_T=m
+CONFIG_CRC7=m
+CONFIG_AVERAGE=y
index bbe4e1a1f5d86f81464e393e2fd2ab228e34542c..d54e2acd3ab16616814feaa1fcdbf9e712be5e9d 100644 (file)
@@ -14,6 +14,7 @@ CONFIG_MODULE_SRCVERSION_ALL=y
 # CONFIG_BLK_DEV_BSG is not set
 # CONFIG_IOSCHED_CFQ is not set
 CONFIG_ARCH_AT91=y
+CONFIG_ARCH_AT91RM9200=y
 CONFIG_MACH_ONEARM=y
 CONFIG_ARCH_AT91RM9200DK=y
 CONFIG_MACH_AT91RM9200EK=y
index 45db05d8d94c017fbd57586c80d306fff495affe..19505c0a3f018225dcdc4935e089024e8d03d670 100644 (file)
@@ -9,15 +9,6 @@ config HAVE_AT91_DBGU0
 config HAVE_AT91_DBGU1
        bool
 
-config HAVE_AT91_USART3
-       bool
-
-config HAVE_AT91_USART4
-       bool
-
-config HAVE_AT91_USART5
-       bool
-
 config AT91_SAM9_ALT_RESET
        bool
        default !ARCH_AT91X40
@@ -26,87 +17,129 @@ config AT91_SAM9G45_RESET
        bool
        default !ARCH_AT91X40
 
+config SOC_AT91SAM9
+       bool
+       select GENERIC_CLOCKEVENTS
+       select CPU_ARM926T
+
 menu "Atmel AT91 System-on-Chip"
 
-choice
-       prompt "Atmel AT91 Processor"
+comment "Atmel AT91 Processor"
 
-config ARCH_AT91RM9200
+config SOC_AT91SAM9
+       bool
+       select CPU_ARM926T
+       select AT91_SAM9_TIME
+       select AT91_SAM9_SMC
+
+config SOC_AT91RM9200
        bool "AT91RM9200"
        select CPU_ARM920T
        select GENERIC_CLOCKEVENTS
        select HAVE_AT91_DBGU0
-       select HAVE_AT91_USART3
 
-config ARCH_AT91SAM9260
-       bool "AT91SAM9260 or AT91SAM9XE"
-       select CPU_ARM926T
-       select GENERIC_CLOCKEVENTS
+config SOC_AT91SAM9260
+       bool "AT91SAM9260, AT91SAM9XE or AT91SAM9G20"
+       select SOC_AT91SAM9
        select HAVE_AT91_DBGU0
-       select HAVE_AT91_USART3
-       select HAVE_AT91_USART4
-       select HAVE_AT91_USART5
        select HAVE_NET_MACB
+       help
+         Select this if you are using one of Atmel's AT91SAM9260, AT91SAM9XE
+         or AT91SAM9G20 SoC.
 
-config ARCH_AT91SAM9261
-       bool "AT91SAM9261"
-       select CPU_ARM926T
-       select GENERIC_CLOCKEVENTS
-       select HAVE_FB_ATMEL
-       select HAVE_AT91_DBGU0
-
-config ARCH_AT91SAM9G10
-       bool "AT91SAM9G10"
-       select CPU_ARM926T
-       select GENERIC_CLOCKEVENTS
+config SOC_AT91SAM9261
+       bool "AT91SAM9261 or AT91SAM9G10"
+       select SOC_AT91SAM9
        select HAVE_AT91_DBGU0
        select HAVE_FB_ATMEL
+       help
+         Select this if you are using one of Atmel's AT91SAM9261 or AT91SAM9G10 SoC.
 
-config ARCH_AT91SAM9263
+config SOC_AT91SAM9263
        bool "AT91SAM9263"
-       select CPU_ARM926T
-       select GENERIC_CLOCKEVENTS
+       select SOC_AT91SAM9
+       select HAVE_AT91_DBGU1
        select HAVE_FB_ATMEL
        select HAVE_NET_MACB
-       select HAVE_AT91_DBGU1
 
-config ARCH_AT91SAM9RL
+config SOC_AT91SAM9RL
        bool "AT91SAM9RL"
-       select CPU_ARM926T
-       select GENERIC_CLOCKEVENTS
-       select HAVE_AT91_USART3
-       select HAVE_FB_ATMEL
-       select HAVE_AT91_DBGU0
-
-config ARCH_AT91SAM9G20
-       bool "AT91SAM9G20"
-       select CPU_ARM926T
-       select GENERIC_CLOCKEVENTS
+       select SOC_AT91SAM9
        select HAVE_AT91_DBGU0
-       select HAVE_AT91_USART3
-       select HAVE_AT91_USART4
-       select HAVE_AT91_USART5
-       select HAVE_NET_MACB
+       select HAVE_FB_ATMEL
 
-config ARCH_AT91SAM9G45
-       bool "AT91SAM9G45"
-       select CPU_ARM926T
-       select GENERIC_CLOCKEVENTS
-       select HAVE_AT91_USART3
+config SOC_AT91SAM9G45
+       bool "AT91SAM9G45 or AT91SAM9M10 families"
+       select SOC_AT91SAM9
+       select HAVE_AT91_DBGU1
        select HAVE_FB_ATMEL
        select HAVE_NET_MACB
-       select HAVE_AT91_DBGU1
+       help
+         Select this if you are using one of Atmel's AT91SAM9G45 family SoC.
+         This support covers AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11.
 
-config ARCH_AT91SAM9X5
+config SOC_AT91SAM9X5
        bool "AT91SAM9x5 family"
-       select CPU_ARM926T
-       select GENERIC_CLOCKEVENTS
+       select SOC_AT91SAM9
+       select HAVE_AT91_DBGU0
        select HAVE_FB_ATMEL
        select HAVE_NET_MACB
+       help
+         Select this if you are using one of Atmel's AT91SAM9x5 family SoC.
+         This means that your SAM9 name finishes with a '5' (except if it is
+         AT91SAM9G45!).
+         This support covers AT91SAM9G15, AT91SAM9G25, AT91SAM9X25, AT91SAM9G35
+         and AT91SAM9X35.
+
+config SOC_AT91SAM9N12
+       bool "AT91SAM9N12 family"
+       select SOC_AT91SAM9
        select HAVE_AT91_DBGU0
+       select HAVE_FB_ATMEL
+       help
+         Select this if you are using Atmel's AT91SAM9N12 SoC.
+
+choice
+       prompt "Atmel AT91 Processor Devices for non DT boards"
+
+config ARCH_AT91_NONE
+       bool "None"
+
+config ARCH_AT91RM9200
+       bool "AT91RM9200"
+       select SOC_AT91RM9200
+
+config ARCH_AT91SAM9260
+       bool "AT91SAM9260 or AT91SAM9XE"
+       select SOC_AT91SAM9260
+
+config ARCH_AT91SAM9261
+       bool "AT91SAM9261"
+       select SOC_AT91SAM9261
+
+config ARCH_AT91SAM9G10
+       bool "AT91SAM9G10"
+       select SOC_AT91SAM9261
+
+config ARCH_AT91SAM9263
+       bool "AT91SAM9263"
+       select SOC_AT91SAM9263
+
+config ARCH_AT91SAM9RL
+       bool "AT91SAM9RL"
+       select SOC_AT91SAM9RL
+
+config ARCH_AT91SAM9G20
+       bool "AT91SAM9G20"
+       select SOC_AT91SAM9260
+
+config ARCH_AT91SAM9G45
+       bool "AT91SAM9G45"
+       select SOC_AT91SAM9G45
 
 config ARCH_AT91X40
        bool "AT91x40"
+       depends on !MMU
        select ARCH_USES_GETTIMEOFFSET
 
 endchoice
@@ -364,6 +397,7 @@ config MACH_AT91SAM9G20EK_2MMC
          Select this if you are using an Atmel AT91SAM9G20-EK Evaluation Kit
          with 2 SD/MMC Slots. This is the case for AT91SAM9G20-EK rev. C and
          onwards.
+         <http://www.atmel.com/tools/SAM9G20-EK.aspx>
 
 config MACH_CPU9G20
        bool "Eukrea CPU9G20 board"
@@ -433,9 +467,10 @@ comment "AT91SAM9G45 Board Type"
 config MACH_AT91SAM9M10G45EK
        bool "Atmel AT91SAM9M10G45-EK Evaluation Kits"
        help
-         Select this if you are using Atmel's AT91SAM9G45-EKES Evaluation Kit.
-         "ES" at the end of the name means that this board is an
-         Engineering Sample.
+         Select this if you are using Atmel's AT91SAM9M10G45-EK Evaluation Kit.
+         Those boards can be populated with any SoC of AT91SAM9G45 or AT91SAM9M10
+         families: AT91SAM9G45, AT91SAM9G46, AT91SAM9M10 and AT91SAM9M11.
+         <http://www.atmel.com/tools/SAM9M10-G45-EK.aspx>
 
 endif
 
@@ -515,41 +550,6 @@ config AT91_TIMER_HZ
          system clock (of at least several MHz), rounding is less of a
          problem so it can be safer to use a decimal values like 100.
 
-choice
-       prompt "Select a UART for early kernel messages"
-
-config AT91_EARLY_DBGU0
-       bool "DBGU on rm9200, 9260/9g20, 9261/9g10 and 9rl"
-       depends on HAVE_AT91_DBGU0
-
-config AT91_EARLY_DBGU1
-       bool "DBGU on 9263 and 9g45"
-       depends on HAVE_AT91_DBGU1
-
-config AT91_EARLY_USART0
-       bool "USART0"
-
-config AT91_EARLY_USART1
-       bool "USART1"
-
-config AT91_EARLY_USART2
-       bool "USART2"
-       depends on ! ARCH_AT91X40
-
-config AT91_EARLY_USART3
-       bool "USART3"
-       depends on HAVE_AT91_USART3
-
-config AT91_EARLY_USART4
-       bool "USART4"
-       depends on HAVE_AT91_USART4
-
-config AT91_EARLY_USART5
-       bool "USART5"
-       depends on HAVE_AT91_USART5
-
-endchoice
-
 endmenu
 
 endif
index 8512e53bed9356afb310849b7f976f895c6076d1..3bb7a51efc9d92ee8e1eed574b4b925d5a7485e1 100644 (file)
@@ -10,17 +10,26 @@ obj-                :=
 obj-$(CONFIG_AT91_PMC_UNIT)    += clock.o
 obj-$(CONFIG_AT91_SAM9_ALT_RESET) += at91sam9_alt_reset.o
 obj-$(CONFIG_AT91_SAM9G45_RESET) += at91sam9g45_reset.o
+obj-$(CONFIG_SOC_AT91SAM9)     += at91sam926x_time.o sam9_smc.o
 
 # CPU-specific support
-obj-$(CONFIG_ARCH_AT91RM9200)  += at91rm9200.o at91rm9200_time.o at91rm9200_devices.o
-obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o
-obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o
-obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261.o at91sam926x_time.o at91sam9261_devices.o sam9_smc.o
-obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam926x_time.o at91sam9263_devices.o sam9_smc.o
-obj-$(CONFIG_ARCH_AT91SAM9RL)  += at91sam9rl.o at91sam926x_time.o at91sam9rl_devices.o sam9_smc.o
-obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam926x_time.o at91sam9260_devices.o sam9_smc.o
-obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam926x_time.o at91sam9g45_devices.o sam9_smc.o
-obj-$(CONFIG_ARCH_AT91SAM9X5)  += at91sam9x5.o at91sam926x_time.o sam9_smc.o
+obj-$(CONFIG_SOC_AT91RM9200)   += at91rm9200.o at91rm9200_time.o
+obj-$(CONFIG_SOC_AT91SAM9260)  += at91sam9260.o
+obj-$(CONFIG_SOC_AT91SAM9261)  += at91sam9261.o
+obj-$(CONFIG_SOC_AT91SAM9263)  += at91sam9263.o
+obj-$(CONFIG_SOC_AT91SAM9G45)  += at91sam9g45.o
+obj-$(CONFIG_SOC_AT91SAM9N12)  += at91sam9n12.o
+obj-$(CONFIG_SOC_AT91SAM9X5)   += at91sam9x5.o
+obj-$(CONFIG_SOC_AT91SAM9RL)   += at91sam9rl.o
+
+obj-$(CONFIG_ARCH_AT91RM9200)  += at91rm9200_devices.o
+obj-$(CONFIG_ARCH_AT91SAM9260) += at91sam9260_devices.o
+obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261_devices.o
+obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261_devices.o
+obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263_devices.o
+obj-$(CONFIG_ARCH_AT91SAM9RL)  += at91sam9rl_devices.o
+obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260_devices.o
+obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45_devices.o
 obj-$(CONFIG_ARCH_AT91X40)     += at91x40.o at91x40_time.o
 
 # AT91RM9200 board-specific support
index 0da66ca4a4f83329dfd290b9582abb2b396153db..9e84fe4f2aaa00b2c23107f1e58a949afa7e68bb 100644 (file)
@@ -14,9 +14,23 @@ initrd_phys-y        := 0x20410000
 endif
 
 # Keep dtb files sorted alphabetically for each SoC
+# sam9260
+dtb-$(CONFIG_MACH_AT91SAM_DT) += ethernut5.dtb
+dtb-$(CONFIG_MACH_AT91SAM_DT) += tny_a9260.dtb
+dtb-$(CONFIG_MACH_AT91SAM_DT) += usb_a9260.dtb
+# sam9263
+dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9263ek.dtb
+dtb-$(CONFIG_MACH_AT91SAM_DT) += tny_a9263.dtb
+dtb-$(CONFIG_MACH_AT91SAM_DT) += usb_a9263.dtb
 # sam9g20
+dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9g20ek.dtb
+dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9g20ek_2mmc.dtb
+dtb-$(CONFIG_MACH_AT91SAM_DT) += kizbox.dtb
+dtb-$(CONFIG_MACH_AT91SAM_DT) += tny_a9g20.dtb
 dtb-$(CONFIG_MACH_AT91SAM_DT) += usb_a9g20.dtb
 # sam9g45
 dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9m10g45ek.dtb
+# sam9n12
+dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9n12ek.dtb
 # sam9x5
 dtb-$(CONFIG_MACH_AT91SAM_DT) += at91sam9g25ek.dtb
index 364c19357e608375d58eb9835223aa60c7b9e916..d50da1a9d0bff8b7db40c376f7a31e7a3a4891df 100644 (file)
@@ -258,18 +258,6 @@ static void __init at91rm9200_register_clocks(void)
        clk_register(&pck3);
 }
 
-static struct clk_lookup console_clock_lookup;
-
-void __init at91rm9200_set_console_clock(int id)
-{
-       if (id >= ARRAY_SIZE(usart_clocks_lookups))
-               return;
-
-       console_clock_lookup.con_id = "usart";
-       console_clock_lookup.clk = usart_clocks_lookups[id].clk;
-       clkdev_add(&console_clock_lookup);
-}
-
 /* --------------------------------------------------------------------
  *  GPIO
  * -------------------------------------------------------------------- */
index 05774e5b1cbaf32488a142b4060a1adc452c8177..99affb5d0563432a9b2da1c2861abdc099d64f00 100644 (file)
@@ -1152,14 +1152,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
                at91_uarts[portnr] = pdev;
 }
 
-void __init at91_set_serial_console(unsigned portnr)
-{
-       if (portnr < ATMEL_MAX_UART) {
-               atmel_default_console_device = at91_uarts[portnr];
-               at91rm9200_set_console_clock(at91_uarts[portnr]->id);
-       }
-}
-
 void __init at91_add_device_serial(void)
 {
        int i;
@@ -1168,13 +1160,9 @@ void __init at91_add_device_serial(void)
                if (at91_uarts[i])
                        platform_device_register(at91_uarts[i]);
        }
-
-       if (!atmel_default_console_device)
-               printk(KERN_INFO "AT91: No default serial console defined.\n");
 }
 #else
 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
-void __init at91_set_serial_console(unsigned portnr) {}
 void __init at91_add_device_serial(void) {}
 #endif
 
index 46f7742332988d040dbaf1d49317e4dffcea174f..a27bbec50ca3056fc570604420e934e08dfe2f40 100644 (file)
@@ -268,18 +268,6 @@ static void __init at91sam9260_register_clocks(void)
        clk_register(&pck1);
 }
 
-static struct clk_lookup console_clock_lookup;
-
-void __init at91sam9260_set_console_clock(int id)
-{
-       if (id >= ARRAY_SIZE(usart_clocks_lookups))
-               return;
-
-       console_clock_lookup.con_id = "usart";
-       console_clock_lookup.clk = usart_clocks_lookups[id].clk;
-       clkdev_add(&console_clock_lookup);
-}
-
 /* --------------------------------------------------------------------
  *  GPIO
  * -------------------------------------------------------------------- */
index 5652dde4bbe291fd5723481ab9a978eb66bd5ec9..d556de1411143e986ef049dcd015d6564f415861 100644 (file)
@@ -702,25 +702,8 @@ static struct platform_device at91sam9260_tcb1_device = {
        .num_resources  = ARRAY_SIZE(tcb1_resources),
 };
 
-#if defined(CONFIG_OF)
-static struct of_device_id tcb_ids[] = {
-       { .compatible = "atmel,at91rm9200-tcb" },
-       { /*sentinel*/ }
-};
-#endif
-
 static void __init at91_add_device_tc(void)
 {
-#if defined(CONFIG_OF)
-       struct device_node *np;
-
-       np = of_find_matching_node(NULL, tcb_ids);
-       if (np) {
-               of_node_put(np);
-               return;
-       }
-#endif
-
        platform_device_register(&at91sam9260_tcb0_device);
        platform_device_register(&at91sam9260_tcb1_device);
 }
@@ -1229,14 +1212,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
                at91_uarts[portnr] = pdev;
 }
 
-void __init at91_set_serial_console(unsigned portnr)
-{
-       if (portnr < ATMEL_MAX_UART) {
-               atmel_default_console_device = at91_uarts[portnr];
-               at91sam9260_set_console_clock(at91_uarts[portnr]->id);
-       }
-}
-
 void __init at91_add_device_serial(void)
 {
        int i;
@@ -1245,13 +1220,9 @@ void __init at91_add_device_serial(void)
                if (at91_uarts[i])
                        platform_device_register(at91_uarts[i]);
        }
-
-       if (!atmel_default_console_device)
-               printk(KERN_INFO "AT91: No default serial console defined.\n");
 }
 #else
 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
-void __init at91_set_serial_console(unsigned portnr) {}
 void __init at91_add_device_serial(void) {}
 #endif
 
@@ -1376,6 +1347,9 @@ void __init at91_add_device_cf(struct at91_cf_data * data) {}
  */
 static int __init at91_add_standard_devices(void)
 {
+       if (of_have_populated_dt())
+               return 0;
+
        at91_add_device_rtt();
        at91_add_device_watchdog();
        at91_add_device_tc();
index 7de81e6222f1fdae6ed8a3618e555d2d56b5d699..c77d503d09d1c2546a8e73a5ddccb246acb4ddcb 100644 (file)
@@ -239,18 +239,6 @@ static void __init at91sam9261_register_clocks(void)
        clk_register(&hck1);
 }
 
-static struct clk_lookup console_clock_lookup;
-
-void __init at91sam9261_set_console_clock(int id)
-{
-       if (id >= ARRAY_SIZE(usart_clocks_lookups))
-               return;
-
-       console_clock_lookup.con_id = "usart";
-       console_clock_lookup.clk = usart_clocks_lookups[id].clk;
-       clkdev_add(&console_clock_lookup);
-}
-
 /* --------------------------------------------------------------------
  *  GPIO
  * -------------------------------------------------------------------- */
index 4db961a93085566e80973e241f910223484ccd96..9295e90b08ff523fa93817ca9121eb15d9d5a2bb 100644 (file)
@@ -1051,14 +1051,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
                at91_uarts[portnr] = pdev;
 }
 
-void __init at91_set_serial_console(unsigned portnr)
-{
-       if (portnr < ATMEL_MAX_UART) {
-               atmel_default_console_device = at91_uarts[portnr];
-               at91sam9261_set_console_clock(at91_uarts[portnr]->id);
-       }
-}
-
 void __init at91_add_device_serial(void)
 {
        int i;
@@ -1067,13 +1059,9 @@ void __init at91_add_device_serial(void)
                if (at91_uarts[i])
                        platform_device_register(at91_uarts[i]);
        }
-
-       if (!atmel_default_console_device)
-               printk(KERN_INFO "AT91: No default serial console defined.\n");
 }
 #else
 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
-void __init at91_set_serial_console(unsigned portnr) {}
 void __init at91_add_device_serial(void) {}
 #endif
 
index ef301be665758763a011d3c4aed827da5dbb6fc2..ed91c7e9f7c20312ccc9f25564187c84f8e118af 100644 (file)
@@ -199,6 +199,16 @@ static struct clk_lookup periph_clocks_lookups[] = {
        CLKDEV_CON_ID("pioC", &pioCDE_clk),
        CLKDEV_CON_ID("pioD", &pioCDE_clk),
        CLKDEV_CON_ID("pioE", &pioCDE_clk),
+       /* more usart lookup table for DT entries */
+       CLKDEV_CON_DEV_ID("usart", "ffffee00.serial", &mck),
+       CLKDEV_CON_DEV_ID("usart", "fff8c000.serial", &usart0_clk),
+       CLKDEV_CON_DEV_ID("usart", "fff90000.serial", &usart1_clk),
+       CLKDEV_CON_DEV_ID("usart", "fff94000.serial", &usart2_clk),
+       /* more tc lookup table for DT entries */
+       CLKDEV_CON_DEV_ID("t0_clk", "fff7c000.timer", &tcb_clk),
+       CLKDEV_CON_DEV_ID("hclk", "a00000.ohci", &ohci_clk),
+       CLKDEV_CON_DEV_ID("spi_clk", "fffa4000.spi", &spi0_clk),
+       CLKDEV_CON_DEV_ID("spi_clk", "fffa8000.spi", &spi1_clk),
 };
 
 static struct clk_lookup usart_clocks_lookups[] = {
@@ -255,18 +265,6 @@ static void __init at91sam9263_register_clocks(void)
        clk_register(&pck3);
 }
 
-static struct clk_lookup console_clock_lookup;
-
-void __init at91sam9263_set_console_clock(int id)
-{
-       if (id >= ARRAY_SIZE(usart_clocks_lookups))
-               return;
-
-       console_clock_lookup.con_id = "usart";
-       console_clock_lookup.clk = usart_clocks_lookups[id].clk;
-       clkdev_add(&console_clock_lookup);
-}
-
 /* --------------------------------------------------------------------
  *  GPIO
  * -------------------------------------------------------------------- */
index fe99206de8802b549dc099b65f3daa62a53f5768..175e0009eaa9b886a90694dcf5cb1d880e2e38ad 100644 (file)
@@ -953,8 +953,25 @@ static struct platform_device at91sam9263_tcb_device = {
        .num_resources  = ARRAY_SIZE(tcb_resources),
 };
 
+#if defined(CONFIG_OF)
+static struct of_device_id tcb_ids[] = {
+       { .compatible = "atmel,at91rm9200-tcb" },
+       { /*sentinel*/ }
+};
+#endif
+
 static void __init at91_add_device_tc(void)
 {
+#if defined(CONFIG_OF)
+       struct device_node *np;
+
+       np = of_find_matching_node(NULL, tcb_ids);
+       if (np) {
+               of_node_put(np);
+               return;
+       }
+#endif
+
        platform_device_register(&at91sam9263_tcb_device);
 }
 #else
@@ -1461,14 +1478,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
                at91_uarts[portnr] = pdev;
 }
 
-void __init at91_set_serial_console(unsigned portnr)
-{
-       if (portnr < ATMEL_MAX_UART) {
-               atmel_default_console_device = at91_uarts[portnr];
-               at91sam9263_set_console_clock(at91_uarts[portnr]->id);
-       }
-}
-
 void __init at91_add_device_serial(void)
 {
        int i;
@@ -1477,13 +1486,9 @@ void __init at91_add_device_serial(void)
                if (at91_uarts[i])
                        platform_device_register(at91_uarts[i]);
        }
-
-       if (!atmel_default_console_device)
-               printk(KERN_INFO "AT91: No default serial console defined.\n");
 }
 #else
 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
-void __init at91_set_serial_console(unsigned portnr) {}
 void __init at91_add_device_serial(void) {}
 #endif
 
@@ -1495,6 +1500,9 @@ void __init at91_add_device_serial(void) {}
  */
 static int __init at91_add_standard_devices(void)
 {
+       if (of_have_populated_dt())
+               return 0;
+
        at91_add_device_rtt();
        at91_add_device_watchdog();
        at91_add_device_tc();
index d222f8333dab8799920b0ce025ff4e334537eb5c..f2054495a655b3285dd90a77c5dfeb6cf2abb629 100644 (file)
@@ -288,18 +288,6 @@ static void __init at91sam9g45_register_clocks(void)
        clk_register(&pck1);
 }
 
-static struct clk_lookup console_clock_lookup;
-
-void __init at91sam9g45_set_console_clock(int id)
-{
-       if (id >= ARRAY_SIZE(usart_clocks_lookups))
-               return;
-
-       console_clock_lookup.con_id = "usart";
-       console_clock_lookup.clk = usart_clocks_lookups[id].clk;
-       clkdev_add(&console_clock_lookup);
-}
-
 /* --------------------------------------------------------------------
  *  GPIO
  * -------------------------------------------------------------------- */
index 6b008aee1dffad648874e6318e397d7d640e2d31..35bd42d02195be3555e4b347fde6de2848bddaa8 100644 (file)
@@ -69,15 +69,7 @@ static struct platform_device at_hdmac_device = {
 
 void __init at91_add_device_hdmac(void)
 {
-#if defined(CONFIG_OF)
-       struct device_node *of_node =
-               of_find_node_by_name(NULL, "dma-controller");
-
-       if (of_node)
-               of_node_put(of_node);
-       else
-#endif
-               platform_device_register(&at_hdmac_device);
+       platform_device_register(&at_hdmac_device);
 }
 #else
 void __init at91_add_device_hdmac(void) {}
@@ -1094,25 +1086,8 @@ static struct platform_device at91sam9g45_tcb1_device = {
        .num_resources  = ARRAY_SIZE(tcb1_resources),
 };
 
-#if defined(CONFIG_OF)
-static struct of_device_id tcb_ids[] = {
-       { .compatible = "atmel,at91rm9200-tcb" },
-       { /*sentinel*/ }
-};
-#endif
-
 static void __init at91_add_device_tc(void)
 {
-#if defined(CONFIG_OF)
-       struct device_node *np;
-
-       np = of_find_matching_node(NULL, tcb_ids);
-       if (np) {
-               of_node_put(np);
-               return;
-       }
-#endif
-
        platform_device_register(&at91sam9g45_tcb0_device);
        platform_device_register(&at91sam9g45_tcb1_device);
 }
@@ -1741,14 +1716,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
                at91_uarts[portnr] = pdev;
 }
 
-void __init at91_set_serial_console(unsigned portnr)
-{
-       if (portnr < ATMEL_MAX_UART) {
-               atmel_default_console_device = at91_uarts[portnr];
-               at91sam9g45_set_console_clock(at91_uarts[portnr]->id);
-       }
-}
-
 void __init at91_add_device_serial(void)
 {
        int i;
@@ -1757,13 +1724,9 @@ void __init at91_add_device_serial(void)
                if (at91_uarts[i])
                        platform_device_register(at91_uarts[i]);
        }
-
-       if (!atmel_default_console_device)
-               printk(KERN_INFO "AT91: No default serial console defined.\n");
 }
 #else
 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
-void __init at91_set_serial_console(unsigned portnr) {}
 void __init at91_add_device_serial(void) {}
 #endif
 
@@ -1775,6 +1738,9 @@ void __init at91_add_device_serial(void) {}
  */
 static int __init at91_add_standard_devices(void)
 {
+       if (of_have_populated_dt())
+               return 0;
+
        at91_add_device_hdmac();
        at91_add_device_rtc();
        at91_add_device_rtt();
diff --git a/arch/arm/mach-at91/at91sam9n12.c b/arch/arm/mach-at91/at91sam9n12.c
new file mode 100644 (file)
index 0000000..0849466
--- /dev/null
@@ -0,0 +1,233 @@
+/*
+ * SoC specific setup code for the AT91SAM9N12
+ *
+ * Copyright (C) 2012 Atmel Corporation.
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+#include <linux/module.h>
+#include <linux/dma-mapping.h>
+
+#include <asm/irq.h>
+#include <asm/mach/arch.h>
+#include <asm/mach/map.h>
+#include <mach/at91sam9n12.h>
+#include <mach/at91_pmc.h>
+#include <mach/cpu.h>
+#include <mach/board.h>
+
+#include "soc.h"
+#include "generic.h"
+#include "clock.h"
+#include "sam9_smc.h"
+
+/* --------------------------------------------------------------------
+ *  Clocks
+ * -------------------------------------------------------------------- */
+
+/*
+ * The peripheral clocks.
+ */
+static struct clk pioAB_clk = {
+       .name           = "pioAB_clk",
+       .pmc_mask       = 1 << AT91SAM9N12_ID_PIOAB,
+       .type           = CLK_TYPE_PERIPHERAL,
+};
+static struct clk pioCD_clk = {
+       .name           = "pioCD_clk",
+       .pmc_mask       = 1 << AT91SAM9N12_ID_PIOCD,
+       .type           = CLK_TYPE_PERIPHERAL,
+};
+static struct clk usart0_clk = {
+       .name           = "usart0_clk",
+       .pmc_mask       = 1 << AT91SAM9N12_ID_USART0,
+       .type           = CLK_TYPE_PERIPHERAL,
+};
+static struct clk usart1_clk = {
+       .name           = "usart1_clk",
+       .pmc_mask       = 1 << AT91SAM9N12_ID_USART1,
+       .type           = CLK_TYPE_PERIPHERAL,
+};
+static struct clk usart2_clk = {
+       .name           = "usart2_clk",
+       .pmc_mask       = 1 << AT91SAM9N12_ID_USART2,
+       .type           = CLK_TYPE_PERIPHERAL,
+};
+static struct clk usart3_clk = {
+       .name           = "usart3_clk",
+       .pmc_mask       = 1 << AT91SAM9N12_ID_USART3,
+       .type           = CLK_TYPE_PERIPHERAL,
+};
+static struct clk twi0_clk = {
+       .name           = "twi0_clk",
+       .pmc_mask       = 1 << AT91SAM9N12_ID_TWI0,
+       .type           = CLK_TYPE_PERIPHERAL,
+};
+static struct clk twi1_clk = {
+       .name           = "twi1_clk",
+       .pmc_mask       = 1 << AT91SAM9N12_ID_TWI1,
+       .type           = CLK_TYPE_PERIPHERAL,
+};
+static struct clk mmc_clk = {
+       .name           = "mci_clk",
+       .pmc_mask       = 1 << AT91SAM9N12_ID_MCI,
+       .type           = CLK_TYPE_PERIPHERAL,
+};
+static struct clk spi0_clk = {
+       .name           = "spi0_clk",
+       .pmc_mask       = 1 << AT91SAM9N12_ID_SPI0,
+       .type           = CLK_TYPE_PERIPHERAL,
+};
+static struct clk spi1_clk = {
+       .name           = "spi1_clk",
+       .pmc_mask       = 1 << AT91SAM9N12_ID_SPI1,
+       .type           = CLK_TYPE_PERIPHERAL,
+};
+static struct clk uart0_clk = {
+       .name           = "uart0_clk",
+       .pmc_mask       = 1 << AT91SAM9N12_ID_UART0,
+       .type           = CLK_TYPE_PERIPHERAL,
+};
+static struct clk uart1_clk = {
+       .name           = "uart1_clk",
+       .pmc_mask       = 1 << AT91SAM9N12_ID_UART1,
+       .type           = CLK_TYPE_PERIPHERAL,
+};
+static struct clk tcb_clk = {
+       .name           = "tcb_clk",
+       .pmc_mask       = 1 << AT91SAM9N12_ID_TCB,
+       .type           = CLK_TYPE_PERIPHERAL,
+};
+static struct clk pwm_clk = {
+       .name           = "pwm_clk",
+       .pmc_mask       = 1 << AT91SAM9N12_ID_PWM,
+       .type           = CLK_TYPE_PERIPHERAL,
+};
+static struct clk adc_clk = {
+       .name           = "adc_clk",
+       .pmc_mask       = 1 << AT91SAM9N12_ID_ADC,
+       .type   = CLK_TYPE_PERIPHERAL,
+};
+static struct clk dma_clk = {
+       .name           = "dma_clk",
+       .pmc_mask       = 1 << AT91SAM9N12_ID_DMA,
+       .type   = CLK_TYPE_PERIPHERAL,
+};
+static struct clk uhp_clk = {
+       .name           = "uhp",
+       .pmc_mask       = 1 << AT91SAM9N12_ID_UHP,
+       .type           = CLK_TYPE_PERIPHERAL,
+};
+static struct clk udp_clk = {
+       .name           = "udp_clk",
+       .pmc_mask       = 1 << AT91SAM9N12_ID_UDP,
+       .type           = CLK_TYPE_PERIPHERAL,
+};
+static struct clk lcdc_clk = {
+       .name           = "lcdc_clk",
+       .pmc_mask       = 1 << AT91SAM9N12_ID_LCDC,
+       .type           = CLK_TYPE_PERIPHERAL,
+};
+static struct clk ssc_clk = {
+       .name           = "ssc_clk",
+       .pmc_mask       = 1 << AT91SAM9N12_ID_SSC,
+       .type           = CLK_TYPE_PERIPHERAL,
+};
+
+static struct clk *periph_clocks[] __initdata = {
+       &pioAB_clk,
+       &pioCD_clk,
+       &usart0_clk,
+       &usart1_clk,
+       &usart2_clk,
+       &usart3_clk,
+       &twi0_clk,
+       &twi1_clk,
+       &mmc_clk,
+       &spi0_clk,
+       &spi1_clk,
+       &lcdc_clk,
+       &uart0_clk,
+       &uart1_clk,
+       &tcb_clk,
+       &pwm_clk,
+       &adc_clk,
+       &dma_clk,
+       &uhp_clk,
+       &udp_clk,
+       &ssc_clk,
+};
+
+static struct clk_lookup periph_clocks_lookups[] = {
+       /* lookup table for DT entries */
+       CLKDEV_CON_DEV_ID("usart", "fffff200.serial", &mck),
+       CLKDEV_CON_DEV_ID("usart", "f801c000.serial", &usart0_clk),
+       CLKDEV_CON_DEV_ID("usart", "f8020000.serial", &usart1_clk),
+       CLKDEV_CON_DEV_ID("usart", "f8024000.serial", &usart2_clk),
+       CLKDEV_CON_DEV_ID("usart", "f8028000.serial", &usart3_clk),
+       CLKDEV_CON_DEV_ID("t0_clk", "f8008000.timer", &tcb_clk),
+       CLKDEV_CON_DEV_ID("t0_clk", "f800c000.timer", &tcb_clk),
+       CLKDEV_CON_DEV_ID("dma_clk", "ffffec00.dma-controller", &dma_clk),
+       CLKDEV_CON_ID("pioA", &pioAB_clk),
+       CLKDEV_CON_ID("pioB", &pioAB_clk),
+       CLKDEV_CON_ID("pioC", &pioCD_clk),
+       CLKDEV_CON_ID("pioD", &pioCD_clk),
+       /* additional fake clock for macb_hclk */
+       CLKDEV_CON_DEV_ID("hclk", "500000.ohci", &uhp_clk),
+       CLKDEV_CON_DEV_ID("ohci_clk", "500000.ohci", &uhp_clk),
+};
+
+/*
+ * The two programmable clocks.
+ * You must configure pin multiplexing to bring these signals out.
+ */
+static struct clk pck0 = {
+       .name           = "pck0",
+       .pmc_mask       = AT91_PMC_PCK0,
+       .type           = CLK_TYPE_PROGRAMMABLE,
+       .id             = 0,
+};
+static struct clk pck1 = {
+       .name           = "pck1",
+       .pmc_mask       = AT91_PMC_PCK1,
+       .type           = CLK_TYPE_PROGRAMMABLE,
+       .id             = 1,
+};
+
+static void __init at91sam9n12_register_clocks(void)
+{
+       int i;
+
+       for (i = 0; i < ARRAY_SIZE(periph_clocks); i++)
+               clk_register(periph_clocks[i]);
+       clk_register(&pck0);
+       clk_register(&pck1);
+
+       clkdev_add_table(periph_clocks_lookups,
+                        ARRAY_SIZE(periph_clocks_lookups));
+
+}
+
+/* --------------------------------------------------------------------
+ *  AT91SAM9N12 processor initialization
+ * -------------------------------------------------------------------- */
+
+static void __init at91sam9n12_map_io(void)
+{
+       at91_init_sram(0, AT91SAM9N12_SRAM_BASE, AT91SAM9N12_SRAM_SIZE);
+}
+
+void __init at91sam9n12_initialize(void)
+{
+       at91_extern_irq = (1 << AT91SAM9N12_ID_IRQ0);
+
+       /* Register GPIO subsystem (using DT) */
+       at91_gpio_init(NULL, 0);
+}
+
+struct at91_init_soc __initdata at91sam9n12_soc = {
+       .map_io = at91sam9n12_map_io,
+       .register_clocks = at91sam9n12_register_clocks,
+       .init = at91sam9n12_initialize,
+};
index d9f2774f385eb68fffc337050602592d7bcd07e9..e420085a57effa34a373b3aeeaca91185f248109 100644 (file)
@@ -232,18 +232,6 @@ static void __init at91sam9rl_register_clocks(void)
        clk_register(&pck1);
 }
 
-static struct clk_lookup console_clock_lookup;
-
-void __init at91sam9rl_set_console_clock(int id)
-{
-       if (id >= ARRAY_SIZE(usart_clocks_lookups))
-               return;
-
-       console_clock_lookup.con_id = "usart";
-       console_clock_lookup.clk = usart_clocks_lookups[id].clk;
-       clkdev_add(&console_clock_lookup);
-}
-
 /* --------------------------------------------------------------------
  *  GPIO
  * -------------------------------------------------------------------- */
index fe4ae22e8561bc9084b9d64870d063cfca88ed9a..9c0b1481a9a70c5d3ac6ebfc199c5d2e77ba1f46 100644 (file)
@@ -1192,14 +1192,6 @@ void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins)
                at91_uarts[portnr] = pdev;
 }
 
-void __init at91_set_serial_console(unsigned portnr)
-{
-       if (portnr < ATMEL_MAX_UART) {
-               atmel_default_console_device = at91_uarts[portnr];
-               at91sam9rl_set_console_clock(at91_uarts[portnr]->id);
-       }
-}
-
 void __init at91_add_device_serial(void)
 {
        int i;
@@ -1208,13 +1200,9 @@ void __init at91_add_device_serial(void)
                if (at91_uarts[i])
                        platform_device_register(at91_uarts[i]);
        }
-
-       if (!atmel_default_console_device)
-               printk(KERN_INFO "AT91: No default serial console defined.\n");
 }
 #else
 void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins) {}
-void __init at91_set_serial_console(unsigned portnr) {}
 void __init at91_add_device_serial(void) {}
 #endif
 
index 2628384aaae1fd034219a258ebfe16892b553955..271f994314a469807f2d328f4c75418534d699dc 100644 (file)
@@ -47,20 +47,6 @@ static void __init onearm_init_early(void)
 
        /* Initialize processor: 18.432 MHz crystal */
        at91_initialize(18432000);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */
-       at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
-
-       /* USART1 on ttyS2 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
-       at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS
-                          | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
-                          | ATMEL_UART_RI);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 static struct macb_platform_data __initdata onearm_eth_data = {
@@ -82,6 +68,16 @@ static struct at91_udc_data __initdata onearm_udc_data = {
 static void __init onearm_board_init(void)
 {
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */
+       at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
+
+       /* USART1 on ttyS2 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+       at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS
+                          | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
+                          | ATMEL_UART_RI);
        at91_add_device_serial();
        /* Ethernet */
        at91_add_device_eth(&onearm_eth_data);
index 161efbaa10290fe31bb10e7f88692f6842fad231..b7d8aa7b81e64baa60d6ea772a74a52c471d5228 100644 (file)
@@ -52,22 +52,6 @@ static void __init afeb9260_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
        at91_initialize(18432000);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
-       at91_register_uart(AT91SAM9260_ID_US0, 1,
-                            ATMEL_UART_CTS | ATMEL_UART_RTS
-                          | ATMEL_UART_DTR | ATMEL_UART_DSR
-                          | ATMEL_UART_DCD | ATMEL_UART_RI);
-
-       /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
-       at91_register_uart(AT91SAM9260_ID_US1, 2,
-                       ATMEL_UART_CTS | ATMEL_UART_RTS);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 /*
@@ -183,6 +167,18 @@ static struct at91_cf_data afeb9260_cf_data = {
 static void __init afeb9260_board_init(void)
 {
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+       at91_register_uart(AT91SAM9260_ID_US0, 1,
+                            ATMEL_UART_CTS | ATMEL_UART_RTS
+                          | ATMEL_UART_DTR | ATMEL_UART_DSR
+                          | ATMEL_UART_DCD | ATMEL_UART_RI);
+
+       /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
+       at91_register_uart(AT91SAM9260_ID_US1, 2,
+                       ATMEL_UART_CTS | ATMEL_UART_RTS);
        at91_add_device_serial();
        /* USB Host */
        at91_add_device_usbh(&afeb9260_usbh_data);
index c6d44ee0c77e7ad053267b4114ed04b1d73d8dfd..29d3ef0a50fb9901ed71d6c27f7dd6de819950e8 100644 (file)
@@ -49,12 +49,6 @@ static void __init cam60_init_early(void)
 {
        /* Initialize processor: 10 MHz crystal */
        at91_initialize(10000000);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 /*
@@ -175,6 +169,8 @@ static void __init cam60_add_device_nand(void)
 static void __init cam60_board_init(void)
 {
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
        at91_add_device_serial();
        /* SPI */
        at91_add_device_spi(cam60_spi_devices, ARRAY_SIZE(cam60_spi_devices));
index 59d9cf997537c6b62324d7f34dff1eb7ed45685f..44328a6d46095027b75f903a11b7ec611c9043f5 100644 (file)
@@ -44,17 +44,6 @@ static void __init carmeva_init_early(void)
 {
        /* Initialize processor: 20.000 MHz crystal */
        at91_initialize(20000000);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
-       at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
-                          | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
-                          | ATMEL_UART_RI);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 static struct macb_platform_data __initdata carmeva_eth_data = {
@@ -139,6 +128,13 @@ static struct gpio_led carmeva_leds[] = {
 static void __init carmeva_board_init(void)
 {
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+       at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
+                          | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
+                          | ATMEL_UART_RI);
        at91_add_device_serial();
        /* Ethernet */
        at91_add_device_eth(&carmeva_eth_data);
index 5f3680e7c883e3a4e50b60ec22a5e283ecd78ed2..69951ec7dbf310dd5a4d800c90d9ae5dcc6adcff 100644 (file)
@@ -52,34 +52,6 @@ static void __init cpu9krea_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
        at91_initialize(18432000);
-
-       /* DGBU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
-       at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS |
-               ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR |
-               ATMEL_UART_DCD | ATMEL_UART_RI);
-
-       /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
-       at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS |
-               ATMEL_UART_RTS);
-
-       /* USART2 on ttyS3. (Rx, Tx, RTS, CTS) */
-       at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS |
-               ATMEL_UART_RTS);
-
-       /* USART3 on ttyS4. (Rx, Tx) */
-       at91_register_uart(AT91SAM9260_ID_US3, 4, 0);
-
-       /* USART4 on ttyS5. (Rx, Tx) */
-       at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
-
-       /* USART5 on ttyS6. (Rx, Tx) */
-       at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 /*
@@ -352,6 +324,30 @@ static void __init cpu9krea_board_init(void)
        /* NOR */
        cpu9krea_add_device_nor();
        /* Serial */
+       /* DGBU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+       at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS |
+               ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR |
+               ATMEL_UART_DCD | ATMEL_UART_RI);
+
+       /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
+       at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS |
+               ATMEL_UART_RTS);
+
+       /* USART2 on ttyS3. (Rx, Tx, RTS, CTS) */
+       at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS |
+               ATMEL_UART_RTS);
+
+       /* USART3 on ttyS4. (Rx, Tx) */
+       at91_register_uart(AT91SAM9260_ID_US3, 4, 0);
+
+       /* USART4 on ttyS5. (Rx, Tx) */
+       at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
+
+       /* USART5 on ttyS6. (Rx, Tx) */
+       at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
        at91_add_device_serial();
        /* USB Host */
        at91_add_device_usbh(&cpu9krea_usbh_data);
index e094cc81fe251d099fc31ceef5af8d9d2bfe1dd0..895cf2dba612fe3a6c1ec0212ce7d1c45ff127cb 100644 (file)
@@ -59,28 +59,6 @@ static void __init cpuat91_init_early(void)
 
        /* Initialize processor: 18.432 MHz crystal */
        at91_initialize(18432000);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */
-       at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS |
-               ATMEL_UART_RTS);
-
-       /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
-       at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS |
-               ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR |
-               ATMEL_UART_DCD | ATMEL_UART_RI);
-
-       /* USART2 on ttyS3 (Rx, Tx) */
-       at91_register_uart(AT91RM9200_ID_US2, 3, 0);
-
-       /* USART3 on ttyS4 (Rx, Tx, CTS, RTS) */
-       at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_CTS |
-               ATMEL_UART_RTS);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 static struct macb_platform_data __initdata cpuat91_eth_data = {
@@ -161,6 +139,24 @@ static struct platform_device *platform_devices[] __initdata = {
 static void __init cpuat91_board_init(void)
 {
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */
+       at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS |
+               ATMEL_UART_RTS);
+
+       /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+       at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS |
+               ATMEL_UART_RTS | ATMEL_UART_DTR | ATMEL_UART_DSR |
+               ATMEL_UART_DCD | ATMEL_UART_RI);
+
+       /* USART2 on ttyS3 (Rx, Tx) */
+       at91_register_uart(AT91RM9200_ID_US2, 3, 0);
+
+       /* USART3 on ttyS4 (Rx, Tx, CTS, RTS) */
+       at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_CTS |
+               ATMEL_UART_RTS);
        at91_add_device_serial();
        /* LEDs. */
        at91_gpio_leds(cpuat91_leds, ARRAY_SIZE(cpuat91_leds));
index 1a1547b1ce4e61182e2cb2e069dd803ef43e9e19..cd813361cd26be2d61a49de0f536f3be0ac1059d 100644 (file)
@@ -47,15 +47,6 @@ static void __init csb337_init_early(void)
 {
        /* Initialize processor: 3.6864 MHz crystal */
        at91_initialize(3686400);
-
-       /* Setup the LEDs */
-       at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
-
-       /* DBGU on ttyS0 */
-       at91_register_uart(0, 0, 0);
-
-       /* make console=ttyS0 the default */
-       at91_set_serial_console(0);
 }
 
 static struct macb_platform_data __initdata csb337_eth_data = {
@@ -228,7 +219,11 @@ static struct gpio_led csb_leds[] = {
 
 static void __init csb337_board_init(void)
 {
+       /* Setup the LEDs */
+       at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
        /* Serial */
+       /* DBGU on ttyS0 */
+       at91_register_uart(0, 0, 0);
        at91_add_device_serial();
        /* Ethernet */
        at91_add_device_eth(&csb337_eth_data);
index f650bf39455ddc26070bdcfe96663da074feec73..7c8b05a57d7f5f9460e436f338b23668fe7ec577 100644 (file)
@@ -44,12 +44,6 @@ static void __init csb637_init_early(void)
 {
        /* Initialize processor: 3.6864 MHz crystal */
        at91_initialize(3686400);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* make console=ttyS0 (ie, DBGU) the default */
-       at91_set_serial_console(0);
 }
 
 static struct macb_platform_data __initdata csb637_eth_data = {
@@ -118,6 +112,8 @@ static void __init csb637_board_init(void)
        /* LED(s) */
        at91_gpio_leds(csb_leds, ARRAY_SIZE(csb_leds));
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
        at91_add_device_serial();
        /* Ethernet */
        at91_add_device_eth(&csb637_eth_data);
index c18d4d3078012d584ec75aa927bcbebe8a1b4a23..a1fce05aa7a5f7b64e8889f348934d3f75e5ee8a 100644 (file)
@@ -1,10 +1,6 @@
 /*
  *  Setup code for AT91SAM Evaluation Kits with Device Tree support
  *
- *  Covers: * AT91SAM9G45-EKES  board
- *          * AT91SAM9M10-EKES  board
- *          * AT91SAM9M10G45-EK board
- *
  *  Copyright (C) 2011 Atmel,
  *                2011 Nicolas Ferre <nicolas.ferre@atmel.com>
  *
@@ -49,9 +45,7 @@ static void __init at91_dt_device_init(void)
 }
 
 static const char *at91_dt_board_compat[] __initdata = {
-       "atmel,at91sam9m10g45ek",
-       "atmel,at91sam9x5ek",
-       "calao,usb-a9g20",
+       "atmel,at91sam9",
        NULL
 };
 
index d302ca3eeb645f73340f4dc157a77c163a62e044..bd10172979891c1aab6b139496b068500eedc30b 100644 (file)
@@ -44,20 +44,6 @@ static void __init eb9200_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
        at91_initialize(18432000);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
-       at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
-                       | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
-                       | ATMEL_UART_RI);
-
-       /* USART2 on ttyS2. (Rx, Tx) - IRDA */
-       at91_register_uart(AT91RM9200_ID_US2, 2, 0);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 static struct macb_platform_data __initdata eb9200_eth_data = {
@@ -101,6 +87,16 @@ static struct i2c_board_info __initdata eb9200_i2c_devices[] = {
 static void __init eb9200_board_init(void)
 {
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+       at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
+                       | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
+                       | ATMEL_UART_RI);
+
+       /* USART2 on ttyS2. (Rx, Tx) - IRDA */
+       at91_register_uart(AT91RM9200_ID_US2, 2, 0);
        at91_add_device_serial();
        /* Ethernet */
        at91_add_device_eth(&eb9200_eth_data);
index 69966ce4d776d6f5a62cb1de7d91affb456717bc..89cc3726a9ce1f3b57f5c589b5d495d1a6c5d4db 100644 (file)
@@ -50,18 +50,6 @@ static void __init ecb_at91init_early(void)
 
        /* Initialize processor: 18.432 MHz crystal */
        at91_initialize(18432000);
-
-       /* Setup the LEDs */
-       at91_init_leds(AT91_PIN_PC7, AT91_PIN_PC7);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART0 on ttyS1. (Rx & Tx only) */
-       at91_register_uart(AT91RM9200_ID_US0, 1, 0);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 static struct macb_platform_data __initdata ecb_at91eth_data = {
@@ -151,7 +139,15 @@ static struct spi_board_info __initdata ecb_at91spi_devices[] = {
 
 static void __init ecb_at91board_init(void)
 {
+       /* Setup the LEDs */
+       at91_init_leds(AT91_PIN_PC7, AT91_PIN_PC7);
+
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART0 on ttyS1. (Rx & Tx only) */
+       at91_register_uart(AT91RM9200_ID_US0, 1, 0);
        at91_add_device_serial();
 
        /* Ethernet */
index f23aabef8551d69fc395dcf88b5eabdf152fe2f8..558546cf63f492bf46d5b290b389e019f428244a 100644 (file)
@@ -37,15 +37,6 @@ static void __init eco920_init_early(void)
        at91rm9200_set_type(ARCH_REVISON_9200_PQFP);
 
        at91_initialize(18432000);
-
-       /* Setup the LEDs */
-       at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
-
-       /* DBGU on ttyS0. (Rx & Tx only */
-       at91_register_uart(0, 0, 0);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 static struct macb_platform_data __initdata eco920_eth_data = {
@@ -103,6 +94,10 @@ static struct spi_board_info eco920_spi_devices[] = {
 
 static void __init eco920_board_init(void)
 {
+       /* Setup the LEDs */
+       at91_init_leds(AT91_PIN_PB0, AT91_PIN_PB1);
+       /* DBGU on ttyS0. (Rx & Tx only */
+       at91_register_uart(0, 0, 0);
        at91_add_device_serial();
        at91_add_device_eth(&eco920_eth_data);
        at91_add_device_usbh(&eco920_usbh_data);
index 1815152001f74c62d3d4dd409252a2c81aa197b0..47658f78105db41fad698b7d438444f60c8f6cbf 100644 (file)
@@ -41,12 +41,6 @@ static void __init flexibity_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
        at91_initialize(18432000);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 /* USB Host port */
@@ -143,6 +137,8 @@ static struct gpio_led flexibity_leds[] = {
 static void __init flexibity_board_init(void)
 {
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
        at91_add_device_serial();
        /* USB Host */
        at91_add_device_usbh(&flexibity_usbh_data);
index caf017f0f4ee3920e56280b9b89c3541bcde4751..33411e6ecb1f1747f7431721003e4b722218bf57 100644 (file)
@@ -61,44 +61,6 @@ static void __init foxg20_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
        at91_initialize(18432000);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
-       at91_register_uart(AT91SAM9260_ID_US0, 1,
-                               ATMEL_UART_CTS
-                               | ATMEL_UART_RTS
-                               | ATMEL_UART_DTR
-                               | ATMEL_UART_DSR
-                               | ATMEL_UART_DCD
-                               | ATMEL_UART_RI);
-
-       /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
-       at91_register_uart(AT91SAM9260_ID_US1, 2,
-               ATMEL_UART_CTS
-               | ATMEL_UART_RTS);
-
-       /* USART2 on ttyS3. (Rx & Tx only) */
-       at91_register_uart(AT91SAM9260_ID_US2, 3, 0);
-
-       /* USART3 on ttyS4. (Rx, Tx, RTS, CTS) */
-       at91_register_uart(AT91SAM9260_ID_US3, 4,
-               ATMEL_UART_CTS
-               | ATMEL_UART_RTS);
-
-       /* USART4 on ttyS5. (Rx & Tx only) */
-       at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
-
-       /* USART5 on ttyS6. (Rx & Tx only) */
-       at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
-
-       /* Set the internal pull-up resistor on DRXD */
-       at91_set_A_periph(AT91_PIN_PB14, 1);
-
 }
 
 /*
@@ -241,6 +203,39 @@ static struct i2c_board_info __initdata foxg20_i2c_devices[] = {
 static void __init foxg20_board_init(void)
 {
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+       at91_register_uart(AT91SAM9260_ID_US0, 1,
+                               ATMEL_UART_CTS
+                               | ATMEL_UART_RTS
+                               | ATMEL_UART_DTR
+                               | ATMEL_UART_DSR
+                               | ATMEL_UART_DCD
+                               | ATMEL_UART_RI);
+
+       /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
+       at91_register_uart(AT91SAM9260_ID_US1, 2,
+               ATMEL_UART_CTS
+               | ATMEL_UART_RTS);
+
+       /* USART2 on ttyS3. (Rx & Tx only) */
+       at91_register_uart(AT91SAM9260_ID_US2, 3, 0);
+
+       /* USART3 on ttyS4. (Rx, Tx, RTS, CTS) */
+       at91_register_uart(AT91SAM9260_ID_US3, 4,
+               ATMEL_UART_CTS
+               | ATMEL_UART_RTS);
+
+       /* USART4 on ttyS5. (Rx & Tx only) */
+       at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
+
+       /* USART5 on ttyS6. (Rx & Tx only) */
+       at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
+
+       /* Set the internal pull-up resistor on DRXD */
+       at91_set_A_periph(AT91_PIN_PB14, 1);
        at91_add_device_serial();
        /* USB Host */
        at91_add_device_usbh(&foxg20_usbh_data);
index 230e71969fb76c03f0554f12a3a409d037314589..3e0dfa643a86e1714ad627638667a9df713375a7 100644 (file)
 static void __init gsia18s_init_early(void)
 {
        stamp9g20_init_early();
-
-       /*
-        * USART0 on ttyS1 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI).
-        * Used for Internal Analog Modem.
-        */
-       at91_register_uart(AT91SAM9260_ID_US0, 1,
-                               ATMEL_UART_CTS | ATMEL_UART_RTS |
-                               ATMEL_UART_DTR | ATMEL_UART_DSR |
-                               ATMEL_UART_DCD | ATMEL_UART_RI);
-       /*
-        * USART1 on ttyS2 (Rx, Tx, CTS, RTS).
-        * Used for GPS or WiFi or Data stream.
-        */
-       at91_register_uart(AT91SAM9260_ID_US1, 2,
-                               ATMEL_UART_CTS | ATMEL_UART_RTS);
-       /*
-        * USART2 on ttyS3 (Rx, Tx, CTS, RTS).
-        * Used for External Modem.
-        */
-       at91_register_uart(AT91SAM9260_ID_US2, 3,
-                               ATMEL_UART_CTS | ATMEL_UART_RTS);
-       /*
-        * USART3 on ttyS4 (Rx, Tx, RTS).
-        * Used for RS-485.
-        */
-       at91_register_uart(AT91SAM9260_ID_US3, 4, ATMEL_UART_RTS);
-
-       /*
-        * USART4 on ttyS5 (Rx, Tx).
-        * Used for TRX433 Radio Module.
-        */
-       at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
 }
 
 /*
@@ -558,6 +526,37 @@ static int __init gsia18s_power_off_init(void)
 
 static void __init gsia18s_board_init(void)
 {
+       /*
+        * USART0 on ttyS1 (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI).
+        * Used for Internal Analog Modem.
+        */
+       at91_register_uart(AT91SAM9260_ID_US0, 1,
+                               ATMEL_UART_CTS | ATMEL_UART_RTS |
+                               ATMEL_UART_DTR | ATMEL_UART_DSR |
+                               ATMEL_UART_DCD | ATMEL_UART_RI);
+       /*
+        * USART1 on ttyS2 (Rx, Tx, CTS, RTS).
+        * Used for GPS or WiFi or Data stream.
+        */
+       at91_register_uart(AT91SAM9260_ID_US1, 2,
+                               ATMEL_UART_CTS | ATMEL_UART_RTS);
+       /*
+        * USART2 on ttyS3 (Rx, Tx, CTS, RTS).
+        * Used for External Modem.
+        */
+       at91_register_uart(AT91SAM9260_ID_US2, 3,
+                               ATMEL_UART_CTS | ATMEL_UART_RTS);
+       /*
+        * USART3 on ttyS4 (Rx, Tx, RTS).
+        * Used for RS-485.
+        */
+       at91_register_uart(AT91SAM9260_ID_US3, 4, ATMEL_UART_RTS);
+
+       /*
+        * USART4 on ttyS5 (Rx, Tx).
+        * Used for TRX433 Radio Module.
+        */
+       at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
        stamp9g20_board_init();
        at91_add_device_usbh(&usbh_data);
        at91_add_device_udc(&udc_data);
index efde1b2327c8ab839c518b2cc3a7ce6b0a8517a9..f260657f32bcf5881b3d2aa98fa9d442f992a4df 100644 (file)
@@ -47,18 +47,6 @@ static void __init kafa_init_early(void)
 
        /* Initialize processor: 18.432 MHz crystal */
        at91_initialize(18432000);
-
-       /* Set up the LEDs */
-       at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */
-       at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 static struct macb_platform_data __initdata kafa_eth_data = {
@@ -79,7 +67,15 @@ static struct at91_udc_data __initdata kafa_udc_data = {
 
 static void __init kafa_board_init(void)
 {
+       /* Set up the LEDs */
+       at91_init_leds(AT91_PIN_PB4, AT91_PIN_PB4);
+
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART0 on ttyS1 (Rx, Tx, CTS, RTS) */
+       at91_register_uart(AT91RM9200_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
        at91_add_device_serial();
        /* Ethernet */
        at91_add_device_eth(&kafa_eth_data);
index 59b92aab9bcf8eb94a52d9806716995160f3bbe1..ba39db5482b955617689e7f65adb39e245915738 100644 (file)
@@ -50,24 +50,6 @@ static void __init kb9202_init_early(void)
 
        /* Initialize processor: 10 MHz crystal */
        at91_initialize(10000000);
-
-       /* Set up the LEDs */
-       at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART0 on ttyS1 (Rx & Tx only) */
-       at91_register_uart(AT91RM9200_ID_US0, 1, 0);
-
-       /* USART1 on ttyS2 (Rx & Tx only) - IRDA (optional) */
-       at91_register_uart(AT91RM9200_ID_US1, 2, 0);
-
-       /* USART3 on ttyS3 (Rx, Tx, CTS, RTS) - RS485 (optional) */
-       at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 static struct macb_platform_data __initdata kb9202_eth_data = {
@@ -115,7 +97,21 @@ static struct atmel_nand_data __initdata kb9202_nand_data = {
 
 static void __init kb9202_board_init(void)
 {
+       /* Set up the LEDs */
+       at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18);
+
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART0 on ttyS1 (Rx & Tx only) */
+       at91_register_uart(AT91RM9200_ID_US0, 1, 0);
+
+       /* USART1 on ttyS2 (Rx & Tx only) - IRDA (optional) */
+       at91_register_uart(AT91RM9200_ID_US1, 2, 0);
+
+       /* USART3 on ttyS3 (Rx, Tx, CTS, RTS) - RS485 (optional) */
+       at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);
        at91_add_device_serial();
        /* Ethernet */
        at91_add_device_eth(&kb9202_eth_data);
index 57d5f6a4726a5b38fead2eebd2b567c02b72e3eb..d2f4cc1617669e9d92729c47dde9d6c1bc84a0cf 100644 (file)
@@ -55,15 +55,6 @@ static void __init neocore926_init_early(void)
 {
        /* Initialize processor: 20 MHz crystal */
        at91_initialize(20000000);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */
-       at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 /*
@@ -341,6 +332,11 @@ static struct ac97c_platform_data neocore926_ac97_data = {
 static void __init neocore926_board_init(void)
 {
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */
+       at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
        at91_add_device_serial();
 
        /* USB Host */
index b4a12fc184c80078e93877795fffec2a38c19bf3..7fe6383424213a173a9f5553077f3c468aff8945 100644 (file)
 static void __init pcontrol_g20_init_early(void)
 {
        stamp9g20_init_early();
-
-       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) piggyback  A2 */
-       at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS
-                                               | ATMEL_UART_RTS);
-
-       /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) isolated RS485  X5 */
-       at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS
-                                               | ATMEL_UART_RTS);
-
-       /* USART2 on ttyS3. (Rx, Tx)  9bit-Bus  Multidrop-mode  X4 */
-       at91_register_uart(AT91SAM9260_ID_US4, 3, 0);
 }
 
 static struct sam9_smc_config __initdata pcontrol_smc_config[2] = { {
@@ -199,6 +188,16 @@ static struct spi_board_info pcontrol_g20_spi_devices[] = {
 
 static void __init pcontrol_g20_board_init(void)
 {
+       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) piggyback  A2 */
+       at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS
+                                               | ATMEL_UART_RTS);
+
+       /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) isolated RS485  X5 */
+       at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS
+                                               | ATMEL_UART_RTS);
+
+       /* USART2 on ttyS3. (Rx, Tx)  9bit-Bus  Multidrop-mode  X4 */
+       at91_register_uart(AT91SAM9260_ID_US4, 3, 0);
        stamp9g20_board_init();
        at91_add_device_usbh(&usbh_data);
        at91_add_device_eth(&macb_data);
index 59e35dd1486301b556f20befed659a5bea9525b2..b45c0a5d5ca7649c745d4718a329d0ee65fbdf20 100644 (file)
@@ -48,17 +48,6 @@ static void __init picotux200_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
        at91_initialize(18432000);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
-       at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
-                         | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
-                         | ATMEL_UART_RI);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 static struct macb_platform_data __initdata picotux200_eth_data = {
@@ -106,6 +95,13 @@ static struct platform_device picotux200_flash = {
 static void __init picotux200_board_init(void)
 {
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+       at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
+                         | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
+                         | ATMEL_UART_RI);
        at91_add_device_serial();
        /* Ethernet */
        at91_add_device_eth(&picotux200_eth_data);
index b6ed5ed7081ac9d514336a19f3ca668ce8776d5e..0c61bf0d272c3b02215da56a7cfbdf7c2ce6a0fd 100644 (file)
@@ -52,24 +52,6 @@ static void __init ek_init_early(void)
 {
        /* Initialize processor: 12.000 MHz crystal */
        at91_initialize(12000000);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
-       at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
-                          | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
-                          | ATMEL_UART_RI);
-
-       /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */
-       at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
-
-       /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */
-       at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);
-
-       /* set serial console to ttyS1 (ie, USART0) */
-       at91_set_serial_console(1);
-
 }
 
 /*
@@ -235,6 +217,19 @@ static struct gpio_led ek_leds[] = {
 static void __init ek_board_init(void)
 {
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+       at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
+                          | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
+                          | ATMEL_UART_RI);
+
+       /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */
+       at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
+
+       /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */
+       at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);
        at91_add_device_serial();
        /* USB Host */
        at91_add_device_usbh(&ek_usbh_data);
index 01332aa538b2a00cb4a7e38207abd1a387e87ec7..afd7a4713766cec538c1736daf0895f691d6ebf3 100644 (file)
@@ -50,20 +50,6 @@ static void __init dk_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
        at91_initialize(18432000);
-
-       /* Setup the LEDs */
-       at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
-       at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
-                          | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
-                          | ATMEL_UART_RI);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 static struct macb_platform_data __initdata dk_eth_data = {
@@ -190,7 +176,17 @@ static struct gpio_led dk_leds[] = {
 
 static void __init dk_board_init(void)
 {
+       /* Setup the LEDs */
+       at91_init_leds(AT91_PIN_PB2, AT91_PIN_PB2);
+
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+       at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
+                          | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
+                          | ATMEL_UART_RI);
        at91_add_device_serial();
        /* Ethernet */
        at91_add_device_eth(&dk_eth_data);
index b2e4fe21f346cf6217dfb78b5e8b3f6553e76fe6..2b15b8adec4ccb9c671fab7e2423a59f2860ad89 100644 (file)
@@ -50,20 +50,6 @@ static void __init ek_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
        at91_initialize(18432000);
-
-       /* Setup the LEDs */
-       at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
-       at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
-                          | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
-                          | ATMEL_UART_RI);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 static struct macb_platform_data __initdata ek_eth_data = {
@@ -161,7 +147,17 @@ static struct gpio_led ek_leds[] = {
 
 static void __init ek_board_init(void)
 {
+       /* Setup the LEDs */
+       at91_init_leds(AT91_PIN_PB1, AT91_PIN_PB2);
+
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+       at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
+                          | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
+                          | ATMEL_UART_RI);
        at91_add_device_serial();
        /* Ethernet */
        at91_add_device_eth(&ek_eth_data);
index af0750fafa29cd5ba5dc712ad4e3348f72ee8cb8..24ab9be7510fbe5f6cdd3296be794fd7affa8cdc 100644 (file)
@@ -35,26 +35,6 @@ static void __init rsi_ews_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
        at91_initialize(18432000);
-
-       /* Setup the LEDs */
-       at91_init_leds(AT91_PIN_PB6, AT91_PIN_PB9);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       /* This one is for debugging */
-       at91_register_uart(0, 0, 0);
-
-       /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
-       /* Dialin/-out modem interface */
-       at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS
-                          | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
-                          | ATMEL_UART_RI);
-
-       /* USART3 on ttyS4. (Rx, Tx, RTS) */
-       /* RS485 communication */
-       at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_RTS);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 /*
@@ -204,7 +184,23 @@ static struct platform_device rsiews_nor_flash = {
  */
 static void __init rsi_ews_board_init(void)
 {
+       /* Setup the LEDs */
+       at91_init_leds(AT91_PIN_PB6, AT91_PIN_PB9);
+
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       /* This one is for debugging */
+       at91_register_uart(0, 0, 0);
+
+       /* USART1 on ttyS2. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+       /* Dialin/-out modem interface */
+       at91_register_uart(AT91RM9200_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS
+                          | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
+                          | ATMEL_UART_RI);
+
+       /* USART3 on ttyS4. (Rx, Tx, RTS) */
+       /* RS485 communication */
+       at91_register_uart(AT91RM9200_ID_US3, 4, ATMEL_UART_RTS);
        at91_add_device_serial();
        at91_set_gpio_output(AT91_PIN_PA21, 0);
        /* Ethernet */
index e8b116b6cba6c3c15dc873d41079c6f2519efdb8..cdd21f2595d2220de8fc828f636d240e0d0b1476 100644 (file)
@@ -48,23 +48,6 @@ static void __init ek_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
        at91_initialize(18432000);
-
-       /* Setup the LEDs */
-       at91_init_leds(AT91_PIN_PA9, AT91_PIN_PA6);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
-       at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
-                          | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
-                          | ATMEL_UART_RI);
-
-       /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */
-       at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 /*
@@ -184,7 +167,20 @@ static struct at91_mmc_data __initdata ek_mmc_data = {
 
 static void __init ek_board_init(void)
 {
+       /* Setup the LEDs */
+       at91_init_leds(AT91_PIN_PA9, AT91_PIN_PA6);
+
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+       at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
+                          | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
+                          | ATMEL_UART_RI);
+
+       /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */
+       at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
        at91_add_device_serial();
        /* USB Host */
        at91_add_device_usbh(&ek_usbh_data);
index d5aec55b0eb4903a06c6045169cd21af24bb3824..7b3c3913551a53ccc7a08eef94b5a18b7bba428b 100644 (file)
@@ -54,20 +54,6 @@ static void __init ek_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
        at91_initialize(18432000);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
-       at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
-                          | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
-                          | ATMEL_UART_RI);
-
-       /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
-       at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 /*
@@ -320,6 +306,16 @@ static void __init ek_add_device_buttons(void) {}
 static void __init ek_board_init(void)
 {
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+       at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
+                          | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
+                          | ATMEL_UART_RI);
+
+       /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
+       at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
        at91_add_device_serial();
        /* USB Host */
        at91_add_device_usbh(&ek_usbh_data);
index 065fed342424902bbe15aa67101fd524397eaa7b..2736453821b0d55e9782d065107c176102ca4c35 100644 (file)
@@ -58,15 +58,6 @@ static void __init ek_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
        at91_initialize(18432000);
-
-       /* Setup the LEDs */
-       at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 /*
@@ -577,7 +568,12 @@ static struct gpio_led ek_leds[] = {
 
 static void __init ek_board_init(void)
 {
+       /* Setup the LEDs */
+       at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14);
+
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
        at91_add_device_serial();
        /* USB Host */
        at91_add_device_usbh(&ek_usbh_data);
index 2ffe50f3a9e9e056a48879dd4c6a755cfa65f622..983cb98d2465c7253b2c9c2900de5379e2636979 100644 (file)
@@ -57,15 +57,6 @@ static void __init ek_init_early(void)
 {
        /* Initialize processor: 16.367 MHz crystal */
        at91_initialize(16367660);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */
-       at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 /*
@@ -412,6 +403,11 @@ static struct at91_can_data ek_can_data = {
 static void __init ek_board_init(void)
 {
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */
+       at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
        at91_add_device_serial();
        /* USB Host */
        at91_add_device_usbh(&ek_usbh_data);
index 8923ec9f5831b79ab8efc14b86ff1718f222f1fa..3d615532ae5c6ea9ae5c74757c30b2dce164c6c9 100644 (file)
@@ -65,20 +65,6 @@ static void __init ek_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
        at91_initialize(18432000);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
-       at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
-                          | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
-                          | ATMEL_UART_RI);
-
-       /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
-       at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 /*
@@ -372,6 +358,16 @@ static struct i2c_board_info __initdata ek_i2c_devices[] = {
 static void __init ek_board_init(void)
 {
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+       at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
+                          | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
+                          | ATMEL_UART_RI);
+
+       /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
+       at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
        at91_add_device_serial();
        /* USB Host */
        at91_add_device_usbh(&ek_usbh_data);
index c88e908ddd82e9de014b360448a194c568f27154..9a87f0b072f86cadc92b91e7f62aa981133ab56b 100644 (file)
@@ -53,16 +53,6 @@ static void __init ek_init_early(void)
 {
        /* Initialize processor: 12.000 MHz crystal */
        at91_initialize(12000000);
-
-       /* DGBU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART0 not connected on the -EK board */
-       /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
-       at91_register_uart(AT91SAM9G45_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 /*
@@ -457,6 +447,12 @@ static struct platform_device *devices[] __initdata = {
 static void __init ek_board_init(void)
 {
        /* Serial */
+       /* DGBU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART0 not connected on the -EK board */
+       /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */
+       at91_register_uart(AT91SAM9G45_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
        at91_add_device_serial();
        /* USB HS Host */
        at91_add_device_usbh_ohci(&ek_usbh_hs_data);
index b109ce2ba864640f8eee20dfebc3d4813fb58e3d..be3239f13daa64341598d1b5f33041ff44058eab 100644 (file)
@@ -42,15 +42,6 @@ static void __init ek_init_early(void)
 {
        /* Initialize processor: 12.000 MHz crystal */
        at91_initialize(12000000);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */
-       at91_register_uart(AT91SAM9RL_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 /*
@@ -296,6 +287,11 @@ static void __init ek_add_device_buttons(void) {}
 static void __init ek_board_init(void)
 {
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */
+       at91_register_uart(AT91SAM9RL_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
        at91_add_device_serial();
        /* USB HS */
        at91_add_device_usba(&ek_usba_udc_data);
index ebc9d01ce742f26bed12f958647934bc378c46c0..9d446f1bb45fe6fcc91d78a35932bb56823e685e 100644 (file)
 static void __init snapper9260_init_early(void)
 {
        at91_initialize(18432000);
-
-       /* Debug on ttyS0 */
-       at91_register_uart(0, 0, 0);
-       at91_set_serial_console(0);
-
-       at91_register_uart(AT91SAM9260_ID_US0, 1,
-                          ATMEL_UART_CTS | ATMEL_UART_RTS);
-       at91_register_uart(AT91SAM9260_ID_US1, 2,
-                          ATMEL_UART_CTS | ATMEL_UART_RTS);
-       at91_register_uart(AT91SAM9260_ID_US2, 3, 0);
 }
 
 static struct at91_usbh_data __initdata snapper9260_usbh_data = {
@@ -168,6 +158,14 @@ static void __init snapper9260_board_init(void)
        snapper9260_i2c_isl1208.irq = gpio_to_irq(AT91_PIN_PA31);
        i2c_register_board_info(0, &snapper9260_i2c_isl1208, 1);
 
+       /* Debug on ttyS0 */
+       at91_register_uart(0, 0, 0);
+
+       at91_register_uart(AT91SAM9260_ID_US0, 1,
+                          ATMEL_UART_CTS | ATMEL_UART_RTS);
+       at91_register_uart(AT91SAM9260_ID_US1, 2,
+                          ATMEL_UART_CTS | ATMEL_UART_RTS);
+       at91_register_uart(AT91SAM9260_ID_US2, 3, 0);
        at91_add_device_serial();
        at91_add_device_usbh(&snapper9260_usbh_data);
        at91_add_device_udc(&snapper9260_udc_data);
index 7640049410a04b505ba7fd9f55d7ebfbb5aa1538..ee86f9d7ee72ed87bf408e273858be3dbe4586e1 100644 (file)
@@ -36,44 +36,6 @@ void __init stamp9g20_init_early(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
        at91_initialize(18432000);
-
-       /* DGBU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
-}
-
-static void __init stamp9g20evb_init_early(void)
-{
-       stamp9g20_init_early();
-
-       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
-       at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
-                                               | ATMEL_UART_DTR | ATMEL_UART_DSR
-                                               | ATMEL_UART_DCD | ATMEL_UART_RI);
-}
-
-static void __init portuxg20_init_early(void)
-{
-       stamp9g20_init_early();
-
-       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
-       at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
-                                               | ATMEL_UART_DTR | ATMEL_UART_DSR
-                                               | ATMEL_UART_DCD | ATMEL_UART_RI);
-
-       /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */
-       at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
-
-       /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */
-       at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);
-
-       /* USART4 on ttyS5. (Rx, Tx only) */
-       at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
-
-       /* USART5 on ttyS6. (Rx, Tx only) */
-       at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
 }
 
 /*
@@ -254,6 +216,8 @@ void add_w1(void)
 void __init stamp9g20_board_init(void)
 {
        /* Serial */
+       /* DGBU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
        at91_add_device_serial();
        /* NAND */
        add_device_nand();
@@ -269,6 +233,22 @@ void __init stamp9g20_board_init(void)
 
 static void __init portuxg20_board_init(void)
 {
+       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+       at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
+                                               | ATMEL_UART_DTR | ATMEL_UART_DSR
+                                               | ATMEL_UART_DCD | ATMEL_UART_RI);
+
+       /* USART1 on ttyS2. (Rx, Tx, CTS, RTS) */
+       at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS);
+
+       /* USART2 on ttyS3. (Rx, Tx, CTS, RTS) */
+       at91_register_uart(AT91SAM9260_ID_US2, 3, ATMEL_UART_CTS | ATMEL_UART_RTS);
+
+       /* USART4 on ttyS5. (Rx, Tx only) */
+       at91_register_uart(AT91SAM9260_ID_US4, 5, 0);
+
+       /* USART5 on ttyS6. (Rx, Tx only) */
+       at91_register_uart(AT91SAM9260_ID_US5, 6, 0);
        stamp9g20_board_init();
        /* USB Host */
        at91_add_device_usbh(&usbh_data);
@@ -286,6 +266,10 @@ static void __init portuxg20_board_init(void)
 
 static void __init stamp9g20evb_board_init(void)
 {
+       /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+       at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
+                                               | ATMEL_UART_DTR | ATMEL_UART_DSR
+                                               | ATMEL_UART_DCD | ATMEL_UART_RI);
        stamp9g20_board_init();
        /* USB Host */
        at91_add_device_usbh(&usbh_data);
@@ -303,7 +287,7 @@ MACHINE_START(PORTUXG20, "taskit PortuxG20")
        /* Maintainer: taskit GmbH */
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
-       .init_early     = portuxg20_init_early,
+       .init_early     = stamp9g20_init_early,
        .init_irq       = at91_init_irq_default,
        .init_machine   = portuxg20_board_init,
 MACHINE_END
@@ -312,7 +296,7 @@ MACHINE_START(STAMP9G20, "taskit Stamp9G20")
        /* Maintainer: taskit GmbH */
        .timer          = &at91sam926x_timer,
        .map_io         = at91_map_io,
-       .init_early     = stamp9g20evb_init_early,
+       .init_early     = stamp9g20_init_early,
        .init_irq       = at91_init_irq_default,
        .init_machine   = stamp9g20evb_board_init,
 MACHINE_END
index b7483a3d09803183e625844140659cc363f652a0..95393fcaf199c9664bc6cafa8fafe17e826e5d92 100644 (file)
@@ -53,12 +53,6 @@ static void __init ek_init_early(void)
 {
        /* Initialize processor: 12.00 MHz crystal */
        at91_initialize(12000000);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 /*
@@ -177,6 +171,10 @@ static struct mtd_partition __initdata ek_nand_partition[] = {
                .name   = "bareboxenv2",
                .offset = MTDPART_OFS_NXTBLK,
                .size   = SZ_128K,
+       }, {
+               .name   = "oftree",
+               .offset = MTDPART_OFS_NXTBLK,
+               .size   = SZ_128K,
        }, {
                .name   = "kernel",
                .offset = MTDPART_OFS_NXTBLK,
@@ -325,6 +323,8 @@ static void __init ek_add_device_leds(void)
 static void __init ek_board_init(void)
 {
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
        at91_add_device_serial();
        /* USB Host */
        at91_add_device_usbh(&ek_usbh_data);
index 38dd279d30b25657004177bfa488b4906d4c525d..d56665ea4b55d3a8259228d8801fe20a547b9bab 100644 (file)
@@ -58,26 +58,6 @@ static void __init yl9200_init_early(void)
 
        /* Initialize processor: 18.432 MHz crystal */
        at91_initialize(18432000);
-
-       /* Setup the LEDs D2=PB17 (timer), D3=PB16 (cpu) */
-       at91_init_leds(AT91_PIN_PB16, AT91_PIN_PB17);
-
-       /* DBGU on ttyS0. (Rx & Tx only) */
-       at91_register_uart(0, 0, 0);
-
-       /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
-       at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
-                       | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
-                       | ATMEL_UART_RI);
-
-       /* USART0 on ttyS2. (Rx & Tx only to JP3) */
-       at91_register_uart(AT91RM9200_ID_US0, 2, 0);
-
-       /* USART3 on ttyS3. (Rx, Tx, RTS - RS485 interface) */
-       at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_RTS);
-
-       /* set serial console to ttyS0 (ie, DBGU) */
-       at91_set_serial_console(0);
 }
 
 /*
@@ -560,7 +540,23 @@ void __init yl9200_add_device_video(void) {}
 
 static void __init yl9200_board_init(void)
 {
+       /* Setup the LEDs D2=PB17 (timer), D3=PB16 (cpu) */
+       at91_init_leds(AT91_PIN_PB16, AT91_PIN_PB17);
+
        /* Serial */
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+       at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
+                       | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
+                       | ATMEL_UART_RI);
+
+       /* USART0 on ttyS2. (Rx & Tx only to JP3) */
+       at91_register_uart(AT91RM9200_ID_US0, 2, 0);
+
+       /* USART3 on ttyS3. (Rx, Tx, RTS - RS485 interface) */
+       at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_RTS);
        at91_add_device_serial();
        /* Ethernet */
        at91_add_device_eth(&yl9200_eth_data);
index 6b692824c9885555fffe031ead3bafcdf71d141d..de2ec6b8fea7693555c2b25367b4efb1e06cae25 100644 (file)
@@ -58,13 +58,15 @@ EXPORT_SYMBOL_GPL(at91_pmc_base);
 
 #define cpu_has_800M_plla()    (  cpu_is_at91sam9g20() \
                                || cpu_is_at91sam9g45() \
-                               || cpu_is_at91sam9x5())
+                               || cpu_is_at91sam9x5() \
+                               || cpu_is_at91sam9n12())
 
 #define cpu_has_300M_plla()    (cpu_is_at91sam9g10())
 
 #define cpu_has_pllb()         (!(cpu_is_at91sam9rl() \
                                || cpu_is_at91sam9g45() \
-                               || cpu_is_at91sam9x5()))
+                               || cpu_is_at91sam9x5() \
+                               || cpu_is_at91sam9n12()))
 
 #define cpu_has_upll()         (cpu_is_at91sam9g45() \
                                || cpu_is_at91sam9x5())
@@ -78,12 +80,15 @@ EXPORT_SYMBOL_GPL(at91_pmc_base);
                                || cpu_is_at91sam9x5()))
 
 #define cpu_has_plladiv2()     (cpu_is_at91sam9g45() \
-                               || cpu_is_at91sam9x5())
+                               || cpu_is_at91sam9x5() \
+                               || cpu_is_at91sam9n12())
 
 #define cpu_has_mdiv3()                (cpu_is_at91sam9g45() \
-                               || cpu_is_at91sam9x5())
+                               || cpu_is_at91sam9x5() \
+                               || cpu_is_at91sam9n12())
 
-#define cpu_has_alt_prescaler()        (cpu_is_at91sam9x5())
+#define cpu_has_alt_prescaler()        (cpu_is_at91sam9x5() \
+                               || cpu_is_at91sam9n12())
 
 static LIST_HEAD(clocks);
 static DEFINE_SPINLOCK(clk_lock);
index ece1f9aefb47a0ff46a0fe0f0bfeedd4d2bac27f..0c6381516a5aac50c0d8752629b2d70f8b554547 100644 (file)
@@ -21,6 +21,7 @@
 #include <linux/export.h>
 #include <asm/proc-fns.h>
 #include <asm/cpuidle.h>
+#include <mach/cpu.h>
 
 #include "pm.h"
 
@@ -33,7 +34,12 @@ static int at91_enter_idle(struct cpuidle_device *dev,
                        struct cpuidle_driver *drv,
                               int index)
 {
-       at91_standby();
+       if (cpu_is_at91rm9200())
+               at91rm9200_standby();
+       else if (cpu_is_at91sam9g45())
+               at91sam9g45_standby();
+       else
+               at91sam9_standby();
 
        return index;
 }
index dd9b346c451d2b005b7241a4c04af01376e09f1d..0a60bf837037dd67382163c30f3290ed30acb9ae 100644 (file)
@@ -40,17 +40,6 @@ extern struct sys_timer at91sam926x_timer;
 extern struct sys_timer at91x40_timer;
 
  /* Clocks */
-/*
- * function to specify the clock of the default console. As we do not
- * use the device/driver bus, the dev_name is not intialize. So we need
- * to link the clock to a specific con_id only "usart"
- */
-extern void __init at91rm9200_set_console_clock(int id);
-extern void __init at91sam9260_set_console_clock(int id);
-extern void __init at91sam9261_set_console_clock(int id);
-extern void __init at91sam9263_set_console_clock(int id);
-extern void __init at91sam9rl_set_console_clock(int id);
-extern void __init at91sam9g45_set_console_clock(int id);
 #ifdef CONFIG_AT91_PMC_UNIT
 extern int __init at91_clock_init(unsigned long main_clock);
 extern int __init at91_dt_clock_init(void);
index 603e6aac2a4fb9d9a55c6d37b639ff19649e9e81..e67317c677617bd0374446e4646922eb60792ce6 100644 (file)
 #define AT91RM9200_BASE_RTC    0xfffffe00      /* Real-Time Clock */
 #define AT91RM9200_BASE_MC     0xffffff00      /* Memory Controllers */
 
-#define AT91_USART0    AT91RM9200_BASE_US0
-#define AT91_USART1    AT91RM9200_BASE_US1
-#define AT91_USART2    AT91RM9200_BASE_US2
-#define AT91_USART3    AT91RM9200_BASE_US3
-
 /*
  * Internal Memory.
  */
index 08ae9afd00fed48852fe6c62d851cb96683080cc..416c7b6c56d3af85cf34eef90078de512047dbfa 100644 (file)
 #define AT91SAM9260_BASE_WDT   0xfffffd40
 #define AT91SAM9260_BASE_GPBR  0xfffffd50
 
-#define AT91_USART0    AT91SAM9260_BASE_US0
-#define AT91_USART1    AT91SAM9260_BASE_US1
-#define AT91_USART2    AT91SAM9260_BASE_US2
-#define AT91_USART3    AT91SAM9260_BASE_US3
-#define AT91_USART4    AT91SAM9260_BASE_US4
-#define AT91_USART5    AT91SAM9260_BASE_US5
-
 
 /*
  * Internal Memory.
index 44fbdc12ee6247b4581efc51df0883677fd46cbe..a041406d06ee1e0fba30451f3925ed657ec7f315 100644 (file)
 #define AT91SAM9261_BASE_WDT   0xfffffd40
 #define AT91SAM9261_BASE_GPBR  0xfffffd50
 
-#define AT91_USART0    AT91SAM9261_BASE_US0
-#define AT91_USART1    AT91SAM9261_BASE_US1
-#define AT91_USART2    AT91SAM9261_BASE_US2
-
 
 /*
  * Internal Memory.
index d96cbb2e03c49a88f936a6ebc8105089366288b8..d201029d60b386d9de9cefca0f4b03958aaab36d 100644 (file)
 #define AT91SAM9263_BASE_RTT1  0xfffffd50
 #define AT91SAM9263_BASE_GPBR  0xfffffd60
 
-#define AT91_USART0    AT91SAM9263_BASE_US0
-#define AT91_USART1    AT91SAM9263_BASE_US1
-#define AT91_USART2    AT91SAM9263_BASE_US2
-
 #define AT91_SMC       AT91_SMC0
 
 /*
index d052abcff852134fee95d54defa164f66af8b074..3a4da24d59112209613a6cab1ed132103b4c8772 100644 (file)
 #define AT91SAM9G45_BASE_RTC   0xfffffdb0
 #define AT91SAM9G45_BASE_GPBR  0xfffffd60
 
-#define AT91_USART0    AT91SAM9G45_BASE_US0
-#define AT91_USART1    AT91SAM9G45_BASE_US1
-#define AT91_USART2    AT91SAM9G45_BASE_US2
-#define AT91_USART3    AT91SAM9G45_BASE_US3
-
 /*
  * Internal Memory.
  */
diff --git a/arch/arm/mach-at91/include/mach/at91sam9n12.h b/arch/arm/mach-at91/include/mach/at91sam9n12.h
new file mode 100644 (file)
index 0000000..d374b87
--- /dev/null
@@ -0,0 +1,60 @@
+/*
+ * SoC specific header file for the AT91SAM9N12
+ *
+ * Copyright (C) 2012 Atmel Corporation
+ *
+ * Common definitions, based on AT91SAM9N12 SoC datasheet
+ *
+ * Licensed under GPLv2 or later
+ */
+
+#ifndef _AT91SAM9N12_H_
+#define _AT91SAM9N12_H_
+
+/*
+ * Peripheral identifiers/interrupts.
+ */
+#define AT91SAM9N12_ID_PIOAB   2       /* Parallel I/O Controller A and B */
+#define AT91SAM9N12_ID_PIOCD   3       /* Parallel I/O Controller C and D */
+#define AT91SAM9N12_ID_FUSE    4       /* FUSE Controller */
+#define AT91SAM9N12_ID_USART0  5       /* USART 0 */
+#define AT91SAM9N12_ID_USART1  6       /* USART 1 */
+#define AT91SAM9N12_ID_USART2  7       /* USART 2 */
+#define AT91SAM9N12_ID_USART3  8       /* USART 3 */
+#define AT91SAM9N12_ID_TWI0    9       /* Two-Wire Interface 0 */
+#define AT91SAM9N12_ID_TWI1    10      /* Two-Wire Interface 1 */
+#define AT91SAM9N12_ID_MCI     12      /* High Speed Multimedia Card Interface */
+#define AT91SAM9N12_ID_SPI0    13      /* Serial Peripheral Interface 0 */
+#define AT91SAM9N12_ID_SPI1    14      /* Serial Peripheral Interface 1 */
+#define AT91SAM9N12_ID_UART0   15      /* UART 0 */
+#define AT91SAM9N12_ID_UART1   16      /* UART 1 */
+#define AT91SAM9N12_ID_TCB     17      /* Timer Counter 0, 1, 2, 3, 4 and 5 */
+#define AT91SAM9N12_ID_PWM     18      /* Pulse Width Modulation Controller */
+#define AT91SAM9N12_ID_ADC     19      /* ADC Controller */
+#define AT91SAM9N12_ID_DMA     20      /* DMA Controller */
+#define AT91SAM9N12_ID_UHP     22      /* USB Host High Speed */
+#define AT91SAM9N12_ID_UDP     23      /* USB Device High Speed */
+#define AT91SAM9N12_ID_LCDC    25      /* LCD Controller */
+#define AT91SAM9N12_ID_ISI     25      /* Image Sensor Interface */
+#define AT91SAM9N12_ID_SSC     28      /* Synchronous Serial Controller */
+#define AT91SAM9N12_ID_TRNG    30      /* TRNG */
+#define AT91SAM9N12_ID_IRQ0    31      /* Advanced Interrupt Controller */
+
+/*
+ * User Peripheral physical base addresses.
+ */
+#define AT91SAM9N12_BASE_USART0        0xf801c000
+#define AT91SAM9N12_BASE_USART1        0xf8020000
+#define AT91SAM9N12_BASE_USART2        0xf8024000
+#define AT91SAM9N12_BASE_USART3        0xf8028000
+
+/*
+ * Internal Memory.
+ */
+#define AT91SAM9N12_SRAM_BASE  0x00300000      /* Internal SRAM base address */
+#define AT91SAM9N12_SRAM_SIZE  SZ_32K          /* Internal SRAM size (32Kb) */
+
+#define AT91SAM9N12_ROM_BASE   0x00100000      /* Internal ROM base address */
+#define AT91SAM9N12_ROM_SIZE   SZ_128K         /* Internal ROM size (128Kb) */
+
+#endif
diff --git a/arch/arm/mach-at91/include/mach/at91sam9n12_matrix.h b/arch/arm/mach-at91/include/mach/at91sam9n12_matrix.h
new file mode 100644 (file)
index 0000000..40060cd
--- /dev/null
@@ -0,0 +1,53 @@
+/*
+ * Matrix-centric header file for the AT91SAM9N12
+ *
+ * Copyright (C) 2012 Atmel Corporation.
+ *
+ * Only EBI related registers.
+ * Write Protect register definitions may be useful.
+ *
+ * Licensed under GPLv2 or later.
+ */
+
+#ifndef _AT91SAM9N12_MATRIX_H_
+#define _AT91SAM9N12_MATRIX_H_
+
+#define AT91_MATRIX_EBICSA     (AT91_MATRIX + 0x118)   /* EBI Chip Select Assignment Register */
+#define                AT91_MATRIX_EBI_CS1A            (1 << 1)        /* Chip Select 1 Assignment */
+#define                        AT91_MATRIX_EBI_CS1A_SMC                (0 << 1)
+#define                        AT91_MATRIX_EBI_CS1A_SDRAMC             (1 << 1)
+#define                AT91_MATRIX_EBI_CS3A            (1 << 3)        /* Chip Select 3 Assignment */
+#define                        AT91_MATRIX_EBI_CS3A_SMC                (0 << 3)
+#define                        AT91_MATRIX_EBI_CS3A_SMC_NANDFLASH      (1 << 3)
+#define                AT91_MATRIX_EBI_DBPUC           (1 << 8)        /* Data Bus Pull-up Configuration */
+#define                        AT91_MATRIX_EBI_DBPU_ON                 (0 << 8)
+#define                        AT91_MATRIX_EBI_DBPU_OFF                (1 << 8)
+#define                AT91_MATRIX_EBI_VDDIOMSEL       (1 << 16)       /* Memory voltage selection */
+#define                        AT91_MATRIX_EBI_VDDIOMSEL_1_8V          (0 << 16)
+#define                        AT91_MATRIX_EBI_VDDIOMSEL_3_3V          (1 << 16)
+#define                AT91_MATRIX_EBI_EBI_IOSR        (1 << 17)       /* EBI I/O slew rate selection */
+#define                        AT91_MATRIX_EBI_EBI_IOSR_REDUCED        (0 << 17)
+#define                        AT91_MATRIX_EBI_EBI_IOSR_NORMAL         (1 << 17)
+#define                AT91_MATRIX_EBI_DDR_IOSR        (1 << 18)       /* DDR2 dedicated port I/O slew rate selection */
+#define                        AT91_MATRIX_EBI_DDR_IOSR_REDUCED        (0 << 18)
+#define                        AT91_MATRIX_EBI_DDR_IOSR_NORMAL         (1 << 18)
+#define                AT91_MATRIX_NFD0_SELECT         (1 << 24)       /* NAND Flash Data Bus Selection */
+#define                        AT91_MATRIX_NFD0_ON_D0                  (0 << 24)
+#define                        AT91_MATRIX_NFD0_ON_D16                 (1 << 24)
+#define                AT91_MATRIX_DDR_MP_EN           (1 << 25)       /* DDR Multi-port Enable */
+#define                        AT91_MATRIX_MP_OFF                      (0 << 25)
+#define                        AT91_MATRIX_MP_ON                       (1 << 25)
+
+#define AT91_MATRIX_WPMR       (AT91_MATRIX + 0x1E4)   /* Write Protect Mode Register */
+#define                AT91_MATRIX_WPMR_WPEN           (1 << 0)        /* Write Protect ENable */
+#define                        AT91_MATRIX_WPMR_WP_WPDIS               (0 << 0)
+#define                        AT91_MATRIX_WPMR_WP_WPEN                (1 << 0)
+#define                AT91_MATRIX_WPMR_WPKEY          (0xFFFFFF << 8) /* Write Protect KEY */
+
+#define AT91_MATRIX_WPSR       (AT91_MATRIX + 0x1E8)   /* Write Protect Status Register */
+#define                AT91_MATRIX_WPSR_WPVS           (1 << 0)        /* Write Protect Violation Status */
+#define                        AT91_MATRIX_WPSR_NO_WPV         (0 << 0)
+#define                        AT91_MATRIX_WPSR_WPV            (1 << 0)
+#define                AT91_MATRIX_WPSR_WPVSRC         (0xFFFF << 8)   /* Write Protect Violation Source */
+
+#endif
index e0073eb10144d87e754c5e261ded43fb908a51dd..a15db56d33fa86154020a3419db2a468a0f4b10f 100644 (file)
 #define AT91SAM9RL_BASE_GPBR   0xfffffd60
 #define AT91SAM9RL_BASE_RTC    0xfffffe00
 
-#define AT91_USART0    AT91SAM9RL_BASE_US0
-#define AT91_USART1    AT91SAM9RL_BASE_US1
-#define AT91_USART2    AT91SAM9RL_BASE_US2
-#define AT91_USART3    AT91SAM9RL_BASE_US3
-
 
 /*
  * Internal Memory.
index 88e43d534cdfeef7f9df38b7c28a34a0546bc436..c75ee19b58d3de69c79e81e312c416fbd6071ef0 100644 (file)
 #define AT91SAM9X5_BASE_USART1 0xf8020000
 #define AT91SAM9X5_BASE_USART2 0xf8024000
 
-/*
- * Base addresses for early serial code (uncompress.h)
- */
-#define AT91_DBGU      AT91_BASE_DBGU0
-#define AT91_USART0    AT91SAM9X5_BASE_USART0
-#define AT91_USART1    AT91SAM9X5_BASE_USART1
-#define AT91_USART2    AT91SAM9X5_BASE_USART2
-
 /*
  * Internal Memory.
  */
index 49a821192c652c959321b834953d7f3ce2073452..369afc2ffc5b972934872aa9266c8a8b774e9bec 100644 (file)
@@ -121,7 +121,6 @@ extern void __init at91_add_device_spi(struct spi_board_info *devices, int nr_de
 #define ATMEL_UART_RI  0x20
 
 extern void __init at91_register_uart(unsigned id, unsigned portnr, unsigned pins);
-extern void __init at91_set_serial_console(unsigned portnr);
 
 extern struct platform_device *atmel_default_console_device;
 
index 0118c33385525149754c45e453881f69c518af49..b6504c19d55c2849d84a64a23317673b55ed926c 100644 (file)
@@ -25,6 +25,7 @@
 #define ARCH_ID_AT91SAM9G45MRL 0x819b05a2      /* aka 9G45-ES2 & non ES lots */
 #define ARCH_ID_AT91SAM9G45ES  0x819b05a1      /* 9G45-ES (Engineering Sample) */
 #define ARCH_ID_AT91SAM9X5     0x819a05a0
+#define ARCH_ID_AT91SAM9N12    0x819a07a0
 
 #define ARCH_ID_AT91SAM9XE128  0x329973a0
 #define ARCH_ID_AT91SAM9XE256  0x329a93a0
@@ -54,6 +55,7 @@
 #define ARCH_REVISON_9200_BGA  (0 << 0)
 #define ARCH_REVISON_9200_PQFP (1 << 0)
 
+#ifndef __ASSEMBLY__
 enum at91_soc_type {
        /* 920T */
        AT91_SOC_RM9200,
@@ -70,6 +72,9 @@ enum at91_soc_type {
        /* SAM9X5 */
        AT91_SOC_SAM9X5,
 
+       /* SAM9N12 */
+       AT91_SOC_SAM9N12,
+
        /* Unknown type */
        AT91_SOC_NONE
 };
@@ -106,7 +111,7 @@ static inline int at91_soc_is_detected(void)
        return at91_soc_initdata.type != AT91_SOC_NONE;
 }
 
-#ifdef CONFIG_ARCH_AT91RM9200
+#ifdef CONFIG_SOC_AT91RM9200
 #define cpu_is_at91rm9200()    (at91_soc_initdata.type == AT91_SOC_RM9200)
 #define cpu_is_at91rm9200_bga()        (at91_soc_initdata.subtype == AT91_SOC_RM9200_BGA)
 #define cpu_is_at91rm9200_pqfp() (at91_soc_initdata.subtype == AT91_SOC_RM9200_PQFP)
@@ -116,45 +121,37 @@ static inline int at91_soc_is_detected(void)
 #define cpu_is_at91rm9200_pqfp() (0)
 #endif
 
-#ifdef CONFIG_ARCH_AT91SAM9260
+#ifdef CONFIG_SOC_AT91SAM9260
 #define cpu_is_at91sam9xe()    (at91_soc_initdata.subtype == AT91_SOC_SAM9XE)
 #define cpu_is_at91sam9260()   (at91_soc_initdata.type == AT91_SOC_SAM9260)
+#define cpu_is_at91sam9g20()   (at91_soc_initdata.type == AT91_SOC_SAM9G20)
 #else
 #define cpu_is_at91sam9xe()    (0)
 #define cpu_is_at91sam9260()   (0)
-#endif
-
-#ifdef CONFIG_ARCH_AT91SAM9G20
-#define cpu_is_at91sam9g20()   (at91_soc_initdata.type == AT91_SOC_SAM9G20)
-#else
 #define cpu_is_at91sam9g20()   (0)
 #endif
 
-#ifdef CONFIG_ARCH_AT91SAM9261
+#ifdef CONFIG_SOC_AT91SAM9261
 #define cpu_is_at91sam9261()   (at91_soc_initdata.type == AT91_SOC_SAM9261)
-#else
-#define cpu_is_at91sam9261()   (0)
-#endif
-
-#ifdef CONFIG_ARCH_AT91SAM9G10
 #define cpu_is_at91sam9g10()   (at91_soc_initdata.type == AT91_SOC_SAM9G10)
 #else
+#define cpu_is_at91sam9261()   (0)
 #define cpu_is_at91sam9g10()   (0)
 #endif
 
-#ifdef CONFIG_ARCH_AT91SAM9263
+#ifdef CONFIG_SOC_AT91SAM9263
 #define cpu_is_at91sam9263()   (at91_soc_initdata.type == AT91_SOC_SAM9263)
 #else
 #define cpu_is_at91sam9263()   (0)
 #endif
 
-#ifdef CONFIG_ARCH_AT91SAM9RL
+#ifdef CONFIG_SOC_AT91SAM9RL
 #define cpu_is_at91sam9rl()    (at91_soc_initdata.type == AT91_SOC_SAM9RL)
 #else
 #define cpu_is_at91sam9rl()    (0)
 #endif
 
-#ifdef CONFIG_ARCH_AT91SAM9G45
+#ifdef CONFIG_SOC_AT91SAM9G45
 #define cpu_is_at91sam9g45()   (at91_soc_initdata.type == AT91_SOC_SAM9G45)
 #define cpu_is_at91sam9g45es() (at91_soc_initdata.subtype == AT91_SOC_SAM9G45ES)
 #define cpu_is_at91sam9m10()   (at91_soc_initdata.subtype == AT91_SOC_SAM9M10)
@@ -168,7 +165,7 @@ static inline int at91_soc_is_detected(void)
 #define cpu_is_at91sam9m11()   (0)
 #endif
 
-#ifdef CONFIG_ARCH_AT91SAM9X5
+#ifdef CONFIG_SOC_AT91SAM9X5
 #define cpu_is_at91sam9x5()    (at91_soc_initdata.type == AT91_SOC_SAM9X5)
 #define cpu_is_at91sam9g15()   (at91_soc_initdata.subtype == AT91_SOC_SAM9G15)
 #define cpu_is_at91sam9g35()   (at91_soc_initdata.subtype == AT91_SOC_SAM9G35)
@@ -184,10 +181,17 @@ static inline int at91_soc_is_detected(void)
 #define cpu_is_at91sam9x25()   (0)
 #endif
 
+#ifdef CONFIG_SOC_AT91SAM9N12
+#define cpu_is_at91sam9n12()   (at91_soc_initdata.type == AT91_SOC_SAM9N12)
+#else
+#define cpu_is_at91sam9n12()   (0)
+#endif
+
 /*
  * Since this is ARM, we will never run on any AVR32 CPU. But these
  * definitions may reduce clutter in common drivers.
  */
 #define cpu_is_at32ap7000()    (0)
+#endif /* __ASSEMBLY__ */
 
 #endif /* __MACH_CPU_H__ */
index e9e29a6c3868eb6ea462c8df13073915440ac36e..24b46bd14bbef1413c274a075546330e42335d3b 100644 (file)
 /* 9263, 9g45 */
 #define AT91_BASE_DBGU1        0xffffee00
 
-#if defined(CONFIG_ARCH_AT91RM9200)
+#if defined(CONFIG_ARCH_AT91X40)
+#include <mach/at91x40.h>
+#else
 #include <mach/at91rm9200.h>
-#elif defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20)
 #include <mach/at91sam9260.h>
-#elif defined(CONFIG_ARCH_AT91SAM9261) || defined(CONFIG_ARCH_AT91SAM9G10)
 #include <mach/at91sam9261.h>
-#elif defined(CONFIG_ARCH_AT91SAM9263)
 #include <mach/at91sam9263.h>
-#elif defined(CONFIG_ARCH_AT91SAM9RL)
 #include <mach/at91sam9rl.h>
-#elif defined(CONFIG_ARCH_AT91SAM9G45)
 #include <mach/at91sam9g45.h>
-#elif defined(CONFIG_ARCH_AT91SAM9X5)
 #include <mach/at91sam9x5.h>
-#elif defined(CONFIG_ARCH_AT91X40)
-#include <mach/at91x40.h>
-#else
-#error "Unsupported AT91 processor"
-#endif
+#include <mach/at91sam9n12.h>
 
-#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.
index 4218647c1fcd3279a39bb83b8b38eb7cdb5aa743..6f6118d1576aa8a48189db75e9ad907d1a896e74 100644 (file)
@@ -1,7 +1,8 @@
 /*
  * arch/arm/mach-at91/include/mach/uncompress.h
  *
- *  Copyright (C) 2003 SAN People
+ * Copyright (C) 2003 SAN People
+ * Copyright (C) 2012 Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
  *
  * This program is free software; you can redistribute it and/or modify
  * it under the terms of the GNU General Public License as published by
 #include <linux/atmel_serial.h>
 #include <mach/hardware.h>
 
-#if defined(CONFIG_AT91_EARLY_DBGU0)
-#define UART_OFFSET AT91_BASE_DBGU0
-#elif defined(CONFIG_AT91_EARLY_DBGU1)
-#define UART_OFFSET AT91_BASE_DBGU1
-#elif defined(CONFIG_AT91_EARLY_USART0)
-#define UART_OFFSET AT91_USART0
-#elif defined(CONFIG_AT91_EARLY_USART1)
-#define UART_OFFSET AT91_USART1
-#elif defined(CONFIG_AT91_EARLY_USART2)
-#define UART_OFFSET AT91_USART2
-#elif defined(CONFIG_AT91_EARLY_USART3)
-#define UART_OFFSET AT91_USART3
-#elif defined(CONFIG_AT91_EARLY_USART4)
-#define UART_OFFSET AT91_USART4
-#elif defined(CONFIG_AT91_EARLY_USART5)
-#define UART_OFFSET AT91_USART5
+#include <mach/at91_dbgu.h>
+#include <mach/cpu.h>
+
+void __iomem *at91_uart;
+
+#if !defined(CONFIG_ARCH_AT91X40)
+static const u32 uarts_rm9200[] = {
+       AT91_BASE_DBGU0,
+       AT91RM9200_BASE_US0,
+       AT91RM9200_BASE_US1,
+       AT91RM9200_BASE_US2,
+       AT91RM9200_BASE_US3,
+       0,
+};
+
+static const u32 uarts_sam9260[] = {
+       AT91_BASE_DBGU0,
+       AT91SAM9260_BASE_US0,
+       AT91SAM9260_BASE_US1,
+       AT91SAM9260_BASE_US2,
+       AT91SAM9260_BASE_US3,
+       AT91SAM9260_BASE_US4,
+       AT91SAM9260_BASE_US5,
+       0,
+};
+
+static const u32 uarts_sam9261[] = {
+       AT91_BASE_DBGU0,
+       AT91SAM9261_BASE_US0,
+       AT91SAM9261_BASE_US1,
+       AT91SAM9261_BASE_US2,
+       0,
+};
+
+static const u32 uarts_sam9263[] = {
+       AT91_BASE_DBGU1,
+       AT91SAM9263_BASE_US0,
+       AT91SAM9263_BASE_US1,
+       AT91SAM9263_BASE_US2,
+       0,
+};
+
+static const u32 uarts_sam9g45[] = {
+       AT91_BASE_DBGU1,
+       AT91SAM9G45_BASE_US0,
+       AT91SAM9G45_BASE_US1,
+       AT91SAM9G45_BASE_US2,
+       AT91SAM9G45_BASE_US3,
+       0,
+};
+
+static const u32 uarts_sam9rl[] = {
+       AT91_BASE_DBGU0,
+       AT91SAM9RL_BASE_US0,
+       AT91SAM9RL_BASE_US1,
+       AT91SAM9RL_BASE_US2,
+       AT91SAM9RL_BASE_US3,
+       0,
+};
+
+static const u32 uarts_sam9x5[] = {
+       AT91_BASE_DBGU0,
+       AT91SAM9X5_BASE_USART0,
+       AT91SAM9X5_BASE_USART1,
+       AT91SAM9X5_BASE_USART2,
+       0,
+};
+
+static inline const u32* decomp_soc_detect(u32 dbgu_base)
+{
+       u32 cidr, socid;
+
+       cidr = __raw_readl(dbgu_base + AT91_DBGU_CIDR);
+       socid = cidr & ~AT91_CIDR_VERSION;
+
+       switch (socid) {
+       case ARCH_ID_AT91RM9200:
+               return uarts_rm9200;
+
+       case ARCH_ID_AT91SAM9G20:
+       case ARCH_ID_AT91SAM9260:
+               return uarts_sam9260;
+
+       case ARCH_ID_AT91SAM9261:
+               return uarts_sam9261;
+
+       case ARCH_ID_AT91SAM9263:
+               return uarts_sam9263;
+
+       case ARCH_ID_AT91SAM9G45:
+               return uarts_sam9g45;
+
+       case ARCH_ID_AT91SAM9RL64:
+               return uarts_sam9rl;
+
+       case ARCH_ID_AT91SAM9X5:
+               return uarts_sam9x5;
+       }
+
+       /* at91sam9g10 */
+       if ((cidr & ~AT91_CIDR_EXT) == ARCH_ID_AT91SAM9G10) {
+               return uarts_sam9261;
+       }
+       /* at91sam9xe */
+       else if ((cidr & AT91_CIDR_ARCH) == ARCH_FAMILY_AT91SAM9XE) {
+               return uarts_sam9260;
+       }
+
+       return NULL;
+}
+
+static inline void arch_decomp_setup(void)
+{
+       int i = 0;
+       const u32* usarts;
+
+       usarts = decomp_soc_detect(AT91_BASE_DBGU0);
+
+       if (!usarts)
+               usarts = decomp_soc_detect(AT91_BASE_DBGU1);
+       if (!usarts) {
+               at91_uart = NULL;
+               return;
+       }
+
+       do {
+               /* physical address */
+               at91_uart = (void __iomem *)usarts[i];
+
+               if (__raw_readl(at91_uart + ATMEL_US_BRGR))
+                       return;
+               i++;
+       } while (usarts[i]);
+
+       at91_uart = NULL;
+}
+#else
+static inline void arch_decomp_setup(void)
+{
+       at91_uart = NULL;
+}
 #endif
 
 /*
  */
 static void putc(int c)
 {
-#ifdef UART_OFFSET
-       void __iomem *sys = (void __iomem *) UART_OFFSET;       /* physical address */
+       if (!at91_uart)
+               return;
 
-       while (!(__raw_readl(sys + ATMEL_US_CSR) & ATMEL_US_TXRDY))
+       while (!(__raw_readl(at91_uart + ATMEL_US_CSR) & ATMEL_US_TXRDY))
                barrier();
-       __raw_writel(c, sys + ATMEL_US_THR);
-#endif
+       __raw_writel(c, at91_uart + ATMEL_US_THR);
 }
 
 static inline void flush(void)
 {
-#ifdef UART_OFFSET
-       void __iomem *sys = (void __iomem *) UART_OFFSET;       /* physical address */
+       if (!at91_uart)
+               return;
 
        /* wait for transmission to complete */
-       while (!(__raw_readl(sys + ATMEL_US_CSR) & ATMEL_US_TXEMPTY))
+       while (!(__raw_readl(at91_uart + ATMEL_US_CSR) & ATMEL_US_TXEMPTY))
                barrier();
-#endif
 }
 
-#define arch_decomp_setup()
-
 #define arch_decomp_wdog()
 
 #endif
index f630250c6b8779d0f0fc528adb1ba7631a42df37..1bfaad628731b262c474bc23217a30f4119eece3 100644 (file)
@@ -261,7 +261,12 @@ static int at91_pm_enter(suspend_state_t state)
                         * For ARM 926 based chips, this requirement is weaker
                         * as at91sam9 can access a RAM in self-refresh mode.
                         */
-                       at91_standby();
+                       if (cpu_is_at91rm9200())
+                               at91rm9200_standby();
+                       else if (cpu_is_at91sam9g45())
+                               at91sam9g45_standby();
+                       else
+                               at91sam9_standby();
                        break;
 
                case PM_SUSPEND_ON:
@@ -307,10 +312,9 @@ static int __init at91_pm_init(void)
 
        pr_info("AT91: Power Management%s\n", (slow_clock ? " (with slow clock mode)" : ""));
 
-#ifdef CONFIG_ARCH_AT91RM9200
        /* AT91RM9200 SDRAM low-power mode cannot be used with self-refresh. */
-       at91_ramc_write(0, AT91RM9200_SDRAMC_LPR, 0);
-#endif
+       if (cpu_is_at91rm9200())
+               at91_ramc_write(0, AT91RM9200_SDRAMC_LPR, 0);
 
        suspend_set_ops(&at91_pm_ops);
 
index 89f56f3a802e4d0726ae6f60db62bf41881a57f4..38f467c6b710ff11b8cfcf8d98ab6f3d54179570 100644 (file)
@@ -12,7 +12,6 @@
 #define __ARCH_ARM_MACH_AT91_PM
 
 #include <mach/at91_ramc.h>
-#ifdef CONFIG_ARCH_AT91RM9200
 #include <mach/at91rm9200_sdramc.h>
 
 /*
@@ -43,10 +42,6 @@ static inline void at91rm9200_standby(void)
                  "r" (lpr));
 }
 
-#define at91_standby at91rm9200_standby
-
-#elif defined(CONFIG_ARCH_AT91SAM9G45)
-
 /* We manage both DDRAM/SDRAM controllers, we need more than one value to
  * remember.
  */
@@ -75,11 +70,7 @@ static inline void at91sam9g45_standby(void)
        at91_ramc_write(1, AT91_DDRSDRC_LPR, saved_lpr1);
 }
 
-#define at91_standby at91sam9g45_standby
-
-#else
-
-#ifdef CONFIG_ARCH_AT91SAM9263
+#ifdef CONFIG_SOC_AT91SAM9263
 /*
  * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use;
  * handle those cases both here and in the Suspend-To-RAM support.
@@ -102,8 +93,4 @@ static inline void at91sam9_standby(void)
        at91_ramc_write(0, AT91_SDRAMC_LPR, saved_lpr);
 }
 
-#define at91_standby at91sam9_standby
-
-#endif
-
 #endif
index db5452123f17b5e564f6378db72dd6a75e8931ed..098c28ddf025fb95dfae6530ee547a7aaf76358b 100644 (file)
@@ -18,7 +18,7 @@
 #include <mach/at91_ramc.h>
 
 
-#ifdef CONFIG_ARCH_AT91SAM9263
+#ifdef CONFIG_SOC_AT91SAM9263
 /*
  * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use;
  * handle those cases both here and in the Suspend-To-RAM support.
index f44a2e7272e33f8e8568c4bc597db0bc0b38f5b5..944bffb08991366a453b1036eff75d19094b6ffd 100644 (file)
@@ -143,6 +143,11 @@ static void __init soc_detect(u32 dbgu_base)
                at91_soc_initdata.type = AT91_SOC_SAM9X5;
                at91_boot_soc = at91sam9x5_soc;
                break;
+
+       case ARCH_ID_AT91SAM9N12:
+               at91_soc_initdata.type = AT91_SOC_SAM9N12;
+               at91_boot_soc = at91sam9n12_soc;
+               break;
        }
 
        /* at91sam9g10 */
@@ -210,6 +215,7 @@ static const char *soc_name[] = {
        [AT91_SOC_SAM9G45]      = "at91sam9g45",
        [AT91_SOC_SAM9RL]       = "at91sam9rl",
        [AT91_SOC_SAM9X5]       = "at91sam9x5",
+       [AT91_SOC_SAM9N12]      = "at91sam9n12",
        [AT91_SOC_NONE]         = "Unknown"
 };
 
index 5db4aa45404aaeecca0e4fa11de1cf1bc9260dcb..a9cfeb15371959b06d800325b0d9896217842b02 100644 (file)
@@ -20,36 +20,41 @@ extern struct at91_init_soc at91sam9263_soc;
 extern struct at91_init_soc at91sam9g45_soc;
 extern struct at91_init_soc at91sam9rl_soc;
 extern struct at91_init_soc at91sam9x5_soc;
+extern struct at91_init_soc at91sam9n12_soc;
 
 static inline int at91_soc_is_enabled(void)
 {
        return at91_boot_soc.init != NULL;
 }
 
-#if !defined(CONFIG_ARCH_AT91RM9200)
+#if !defined(CONFIG_SOC_AT91RM9200)
 #define at91rm9200_soc at91_boot_soc
 #endif
 
-#if !(defined(CONFIG_ARCH_AT91SAM9260) || defined(CONFIG_ARCH_AT91SAM9G20))
+#if !defined(CONFIG_SOC_AT91SAM9260)
 #define at91sam9260_soc        at91_boot_soc
 #endif
 
-#if !(defined(CONFIG_ARCH_AT91SAM9261) || defined(CONFIG_ARCH_AT91SAM9G10))
+#if !defined(CONFIG_SOC_AT91SAM9261)
 #define at91sam9261_soc        at91_boot_soc
 #endif
 
-#if !defined(CONFIG_ARCH_AT91SAM9263)
+#if !defined(CONFIG_SOC_AT91SAM9263)
 #define at91sam9263_soc        at91_boot_soc
 #endif
 
-#if !defined(CONFIG_ARCH_AT91SAM9G45)
+#if !defined(CONFIG_SOC_AT91SAM9G45)
 #define at91sam9g45_soc        at91_boot_soc
 #endif
 
-#if !defined(CONFIG_ARCH_AT91SAM9RL)
+#if !defined(CONFIG_SOC_AT91SAM9RL)
 #define at91sam9rl_soc at91_boot_soc
 #endif
 
-#if !defined(CONFIG_ARCH_AT91SAM9X5)
+#if !defined(CONFIG_SOC_AT91SAM9X5)
 #define at91sam9x5_soc at91_boot_soc
 #endif
+
+#if !defined(CONFIG_SOC_AT91SAM9N12)
+#define at91sam9n12_soc        at91_boot_soc
+#endif
index 5af36aa56c08c140f899c702537ca0867d6f135c..b29a788f498cbcd93e96f7c21329785bab4dd094 100644 (file)
@@ -102,7 +102,7 @@ static int __init mop500_uib_init(void)
        struct i2c_adapter *i2c0;
        int ret;
 
-       if (!cpu_is_u8500())
+       if (!cpu_is_u8500_family())
                return -ENODEV;
 
        if (uib) {
index 77a75ed0df6729ff85452ce216ab1ef9f354fd57..677bb7683c71067efec6029aebca36252b6b143a 100644 (file)
@@ -36,9 +36,11 @@ static int __init ux500_l2x0_unlock(void)
 
 static int __init ux500_l2x0_init(void)
 {
+       u32 aux_val = 0x3e000000;
+
        if (cpu_is_u5500())
                l2x0_base = __io_address(U5500_L2CC_BASE);
-       else if (cpu_is_u8500())
+       else if (cpu_is_u8500_family())
                l2x0_base = __io_address(U8500_L2CC_BASE);
        else
                ux500_unknown_soc();
@@ -46,11 +48,19 @@ static int __init ux500_l2x0_init(void)
        /* Unlock before init */
        ux500_l2x0_unlock();
 
+       /* DB9540's L2 has 128KB way size */
+       if (cpu_is_u9540())
+               /* 128KB way size */
+               aux_val |= (0x4 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT);
+       else
+               /* 64KB way size */
+               aux_val |= (0x3 << L2X0_AUX_CTRL_WAY_SIZE_SHIFT);
+
        /* 64KB way size, 8 way associativity, force WA */
        if (of_have_populated_dt())
-               l2x0_of_init(0x3e060000, 0xc0000fff);
+               l2x0_of_init(aux_val, 0xc0000fff);
        else
-               l2x0_init(l2x0_base, 0x3e060000, 0xc0000fff);
+               l2x0_init(l2x0_base, aux_val, 0xc0000fff);
 
        /*
         * We can't disable l2 as we are in non secure mode, currently
index ec35f0aa5665a99d23f11c73ec552ab6e83f3aca..cc87f7788ff582463dad84743e2cf6112aac444f 100644 (file)
@@ -151,7 +151,7 @@ static unsigned long clk_mtu_get_rate(struct clk *clk)
 
        if (cpu_is_u5500())
                addr = __io_address(U5500_PRCMU_BASE);
-       else if (cpu_is_u8500())
+       else if (cpu_is_u8500_family())
                addr = __io_address(U8500_PRCMU_BASE);
        else
                ux500_unknown_soc();
index 9bd8163896cfa241a76839aa7be5830b3f052eaf..b16834270880f085dc022f4b36ba8db6256e0021 100644 (file)
@@ -34,8 +34,8 @@ static struct map_desc u8500_uart_io_desc[] __initdata = {
        __IO_DEV_DESC(U8500_UART0_BASE, SZ_4K),
        __IO_DEV_DESC(U8500_UART2_BASE, SZ_4K),
 };
-
-static struct map_desc u8500_io_desc[] __initdata = {
+/*  U8500 and U9540 common io_desc */
+static struct map_desc u8500_common_io_desc[] __initdata = {
        /* SCU base also covers GIC CPU BASE and TWD with its 4K page */
        __IO_DEV_DESC(U8500_SCU_BASE, SZ_4K),
        __IO_DEV_DESC(U8500_GIC_DIST_BASE, SZ_4K),
@@ -49,12 +49,23 @@ static struct map_desc u8500_io_desc[] __initdata = {
        __IO_DEV_DESC(U8500_CLKRST5_BASE, SZ_4K),
        __IO_DEV_DESC(U8500_CLKRST6_BASE, SZ_4K),
 
-       __IO_DEV_DESC(U8500_PRCMU_BASE, SZ_4K),
        __IO_DEV_DESC(U8500_GPIO0_BASE, SZ_4K),
        __IO_DEV_DESC(U8500_GPIO1_BASE, SZ_4K),
        __IO_DEV_DESC(U8500_GPIO2_BASE, SZ_4K),
        __IO_DEV_DESC(U8500_GPIO3_BASE, SZ_4K),
+};
+
+/* U8500 IO map specific description */
+static struct map_desc u8500_io_desc[] __initdata = {
+       __IO_DEV_DESC(U8500_PRCMU_BASE, SZ_4K),
        __IO_DEV_DESC(U8500_PRCMU_TCDM_BASE, SZ_4K),
+
+};
+
+/* U9540 IO map specific description */
+static struct map_desc u9540_io_desc[] __initdata = {
+       __IO_DEV_DESC(U8500_PRCMU_BASE, SZ_4K + SZ_8K),
+       __IO_DEV_DESC(U8500_PRCMU_TCDM_BASE, SZ_4K + SZ_8K),
 };
 
 void __init u8500_map_io(void)
@@ -66,7 +77,12 @@ void __init u8500_map_io(void)
 
        ux500_map_io();
 
-       iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc));
+       iotable_init(u8500_common_io_desc, ARRAY_SIZE(u8500_common_io_desc));
+
+       if (cpu_is_u9540())
+               iotable_init(u9540_io_desc, ARRAY_SIZE(u9540_io_desc));
+       else
+               iotable_init(u8500_io_desc, ARRAY_SIZE(u8500_io_desc));
 
        _PRCMU_BASE = __io_address(U8500_PRCMU_BASE);
 }
index d11f3892a27dffe6a596a5c279ecdd355b44f280..857e48167526dc92862d23269a06155904539123 100644 (file)
@@ -43,7 +43,7 @@ void __init ux500_init_irq(void)
        if (cpu_is_u5500()) {
                dist_base = __io_address(U5500_GIC_DIST_BASE);
                cpu_base = __io_address(U5500_GIC_CPU_BASE);
-       } else if (cpu_is_u8500()) {
+       } else if (cpu_is_u8500_family()) {
                dist_base = __io_address(U8500_GIC_DIST_BASE);
                cpu_base = __io_address(U8500_GIC_CPU_BASE);
        } else
@@ -62,7 +62,7 @@ void __init ux500_init_irq(void)
         */
        if (cpu_is_u5500())
                db5500_prcmu_early_init();
-       if (cpu_is_u8500())
+       if (cpu_is_u8500_family())
                db8500_prcmu_early_init();
        clk_init();
 }
index 15a0f63b2e2bace8f8c82797f0ba1ae6483da4e1..d1579920139fbc104bbe8ccf52847e17a30c43c2 100644 (file)
@@ -23,7 +23,7 @@ static unsigned int ux500_read_asicid(phys_addr_t addr)
 {
        phys_addr_t base = addr & ~0xfff;
        struct map_desc desc = {
-               .virtual        = IO_ADDRESS(base),
+               .virtual        = UX500_VIRT_ROM,
                .pfn            = __phys_to_pfn(base),
                .length         = SZ_16K,
                .type           = MT_DEVICE,
@@ -35,7 +35,7 @@ static unsigned int ux500_read_asicid(phys_addr_t addr)
        local_flush_tlb_all();
        flush_cache_all();
 
-       return readl(__io_address(addr));
+       return readl(IOMEM(UX500_VIRT_ROM + (addr & 0xfff)));
 }
 
 static void ux500_print_soc_info(unsigned int asicid)
@@ -67,6 +67,7 @@ static unsigned int partnumber(unsigned int asicid)
  * DB8500v2    0x412fc091      0x9001DBF4              0x008500B0
  * DB8520v2.2  0x412fc091      0x9001DBF4              0x008500B2
  * DB5500v1    0x412fc091      0x9001FFF4              0x005500A0
+ * DB9540      0x413fc090      0xFFFFDBF4              0x009540xx
  */
 
 void __init ux500_map_io(void)
@@ -91,6 +92,10 @@ void __init ux500_map_io(void)
                /* DB5500v1 */
                addr = 0x9001FFF4;
                break;
+
+       case 0x413fc090: /* DB9540 */
+               addr = 0xFFFFDBF4;
+               break;
        }
 
        if (addr)
index 9ec20b96d8f2bd33f256ae74e127dd592e6e6095..1530d493879d534b647d67862fa4073ff2018e26 100644 (file)
 /* ASIC ID is at 0xbf4 offset within this region */
 #define U8500_ASIC_ID_BASE     0x9001D000
 
+#define U9540_BOOT_ROM_BASE    0xFFFE0000
+/* ASIC ID is at 0xbf4 offset within this region */
+#define U9540_ASIC_ID_BASE     0xFFFFD000
+
 #define U8500_PER6_BASE                0xa03c0000
 #define U8500_PER7_BASE                0xa03d0000
 #define U8500_PER5_BASE                0xa03e0000
 #define U8500_SCR_BASE         (U8500_PER4_BASE + 0x05000)
 #define U8500_DMC_BASE         (U8500_PER4_BASE + 0x06000)
 #define U8500_PRCMU_BASE       (U8500_PER4_BASE + 0x07000)
+#define U9540_DMC1_BASE                (U8500_PER4_BASE + 0x0A000)
 #define U8500_PRCMU_TCDM_BASE  (U8500_PER4_BASE + 0x68000)
+#define U9540_PRCMU_TCDM_BASE  (U8500_PER4_BASE + 0x6A000)
 #define U8500_PRCMU_TCPM_BASE   (U8500_PER4_BASE + 0x60000)
 #define U8500_PRCMU_TIMER_3_BASE (U8500_PER4_BASE + 0x07338)
 #define U8500_PRCMU_TIMER_4_BASE (U8500_PER4_BASE + 0x07450)
index f84698936d360d198aeba20313ddbce4b936ff67..836165778a2d2ef390f6cb01cf62867d931e04bf 100644 (file)
@@ -17,6 +17,8 @@
  */
 #define U8500_IO_VIRTUAL       0xf0000000
 #define U8500_IO_PHYSICAL      0xa0000000
+/* This is where we map in the ROM to check ASIC IDs */
+#define UX500_VIRT_ROM         0xf0000000
 
 /* This macro is used in assembly, so no cast */
 #define IO_ADDRESS(x)           \
@@ -24,6 +26,7 @@
 
 /* typesafe io address */
 #define __io_address(n)                IOMEM(IO_ADDRESS(n))
+
 /* Used by some plat-nomadik code */
 #define io_p2v(n)              __io_address(n)
 
index 833d6a6edc9b0ebd10755b4b62af9e865ab40225..c6e2db9e9e5143db632a422fee1ff46067651715 100644 (file)
@@ -41,6 +41,16 @@ static inline bool __attribute_const__ cpu_is_u8500(void)
        return dbx500_partnumber() == 0x8500;
 }
 
+static inline bool __attribute_const__ cpu_is_u9540(void)
+{
+       return dbx500_partnumber() == 0x9540;
+}
+
+static inline bool cpu_is_u8500_family(void)
+{
+       return cpu_is_u8500() || cpu_is_u9540();
+}
+
 static inline bool __attribute_const__ cpu_is_u5500(void)
 {
        return dbx500_partnumber() == 0x5500;
@@ -111,7 +121,12 @@ static inline bool cpu_is_u8500v21(void)
 
 static inline bool cpu_is_u8500v20_or_later(void)
 {
-       return cpu_is_u8500() && !cpu_is_u8500v10() && !cpu_is_u8500v11();
+       /*
+        * U9540 has so much in common with U8500 that is is considered a
+        * U8500 variant.
+        */
+       return cpu_is_u9540() ||
+               (cpu_is_u8500() && !cpu_is_u8500v10() && !cpu_is_u8500v11());
 }
 
 static inline bool ux500_is_svp(void)
index c23a6b5f0c4eefd58220620043316d999b3d651d..7da9ec58a531a517bb5dd5dc0348bb7cd3c54949 100644 (file)
@@ -24,7 +24,7 @@
  */
 #define IRQ_MTU0               (IRQ_SHPI_START + 4)
 
-#define DBX500_NR_INTERNAL_IRQS                160
+#define DBX500_NR_INTERNAL_IRQS                166
 
 /* After chip-specific IRQ numbers we have the GPIO ones */
 #define NOMADIK_NR_GPIO                        288
index eff5842f6232a8f7d0af9e29a87477508ce9f455..f499a0703928fb14db701f2b424442e4996e33bd 100644 (file)
@@ -50,7 +50,7 @@ static void __iomem *scu_base_addr(void)
 {
        if (cpu_is_u5500())
                return __io_address(U5500_SCU_BASE);
-       else if (cpu_is_u8500())
+       else if (cpu_is_u8500_family())
                return __io_address(U8500_SCU_BASE);
        else
                ux500_unknown_soc();
@@ -122,7 +122,7 @@ static void __init wakeup_secondary(void)
 
        if (cpu_is_u5500())
                backupram = __io_address(U5500_BACKUPRAM0_BASE);
-       else if (cpu_is_u8500())
+       else if (cpu_is_u8500_family())
                backupram = __io_address(U8500_BACKUPRAM0_BASE);
        else
                ux500_unknown_soc();
index d37df98b5c32588d65450867900e7d87a6f4aec9..3bfbfdf833c6b2ae6acb9d12da0952fb34f550cd 100644 (file)
@@ -51,7 +51,7 @@ static void __init ux500_timer_init(void)
        if (cpu_is_u5500()) {
                mtu_timer_base = __io_address(U5500_MTU0_BASE);
                prcmu_timer_base = __io_address(U5500_PRCMU_TIMER_3_BASE);
-       } else if (cpu_is_u8500()) {
+       } else if (cpu_is_u8500_family()) {
                mtu_timer_base = __io_address(U8500_MTU0_BASE);
                prcmu_timer_base = __io_address(U8500_PRCMU_TIMER_4_BASE);
        } else {
index 0689bf6b01833495967faf00e68c3b1136a44b9c..b2402eb076c787eafd111d643982f0a6422bb41a 100644 (file)
@@ -62,7 +62,7 @@ config HW_RANDOM_AMD
 
 config HW_RANDOM_ATMEL
        tristate "Atmel Random Number Generator support"
-       depends on HW_RANDOM && ARCH_AT91SAM9G45
+       depends on HW_RANDOM && HAVE_CLK
        default HW_RANDOM
        ---help---
          This driver provides kernel-side support for the Random Number
index 0bf1b8910eebe74a6e86a32b3338ddf0a6d1ef1a..74b830b635a65d48260e4b5e9ff4a9aa889dbf97 100644 (file)
@@ -161,7 +161,7 @@ static struct cpufreq_driver db8500_cpufreq_driver = {
 
 static int __init db8500_cpufreq_register(void)
 {
-       if (!cpu_is_u8500v20_or_later())
+       if (!cpu_is_u8500_family())
                return -ENODEV;
 
        pr_info("cpufreq for DB8500 started\n");
index 2a2141915aa04939a4a1f9f9f96b0ef9a58072b6..75838d7710ce61db466d87ea9cbc3164f6bd8d4a 100644 (file)
@@ -489,10 +489,10 @@ config TOUCHSCREEN_TI_TSCADC
 
 config TOUCHSCREEN_ATMEL_TSADCC
        tristate "Atmel Touchscreen Interface"
-       depends on ARCH_AT91SAM9RL || ARCH_AT91SAM9G45
+       depends on ARCH_AT91
        help
          Say Y here if you have a 4-wire touchscreen connected to the
-          ADC Controller on your Atmel SoC (such as the AT91SAM9RL).
+          ADC Controller on your Atmel SoC.
 
          If unsure, say N.
 
index 8c8377d50c4c4578724c6149bbd084744e7c92fb..4161bfe462cd5f958c1f1d790bd9ef795df8b530 100644 (file)
@@ -838,7 +838,7 @@ config RTC_DRV_AT32AP700X
 
 config RTC_DRV_AT91RM9200
        tristate "AT91RM9200 or some AT91SAM9 RTC"
-       depends on ARCH_AT91RM9200 || ARCH_AT91SAM9RL || ARCH_AT91SAM9G45
+       depends on ARCH_AT91
        help
          Driver for the internal RTC (Realtime Clock) module found on
          Atmel AT91RM9200's and some  AT91SAM9 chips. On AT91SAM9 chips