diff options
author | Laxman Dewangan <ldewangan@nvidia.com> | 2012-05-23 17:16:59 +0530 |
---|---|---|
committer | Rohan Somvanshi <rsomvanshi@nvidia.com> | 2012-05-31 23:46:06 -0700 |
commit | 12b2531d0adf256dea0206c472ba8ffef58b65ff (patch) | |
tree | c78612742d6a2a50d98ce8bf3d70667ef894174f /drivers/tty | |
parent | ee944d7e32042a63c7e8068c04e00c2fe0330301 (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 8b65e20c4d3e..484e228dc044 100644 --- a/drivers/tty/serial/tegra_hsuart.c +++ b/drivers/tty/serial/tegra_hsuart.c @@ -1263,6 +1263,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; @@ -1335,6 +1341,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; |