<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/drivers/tty/serial/meson_uart.c, branch linux-6.9.y</title>
<subtitle>Hosts the 0x221E linux distro kernel.</subtitle>
<id>https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y</id>
<link rel='self' href='https://universe.0xinfinity.dev/distro/kernel/atom?h=linux-6.9.y'/>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/'/>
<updated>2024-03-02T21:06:21Z</updated>
<entry>
<title>serial: meson: Use uart_prepare_sysrq_char().</title>
<updated>2024-03-02T21:06:21Z</updated>
<author>
<name>Sebastian Andrzej Siewior</name>
<email>bigeasy@linutronix.de</email>
</author>
<published>2024-03-01T21:45:17Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=fb793b952a330e6c87aec98aeb300aaa5c2ac960'/>
<id>urn:sha1:fb793b952a330e6c87aec98aeb300aaa5c2ac960</id>
<content type='text'>
The port lock is a spinlock_t which is becomes a sleeping lock on PREEMPT_RT.
The driver splits the locking function into two parts: local_irq_save() and
uart_port_lock() and this breaks PREEMPT_RT.

Delay handling sysrq until port lock is dropped.
Remove the special case in the console write routine an always use the
complete locking function.

Cc: Kevin Hilman &lt;khilman@baylibre.com&gt;
Cc: Jerome Brunet &lt;jbrunet@baylibre.com&gt;
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-amlogic@lists.infradead.org
Signed-off-by: Sebastian Andrzej Siewior &lt;bigeasy@linutronix.de&gt;
Link: https://lore.kernel.org/r/20240301215246.891055-5-bigeasy@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: meson: Convert to platform remove callback returning void</title>
<updated>2023-11-23T19:12:32Z</updated>
<author>
<name>Uwe Kleine-König</name>
<email>u.kleine-koenig@pengutronix.de</email>
</author>
<published>2023-11-10T15:29:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=c4a5b26291710032caf41503ab984431c5e4537b'/>
<id>urn:sha1:c4a5b26291710032caf41503ab984431c5e4537b</id>
<content type='text'>
The .remove() callback for a platform driver returns an int which makes
many driver authors wrongly assume it's possible to do error handling by
returning an error code. However the value returned is ignored (apart
from emitting a warning) and this typically results in resource leaks.

To improve here there is a quest to make the remove callback return
void. In the first step of this quest all drivers are converted to
.remove_new(), which already returns void. Eventually after all drivers
are converted, .remove_new() will be renamed to .remove().

Trivially convert this driver from always returning zero in the remove
callback to the void returning variant.

Signed-off-by: Uwe Kleine-König &lt;u.kleine-koenig@pengutronix.de&gt;
Link: https://lore.kernel.org/r/20231110152927.70601-24-u.kleine-koenig@pengutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial: meson: fix hard LOCKUP on crtscts mode</title>
<updated>2023-10-17T08:17:01Z</updated>
<author>
<name>Pavel Krasavin</name>
<email>pkrasavin@imaqliq.com</email>
</author>
<published>2023-10-14T11:39:26Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=2a1d728f20edeee7f26dc307ed9df4e0d23947ab'/>
<id>urn:sha1:2a1d728f20edeee7f26dc307ed9df4e0d23947ab</id>
<content type='text'>
There might be hard lockup if we set crtscts mode on port without RTS/CTS configured:

# stty -F /dev/ttyAML6 crtscts; echo 1 &gt; /dev/ttyAML6; echo 2 &gt; /dev/ttyAML6
[   95.890386] rcu: INFO: rcu_preempt detected stalls on CPUs/tasks:
[   95.890857] rcu:     3-...0: (201 ticks this GP) idle=e33c/1/0x4000000000000000 softirq=5844/5846 fqs=4984
[   95.900212] rcu:     (detected by 2, t=21016 jiffies, g=7753, q=296 ncpus=4)
[   95.906972] Task dump for CPU 3:
[   95.910178] task:bash            state:R  running task     stack:0     pid:205   ppid:1      flags:0x00000202
[   95.920059] Call trace:
[   95.922485]  __switch_to+0xe4/0x168
[   95.925951]  0xffffff8003477508
[   95.974379] watchdog: Watchdog detected hard LOCKUP on cpu 3
[   95.974424] Modules linked in: 88x2cs(O) rtc_meson_vrtc

Possible solution would be to not allow to setup crtscts on such port.

Tested on S905X3 based board.

Fixes: ff7693d079e5 ("ARM: meson: serial: add MesonX SoC on-chip uart driver")
Cc: stable@vger.kernel.org
Signed-off-by: Pavel Krasavin &lt;pkrasavin@imaqliq.com&gt;
Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Reviewed-by: Dmitry Rokosov &lt;ddrokosov@salutedevices.com&gt;

v6: stable tag added
v5: https://lore.kernel.org/lkml/OF43DA36FF.2BD3BB21-ON00258A47.005A8125-00258A47.005A9513@gdc.ru/
added missed Reviewed-by tags, Fixes tag added according to Dmitry and Neil notes
v4: https://lore.kernel.org/lkml/OF55521400.7512350F-ON00258A47.003F7254-00258A47.0040E15C@gdc.ru/
More correct patch subject according to Jiri's note
v3: https://lore.kernel.org/lkml/OF6CF5FFA0.CCFD0E8E-ON00258A46.00549EDF-00258A46.0054BB62@gdc.ru/
"From:" line added to the mail
v2: https://lore.kernel.org/lkml/OF950BEF72.7F425944-ON00258A46.00488A76-00258A46.00497D44@gdc.ru/
braces for single statement removed according to Dmitry's note
v1: https://lore.kernel.org/lkml/OF28B2B8C9.5BC0CD28-ON00258A46.0037688F-00258A46.0039155B@gdc.ru/
Link: https://lore.kernel.org/r/OF66360032.51C36182-ON00258A48.003F656B-00258A48.0040092C@gdc.ru

Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial: meson: Add a earlycon for the S4 SoC</title>
<updated>2023-10-10T06:50:49Z</updated>
<author>
<name>Lucas Tanure</name>
<email>tanure@linux.com</email>
</author>
<published>2023-10-09T12:11:51Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=3047b5b53c36c2cb7874d3823320ffff6a8bf6b3'/>
<id>urn:sha1:3047b5b53c36c2cb7874d3823320ffff6a8bf6b3</id>
<content type='text'>
The new Amlogic S4 SoC does not have a always-on uart, so add
OF_EARLYCON_DECLARE for it.
Amlogic T7 will use this as fallback.

Signed-off-by: Lucas Tanure &lt;tanure@linux.com&gt;
Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Link: https://lore.kernel.org/r/20231009121151.4509-1-tanure@linux.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>serial: meson: Use port lock wrappers</title>
<updated>2023-09-18T09:18:12Z</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2023-09-14T18:37:54Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=042d78484c6389933befa0fec3757b45160d9181'/>
<id>urn:sha1:042d78484c6389933befa0fec3757b45160d9181</id>
<content type='text'>
When a serial port is used for kernel console output, then all
modifications to the UART registers which are done from other contexts,
e.g. getty, termios, are interference points for the kernel console.

So far this has been ignored and the printk output is based on the
principle of hope. The rework of the console infrastructure which aims to
support threaded and atomic consoles, requires to mark sections which
modify the UART registers as unsafe. This allows the atomic write function
to make informed decisions and eventually to restore operational state. It
also allows to prevent the regular UART code from modifying UART registers
while printk output is in progress.

All modifications of UART registers are guarded by the UART port lock,
which provides an obvious synchronization point with the console
infrastructure.

To avoid adding this functionality to all UART drivers, wrap the
spin_[un]lock*() invocations for uart_port::lock into helper functions
which just contain the spin_[un]lock*() invocations for now. In a
subsequent step these helpers will gain the console synchronization
mechanisms.

Converted with coccinelle. No functional change.

Signed-off-by: Thomas Gleixner &lt;tglx@linutronix.de&gt;
Acked-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Signed-off-by: John Ogness &lt;john.ogness@linutronix.de&gt;
Link: https://lore.kernel.org/r/20230914183831.587273-38-john.ogness@linutronix.de
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>Revert "tty: serial: meson: Add a earlycon for the T7 SoC"</title>
<updated>2023-08-27T09:43:01Z</updated>
<author>
<name>Lucas Tanure</name>
<email>tanure@linux.com</email>
</author>
<published>2023-08-27T08:29:44Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=db726a2f3b4bc0cbf8e6cfd529d2d8eabb587d70'/>
<id>urn:sha1:db726a2f3b4bc0cbf8e6cfd529d2d8eabb587d70</id>
<content type='text'>
This reverts commit 6a4197f9763325043abf7690a21124a9facbf52e

New SoC will use ttyS0 instead of ttyAML, so T7 SoC doesn't need a
OF_EARLYCON_DECLARE.

Fixes: 6a4197f97633 ("tty: serial: meson: Add a earlycon for the T7 SoC")
Signed-off-by: Lucas Tanure &lt;tanure@linux.com&gt;
Link: https://lore.kernel.org/r/20230827082944.5100-1-tanure@linux.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial: meson: Add a earlycon for the T7 SoC</title>
<updated>2023-08-22T13:29:01Z</updated>
<author>
<name>Lucas Tanure</name>
<email>tanure@linux.com</email>
</author>
<published>2023-08-14T08:01:28Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=6a4197f9763325043abf7690a21124a9facbf52e'/>
<id>urn:sha1:6a4197f9763325043abf7690a21124a9facbf52e</id>
<content type='text'>
The new Amlogic T7 SoC does not have a always-on uart,
so add OF_EARLYCON_DECLARE for it.

Signed-off-by: Lucas Tanure &lt;tanure@linux.com&gt;
Acked-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Link: https://lore.kernel.org/r/20230814080128.143613-2-tanure@linux.com
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial: meson: refactor objects definition for different devnames</title>
<updated>2023-07-30T11:53:06Z</updated>
<author>
<name>Dmitry Rokosov</name>
<email>ddrokosov@sberdevices.ru</email>
</author>
<published>2023-07-28T07:15:22Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=17be181b061b4b7b72d4ffb856d94a356592bfd7'/>
<id>urn:sha1:17be181b061b4b7b72d4ffb856d94a356592bfd7</id>
<content type='text'>
Macroses for name generation are not useful. They hide the real place
for object declaration. Instead, use direct names such as
'meson_uart_driver_*' and 'meson_serial_console_*' for all objects.

Additionally, rename 'MESON_SERIAL_CONSOLE_DEFINE()' to
'MESON_SERIAL_CONSOLE()', and 'MESON_UART_DRIVER_DEFINE()' to
'MESON_UART_DRIVER()' to simplify the code.

Signed-off-by: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Suggested-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Link: https://lore.kernel.org/r/20230728071522.17503-1-ddrokosov@sberdevices.ru
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial: meson: add independent uart_data for A1 SoC family</title>
<updated>2023-07-25T18:22:08Z</updated>
<author>
<name>Dmitry Rokosov</name>
<email>ddrokosov@sberdevices.ru</email>
</author>
<published>2023-07-05T18:18:31Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=5651f657097c1ad9674651bee91425a8bb9d5b9a'/>
<id>urn:sha1:5651f657097c1ad9674651bee91425a8bb9d5b9a</id>
<content type='text'>
Implement separate uart_data to ensure proper devname value for the A1
SoC family. Use 'ttyS' devname, as required by the A1 architecture,
instead of the legacy gx architecture.

Signed-off-by: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Link: https://lore.kernel.org/r/20230705181833.16137-6-ddrokosov@sberdevices.ru
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial: meson: introduce separate uart_data for S4 SoC family</title>
<updated>2023-07-25T18:22:08Z</updated>
<author>
<name>Dmitry Rokosov</name>
<email>ddrokosov@sberdevices.ru</email>
</author>
<published>2023-07-05T18:18:30Z</published>
<link rel='alternate' type='text/html' href='https://universe.0xinfinity.dev/distro/kernel/commit/?id=bd86980b5113e3bf59ad096c49bf5c39dbca8880'/>
<id>urn:sha1:bd86980b5113e3bf59ad096c49bf5c39dbca8880</id>
<content type='text'>
In order to use the correct devname value for the S4 SoC family, it
is imperative that we implement separate uart_data. Unlike the legacy
g12a architecture, the S4 architecture should employ the use of 'ttyS'
devname.

Signed-off-by: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Reviewed-by: Neil Armstrong &lt;neil.armstrong@linaro.org&gt;
Link: https://lore.kernel.org/r/20230705181833.16137-5-ddrokosov@sberdevices.ru
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
