summaryrefslogtreecommitdiff
path: root/drivers/tty
diff options
context:
space:
mode:
authorIsrael Perez <B37753@freescale.com>2012-10-31 17:13:36 -0500
committerIsrael Perez <B37753@freescale.com>2012-11-05 04:42:36 -0600
commite21b0b06f4b99a22f9cf5d63641c00a6d83d433a (patch)
tree74d1361b83b0a8580fda59c11d57f23abc1bbbd5 /drivers/tty
parentc4128ebe3f9e9cb60c36f6a97d903f8bd7860629 (diff)
ENGR00225875-2 i.MX6Q/Solo Sabreauto Bluetooth H4 fix uart rx timeouts.
Bluetooth H4 protocol is very susceptible to data reception timeouts. DMA transfer only happen when ICD or AGTIM interrutps are trigger. ICD only happen when a N idle frames are present on rx line and rx FIFO is empty. Meanwhile Aging timer is trigger when data in FIFO was been sitting for a period of 8 frames. This patch enable both in order to dispatch data as fast is possible only when the select uart have enable DMA flag. Signed-off-by: Israel Perez <B37753@freescale.com>
Diffstat (limited to 'drivers/tty')
-rw-r--r--drivers/tty/serial/imx.c11
1 files changed, 7 insertions, 4 deletions
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 5e9594d744d9..e76e5b9435b9 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -818,8 +818,11 @@ static void imx_finish_dma(struct imx_port *sport)
* [2] the Aging timer expires(wait for 8 bytes long)
* [3] the Idle Condition Detect(enabled the UCR4_IDDMAEN).
*
- * The [2] and [3] are similar, but [3] is better.
- * [3] can wait for 32 bytes long, so we do not use [2].
+ * [2] is trigger when a character was been sitting in the FIFO
+ * meanwhile [3] can wait for 32 bytes long when the RX line is
+ * on IDLE state and RxFIFO is empty.
+ * Bluetooth H4 is very susceptible to Rx timeouts if data is not available
+ * in a specific period of time so we use both.
*/
static void dma_rx_callback(void *data)
{
@@ -1060,8 +1063,8 @@ static int imx_startup(struct uart_port *port)
temp |= UCR1_RRDYEN | UCR1_RTSDEN | UCR1_UARTEN;
if (sport->enable_dma) {
temp |= UCR1_RDMAEN | UCR1_TDMAEN;
- /* ICD, wait for more than 32 frames, but it still to short. */
- temp |= UCR1_ICD_REG(3);
+ /* ICD,await 4 idle frames also enable AGING Timer */
+ temp |= UCR1_ICD_REG(0)|UCR1_ATDMAEN;
}
if (USE_IRDA(sport)) {