diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2012-05-23 17:16:59 +0530 |
---|---|---|
committer | Varun Wadekar <vwadekar@nvidia.com> | 2012-06-07 14:21:56 +0530 |
commit | f07f4867e4584851a02a2f66a33dfb11055558bf (patch) | |
tree | df7350b58ee9e41ddd728041e4f41e51181665db /drivers/tty | |
parent | 779e8508c21cc7f4de9301decf97322fd6564044 (diff) |
serial: tegra: disable interrupt when changing configuration
Disable the interrupts when the baudrate or any uart
configuration. This will avoid the interrupt to be call
when configuration is getting change.
bug 984164
bug 969087
Change-Id: Id008964773237726a0ec4a04c428d3975bf3ebd9
Signed-off-by: Laxman Dewangan <ldewangan@nvidia.com>
Reviewed-on: http://git-master/r/104476
Reviewed-by: Automatic_Commit_Validation_User
Tested-by: Pradeep Goudagunta <pgoudagunta@nvidia.com>
GVS: Gerrit_Virtual_Submit
Reviewed-by: David Yu (Engrg-SW) <davyu@nvidia.com>
Tested-by: David Yu (Engrg-SW) <davyu@nvidia.com>
Diffstat (limited to 'drivers/tty')
-rw-r--r-- | drivers/tty/serial/tegra_hsuart.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/drivers/tty/serial/tegra_hsuart.c b/drivers/tty/serial/tegra_hsuart.c index dfeb1081e931..5e8ff0dc1480 100644 --- a/drivers/tty/serial/tegra_hsuart.c +++ b/drivers/tty/serial/tegra_hsuart.c @@ -1264,6 +1264,12 @@ static void tegra_set_termios(struct uart_port *u, struct ktermios *termios, if (t->rts_active) set_rts(t, false); + /* Clear all interrupts as configuration is going to be change */ + uart_writeb(t, t->ier_shadow | UART_IER_RDI, UART_IER); + uart_readb(t, UART_IER); + uart_writeb(t, 0, UART_IER); + uart_readb(t, UART_IER); + /* Parity */ lcr = t->lcr_shadow; lcr &= ~UART_LCR_PARITY; @@ -1336,6 +1342,13 @@ static void tegra_set_termios(struct uart_port *u, struct ktermios *termios, /* update the port timeout based on new settings */ uart_update_timeout(u, termios->c_cflag, baud); + /* Make sure all write has completed */ + uart_readb(t, UART_IER); + + /* Reenable interrupt */ + uart_writeb(t, t->ier_shadow, UART_IER); + uart_readb(t, UART_IER); + spin_unlock_irqrestore(&u->lock, flags); dev_vdbg(t->uport.dev, "-tegra_set_termios\n"); return; |