<feed xmlns='http://www.w3.org/2005/Atom'>
<title>kernel/linux.git/drivers/tty/serial/meson_uart.c, branch v6.7</title>
<subtitle>Linux kernel stable tree (mirror)</subtitle>
<id>https://git.radix-linux.su/kernel/linux.git/atom?h=v6.7</id>
<link rel='self' href='https://git.radix-linux.su/kernel/linux.git/atom?h=v6.7'/>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/'/>
<updated>2023-10-17T08:17:01+00:00</updated>
<entry>
<title>tty: serial: meson: fix hard LOCKUP on crtscts mode</title>
<updated>2023-10-17T08:17:01+00:00</updated>
<author>
<name>Pavel Krasavin</name>
<email>pkrasavin@imaqliq.com</email>
</author>
<published>2023-10-14T11:39:26+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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:49+00:00</updated>
<author>
<name>Lucas Tanure</name>
<email>tanure@linux.com</email>
</author>
<published>2023-10-09T12:11:51+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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:12+00:00</updated>
<author>
<name>Thomas Gleixner</name>
<email>tglx@linutronix.de</email>
</author>
<published>2023-09-14T18:37:54+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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:01+00:00</updated>
<author>
<name>Lucas Tanure</name>
<email>tanure@linux.com</email>
</author>
<published>2023-08-27T08:29:44+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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:01+00:00</updated>
<author>
<name>Lucas Tanure</name>
<email>tanure@linux.com</email>
</author>
<published>2023-08-14T08:01:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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:06+00:00</updated>
<author>
<name>Dmitry Rokosov</name>
<email>ddrokosov@sberdevices.ru</email>
</author>
<published>2023-07-28T07:15:22+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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:08+00:00</updated>
<author>
<name>Dmitry Rokosov</name>
<email>ddrokosov@sberdevices.ru</email>
</author>
<published>2023-07-05T18:18:31+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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:08+00:00</updated>
<author>
<name>Dmitry Rokosov</name>
<email>ddrokosov@sberdevices.ru</email>
</author>
<published>2023-07-05T18:18:30+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/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>
<entry>
<title>tty: serial: meson: apply ttyS devname instead of ttyAML for new SoCs</title>
<updated>2023-07-25T18:22:07+00:00</updated>
<author>
<name>Dmitry Rokosov</name>
<email>ddrokosov@sberdevices.ru</email>
</author>
<published>2023-07-05T18:18:29+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=e71aab9d613242bbb262f2344e377ecbc892df41'/>
<id>urn:sha1:e71aab9d613242bbb262f2344e377ecbc892df41</id>
<content type='text'>
It is worth noting that the devname ttyS is a widely recognized tty name
and is commonly used by many uart device drivers. Given the established
usage and compatibility concerns, it may not be feasible to change the
devname for older SoCs. However, for new definitions, it is acceptable
and even recommended to use a new devname to help ensure clarity and
avoid any potential conflicts on lower or upper software levels.

For more information please refer to IRC discussion at [1].

Links:
    [1]: https://libera.irclog.whitequark.org/linux-amlogic/2023-07-03

Signed-off-by: Dmitry Rokosov &lt;ddrokosov@sberdevices.ru&gt;
Link: https://lore.kernel.org/r/20230705181833.16137-4-ddrokosov@sberdevices.ru
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
<entry>
<title>tty: serial: meson: redesign the module to platform_driver</title>
<updated>2023-07-25T18:22:07+00:00</updated>
<author>
<name>Dmitry Rokosov</name>
<email>ddrokosov@sberdevices.ru</email>
</author>
<published>2023-07-05T18:18:28+00:00</published>
<link rel='alternate' type='text/html' href='https://git.radix-linux.su/kernel/linux.git/commit/?id=bcb5645f99ef93b3cad3cdb7937eb4b2cecfd560'/>
<id>urn:sha1:bcb5645f99ef93b3cad3cdb7937eb4b2cecfd560</id>
<content type='text'>
Actually, the meson_uart module is already a platform_driver, but it is
currently registered manually and the uart core registration is run
outside the probe() scope, which results in some restrictions. For
instance, it is not possible to communicate with the OF subsystem
because it requires an initialized device object.

To address this issue, apply module_platform_driver() instead of direct
module init/exit routines. Additionally, move uart_register_driver() to
the driver probe(), and destroy manual console registration because it's
already run in the uart_register_driver() flow.

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-3-ddrokosov@sberdevices.ru
Signed-off-by: Greg Kroah-Hartman &lt;gregkh@linuxfoundation.org&gt;
</content>
</entry>
</feed>
