summaryrefslogtreecommitdiffstats
path: root/drivers/tty
diff options
context:
space:
mode:
authorJamie Iles <jamie@jamieiles.com>2011-08-16 17:47:47 +0100
committerGreg Kroah-Hartman <gregkh@suse.de>2011-08-23 10:54:19 -0700
commit14a8d47d4e9f51372996914c16bdbf1c34e209b5 (patch)
tree68df1fadbf0caf85c0d0aa239ece243d8ee1d8fb /drivers/tty
parent6b1a98d1c4851235d9b6764b3f7b7db7909fc760 (diff)
tty: of_serial: add support for the DesignWare 8250
Support the DesignWare 8250 by a new compatible string and registering the DesignWare helpers. If the registration of the helpers fails, then continue as a normal 8250 as we may still get some useful debug out. Cc: Alan Cox <alan@linux.intel.com> Cc: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Jamie Iles <jamie@jamieiles.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/of_serial.c7
1 files changed, 7 insertions, 0 deletions
diff --git a/drivers/tty/serial/of_serial.c b/drivers/tty/serial/of_serial.c
index e58cece6f44..024926c3be5 100644
--- a/drivers/tty/serial/of_serial.c
+++ b/drivers/tty/serial/of_serial.c
@@ -78,6 +78,12 @@ static int __devinit of_platform_serial_setup(struct platform_device *ofdev,
}
}
+ if (of_device_is_compatible(np, "ns8250dw")) {
+ ret = serial8250_use_designware_io(port);
+ if (ret)
+ dev_warn(&ofdev->dev, "unable to register DesignWare 8250 helpers, continuing as a normal 8250\n");
+ }
+
port->type = type;
port->uartclk = clk;
port->flags = UPF_SHARE_IRQ | UPF_BOOT_AUTOCONF | UPF_IOREMAP
@@ -176,6 +182,7 @@ static int of_platform_serial_remove(struct platform_device *ofdev)
*/
static struct of_device_id __devinitdata of_platform_serial_table[] = {
{ .compatible = "ns8250", .data = (void *)PORT_8250, },
+ { .compatible = "ns8250dw", .data = (void *)PORT_8250, },
{ .compatible = "ns16450", .data = (void *)PORT_16450, },
{ .compatible = "ns16550a", .data = (void *)PORT_16550A, },
{ .compatible = "ns16550", .data = (void *)PORT_16550, },