]> www.pilppa.org Git - linux-2.6-omap-h63xx.git/blobdiff - arch/arm/mach-at91/board-carmeva.c
[ARM] 5059/1: [AT91] Convert to new-style UART initialization
[linux-2.6-omap-h63xx.git] / arch / arm / mach-at91 / board-carmeva.c
index b4518619063a2b439c80837bf12545e80bf3d104..9854fc3dd1f268f65e2abbf90757e97233aed2a0 100644 (file)
 #include "generic.h"
 
 
-/*
- * Serial port configuration.
- *    0 .. 3 = USART0 .. USART3
- *    4      = DBGU
- */
-static struct at91_uart_config __initdata carmeva_uart_config = {
-       .console_tty    = 0,                            /* ttyS0 */
-       .nr_tty         = 2,
-       .tty_map        = { 4, 1, -1, -1, -1 }          /* ttyS0, ..., ttyS4 */
-};
-
 static void __init carmeva_map_io(void)
 {
        /* Initialize processor: 20.000 MHz crystal */
        at91rm9200_initialize(20000000, AT91RM9200_BGA);
 
-       /* Setup the serial ports and console */
-       at91_init_serial(&carmeva_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);
+
+       /* set serial console to ttyS0 (ie, DBGU) */
+       at91_set_serial_console(0);
 }
 
 static void __init carmeva_init_irq(void)
@@ -79,7 +76,7 @@ static struct at91_udc_data __initdata carmeva_udc_data = {
        .pullup_pin     = AT91_PIN_PD9,
 };
 
-/* FIXME: user dependend */
+/* FIXME: user dependant */
 // static struct at91_cf_data __initdata carmeva_cf_data = {
 //     .det_pin        = AT91_PIN_PB0,
 //     .rst_pin        = AT91_PIN_PC5,
@@ -100,17 +97,17 @@ static struct spi_board_info carmeva_spi_devices[] = {
                .chip_select  = 0,
                .max_speed_hz = 10 * 1000 * 1000,
        },
-       { /* User accessable spi - cs1 (250KHz) */
+       { /* User accessible spi - cs1 (250KHz) */
                .modalias = "spi-cs1",
                .chip_select  = 1,
                .max_speed_hz = 250 *  1000,
        },
-       { /* User accessable spi - cs2 (1MHz) */
+       { /* User accessible spi - cs2 (1MHz) */
                .modalias = "spi-cs2",
                .chip_select  = 2,
                .max_speed_hz = 1 * 1000 *  1000,
        },
-       { /* User accessable spi - cs3 (10MHz) */
+       { /* User accessible spi - cs3 (10MHz) */
                .modalias = "spi-cs3",
                .chip_select  = 3,
                .max_speed_hz = 10 * 1000 *  1000,
@@ -128,7 +125,7 @@ static void __init carmeva_board_init(void)
        /* USB Device */
        at91_add_device_udc(&carmeva_udc_data);
        /* I2C */
-       at91_add_device_i2c();
+       at91_add_device_i2c(NULL, 0);
        /* SPI */
        at91_add_device_spi(carmeva_spi_devices, ARRAY_SIZE(carmeva_spi_devices));
        /* Compact Flash */