diff options
author | Nicolas Ferre <nicolas.ferre@atmel.com> | 2016-01-26 11:26:15 +0100 |
---|---|---|
committer | Greg Kroah-Hartman <gregkh@linuxfoundation.org> | 2016-02-07 07:40:25 +0100 |
commit | 1d673fb971d4411e92991ca17ff2b54ce19af3a4 (patch) | |
tree | 5c3f192196637bb22243833637cf787b11650077 /drivers/tty | |
parent | serial: atmel: trivial: clean the IP version decoding code (diff) | |
download | linux-1d673fb971d4411e92991ca17ff2b54ce19af3a4.tar.xz linux-1d673fb971d4411e92991ca17ff2b54ce19af3a4.zip |
serial: atmel: add support for new UART version
Starting with sama5d2, the new UART revision has an hardware timer. So, add it
to the IP detection code and set the "has_hw_timer" property for it.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Reported-by: David Mosberger <davidm@egauge.net>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/atmel_serial.c | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/drivers/tty/serial/atmel_serial.c b/drivers/tty/serial/atmel_serial.c index a429cfef0286..ede011828727 100644 --- a/drivers/tty/serial/atmel_serial.c +++ b/drivers/tty/serial/atmel_serial.c @@ -1710,15 +1710,16 @@ static void atmel_get_ip_name(struct uart_port *port) struct atmel_uart_port *atmel_port = to_atmel_uart_port(port); int name = atmel_uart_readl(port, ATMEL_US_NAME); u32 version; - u32 usart, dbgu_uart; + u32 usart, dbgu_uart, new_uart; /* ASCII decoding for IP version */ usart = 0x55534152; /* USAR(T) */ dbgu_uart = 0x44424755; /* DBGU */ + new_uart = 0x55415254; /* UART */ atmel_port->has_hw_timer = false; - if (name == usart) { - dev_dbg(port->dev, "Usart with hw timer\n"); + if (name == usart || name == new_uart) { + dev_dbg(port->dev, "Usart or uart with hw timer\n"); atmel_port->has_hw_timer = true; } else if (name == dbgu_uart) { dev_dbg(port->dev, "Dbgu or uart without hw timer\n"); |