ARM: at91: finnaly add multi soc in the same kernel support
cover ARM: at91: finnaly add multi soc in the same kernel support
HI,
This patch serie finally add the support of multi soc in the same kernel on at91.
For now on it's limited to the DT but we can compile all the core together. We still can not compile the old style board as the same API is define on all SoC but as we move to the DT this will be drop finally too.
The following changes since commit d5ae7361d16f7d628de7ed38d4bdf64379ab54d7:
hwrng: Kconfig: remove dependency for atmel-rng driver (2012-04-08 20:00:33 +0800)
are available in the git repository at:
git://github.com/at91linux/linux-at91.git j/at91_multisoc
for you to fetch changes up to 73bcc4309e6c1f1fa62f3c68b0724730a82a0f34:
ARM: at91: add defconfig for device tree (2012-04-08 23:19:09 +0800)
----------------------------------------------------------------
Jean-Christophe PLAGNIOL-VILLARD (10):
ARM: at91: uncompress Store UART address in a variable
ARM: at91: uncompress: autodetect the uart to use
ARM: at91: drop at91_set_serial_console
ARM: at91: do not pin mux the UARTs in init_early
ARM: at91: move at91_init_leds to board init
ARM: at91: pm select memory controler at runtime
ARM: at91: add SOC_AT91SAM9 kconfig option to factorise select
ARN: at91: introduce SOC_AT91xxx define to allow to compile SoC core support
ARM: at91/dt: do not specify the board any more
ARM: at91: add defconfig for device tree
arch/arm/configs/at91_dt_defconfig | 196 +++++++++++++++++++++++++ arch/arm/configs/at91rm9200_defconfig | 1 + arch/arm/mach-at91/Kconfig | 164 +++++++++------------ arch/arm/mach-at91/Makefile | 26 ++- arch/arm/mach-at91/at91rm9200.c | 12 -- arch/arm/mach-at91/at91rm9200_devices.c | 12 -- arch/arm/mach-at91/at91sam9260.c | 12 -- arch/arm/mach-at91/at91sam9260_devices.c | 12 -- arch/arm/mach-at91/at91sam9261.c | 12 -- arch/arm/mach-at91/at91sam9261_devices.c | 12 -- arch/arm/mach-at91/at91sam9263.c | 12 -- arch/arm/mach-at91/at91sam9263_devices.c | 12 -- arch/arm/mach-at91/at91sam9g45.c | 12 -- arch/arm/mach-at91/at91sam9g45_devices.c | 12 -- arch/arm/mach-at91/at91sam9rl.c | 12 -- arch/arm/mach-at91/at91sam9rl_devices.c | 12 -- arch/arm/mach-at91/board-1arm.c | 24 ++-- arch/arm/mach-at91/board-afeb-9260v1.c | 28 ++-- arch/arm/mach-at91/board-cam60.c | 8 +- arch/arm/mach-at91/board-carmeva.c | 18 +-- arch/arm/mach-at91/board-cpu9krea.c | 52 +++---- arch/arm/mach-at91/board-cpuat91.c | 40 +++--- arch/arm/mach-at91/board-csb337.c | 13 +- arch/arm/mach-at91/board-csb637.c | 8 +- arch/arm/mach-at91/board-dt.c | 14 +- arch/arm/mach-at91/board-eb9200.c | 24 ++-- arch/arm/mach-at91/board-ecbat91.c | 20 +-- arch/arm/mach-at91/board-eco920.c | 13 +- arch/arm/mach-at91/board-flexibity.c | 8 +- arch/arm/mach-at91/board-foxg20.c | 71 ++++----- arch/arm/mach-at91/board-gsia18s.c | 63 ++++---- arch/arm/mach-at91/board-kafa.c | 20 +-- arch/arm/mach-at91/board-kb9202.c | 32 ++--- arch/arm/mach-at91/board-neocore926.c | 14 +- arch/arm/mach-at91/board-pcontrol-g20.c | 21 ++-- arch/arm/mach-at91/board-picotux200.c | 18 +-- arch/arm/mach-at91/board-qil-a9260.c | 31 ++--- arch/arm/mach-at91/board-rm9200dk.c | 24 ++-- arch/arm/mach-at91/board-rm9200ek.c | 24 ++-- arch/arm/mach-at91/board-rsi-ews.c | 36 ++--- arch/arm/mach-at91/board-sam9-l9260.c | 30 ++-- arch/arm/mach-at91/board-sam9260ek.c | 24 ++-- arch/arm/mach-at91/board-sam9261ek.c | 14 +- arch/arm/mach-at91/board-sam9263ek.c | 14 +- arch/arm/mach-at91/board-sam9g20ek.c | 24 ++-- arch/arm/mach-at91/board-sam9m10g45ek.c | 16 +-- arch/arm/mach-at91/board-sam9rlek.c | 14 +- arch/arm/mach-at91/board-snapper9260.c | 18 +-- arch/arm/mach-at91/board-stamp9g20.c | 64 +++----- arch/arm/mach-at91/board-usb-a926x.c | 8 +- arch/arm/mach-at91/board-yl-9200.c | 36 ++--- arch/arm/mach-at91/generic.h | 11 -- arch/arm/mach-at91/include/mach/at91rm9200.h | 5 - arch/arm/mach-at91/include/mach/at91sam9260.h | 7 - arch/arm/mach-at91/include/mach/at91sam9261.h | 4 - arch/arm/mach-at91/include/mach/at91sam9263.h | 4 - arch/arm/mach-at91/include/mach/at91sam9g45.h | 5 - arch/arm/mach-at91/include/mach/at91sam9rl.h | 5 - arch/arm/mach-at91/include/mach/at91sam9x5.h | 8 - arch/arm/mach-at91/include/mach/board.h | 1 - arch/arm/mach-at91/include/mach/cpu.h | 28 ++-- arch/arm/mach-at91/include/mach/hardware.h | 16 +-- arch/arm/mach-at91/include/mach/uncompress.h | 178 +++++++++++++++++++---- arch/arm/mach-at91/pm.c | 12 +- arch/arm/mach-at91/pm.h | 15 +-- arch/arm/mach-at91/pm_slowclock.S | 2 +- arch/arm/mach-at91/soc.h | 14 +- 67 files changed, 834 insertions(+), 898 deletions(-) create mode 100644 arch/arm/configs/at91_dt_defconfig
Best Regards,
J.
PATCH 1/10 ARM: at91: uncompress Store UART address in a variable
This will allow a future change to auto-detect which UART to use.
--- arch/arm/mach-at91/include/mach/uncompress.h | 20 +++++++++++--------- 1 files changed, 11 insertions(+), 9 deletions(-)
arch/arm/mach-at91/include/mach/uncompress.h +11 -9
@@ -43,6 +43,14 @@#define UART_OFFSET AT91_USART5#endif +void __iomem *at91_uart; + +static inline void arch_decomp_setup (void ) +{ +#ifdef UART_OFFSET + at91_uart = (void __iomem *)UART_OFFSET ;/* physical address */ +#endif +}/* * The following code assumes the serial port has already been * initialized by the bootloader. If you didn't setup a port in
@@ -53,27 +61,21 @@static void putc (int c) {#ifdef UART_OFFSET -void __iomem *sys = (void __iomem *)UART_OFFSET ;/* physical address */ - -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 ); +__raw_writel (c, at91_uart +ATMEL_US_THR );#endif }static inline void flush (void ) {#ifdef UART_OFFSET -void __iomem *sys = (void __iomem *)UART_OFFSET ;/* physical address */ -/* 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
Signature · 1 line
1.7.9.1
PATCH 2/10 ARM: at91: uncompress: autodetect the uart to use
In reply to Jean-Christophe PLAGNIOL-VILLARDThis will now autodetect the first uart enabled by the bootloader and will use it for uncompress. This will still assume that the bootloader configured it (pin and clock).
This also allow to include all the soc header together.
--- arch/arm/mach-at91/Kconfig | 53 -------- arch/arm/mach-at91/include/mach/at91rm9200.h | 5 - arch/arm/mach-at91/include/mach/at91sam9260.h | 7 - arch/arm/mach-at91/include/mach/at91sam9261.h | 4 - arch/arm/mach-at91/include/mach/at91sam9263.h | 4 - arch/arm/mach-at91/include/mach/at91sam9g45.h | 5 - arch/arm/mach-at91/include/mach/at91sam9rl.h | 5 - arch/arm/mach-at91/include/mach/at91sam9x5.h | 8 - arch/arm/mach-at91/include/mach/hardware.h | 16 +-- arch/arm/mach-at91/include/mach/uncompress.h | 170 +++++++++++++++++++++---- 10 files changed, 148 insertions(+), 129 deletions(-)
arch/arm/mach-at91/Kconfig +0 -53
@@ -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
@@ -36,16 +27,12 @@ config ARCH_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 select HAVE_AT91_DBGU0 - select HAVE_AT91_USART3 - select HAVE_AT91_USART4 - select HAVE_AT91_USART5 select HAVE_NET_MACB config ARCH_AT91SAM9261
@@ -74,7 +61,6 @@ config ARCH_AT91SAM9RL bool "AT91SAM9RL" select CPU_ARM926T select GENERIC_CLOCKEVENTS - select HAVE_AT91_USART3 select HAVE_FB_ATMEL select HAVE_AT91_DBGU0
@@ -83,16 +69,12 @@ config ARCH_AT91SAM9G20 select CPU_ARM926T select GENERIC_CLOCKEVENTS select HAVE_AT91_DBGU0 - select HAVE_AT91_USART3 - select HAVE_AT91_USART4 - select HAVE_AT91_USART5 select HAVE_NET_MACB config ARCH_AT91SAM9G45 bool "AT91SAM9G45 or AT91SAM9M10 families" select CPU_ARM926T select GENERIC_CLOCKEVENTS - select HAVE_AT91_USART3 select HAVE_FB_ATMEL select HAVE_NET_MACB select HAVE_AT91_DBGU1
@@ -526,41 +508,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, 9rl and 9x5" - 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
arch/arm/mach-at91/include/mach/at91rm9200.h +0 -5
@@ -88,11 +88,6 @@#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. */
arch/arm/mach-at91/include/mach/at91sam9260.h +0 -7
@@ -95,13 +95,6 @@#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.
arch/arm/mach-at91/include/mach/at91sam9261.h +0 -4
@@ -79,10 +79,6 @@#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.
arch/arm/mach-at91/include/mach/at91sam9263.h +0 -4
@@ -95,10 +95,6 @@#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/*
arch/arm/mach-at91/include/mach/at91sam9g45.h +0 -5
@@ -106,11 +106,6 @@#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. */
arch/arm/mach-at91/include/mach/at91sam9rl.h +0 -5
@@ -89,11 +89,6 @@#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.
arch/arm/mach-at91/include/mach/at91sam9x5.h +0 -8
@@ -55,14 +55,6 @@#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. */ #define AT91SAM9X5_SRAM_BASE 0x00300000/* Internal SRAM base address */
arch/arm/mach-at91/include/mach/hardware.h +3 -13
@@ -22,27 +22,17 @@/* 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 -#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.
arch/arm/mach-at91/include/mach/uncompress.h +145 -25
204 lines not on this page · raw message
Signature · 1 line
1.7.9.1
PATCH 3/10 ARM: at91: drop at91_set_serial_console
In reply to Jean-Christophe PLAGNIOL-VILLARDat91_set_serial_console is used to define the default console of linux. This is already manage by the cmdline. And if the boot loader can not be modified you can still set it by enabling the CONFIG_CMDLINE_EXTEND option. And then the command-line arguments provided by the boot loader will be appended to the default kernel command string.
--- arch/arm/mach-at91/at91rm9200.c | 12 ------------ arch/arm/mach-at91/at91rm9200_devices.c | 12 ------------ arch/arm/mach-at91/at91sam9260.c | 12 ------------ arch/arm/mach-at91/at91sam9260_devices.c | 12 ------------ arch/arm/mach-at91/at91sam9261.c | 12 ------------ arch/arm/mach-at91/at91sam9261_devices.c | 12 ------------ arch/arm/mach-at91/at91sam9263.c | 12 ------------ arch/arm/mach-at91/at91sam9263_devices.c | 12 ------------ arch/arm/mach-at91/at91sam9g45.c | 12 ------------ arch/arm/mach-at91/at91sam9g45_devices.c | 12 ------------ arch/arm/mach-at91/at91sam9rl.c | 12 ------------ arch/arm/mach-at91/at91sam9rl_devices.c | 12 ------------ arch/arm/mach-at91/board-1arm.c | 3 --- arch/arm/mach-at91/board-afeb-9260v1.c | 3 --- arch/arm/mach-at91/board-cam60.c | 3 --- arch/arm/mach-at91/board-carmeva.c | 3 --- arch/arm/mach-at91/board-cpu9krea.c | 3 --- arch/arm/mach-at91/board-cpuat91.c | 3 --- arch/arm/mach-at91/board-csb337.c | 3 --- arch/arm/mach-at91/board-csb637.c | 3 --- arch/arm/mach-at91/board-eb9200.c | 3 --- arch/arm/mach-at91/board-ecbat91.c | 3 --- arch/arm/mach-at91/board-eco920.c | 3 --- arch/arm/mach-at91/board-flexibity.c | 3 --- arch/arm/mach-at91/board-foxg20.c | 3 --- arch/arm/mach-at91/board-kafa.c | 3 --- arch/arm/mach-at91/board-kb9202.c | 3 --- arch/arm/mach-at91/board-neocore926.c | 3 --- arch/arm/mach-at91/board-picotux200.c | 3 --- arch/arm/mach-at91/board-qil-a9260.c | 4 ---- arch/arm/mach-at91/board-rm9200dk.c | 3 --- arch/arm/mach-at91/board-rm9200ek.c | 3 --- arch/arm/mach-at91/board-rsi-ews.c | 3 --- arch/arm/mach-at91/board-sam9-l9260.c | 3 --- arch/arm/mach-at91/board-sam9260ek.c | 3 --- arch/arm/mach-at91/board-sam9261ek.c | 3 --- arch/arm/mach-at91/board-sam9263ek.c | 3 --- arch/arm/mach-at91/board-sam9g20ek.c | 3 --- arch/arm/mach-at91/board-sam9m10g45ek.c | 3 --- arch/arm/mach-at91/board-sam9rlek.c | 3 --- arch/arm/mach-at91/board-snapper9260.c | 1 - arch/arm/mach-at91/board-stamp9g20.c | 3 --- arch/arm/mach-at91/board-usb-a926x.c | 3 --- arch/arm/mach-at91/board-yl-9200.c | 3 --- arch/arm/mach-at91/generic.h | 11 ----------- arch/arm/mach-at91/include/mach/board.h | 1 - 46 files changed, 0 insertions(+), 251 deletions(-)
arch/arm/mach-at91/at91rm9200.c +0 -12
@@ -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 * -------------------------------------------------------------------- */
arch/arm/mach-at91/at91rm9200_devices.c +0 -12
@@ -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,14 +1160,10 @@ 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 __deprecated at91_init_serial (struct at91_uart_config *config) {}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
arch/arm/mach-at91/at91sam9260.c +0 -12
@@ -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 * -------------------------------------------------------------------- */
arch/arm/mach-at91/at91sam9260_devices.c +0 -12
@@ -1229,14 +1229,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 +1237,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
arch/arm/mach-at91/at91sam9261.c +0 -12
@@ -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 * -------------------------------------------------------------------- */
arch/arm/mach-at91/at91sam9261_devices.c +0 -12
@@ -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
arch/arm/mach-at91/at91sam9263.c +0 -12
@@ -255,18 +255,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 * -------------------------------------------------------------------- */
arch/arm/mach-at91/at91sam9263_devices.c +0 -12
@@ -1461,14 +1461,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 +1469,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
arch/arm/mach-at91/at91sam9g45.c +0 -12
@@ -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 * -------------------------------------------------------------------- */
arch/arm/mach-at91/at91sam9g45_devices.c +0 -12
@@ -1741,14 +1741,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 +1749,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
arch/arm/mach-at91/at91sam9rl.c +0 -12
@@ -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 * -------------------------------------------------------------------- */
arch/arm/mach-at91/at91sam9rl_devices.c +0 -12
@@ -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
arch/arm/mach-at91/board-1arm.c +0 -3
@@ -58,9 +58,6 @@ static void __init onearm_init_early(void)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 = {
arch/arm/mach-at91/board-afeb-9260v1.c +0 -3
@@ -65,9 +65,6 @@ static void __init afeb9260_init_early(void)/* 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 ); }/*
arch/arm/mach-at91/board-cam60.c +0 -3
@@ -52,9 +52,6 @@ static void __init cam60_init_early(void)/* DBGU on ttyS0. (Rx & Tx only) */ at91_register_uart (0 ,0 ,0 ); - -/* set serial console to ttyS0 (ie, DBGU) */ -at91_set_serial_console (0 ); }/*
arch/arm/mach-at91/board-carmeva.c +0 -3
@@ -52,9 +52,6 @@ static void __init carmeva_init_early(void)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 = {
arch/arm/mach-at91/board-cpu9krea.c +0 -3
@@ -77,9 +77,6 @@ static void __init cpu9krea_init_early(void)/* 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 ); }/*
arch/arm/mach-at91/board-cpuat91.c +0 -3
@@ -78,9 +78,6 @@ static void __init cpuat91_init_early(void)/* 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 = {
arch/arm/mach-at91/board-csb337.c +0 -3
@@ -53,9 +53,6 @@ static void __init csb337_init_early(void)/* 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 = {
arch/arm/mach-at91/board-csb637.c +0 -3
@@ -47,9 +47,6 @@ static void __init csb637_init_early(void)/* 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 = {
arch/arm/mach-at91/board-eb9200.c +0 -3
@@ -55,9 +55,6 @@ static void __init eb9200_init_early(void)/* 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 = {
arch/arm/mach-at91/board-ecbat91.c +0 -3
@@ -59,9 +59,6 @@ static void __init ecb_at91init_early(void)/* 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 = {
arch/arm/mach-at91/board-eco920.c +0 -3
@@ -43,9 +43,6 @@ static void __init eco920_init_early(void)/* 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 = {
arch/arm/mach-at91/board-flexibity.c +0 -3
@@ -44,9 +44,6 @@ static void __init flexibity_init_early(void)/* 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 */
arch/arm/mach-at91/board-foxg20.c +0 -3
@@ -93,9 +93,6 @@ static void __init foxg20_init_early(void)/* 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 );
arch/arm/mach-at91/board-kafa.c +0 -3
@@ -56,9 +56,6 @@ static void __init kafa_init_early(void)/* 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 = {
arch/arm/mach-at91/board-kb9202.c +0 -3
@@ -65,9 +65,6 @@ static void __init kb9202_init_early(void)/* 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 = {
arch/arm/mach-at91/board-neocore926.c +0 -3
@@ -61,9 +61,6 @@ static void __init neocore926_init_early(void)/* 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 ); }/*
arch/arm/mach-at91/board-picotux200.c +0 -3
@@ -56,9 +56,6 @@ static void __init picotux200_init_early(void)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 = {
arch/arm/mach-at91/board-qil-a9260.c +0 -4
@@ -66,10 +66,6 @@ static void __init ek_init_early(void)/* 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 ); - }/*
arch/arm/mach-at91/board-rm9200dk.c +0 -3
@@ -61,9 +61,6 @@ static void __init dk_init_early(void)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 = {
arch/arm/mach-at91/board-rm9200ek.c +0 -3
@@ -61,9 +61,6 @@ static void __init ek_init_early(void)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 = {
arch/arm/mach-at91/board-rsi-ews.c +0 -3
@@ -52,9 +52,6 @@ static void __init rsi_ews_init_early(void)/* 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 ); }/*
arch/arm/mach-at91/board-sam9-l9260.c +0 -3
@@ -62,9 +62,6 @@ static void __init ek_init_early(void)/* 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 ); }/*
arch/arm/mach-at91/board-sam9260ek.c +0 -3
@@ -65,9 +65,6 @@ static void __init ek_init_early(void)/* 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 ); }/*
arch/arm/mach-at91/board-sam9261ek.c +0 -3
@@ -64,9 +64,6 @@ static void __init ek_init_early(void)/* DBGU on ttyS0. (Rx & Tx only) */ at91_register_uart (0 ,0 ,0 ); - -/* set serial console to ttyS0 (ie, DBGU) */ -at91_set_serial_console (0 ); }/*
arch/arm/mach-at91/board-sam9263ek.c +0 -3
@@ -63,9 +63,6 @@ static void __init ek_init_early(void)/* 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 ); }/*
arch/arm/mach-at91/board-sam9g20ek.c +0 -3
@@ -76,9 +76,6 @@ static void __init ek_init_early(void)/* 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 ); }/*
arch/arm/mach-at91/board-sam9m10g45ek.c +0 -3
@@ -60,9 +60,6 @@ static void __init ek_init_early(void)/* 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 ); }/*
arch/arm/mach-at91/board-sam9rlek.c +0 -3
@@ -48,9 +48,6 @@ static void __init ek_init_early(void)/* 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 ); }/*
arch/arm/mach-at91/board-snapper9260.c +0 -1
@@ -46,7 +46,6 @@ static void __init snapper9260_init_early(void)/* 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 );
arch/arm/mach-at91/board-stamp9g20.c +0 -3
@@ -39,9 +39,6 @@ void __init stamp9g20_init_early(void)/* 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 )
arch/arm/mach-at91/board-usb-a926x.c +0 -3
@@ -56,9 +56,6 @@ static void __init ek_init_early(void)/* DBGU on ttyS0. (Rx & Tx only) */ at91_register_uart (0 ,0 ,0 ); - -/* set serial console to ttyS0 (ie, DBGU) */ -at91_set_serial_console (0 ); }/*
arch/arm/mach-at91/board-yl-9200.c +0 -3
@@ -75,9 +75,6 @@ static void __init yl9200_init_early(void)/* 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 ); }/*
arch/arm/mach-at91/generic.h +0 -11
@@ -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 );
arch/arm/mach-at91/include/mach/board.h +0 -1
@@ -121,7 +121,6 @@ extern void __init at91_add_device_spi(struct spi_board_info *devices, int nr_de#define ATMEL_UART_RI 0x20extern 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;
Signature · 1 line
1.7.9.1
PATCH 4/10 ARM: at91: do not pin mux the UARTs in init_early
In reply to Jean-Christophe PLAGNIOL-VILLARDThere is no need to pinmux the UART so early in the kernel. Move it to the board init.
This will also allow to finally move the gpio driver to platform device/driver.
--- arch/arm/mach-at91/board-1arm.c | 21 +++++----- arch/arm/mach-at91/board-afeb-9260v1.c | 25 +++++------ arch/arm/mach-at91/board-cam60.c | 5 +- arch/arm/mach-at91/board-carmeva.c | 15 +++---- arch/arm/mach-at91/board-cpu9krea.c | 49 +++++++++++----------- arch/arm/mach-at91/board-cpuat91.c | 37 ++++++++--------- arch/arm/mach-at91/board-csb337.c | 5 +- arch/arm/mach-at91/board-csb637.c | 5 +- arch/arm/mach-at91/board-eb9200.c | 21 +++++----- arch/arm/mach-at91/board-ecbat91.c | 11 ++--- arch/arm/mach-at91/board-eco920.c | 5 +- arch/arm/mach-at91/board-flexibity.c | 5 +- arch/arm/mach-at91/board-foxg20.c | 68 +++++++++++++++---------------- arch/arm/mach-at91/board-gsia18s.c | 63 ++++++++++++++-------------- arch/arm/mach-at91/board-kafa.c | 11 ++--- arch/arm/mach-at91/board-kb9202.c | 23 +++++----- arch/arm/mach-at91/board-neocore926.c | 11 ++--- arch/arm/mach-at91/board-pcontrol-g20.c | 21 +++++----- arch/arm/mach-at91/board-picotux200.c | 15 +++---- arch/arm/mach-at91/board-qil-a9260.c | 27 ++++++------ arch/arm/mach-at91/board-rm9200dk.c | 15 +++---- arch/arm/mach-at91/board-rm9200ek.c | 15 +++---- arch/arm/mach-at91/board-rsi-ews.c | 27 ++++++------ arch/arm/mach-at91/board-sam9-l9260.c | 21 +++++----- arch/arm/mach-at91/board-sam9260ek.c | 21 +++++----- arch/arm/mach-at91/board-sam9261ek.c | 5 +- arch/arm/mach-at91/board-sam9263ek.c | 11 ++--- arch/arm/mach-at91/board-sam9g20ek.c | 21 +++++----- arch/arm/mach-at91/board-sam9m10g45ek.c | 13 +++--- arch/arm/mach-at91/board-sam9rlek.c | 11 ++--- arch/arm/mach-at91/board-snapper9260.c | 17 ++++---- arch/arm/mach-at91/board-stamp9g20.c | 61 +++++++++++----------------- arch/arm/mach-at91/board-usb-a926x.c | 5 +- arch/arm/mach-at91/board-yl-9200.c | 27 ++++++------ 34 files changed, 333 insertions(+), 380 deletions(-)
arch/arm/mach-at91/board-1arm.c +10 -11
@@ -47,17 +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 ); }static struct macb_platform_data __initdata onearm_eth_data = {
@@ -79,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);
arch/arm/mach-at91/board-afeb-9260v1.c +12 -13
@@ -52,19 +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 ); }/*
@@ -180,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);
arch/arm/mach-at91/board-cam60.c +2 -3
@@ -49,9 +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 ); }/*
@@ -172,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));
arch/arm/mach-at91/board-carmeva.c +7 -8
@@ -44,14 +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 ); }static struct macb_platform_data __initdata carmeva_eth_data = {
@@ -136,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);
arch/arm/mach-at91/board-cpu9krea.c +24 -25
61 lines not on this page · raw message
arch/arm/mach-at91/board-cpuat91.c +18 -19
@@ -59,25 +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 ); }static struct macb_platform_data __initdata cpuat91_eth_data = {
@@ -158,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));
arch/arm/mach-at91/board-csb337.c +2 -3
@@ -50,9 +50,6 @@ static void __init csb337_init_early(void)/* Setup the LEDs */ at91_init_leds (AT91_PIN_PB0 ,AT91_PIN_PB1 ); - -/* DBGU on ttyS0 */ -at91_register_uart (0 ,0 ,0 ); }static struct macb_platform_data __initdata csb337_eth_data = {
@@ -226,6 +223,8 @@ static struct gpio_led csb_leds[] = {static void __init csb337_board_init (void ) {/* Serial */ +/* DBGU on ttyS0 */ +at91_register_uart (0 ,0 ,0 );at91_add_device_serial ();/* Ethernet */ at91_add_device_eth (&csb337_eth_data);
arch/arm/mach-at91/board-csb637.c +2 -3
@@ -44,9 +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 ); }static struct macb_platform_data __initdata csb637_eth_data = {
@@ -115,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);
arch/arm/mach-at91/board-eb9200.c +10 -11
@@ -44,17 +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 ); }static struct macb_platform_data __initdata eb9200_eth_data = {
@@ -98,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);
arch/arm/mach-at91/board-ecbat91.c +5 -6
@@ -53,12 +53,6 @@ static void __init ecb_at91init_early(void)/* 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 ); }static struct macb_platform_data __initdata ecb_at91eth_data = {
@@ -149,6 +143,11 @@ static struct spi_board_info __initdata ecb_at91spi_devices[] = {static void __init ecb_at91board_init (void ) {/* 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 */
arch/arm/mach-at91/board-eco920.c +2 -3
@@ -40,9 +40,6 @@ static void __init eco920_init_early(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 ); }static struct macb_platform_data __initdata eco920_eth_data = {
@@ -100,6 +97,8 @@ static struct spi_board_info eco920_spi_devices[] = {static void __init eco920_board_init (void ) { +/* 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);
arch/arm/mach-at91/board-flexibity.c +2 -3
@@ -41,9 +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 ); }/* USB Host port */
@@ -140,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);
arch/arm/mach-at91/board-foxg20.c +33 -35
80 lines not on this page · raw message
arch/arm/mach-at91/board-gsia18s.c +31 -32
75 lines not on this page · raw message
arch/arm/mach-at91/board-kafa.c +5 -6
@@ -50,12 +50,6 @@ static void __init kafa_init_early(void)/* 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 ); }static struct macb_platform_data __initdata kafa_eth_data = {
@@ -77,6 +71,11 @@ static struct at91_udc_data __initdata kafa_udc_data = {static void __init kafa_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 );at91_add_device_serial ();/* Ethernet */ at91_add_device_eth (&kafa_eth_data);
arch/arm/mach-at91/board-kb9202.c +11 -12
@@ -53,18 +53,6 @@ static void __init kb9202_init_early(void)/* 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 ); }static struct macb_platform_data __initdata kb9202_eth_data = {
@@ -113,6 +101,17 @@ static struct atmel_nand_data __initdata kb9202_nand_data = {static void __init kb9202_board_init (void ) {/* 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);
arch/arm/mach-at91/board-neocore926.c +5 -6
@@ -55,12 +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 ); }/*
@@ -338,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 */
arch/arm/mach-at91/board-pcontrol-g20.c +10 -11
@@ -40,17 +40,6 @@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);
arch/arm/mach-at91/board-picotux200.c +7 -8
@@ -48,14 +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 ); }static struct macb_platform_data __initdata picotux200_eth_data = {
@@ -103,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);
arch/arm/mach-at91/board-qil-a9260.c +13 -14
@@ -52,20 +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 ); }/*
@@ -231,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);
arch/arm/mach-at91/board-rm9200dk.c +7 -8
@@ -53,14 +53,6 @@ static void __init dk_init_early(void)/* 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 ); }static struct macb_platform_data __initdata dk_eth_data = {
@@ -188,6 +180,13 @@ static struct gpio_led dk_leds[] = {static void __init dk_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 (&dk_eth_data);
arch/arm/mach-at91/board-rm9200ek.c +7 -8
@@ -53,14 +53,6 @@ static void __init ek_init_early(void)/* 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 ); }static struct macb_platform_data __initdata ek_eth_data = {
@@ -159,6 +151,13 @@ 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 ); + +/* 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);
arch/arm/mach-at91/board-rsi-ews.c +13 -14
@@ -38,20 +38,6 @@ static void __init rsi_ews_init_early(void)/* 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 ); }/*
@@ -202,6 +188,19 @@ static struct platform_device rsiews_nor_flash = {static void __init rsi_ews_board_init (void ) {/* 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 */
arch/arm/mach-at91/board-sam9-l9260.c +10 -11
@@ -51,17 +51,6 @@ static void __init ek_init_early(void)/* 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 ); }/*
@@ -182,6 +171,16 @@ static struct at91_mmc_data __initdata ek_mmc_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, 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);
arch/arm/mach-at91/board-sam9260ek.c +10 -11
@@ -54,17 +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 ); }/*
@@ -317,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);
arch/arm/mach-at91/board-sam9261ek.c +2 -3
@@ -61,9 +61,6 @@ static void __init ek_init_early(void)/* Setup the LEDs */ at91_init_leds (AT91_PIN_PA13 ,AT91_PIN_PA14 ); - -/* DBGU on ttyS0. (Rx & Tx only) */ -at91_register_uart (0 ,0 ,0 ); }/*
@@ -574,6 +571,8 @@ 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 );at91_add_device_serial ();/* USB Host */ at91_add_device_usbh (&ek_usbh_data);
arch/arm/mach-at91/board-sam9263ek.c +5 -6
@@ -57,12 +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 ); }/*
@@ -409,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);
arch/arm/mach-at91/board-sam9g20ek.c +10 -11
@@ -65,17 +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 ); }/*
@@ -369,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);
arch/arm/mach-at91/board-sam9m10g45ek.c +6 -7
@@ -53,13 +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 ); }/*
@@ -454,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);
arch/arm/mach-at91/board-sam9rlek.c +5 -6
@@ -42,12 +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 ); }/*
@@ -293,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);
arch/arm/mach-at91/board-snapper9260.c +8 -9
@@ -43,15 +43,6 @@static void __init snapper9260_init_early (void ) {at91_initialize (18432000 ); - -/* 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 ); }static struct at91_usbh_data __initdata snapper9260_usbh_data = {
@@ -167,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);
arch/arm/mach-at91/board-stamp9g20.c +24 -37
97 lines not on this page · raw message
arch/arm/mach-at91/board-usb-a926x.c +2 -3
@@ -53,9 +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 ); }/*
@@ -322,6 +319,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);
arch/arm/mach-at91/board-yl-9200.c +13 -14
@@ -61,20 +61,6 @@ static void __init yl9200_init_early(void)/* 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 ); }/*
@@ -558,6 +544,19 @@ void __init yl9200_add_device_video(void) {}static void __init yl9200_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 ); + +/* 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);
Signature · 1 line
1.7.9.1
PATCH 5/10 ARM: at91: move at91_init_leds to board init
In reply to Jean-Christophe PLAGNIOL-VILLARDThis will also allow to finally move the gpio driver to platform device/driver.
--- arch/arm/mach-at91/board-csb337.c | 5 ++--- arch/arm/mach-at91/board-ecbat91.c | 6 +++--- arch/arm/mach-at91/board-eco920.c | 5 ++--- arch/arm/mach-at91/board-kafa.c | 6 +++--- arch/arm/mach-at91/board-kb9202.c | 6 +++--- arch/arm/mach-at91/board-rm9200dk.c | 6 +++--- arch/arm/mach-at91/board-rm9200ek.c | 6 +++--- arch/arm/mach-at91/board-rsi-ews.c | 6 +++--- arch/arm/mach-at91/board-sam9-l9260.c | 6 +++--- arch/arm/mach-at91/board-sam9261ek.c | 6 +++--- arch/arm/mach-at91/board-yl-9200.c | 6 +++--- 11 files changed, 31 insertions(+), 33 deletions(-)
arch/arm/mach-at91/board-csb337.c +2 -3
@@ -47,9 +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 ); }static struct macb_platform_data __initdata csb337_eth_data = {
@@ -222,6 +219,8 @@ 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 );
arch/arm/mach-at91/board-ecbat91.c +3 -3
@@ -50,9 +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 ); }static struct macb_platform_data __initdata ecb_at91eth_data = {
@@ -142,6 +139,9 @@ 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 );
arch/arm/mach-at91/board-eco920.c +2 -3
@@ -37,9 +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 ); }static struct macb_platform_data __initdata eco920_eth_data = {
@@ -97,6 +94,8 @@ 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 ();
arch/arm/mach-at91/board-kafa.c +3 -3
@@ -47,9 +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 ); }static struct macb_platform_data __initdata kafa_eth_data = {
@@ -70,6 +67,9 @@ 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 );
arch/arm/mach-at91/board-kb9202.c +3 -3
@@ -50,9 +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 ); }static struct macb_platform_data __initdata kb9202_eth_data = {
@@ -100,6 +97,9 @@ 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 );
arch/arm/mach-at91/board-rm9200dk.c +3 -3
@@ -50,9 +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 ); }static struct macb_platform_data __initdata dk_eth_data = {
@@ -179,6 +176,9 @@ 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 );
arch/arm/mach-at91/board-rm9200ek.c +3 -3
@@ -50,9 +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 ); }static struct macb_platform_data __initdata ek_eth_data = {
@@ -150,6 +147,9 @@ 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 );
arch/arm/mach-at91/board-rsi-ews.c +3 -3
@@ -35,9 +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 ); }/*
@@ -187,6 +184,9 @@ 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 */
arch/arm/mach-at91/board-sam9-l9260.c +3 -3
@@ -48,9 +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 ); }/*
@@ -170,6 +167,9 @@ 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 );
arch/arm/mach-at91/board-sam9261ek.c +3 -3
@@ -58,9 +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 ); }/*
@@ -570,6 +567,9 @@ 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 );
arch/arm/mach-at91/board-yl-9200.c +3 -3
@@ -58,9 +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 ); }/*
@@ -543,6 +540,9 @@ 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 );
Signature · 1 line
1.7.9.1
PATCH 6/10 ARM: at91: pm select memory controler at runtime
In reply to Jean-Christophe PLAGNIOL-VILLARD--- arch/arm/mach-at91/pm.c | 12 ++++++++---- arch/arm/mach-at91/pm.h | 13 ------------- 2 files changed, 8 insertions(+), 17 deletions(-)
arch/arm/mach-at91/pm.c +8 -4
@@ -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);
arch/arm/mach-at91/pm.h +0 -13
@@ -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,10 +70,6 @@ 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 /* * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use;
@@ -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
Signature · 1 line
1.7.9.1
PATCH v2 6/10 ARM: at91: pm select memory controler at runtime
From: Jean-Christophe PLAGNIOL-VILLARD <[email protected]>
--- arch/arm/mach-at91/cpuidle.c | 8 +++++++- arch/arm/mach-at91/pm.c | 12 ++++++++---- arch/arm/mach-at91/pm.h | 13 ------------- 3 files changed, 15 insertions(+), 18 deletions(-)
arch/arm/mach-at91/cpuidle.c +7 -1
@@ -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; }
arch/arm/mach-at91/pm.c +8 -4
@@ -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);
arch/arm/mach-at91/pm.h +0 -13
@@ -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,10 +70,6 @@ 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 /* * FIXME either or both the SDRAM controllers (EB0, EB1) might be in use;
@@ -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
Signature · 1 line
1.7.10
PATCH 7/10 ARM: at91: add SOC_AT91SAM9 kconfig option to factorise select
In reply to Jean-Christophe PLAGNIOL-VILLARDThis will allow to simplify the switch to multi soc in the same kernel.
--- arch/arm/mach-at91/Kconfig | 29 +++++++++++++---------------- arch/arm/mach-at91/Makefile | 17 +++++++++-------- 2 files changed, 22 insertions(+), 24 deletions(-)
arch/arm/mach-at91/Kconfig +13 -16
@@ -17,6 +17,11 @@ 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
@@ -30,51 +35,44 @@ config ARCH_AT91RM9200 config ARCH_AT91SAM9260 bool "AT91SAM9260 or AT91SAM9XE" - select CPU_ARM926T - select GENERIC_CLOCKEVENTS + select SOC_AT91SAM9 select HAVE_AT91_DBGU0 select HAVE_NET_MACB config ARCH_AT91SAM9261 bool "AT91SAM9261" - select CPU_ARM926T - select GENERIC_CLOCKEVENTS + select SOC_AT91SAM9 select HAVE_FB_ATMEL select HAVE_AT91_DBGU0 config ARCH_AT91SAM9G10 bool "AT91SAM9G10" - select CPU_ARM926T - select GENERIC_CLOCKEVENTS + select SOC_AT91SAM9 select HAVE_AT91_DBGU0 select HAVE_FB_ATMEL config ARCH_AT91SAM9263 bool "AT91SAM9263" - select CPU_ARM926T - select GENERIC_CLOCKEVENTS + select SOC_AT91SAM9 select HAVE_FB_ATMEL select HAVE_NET_MACB select HAVE_AT91_DBGU1 config ARCH_AT91SAM9RL bool "AT91SAM9RL" - select CPU_ARM926T - select GENERIC_CLOCKEVENTS + select SOC_AT91SAM9 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_NET_MACB config ARCH_AT91SAM9G45 bool "AT91SAM9G45 or AT91SAM9M10 families" - select CPU_ARM926T - select GENERIC_CLOCKEVENTS + select SOC_AT91SAM9 select HAVE_FB_ATMEL select HAVE_NET_MACB select HAVE_AT91_DBGU1
@@ -84,8 +82,7 @@ config ARCH_AT91SAM9G45 config ARCH_AT91SAM9X5 bool "AT91SAM9x5 family" - select CPU_ARM926T - select GENERIC_CLOCKEVENTS + select SOC_AT91SAM9 select HAVE_FB_ATMEL select HAVE_NET_MACB select HAVE_AT91_DBGU0
arch/arm/mach-at91/Makefile +9 -8
@@ -10,17 +10,18 @@ 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_ARCH_AT91SAM9260) += at91sam9260.o at91sam9260_devices.o +obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam9261_devices.o +obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261.o at91sam9261_devices.o +obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam9263_devices.o +obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam9rl_devices.o +obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam9260_devices.o +obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam9g45_devices.o +obj-$(CONFIG_ARCH_AT91SAM9X5) += at91sam9x5.o obj-$(CONFIG_ARCH_AT91X40) += at91x40.o at91x40_time.o # AT91RM9200 board-specific support
Signature · 1 line
1.7.9.1
PATCH 8/10 ARN: at91: introduce SOC_AT91xxx define to allow to compile SoC core support
In reply to Jean-Christophe PLAGNIOL-VILLARDWe can now compile all SoC core support together and DT boards. We still can not compile together the non DT board.
So We keep the ARCH_AT91xxx for the non DT board and for backward defconfig compatibility. This will enable the plaform_device ressources.
--- arch/arm/configs/at91rm9200_defconfig | 1 + arch/arm/mach-at91/Kconfig | 86 ++++++++++++++++++++++---------- arch/arm/mach-at91/Makefile | 25 ++++++---- arch/arm/mach-at91/include/mach/cpu.h | 28 ++++------- arch/arm/mach-at91/pm.h | 2 +- arch/arm/mach-at91/pm_slowclock.S | 2 +- arch/arm/mach-at91/soc.h | 14 +++--- 7 files changed, 96 insertions(+), 62 deletions(-)
arch/arm/configs/at91rm9200_defconfig +1 -0
@@ -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
arch/arm/mach-at91/Kconfig +59 -27
135 lines not on this page · raw message
arch/arm/mach-at91/Makefile +16 -9
@@ -13,15 +13,22 @@ 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 at91sam9260_devices.o -obj-$(CONFIG_ARCH_AT91SAM9261) += at91sam9261.o at91sam9261_devices.o -obj-$(CONFIG_ARCH_AT91SAM9G10) += at91sam9261.o at91sam9261_devices.o -obj-$(CONFIG_ARCH_AT91SAM9263) += at91sam9263.o at91sam9263_devices.o -obj-$(CONFIG_ARCH_AT91SAM9RL) += at91sam9rl.o at91sam9rl_devices.o -obj-$(CONFIG_ARCH_AT91SAM9G20) += at91sam9260.o at91sam9260_devices.o -obj-$(CONFIG_ARCH_AT91SAM9G45) += at91sam9g45.o at91sam9g45_devices.o -obj-$(CONFIG_ARCH_AT91SAM9X5) += at91sam9x5.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_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
arch/arm/mach-at91/include/mach/cpu.h +11 -17
@@ -54,6 +54,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,
@@ -106,7 +107,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 +117,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 +161,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)
@@ -189,5 +182,6 @@ static inline int at91_soc_is_detected(void)* definitions may reduce clutter in common drivers. */ #define cpu_is_at32ap7000 () (0) +#endif /* __ASSEMBLY__ */ #endif /* __MACH_CPU_H__ */
arch/arm/mach-at91/pm.h +1 -1
@@ -70,7 +70,7 @@ static inline void at91sam9g45_standby(void)at91_ramc_write (1 ,AT91_DDRSDRC_LPR , saved_lpr1); } -#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.
arch/arm/mach-at91/pm_slowclock.S +1 -1
@@ -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.
arch/arm/mach-at91/soc.h +7 -7
@@ -26,30 +26,30 @@ 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
Signature · 1 line
1.7.9.1
PATCH 9/10 ARM: at91/dt: do not specify the board any more
In reply to Jean-Christophe PLAGNIOL-VILLARDThis will allow to add any board to a compiled kernel by just passing the DTB.
--- arch/arm/mach-at91/board-dt.c | 14 +++++--------- 1 files changed, 5 insertions(+), 9 deletions(-)
arch/arm/mach-at91/board-dt.c +5 -9
@@ -1,12 +1,10 @@/* -* Setup code for AT91SAM Evaluation Kits with Device Tree support +* Setup code for AT91SAM Evaluation Kits with Device Tree support * -* Covers: * AT91SAM9G45-EKES board -* * AT91SAM9M10-EKES board -* * AT91SAM9M10G45-EK board +* Copyright (C) 2011-2012 Atmel, +* 2011-2012 Nicolas Ferre <[email protected]> * -* Copyright (C) 2011 Atmel, -* 2011 Nicolas Ferre <[email protected]> +* Copyright (C) 2011-2012 Jean-Christophe PLAGNIOL-VILLARD <[email protected]> * * Licensed under GPLv2 or later. */
@@ -49,9 +47,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 };
Signature · 1 line
1.7.9.1
PATCH 10/10 ARM: at91: add defconfig for device tree
In reply to Jean-Christophe PLAGNIOL-VILLARDThis will enable all the current soc support on DT (9260, 9g20, 9g45 family and 9x5 family)
--- arch/arm/configs/at91_dt_defconfig | 196 ++++++++++++++++++++++++++++++++++++ 1 files changed, 196 insertions(+), 0 deletions(-) create mode 100644 arch/arm/configs/at91_dt_defconfig
arch/arm/configs/at91_dt_defconfig new file +196 -0
@@ -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
Signature · 1 line
1.7.9.1
cover ARM: at91: finnaly add multi soc in the same kernel support
In reply to Jean-Christophe PLAGNIOL-VILLARDOn 04/08/2012 05:12 PM, Jean-Christophe PLAGNIOL-VILLARD :
Quoted 22 lines
HI,
This patch serie finally add the support of multi soc in the same kernel on at91.
For now on it's limited to the DT but we can compile all the core together. We still can not compile the old style board as the same API is define on all SoC but as we move to the DT this will be drop finally too.
The following changes since commit
d5ae7361d16f7d628de7ed38d4bdf64379ab54d7:hwrng:
Kconfig: remove dependency for atmel-rng driver (2012-04-08 20:00:33 +0800)are available in the git repository at:
git://github.com/at91linux/linux-at91.gitj/at91_multisocfor you to fetch changes up to
73bcc4309e6c1f1fa62f3c68b0724730a82a0f34:ARM: at91: add defconfig for device tree (2012-04-08 23:19:09 +0800)
Quoted 12 lines
----------------------------------------------------------------
Jean-Christophe PLAGNIOL-VILLARD (10):
ARM: at91: uncompress Store UART address in a variable
ARM: at91: uncompress: autodetect the uart to use
ARM: at91: dropat91_set_serial_console
ARM: at91: do not pin mux the UARTs ininit_early
ARM: at91: moveat91_init_ledsto board init
ARM: at91: pm select memory controler at runtime
ARM: at91: addSOC_AT91SAM9kconfig option to factorise select
ARN: at91: introduceSOC_AT91xxxdefine to allow to compile SoC core support
ARM: at91/dt: do not specify the board any more
ARM: at91: add defconfig for device tree
Jean-Christophe, I queue this patch series in a "cleanup" branch for 3.5 (and add my "Acked-by" to patches not tagged).
Thanks for this work.
Cheers,
Quoted 74 lines
arch/arm/configs/at91_dt_defconfig | 196 +++++++++++++++++++++++++ arch/arm/configs/at91rm9200_defconfig | 1 + arch/arm/mach-at91/Kconfig | 164 +++++++++------------ arch/arm/mach-at91/Makefile | 26 ++- arch/arm/mach-at91/at91rm9200.c | 12 -- arch/arm/mach-at91/at91rm9200_devices.c | 12 -- arch/arm/mach-at91/at91sam9260.c | 12 -- arch/arm/mach-at91/at91sam9260_devices.c | 12 -- arch/arm/mach-at91/at91sam9261.c | 12 -- arch/arm/mach-at91/at91sam9261_devices.c | 12 -- arch/arm/mach-at91/at91sam9263.c | 12 -- arch/arm/mach-at91/at91sam9263_devices.c | 12 -- arch/arm/mach-at91/at91sam9g45.c | 12 -- arch/arm/mach-at91/at91sam9g45_devices.c | 12 -- arch/arm/mach-at91/at91sam9rl.c | 12 -- arch/arm/mach-at91/at91sam9rl_devices.c | 12 -- arch/arm/mach-at91/board-1arm.c | 24 ++-- arch/arm/mach-at91/board-afeb-9260v1.c | 28 ++-- arch/arm/mach-at91/board-cam60.c | 8 +- arch/arm/mach-at91/board-carmeva.c | 18 +-- arch/arm/mach-at91/board-cpu9krea.c | 52 +++---- arch/arm/mach-at91/board-cpuat91.c | 40 +++--- arch/arm/mach-at91/board-csb337.c | 13 +- arch/arm/mach-at91/board-csb637.c | 8 +- arch/arm/mach-at91/board-dt.c | 14 +- arch/arm/mach-at91/board-eb9200.c | 24 ++-- arch/arm/mach-at91/board-ecbat91.c | 20 +-- arch/arm/mach-at91/board-eco920.c | 13 +- arch/arm/mach-at91/board-flexibity.c | 8 +- arch/arm/mach-at91/board-foxg20.c | 71 ++++----- arch/arm/mach-at91/board-gsia18s.c | 63 ++++---- arch/arm/mach-at91/board-kafa.c | 20 +-- arch/arm/mach-at91/board-kb9202.c | 32 ++--- arch/arm/mach-at91/board-neocore926.c | 14 +- arch/arm/mach-at91/board-pcontrol-g20.c | 21 ++-- arch/arm/mach-at91/board-picotux200.c | 18 +-- arch/arm/mach-at91/board-qil-a9260.c | 31 ++--- arch/arm/mach-at91/board-rm9200dk.c | 24 ++-- arch/arm/mach-at91/board-rm9200ek.c | 24 ++-- arch/arm/mach-at91/board-rsi-ews.c | 36 ++--- arch/arm/mach-at91/board-sam9-l9260.c | 30 ++-- arch/arm/mach-at91/board-sam9260ek.c | 24 ++-- arch/arm/mach-at91/board-sam9261ek.c | 14 +- arch/arm/mach-at91/board-sam9263ek.c | 14 +- arch/arm/mach-at91/board-sam9g20ek.c | 24 ++-- arch/arm/mach-at91/board-sam9m10g45ek.c | 16 +-- arch/arm/mach-at91/board-sam9rlek.c | 14 +- arch/arm/mach-at91/board-snapper9260.c | 18 +-- arch/arm/mach-at91/board-stamp9g20.c | 64 +++----- arch/arm/mach-at91/board-usb-a926x.c | 8 +- arch/arm/mach-at91/board-yl-9200.c | 36 ++--- arch/arm/mach-at91/generic.h | 11 -- arch/arm/mach-at91/include/mach/at91rm9200.h | 5 - arch/arm/mach-at91/include/mach/at91sam9260.h | 7 - arch/arm/mach-at91/include/mach/at91sam9261.h | 4 - arch/arm/mach-at91/include/mach/at91sam9263.h | 4 - arch/arm/mach-at91/include/mach/at91sam9g45.h | 5 - arch/arm/mach-at91/include/mach/at91sam9rl.h | 5 - arch/arm/mach-at91/include/mach/at91sam9x5.h | 8 - arch/arm/mach-at91/include/mach/board.h | 1 - arch/arm/mach-at91/include/mach/cpu.h | 28 ++-- arch/arm/mach-at91/include/mach/hardware.h | 16 +-- arch/arm/mach-at91/include/mach/uncompress.h | 178 +++++++++++++++++++---- arch/arm/mach-at91/pm.c | 12 +- arch/arm/mach-at91/pm.h | 15 +-- arch/arm/mach-at91/pm_slowclock.S | 2 +- arch/arm/mach-at91/soc.h | 14 +- 67 files changed, 834 insertions(+), 898 deletions(-) create mode 100644 arch/arm/configs/at91_dt_defconfigBest Regards,
J.
Signature · 1 line
Nicolas Ferre