2017-11-06 18:11:51 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-02-24 11:17:08 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-02-24 11:17:08 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-02-24 11:17:08 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2024-04-05 08:08:23 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-10-29 19:07:23 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-05 10:02:46 +02:00
|
|
|
|
2009-06-11 14:53:18 +01:00
|
|
|
|
2020-07-14 11:30:12 +02:00
|
|
|
|
2018-09-05 09:24:27 +08:00
|
|
|
|
2009-06-11 14:52:23 +01:00
|
|
|
|
include cleanup: Update gfp.h and slab.h includes to prepare for breaking implicit slab.h inclusion from percpu.h
percpu.h is included by sched.h and module.h and thus ends up being
included when building most .c files. percpu.h includes slab.h which
in turn includes gfp.h making everything defined by the two files
universally available and complicating inclusion dependencies.
percpu.h -> slab.h dependency is about to be removed. Prepare for
this change by updating users of gfp and slab facilities include those
headers directly instead of assuming availability. As this conversion
needs to touch large number of source files, the following script is
used as the basis of conversion.
http://userweb.kernel.org/~tj/misc/slabh-sweep.py
The script does the followings.
* Scan files for gfp and slab usages and update includes such that
only the necessary includes are there. ie. if only gfp is used,
gfp.h, if slab is used, slab.h.
* When the script inserts a new include, it looks at the include
blocks and try to put the new include such that its order conforms
to its surrounding. It's put in the include block which contains
core kernel includes, in the same order that the rest are ordered -
alphabetical, Christmas tree, rev-Xmas-tree or at the end if there
doesn't seem to be any matching order.
* If the script can't find a place to put a new include (mostly
because the file doesn't have fitting include block), it prints out
an error message indicating which .h file needs to be added to the
file.
The conversion was done in the following steps.
1. The initial automatic conversion of all .c files updated slightly
over 4000 files, deleting around 700 includes and adding ~480 gfp.h
and ~3000 slab.h inclusions. The script emitted errors for ~400
files.
2. Each error was manually checked. Some didn't need the inclusion,
some needed manual addition while adding it to implementation .h or
embedding .c file was more appropriate for others. This step added
inclusions to around 150 files.
3. The script was run again and the output was compared to the edits
from #2 to make sure no file was left behind.
4. Several build tests were done and a couple of problems were fixed.
e.g. lib/decompress_*.c used malloc/free() wrappers around slab
APIs requiring slab.h to be added manually.
5. The script was run on all .h files but without automatically
editing them as sprinkling gfp.h and slab.h inclusions around .h
files could easily lead to inclusion dependency hell. Most gfp.h
inclusion directives were ignored as stuff from gfp.h was usually
wildly available and often used in preprocessor macros. Each
slab.h inclusion directive was examined and added manually as
necessary.
6. percpu.h was updated not to include slab.h.
7. Build test were done on the following configurations and failures
were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my
distributed build env didn't work with gcov compiles) and a few
more options had to be turned off depending on archs to make things
build (like ipr on powerpc/64 which failed due to missing writeq).
* x86 and x86_64 UP and SMP allmodconfig and a custom test config.
* powerpc and powerpc64 SMP allmodconfig
* sparc and sparc64 SMP allmodconfig
* ia64 SMP allmodconfig
* s390 SMP allmodconfig
* alpha SMP allmodconfig
* um on x86_64 SMP allmodconfig
8. percpu.h modifications were reverted so that it could be applied as
a separate patch and serve as bisection point.
Given the fact that I had only a couple of failures from tests on step
6, I'm fairly confident about the coverage of this conversion patch.
If there is a breakage, it's likely to be something in one of the arch
headers which should be easily discoverable easily on most builds of
the specific arch.
Signed-off-by: Tejun Heo <tj@kernel.org>
Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org>
Cc: Ingo Molnar <mingo@redhat.com>
Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
2010-03-24 17:04:11 +09:00
|
|
|
|
2011-06-25 02:04:34 +08:00
|
|
|
|
2013-01-07 10:25:03 +05:30
|
|
|
|
2024-04-11 14:19:23 +02:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2025-10-02 12:52:59 +08:00
|
|
|
|
2022-04-14 18:22:37 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-12-13 11:30:03 +01:00
|
|
|
|
|
|
|
|
|
2007-04-26 08:26:13 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-25 02:04:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-26 08:26:13 +01:00
|
|
|
|
|
|
|
|
|
2014-12-09 18:11:22 +09:00
|
|
|
|
2013-01-07 10:25:02 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-03 12:33:53 +01:00
|
|
|
|
2013-01-07 10:25:02 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2013-01-07 10:25:02 +05:30
|
|
|
|
2018-02-27 22:44:55 +01:00
|
|
|
|
2013-01-07 10:25:02 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-02-27 22:44:55 +01:00
|
|
|
|
2013-01-07 10:25:02 +05:30
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2013-01-07 10:25:02 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-05-14 15:55:03 -03:00
|
|
|
|
2013-01-07 10:25:02 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-03-24 14:24:25 +01:00
|
|
|
|
2013-01-07 10:25:02 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2013-01-07 10:25:02 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-07-03 13:25:40 +02:00
|
|
|
|
2013-01-07 10:25:02 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-04 17:52:38 +02:00
|
|
|
|
2016-03-24 14:24:25 +01:00
|
|
|
|
2013-01-07 10:25:02 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-10-18 21:34:46 +02:00
|
|
|
|
|
|
|
|
|
2013-01-07 10:25:02 +05:30
|
|
|
|
|
|
|
|
|
2015-10-18 21:34:46 +02:00
|
|
|
|
2013-01-07 10:25:02 +05:30
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-26 08:26:13 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-01-07 10:25:02 +05:30
|
|
|
|
|
|
|
|
|
2008-07-05 10:02:48 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-05 10:02:45 +02:00
|
|
|
|
|
|
|
|
|
2015-02-24 11:17:09 +01:00
|
|
|
|
2011-06-25 02:04:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-06-11 14:36:29 +01:00
|
|
|
|
2017-01-07 19:29:13 -02:00
|
|
|
|
2013-05-30 14:07:12 +08:00
|
|
|
|
2020-02-26 16:23:19 -06:00
|
|
|
|
|
|
|
|
|
2012-03-07 09:31:43 +01:00
|
|
|
|
|
|
|
|
|
2012-05-21 21:57:39 +02:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2015-12-13 11:30:03 +01:00
|
|
|
|
|
|
|
|
|
2023-02-01 17:26:55 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-08 15:38:27 +03:00
|
|
|
|
2021-04-30 19:50:37 +02:00
|
|
|
|
|
|
|
|
|
2016-08-08 15:38:27 +03:00
|
|
|
|
|
|
|
|
|
2013-10-15 15:23:40 +08:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2015-07-30 10:32:36 -05:00
|
|
|
|
2015-08-11 10:21:23 -07:00
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
2024-09-13 10:52:19 +02:00
|
|
|
|
|
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
2020-07-14 11:30:12 +02:00
|
|
|
|
|
|
|
|
|
2025-06-19 08:46:17 -03:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2011-12-22 09:57:52 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-11 10:54:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-25 02:04:33 +08:00
|
|
|
|
|
|
|
|
|
2015-02-03 16:16:06 +05:30
|
|
|
|
2023-09-11 10:54:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-06-25 02:04:34 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-05-28 11:40:21 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-02-01 17:16:03 +03:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-02-01 17:16:03 +03:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2023-02-01 17:16:03 +03:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2011-06-25 02:04:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2011-06-25 02:04:33 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 19:00:02 -02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-24 15:08:14 +08:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2013-02-06 19:00:02 -02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 19:00:02 -02:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2013-02-06 19:00:02 -02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-02-06 19:00:02 -02:00
|
|
|
|
2013-06-05 00:58:46 -03:00
|
|
|
|
2013-02-06 19:00:02 -02:00
|
|
|
|
2019-06-11 15:05:24 +03:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2015-12-13 11:30:03 +01:00
|
|
|
|
2017-01-30 09:12:12 -02:00
|
|
|
|
2015-12-13 11:30:03 +01:00
|
|
|
|
serial: Deassert Transmit Enable on probe in driver-specific way
When a UART port is newly registered, uart_configure_port() seeks to
deassert RS485 Transmit Enable by setting the RTS bit in port->mctrl.
However a number of UART drivers interpret a set RTS bit as *assertion*
instead of deassertion: Affected drivers include those using
serial8250_em485_config() (except 8250_bcm2835aux.c) and some using
mctrl_gpio (e.g. imx.c).
Since the interpretation of the RTS bit is driver-specific, it is not
suitable as a means to centrally deassert Transmit Enable in the serial
core. Instead, the serial core must call on drivers to deassert it in
their driver-specific way. One way to achieve that is to call
->rs485_config(). It implicitly deasserts Transmit Enable.
So amend uart_configure_port() and uart_resume_port() to invoke
uart_rs485_config(). That allows removing calls to uart_rs485_config()
from drivers' ->probe() hooks and declaring the function static.
Skip any invocation of ->set_mctrl() if RS485 is enabled. RS485 has no
hardware flow control, so the modem control lines are irrelevant and
need not be touched. When leaving RS485 mode, reset the modem control
lines to the state stored in port->mctrl. That way, UARTs which are
muxed between RS485 and RS232 transceivers drive the lines correctly
when switched to RS232. (serial8250_do_startup() historically raises
the OUT1 modem signal because otherwise interrupts are not signaled on
ancient PC UARTs, but I believe that no longer applies to modern,
RS485-capable UARTs and is thus safe to be skipped.)
imx.c modifies port->mctrl whenever Transmit Enable is asserted and
deasserted. Stop it from doing that so port->mctrl reflects the RS232
line state.
8250_omap.c deasserts Transmit Enable on ->runtime_resume() by calling
->set_mctrl(). Because that is now a no-op in RS485 mode, amend the
function to call serial8250_em485_stop_tx().
fsl_lpuart.c retrieves and applies the RS485 device tree properties
after registering the UART port. Because applying now happens on
registration in uart_configure_port(), move retrieval of the properties
ahead of uart_add_one_port().
Link: https://lore.kernel.org/all/20220329085050.311408-1-matthias.schiffer@ew.tq-group.com/
Link: https://lore.kernel.org/all/8f538a8903795f22f9acc94a9a31b03c9c4ccacb.camel@ginzinger.com/
Fixes: d3b3404df318 ("serial: Fix incorrect rs485 polarity on uart open")
Cc: stable@vger.kernel.org # v4.14+
Reported-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Reported-by: Roosen Henri <Henri.Roosen@ginzinger.com>
Tested-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Link: https://lore.kernel.org/r/2de36eba3fbe11278d5002e4e501afe0ceaca039.1663863805.git.lukas@wunner.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-22 18:27:33 +02:00
|
|
|
|
2015-12-13 11:30:03 +01:00
|
|
|
|
|
|
|
|
|
2019-06-11 15:05:24 +03:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2015-12-13 11:30:03 +01:00
|
|
|
|
2017-01-30 09:12:12 -02:00
|
|
|
|
|
|
|
|
|
2015-12-13 11:30:03 +01:00
|
|
|
|
serial: Deassert Transmit Enable on probe in driver-specific way
When a UART port is newly registered, uart_configure_port() seeks to
deassert RS485 Transmit Enable by setting the RTS bit in port->mctrl.
However a number of UART drivers interpret a set RTS bit as *assertion*
instead of deassertion: Affected drivers include those using
serial8250_em485_config() (except 8250_bcm2835aux.c) and some using
mctrl_gpio (e.g. imx.c).
Since the interpretation of the RTS bit is driver-specific, it is not
suitable as a means to centrally deassert Transmit Enable in the serial
core. Instead, the serial core must call on drivers to deassert it in
their driver-specific way. One way to achieve that is to call
->rs485_config(). It implicitly deasserts Transmit Enable.
So amend uart_configure_port() and uart_resume_port() to invoke
uart_rs485_config(). That allows removing calls to uart_rs485_config()
from drivers' ->probe() hooks and declaring the function static.
Skip any invocation of ->set_mctrl() if RS485 is enabled. RS485 has no
hardware flow control, so the modem control lines are irrelevant and
need not be touched. When leaving RS485 mode, reset the modem control
lines to the state stored in port->mctrl. That way, UARTs which are
muxed between RS485 and RS232 transceivers drive the lines correctly
when switched to RS232. (serial8250_do_startup() historically raises
the OUT1 modem signal because otherwise interrupts are not signaled on
ancient PC UARTs, but I believe that no longer applies to modern,
RS485-capable UARTs and is thus safe to be skipped.)
imx.c modifies port->mctrl whenever Transmit Enable is asserted and
deasserted. Stop it from doing that so port->mctrl reflects the RS232
line state.
8250_omap.c deasserts Transmit Enable on ->runtime_resume() by calling
->set_mctrl(). Because that is now a no-op in RS485 mode, amend the
function to call serial8250_em485_stop_tx().
fsl_lpuart.c retrieves and applies the RS485 device tree properties
after registering the UART port. Because applying now happens on
registration in uart_configure_port(), move retrieval of the properties
ahead of uart_add_one_port().
Link: https://lore.kernel.org/all/20220329085050.311408-1-matthias.schiffer@ew.tq-group.com/
Link: https://lore.kernel.org/all/8f538a8903795f22f9acc94a9a31b03c9c4ccacb.camel@ginzinger.com/
Fixes: d3b3404df318 ("serial: Fix incorrect rs485 polarity on uart open")
Cc: stable@vger.kernel.org # v4.14+
Reported-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Reported-by: Roosen Henri <Henri.Roosen@ginzinger.com>
Tested-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com>
Signed-off-by: Lukas Wunner <lukas@wunner.de>
Link: https://lore.kernel.org/r/2de36eba3fbe11278d5002e4e501afe0ceaca039.1663863805.git.lukas@wunner.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-22 18:27:33 +02:00
|
|
|
|
2015-12-13 11:30:03 +01:00
|
|
|
|
|
|
|
|
|
2020-07-14 11:30:12 +02:00
|
|
|
|
|
|
|
|
|
2021-03-02 07:21:40 +01:00
|
|
|
|
2020-07-14 11:30:12 +02:00
|
|
|
|
|
|
|
|
|
2023-02-01 17:26:54 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-02-01 17:26:55 +03:00
|
|
|
|
|
|
|
|
|
2023-02-01 17:26:54 +03:00
|
|
|
|
|
|
|
|
|
2024-09-13 10:39:50 +02:00
|
|
|
|
2023-06-16 12:47:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:26 +01:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2018-03-02 11:07:26 +01:00
|
|
|
|
2024-05-28 11:40:21 +02:00
|
|
|
|
2018-03-02 11:07:26 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:27 +01:00
|
|
|
|
2018-03-02 11:07:26 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-06-16 12:47:23 +02:00
|
|
|
|
2018-03-02 11:07:26 +01:00
|
|
|
|
|
|
|
|
|
2018-02-27 22:44:56 +01:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2024-05-28 11:40:21 +02:00
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2007-04-26 08:26:13 +01:00
|
|
|
|
2014-05-29 19:30:54 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:21 +01:00
|
|
|
|
2014-05-29 19:30:54 -07:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2019-08-28 21:37:55 +03:00
|
|
|
|
2015-02-24 11:17:11 +01:00
|
|
|
|
2023-11-24 14:11:10 +01:00
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
2023-11-24 14:11:10 +01:00
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-24 11:17:11 +01:00
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:26 +01:00
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-01-19 15:52:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-14 11:30:12 +02:00
|
|
|
|
2022-01-19 15:52:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-14 11:30:12 +02:00
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
|
|
|
|
|
2020-07-14 11:30:12 +02:00
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-02 11:41:26 +01:00
|
|
|
|
|
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-24 11:17:11 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2024-09-13 10:39:50 +02:00
|
|
|
|
2024-02-21 12:53:04 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2024-05-28 11:40:21 +02:00
|
|
|
|
tty: serial: imx: Handle RS485 DE signal active high
The default polarity of RS485 DE signal is active high. This driver does
not handle such case properly. Currently, when a pin is multiplexed as a
UART CTS_B on boot, this pin is pulled HIGH by the i.MX UART CTS circuit,
which activates DE signal on the RS485 transceiver and thus behave as if
the RS485 was transmitting data, so the system blocks the RS485 bus when
it starts and until user application takes over. This behavior is not OK.
The problem consists of two separate parts.
First, the i.MX UART IP requires UCR1 UARTEN and UCR2 RXEN to be set for
UCR2 CTSC and CTS bits to have any effect. The UCR2 CTSC bit permits the
driver to set CTS (RTS_B or RS485 DE signal) to either level sychronous
to the internal UART IP clock. Compared to other options, like GPIO CTS
control, this has the benefit of being synchronous to the UART IP clock
and thus without glitches or bus delays. The reason for the CTS design
is likely because when the Receiver is disabled, the UART IP can never
indicate that it is ready to receive data by assering CTS signal, so
the CTS is always pulled HIGH by default.
When the port is closed by user space, imx_uart_stop_rx() clears UCR2
RXEN bit, and imx_uart_shutdown() clears UCR1 UARTEN bit. This disables
UART Receiver and UART itself, and forces CTS signal HIGH, which leads
to the RS485 bus being blocked because RS485 DE is incorrectly active.
The proposed solution for this problem is to keep the Receiver running
even after the port is closed, but in loopback mode. This disconnects
the RX FIFO input from the RXD external signal, and since UCR2 TXEN is
cleared, the UART Transmitter is disabled, so nothing can feed data in
the RX FIFO. Because the Receiver is still enabled, the UCR2 CTSC and
CTS bits still have effect and the CTS (RS485 DE) control is retained.
Note that in case of RS485 DE signal active low, there is no problem and
no special handling is necessary. The CTS signal defaults to HIGH, thus
the RS485 is by default set to Receive and the bus is not blocked.
Note that while there is the possibility to control CTS using GPIO with
either CTS polarity, this has the downside of not being synchronous to
the UART IP clock and thus glitchy and susceptible to slow DE switching.
Second, on boot, before the UART driver probe callback is called, the
driver core triggers pinctrl_init_done() and configures the IOMUXC to
default state. At this point, UCR1 UARTEN and UCR2 RXEN are both still
cleared, but UART CTS_B (RS485 DE) is configured as CTS function, thus
the RTS signal is pulled HIGH by the UART IP CTS circuit.
One part of the solution here is to enable UCR1 UARTEN and UCR2 RXEN and
UTS loopback in this driver probe callback, thus unblocking the CTSC and
CTS control early on. But this is still too late, since the pin control
is already configured and CTS has been pulled HIGH for a short period
of time.
When Linux kernel boots and this driver is bound, the pin control is set
to special "init" state if the state is available, and driver can switch
the "default" state afterward when ready. This state can be used to set
the CTS line as a GPIO in DT temporarily, and a GPIO hog can force such
GPIO to LOW, thus keeping the RS485 DE line LOW early on boot. Once the
driver takes over and UCR1 UARTEN and UCR2 RXEN and UTS loopback are all
enabled, the driver can switch to "default" pin control state and control
the CTS line as function instead. DT binding example is below:
"
&gpio6 {
rts-init-hog {
gpio-hog;
gpios = <5 0>;
output-low;
line-name = "rs485-de";
};
};
&uart5 { /* DHCOM UART2 */
pinctrl-0 = <&pinctrl_uart5>;
pinctrl-1 = <&pinctrl_uart5_init>;
pinctrl-names = "default", "init";
...
};
pinctrl_uart5_init: uart5-init-grp {
fsl,pins = <
...
MX6QDL_PAD_CSI0_DAT19__GPIO6_IO05 0x30b1
>;
};
pinctrl_uart5: uart5-grp {
fsl,pins = <
...
MX6QDL_PAD_CSI0_DAT19__UART5_CTS_B 0x30b1
>;
};
"
Tested-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://lore.kernel.org/r/20220929144400.13571-1-marex@denx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-29 16:44:00 +02:00
|
|
|
|
2007-04-26 08:26:13 +01:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2018-03-02 11:07:26 +01:00
|
|
|
|
2021-11-25 10:03:49 +08:00
|
|
|
|
2018-03-02 11:07:26 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:27 +01:00
|
|
|
|
2021-11-25 10:03:49 +08:00
|
|
|
|
2018-03-02 11:07:26 +01:00
|
|
|
|
|
|
|
|
|
2021-11-25 10:03:49 +08:00
|
|
|
|
2018-03-02 11:07:26 +01:00
|
|
|
|
tty: serial: imx: Handle RS485 DE signal active high
The default polarity of RS485 DE signal is active high. This driver does
not handle such case properly. Currently, when a pin is multiplexed as a
UART CTS_B on boot, this pin is pulled HIGH by the i.MX UART CTS circuit,
which activates DE signal on the RS485 transceiver and thus behave as if
the RS485 was transmitting data, so the system blocks the RS485 bus when
it starts and until user application takes over. This behavior is not OK.
The problem consists of two separate parts.
First, the i.MX UART IP requires UCR1 UARTEN and UCR2 RXEN to be set for
UCR2 CTSC and CTS bits to have any effect. The UCR2 CTSC bit permits the
driver to set CTS (RTS_B or RS485 DE signal) to either level sychronous
to the internal UART IP clock. Compared to other options, like GPIO CTS
control, this has the benefit of being synchronous to the UART IP clock
and thus without glitches or bus delays. The reason for the CTS design
is likely because when the Receiver is disabled, the UART IP can never
indicate that it is ready to receive data by assering CTS signal, so
the CTS is always pulled HIGH by default.
When the port is closed by user space, imx_uart_stop_rx() clears UCR2
RXEN bit, and imx_uart_shutdown() clears UCR1 UARTEN bit. This disables
UART Receiver and UART itself, and forces CTS signal HIGH, which leads
to the RS485 bus being blocked because RS485 DE is incorrectly active.
The proposed solution for this problem is to keep the Receiver running
even after the port is closed, but in loopback mode. This disconnects
the RX FIFO input from the RXD external signal, and since UCR2 TXEN is
cleared, the UART Transmitter is disabled, so nothing can feed data in
the RX FIFO. Because the Receiver is still enabled, the UCR2 CTSC and
CTS bits still have effect and the CTS (RS485 DE) control is retained.
Note that in case of RS485 DE signal active low, there is no problem and
no special handling is necessary. The CTS signal defaults to HIGH, thus
the RS485 is by default set to Receive and the bus is not blocked.
Note that while there is the possibility to control CTS using GPIO with
either CTS polarity, this has the downside of not being synchronous to
the UART IP clock and thus glitchy and susceptible to slow DE switching.
Second, on boot, before the UART driver probe callback is called, the
driver core triggers pinctrl_init_done() and configures the IOMUXC to
default state. At this point, UCR1 UARTEN and UCR2 RXEN are both still
cleared, but UART CTS_B (RS485 DE) is configured as CTS function, thus
the RTS signal is pulled HIGH by the UART IP CTS circuit.
One part of the solution here is to enable UCR1 UARTEN and UCR2 RXEN and
UTS loopback in this driver probe callback, thus unblocking the CTSC and
CTS control early on. But this is still too late, since the pin control
is already configured and CTS has been pulled HIGH for a short period
of time.
When Linux kernel boots and this driver is bound, the pin control is set
to special "init" state if the state is available, and driver can switch
the "default" state afterward when ready. This state can be used to set
the CTS line as a GPIO in DT temporarily, and a GPIO hog can force such
GPIO to LOW, thus keeping the RS485 DE line LOW early on boot. Once the
driver takes over and UCR1 UARTEN and UCR2 RXEN and UTS loopback are all
enabled, the driver can switch to "default" pin control state and control
the CTS line as function instead. DT binding example is below:
"
&gpio6 {
rts-init-hog {
gpio-hog;
gpios = <5 0>;
output-low;
line-name = "rs485-de";
};
};
&uart5 { /* DHCOM UART2 */
pinctrl-0 = <&pinctrl_uart5>;
pinctrl-1 = <&pinctrl_uart5_init>;
pinctrl-names = "default", "init";
...
};
pinctrl_uart5_init: uart5-init-grp {
fsl,pins = <
...
MX6QDL_PAD_CSI0_DAT19__GPIO6_IO05 0x30b1
>;
};
pinctrl_uart5: uart5-grp {
fsl,pins = <
...
MX6QDL_PAD_CSI0_DAT19__UART5_CTS_B 0x30b1
>;
};
"
Tested-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://lore.kernel.org/r/20220929144400.13571-1-marex@denx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-29 16:44:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-02-21 12:53:04 +01:00
|
|
|
|
tty: serial: imx: Handle RS485 DE signal active high
The default polarity of RS485 DE signal is active high. This driver does
not handle such case properly. Currently, when a pin is multiplexed as a
UART CTS_B on boot, this pin is pulled HIGH by the i.MX UART CTS circuit,
which activates DE signal on the RS485 transceiver and thus behave as if
the RS485 was transmitting data, so the system blocks the RS485 bus when
it starts and until user application takes over. This behavior is not OK.
The problem consists of two separate parts.
First, the i.MX UART IP requires UCR1 UARTEN and UCR2 RXEN to be set for
UCR2 CTSC and CTS bits to have any effect. The UCR2 CTSC bit permits the
driver to set CTS (RTS_B or RS485 DE signal) to either level sychronous
to the internal UART IP clock. Compared to other options, like GPIO CTS
control, this has the benefit of being synchronous to the UART IP clock
and thus without glitches or bus delays. The reason for the CTS design
is likely because when the Receiver is disabled, the UART IP can never
indicate that it is ready to receive data by assering CTS signal, so
the CTS is always pulled HIGH by default.
When the port is closed by user space, imx_uart_stop_rx() clears UCR2
RXEN bit, and imx_uart_shutdown() clears UCR1 UARTEN bit. This disables
UART Receiver and UART itself, and forces CTS signal HIGH, which leads
to the RS485 bus being blocked because RS485 DE is incorrectly active.
The proposed solution for this problem is to keep the Receiver running
even after the port is closed, but in loopback mode. This disconnects
the RX FIFO input from the RXD external signal, and since UCR2 TXEN is
cleared, the UART Transmitter is disabled, so nothing can feed data in
the RX FIFO. Because the Receiver is still enabled, the UCR2 CTSC and
CTS bits still have effect and the CTS (RS485 DE) control is retained.
Note that in case of RS485 DE signal active low, there is no problem and
no special handling is necessary. The CTS signal defaults to HIGH, thus
the RS485 is by default set to Receive and the bus is not blocked.
Note that while there is the possibility to control CTS using GPIO with
either CTS polarity, this has the downside of not being synchronous to
the UART IP clock and thus glitchy and susceptible to slow DE switching.
Second, on boot, before the UART driver probe callback is called, the
driver core triggers pinctrl_init_done() and configures the IOMUXC to
default state. At this point, UCR1 UARTEN and UCR2 RXEN are both still
cleared, but UART CTS_B (RS485 DE) is configured as CTS function, thus
the RTS signal is pulled HIGH by the UART IP CTS circuit.
One part of the solution here is to enable UCR1 UARTEN and UCR2 RXEN and
UTS loopback in this driver probe callback, thus unblocking the CTSC and
CTS control early on. But this is still too late, since the pin control
is already configured and CTS has been pulled HIGH for a short period
of time.
When Linux kernel boots and this driver is bound, the pin control is set
to special "init" state if the state is available, and driver can switch
the "default" state afterward when ready. This state can be used to set
the CTS line as a GPIO in DT temporarily, and a GPIO hog can force such
GPIO to LOW, thus keeping the RS485 DE line LOW early on boot. Once the
driver takes over and UCR1 UARTEN and UCR2 RXEN and UTS loopback are all
enabled, the driver can switch to "default" pin control state and control
the CTS line as function instead. DT binding example is below:
"
&gpio6 {
rts-init-hog {
gpio-hog;
gpios = <5 0>;
output-low;
line-name = "rs485-de";
};
};
&uart5 { /* DHCOM UART2 */
pinctrl-0 = <&pinctrl_uart5>;
pinctrl-1 = <&pinctrl_uart5_init>;
pinctrl-names = "default", "init";
...
};
pinctrl_uart5_init: uart5-init-grp {
fsl,pins = <
...
MX6QDL_PAD_CSI0_DAT19__GPIO6_IO05 0x30b1
>;
};
pinctrl_uart5: uart5-grp {
fsl,pins = <
...
MX6QDL_PAD_CSI0_DAT19__UART5_CTS_B 0x30b1
>;
};
"
Tested-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://lore.kernel.org/r/20220929144400.13571-1-marex@denx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-29 16:44:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:26 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2024-02-21 12:53:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-02-27 22:44:56 +01:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2024-05-28 11:40:21 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2015-12-13 11:30:03 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2018-02-27 22:44:56 +01:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2024-04-05 08:08:23 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2014-09-02 17:39:12 -04:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2014-12-09 18:11:35 +09:00
|
|
|
|
|
|
|
|
|
2014-09-02 17:39:12 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-05 08:08:23 +02:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2014-09-02 17:39:12 -04:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-09 18:11:36 +09:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2014-12-09 18:11:36 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2019-08-28 21:37:55 +03:00
|
|
|
|
2014-12-09 18:11:36 +09:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
|
|
|
|
|
2014-12-09 18:11:36 +09:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2014-12-09 18:11:36 +09:00
|
|
|
|
|
|
|
|
|
2017-08-28 09:02:29 +01:00
|
|
|
|
2018-03-02 11:07:22 +01:00
|
|
|
|
2017-08-28 09:02:29 +01:00
|
|
|
|
2024-04-05 08:08:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2024-04-05 08:08:23 +02:00
|
|
|
|
2009-06-11 14:37:19 +01:00
|
|
|
|
|
|
|
|
|
2024-04-05 08:08:23 +02:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
2024-04-05 08:08:23 +02:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2014-12-09 18:11:28 +09:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-09 18:11:31 +09:00
|
|
|
|
2022-10-19 12:11:24 +03:00
|
|
|
|
2014-12-09 18:11:28 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
2024-04-05 08:08:23 +02:00
|
|
|
|
2014-12-09 18:11:29 +09:00
|
|
|
|
2014-05-29 19:30:54 -07:00
|
|
|
|
2024-04-05 08:08:23 +02:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2018-03-02 11:07:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-07-18 14:01:52 +02:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
2018-02-27 22:44:56 +01:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2024-04-05 08:08:23 +02:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:28 +01:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
2014-12-09 18:11:28 +09:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:28 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-05 08:08:23 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-11-07 06:42:53 +00:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
2014-12-09 18:11:26 +09:00
|
|
|
|
|
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
2024-04-05 08:08:23 +02:00
|
|
|
|
2014-12-09 18:11:31 +09:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-09 18:11:31 +09:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-02-27 22:44:56 +01:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2024-05-28 11:40:21 +02:00
|
|
|
|
2024-04-05 08:08:23 +02:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2024-04-05 08:08:23 +02:00
|
|
|
|
2018-03-02 11:07:29 +01:00
|
|
|
|
|
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-24 11:17:11 +01:00
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2024-02-21 12:53:04 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-12-02 11:41:26 +01:00
|
|
|
|
|
|
|
|
|
2024-02-21 12:53:04 +01:00
|
|
|
|
2015-02-24 11:17:11 +01:00
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
2022-01-19 15:52:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-14 11:30:12 +02:00
|
|
|
|
2022-01-19 15:52:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:28 +01:00
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
2020-07-14 11:30:12 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-24 11:17:11 +01:00
|
|
|
|
|
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2019-08-28 21:37:55 +03:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2014-12-09 18:11:36 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
|
|
|
|
|
2019-08-28 21:37:55 +03:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2014-12-09 18:11:36 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-04-05 08:08:23 +02:00
|
|
|
|
2014-09-02 17:39:12 -04:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2020-01-21 08:17:02 +01:00
|
|
|
|
2005-10-12 19:58:08 +01:00
|
|
|
|
2008-02-06 01:36:20 -08:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2005-10-12 19:58:08 +01:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
serial: imx: Update mctrl old_status on RTSD interrupt
When sending data using DMA at high baudrate (4 Mbdps in local test case) to
a device with small RX buffer which keeps asserting RTS after every received
byte, it is possible that the iMX UART driver would not recognize the falling
edge of RTS input signal and get stuck, unable to transmit any more data.
This condition happens when the following sequence of events occur:
- imx_uart_mctrl_check() is called at some point and takes a snapshot of UART
control signal status into sport->old_status using imx_uart_get_hwmctrl().
The RTSS/TIOCM_CTS bit is of interest here (*).
- DMA transfer occurs, the remote device asserts RTS signal after each byte.
The i.MX UART driver recognizes each such RTS signal change, raises an
interrupt with USR1 register RTSD bit set, which leads to invocation of
__imx_uart_rtsint(), which calls uart_handle_cts_change().
- If the RTS signal is deasserted, uart_handle_cts_change() clears
port->hw_stopped and unblocks the port for further data transfers.
- If the RTS is asserted, uart_handle_cts_change() sets port->hw_stopped
and blocks the port for further data transfers. This may occur as the
last interrupt of a transfer, which means port->hw_stopped remains set
and the port remains blocked (**).
- Any further data transfer attempts will trigger imx_uart_mctrl_check(),
which will read current status of UART control signals by calling
imx_uart_get_hwmctrl() (***) and compare it with sport->old_status .
- If current status differs from sport->old_status for RTS signal,
uart_handle_cts_change() is called and possibly unblocks the port
by clearing port->hw_stopped .
- If current status does not differ from sport->old_status for RTS
signal, no action occurs. This may occur in case prior snapshot (*)
was taken before any transfer so the RTS is deasserted, current
snapshot (***) was taken after a transfer and therefore RTS is
deasserted again, which means current status and sport->old_status
are identical. In case (**) triggered when RTS got asserted, and
made port->hw_stopped set, the port->hw_stopped will remain set
because no change on RTS line is recognized by this driver and
uart_handle_cts_change() is not called from here to unblock the
port->hw_stopped.
Update sport->old_status in __imx_uart_rtsint() accordingly to make
imx_uart_mctrl_check() detect such RTS change. Note that TIOCM_CAR
and TIOCM_RI bits in sport->old_status do not suffer from this problem.
Fixes: ceca629e0b48 ("[ARM] 2971/1: i.MX uart handle rts irq")
Cc: stable <stable@kernel.org>
Reviewed-by: Esben Haabendal <esben@geanix.com>
Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://lore.kernel.org/r/20241002184133.19427-1-marex@denx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2024-10-02 20:40:38 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-01-17 11:03:55 +02:00
|
|
|
|
2009-09-19 13:13:31 -07:00
|
|
|
|
2005-10-12 19:58:08 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-01-21 08:17:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2020-01-21 08:17:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2020-01-21 08:17:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-02-06 01:36:20 -08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-02-01 17:26:55 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-13 10:39:50 +02:00
|
|
|
|
|
|
|
|
|
2023-02-01 17:26:55 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-13 10:39:50 +02:00
|
|
|
|
2020-01-21 08:17:02 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2013-01-03 15:53:03 +01:00
|
|
|
|
2023-02-01 17:27:00 +03:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2023-02-01 17:26:55 +03:00
|
|
|
|
2023-02-01 17:26:59 +03:00
|
|
|
|
2023-02-01 17:26:55 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-02-01 17:26:59 +03:00
|
|
|
|
2023-02-01 17:27:00 +03:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2011-08-24 17:41:47 +08:00
|
|
|
|
2023-02-01 17:26:59 +03:00
|
|
|
|
2011-08-24 17:41:47 +08:00
|
|
|
|
2023-02-01 17:26:59 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-08-24 17:41:47 +08:00
|
|
|
|
2008-04-17 08:39:22 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-02-01 17:26:57 +03:00
|
|
|
|
2008-04-17 08:39:22 +01:00
|
|
|
|
|
|
|
|
|
2014-12-18 12:37:13 -07:00
|
|
|
|
2008-04-17 08:39:22 +01:00
|
|
|
|
2011-08-24 17:41:47 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-04-17 08:39:22 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-02-01 17:26:56 +03:00
|
|
|
|
|
|
|
|
|
2008-04-17 08:39:22 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2014-12-09 18:11:22 +09:00
|
|
|
|
2023-02-01 17:26:57 +03:00
|
|
|
|
2014-12-09 18:11:22 +09:00
|
|
|
|
2015-06-20 19:25:35 +02:00
|
|
|
|
|
|
|
|
|
2008-04-17 08:39:22 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-01-03 15:53:06 +01:00
|
|
|
|
2020-01-21 08:17:02 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-01-21 08:17:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2020-01-21 08:17:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2020-01-21 08:17:02 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2016-03-24 14:24:24 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-13 10:39:50 +02:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2016-03-24 14:24:24 +01:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
|
|
|
|
|
2016-03-24 14:24:24 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-09-26 15:55:31 +02:00
|
|
|
|
2016-03-24 14:24:24 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2016-03-24 14:24:24 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-13 10:39:50 +02:00
|
|
|
|
|
|
|
|
|
2016-03-24 14:24:24 +01:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2016-03-24 14:24:24 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2016-03-24 14:24:24 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2008-07-05 10:02:48 +02:00
|
|
|
|
|
|
|
|
|
2018-02-18 22:02:44 +01:00
|
|
|
|
2016-03-24 14:24:21 +01:00
|
|
|
|
2008-07-05 10:02:48 +02:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2020-01-21 08:17:02 +01:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-05 10:02:48 +02:00
|
|
|
|
2018-02-18 22:02:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-08-28 21:37:55 +03:00
|
|
|
|
2018-02-18 22:02:44 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-05-28 17:47:47 +02:00
|
|
|
|
|
|
|
|
|
2020-01-21 08:17:02 +01:00
|
|
|
|
2016-03-24 14:24:21 +01:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2008-07-05 10:02:48 +02:00
|
|
|
|
2018-02-18 22:02:44 +01:00
|
|
|
|
2020-01-21 08:17:02 +01:00
|
|
|
|
2016-03-24 14:24:21 +01:00
|
|
|
|
|
|
|
|
|
2008-07-05 10:02:48 +02:00
|
|
|
|
2018-02-18 22:02:43 +01:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2016-03-24 14:24:25 +01:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2016-03-24 14:24:25 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-02-18 22:02:43 +01:00
|
|
|
|
2020-01-21 08:17:02 +01:00
|
|
|
|
2016-03-24 14:24:21 +01:00
|
|
|
|
|
|
|
|
|
2008-07-05 10:02:48 +02:00
|
|
|
|
2018-02-18 22:02:43 +01:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2016-03-24 14:24:21 +01:00
|
|
|
|
|
|
|
|
|
2011-12-13 01:23:48 -02:00
|
|
|
|
2018-02-18 22:02:43 +01:00
|
|
|
|
2013-05-14 17:06:07 +02:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2016-03-24 14:24:21 +01:00
|
|
|
|
2013-05-14 17:06:07 +02:00
|
|
|
|
|
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2020-01-21 08:17:02 +01:00
|
|
|
|
2016-03-24 14:24:21 +01:00
|
|
|
|
2008-07-05 10:02:48 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2024-05-28 11:40:21 +02:00
|
|
|
|
2013-10-11 18:30:59 +08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2013-10-11 18:30:59 +08:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:21 +01:00
|
|
|
|
2013-10-11 18:30:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2018-02-27 22:44:56 +01:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2015-12-13 11:30:03 +01:00
|
|
|
|
2024-05-28 11:40:21 +02:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2015-12-13 11:30:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-02-27 22:44:56 +01:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2024-05-28 11:40:21 +02:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2007-04-26 08:26:13 +01:00
|
|
|
|
2015-02-24 11:17:11 +01:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
|
|
|
|
|
2019-07-26 21:52:40 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
|
|
|
|
|
2019-07-26 21:52:40 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2015-02-24 11:17:11 +01:00
|
|
|
|
2013-11-29 17:29:24 +08:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2015-10-18 21:34:46 +02:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
|
|
|
|
|
2015-10-18 21:34:46 +02:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2013-11-29 17:29:24 +08:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2015-12-13 11:30:03 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2024-05-28 11:40:21 +02:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2007-04-26 08:26:13 +01:00
|
|
|
|
2013-01-07 10:25:02 +05:30
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2007-04-26 08:26:13 +01:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2015-10-18 21:34:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2015-10-18 21:34:47 +02:00
|
|
|
|
2025-05-09 07:51:14 +02:00
|
|
|
|
2015-10-18 21:34:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2015-10-18 21:34:47 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2015-09-04 17:52:41 +02:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2015-09-04 17:52:41 +02:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2015-09-04 17:52:41 +02:00
|
|
|
|
|
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-10-15 15:23:40 +08:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2016-08-08 15:38:27 +03:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2016-08-08 15:38:27 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2018-06-20 00:56:58 +08:00
|
|
|
|
2015-05-19 10:54:09 +02:00
|
|
|
|
2016-08-08 15:38:27 +03:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2016-08-08 15:38:27 +03:00
|
|
|
|
2014-12-09 18:11:33 +09:00
|
|
|
|
2015-09-04 17:52:39 +02:00
|
|
|
|
2023-02-01 17:26:55 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-08 15:38:27 +03:00
|
|
|
|
2023-02-01 17:26:55 +03:00
|
|
|
|
|
|
|
|
|
2016-08-08 15:38:27 +03:00
|
|
|
|
2023-02-01 17:26:55 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-08 15:38:27 +03:00
|
|
|
|
2023-02-01 17:26:55 +03:00
|
|
|
|
|
|
|
|
|
2016-08-08 15:38:27 +03:00
|
|
|
|
2023-02-01 17:26:55 +03:00
|
|
|
|
|
|
|
|
|
2016-08-08 15:38:27 +03:00
|
|
|
|
2023-02-01 17:26:55 +03:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2023-02-11 07:45:50 -08:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2023-02-01 17:26:55 +03:00
|
|
|
|
|
|
|
|
|
2016-08-08 15:38:27 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-02-01 17:26:55 +03:00
|
|
|
|
2016-08-08 15:38:27 +03:00
|
|
|
|
|
|
|
|
|
2023-02-01 17:26:55 +03:00
|
|
|
|
2016-08-08 15:38:27 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-02-01 17:26:55 +03:00
|
|
|
|
2016-08-08 15:38:27 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-02-01 17:26:55 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-08 15:38:27 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-08 15:38:27 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-04-30 19:50:37 +02:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-08 15:38:27 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2014-12-09 18:11:26 +09:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-28 11:03:49 +01:00
|
|
|
|
2016-08-08 15:38:27 +03:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-08 15:38:28 +03:00
|
|
|
|
2024-09-13 10:39:50 +02:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2016-08-08 15:38:28 +03:00
|
|
|
|
2018-02-23 18:27:50 -08:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2016-08-08 15:38:28 +03:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
|
|
|
|
|
2016-08-08 15:38:28 +03:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2016-08-08 15:38:28 +03:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2018-02-23 18:27:50 -08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2018-02-23 18:27:50 -08:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2018-02-23 18:27:50 -08:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2018-02-23 18:27:50 -08:00
|
|
|
|
2016-08-08 15:38:28 +03:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2016-08-08 15:38:28 +03:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2016-08-08 15:38:28 +03:00
|
|
|
|
|
|
|
|
|
2023-02-01 17:26:55 +03:00
|
|
|
|
|
|
|
|
|
2016-08-08 15:38:28 +03:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2024-05-08 15:37:44 +02:00
|
|
|
|
2022-01-17 07:04:17 +01:00
|
|
|
|
2025-06-19 08:46:17 -03:00
|
|
|
|
2015-09-04 17:52:40 +02:00
|
|
|
|
|
|
|
|
|
2015-09-04 17:52:37 +02:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
|
|
|
|
|
2015-09-04 17:52:37 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2015-09-04 17:52:37 +02:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2015-09-04 17:52:37 +02:00
|
|
|
|
|
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-09-13 10:17:05 +02:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
2016-08-08 15:38:27 +03:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-09-13 10:17:05 +02:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-08-29 16:29:25 +08:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2023-11-19 17:12:48 +01:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-11-19 17:12:48 +01:00
|
|
|
|
|
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2023-11-19 17:12:48 +01:00
|
|
|
|
|
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
2023-11-19 17:12:48 +01:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-04 17:52:40 +02:00
|
|
|
|
|
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-04-30 19:50:37 +02:00
|
|
|
|
|
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-08-08 15:38:27 +03:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
2023-11-19 17:12:48 +01:00
|
|
|
|
|
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2023-11-19 17:12:48 +01:00
|
|
|
|
|
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
2023-11-19 17:12:48 +01:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-09-04 17:52:40 +02:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-13 10:39:50 +02:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2018-03-02 11:07:24 +01:00
|
|
|
|
2026-03-12 17:45:26 +08:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2026-03-12 17:45:26 +08:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2018-05-07 23:36:09 +02:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2025-06-19 08:46:17 -03:00
|
|
|
|
2015-09-04 17:52:40 +02:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2010-05-05 11:47:07 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2024-05-28 11:40:21 +02:00
|
|
|
|
2023-02-01 17:26:54 +03:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2018-02-18 22:02:45 +01:00
|
|
|
|
2023-06-16 12:47:23 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-06-28 13:39:42 +08:00
|
|
|
|
|
|
|
|
|
2014-10-27 14:49:38 -02:00
|
|
|
|
2013-06-28 13:39:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-10-27 14:49:38 -02:00
|
|
|
|
2013-06-09 10:01:19 +08:00
|
|
|
|
2013-06-04 09:59:33 +08:00
|
|
|
|
2025-06-19 08:46:17 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2009-06-11 14:53:18 +01:00
|
|
|
|
2010-05-05 11:47:07 +02:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
|
|
|
|
|
2010-05-05 11:47:07 +02:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2015-09-04 17:52:42 +02:00
|
|
|
|
2023-09-28 08:43:20 +02:00
|
|
|
|
|
|
|
|
|
2018-02-18 22:02:45 +01:00
|
|
|
|
2023-09-28 08:43:20 +02:00
|
|
|
|
2015-09-04 17:52:42 +02:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2023-02-01 17:26:54 +03:00
|
|
|
|
2014-05-21 08:56:28 +08:00
|
|
|
|
2023-02-01 17:26:54 +03:00
|
|
|
|
2009-06-11 14:53:18 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
|
|
|
|
|
2017-06-28 15:59:36 +02:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2009-06-11 14:53:18 +01:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2007-04-26 08:26:13 +01:00
|
|
|
|
2020-02-26 16:23:19 -06:00
|
|
|
|
2022-04-11 10:19:57 +02:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2020-02-26 16:23:19 -06:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2014-12-09 18:11:34 +09:00
|
|
|
|
2020-02-26 16:23:19 -06:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
|
|
|
|
|
2013-05-30 15:47:04 +02:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2016-03-24 14:24:22 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2017-04-07 11:45:24 +02:00
|
|
|
|
2018-03-02 11:07:26 +01:00
|
|
|
|
2026-03-12 17:45:26 +08:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2026-03-12 17:45:26 +08:00
|
|
|
|
2018-03-02 11:07:26 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:27 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:26 +01:00
|
|
|
|
2017-04-07 11:45:24 +02:00
|
|
|
|
2023-06-16 12:47:23 +02:00
|
|
|
|
tty: serial: imx: Handle RS485 DE signal active high
The default polarity of RS485 DE signal is active high. This driver does
not handle such case properly. Currently, when a pin is multiplexed as a
UART CTS_B on boot, this pin is pulled HIGH by the i.MX UART CTS circuit,
which activates DE signal on the RS485 transceiver and thus behave as if
the RS485 was transmitting data, so the system blocks the RS485 bus when
it starts and until user application takes over. This behavior is not OK.
The problem consists of two separate parts.
First, the i.MX UART IP requires UCR1 UARTEN and UCR2 RXEN to be set for
UCR2 CTSC and CTS bits to have any effect. The UCR2 CTSC bit permits the
driver to set CTS (RTS_B or RS485 DE signal) to either level sychronous
to the internal UART IP clock. Compared to other options, like GPIO CTS
control, this has the benefit of being synchronous to the UART IP clock
and thus without glitches or bus delays. The reason for the CTS design
is likely because when the Receiver is disabled, the UART IP can never
indicate that it is ready to receive data by assering CTS signal, so
the CTS is always pulled HIGH by default.
When the port is closed by user space, imx_uart_stop_rx() clears UCR2
RXEN bit, and imx_uart_shutdown() clears UCR1 UARTEN bit. This disables
UART Receiver and UART itself, and forces CTS signal HIGH, which leads
to the RS485 bus being blocked because RS485 DE is incorrectly active.
The proposed solution for this problem is to keep the Receiver running
even after the port is closed, but in loopback mode. This disconnects
the RX FIFO input from the RXD external signal, and since UCR2 TXEN is
cleared, the UART Transmitter is disabled, so nothing can feed data in
the RX FIFO. Because the Receiver is still enabled, the UCR2 CTSC and
CTS bits still have effect and the CTS (RS485 DE) control is retained.
Note that in case of RS485 DE signal active low, there is no problem and
no special handling is necessary. The CTS signal defaults to HIGH, thus
the RS485 is by default set to Receive and the bus is not blocked.
Note that while there is the possibility to control CTS using GPIO with
either CTS polarity, this has the downside of not being synchronous to
the UART IP clock and thus glitchy and susceptible to slow DE switching.
Second, on boot, before the UART driver probe callback is called, the
driver core triggers pinctrl_init_done() and configures the IOMUXC to
default state. At this point, UCR1 UARTEN and UCR2 RXEN are both still
cleared, but UART CTS_B (RS485 DE) is configured as CTS function, thus
the RTS signal is pulled HIGH by the UART IP CTS circuit.
One part of the solution here is to enable UCR1 UARTEN and UCR2 RXEN and
UTS loopback in this driver probe callback, thus unblocking the CTSC and
CTS control early on. But this is still too late, since the pin control
is already configured and CTS has been pulled HIGH for a short period
of time.
When Linux kernel boots and this driver is bound, the pin control is set
to special "init" state if the state is available, and driver can switch
the "default" state afterward when ready. This state can be used to set
the CTS line as a GPIO in DT temporarily, and a GPIO hog can force such
GPIO to LOW, thus keeping the RS485 DE line LOW early on boot. Once the
driver takes over and UCR1 UARTEN and UCR2 RXEN and UTS loopback are all
enabled, the driver can switch to "default" pin control state and control
the CTS line as function instead. DT binding example is below:
"
&gpio6 {
rts-init-hog {
gpio-hog;
gpios = <5 0>;
output-low;
line-name = "rs485-de";
};
};
&uart5 { /* DHCOM UART2 */
pinctrl-0 = <&pinctrl_uart5>;
pinctrl-1 = <&pinctrl_uart5_init>;
pinctrl-names = "default", "init";
...
};
pinctrl_uart5_init: uart5-init-grp {
fsl,pins = <
...
MX6QDL_PAD_CSI0_DAT19__GPIO6_IO05 0x30b1
>;
};
pinctrl_uart5: uart5-grp {
fsl,pins = <
...
MX6QDL_PAD_CSI0_DAT19__UART5_CTS_B 0x30b1
>;
};
"
Tested-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://lore.kernel.org/r/20220929144400.13571-1-marex@denx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-29 16:44:00 +02:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2024-05-28 11:40:21 +02:00
|
|
|
|
2012-08-27 09:36:51 +02:00
|
|
|
|
tty: serial: imx: Handle RS485 DE signal active high
The default polarity of RS485 DE signal is active high. This driver does
not handle such case properly. Currently, when a pin is multiplexed as a
UART CTS_B on boot, this pin is pulled HIGH by the i.MX UART CTS circuit,
which activates DE signal on the RS485 transceiver and thus behave as if
the RS485 was transmitting data, so the system blocks the RS485 bus when
it starts and until user application takes over. This behavior is not OK.
The problem consists of two separate parts.
First, the i.MX UART IP requires UCR1 UARTEN and UCR2 RXEN to be set for
UCR2 CTSC and CTS bits to have any effect. The UCR2 CTSC bit permits the
driver to set CTS (RTS_B or RS485 DE signal) to either level sychronous
to the internal UART IP clock. Compared to other options, like GPIO CTS
control, this has the benefit of being synchronous to the UART IP clock
and thus without glitches or bus delays. The reason for the CTS design
is likely because when the Receiver is disabled, the UART IP can never
indicate that it is ready to receive data by assering CTS signal, so
the CTS is always pulled HIGH by default.
When the port is closed by user space, imx_uart_stop_rx() clears UCR2
RXEN bit, and imx_uart_shutdown() clears UCR1 UARTEN bit. This disables
UART Receiver and UART itself, and forces CTS signal HIGH, which leads
to the RS485 bus being blocked because RS485 DE is incorrectly active.
The proposed solution for this problem is to keep the Receiver running
even after the port is closed, but in loopback mode. This disconnects
the RX FIFO input from the RXD external signal, and since UCR2 TXEN is
cleared, the UART Transmitter is disabled, so nothing can feed data in
the RX FIFO. Because the Receiver is still enabled, the UCR2 CTSC and
CTS bits still have effect and the CTS (RS485 DE) control is retained.
Note that in case of RS485 DE signal active low, there is no problem and
no special handling is necessary. The CTS signal defaults to HIGH, thus
the RS485 is by default set to Receive and the bus is not blocked.
Note that while there is the possibility to control CTS using GPIO with
either CTS polarity, this has the downside of not being synchronous to
the UART IP clock and thus glitchy and susceptible to slow DE switching.
Second, on boot, before the UART driver probe callback is called, the
driver core triggers pinctrl_init_done() and configures the IOMUXC to
default state. At this point, UCR1 UARTEN and UCR2 RXEN are both still
cleared, but UART CTS_B (RS485 DE) is configured as CTS function, thus
the RTS signal is pulled HIGH by the UART IP CTS circuit.
One part of the solution here is to enable UCR1 UARTEN and UCR2 RXEN and
UTS loopback in this driver probe callback, thus unblocking the CTSC and
CTS control early on. But this is still too late, since the pin control
is already configured and CTS has been pulled HIGH for a short period
of time.
When Linux kernel boots and this driver is bound, the pin control is set
to special "init" state if the state is available, and driver can switch
the "default" state afterward when ready. This state can be used to set
the CTS line as a GPIO in DT temporarily, and a GPIO hog can force such
GPIO to LOW, thus keeping the RS485 DE line LOW early on boot. Once the
driver takes over and UCR1 UARTEN and UCR2 RXEN and UTS loopback are all
enabled, the driver can switch to "default" pin control state and control
the CTS line as function instead. DT binding example is below:
"
&gpio6 {
rts-init-hog {
gpio-hog;
gpios = <5 0>;
output-low;
line-name = "rs485-de";
};
};
&uart5 { /* DHCOM UART2 */
pinctrl-0 = <&pinctrl_uart5>;
pinctrl-1 = <&pinctrl_uart5_init>;
pinctrl-names = "default", "init";
...
};
pinctrl_uart5_init: uart5-init-grp {
fsl,pins = <
...
MX6QDL_PAD_CSI0_DAT19__GPIO6_IO05 0x30b1
>;
};
pinctrl_uart5: uart5-grp {
fsl,pins = <
...
MX6QDL_PAD_CSI0_DAT19__UART5_CTS_B 0x30b1
>;
};
"
Tested-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://lore.kernel.org/r/20220929144400.13571-1-marex@denx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-29 16:44:00 +02:00
|
|
|
|
2024-06-25 20:42:05 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
2016-09-13 10:17:05 +02:00
|
|
|
|
2018-05-07 23:36:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2016-09-13 10:17:05 +02:00
|
|
|
|
2018-05-07 23:36:10 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-09-19 15:42:57 +08:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2013-07-08 17:14:18 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-02-17 07:21:53 +01:00
|
|
|
|
2015-12-13 11:30:03 +01:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2018-05-24 19:30:23 +02:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2009-06-11 14:38:38 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-05 10:17:26 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
tty: serial: imx: disable TXDC IRQ in imx_uart_shutdown() to avoid IRQ storm
The IPG clock is disabled at the end of imx_uart_shutdown(); we really
don't want to run any IRQ handlers after this point.
At least on i.MX8MN, the UART will happily continue to generate interrupts
even with its clocks disabled, but in this state, all register writes are
ignored (which will cause the shadow registers to differ from the actual
register values, resulting in all kinds of weirdness).
In a transfer without DMA, this could lead to the following sequence of
events:
- The UART finishes its transmission while imx_uart_shutdown() is run,
triggering the TXDC interrupt (we can trigger this fairly reliably by
writing a single byte to the TTY and closing it right away)
- imx_uart_shutdown() finishes, disabling the UART clocks
- imx_uart_int() -> imx_uart_transmit_buffer() -> imx_uart_stop_tx()
imx_uart_stop_tx() should now clear UCR4_TCEN to disable the TXDC
interrupt, but this register write is ineffective. This results in an
interrupt storm.
To disable all interrupts in the same place, and to avoid setting UCR4
twice, clearing UCR4_OREN is moved below del_timer_sync() as well; this
should be harmless.
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Link: https://lore.kernel.org/r/20200925082412.12960-1-matthias.schiffer@ew.tq-group.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-25 10:24:12 +02:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2022-12-14 11:11:37 +08:00
|
|
|
|
|
|
|
|
|
tty: serial: imx: Handle RS485 DE signal active high
The default polarity of RS485 DE signal is active high. This driver does
not handle such case properly. Currently, when a pin is multiplexed as a
UART CTS_B on boot, this pin is pulled HIGH by the i.MX UART CTS circuit,
which activates DE signal on the RS485 transceiver and thus behave as if
the RS485 was transmitting data, so the system blocks the RS485 bus when
it starts and until user application takes over. This behavior is not OK.
The problem consists of two separate parts.
First, the i.MX UART IP requires UCR1 UARTEN and UCR2 RXEN to be set for
UCR2 CTSC and CTS bits to have any effect. The UCR2 CTSC bit permits the
driver to set CTS (RTS_B or RS485 DE signal) to either level sychronous
to the internal UART IP clock. Compared to other options, like GPIO CTS
control, this has the benefit of being synchronous to the UART IP clock
and thus without glitches or bus delays. The reason for the CTS design
is likely because when the Receiver is disabled, the UART IP can never
indicate that it is ready to receive data by assering CTS signal, so
the CTS is always pulled HIGH by default.
When the port is closed by user space, imx_uart_stop_rx() clears UCR2
RXEN bit, and imx_uart_shutdown() clears UCR1 UARTEN bit. This disables
UART Receiver and UART itself, and forces CTS signal HIGH, which leads
to the RS485 bus being blocked because RS485 DE is incorrectly active.
The proposed solution for this problem is to keep the Receiver running
even after the port is closed, but in loopback mode. This disconnects
the RX FIFO input from the RXD external signal, and since UCR2 TXEN is
cleared, the UART Transmitter is disabled, so nothing can feed data in
the RX FIFO. Because the Receiver is still enabled, the UCR2 CTSC and
CTS bits still have effect and the CTS (RS485 DE) control is retained.
Note that in case of RS485 DE signal active low, there is no problem and
no special handling is necessary. The CTS signal defaults to HIGH, thus
the RS485 is by default set to Receive and the bus is not blocked.
Note that while there is the possibility to control CTS using GPIO with
either CTS polarity, this has the downside of not being synchronous to
the UART IP clock and thus glitchy and susceptible to slow DE switching.
Second, on boot, before the UART driver probe callback is called, the
driver core triggers pinctrl_init_done() and configures the IOMUXC to
default state. At this point, UCR1 UARTEN and UCR2 RXEN are both still
cleared, but UART CTS_B (RS485 DE) is configured as CTS function, thus
the RTS signal is pulled HIGH by the UART IP CTS circuit.
One part of the solution here is to enable UCR1 UARTEN and UCR2 RXEN and
UTS loopback in this driver probe callback, thus unblocking the CTSC and
CTS control early on. But this is still too late, since the pin control
is already configured and CTS has been pulled HIGH for a short period
of time.
When Linux kernel boots and this driver is bound, the pin control is set
to special "init" state if the state is available, and driver can switch
the "default" state afterward when ready. This state can be used to set
the CTS line as a GPIO in DT temporarily, and a GPIO hog can force such
GPIO to LOW, thus keeping the RS485 DE line LOW early on boot. Once the
driver takes over and UCR1 UARTEN and UCR2 RXEN and UTS loopback are all
enabled, the driver can switch to "default" pin control state and control
the CTS line as function instead. DT binding example is below:
"
&gpio6 {
rts-init-hog {
gpio-hog;
gpios = <5 0>;
output-low;
line-name = "rs485-de";
};
};
&uart5 { /* DHCOM UART2 */
pinctrl-0 = <&pinctrl_uart5>;
pinctrl-1 = <&pinctrl_uart5_init>;
pinctrl-names = "default", "init";
...
};
pinctrl_uart5_init: uart5-init-grp {
fsl,pins = <
...
MX6QDL_PAD_CSI0_DAT19__GPIO6_IO05 0x30b1
>;
};
pinctrl_uart5: uart5-grp {
fsl,pins = <
...
MX6QDL_PAD_CSI0_DAT19__UART5_CTS_B 0x30b1
>;
};
"
Tested-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://lore.kernel.org/r/20220929144400.13571-1-marex@denx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-29 16:44:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
tty: serial: imx: disable TXDC IRQ in imx_uart_shutdown() to avoid IRQ storm
The IPG clock is disabled at the end of imx_uart_shutdown(); we really
don't want to run any IRQ handlers after this point.
At least on i.MX8MN, the UART will happily continue to generate interrupts
even with its clocks disabled, but in this state, all register writes are
ignored (which will cause the shadow registers to differ from the actual
register values, resulting in all kinds of weirdness).
In a transfer without DMA, this could lead to the following sequence of
events:
- The UART finishes its transmission while imx_uart_shutdown() is run,
triggering the TXDC interrupt (we can trigger this fairly reliably by
writing a single byte to the TTY and closing it right away)
- imx_uart_shutdown() finishes, disabling the UART clocks
- imx_uart_int() -> imx_uart_transmit_buffer() -> imx_uart_stop_tx()
imx_uart_stop_tx() should now clear UCR4_TCEN to disable the TXDC
interrupt, but this register write is ineffective. This results in an
interrupt storm.
To disable all interrupts in the same place, and to avoid setting UCR4
twice, clearing UCR4_OREN is moved below del_timer_sync() as well; this
should be harmless.
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Link: https://lore.kernel.org/r/20200925082412.12960-1-matthias.schiffer@ew.tq-group.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-25 10:24:12 +02:00
|
|
|
|
|
|
|
|
|
2021-11-25 10:03:49 +08:00
|
|
|
|
tty: serial: imx: disable TXDC IRQ in imx_uart_shutdown() to avoid IRQ storm
The IPG clock is disabled at the end of imx_uart_shutdown(); we really
don't want to run any IRQ handlers after this point.
At least on i.MX8MN, the UART will happily continue to generate interrupts
even with its clocks disabled, but in this state, all register writes are
ignored (which will cause the shadow registers to differ from the actual
register values, resulting in all kinds of weirdness).
In a transfer without DMA, this could lead to the following sequence of
events:
- The UART finishes its transmission while imx_uart_shutdown() is run,
triggering the TXDC interrupt (we can trigger this fairly reliably by
writing a single byte to the TTY and closing it right away)
- imx_uart_shutdown() finishes, disabling the UART clocks
- imx_uart_int() -> imx_uart_transmit_buffer() -> imx_uart_stop_tx()
imx_uart_stop_tx() should now clear UCR4_TCEN to disable the TXDC
interrupt, but this register write is ineffective. This results in an
interrupt storm.
To disable all interrupts in the same place, and to avoid setting UCR4
twice, clearing UCR4_OREN is moved below del_timer_sync() as well; this
should be harmless.
Signed-off-by: Matthias Schiffer <matthias.schiffer@ew.tq-group.com>
Link: https://lore.kernel.org/r/20200925082412.12960-1-matthias.schiffer@ew.tq-group.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2020-09-25 10:24:12 +02:00
|
|
|
|
|
|
|
|
|
2024-06-25 20:42:05 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2013-06-04 09:59:33 +08:00
|
|
|
|
2013-06-28 13:39:42 +08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2018-02-27 22:44:56 +01:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2013-10-11 18:30:58 +08:00
|
|
|
|
2024-05-28 11:40:21 +02:00
|
|
|
|
2014-12-09 18:11:27 +09:00
|
|
|
|
2013-10-11 18:30:58 +08:00
|
|
|
|
2014-12-09 18:11:27 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
|
|
|
|
|
2014-12-09 18:11:27 +09:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-09-28 11:38:51 +01:00
|
|
|
|
2013-10-11 18:30:58 +08:00
|
|
|
|
2015-01-13 10:00:26 -02:00
|
|
|
|
2023-02-01 17:26:54 +03:00
|
|
|
|
2015-01-13 10:00:26 -02:00
|
|
|
|
2013-10-11 18:30:58 +08:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2022-08-16 14:57:37 +03:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2024-05-28 11:40:21 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-08-28 21:37:53 +03:00
|
|
|
|
2015-12-13 11:30:03 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2019-08-28 21:37:54 +03:00
|
|
|
|
2009-06-11 14:55:22 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-04-05 10:17:26 +02:00
|
|
|
|
2019-06-11 15:05:24 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2019-06-11 15:05:24 +03:00
|
|
|
|
2019-06-26 17:11:30 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-06-26 17:11:28 +03:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-06-26 17:11:29 +03:00
|
|
|
|
|
|
|
|
|
2015-02-24 11:17:11 +01:00
|
|
|
|
2019-06-26 17:11:29 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-12-13 11:30:03 +01:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2017-01-30 09:12:11 -02:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2015-12-13 11:30:03 +01:00
|
|
|
|
2019-07-26 21:52:41 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2019-06-26 17:11:29 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2006-01-13 20:51:44 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-18 12:37:14 -07:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2014-12-09 18:11:22 +09:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-24 11:17:10 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-07-18 18:52:49 +02:00
|
|
|
|
2015-02-24 11:17:10 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-05 10:02:44 +02:00
|
|
|
|
2009-06-11 14:52:23 +01:00
|
|
|
|
|
|
|
|
|
2008-07-05 10:02:44 +02:00
|
|
|
|
2010-06-01 22:52:52 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-06-16 17:02:15 +01:00
|
|
|
|
2009-06-11 14:55:22 +01:00
|
|
|
|
2009-06-11 14:52:23 +01:00
|
|
|
|
|
|
|
|
|
2008-07-05 10:02:44 +02:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2009-06-11 14:53:18 +01:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2008-07-05 10:02:44 +02:00
|
|
|
|
2019-08-28 21:37:54 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2009-06-11 14:52:23 +01:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2019-06-26 17:11:30 +03:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2023-03-02 12:54:17 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2014-02-22 16:01:33 +04:00
|
|
|
|
2023-03-02 12:54:17 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-02 12:54:17 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-02 12:54:17 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2023-03-02 12:54:17 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2023-03-02 12:54:17 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-22 09:57:53 +01:00
|
|
|
|
2014-10-28 09:28:08 +01:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2014-10-28 09:28:08 +01:00
|
|
|
|
2024-05-28 11:40:21 +02:00
|
|
|
|
2014-10-28 09:28:08 +01:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2014-10-28 09:28:08 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-19 08:46:17 -03:00
|
|
|
|
2014-10-28 09:28:08 +01:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2014-10-28 09:28:08 +01:00
|
|
|
|
2018-03-02 11:07:26 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2018-03-02 11:07:26 +01:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2014-10-28 09:28:08 +01:00
|
|
|
|
2018-03-02 11:07:26 +01:00
|
|
|
|
2019-08-28 21:37:55 +03:00
|
|
|
|
2018-03-02 11:07:26 +01:00
|
|
|
|
2020-12-02 15:25:43 +08:00
|
|
|
|
2018-03-02 11:07:27 +01:00
|
|
|
|
2018-03-02 11:07:26 +01:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2014-10-28 09:28:08 +01:00
|
|
|
|
2018-03-02 11:07:26 +01:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:27 +01:00
|
|
|
|
2018-03-02 11:07:26 +01:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2014-10-28 09:28:08 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2011-12-22 09:57:53 +01:00
|
|
|
|
2024-05-28 11:40:21 +02:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2014-09-03 12:33:53 +01:00
|
|
|
|
2011-12-22 09:57:53 +01:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2011-12-22 09:57:53 +01:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2011-12-22 09:57:53 +01:00
|
|
|
|
2024-05-28 11:40:21 +02:00
|
|
|
|
2011-12-22 09:57:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2011-12-22 09:57:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2011-12-22 09:57:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2011-12-22 09:57:53 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-02-27 22:44:56 +01:00
|
|
|
|
2022-06-24 23:42:08 +03:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2015-02-24 11:17:11 +01:00
|
|
|
|
2024-05-28 11:40:21 +02:00
|
|
|
|
2024-07-03 13:25:40 +02:00
|
|
|
|
2015-02-24 11:17:11 +01:00
|
|
|
|
|
|
|
|
|
2018-04-19 17:39:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-24 11:17:11 +01:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2015-02-24 11:17:11 +01:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2017-01-30 09:12:11 -02:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2015-02-24 11:17:11 +01:00
|
|
|
|
|
|
|
|
|
2016-02-29 14:34:10 +02:00
|
|
|
|
|
|
|
|
|
2024-06-21 17:37:49 +02:00
|
|
|
|
2024-07-03 13:25:40 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-06-19 08:46:17 -03:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2024-06-21 17:37:49 +02:00
|
|
|
|
2016-02-29 14:34:10 +02:00
|
|
|
|
2015-02-24 11:17:11 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-22 09:57:53 +01:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-22 09:57:53 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2020-07-24 15:08:14 +08:00
|
|
|
|
2022-03-03 09:08:31 +01:00
|
|
|
|
2006-03-20 20:00:09 +00:00
|
|
|
|
2024-05-28 11:40:21 +02:00
|
|
|
|
2007-04-26 08:26:13 +01:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2006-03-20 20:00:09 +00:00
|
|
|
|
2007-04-26 08:26:13 +01:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2024-09-13 10:52:19 +02:00
|
|
|
|
|
|
|
|
|
2006-03-20 20:00:09 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2024-09-13 10:52:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2024-09-13 10:52:19 +02:00
|
|
|
|
2011-12-22 09:57:52 +01:00
|
|
|
|
2024-04-11 14:19:23 +02:00
|
|
|
|
2012-08-27 09:36:51 +02:00
|
|
|
|
2024-09-13 10:52:19 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2011-12-22 09:57:52 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2011-12-22 09:57:52 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2011-06-25 02:04:33 +08:00
|
|
|
|
2009-05-27 18:23:48 +02:00
|
|
|
|
2019-08-28 21:37:55 +03:00
|
|
|
|
2009-05-27 18:23:48 +02:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2024-09-13 10:52:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2011-12-22 09:57:52 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2024-04-11 14:19:23 +02:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2012-08-27 09:36:51 +02:00
|
|
|
|
2024-09-13 10:52:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-10-20 21:26:42 +02:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2005-04-29 22:46:40 +01:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-01-07 10:25:02 +05:30
|
|
|
|
2005-04-29 22:46:40 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2005-04-29 22:46:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-07 09:31:43 +01:00
|
|
|
|
2005-04-29 22:46:40 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-07 10:25:02 +05:30
|
|
|
|
2019-06-04 00:31:39 -03:00
|
|
|
|
2005-04-29 22:46:40 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-10-20 21:26:42 +02:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-06-28 13:39:42 +08:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2013-01-07 10:25:02 +05:30
|
|
|
|
2009-05-19 20:53:20 -04:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2013-06-28 13:39:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-09-13 10:52:19 +02:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2025-06-19 08:46:17 -03:00
|
|
|
|
2005-04-29 22:46:40 +01:00
|
|
|
|
2013-06-28 13:39:42 +08:00
|
|
|
|
|
|
|
|
|
2015-08-18 12:43:12 -03:00
|
|
|
|
2020-11-11 10:51:36 +08:00
|
|
|
|
2015-08-18 12:43:12 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-11-11 10:51:36 +08:00
|
|
|
|
2015-08-18 12:43:12 -03:00
|
|
|
|
2020-11-11 10:51:36 +08:00
|
|
|
|
2013-06-28 13:39:42 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2021-10-20 21:26:43 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
|
|
|
|
|
2008-07-05 10:02:48 +02:00
|
|
|
|
2024-09-13 10:52:19 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2021-10-20 21:26:43 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2015-08-28 11:56:19 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2008-07-05 10:02:48 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-14 11:30:12 +02:00
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
2020-07-14 11:30:12 +02:00
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
|
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
|
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2020-07-14 11:30:12 +02:00
|
|
|
|
|
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
|
|
|
|
|
2020-07-14 11:30:12 +02:00
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
2020-07-14 11:30:12 +02:00
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
|
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
|
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2020-07-14 11:30:12 +02:00
|
|
|
|
|
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
|
|
|
|
|
2022-06-06 13:04:13 +03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2021-04-30 19:50:37 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2020-12-09 18:47:12 -03:00
|
|
|
|
2008-07-05 10:02:45 +02:00
|
|
|
|
|
|
|
|
|
2021-04-30 19:50:37 +02:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
tty: serial: imx: Handle RS485 DE signal active high
The default polarity of RS485 DE signal is active high. This driver does
not handle such case properly. Currently, when a pin is multiplexed as a
UART CTS_B on boot, this pin is pulled HIGH by the i.MX UART CTS circuit,
which activates DE signal on the RS485 transceiver and thus behave as if
the RS485 was transmitting data, so the system blocks the RS485 bus when
it starts and until user application takes over. This behavior is not OK.
The problem consists of two separate parts.
First, the i.MX UART IP requires UCR1 UARTEN and UCR2 RXEN to be set for
UCR2 CTSC and CTS bits to have any effect. The UCR2 CTSC bit permits the
driver to set CTS (RTS_B or RS485 DE signal) to either level sychronous
to the internal UART IP clock. Compared to other options, like GPIO CTS
control, this has the benefit of being synchronous to the UART IP clock
and thus without glitches or bus delays. The reason for the CTS design
is likely because when the Receiver is disabled, the UART IP can never
indicate that it is ready to receive data by assering CTS signal, so
the CTS is always pulled HIGH by default.
When the port is closed by user space, imx_uart_stop_rx() clears UCR2
RXEN bit, and imx_uart_shutdown() clears UCR1 UARTEN bit. This disables
UART Receiver and UART itself, and forces CTS signal HIGH, which leads
to the RS485 bus being blocked because RS485 DE is incorrectly active.
The proposed solution for this problem is to keep the Receiver running
even after the port is closed, but in loopback mode. This disconnects
the RX FIFO input from the RXD external signal, and since UCR2 TXEN is
cleared, the UART Transmitter is disabled, so nothing can feed data in
the RX FIFO. Because the Receiver is still enabled, the UCR2 CTSC and
CTS bits still have effect and the CTS (RS485 DE) control is retained.
Note that in case of RS485 DE signal active low, there is no problem and
no special handling is necessary. The CTS signal defaults to HIGH, thus
the RS485 is by default set to Receive and the bus is not blocked.
Note that while there is the possibility to control CTS using GPIO with
either CTS polarity, this has the downside of not being synchronous to
the UART IP clock and thus glitchy and susceptible to slow DE switching.
Second, on boot, before the UART driver probe callback is called, the
driver core triggers pinctrl_init_done() and configures the IOMUXC to
default state. At this point, UCR1 UARTEN and UCR2 RXEN are both still
cleared, but UART CTS_B (RS485 DE) is configured as CTS function, thus
the RTS signal is pulled HIGH by the UART IP CTS circuit.
One part of the solution here is to enable UCR1 UARTEN and UCR2 RXEN and
UTS loopback in this driver probe callback, thus unblocking the CTSC and
CTS control early on. But this is still too late, since the pin control
is already configured and CTS has been pulled HIGH for a short period
of time.
When Linux kernel boots and this driver is bound, the pin control is set
to special "init" state if the state is available, and driver can switch
the "default" state afterward when ready. This state can be used to set
the CTS line as a GPIO in DT temporarily, and a GPIO hog can force such
GPIO to LOW, thus keeping the RS485 DE line LOW early on boot. Once the
driver takes over and UCR1 UARTEN and UCR2 RXEN and UTS loopback are all
enabled, the driver can switch to "default" pin control state and control
the CTS line as function instead. DT binding example is below:
"
&gpio6 {
rts-init-hog {
gpio-hog;
gpios = <5 0>;
output-low;
line-name = "rs485-de";
};
};
&uart5 { /* DHCOM UART2 */
pinctrl-0 = <&pinctrl_uart5>;
pinctrl-1 = <&pinctrl_uart5_init>;
pinctrl-names = "default", "init";
...
};
pinctrl_uart5_init: uart5-init-grp {
fsl,pins = <
...
MX6QDL_PAD_CSI0_DAT19__GPIO6_IO05 0x30b1
>;
};
pinctrl_uart5: uart5-grp {
fsl,pins = <
...
MX6QDL_PAD_CSI0_DAT19__UART5_CTS_B 0x30b1
>;
};
"
Tested-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://lore.kernel.org/r/20220929144400.13571-1-marex@denx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-29 16:44:00 +02:00
|
|
|
|
2008-07-05 10:02:45 +02:00
|
|
|
|
2015-02-24 11:17:07 +01:00
|
|
|
|
2006-05-04 14:07:42 +01:00
|
|
|
|
2013-01-07 10:25:06 +05:30
|
|
|
|
2008-07-05 10:02:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-09 18:47:12 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2013-01-07 10:25:06 +05:30
|
|
|
|
2020-12-09 18:47:12 -03:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-03-10 08:47:27 -06:00
|
|
|
|
|
|
|
|
|
2020-12-09 18:47:12 -03:00
|
|
|
|
2023-03-10 08:47:27 -06:00
|
|
|
|
2020-12-09 18:47:12 -03:00
|
|
|
|
2023-03-10 08:47:26 -06:00
|
|
|
|
2020-12-09 18:47:12 -03:00
|
|
|
|
2023-03-10 08:47:27 -06:00
|
|
|
|
2020-12-09 18:47:12 -03:00
|
|
|
|
2023-03-10 08:47:27 -06:00
|
|
|
|
2011-06-25 02:04:34 +08:00
|
|
|
|
2021-04-30 19:50:37 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2018-02-23 14:38:31 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-07-12 14:28:52 +08:00
|
|
|
|
2014-02-22 16:01:33 +04:00
|
|
|
|
|
|
|
|
|
2008-07-05 10:02:45 +02:00
|
|
|
|
2015-02-24 11:17:07 +01:00
|
|
|
|
2020-05-11 15:09:56 +08:00
|
|
|
|
|
|
|
|
|
2019-10-09 17:49:19 +08:00
|
|
|
|
|
|
|
|
|
2015-02-24 11:17:07 +01:00
|
|
|
|
2008-07-05 10:02:45 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-12-14 21:37:19 +08:00
|
|
|
|
2008-07-05 10:02:45 +02:00
|
|
|
|
2015-02-24 11:17:07 +01:00
|
|
|
|
2008-07-05 10:02:45 +02:00
|
|
|
|
2019-12-13 00:06:18 +00:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
|
|
|
|
|
2022-06-06 13:04:13 +03:00
|
|
|
|
|
|
|
|
|
2022-07-04 12:45:14 +03:00
|
|
|
|
2008-07-05 10:02:45 +02:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2008-07-05 10:02:46 +02:00
|
|
|
|
2015-12-13 11:30:03 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-03-07 09:31:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-08-20 09:57:04 +02:00
|
|
|
|
2013-01-07 10:25:06 +05:30
|
|
|
|
2008-07-05 10:02:46 +02:00
|
|
|
|
|
|
|
|
|
2012-03-07 09:31:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2012-08-20 09:57:04 +02:00
|
|
|
|
2013-01-07 10:25:06 +05:30
|
|
|
|
2012-03-07 09:31:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-07-05 10:02:45 +02:00
|
|
|
|
2015-06-17 17:35:43 -03:00
|
|
|
|
|
|
|
|
|
2016-09-08 14:27:53 +02:00
|
|
|
|
2023-12-24 10:32:09 +01:00
|
|
|
|
2015-06-17 17:35:43 -03:00
|
|
|
|
2016-09-08 14:27:53 +02:00
|
|
|
|
2015-06-17 17:35:43 -03:00
|
|
|
|
2020-05-12 14:40:02 +02:00
|
|
|
|
2023-12-26 12:36:47 +01:00
|
|
|
|
|
|
|
|
|
2017-11-24 23:26:40 +01:00
|
|
|
|
2018-04-19 17:39:16 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-06-17 17:35:43 -03:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2020-09-03 14:24:01 +08:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2015-06-17 17:35:43 -03:00
|
|
|
|
tty: serial: imx: disable Ageing Timer interrupt request irq
There maybe pending USR interrupt before requesting irq, however
uart_add_one_port has not executed, so there will be kernel panic:
[ 0.795668] Unable to handle kernel NULL pointer dereference at virtual addre
ss 0000000000000080
[ 0.802701] Mem abort info:
[ 0.805367] ESR = 0x0000000096000004
[ 0.808950] EC = 0x25: DABT (current EL), IL = 32 bits
[ 0.814033] SET = 0, FnV = 0
[ 0.816950] EA = 0, S1PTW = 0
[ 0.819950] FSC = 0x04: level 0 translation fault
[ 0.824617] Data abort info:
[ 0.827367] ISV = 0, ISS = 0x00000004
[ 0.831033] CM = 0, WnR = 0
[ 0.833866] [0000000000000080] user address but active_mm is swapper
[ 0.839951] Internal error: Oops: 0000000096000004 [#1] PREEMPT SMP
[ 0.845953] Modules linked in:
[ 0.848869] CPU: 0 PID: 1 Comm: swapper/0 Not tainted 6.1.1+g56321e101aca #1
[ 0.855617] Hardware name: Freescale i.MX8MP EVK (DT)
[ 0.860452] pstate: 000000c5 (nzcv daIF -PAN -UAO -TCO -DIT -SSBS BTYPE=--)
[ 0.867117] pc : __imx_uart_rxint.constprop.0+0x11c/0x2c0
[ 0.872283] lr : imx_uart_int+0xf8/0x1ec
The issue only happends in the inmate linux when Jailhouse hypervisor
enabled. The test procedure is:
while true; do
jailhouse enable imx8mp.cell
jailhouse cell linux xxxx
sleep 10
jailhouse cell destroy 1
jailhouse disable
sleep 5
done
And during the upper test, press keys to the 2nd linux console.
When `jailhouse cell destroy 1`, the 2nd linux has no chance to put
the uart to a quiese state, so USR1/2 may has pending interrupts. Then
when `jailhosue cell linux xx` to start 2nd linux again, the issue
trigger.
In order to disable irqs before requesting them, both UCR1 and UCR2 irqs
should be disabled, so here fix that, disable the Ageing Timer interrupt
in UCR2 as UCR1 does.
Fixes: 8a61f0c70ae6 ("serial: imx: Disable irqs before requesting them")
Suggested-by: Sherry Sun <sherry.sun@nxp.com>
Reviewed-by: Sherry Sun <sherry.sun@nxp.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Acked-by: Jason Liu <jason.hui.liu@nxp.com>
Link: https://lore.kernel.org/r/20230206013016.29352-1-sherry.sun@nxp.com
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2023-02-06 09:30:16 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
tty: serial: imx: Handle RS485 DE signal active high
The default polarity of RS485 DE signal is active high. This driver does
not handle such case properly. Currently, when a pin is multiplexed as a
UART CTS_B on boot, this pin is pulled HIGH by the i.MX UART CTS circuit,
which activates DE signal on the RS485 transceiver and thus behave as if
the RS485 was transmitting data, so the system blocks the RS485 bus when
it starts and until user application takes over. This behavior is not OK.
The problem consists of two separate parts.
First, the i.MX UART IP requires UCR1 UARTEN and UCR2 RXEN to be set for
UCR2 CTSC and CTS bits to have any effect. The UCR2 CTSC bit permits the
driver to set CTS (RTS_B or RS485 DE signal) to either level sychronous
to the internal UART IP clock. Compared to other options, like GPIO CTS
control, this has the benefit of being synchronous to the UART IP clock
and thus without glitches or bus delays. The reason for the CTS design
is likely because when the Receiver is disabled, the UART IP can never
indicate that it is ready to receive data by assering CTS signal, so
the CTS is always pulled HIGH by default.
When the port is closed by user space, imx_uart_stop_rx() clears UCR2
RXEN bit, and imx_uart_shutdown() clears UCR1 UARTEN bit. This disables
UART Receiver and UART itself, and forces CTS signal HIGH, which leads
to the RS485 bus being blocked because RS485 DE is incorrectly active.
The proposed solution for this problem is to keep the Receiver running
even after the port is closed, but in loopback mode. This disconnects
the RX FIFO input from the RXD external signal, and since UCR2 TXEN is
cleared, the UART Transmitter is disabled, so nothing can feed data in
the RX FIFO. Because the Receiver is still enabled, the UCR2 CTSC and
CTS bits still have effect and the CTS (RS485 DE) control is retained.
Note that in case of RS485 DE signal active low, there is no problem and
no special handling is necessary. The CTS signal defaults to HIGH, thus
the RS485 is by default set to Receive and the bus is not blocked.
Note that while there is the possibility to control CTS using GPIO with
either CTS polarity, this has the downside of not being synchronous to
the UART IP clock and thus glitchy and susceptible to slow DE switching.
Second, on boot, before the UART driver probe callback is called, the
driver core triggers pinctrl_init_done() and configures the IOMUXC to
default state. At this point, UCR1 UARTEN and UCR2 RXEN are both still
cleared, but UART CTS_B (RS485 DE) is configured as CTS function, thus
the RTS signal is pulled HIGH by the UART IP CTS circuit.
One part of the solution here is to enable UCR1 UARTEN and UCR2 RXEN and
UTS loopback in this driver probe callback, thus unblocking the CTSC and
CTS control early on. But this is still too late, since the pin control
is already configured and CTS has been pulled HIGH for a short period
of time.
When Linux kernel boots and this driver is bound, the pin control is set
to special "init" state if the state is available, and driver can switch
the "default" state afterward when ready. This state can be used to set
the CTS line as a GPIO in DT temporarily, and a GPIO hog can force such
GPIO to LOW, thus keeping the RS485 DE line LOW early on boot. Once the
driver takes over and UCR1 UARTEN and UCR2 RXEN and UTS loopback are all
enabled, the driver can switch to "default" pin control state and control
the CTS line as function instead. DT binding example is below:
"
&gpio6 {
rts-init-hog {
gpio-hog;
gpios = <5 0>;
output-low;
line-name = "rs485-de";
};
};
&uart5 { /* DHCOM UART2 */
pinctrl-0 = <&pinctrl_uart5>;
pinctrl-1 = <&pinctrl_uart5_init>;
pinctrl-names = "default", "init";
...
};
pinctrl_uart5_init: uart5-init-grp {
fsl,pins = <
...
MX6QDL_PAD_CSI0_DAT19__GPIO6_IO05 0x30b1
>;
};
pinctrl_uart5: uart5-grp {
fsl,pins = <
...
MX6QDL_PAD_CSI0_DAT19__UART5_CTS_B 0x30b1
>;
};
"
Tested-by: Christoph Niedermaier <cniedermaier@dh-electronics.com>
Reviewed-by: Fabio Estevam <festevam@denx.de>
Signed-off-by: Marek Vasut <marex@denx.de>
Link: https://lore.kernel.org/r/20220929144400.13571-1-marex@denx.de
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2022-09-29 16:44:00 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2017-04-04 11:18:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-04 11:18:51 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-04-04 11:18:51 +02:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2017-05-24 21:38:46 +02:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2017-05-24 21:38:46 +02:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2017-04-04 11:18:51 +02:00
|
|
|
|
|
|
|
|
|
2025-02-05 11:45:58 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2020-07-14 11:30:11 +02:00
|
|
|
|
2014-10-27 14:49:37 -02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-02-24 11:17:07 +01:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2014-10-27 14:49:37 -02:00
|
|
|
|
2016-09-08 14:27:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-12-26 12:36:47 +01:00
|
|
|
|
2016-09-08 14:27:53 +02:00
|
|
|
|
2014-10-27 14:49:37 -02:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2014-10-27 14:49:37 -02:00
|
|
|
|
2016-09-08 14:27:53 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-12-26 12:36:47 +01:00
|
|
|
|
2016-09-08 14:27:53 +02:00
|
|
|
|
2018-09-20 14:11:17 +02:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2023-12-26 12:36:47 +01:00
|
|
|
|
2018-09-20 14:11:17 +02:00
|
|
|
|
2014-10-27 14:49:37 -02:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2014-10-27 14:49:37 -02:00
|
|
|
|
2016-09-08 14:27:53 +02:00
|
|
|
|
|
|
|
|
|
2023-12-26 12:36:47 +01:00
|
|
|
|
2016-09-08 14:27:53 +02:00
|
|
|
|
2014-10-27 14:49:37 -02:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2006-05-04 14:07:42 +01:00
|
|
|
|
2012-09-18 16:14:58 +08:00
|
|
|
|
2006-05-04 14:07:42 +01:00
|
|
|
|
2023-12-26 12:36:47 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2023-11-10 16:29:45 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2008-07-05 10:02:45 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2023-05-12 19:38:10 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2015-08-11 10:21:23 -07:00
|
|
|
|
2018-09-05 09:24:26 +08:00
|
|
|
|
|
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2018-09-05 09:24:26 +08:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2015-08-11 10:21:23 -07:00
|
|
|
|
2018-09-05 09:24:26 +08:00
|
|
|
|
2015-08-11 10:21:23 -07:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-11 10:21:23 -07:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2015-08-11 10:21:23 -07:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2015-08-11 10:21:23 -07:00
|
|
|
|
2018-09-05 09:24:26 +08:00
|
|
|
|
|
|
|
|
|
2015-08-11 10:21:23 -07:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-08-11 10:21:23 -07:00
|
|
|
|
2023-09-14 20:43:46 +02:06
|
|
|
|
2015-08-11 10:21:23 -07:00
|
|
|
|
|
|
|
|
|
2024-09-13 10:39:49 +02:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2015-08-11 10:21:21 -07:00
|
|
|
|
2025-10-02 12:52:58 +08:00
|
|
|
|
|
|
|
|
|
2025-10-02 12:52:59 +08:00
|
|
|
|
|
|
|
|
|
2015-08-11 10:21:21 -07:00
|
|
|
|
2025-10-02 12:52:58 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-11 07:36:13 +08:00
|
|
|
|
2024-09-13 10:39:49 +02:00
|
|
|
|
2025-10-02 12:52:59 +08:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2018-01-05 17:46:43 +01:00
|
|
|
|
2018-03-02 11:07:19 +01:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2025-10-02 12:52:59 +08:00
|
|
|
|
2018-01-05 17:46:43 +01:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2015-08-11 10:21:22 -07:00
|
|
|
|
2018-01-04 15:58:34 -02:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2021-11-25 09:43:06 +08:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2021-11-25 09:43:06 +08:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2025-10-02 12:52:59 +08:00
|
|
|
|
2021-11-25 09:43:06 +08:00
|
|
|
|
2018-03-02 11:07:23 +01:00
|
|
|
|
2018-01-04 15:58:34 -02:00
|
|
|
|
2024-09-13 10:39:49 +02:00
|
|
|
|
2025-10-02 12:52:59 +08:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2024-12-11 07:36:13 +08:00
|
|
|
|
2015-08-11 10:21:21 -07:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2015-07-30 10:32:36 -05:00
|
|
|
|
2018-04-19 16:06:23 +02:00
|
|
|
|
2015-07-30 10:32:36 -05:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2015-07-30 10:32:36 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-09-05 09:24:27 +08:00
|
|
|
|
|
|
|
|
|
2015-07-30 10:32:36 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2015-07-30 10:32:36 -05:00
|
|
|
|
2018-04-19 16:06:23 +02:00
|
|
|
|
2015-07-30 10:32:36 -05:00
|
|
|
|
|
|
|
|
|
2018-09-05 09:24:27 +08:00
|
|
|
|
|
|
|
|
|
2015-07-30 10:32:36 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2015-07-30 10:32:36 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2015-07-30 10:32:36 -05:00
|
|
|
|
2018-04-19 16:06:23 +02:00
|
|
|
|
2018-01-05 17:46:43 +01:00
|
|
|
|
2015-07-30 10:32:36 -05:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2017-08-14 16:27:49 +02:00
|
|
|
|
2015-07-30 10:32:36 -05:00
|
|
|
|
2018-01-05 17:46:43 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2018-01-05 17:46:43 +01:00
|
|
|
|
|
|
|
|
|
2015-07-30 10:32:36 -05:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2015-07-30 10:32:36 -05:00
|
|
|
|
2018-04-19 16:06:23 +02:00
|
|
|
|
2015-07-30 10:32:36 -05:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2015-07-30 10:32:36 -05:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2017-08-14 16:27:49 +02:00
|
|
|
|
2015-07-30 10:32:36 -05:00
|
|
|
|
2018-01-05 17:46:43 +01:00
|
|
|
|
2016-01-05 16:53:31 +01:00
|
|
|
|
2015-07-30 10:32:36 -05:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2017-11-01 13:51:41 +01:00
|
|
|
|
2018-04-19 16:06:23 +02:00
|
|
|
|
2017-11-01 13:51:41 +01:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2017-11-01 13:51:41 +01:00
|
|
|
|
2018-01-05 17:46:43 +01:00
|
|
|
|
2017-11-01 13:51:41 +01:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2017-11-01 13:51:41 +01:00
|
|
|
|
2018-04-19 16:06:23 +02:00
|
|
|
|
2017-11-01 13:51:41 +01:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2017-11-01 13:51:41 +01:00
|
|
|
|
2018-01-05 17:46:43 +01:00
|
|
|
|
2017-11-01 13:51:41 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2022-10-12 20:13:53 +08:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2015-07-30 10:32:36 -05:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
|
|
|
|
|
2024-10-07 22:58:04 +02:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
|
|
|
|
|
2011-06-25 02:04:34 +08:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-11-09 22:32:44 +00:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2011-11-22 14:22:55 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
2018-03-02 11:07:30 +01:00
|
|
|
|
|
|
|
|
|
2005-04-16 15:20:36 -07:00
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
2008-04-15 14:34:35 -07:00
|
|
|
|