From 19750336d4cc3a171a5aa5f9a258fb81066cc45e Mon Sep 17 00:00:00 2001 From: Andrew Victor Date: Sat, 24 May 2008 18:10:26 +0100 Subject: [ARM] 5059/1: [AT91] Convert to new-style UART initialization Convert the following AT91RM9200-based boards to the new-style UART initialization: - Conitec ARM&EVA - Atmel AT91RM9200-DK - Embest ATEB9200 - Atmel AT91RM9200-EK - KwikByte KB920x Signed-off-by: Andrew Victor Signed-off-by: Russell King --- arch/arm/mach-at91/board-kb9202.c | 29 ++++++++++++++++------------- 1 file changed, 16 insertions(+), 13 deletions(-) (limited to 'arch/arm/mach-at91/board-kb9202.c') diff --git a/arch/arm/mach-at91/board-kb9202.c b/arch/arm/mach-at91/board-kb9202.c index 4b39b9cda75..cb065febd95 100644 --- a/arch/arm/mach-at91/board-kb9202.c +++ b/arch/arm/mach-at91/board-kb9202.c @@ -37,19 +37,10 @@ #include #include -#include "generic.h" +#include +#include "generic.h" -/* - * Serial port configuration. - * 0 .. 3 = USART0 .. USART3 - * 4 = DBGU - */ -static struct at91_uart_config __initdata kb9202_uart_config = { - .console_tty = 0, /* ttyS0 */ - .nr_tty = 3, - .tty_map = { 4, 0, 1, -1, -1 } /* ttyS0, ..., ttyS4 */ -}; static void __init kb9202_map_io(void) { @@ -59,8 +50,20 @@ static void __init kb9202_map_io(void) /* Set up the LEDs */ at91_init_leds(AT91_PIN_PC19, AT91_PIN_PC18); - /* Setup the serial ports and console */ - at91_init_serial(&kb9202_uart_config); + /* DBGU on ttyS0. (Rx & Tx only) */ + at91_register_uart(0, 0, 0); + + /* USART0 on ttyS1 (Rx & Tx only) */ + at91_register_uart(AT91RM9200_ID_US0, 1, 0); + + /* USART1 on ttyS2 (Rx & Tx only) - IRDA (optional) */ + at91_register_uart(AT91RM9200_ID_US1, 2, 0); + + /* USART3 on ttyS3 (Rx, Tx, CTS, RTS) - RS485 (optional) */ + at91_register_uart(AT91RM9200_ID_US3, 3, ATMEL_UART_CTS | ATMEL_UART_RTS); + + /* set serial console to ttyS0 (ie, DBGU) */ + at91_set_serial_console(0); } static void __init kb9202_init_irq(void) -- cgit v1.2.3