aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/atmel_serial.c
diff options
context:
space:
mode:
authorJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-06-21 00:17:00 -0400
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2011-06-25 01:34:21 -0400
commitdeba1a0d58b54905a5201cb9e1aa878cfc74ff70 (patch)
treeae35eabdf8e32f1d8dddf0857e829c3a96b212c8 /drivers/tty/serial/atmel_serial.c
parent5c1f9668692061b97125e343721c7514ca05a8bb (diff)
atmel_serial: fix internal port num
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: Jean-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>
Diffstat (limited to 'drivers/tty/serial/atmel_serial.c')
-rw-r--r--drivers/tty/serial/atmel_serial.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c
index 6d5d6e679fc7..af9b7814965a 100644
--- a/drivers/tty/serial/atmel_serial.c
+++ b/drivers/tty/serial/atmel_serial.c
@@ -1709,12 +1709,13 @@ static int atmel_serial_resume(struct platform_device *pdev)
1709static int __devinit atmel_serial_probe(struct platform_device *pdev) 1709static int __devinit atmel_serial_probe(struct platform_device *pdev)
1710{ 1710{
1711 struct atmel_uart_port *port; 1711 struct atmel_uart_port *port;
1712 struct atmel_uart_data *pdata = pdev->dev.platform_data;
1712 void *data; 1713 void *data;
1713 int ret; 1714 int ret;
1714 1715
1715 BUILD_BUG_ON(ATMEL_SERIAL_RINGSIZE & (ATMEL_SERIAL_RINGSIZE - 1)); 1716 BUILD_BUG_ON(ATMEL_SERIAL_RINGSIZE & (ATMEL_SERIAL_RINGSIZE - 1));
1716 1717
1717 port = &atmel_ports[pdev->id]; 1718 port = &atmel_ports[pdata->num];
1718 port->backup_imr = 0; 1719 port->backup_imr = 0;
1719 1720
1720 atmel_init_port(port, pdev); 1721 atmel_init_port(port, pdev);