• Jean-Christophe PLAGNIOL-VILLARD's avatar
    atmel_serial: fix internal port num · deba1a0d
    Jean-Christophe PLAGNIOL-VILLARD authored
    the atmel_ports is link to the console number and not the device id
    
    this was not detected on at91 as we always register the dbgu on the console
    as ttyS0
    
    tested on at91sam9263 by setting the dbgu as ttyS1 and use as console
    
    diff --git a/arch/arm/mach-at91/board-sam9263ek.c b/arch/arm/mach-at91/board-sam9263ek.c
    index 70e5646..9b8a14f 100644
    - a/arch/arm/mach-at91/board-sam9263ek.c
    + b/arch/arm/mach-at91/board-sam9263ek.c
    @@ -58,14 +58,14 @@ 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);
    +       /* DBGU on ttyS1. (Rx & Tx only) */
    +       at91_register_uart(0, 1, 0);
    
    -       /* USART0 on ttyS1. (Rx, Tx, RTS, CTS) */
    -       at91_register_uart(AT91SAM9263_ID_US0, 1, ATMEL_UART_CTS | ATMEL_UART_RTS);
    +       /* USART0 on ttyS0. (Rx, Tx, RTS, CTS) */
    +       at91_register_uart(AT91SAM9263_ID_US0, 0, ATMEL_UART_CTS | ATMEL_UART_RTS);
    
    -       /* set serial console to ttyS0 (ie, DBGU) */
    -       at91_set_serial_console(0);
    +       /* set serial console to ttyS1 (ie, DBGU) */
    +       at91_set_serial_console(1);
     }
    
     /*
    Signed-off-by: default avatarJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>
    Cc: Nicolas Ferre <nicolas.ferre@atmel.com>
    Cc: Alan Cox <alan@linux.intel.com>
    Cc: Hans-Christian Egtvedt <hans-christian.egtvedt@atmel.com>
    deba1a0d
atmel_serial.c 44.9 KB