summaryrefslogtreecommitdiff
path: root/drivers/tty/serial/msm_serial.h
diff options
context:
space:
mode:
authorStephen Boyd <sboyd@codeaurora.org>2014-10-29 18:14:38 (GMT)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2014-11-06 22:57:22 (GMT)
commit0896d4d4fb162297d7199410bae386a96a2e473b (patch)
treeebffcbccb557c513550bc73376f21fc29d57560b /drivers/tty/serial/msm_serial.h
parent660beb0e94ad81cfcb6b7846606c0378b0152064 (diff)
downloadlinux-0896d4d4fb162297d7199410bae386a96a2e473b.tar.xz
tty: serial: msm: Support sysrq on uartDM devices
To properly support sysrq on uartDM hardware we need to properly handle break characters. With the DM hardware the fifo can pack 4 characters at a time, where a break is indicated by an all zero byte. Unfortunately, we can't differentiate between an all zero byte for a break and an all zero byte of data, so try and do as best we can. First unmask the RX break start interrupt and record the interrupt when it arrives. Then while processing the fifo, detect the break by searching for an all zero character as long as we recently received an RX break start interrupt. This should make sysrq work fairly well. Cc: Frank Rowand <frank.rowand@sonymobile.com> Cc: Daniel Thompson <daniel.thompson@linaro.org> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Diffstat (limited to 'drivers/tty/serial/msm_serial.h')
-rw-r--r--drivers/tty/serial/msm_serial.h2
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/tty/serial/msm_serial.h b/drivers/tty/serial/msm_serial.h
index 73d3abe..3e1c713 100644
--- a/drivers/tty/serial/msm_serial.h
+++ b/drivers/tty/serial/msm_serial.h
@@ -65,6 +65,7 @@
#define UART_CR_TX_ENABLE (1 << 2)
#define UART_CR_RX_DISABLE (1 << 1)
#define UART_CR_RX_ENABLE (1 << 0)
+#define UART_CR_CMD_RESET_RXBREAK_START ((1 << 11) | (2 << 4))
#define UART_IMR 0x0014
#define UART_IMR_TXLEV (1 << 0)
@@ -72,6 +73,7 @@
#define UART_IMR_RXLEV (1 << 4)
#define UART_IMR_DELTA_CTS (1 << 5)
#define UART_IMR_CURRENT_CTS (1 << 6)
+#define UART_IMR_RXBREAK_START (1 << 10)
#define UART_IPR_RXSTALE_LAST 0x20
#define UART_IPR_STALE_LSB 0x1F