From b78eabde89f9b19d463a77abe420508c0ef29249 Mon Sep 17 00:00:00 2001 From: Andrew Victor Date: Wed, 2 Apr 2008 21:38:40 +0100 Subject: [ARM] 4902/1: [AT91] SAM9/CAP9 memory controller header The AT91CAP9 processor includes the same Static Memory Controller (SMC) peripheral as the SAM9 processors, but replaces the SDRAM Controller with a DDR/SDR Controller (DDRSDRC). This patch splits the existing include/asm-arm/arch-at91/at91sam926x_mc.h into at91sam9_sdramc.h and at91sam9_smc.h. It also adds an at91cap9_ddrsdr.h for the DDRSDRC controller. Signed-off-by: Andrew Victor Signed-off-by: Russell King --- arch/arm/mach-at91/board-sam9263ek.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'arch/arm/mach-at91/board-sam9263ek.c') diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index bf103b24c937..a65bd1654021 100644 --- a/arch/arm/mach-at91/board-sam9263ek.c +++ b/arch/arm/mach-at91/board-sam9263ek.c @@ -43,7 +43,7 @@ #include #include -#include +#include #include "generic.h" -- cgit v1.2.3-59-g8ed1b From a3da12229f4f9bee2ed66ac34a54a4e8b74bcbcb Mon Sep 17 00:00:00 2001 From: Andrew Victor Date: Wed, 2 Apr 2008 21:47:29 +0100 Subject: [ARM] 4905/1: [AT91] Atmel SAM9 boards updated to new-style UART initialization Convert the Atmel SAM9260-EK, SAM9261-EK, SAM9263-EK and SAM9RL-EK boards to use the new-style UART initialization. Signed-off-by: Sedji Gaouaou Signed-off-by: Andrew Victor Signed-off-by: Russell King --- arch/arm/mach-at91/board-sam9260ek.c | 26 +++++++++++++------------- arch/arm/mach-at91/board-sam9261ek.c | 18 +++++------------- arch/arm/mach-at91/board-sam9263ek.c | 21 ++++++++------------- arch/arm/mach-at91/board-sam9rlek.c | 21 ++++++++------------- 4 files changed, 34 insertions(+), 52 deletions(-) (limited to 'arch/arm/mach-at91/board-sam9263ek.c') diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c index 8c657a9288ee..440553632b53 100644 --- a/arch/arm/mach-at91/board-sam9260ek.c +++ b/arch/arm/mach-at91/board-sam9260ek.c @@ -42,24 +42,24 @@ #include "generic.h" -/* - * Serial port configuration. - * 0 .. 5 = USART0 .. USART5 - * 6 = DBGU - */ -static struct at91_uart_config __initdata ek_uart_config = { - .console_tty = 0, /* ttyS0 */ - .nr_tty = 3, - .tty_map = { 6, 0, 1, -1, -1, -1, -1 } /* ttyS0, ..., ttyS6 */ -}; - static void __init ek_map_io(void) { /* Initialize processor: 18.432 MHz crystal */ at91sam9260_initialize(18432000); - /* Setup the serial ports and console */ - at91_init_serial(&ek_uart_config); + /* DGBU on ttyS0. (Rx & Tx only) */ + at91_register_uart(0, 0, 0); + + /* USART0 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */ + at91_register_uart(AT91SAM9260_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS + | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD + | ATMEL_UART_RI); + + /* USART1 on ttyS2. (Rx, Tx, RTS, CTS) */ + at91_register_uart(AT91SAM9260_ID_US1, 2, ATMEL_UART_CTS | ATMEL_UART_RTS); + + /* set serial console to ttyS0 (ie, DBGU) */ + at91_set_serial_console(0); } static void __init ek_init_irq(void) diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c index f71ff750b3d2..3c73825b58de 100644 --- a/arch/arm/mach-at91/board-sam9261ek.c +++ b/arch/arm/mach-at91/board-sam9261ek.c @@ -49,17 +49,6 @@ #include "generic.h" -/* - * Serial port configuration. - * 0 .. 2 = USART0 .. USART2 - * 3 = DBGU - */ -static struct at91_uart_config __initdata ek_uart_config = { - .console_tty = 0, /* ttyS0 */ - .nr_tty = 1, - .tty_map = { 3, -1, -1, -1 } /* ttyS0, ..., ttyS3 */ -}; - static void __init ek_map_io(void) { /* Initialize processor: 18.432 MHz crystal */ @@ -68,8 +57,11 @@ static void __init ek_map_io(void) /* Setup the LEDs */ at91_init_leds(AT91_PIN_PA13, AT91_PIN_PA14); - /* Setup the serial ports and console */ - at91_init_serial(&ek_uart_config); + /* 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 ek_init_irq(void) diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index a65bd1654021..86a7fb17096c 100644 --- a/arch/arm/mach-at91/board-sam9263ek.c +++ b/arch/arm/mach-at91/board-sam9263ek.c @@ -48,24 +48,19 @@ #include "generic.h" -/* - * Serial port configuration. - * 0 .. 2 = USART0 .. USART2 - * 3 = DBGU - */ -static struct at91_uart_config __initdata ek_uart_config = { - .console_tty = 0, /* ttyS0 */ - .nr_tty = 2, - .tty_map = { 3, 0, -1, -1, } /* ttyS0, ..., ttyS3 */ -}; - static void __init ek_map_io(void) { /* Initialize processor: 16.367 MHz crystal */ at91sam9263_initialize(16367660); - /* Setup the serial ports and console */ - at91_init_serial(&ek_uart_config); + /* DGBU on ttyS0. (Rx & Tx only) */ + at91_register_uart(0, 0, 0); + + /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */ + at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); + + /* set serial console to ttyS0 (ie, DBGU) */ + at91_set_serial_console(0); } static void __init ek_init_irq(void) diff --git a/arch/arm/mach-at91/board-sam9rlek.c b/arch/arm/mach-at91/board-sam9rlek.c index ce83b60c450d..ffc0597aee8d 100644 --- a/arch/arm/mach-at91/board-sam9rlek.c +++ b/arch/arm/mach-at91/board-sam9rlek.c @@ -34,24 +34,19 @@ #include "generic.h" -/* - * Serial port configuration. - * 0 .. 3 = USART0 .. USART3 - * 4 = DBGU - */ -static struct at91_uart_config __initdata ek_uart_config = { - .console_tty = 0, /* ttyS0 */ - .nr_tty = 2, - .tty_map = { 4, 0, -1, -1, -1 } /* ttyS0, ..., ttyS4 */ -}; - static void __init ek_map_io(void) { /* Initialize processor: 12.000 MHz crystal */ at91sam9rl_initialize(12000000); - /* Setup the serial ports and console */ - at91_init_serial(&ek_uart_config); + /* DGBU on ttyS0. (Rx & Tx only) */ + at91_register_uart(0, 0, 0); + + /* USART0 on ttyS1. (Rx, Tx, CTS, RTS) */ + at91_register_uart(AT91SAM9RL_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS); + + /* set serial console to ttyS0 (ie, DBGU) */ + at91_set_serial_console(0); } static void __init ek_init_irq(void) -- cgit v1.2.3-59-g8ed1b From 5b7659d190fff2d69faec07314a51ba708f1f1ce Mon Sep 17 00:00:00 2001 From: Andrew Victor Date: Wed, 2 Apr 2008 22:20:45 +0100 Subject: [ARM] 4911/1: [AT91] LEDs on SAM9260-EK and SAM9261-EK boards Add support for the GPIO-driven LEDs (using NEW_LEDS) on the Atmel SAM9260-EK and SAM9261-EK boards. Signed-off-by: Sedji Gaouaou Signed-off-by: Andrew Victor Signed-off-by: Russell King --- arch/arm/mach-at91/board-sam9260ek.c | 20 ++++++++++++++++++++ arch/arm/mach-at91/board-sam9261ek.c | 25 +++++++++++++++++++++++++ arch/arm/mach-at91/board-sam9263ek.c | 2 +- 3 files changed, 46 insertions(+), 1 deletion(-) (limited to 'arch/arm/mach-at91/board-sam9263ek.c') diff --git a/arch/arm/mach-at91/board-sam9260ek.c b/arch/arm/mach-at91/board-sam9260ek.c index 40c3e95690a9..4d1d9c777084 100644 --- a/arch/arm/mach-at91/board-sam9260ek.c +++ b/arch/arm/mach-at91/board-sam9260ek.c @@ -204,6 +204,24 @@ static struct at91_mmc_data __initdata ek_mmc_data = { // .vcc_pin = ... not connected }; + +/* + * LEDs + */ +static struct gpio_led ek_leds[] = { + { /* "bottom" led, green, userled1 to be defined */ + .name = "ds5", + .gpio = AT91_PIN_PA6, + .active_low = 1, + .default_trigger = "none", + }, + { /* "power" led, yellow */ + .name = "ds1", + .gpio = AT91_PIN_PA9, + .default_trigger = "heartbeat", + } +}; + static void __init ek_board_init(void) { /* Serial */ @@ -225,6 +243,8 @@ static void __init ek_board_init(void) /* SSC (to AT73C213) */ at73c213_set_clk(&at73c213_data); at91_add_device_ssc(AT91SAM9260_ID_SSC, ATMEL_SSC_TX); + /* LEDs */ + at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds)); } MACHINE_START(AT91SAM9260EK, "Atmel AT91SAM9260-EK") diff --git a/arch/arm/mach-at91/board-sam9261ek.c b/arch/arm/mach-at91/board-sam9261ek.c index ce512d74e6e9..08382c0df221 100644 --- a/arch/arm/mach-at91/board-sam9261ek.c +++ b/arch/arm/mach-at91/board-sam9261ek.c @@ -487,6 +487,29 @@ static void __init ek_add_device_buttons(void) static void __init ek_add_device_buttons(void) {} #endif +/* + * LEDs + */ +static struct gpio_led ek_leds[] = { + { /* "bottom" led, green, userled1 to be defined */ + .name = "ds7", + .gpio = AT91_PIN_PA14, + .active_low = 1, + .default_trigger = "none", + }, + { /* "top" led, green, userled2 to be defined */ + .name = "ds8", + .gpio = AT91_PIN_PA13, + .active_low = 1, + .default_trigger = "none", + }, + { /* "power" led, yellow */ + .name = "ds1", + .gpio = AT91_PIN_PA23, + .default_trigger = "heartbeat", + } +}; + static void __init ek_board_init(void) { /* Serial */ @@ -519,6 +542,8 @@ static void __init ek_board_init(void) at91_add_device_lcdc(&ek_lcdc_data); /* Push Buttons */ ek_add_device_buttons(); + /* LEDs */ + at91_gpio_leds(ek_leds, ARRAY_SIZE(ek_leds)); } MACHINE_START(AT91SAM9261EK, "Atmel AT91SAM9261-EK") diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c index 86a7fb17096c..b4cd5d0ed597 100644 --- a/arch/arm/mach-at91/board-sam9263ek.c +++ b/arch/arm/mach-at91/board-sam9263ek.c @@ -336,7 +336,7 @@ static struct gpio_led ek_leds[] = { .name = "ds3", .gpio = AT91_PIN_PB7, .default_trigger = "heartbeat", - }, + } }; -- cgit v1.2.3-59-g8ed1b