<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel.git/drivers/tty/serial/imx.c, branch linux-5.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.
</subtitle>
<id>https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.9.y</id>
<link rel='self' href='https://git.0xinfinity.dev/distro/kernel.git/atom?h=linux-5.9.y'/>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/'/>
<updated>2020-11-24T12:39:08Z</updated>
<entry>
<title>tty: serial: imx: keep console clocks always on</title>
<updated>2020-11-24T12:39:08Z</updated>
<author>
<name>Fugang Duan</name>
</author>
<published>2020-11-11T02:51:36Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=76948870da83bc358f70f1e665613dd7ac538fc3'/>
<id>urn:sha1:76948870da83bc358f70f1e665613dd7ac538fc3</id>
<content type='text'>
commit e67c139c488e84e7eae6c333231e791f0e89b3fb upstream.

For below code, there has chance to cause deadlock in SMP system:
Thread 1:
clk_enable_lock();
pr_info("debug message");
clk_enable_unlock();

Thread 2:
imx_uart_console_write()
	clk_enable()
		clk_enable_lock();

Thread 1:
Acuired clk enable_lock -&gt; printk -&gt; console_trylock_spinning
Thread 2:
console_unlock() -&gt; imx_uart_console_write -&gt; clk_disable -&gt; Acquite clk enable_lock

So the patch is to keep console port clocks always on like
other console drivers.

Fixes: 1cf93e0d5488 ("serial: imx: remove the uart_console() check")
Acked-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Fugang Duan &lt;fugang.duan@nxp.com&gt;
Link: https://lore.kernel.org/r/20201111025136.29818-1-fugang.duan@nxp.com
Cc: stable &lt;stable@vger.kernel.org&gt;
[fix up build warning - gregkh]
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tty: serial: imx: fix potential deadlock</title>
<updated>2020-11-24T12:39:08Z</updated>
<author>
<name>Sam Nobs</name>
</author>
<published>2020-11-09T20:50:06Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c4d41ee13b3403495973c950d1d1516877fa5511'/>
<id>urn:sha1:c4d41ee13b3403495973c950d1d1516877fa5511</id>
<content type='text'>
commit 33f16855dcb973f745c51882d0e286601ff3be2b upstream.

Enabling the lock dependency validator has revealed
that the way spinlocks are used in the IMX serial
port could result in a deadlock.

Specifically, imx_uart_int() acquires a spinlock
without disabling the interrupts, meaning that another
interrupt could come along and try to acquire the same
spinlock, potentially causing the two to wait for each
other indefinitely.

Use spin_lock_irqsave() instead to disable interrupts
upon acquisition of the spinlock.

Fixes: c974991d2620 ("tty:serial:imx: use spin_lock instead of spin_lock_irqsave in isr")
Reviewed-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Signed-off-by: Sam Nobs &lt;samuel.nobs@taitradio.com&gt;
Link: https://lore.kernel.org/r/1604955006-9363-1-git-send-email-samuel.nobs@taitradio.com
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;

</content>
</entry>
<entry>
<title>tty: serial: imx: enable imx serial console port as module</title>
<updated>2020-07-29T15:10:59Z</updated>
<author>
<name>Fugang Duan</name>
</author>
<published>2020-07-24T07:08:14Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=0db4f9b91c86bfe9d33e191a31b0150879e2acee'/>
<id>urn:sha1:0db4f9b91c86bfe9d33e191a31b0150879e2acee</id>
<content type='text'>
Add support for building i.MX serial driver as module.

The changes of the patch:
- imx console driver can be built as module.
- move out earlycon code to separated driver like imx_earlycon.c,
  and imx earlycon driver only support build-in.

Signed-off-by: Fugang Duan &lt;fugang.duan@nxp.com&gt;
Link: https://lore.kernel.org/r/20200724070815.11445-2-fugang.duan@nxp.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: imx: use hrtimers for rs485 delays</title>
<updated>2020-07-21T19:08:11Z</updated>
<author>
<name>Ahmad Fatoum</name>
</author>
<published>2020-07-14T09:30:12Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=bd78ecd6056d9987067db5b100d3667da6b85467'/>
<id>urn:sha1:bd78ecd6056d9987067db5b100d3667da6b85467</id>
<content type='text'>
This patch imitates 6e0a5de213 ("serial: 8250: Use hrtimers for
rs485 delays") in replacing the previously used classic timers
with hrtimers. The old way provided a too coarse resolution on
systems with configs of less than 1000 HZ.

Use of hrtimers addresses this and can be easily extended to
support microsecond resolution in future when support
for this arrives upstream.

Signed-off-by: Ahmad Fatoum &lt;a.fatoum@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20200714093012.21621-3-uwe@kleine-koenig.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: imx: implement rts delaying for rs485</title>
<updated>2020-07-21T19:08:10Z</updated>
<author>
<name>Uwe Kleine-König</name>
</author>
<published>2020-07-14T09:30:11Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=cb1a609236096c278ecbfb7be678a693a70283f1'/>
<id>urn:sha1:cb1a609236096c278ecbfb7be678a693a70283f1</id>
<content type='text'>
This adds support for delays between assertion of RTS (which is supposed
to enable the rs485 transmitter) and sending as well as between the last
send char and deassertionof RTS.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20200714093012.21621-2-uwe@kleine-koenig.org
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "serial: imx: Initialize lock for non-registered console"</title>
<updated>2020-07-21T16:21:49Z</updated>
<author>
<name>Andy Shevchenko</name>
</author>
<published>2020-07-11T13:53:45Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=dfe51d97776ef926749362f34625cd36657845d8'/>
<id>urn:sha1:dfe51d97776ef926749362f34625cd36657845d8</id>
<content type='text'>
This reverts commit 8f065acec7573672dd15916e31d1e9b2e785566c.

There has been a quick fix against uninitialised lock revealed by
the commit f743061a85f5 ("serial: core: Initialise spin lock before use
in uart_configure_port()"). Since we have now better fix in serial core,
this may be safely reverted.

Fixes: 8f065acec757 ("serial: imx: Initialize lock for non-registered console")
Depends-on: f743061a85f5 ("serial: core: Initialise spin lock before use in uart_configure_port()")
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20200711135346.71171-4-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial: imx: clear Ageing Timer Interrupt in handler</title>
<updated>2020-05-29T11:00:54Z</updated>
<author>
<name>Matthias Schiffer</name>
</author>
<published>2020-05-28T15:47:47Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=d1d996afbd2bca3bf3c484fc1f7a738134d65207'/>
<id>urn:sha1:d1d996afbd2bca3bf3c484fc1f7a738134d65207</id>
<content type='text'>
The AGTIM flag must be cleared explicitly, otherwise the IRQ handler
will be called in an endless loop.

Fortunately, this issue currently doesn't affect mainline kernels in
practice, as the the RX FIFO trigger level is set to 1 in UFCR. When
setting the trigger level to a higher number, the issue is trivially
reproducible by any RX without DMA that doesn't fill the FIFO up to the
configured level.

Signed-off-by: Matthias Schiffer &lt;matthias.schiffer@ew.tq-group.com&gt;
Link: https://lore.kernel.org/r/20200528154747.14201-1-matthias.schiffer@ew.tq-group.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: imx: Initialize lock for non-registered console</title>
<updated>2020-05-27T08:55:35Z</updated>
<author>
<name>Andy Shevchenko</name>
</author>
<published>2020-05-25T10:59:52Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=8f065acec7573672dd15916e31d1e9b2e785566c'/>
<id>urn:sha1:8f065acec7573672dd15916e31d1e9b2e785566c</id>
<content type='text'>
The commit a3cb39d258ef
("serial: core: Allow detach and attach serial device for console")
changed a bit logic behind lock initialization since for most of the console
driver it's supposed to have lock already initialized even if console is not
enabled. However, it's not the case for Freescale IMX console.

Initialize lock explicitly in the -&gt;probe().

Note, there is still an open question should or shouldn't not this driver
register console properly.

Fixes: a3cb39d258ef ("serial: core: Allow detach and attach serial device for console")
Reported-by: Guenter Roeck &lt;linux@roeck-us.net&gt;
Cc: stable &lt;stable@vger.kernel.org&gt;
Signed-off-by: Andy Shevchenko &lt;andriy.shevchenko@linux.intel.com&gt;
Link: https://lore.kernel.org/r/20200525105952.13744-1-andriy.shevchenko@linux.intel.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: Allow uart_get_rs485_mode() to return errno</title>
<updated>2020-05-15T12:47:05Z</updated>
<author>
<name>Lukas Wunner</name>
</author>
<published>2020-05-12T12:40:02Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=c150c0f362c1e51c0e3216c9912b85b71d00e70d'/>
<id>urn:sha1:c150c0f362c1e51c0e3216c9912b85b71d00e70d</id>
<content type='text'>
We're about to amend uart_get_rs485_mode() to support a GPIO pin for
rs485 bus termination.  Retrieving the GPIO descriptor may fail, so
allow uart_get_rs485_mode() to return an errno and change all callers
to check for failure.

The GPIO descriptor is going to be stored in struct uart_port.  Pass
that struct to uart_get_rs485_mode() in lieu of a struct device and
struct serial_rs485, both of which are directly accessible from struct
uart_port.

A few drivers call uart_get_rs485_mode() before setting the struct
device pointer in struct uart_port.  Shuffle those calls around where
necessary.

[Heiko Stuebner did the ar933x_uart.c portion, hence his Signed-off-by.]

Signed-off-by: Heiko Stuebner &lt;heiko@sntech.de&gt;
Signed-off-by: Lukas Wunner &lt;lukas@wunner.de&gt;
Link: https://lore.kernel.org/r/271e814af4b0db3bffbbb74abf2b46b75add4516.1589285873.git.lukas@wunner.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial: imx: Add return value check for platform_get_irq()</title>
<updated>2020-05-15T10:25:15Z</updated>
<author>
<name>Anson Huang</name>
</author>
<published>2020-05-11T07:09:56Z</published>
<link rel='alternate' type='text/html' href='https://git.0xinfinity.dev/distro/kernel.git/commit/?id=aa49d8e8b2dfc112f7de9c58698ae06b2101c73c'/>
<id>urn:sha1:aa49d8e8b2dfc112f7de9c58698ae06b2101c73c</id>
<content type='text'>
RX irq is required, so add return value check for platform_get_irq().

Signed-off-by: Anson Huang &lt;Anson.Huang@nxp.com&gt;
Link: https://lore.kernel.org/r/1589180996-618-1-git-send-email-Anson.Huang@nxp.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
