OSDN Git Service

ARM: OMAP2+: UART: Remove uart reset function.
authorGovindraj.R <govindraj.raja@ti.com>
Mon, 7 Nov 2011 13:28:55 +0000 (18:58 +0530)
committerKevin Hilman <khilman@ti.com>
Thu, 15 Dec 2011 00:05:21 +0000 (16:05 -0800)
Remove the uart reset function which is configuring the
TX empty irq which can now be handled within omap-serial driver.

Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
Acked-by: Greg Kroah-Hartman <gregkh@suse.de> (for drivers/tty changes)
Signed-off-by: Kevin Hilman <khilman@ti.com>
arch/arm/mach-omap2/serial.c
arch/arm/plat-omap/include/plat/omap-serial.h
drivers/tty/serial/omap-serial.c

index 64b0d11..b3f3284 100644 (file)
@@ -74,19 +74,6 @@ struct omap_uart_state {
 static LIST_HEAD(uart_list);
 static u8 num_uarts;
 
-/*
- * Internal UARTs need to be initialized for the 8250 autoconfig to work
- * properly. Note that the TX watermark initialization may not be needed
- * once the 8250.c watermark handling code is merged.
- */
-
-static inline void __init omap_uart_reset(struct omap_uart_state *uart)
-{
-       serial_write_reg(uart, UART_OMAP_MDR1, UART_OMAP_MDR1_DISABLE);
-       serial_write_reg(uart, UART_OMAP_SCR, 0x08);
-       serial_write_reg(uart, UART_OMAP_MDR1, UART_OMAP_MDR1_16X_MODE);
-}
-
 #if defined(CONFIG_PM) && defined(CONFIG_ARCH_OMAP3)
 
 /*
@@ -521,7 +508,6 @@ void __init omap_serial_init_port(struct omap_board_data *bdata)
 
        omap_device_enable(uart->pdev);
        omap_uart_idle_init(uart);
-       omap_uart_reset(uart);
        omap_hwmod_enable_wakeup(uart->oh);
        omap_device_idle(uart->pdev);
 
index 70e7738..5b913c7 100644 (file)
@@ -33,6 +33,8 @@
 
 #define OMAP_MODE13X_SPEED     230400
 
+#define OMAP_UART_SCR_TX_EMPTY 0x08
+
 /* WER = 0x7F
  * Enable module level wakeup in WER reg
  */
index 5327ff0..f5a5ed6 100644 (file)
@@ -770,6 +770,7 @@ serial_omap_set_termios(struct uart_port *port, struct ktermios *termios,
        serial_out(up, UART_IER, up->ier);
        serial_out(up, UART_LCR, cval);         /* reset DLAB */
        up->lcr = cval;
+       up->scr = OMAP_UART_SCR_TX_EMPTY;
 
        /* FIFOs and DMA Settings */