]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-at91/board-eb9200.c
[ARM] 5059/1: [AT91] Convert to new-style UART initialization
[linux-2.6-omap-h63xx.git] / arch / arm / mach-at91 / board-eb9200.c
index 20458b5548f0669708eeab4f64baf2ceec1301d7..3fe054e0056bfbdb2ca2efe1518ae483e98fcd86 100644 (file)
 #include "generic.h"
 
 
-/*
- * Serial port configuration.
- *    0 .. 3 = USART0 .. USART3
- *    4      = DBGU
- */
-static struct at91_uart_config __initdata eb9200_uart_config = {
-       .console_tty    = 0,                            /* ttyS0 */
-       .nr_tty         = 2,
-       .tty_map        = { 4, 1, -1, -1, -1 }          /* ttyS0, ..., ttyS4 */
-};
-
 static void __init eb9200_map_io(void)
 {
        /* Initialize processor: 18.432 MHz crystal */
        at91rm9200_initialize(18432000, AT91RM9200_BGA);
 
-       /* Setup the serial ports and console */
-       at91_init_serial(&eb9200_uart_config);
+       /* DBGU on ttyS0. (Rx & Tx only) */
+       at91_register_uart(0, 0, 0);
+
+       /* USART1 on ttyS1. (Rx, Tx, CTS, RTS, DTR, DSR, DCD, RI) */
+       at91_register_uart(AT91RM9200_ID_US1, 1, ATMEL_UART_CTS | ATMEL_UART_RTS
+                       | ATMEL_UART_DTR | ATMEL_UART_DSR | ATMEL_UART_DCD
+                       | ATMEL_UART_RI);
+
+       /* USART2 on ttyS2. (Rx, Tx) - IRDA */
+       at91_register_uart(AT91RM9200_ID_US2, 2, 0);
+
+       /* set serial console to ttyS0 (ie, DBGU) */
+       at91_set_serial_console(0);
 }
 
 static void __init eb9200_init_irq(void)
@@ -91,6 +91,13 @@ static struct at91_mmc_data __initdata eb9200_mmc_data = {
        .wire4          = 1,
 };
 
+static struct i2c_board_info __initdata eb9200_i2c_devices[] = {
+       {
+               I2C_BOARD_INFO("24c512", 0x50),
+       },
+};
+
+
 static void __init eb9200_board_init(void)
 {
        /* Serial */
@@ -102,7 +109,7 @@ static void __init eb9200_board_init(void)
        /* USB Device */
        at91_add_device_udc(&eb9200_udc_data);
        /* I2C */
-       at91_add_device_i2c();
+       at91_add_device_i2c(eb9200_i2c_devices, ARRAY_SIZE(eb9200_i2c_devices));
        /* Compact Flash */
        at91_add_device_cf(&eb9200_cf_data);
        /* SPI */