OMAP: UART: Fix the revision register read.
authorRuchika Kharwar <ruchika@ti.com>
Mon, 8 Jul 2013 07:28:57 +0000 (10:28 +0300)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Fri, 26 Jul 2013 22:55:44 +0000 (15:55 -0700)
The revision register is a 32 bit register. The serial_in() function reads
only the lower 16 bits of the register. This leads to an incorrect computation
of the Module revision.

Signed-off-by: Ruchika Kharwar <ruchika@ti.com>
[oleksandr.savchenko@ti.com: add some whitespaces]
Signed-off-by: Alexander Savchenko <oleksandr.savchenko@ti.com>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/omap-serial.c

index 9271a1dceec3d2993703aba1250db691bfacefd5..9b6fc54967f2d4c923963cd252d7cb4c249b6547 100644 (file)
@@ -1344,7 +1344,7 @@ static void omap_serial_fill_features_erratas(struct uart_omap_port *up)
        u32 mvr, scheme;
        u16 revision, major, minor;
 
-       mvr = serial_in(up, UART_OMAP_MVER);
+       mvr = readl(up->port.membase + (UART_OMAP_MVER << up->port.regshift));
 
        /* Check revision register scheme */
        scheme = mvr >> OMAP_UART_MVR_SCHEME_SHIFT;