* [PATCH v2 1/6] serial: imx: fix polarity of RI
2016-03-24 13:24 [PATCH v2 0/6] serial: imx: handshaking fixes and improvments Uwe Kleine-König
@ 2016-03-24 13:24 ` Uwe Kleine-König
2016-03-24 13:24 ` [PATCH v2 2/6] serial: imx: let irq handler return IRQ_NONE if no event was handled Uwe Kleine-König
` (5 subsequent siblings)
6 siblings, 0 replies; 27+ messages in thread
From: Uwe Kleine-König @ 2016-03-24 13:24 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Martin Fuzzey, Baruch Siach, linux-arm-kernel, kernel,
linux-serial
When in DTE mode, the bit USR2_RIIN is active low. So invert the logic
accordingly.
Fixes: 90ebc4838666 ("serial: imx: repair and complete handshaking")
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/tty/serial/imx.c | 6 +++---
1 file changed, 3 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 231e7d5caf6c..bfc4555c63d1 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -797,9 +797,9 @@ static unsigned int imx_get_hwmctrl(struct imx_port *sport)
if (!(usr1 & USR2_DCDIN))
tmp |= TIOCM_CAR;
- /* in DCE mode RIIN is always 0 */
- if (readl(sport->port.membase + USR2) & USR2_RIIN)
- tmp |= TIOCM_RI;
+ if (sport->dte_mode)
+ if (!(readl(sport->port.membase + USR2) & USR2_RIIN))
+ tmp |= TIOCM_RI;
return tmp;
}
--
2.7.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v2 2/6] serial: imx: let irq handler return IRQ_NONE if no event was handled
2016-03-24 13:24 [PATCH v2 0/6] serial: imx: handshaking fixes and improvments Uwe Kleine-König
2016-03-24 13:24 ` [PATCH v2 1/6] serial: imx: fix polarity of RI Uwe Kleine-König
@ 2016-03-24 13:24 ` Uwe Kleine-König
2016-03-24 13:24 ` [PATCH v2 3/6] serial: imx: make sure unhandled irqs are disabled Uwe Kleine-König
` (4 subsequent siblings)
6 siblings, 0 replies; 27+ messages in thread
From: Uwe Kleine-König @ 2016-03-24 13:24 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Martin Fuzzey, Baruch Siach, linux-arm-kernel, kernel,
linux-serial
This gives the irq core a chance to disable the serial interrupt in case
an event isn't cleared in the handler.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/tty/serial/imx.c | 17 +++++++++++++----
1 file changed, 13 insertions(+), 4 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index bfc4555c63d1..5ced61e1de6a 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -734,6 +734,7 @@ static irqreturn_t imx_int(int irq, void *dev_id)
struct imx_port *sport = dev_id;
unsigned int sts;
unsigned int sts2;
+ irqreturn_t ret = IRQ_NONE;
sts = readl(sport->port.membase + USR1);
sts2 = readl(sport->port.membase + USR2);
@@ -743,26 +744,34 @@ static irqreturn_t imx_int(int irq, void *dev_id)
imx_dma_rxint(sport);
else
imx_rxint(irq, dev_id);
+ ret = IRQ_HANDLED;
}
if ((sts & USR1_TRDY &&
readl(sport->port.membase + UCR1) & UCR1_TXMPTYEN) ||
(sts2 & USR2_TXDC &&
- readl(sport->port.membase + UCR4) & UCR4_TCEN))
+ readl(sport->port.membase + UCR4) & UCR4_TCEN)) {
imx_txint(irq, dev_id);
+ ret = IRQ_HANDLED;
+ }
- if (sts & USR1_RTSD)
+ if (sts & USR1_RTSD) {
imx_rtsint(irq, dev_id);
+ ret = IRQ_HANDLED;
+ }
- if (sts & USR1_AWAKE)
+ if (sts & USR1_AWAKE) {
writel(USR1_AWAKE, sport->port.membase + USR1);
+ ret = IRQ_HANDLED;
+ }
if (sts2 & USR2_ORE) {
sport->port.icount.overrun++;
writel(USR2_ORE, sport->port.membase + USR2);
+ ret = IRQ_HANDLED;
}
- return IRQ_HANDLED;
+ return ret;
}
/*
--
2.7.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v2 3/6] serial: imx: make sure unhandled irqs are disabled
2016-03-24 13:24 [PATCH v2 0/6] serial: imx: handshaking fixes and improvments Uwe Kleine-König
2016-03-24 13:24 ` [PATCH v2 1/6] serial: imx: fix polarity of RI Uwe Kleine-König
2016-03-24 13:24 ` [PATCH v2 2/6] serial: imx: let irq handler return IRQ_NONE if no event was handled Uwe Kleine-König
@ 2016-03-24 13:24 ` Uwe Kleine-König
2016-03-24 13:24 ` [PATCH v2 4/6] serial: imx: only count 0->1 transitions for RNG Uwe Kleine-König
` (3 subsequent siblings)
6 siblings, 0 replies; 27+ messages in thread
From: Uwe Kleine-König @ 2016-03-24 13:24 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Martin Fuzzey, Baruch Siach, linux-arm-kernel, kernel,
linux-serial
Make sure that events that are not handled in the irq function don't
trigger an interrupt.
When the serial port is operated in DTE mode, the events for DCD and RI
events are enabled after a system reset by default.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/tty/serial/imx.c | 23 ++++++++++++++++++++++-
1 file changed, 22 insertions(+), 1 deletion(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 5ced61e1de6a..fcd48fd78bf5 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -1221,11 +1221,32 @@ static int imx_startup(struct uart_port *port)
temp |= (UCR2_RXEN | UCR2_TXEN);
if (!sport->have_rtscts)
temp |= UCR2_IRTS;
+ /*
+ * make sure the edge sensitive RTS-irq is disabled,
+ * we're using RTSD instead.
+ */
+ if (!is_imx1_uart(sport))
+ temp &= ~UCR2_RTSEN;
writel(temp, sport->port.membase + UCR2);
if (!is_imx1_uart(sport)) {
temp = readl(sport->port.membase + UCR3);
- temp |= IMX21_UCR3_RXDMUXSEL | UCR3_ADNIMP;
+
+ /*
+ * The effect of RI and DCD differs depending on the UFCR_DCEDTE
+ * bit. In DCE mode they control the outputs, in DTE mode they
+ * enable the respective irqs. At least the DCD irq cannot be
+ * cleared on i.MX25 at least, so it's not usable and must be
+ * disabled. I don't have test hardware to check if RI has the
+ * same problem but I consider this likely so it's disabled for
+ * now, too.
+ */
+ temp |= IMX21_UCR3_RXDMUXSEL | UCR3_ADNIMP |
+ UCR3_RI | UCR3_DCD;
+
+ if (sport->dte_mode)
+ temp &= ~(UCR3_RI | UCR3_DCD);
+
writel(temp, sport->port.membase + UCR3);
}
--
2.7.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v2 4/6] serial: imx: only count 0->1 transitions for RNG
2016-03-24 13:24 [PATCH v2 0/6] serial: imx: handshaking fixes and improvments Uwe Kleine-König
` (2 preceding siblings ...)
2016-03-24 13:24 ` [PATCH v2 3/6] serial: imx: make sure unhandled irqs are disabled Uwe Kleine-König
@ 2016-03-24 13:24 ` Uwe Kleine-König
2016-03-24 13:24 ` [PATCH v2 5/6] serial: imx: reorder functions to simplify next patch Uwe Kleine-König
` (2 subsequent siblings)
6 siblings, 0 replies; 27+ messages in thread
From: Uwe Kleine-König @ 2016-03-24 13:24 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Martin Fuzzey, Baruch Siach, linux-arm-kernel, kernel,
linux-serial
According to tty_ioctl(4) (from man-pages 4.04) the rng member only
counts 0->1 transitions. For the other signals (DSR, CD, CTS) both edges
are supposed to be counted.
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/tty/serial/imx.c | 2 +-
1 file changed, 1 insertion(+), 1 deletion(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index fcd48fd78bf5..1bf7b86acf66 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -884,7 +884,7 @@ static void imx_mctrl_check(struct imx_port *sport)
sport->old_status = status;
- if (changed & TIOCM_RI)
+ if (changed & TIOCM_RI && status & TIOCM_RI)
sport->port.icount.rng++;
if (changed & TIOCM_DSR)
sport->port.icount.dsr++;
--
2.7.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v2 5/6] serial: imx: reorder functions to simplify next patch
2016-03-24 13:24 [PATCH v2 0/6] serial: imx: handshaking fixes and improvments Uwe Kleine-König
` (3 preceding siblings ...)
2016-03-24 13:24 ` [PATCH v2 4/6] serial: imx: only count 0->1 transitions for RNG Uwe Kleine-König
@ 2016-03-24 13:24 ` Uwe Kleine-König
2016-03-24 13:24 ` [PATCH v2 6/6] serial: imx: implement DSR irq handling for DTE mode Uwe Kleine-König
2016-04-11 16:01 ` [PATCH v2 0/6] serial: imx: handshaking fixes and improvments Petr Štetiar
6 siblings, 0 replies; 27+ messages in thread
From: Uwe Kleine-König @ 2016-03-24 13:24 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Martin Fuzzey, Baruch Siach, linux-arm-kernel, kernel,
linux-serial
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/tty/serial/imx.c | 98 ++++++++++++++++++++++++------------------------
1 file changed, 49 insertions(+), 49 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 1bf7b86acf66..c07e652f8f58 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -729,6 +729,55 @@ static void imx_dma_rxint(struct imx_port *sport)
spin_unlock_irqrestore(&sport->port.lock, flags);
}
+/*
+ * We have a modem side uart, so the meanings of RTS and CTS are inverted.
+ */
+static unsigned int imx_get_hwmctrl(struct imx_port *sport)
+{
+ unsigned int tmp = TIOCM_DSR;
+ unsigned usr1 = readl(sport->port.membase + USR1);
+
+ if (usr1 & USR1_RTSS)
+ tmp |= TIOCM_CTS;
+
+ /* in DCE mode DCDIN is always 0 */
+ if (!(usr1 & USR2_DCDIN))
+ tmp |= TIOCM_CAR;
+
+ if (sport->dte_mode)
+ if (!(readl(sport->port.membase + USR2) & USR2_RIIN))
+ tmp |= TIOCM_RI;
+
+ return tmp;
+}
+
+/*
+ * Handle any change of modem status signal since we were last called.
+ */
+static void imx_mctrl_check(struct imx_port *sport)
+{
+ unsigned int status, changed;
+
+ status = imx_get_hwmctrl(sport);
+ changed = status ^ sport->old_status;
+
+ if (changed == 0)
+ return;
+
+ sport->old_status = status;
+
+ if (changed & TIOCM_RI && status & TIOCM_RI)
+ sport->port.icount.rng++;
+ if (changed & TIOCM_DSR)
+ sport->port.icount.dsr++;
+ if (changed & TIOCM_CAR)
+ uart_handle_dcd_change(&sport->port, status & TIOCM_CAR);
+ if (changed & TIOCM_CTS)
+ uart_handle_cts_change(&sport->port, status & TIOCM_CTS);
+
+ wake_up_interruptible(&sport->port.state->port.delta_msr_wait);
+}
+
static irqreturn_t imx_int(int irq, void *dev_id)
{
struct imx_port *sport = dev_id;
@@ -791,28 +840,6 @@ static unsigned int imx_tx_empty(struct uart_port *port)
return ret;
}
-/*
- * We have a modem side uart, so the meanings of RTS and CTS are inverted.
- */
-static unsigned int imx_get_hwmctrl(struct imx_port *sport)
-{
- unsigned int tmp = TIOCM_DSR;
- unsigned usr1 = readl(sport->port.membase + USR1);
-
- if (usr1 & USR1_RTSS)
- tmp |= TIOCM_CTS;
-
- /* in DCE mode DCDIN is always 0 */
- if (!(usr1 & USR2_DCDIN))
- tmp |= TIOCM_CAR;
-
- if (sport->dte_mode)
- if (!(readl(sport->port.membase + USR2) & USR2_RIIN))
- tmp |= TIOCM_RI;
-
- return tmp;
-}
-
static unsigned int imx_get_mctrl(struct uart_port *port)
{
struct imx_port *sport = (struct imx_port *)port;
@@ -870,33 +897,6 @@ static void imx_break_ctl(struct uart_port *port, int break_state)
}
/*
- * Handle any change of modem status signal since we were last called.
- */
-static void imx_mctrl_check(struct imx_port *sport)
-{
- unsigned int status, changed;
-
- status = imx_get_hwmctrl(sport);
- changed = status ^ sport->old_status;
-
- if (changed == 0)
- return;
-
- sport->old_status = status;
-
- if (changed & TIOCM_RI && status & TIOCM_RI)
- sport->port.icount.rng++;
- if (changed & TIOCM_DSR)
- sport->port.icount.dsr++;
- if (changed & TIOCM_CAR)
- uart_handle_dcd_change(&sport->port, status & TIOCM_CAR);
- if (changed & TIOCM_CTS)
- uart_handle_cts_change(&sport->port, status & TIOCM_CTS);
-
- wake_up_interruptible(&sport->port.state->port.delta_msr_wait);
-}
-
-/*
* This is our per-port timeout handler, for checking the
* modem status signals.
*/
--
2.7.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 27+ messages in thread
* [PATCH v2 6/6] serial: imx: implement DSR irq handling for DTE mode
2016-03-24 13:24 [PATCH v2 0/6] serial: imx: handshaking fixes and improvments Uwe Kleine-König
` (4 preceding siblings ...)
2016-03-24 13:24 ` [PATCH v2 5/6] serial: imx: reorder functions to simplify next patch Uwe Kleine-König
@ 2016-03-24 13:24 ` Uwe Kleine-König
[not found] ` <1470350663.26773.41.camel@googlemail.com>
2016-04-11 16:01 ` [PATCH v2 0/6] serial: imx: handshaking fixes and improvments Petr Štetiar
6 siblings, 1 reply; 27+ messages in thread
From: Uwe Kleine-König @ 2016-03-24 13:24 UTC (permalink / raw)
To: Greg Kroah-Hartman
Cc: Martin Fuzzey, Baruch Siach, linux-arm-kernel, kernel,
linux-serial
Enable reporting of DSR events (which is named DTR in the registers
because Freescale uses the names as seem from a DCE).
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
---
drivers/tty/serial/imx.c | 20 +++++++++++++++++---
1 file changed, 17 insertions(+), 3 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index c07e652f8f58..621e488cbb12 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -114,6 +114,7 @@
#define UCR3_RXDSEN (1<<6) /* Receive status interrupt enable */
#define UCR3_AIRINTEN (1<<5) /* Async IR wake interrupt enable */
#define UCR3_AWAKEN (1<<4) /* Async wake interrupt enable */
+#define UCR3_DTRDEN (1<<3) /* Data Terminal Ready Delta Enable. */
#define IMX21_UCR3_RXDMUXSEL (1<<2) /* RXD Muxed Input Select */
#define UCR3_INVT (1<<1) /* Inverted Infrared transmission */
#define UCR3_BPEN (1<<0) /* Preset registers enable */
@@ -142,7 +143,7 @@
#define USR1_FRAMERR (1<<10) /* Frame error interrupt flag */
#define USR1_RRDY (1<<9) /* Receiver ready interrupt/dma flag */
#define USR1_AGTIM (1<<8) /* Ageing timer interrupt flag */
-#define USR1_TIMEOUT (1<<7) /* Receive timeout interrupt status */
+#define USR1_DTRD (1<<7) /* DTR Delta */
#define USR1_RXDS (1<<6) /* Receiver idle interrupt flag */
#define USR1_AIRINT (1<<5) /* Async IR wake interrupt flag */
#define USR1_AWAKE (1<<4) /* Aysnc wake interrupt flag */
@@ -804,6 +805,19 @@ static irqreturn_t imx_int(int irq, void *dev_id)
ret = IRQ_HANDLED;
}
+ if (sts & USR1_DTRD) {
+ unsigned long flags;
+
+ if (sts & USR1_DTRD)
+ writel(USR1_DTRD, sport->port.membase + USR1);
+
+ spin_lock_irqsave(&sport->port.lock, flags);
+ imx_mctrl_check(sport);
+ spin_unlock_irqrestore(&sport->port.lock, flags);
+
+ ret = IRQ_HANDLED;
+ }
+
if (sts & USR1_RTSD) {
imx_rtsint(irq, dev_id);
ret = IRQ_HANDLED;
@@ -1202,7 +1216,7 @@ static int imx_startup(struct uart_port *port)
/*
* Finally, clear and enable interrupts
*/
- writel(USR1_RTSD, sport->port.membase + USR1);
+ writel(USR1_RTSD | USR1_DTRD, sport->port.membase + USR1);
writel(USR2_ORE, sport->port.membase + USR2);
if (sport->dma_is_inited && !sport->dma_is_enabled)
@@ -1242,7 +1256,7 @@ static int imx_startup(struct uart_port *port)
* now, too.
*/
temp |= IMX21_UCR3_RXDMUXSEL | UCR3_ADNIMP |
- UCR3_RI | UCR3_DCD;
+ UCR3_DTRDEN | UCR3_RI | UCR3_DCD;
if (sport->dte_mode)
temp &= ~(UCR3_RI | UCR3_DCD);
--
2.7.0
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply related [flat|nested] 27+ messages in thread
* Re: [PATCH v2 0/6] serial: imx: handshaking fixes and improvments
2016-03-24 13:24 [PATCH v2 0/6] serial: imx: handshaking fixes and improvments Uwe Kleine-König
` (5 preceding siblings ...)
2016-03-24 13:24 ` [PATCH v2 6/6] serial: imx: implement DSR irq handling for DTE mode Uwe Kleine-König
@ 2016-04-11 16:01 ` Petr Štetiar
2016-04-12 7:46 ` Uwe Kleine-König
6 siblings, 1 reply; 27+ messages in thread
From: Petr Štetiar @ 2016-04-11 16:01 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Martin Fuzzey, Baruch Siach, linux-serial, Greg Kroah-Hartman,
kernel, linux-arm-kernel
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [2016-03-24 14:24:19]:
> Among others it made my i.MX25 stuck when the other side toggles DCD.
> The first 4 patches are fixes that I'd like to see in 4.6-rcX, the last two
> patches are merge window material.
Hi,
just FYI, my i.MX6 board has stopped booting over NFS on 4.6-rc1 and I've just
bisected it down to the commit "serial: imx: repair and complete handshaking"
90ebc48386, it's leading to the following CPU stall:
[ 72.084538] INFO: rcu_sched self-detected stall on CPU
[ 72.089719] 0-...: (1 GPs behind) idle=9bd/2/0 softirq=97/100 fqs=5996
[ 72.096425] (t=6000 jiffies g=-239 c=-240 q=47)
[ 72.101154] Task dump for CPU 0:
[ 72.104389] swapper/0 R running 0 0 0 0x00000002
[ 72.110778] Backtrace:
[ 72.113276] [<8010a580>] (dump_backtrace) from [<8010a778>] (show_stack+0x18/0x1c)
[ 72.120850] r7:80a09bc0 r6:80a02458 r5:80a05c00 r4:00000000
[ 72.126589] [<8010a760>] (show_stack) from [<80137ee0>] (sched_show_task+0xb8/0xd8)
[ 72.134258] [<80137e28>] (sched_show_task) from [<80139780>] (dump_cpu_task+0x34/0x44)
[ 72.142177] r5:00000000 r4:00000000
[ 72.145806] [<8013974c>] (dump_cpu_task) from [<80157de8>] (rcu_dump_cpu_stacks+0x7c/0xa0)
[ 72.154072] r5:00000000 r4:80a09bc0
[ 72.157697] [<80157d6c>] (rcu_dump_cpu_stacks) from [<8015ae74>] (rcu_check_callbacks+0x218/0x65c)
[ 72.166661] r9:80a024a0 r8:0000002f r7:80a09bc0 r6:80a02100 r5:ef1a61c0 r4:80a09bc0
[ 72.174499] [<8015ac5c>] (rcu_check_callbacks) from [<8015d0d0>] (update_process_times+0x38/0x68)
[ 72.183376] r10:ffffffff r9:ef1a2b40 r8:80a2d567 r7:00000010 r6:c84d9643 r5:00000000
[ 72.191283] r4:80a05c00
[ 72.193854] [<8015d098>] (update_process_times) from [<8016c6bc>] (tick_sched_handle+0x50/0x54)
[ 72.202555] r5:80a01e20 r4:ef1a2cb8
[ 72.206177] [<8016c66c>] (tick_sched_handle) from [<8016c70c>] (tick_sched_timer+0x4c/0x8c)
[ 72.214546] [<8016c6c0>] (tick_sched_timer) from [<8015da94>] (__hrtimer_run_queues+0xd0/0x17c)
[ 72.223247] r7:00000001 r6:ef1a2b4c r5:ef1a2cb8 r4:ef1a2b00
[ 72.228979] [<8015d9c4>] (__hrtimer_run_queues) from [<8015e074>] (hrtimer_interrupt+0xb8/0x208)
[ 72.237768] r10:ffffffff r9:7fffffff r8:00000003 r7:6e858000 r6:80a01d48 r5:8094ab00
[ 72.237768] r10:ffffffff r9:7fffffff r8:00000003 r7:6e858000 r6:80a01d48 r5:8094ab00
[ 72.245674] r4:ef1a2b00
[ 72.248240] [<8015dfbc>] (hrtimer_interrupt) from [<8010dadc>] (twd_handler+0x34/0x40)
[ 72.256159] r10:80a01e70 r9:8093da28 r8:00000010 r7:eec1cc40 r6:80a026dc r5:eec03c00
[ 72.264067] r4:00000001
[ 72.266629] [<8010daa8>] (twd_handler) from [<80152ef4>] (handle_percpu_devid_irq+0x70/0x8c)
[ 72.275069] r5:eec03c00 r4:ef1a8840
[ 72.278695] [<80152e84>] (handle_percpu_devid_irq) from [<8014ec68>] (generic_handle_irq+0x20/0x30)
[ 72.287744] r9:8093da28 r8:eec05000 r7:00000010 r6:8094b044 r5:80a01f28 r4:00000000
[ 72.295579] [<8014ec48>] (generic_handle_irq) from [<8014ef80>] (__handle_domain_irq+0x94/0xbc)
[ 72.304292] [<8014eeec>] (__handle_domain_irq) from [<80101408>] (gic_handle_irq+0x58/0x98)
[ 72.312646] r9:8093da28 r8:f4001100 r7:80a11c50 r6:80a01e20 r5:80a026dc r4:f4000100
[ 72.320482] [<801013b0>] (gic_handle_irq) from [<8010b214>] (__irq_svc+0x54/0x70)
[ 72.327971] Exception stack(0x80a01e20 to 0x80a01e68)
[ 72.333036] 1e20: 00000000 00200000 00000000 00000000 80a00000 00000000 00000282 80a2e100
[ 72.341227] 1e40: eec05000 8093da28 80a01e70 80a01ec4 80a01ec8 80a01e70 8011a2bc 80119ea0
[ 72.349409] 1e60: 60000113 ffffffff
[ 72.352902] r9:8093da28 r8:eec05000 r7:80a01e54 r6:ffffffff r5:60000113 r4:80119ea0
[ 72.360748] [<80119e2c>] (__do_softirq) from [<8011a2bc>] (irq_exit+0x8c/0xfc)
[ 72.367974] r10:00000000 r9:8093da28 r8:eec05000 r7:00000010 r6:8094b044 r5:00000000
[ 72.375880] r4:00000000
[ 72.378446] [<8011a230>] (irq_exit) from [<8014ef84>] (__handle_domain_irq+0x98/0xbc)
[ 72.386290] [<8014eeec>] (__handle_domain_irq) from [<80101408>] (gic_handle_irq+0x58/0x98)
[ 72.394644] r9:8093da28 r8:f4001100 r7:80a11c50 r6:80a01f28 r5:80a026dc r4:f4000100
[ 72.402476] [<801013b0>] (gic_handle_irq) from [<8010b214>] (__irq_svc+0x54/0x70)
[ 72.409964] Exception stack(0x80a01f28 to 0x80a01f70)
[ 72.415027] 1f20: 00000000 000012ce ef1a227c 80112b00 80a00000 80a02430
[ 72.423215] 1f40: 80a02430 80a02380 efffc840 8093da28 00000000 80a01f84 80a01f88 80a01f78
[ 72.431400] 1f60: 801079a4 801079a8 60000013 ffffffff
[ 72.436455] r9:8093da28 r8:efffc840 r7:80a01f5c r6:ffffffff r5:60000013 r4:801079a8
[ 72.444289] [<80107974>] (arch_cpu_idle) from [<80148174>] (default_idle_call+0x30/0x34)
[ 72.452395] [<80148144>] (default_idle_call) from [<8014826c>] (cpu_startup_entry+0xf4/0x15c)
[ 72.460936] [<80148178>] (cpu_startup_entry) from [<806294a0>] (rest_init+0x68/0x80)
[ 72.468699] [<80629438>] (rest_init) from [<80900c74>] (start_kernel+0x2fc/0x368)
[ 72.476193] [<80900978>] (start_kernel) from [<1000807c>] (0x1000807c)
[ 72.482724] r9:412fc09a r8:1000406a r7:80a06c7c r6:8093da24 r5:80a023dc r4:80a2da14
To fix this problem, I've to revert the 90ebc48386 commit or apply this patch series.
-- ynezz
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH v2 0/6] serial: imx: handshaking fixes and improvments
2016-04-11 16:01 ` [PATCH v2 0/6] serial: imx: handshaking fixes and improvments Petr Štetiar
@ 2016-04-12 7:46 ` Uwe Kleine-König
2016-04-12 9:48 ` Petr Štetiar
0 siblings, 1 reply; 27+ messages in thread
From: Uwe Kleine-König @ 2016-04-12 7:46 UTC (permalink / raw)
To: Petr Štetiar
Cc: Martin Fuzzey, Baruch Siach, linux-serial, Greg Kroah-Hartman,
kernel, linux-arm-kernel
Hello Petr,
On Mon, Apr 11, 2016 at 06:01:28PM +0200, Petr Štetiar wrote:
> Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [2016-03-24 14:24:19]:
>
> > Among others it made my i.MX25 stuck when the other side toggles DCD.
> > The first 4 patches are fixes that I'd like to see in 4.6-rcX, the last two
> > patches are merge window material.
>
> just FYI, my i.MX6 board has stopped booting over NFS on 4.6-rc1 and I've just
> bisected it down to the commit "serial: imx: repair and complete handshaking"
> 90ebc48386, it's leading to the following CPU stall:
hmm, I'm confused (because I don't understand it) and something between
happy and sad (because both 90ebc48386 and the series that fixes it are
mine).
This is an i.MX6 Solo (i.e. only one cpu)?
> [ 72.084538] INFO: rcu_sched self-detected stall on CPU
> [ 72.089719] 0-...: (1 GPs behind) idle=9bd/2/0 softirq=97/100 fqs=5996
> [ 72.096425] (t=6000 jiffies g=-239 c=-240 q=47)
> [ 72.101154] Task dump for CPU 0:
> [ 72.104389] swapper/0 R running 0 0 0 0x00000002
> [ 72.110778] Backtrace:
> [ 72.113276] [<8010a580>] (dump_backtrace) from [<8010a778>] (show_stack+0x18/0x1c)
> [ 72.120850] r7:80a09bc0 r6:80a02458 r5:80a05c00 r4:00000000
> [ 72.126589] [<8010a760>] (show_stack) from [<80137ee0>] (sched_show_task+0xb8/0xd8)
> [ 72.134258] [<80137e28>] (sched_show_task) from [<80139780>] (dump_cpu_task+0x34/0x44)
> [ 72.142177] r5:00000000 r4:00000000
> [ 72.145806] [<8013974c>] (dump_cpu_task) from [<80157de8>] (rcu_dump_cpu_stacks+0x7c/0xa0)
> [ 72.154072] r5:00000000 r4:80a09bc0
> [ 72.157697] [<80157d6c>] (rcu_dump_cpu_stacks) from [<8015ae74>] (rcu_check_callbacks+0x218/0x65c)
> [ 72.166661] r9:80a024a0 r8:0000002f r7:80a09bc0 r6:80a02100 r5:ef1a61c0 r4:80a09bc0
> [ 72.174499] [<8015ac5c>] (rcu_check_callbacks) from [<8015d0d0>] (update_process_times+0x38/0x68)
> [ 72.183376] r10:ffffffff r9:ef1a2b40 r8:80a2d567 r7:00000010 r6:c84d9643 r5:00000000
> [ 72.191283] r4:80a05c00
> [ 72.193854] [<8015d098>] (update_process_times) from [<8016c6bc>] (tick_sched_handle+0x50/0x54)
> [ 72.202555] r5:80a01e20 r4:ef1a2cb8
> [ 72.206177] [<8016c66c>] (tick_sched_handle) from [<8016c70c>] (tick_sched_timer+0x4c/0x8c)
> [ 72.214546] [<8016c6c0>] (tick_sched_timer) from [<8015da94>] (__hrtimer_run_queues+0xd0/0x17c)
> [ 72.223247] r7:00000001 r6:ef1a2b4c r5:ef1a2cb8 r4:ef1a2b00
> [ 72.228979] [<8015d9c4>] (__hrtimer_run_queues) from [<8015e074>] (hrtimer_interrupt+0xb8/0x208)
> [ 72.237768] r10:ffffffff r9:7fffffff r8:00000003 r7:6e858000 r6:80a01d48 r5:8094ab00
> [ 72.237768] r10:ffffffff r9:7fffffff r8:00000003 r7:6e858000 r6:80a01d48 r5:8094ab00
> [ 72.245674] r4:ef1a2b00
> [ 72.248240] [<8015dfbc>] (hrtimer_interrupt) from [<8010dadc>] (twd_handler+0x34/0x40)
> [ 72.256159] r10:80a01e70 r9:8093da28 r8:00000010 r7:eec1cc40 r6:80a026dc r5:eec03c00
> [ 72.264067] r4:00000001
> [ 72.266629] [<8010daa8>] (twd_handler) from [<80152ef4>] (handle_percpu_devid_irq+0x70/0x8c)
> [ 72.275069] r5:eec03c00 r4:ef1a8840
> [ 72.278695] [<80152e84>] (handle_percpu_devid_irq) from [<8014ec68>] (generic_handle_irq+0x20/0x30)
> [ 72.287744] r9:8093da28 r8:eec05000 r7:00000010 r6:8094b044 r5:80a01f28 r4:00000000
> [ 72.295579] [<8014ec48>] (generic_handle_irq) from [<8014ef80>] (__handle_domain_irq+0x94/0xbc)
> [ 72.304292] [<8014eeec>] (__handle_domain_irq) from [<80101408>] (gic_handle_irq+0x58/0x98)
> [ 72.312646] r9:8093da28 r8:f4001100 r7:80a11c50 r6:80a01e20 r5:80a026dc r4:f4000100
> [ 72.320482] [<801013b0>] (gic_handle_irq) from [<8010b214>] (__irq_svc+0x54/0x70)
> [ 72.327971] Exception stack(0x80a01e20 to 0x80a01e68)
> [ 72.333036] 1e20: 00000000 00200000 00000000 00000000 80a00000 00000000 00000282 80a2e100
> [ 72.341227] 1e40: eec05000 8093da28 80a01e70 80a01ec4 80a01ec8 80a01e70 8011a2bc 80119ea0
> [ 72.349409] 1e60: 60000113 ffffffff
> [ 72.352902] r9:8093da28 r8:eec05000 r7:80a01e54 r6:ffffffff r5:60000113 r4:80119ea0
> [ 72.360748] [<80119e2c>] (__do_softirq) from [<8011a2bc>] (irq_exit+0x8c/0xfc)
> [ 72.367974] r10:00000000 r9:8093da28 r8:eec05000 r7:00000010 r6:8094b044 r5:00000000
> [ 72.375880] r4:00000000
> [ 72.378446] [<8011a230>] (irq_exit) from [<8014ef84>] (__handle_domain_irq+0x98/0xbc)
> [ 72.386290] [<8014eeec>] (__handle_domain_irq) from [<80101408>] (gic_handle_irq+0x58/0x98)
> [ 72.394644] r9:8093da28 r8:f4001100 r7:80a11c50 r6:80a01f28 r5:80a026dc r4:f4000100
> [ 72.402476] [<801013b0>] (gic_handle_irq) from [<8010b214>] (__irq_svc+0x54/0x70)
> [ 72.409964] Exception stack(0x80a01f28 to 0x80a01f70)
> [ 72.415027] 1f20: 00000000 000012ce ef1a227c 80112b00 80a00000 80a02430
> [ 72.423215] 1f40: 80a02430 80a02380 efffc840 8093da28 00000000 80a01f84 80a01f88 80a01f78
> [ 72.431400] 1f60: 801079a4 801079a8 60000013 ffffffff
> [ 72.436455] r9:8093da28 r8:efffc840 r7:80a01f5c r6:ffffffff r5:60000013 r4:801079a8
> [ 72.444289] [<80107974>] (arch_cpu_idle) from [<80148174>] (default_idle_call+0x30/0x34)
> [ 72.452395] [<80148144>] (default_idle_call) from [<8014826c>] (cpu_startup_entry+0xf4/0x15c)
> [ 72.460936] [<80148178>] (cpu_startup_entry) from [<806294a0>] (rest_init+0x68/0x80)
> [ 72.468699] [<80629438>] (rest_init) from [<80900c74>] (start_kernel+0x2fc/0x368)
> [ 72.476193] [<80900978>] (start_kernel) from [<1000807c>] (0x1000807c)
> [ 72.482724] r9:412fc09a r8:1000406a r7:80a06c7c r6:8093da24 r5:80a023dc r4:80a2da14
>
> To fix this problem, I've to revert the 90ebc48386 commit or apply this patch series.
Which patch fixes your problem? Is it enough to revert just the last
hunk of 90ebc48386? Do you use fsl,dte-mode for the uart in question?
IMHO patches 1-4 should get applied before 4.6.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH v2 0/6] serial: imx: handshaking fixes and improvments
2016-04-12 7:46 ` Uwe Kleine-König
@ 2016-04-12 9:48 ` Petr Štetiar
2016-04-12 10:58 ` Uwe Kleine-König
0 siblings, 1 reply; 27+ messages in thread
From: Petr Štetiar @ 2016-04-12 9:48 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Martin Fuzzey, Baruch Siach, linux-serial, Greg Kroah-Hartman,
kernel, Petr Štetiar, linux-arm-kernel
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [2016-04-12 09:46:22]:
Hi,
> On Mon, Apr 11, 2016 at 06:01:28PM +0200, Petr Štetiar wrote:
> > Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [2016-03-24 14:24:19]:
> >
> > > Among others it made my i.MX25 stuck when the other side toggles DCD.
> > > The first 4 patches are fixes that I'd like to see in 4.6-rcX, the last two
> > > patches are merge window material.
> >
> > just FYI, my i.MX6 board has stopped booting over NFS on 4.6-rc1 and I've just
> > bisected it down to the commit "serial: imx: repair and complete handshaking"
> > 90ebc48386, it's leading to the following CPU stall:
>
> hmm, I'm confused (because I don't understand it) and something between
> happy and sad (because both 90ebc48386 and the series that fixes it are
> mine).
I don't know what's going on, probably something related to the serial IRQs?
> This is an i.MX6 Solo (i.e. only one cpu)?
This is i.MX6 Quad, Toradex Apalis Ixora (imx6q-apalis-ixora.dts).
> Which patch fixes your problem?
First 3 patches:
[v2,1/6] serial: imx: fix polarity of RI
[v2,2/6] serial: imx: let irq handler return IRQ_NONE if no event was handled
[v2,3/6] serial: imx: make sure unhandled irqs are disabled
> Is it enough to revert just the last hunk of 90ebc48386?
Yes, this fixes it also:
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 231e7d5..dab081c 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -827,11 +827,6 @@ static void imx_set_mctrl(struct uart_port *port, unsigned int mctrl)
writel(temp, sport->port.membase + UCR2);
}
- temp = readl(sport->port.membase + UCR3) & ~UCR3_DSR;
- if (!(mctrl & TIOCM_DTR))
- temp |= UCR3_DSR;
- writel(temp, sport->port.membase + UCR3);
-
temp = readl(sport->port.membase + uts_reg(sport)) & ~UTS_LOOP;
if (mctrl & TIOCM_LOOP)
temp |= UTS_LOOP;
> Do you use fsl,dte-mode for the uart in question?
Yes, from imx6qdl-apalis.dtsi:
&uart1 {
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_uart1_dte &pinctrl_uart1_ctrl>;
fsl,dte-mode;
fsl,uart-has-rtscts;
status = "disabled";
};
> IMHO patches 1-4 should get applied before 4.6.
Ok, good, but this leaves 4.5 broken, right? Thanks.
-- ynezz
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH v2 0/6] serial: imx: handshaking fixes and improvments
2016-04-12 9:48 ` Petr Štetiar
@ 2016-04-12 10:58 ` Uwe Kleine-König
2016-04-12 12:17 ` Petr Štetiar
0 siblings, 1 reply; 27+ messages in thread
From: Uwe Kleine-König @ 2016-04-12 10:58 UTC (permalink / raw)
To: Petr Štetiar
Cc: Martin Fuzzey, Baruch Siach, linux-serial, Greg Kroah-Hartman,
kernel, linux-arm-kernel
Hello Petr,
On Tue, Apr 12, 2016 at 11:48:46AM +0200, Petr Štetiar wrote:
> Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [2016-04-12 09:46:22]:
> > On Mon, Apr 11, 2016 at 06:01:28PM +0200, Petr Štetiar wrote:
> > > Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [2016-03-24 14:24:19]:
> > >
> > > > Among others it made my i.MX25 stuck when the other side toggles DCD.
> > > > The first 4 patches are fixes that I'd like to see in 4.6-rcX, the last two
> > > > patches are merge window material.
> > >
> > > just FYI, my i.MX6 board has stopped booting over NFS on 4.6-rc1 and I've just
> > > bisected it down to the commit "serial: imx: repair and complete handshaking"
> > > 90ebc48386, it's leading to the following CPU stall:
> >
> > hmm, I'm confused (because I don't understand it) and something between
> > happy and sad (because both 90ebc48386 and the series that fixes it are
> > mine).
>
> I don't know what's going on, probably something related to the serial IRQs?
>
> > This is an i.MX6 Solo (i.e. only one cpu)?
>
> This is i.MX6 Quad, Toradex Apalis Ixora (imx6q-apalis-ixora.dts).
>
> > Which patch fixes your problem?
>
> First 3 patches:
>
> [v2,1/6] serial: imx: fix polarity of RI
> [v2,2/6] serial: imx: let irq handler return IRQ_NONE if no event was handled
> [v2,3/6] serial: imx: make sure unhandled irqs are disabled
>
> > Is it enough to revert just the last hunk of 90ebc48386?
>
> Yes, this fixes it also:
>
> diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
> index 231e7d5..dab081c 100644
> --- a/drivers/tty/serial/imx.c
> +++ b/drivers/tty/serial/imx.c
> @@ -827,11 +827,6 @@ static void imx_set_mctrl(struct uart_port *port, unsigned int mctrl)
> writel(temp, sport->port.membase + UCR2);
> }
>
> - temp = readl(sport->port.membase + UCR3) & ~UCR3_DSR;
> - if (!(mctrl & TIOCM_DTR))
> - temp |= UCR3_DSR;
> - writel(temp, sport->port.membase + UCR3);
> -
> temp = readl(sport->port.membase + uts_reg(sport)) & ~UTS_LOOP;
> if (mctrl & TIOCM_LOOP)
> temp |= UTS_LOOP;
>
> > Do you use fsl,dte-mode for the uart in question?
>
> Yes, from imx6qdl-apalis.dtsi:
>
> &uart1 {
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_uart1_dte &pinctrl_uart1_ctrl>;
> fsl,dte-mode;
> fsl,uart-has-rtscts;
> status = "disabled";
> };
ok, so UFCR_DCEDTE is set and UCR3_DSR controls the DTR output as
intended. What is connected to the respective pin?
MX6QDL_PAD_EIM_D25__UART1_DSR_B I think is the one.
> > IMHO patches 1-4 should get applied before 4.6.
>
> Ok, good, but this leaves 4.5 broken, right? Thanks.
Once they landed in 4.6-rc they can and probably should be backported
for stable, yes.
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH v2 0/6] serial: imx: handshaking fixes and improvments
2016-04-12 10:58 ` Uwe Kleine-König
@ 2016-04-12 12:17 ` Petr Štetiar
2016-04-12 17:30 ` Uwe Kleine-König
0 siblings, 1 reply; 27+ messages in thread
From: Petr Štetiar @ 2016-04-12 12:17 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Martin Fuzzey, Baruch Siach, linux-serial, Greg Kroah-Hartman,
kernel, Petr Štetiar, linux-arm-kernel
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [2016-04-12 12:58:56]:
> ok, so UFCR_DCEDTE is set and UCR3_DSR controls the DTR output as
> intended. What is connected to the respective pin?
> MX6QDL_PAD_EIM_D25__UART1_DSR_B I think is the one.
It's routed out to Apalis SoM pin 120, which is then connected via 22R
resistor and through SN65C3243DBR RS-232 line driver to header which I use as
debug/serial console.
-- ynezz
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH v2 0/6] serial: imx: handshaking fixes and improvments
2016-04-12 12:17 ` Petr Štetiar
@ 2016-04-12 17:30 ` Uwe Kleine-König
2016-04-13 9:13 ` Petr Štetiar
0 siblings, 1 reply; 27+ messages in thread
From: Uwe Kleine-König @ 2016-04-12 17:30 UTC (permalink / raw)
To: Petr Štetiar
Cc: Martin Fuzzey, Baruch Siach, linux-serial, Greg Kroah-Hartman,
kernel, linux-arm-kernel
On Tue, Apr 12, 2016 at 02:17:59PM +0200, Petr Štetiar wrote:
> Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [2016-04-12 12:58:56]:
>
> > ok, so UFCR_DCEDTE is set and UCR3_DSR controls the DTR output as
> > intended. What is connected to the respective pin?
> > MX6QDL_PAD_EIM_D25__UART1_DSR_B I think is the one.
>
> It's routed out to Apalis SoM pin 120, which is then connected via 22R
> resistor and through SN65C3243DBR RS-232 line driver to header which I use as
> debug/serial console.
Then I guess the problem is that the rs232-partner asserts the imx6's
DSR in reply to the imx6 asserting DTR?
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH v2 0/6] serial: imx: handshaking fixes and improvments
2016-04-12 17:30 ` Uwe Kleine-König
@ 2016-04-13 9:13 ` Petr Štetiar
2016-04-13 11:16 ` Uwe Kleine-König
0 siblings, 1 reply; 27+ messages in thread
From: Petr Štetiar @ 2016-04-13 9:13 UTC (permalink / raw)
To: Uwe Kleine-König
Cc: Martin Fuzzey, Baruch Siach, linux-serial, Greg Kroah-Hartman,
kernel, Petr Štetiar, linux-arm-kernel
Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [2016-04-12 19:30:32]:
> On Tue, Apr 12, 2016 at 02:17:59PM +0200, Petr Štetiar wrote:
> > Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [2016-04-12 12:58:56]:
> >
> > > ok, so UFCR_DCEDTE is set and UCR3_DSR controls the DTR output as
> > > intended. What is connected to the respective pin?
> > > MX6QDL_PAD_EIM_D25__UART1_DSR_B I think is the one.
> >
> > It's routed out to Apalis SoM pin 120, which is then connected via 22R
> > resistor and through SN65C3243DBR RS-232 line driver to header which I use as
> > debug/serial console.
>
> Then I guess the problem is that the rs232-partner asserts the imx6's
> DSR in reply to the imx6 asserting DTR?
Yes, that's correct.
-- ynezz
^ permalink raw reply [flat|nested] 27+ messages in thread
* Re: [PATCH v2 0/6] serial: imx: handshaking fixes and improvments
2016-04-13 9:13 ` Petr Štetiar
@ 2016-04-13 11:16 ` Uwe Kleine-König
0 siblings, 0 replies; 27+ messages in thread
From: Uwe Kleine-König @ 2016-04-13 11:16 UTC (permalink / raw)
To: Petr Štetiar, Greg Kroah-Hartman
Cc: Martin Fuzzey, Baruch Siach, kernel, linux-arm-kernel,
linux-serial
On Wed, Apr 13, 2016 at 11:13:36AM +0200, Petr Štetiar wrote:
> Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [2016-04-12 19:30:32]:
>
> > On Tue, Apr 12, 2016 at 02:17:59PM +0200, Petr Štetiar wrote:
> > > Uwe Kleine-König <u.kleine-koenig@pengutronix.de> [2016-04-12 12:58:56]:
> > >
> > > > ok, so UFCR_DCEDTE is set and UCR3_DSR controls the DTR output as
> > > > intended. What is connected to the respective pin?
> > > > MX6QDL_PAD_EIM_D25__UART1_DSR_B I think is the one.
> > >
> > > It's routed out to Apalis SoM pin 120, which is then connected via 22R
> > > resistor and through SN65C3243DBR RS-232 line driver to header which I use as
> > > debug/serial console.
> >
> > Then I guess the problem is that the rs232-partner asserts the imx6's
> > DSR in reply to the imx6 asserting DTR?
>
> Yes, that's correct.
OK, that fits nicely in my picture. So we only have to wait until Greg
happily picks up the fixes (i.e. patches 1 up to 4).
Best regards
Uwe
--
Pengutronix e.K. | Uwe Kleine-König |
Industrial Linux Solutions | http://www.pengutronix.de/ |
_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 27+ messages in thread