diff options
author | Alejandro Gonzalez <alex.gonzalez@digi.com> | 2010-05-31 12:52:16 +0200 |
---|---|---|
committer | Alejandro Gonzalez <alex.gonzalez@digi.com> | 2010-05-31 12:52:16 +0200 |
commit | af51b9fefd7eaedb4c1df339778cacfea18bb650 (patch) | |
tree | c3a12638788754828d0dc25de0fd2dd945407bbd /drivers | |
parent | 078eff32616f2bafd2c450e44471ab5614d59728 (diff) |
ccwmx51: Name serial ports
Signed-off-by: Alejandro Gonzalez <alex.gonzalez@digi.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/serial/mxc_uart.c | 16 |
1 files changed, 15 insertions, 1 deletions
diff --git a/drivers/serial/mxc_uart.c b/drivers/serial/mxc_uart.c index f212ba96cd5c..cd373ac9cb9a 100644 --- a/drivers/serial/mxc_uart.c +++ b/drivers/serial/mxc_uart.c @@ -1438,7 +1438,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; } /*! |