summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlejandro Gonzalez <alex.gonzalez@digi.com>2010-05-31 12:52:16 +0200
committerAlejandro Gonzalez <alex.gonzalez@digi.com>2011-01-20 18:56:45 +0100
commit17bd8a1caf71d97a590b611f1be50576aa2f2361 (patch)
tree593613942f4889e259683a300c1ac232ea9ae46a
parent51deb5d53c6c7a03bf8f07dbfc37dfdf2add6898 (diff)
ccwmx51: Name serial ports
Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
-rw-r--r--drivers/serial/mxc_uart.c16
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/serial/mxc_uart.c b/drivers/serial/mxc_uart.c
index 347a7462c396..af246c901581 100644
--- a/drivers/serial/mxc_uart.c
+++ b/drivers/serial/mxc_uart.c
@@ -1419,7 +1419,21 @@ static void mxcuart_set_termios(struct uart_port *port,
*/
static const char *mxcuart_type(struct uart_port *port)
{
- return port->type == PORT_IMX ? "Freescale i.MX" : NULL;
+ struct platform_device *pdev;
+
+ if (port->type == PORT_IMX) {
+ pdev = to_platform_device(port->dev);
+ if (0 == pdev->id)
+ return "Freescale i.MX UART1";
+ else if (1 == pdev->id)
+ return "Freescale i.MX UART2";
+ else if (2 == pdev->id)
+ return "Freescale i.MX UART3)";
+ else
+ return NULL;
+ }
+ else
+ return NULL;
}
/*!