diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2012-03-09 17:11:06 +0530 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-03-13 02:08:57 -0700 |
commit | f82714f7ad89d645817d4df5332e6968b09dbaa6 (patch) | |
tree | 861b3b3fa652a8989d6043a0f81d03d5e3bb6664 /drivers/tty | |
parent | 2dc66456e144cbf9b25e2b6f4f8bbe2876c0c15e (diff) |
serial: tegra: Define correct port type
When doing the cat /proc/tty/driver/tegra_uart, the serial
core display the message as
0: uart:unknown port:00000000 irq:68 tx:0 rx:0 CTS|DSR|CD|RI
4: uart:unknown port:00000000 irq:123 tx:0 rx:0 CTS|DSR|CD|RI
This is because the correct port type and iotype are not getting
set in tegra serial driver.
Setting these parameter to proper to display the information as
1: uart:TEGRA_UART mmio:0x70006040 irq:69 tx:0 rx:0 CTS|DSR|CD|RI
2: uart:TEGRA_UART mmio:0x70006200 irq:78 tx:477 rx:1603 RTS|CTS|DTR|DSR|CD|RI
3: uart:TEGRA_UART mmio:0x70006300 irq:122 tx:0 rx:0 CTS|DSR|CD|RI
4: uart:TEGRA_UART mmio:0x70006400 irq:123 tx:0 rx:0 CTS|DSR|CD|RI
bug 889724
Change-Id: Ia095623c53d1a3840c4d3759141cdf23cc2d4547
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/89122
Reviewed-by: Bitan Biswas <bbiswas@nvidia.com>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/tegra_hsuart.c | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/drivers/tty/serial/tegra_hsuart.c b/drivers/tty/serial/tegra_hsuart.c index fd68004a2765..4169cbcbf299 100644 --- a/drivers/tty/serial/tegra_hsuart.c +++ b/drivers/tty/serial/tegra_hsuart.c @@ -43,6 +43,8 @@ #include <mach/dma.h> #include <mach/clk.h> +#define TEGRA_UART_TYPE "TEGRA_UART" + #define TX_EMPTY_STATUS (UART_LSR_TEMT | UART_LSR_THRE) #define BYTES_TO_ALIGN(x) ((unsigned long)(ALIGN((x), sizeof(u32))) - \ @@ -1368,7 +1370,7 @@ static void tegra_pm(struct uart_port *u, unsigned int state, static const char *tegra_type(struct uart_port *u) { - return 0; + return TEGRA_UART_TYPE; } static struct uart_ops tegra_uart_ops = { @@ -1421,7 +1423,7 @@ static int __init tegra_uart_probe(struct platform_device *pdev) platform_set_drvdata(pdev, u); u->line = pdev->id; u->ops = &tegra_uart_ops; - u->type = ~PORT_UNKNOWN; + u->type = PORT_TEGRA; u->fifosize = 32; resource = platform_get_resource(pdev, IORESOURCE_MEM, 0); @@ -1436,6 +1438,7 @@ static int __init tegra_uart_probe(struct platform_device *pdev) ret = -ENOMEM; goto fail; } + u->iotype = UPIO_MEM32; u->irq = platform_get_irq(pdev, 0); if (unlikely(u->irq < 0)) { |