]> git.baikalelectronics.ru Git - kernel.git/commit
serial: imx: setup DCEDTE early and ensure DCD and RI irqs to be off
authorUwe Kleine-König <u.kleine-koenig@pengutronix.de>
Tue, 4 Apr 2017 09:18:51 +0000 (11:18 +0200)
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>
Sat, 8 Apr 2017 16:54:07 +0000 (18:54 +0200)
commit4af685b3ee8f1df55a19092b486c35febcaa3fcb
treef2a7d13567afde1e4991c168617e23c10e397ade
parentcce8b5b10650e5e6c7193951955b4b48f4ac5bc8
serial: imx: setup DCEDTE early and ensure DCD and RI irqs to be off

If the UART is operated in DTE mode and UCR3_DCD or UCR3_RI are 1 (which
is the reset default) and the opposite side pulls the respective line to
its active level the irq triggers after it is requested in .probe.

These irqs were already disabled in .startup but this might be too late.

Also setup of the UFCR_DCEDTE bit (currently done in .set_termios) is
done very late which is critical as it also controls direction of some
pins.

So setup UFCR_DCEDTE earlier (in .probe) and also disable the broken
irqs in DTE mode there before requesting irqs.

Acked-by: Lucas Stach <l.stach@pengutronix.de>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
drivers/tty/serial/imx.c