Ilpo Järvinen
eb47b59afb
serial: Convert SERIAL_XMIT_SIZE to UART_XMIT_SIZE
...
Both UART_XMIT_SIZE and SERIAL_XMIT_SIZE are defined. Make them all
UART_XMIT_SIZE.
Reviewed-by: Jiri Slaby <[email protected] >
Signed-off-by: Ilpo Järvinen <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2022-06-27 14:41:31 +02:00
Miaoqian Lin
bcea0f547e
tty: serial: owl: Fix missing clk_disable_unprepare() in owl_uart_probe
...
Fix the missing clk_disable_unprepare() before return
from owl_uart_probe() in the error handling case.
Fixes: abf42d2f33 ("tty: serial: owl: add "much needed" clk_prepare_enable()")
Signed-off-by: Miaoqian Lin <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2022-04-15 11:08:12 +02:00
Jiri Slaby
d9b80d07db
tty: serial: owl-uart, send x_char even if stopped
...
Flow control characters should be sent even if the TX is stopped. So fix
owl-uart to behave the same as other drivers.
This unification also allows the use of the TX helper in the future.
Cc: "Andreas Färber" <[email protected] >
Cc: Manivannan Sadhasivam <[email protected] >
Signed-off-by: Jiri Slaby <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2022-04-14 18:27:18 +02:00
Jiri Slaby
3f8bab174c
serial: make uart_console_write->putchar()'s character an unsigned char
...
Currently, uart_console_write->putchar's second parameter (the
character) is of type int. It makes little sense, provided uart_console_write()
accepts the input string as "const char *s" and passes its content -- the
characters -- to putchar(). So switch the character's type to unsigned
char.
We don't use char as that is signed on some platforms. That would cause
troubles for drivers which (implicitly) cast the char to u16 when
writing to the device. Sign extension would happen in that case and the
value written would be completely different to the provided char. DZ is
an example of such a driver -- on MIPS, it uses u16 for dz_out in
dz_console_putchar().
Note we do the char -> uchar conversion implicitly in
uart_console_write(). Provided we do not change size of the data type,
sign extension does not happen there, so the problem is void.
This makes the types consistent and unified with the rest of the uart
layer, which uses unsigned char in most places already. One exception is
xmit_buf, but that is going to be converted later.
Cc: Paul Cercueil <[email protected] >
Cc: Tobias Klauser <[email protected] >
Cc: Russell King <[email protected] >
Cc: Vineet Gupta <[email protected] >
Cc: Nicolas Ferre <[email protected] >
Cc: Alexandre Belloni <[email protected] >
Cc: Ludovic Desroches <[email protected] >
Cc: Florian Fainelli <[email protected] >
Cc: [email protected]
Cc: Alexander Shiyan <[email protected] >
Cc: Baruch Siach <[email protected] >
Cc: "Maciej W. Rozycki" <[email protected] >
Cc: Paul Walmsley <[email protected] >
Cc: Palmer Dabbelt <[email protected] >
Cc: Albert Ou <[email protected] >
Cc: Shawn Guo <[email protected] >
Cc: Sascha Hauer <[email protected] >
Cc: Pengutronix Kernel Team <[email protected] >
Cc: Fabio Estevam <[email protected] >
Cc: NXP Linux Team <[email protected] >
Cc: Karol Gugala <[email protected] >
Cc: Mateusz Holenko <[email protected] >
Cc: Vladimir Zapolskiy <[email protected] >
Cc: Neil Armstrong <[email protected] >
Cc: Kevin Hilman <[email protected] >
Cc: Jerome Brunet <[email protected] >
Cc: Martin Blumenstingl <[email protected] >
Cc: Taichi Sugaya <[email protected] >
Cc: Takao Orito <[email protected] >
Cc: Liviu Dudau <[email protected] >
Cc: Sudeep Holla <[email protected] >
Cc: Lorenzo Pieralisi <[email protected] >
Cc: "Andreas Färber" <[email protected] >
Cc: Manivannan Sadhasivam <[email protected] >
Cc: Michael Ellerman <[email protected] >
Cc: Benjamin Herrenschmidt <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Andy Gross <[email protected] >
Cc: Bjorn Andersson <[email protected] >
Cc: Krzysztof Kozlowski <[email protected] >
Cc: Orson Zhai <[email protected] >
Cc: Baolin Wang <[email protected] >
Cc: Chunyan Zhang <[email protected] >
Cc: Patrice Chotard <[email protected] >
Cc: Maxime Coquelin <[email protected] >
Cc: Alexandre Torgue <[email protected] >
Cc: "David S. Miller" <[email protected] >
Cc: Peter Korsgaard <[email protected] >
Cc: Michal Simek <[email protected] >
Acked-by: Richard Genoud <[email protected] > [atmel_serial]
Acked-by: Uwe Kleine-König <[email protected] >
Acked-by: Paul Cercueil <[email protected] >
Acked-by: Neil Armstrong <[email protected] > # meson_serial
Signed-off-by: Jiri Slaby <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2022-03-03 15:06:31 +01:00
Johan Hovold
493a275c04
serial: owl: drop low-latency workaround
...
The owl driver has always carried an unnecessary workaround for the
infamous low_latency behaviour of tty_flip_buffer_push(), which had
been removed years before the driver was added by commit fc60a8b675
("tty: serial: owl: Implement console driver").
Specifically, since commit a9c3f68f3c ("tty: Fix low_latency BUG"),
tty_flip_buffer_push() always schedules a work item to push data to the
line discipline and there's no need to keep any low_latency hacks around.
Signed-off-by: Johan Hovold <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2021-04-22 12:09:25 +02:00
Cristian Ciocaltea
9335e23ddc
tty: serial: owl: Add support for kernel debugger
...
Implement 'poll_put_char' and 'poll_get_char' callbacks in struct
'owl_uart_ops' that enables OWL UART to be used for kernel debugging
over serial line.
Signed-off-by: Cristian Ciocaltea <[email protected] >
Link: https://lore.kernel.org/r/026543195b9aeefb339d90abc5660a6ac7463c63.1610484108.git.cristian.ciocaltea@gmail.com
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2021-01-13 17:16:54 +01:00
Amit Singh Tomar
abf42d2f33
tty: serial: owl: add "much needed" clk_prepare_enable()
...
commit 8ba92cf593 ("arm64: dts: actions: s700: Add Clock Management Unit")
breaks the UART on Cubieboard7-lite (based on S700 SoC), This is due to the
fact that generic clk routine clk_disable_unused() disables the gate clks,
and that in turns disables OWL UART (but UART driver never enables it). To
prove this theory, Andre suggested to use "clk_ignore_unused" in kernel
commnd line and it worked (Kernel happily lands into RAMFS world :)).
This commit fix this up by adding clk_prepare_enable().
Fixes: 8ba92cf593 ("arm64: dts: actions: s700: Add Clock Management Unit")
Signed-off-by: Amit Singh Tomar <[email protected] >
Cc: stable <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2020-04-23 15:46:30 +02:00
Christoph Hellwig
4bdc0d676a
remove ioremap_nocache and devm_ioremap_nocache
...
ioremap has provided non-cached semantics by default since the Linux 2.6
days, so remove the additional ioremap_nocache interface.
Signed-off-by: Christoph Hellwig <[email protected] >
Acked-by: Arnd Bergmann <[email protected] >
2020-01-06 09:45:59 +01:00
Christophe JAILLET
6264dab6ef
tty: serial: owl: Fix the link time qualifier of 'owl_uart_exit()'
...
'exit' functions should be marked as __exit, not __init.
Fixes: fc60a8b675 ("tty: serial: owl: Implement console driver")
Signed-off-by: Christophe JAILLET <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2019-10-04 15:01:15 +02:00
Stephen Boyd
1df2178681
tty: Remove dev_err() usage after platform_get_irq()
...
We don't need dev_err() messages when platform_get_irq() fails now that
platform_get_irq() prints an error message itself when something goes
wrong. Let's remove these prints with a simple semantic patch.
// <smpl>
@@
expression ret;
struct platform_device *E;
@@
ret =
(
platform_get_irq(E, ...)
|
platform_get_irq_byname(E, ...)
);
if ( \( ret < 0 \| ret <= 0 \) )
{
(
-if (ret != -EPROBE_DEFER)
-{ ...
-dev_err(...);
-... }
|
...
-dev_err(...);
)
...
}
// </smpl>
While we're here, remove braces on if statements that only have one
statement (manually).
Cc: Greg Kroah-Hartman <[email protected] >
Cc: Jiri Slaby <[email protected] >
Cc: Greg Kroah-Hartman <[email protected] >
Signed-off-by: Stephen Boyd <[email protected] >
Link: https://lore.kernel.org/r/[email protected]
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2019-09-04 12:43:49 +02:00
Greg Kroah-Hartman
4793f2ebff
tty: serial: Remove redundant license text
...
Now that the SPDX tag is in all tty files, that identifies the license
in a specific and legally-defined manner. So the extra GPL text wording
can be removed as it is no longer needed at all.
This is done on a quest to remove the 700+ different ways that files in
the kernel describe the GPL license text. And there's unneeded stuff
like the address (sometimes incorrect) for the FSF which is never
needed.
No copyright headers or other non-license-description text was removed.
Cc: Jiri Slaby <[email protected] >
Cc: Eric Anholt <[email protected] >
Cc: Stefan Wahren <[email protected] >
Cc: Florian Fainelli <[email protected] >
Cc: Ray Jui <[email protected] >
Cc: Scott Branden <[email protected] >
Cc: [email protected]
Cc: "James E.J. Bottomley" <[email protected] >
Cc: Helge Deller <[email protected] >
Cc: Joachim Eastwood <[email protected] >
Cc: Matthias Brugger <[email protected] >
Cc: Masahiro Yamada <[email protected] >
Cc: Tobias Klauser <[email protected] >
Cc: Russell King <[email protected] >
Cc: Vineet Gupta <[email protected] >
Cc: Richard Genoud <[email protected] >
Cc: Alexander Shiyan <[email protected] >
Cc: Baruch Siach <[email protected] >
Cc: Pat Gefre <[email protected] >
Cc: "Guilherme G. Piccoli" <[email protected] >
Cc: Jason Wessel <[email protected] >
Cc: Vladimir Zapolskiy <[email protected] >
Cc: Sylvain Lemieux <[email protected] >
Cc: Carlo Caione <[email protected] >
Cc: Kevin Hilman <[email protected] >
Cc: Liviu Dudau <[email protected] >
Cc: Sudeep Holla <[email protected] >
Cc: Lorenzo Pieralisi <[email protected] >
Cc: Andy Gross <[email protected] >
Cc: David Brown <[email protected] >
Cc: "Andreas Färber" <[email protected] >
Cc: Benjamin Herrenschmidt <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Michael Ellerman <[email protected] >
Cc: Kevin Cernekee <[email protected] >
Cc: Laxman Dewangan <[email protected] >
Cc: Thierry Reding <[email protected] >
Cc: Jonathan Hunter <[email protected] >
Cc: Barry Song <[email protected] >
Cc: Patrice Chotard <[email protected] >
Cc: Maxime Coquelin <[email protected] >
Cc: Alexandre Torgue <[email protected] >
Cc: Chris Metcalf <[email protected] >
Cc: Peter Korsgaard <[email protected] >
Cc: Timur Tabi <[email protected] >
Cc: Tony Prisk <[email protected] >
Cc: Michal Simek <[email protected] >
Cc: "Sören Brinkmann" <[email protected] >
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2017-11-08 13:08:12 +01:00
Greg Kroah-Hartman
e3b3d0f549
tty: add SPDX identifiers to all remaining files in drivers/tty/
...
It's good to have SPDX identifiers in all files to make it easier to
audit the kernel tree for correct licenses.
Update the drivers/tty files files with the correct SPDX license
identifier based on the license text in the file itself. The SPDX
identifier is a legally binding shorthand, which can be used instead of
the full boiler plate text.
This work is based on a script and data from Thomas Gleixner, Philippe
Ombredanne, and Kate Stewart.
Cc: Jiri Slaby <[email protected] >
Cc: Benjamin Herrenschmidt <[email protected] >
Cc: Paul Mackerras <[email protected] >
Cc: Michael Ellerman <[email protected] >
Cc: Chris Metcalf <[email protected] >
Cc: Jiri Kosina <[email protected] >
Cc: David Sterba <[email protected] >
Cc: James Hogan <[email protected] >
Cc: Rob Herring <[email protected] >
Cc: Eric Anholt <[email protected] >
Cc: Stefan Wahren <[email protected] >
Cc: Florian Fainelli <[email protected] >
Cc: Ray Jui <[email protected] >
Cc: Scott Branden <[email protected] >
Cc: [email protected]
Cc: "James E.J. Bottomley" <[email protected] >
Cc: Helge Deller <[email protected] >
Cc: Joachim Eastwood <[email protected] >
Cc: Matthias Brugger <[email protected] >
Cc: Masahiro Yamada <[email protected] >
Cc: Tobias Klauser <[email protected] >
Cc: Russell King <[email protected] >
Cc: Vineet Gupta <[email protected] >
Cc: Richard Genoud <[email protected] >
Cc: Alexander Shiyan <[email protected] >
Cc: Baruch Siach <[email protected] >
Cc: "Maciej W. Rozycki" <[email protected] >
Cc: "Uwe Kleine-König" <[email protected] >
Cc: Pat Gefre <[email protected] >
Cc: "Guilherme G. Piccoli" <[email protected] >
Cc: Jason Wessel <[email protected] >
Cc: Vladimir Zapolskiy <[email protected] >
Cc: Sylvain Lemieux <[email protected] >
Cc: Carlo Caione <[email protected] >
Cc: Kevin Hilman <[email protected] >
Cc: Liviu Dudau <[email protected] >
Cc: Sudeep Holla <[email protected] >
Cc: Lorenzo Pieralisi <[email protected] >
Cc: Andy Gross <[email protected] >
Cc: David Brown <[email protected] >
Cc: "Andreas Färber" <[email protected] >
Cc: Kevin Cernekee <[email protected] >
Cc: Laxman Dewangan <[email protected] >
Cc: Thierry Reding <[email protected] >
Cc: Jonathan Hunter <[email protected] >
Cc: Barry Song <[email protected] >
Cc: Patrice Chotard <[email protected] >
Cc: Maxime Coquelin <[email protected] >
Cc: Alexandre Torgue <[email protected] >
Cc: "David S. Miller" <[email protected] >
Cc: Peter Korsgaard <[email protected] >
Cc: Timur Tabi <[email protected] >
Cc: Tony Prisk <[email protected] >
Cc: Michal Simek <[email protected] >
Cc: "Sören Brinkmann" <[email protected] >
Cc: Thomas Gleixner <[email protected] >
Cc: Kate Stewart <[email protected] >
Cc: Philippe Ombredanne <[email protected] >
Cc: Jiri Slaby <[email protected] >
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2017-11-08 13:08:12 +01:00
Julia Lawall
e5a7470731
serial: owl: constify uart_ops structures
...
These uart_ops structures are only stored in the ops field of a
uart_port structure and this fields is const, so the uart_ops
structures can also be const.
Done with the help of Coccinelle.
Signed-off-by: Julia Lawall <[email protected] >
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2017-08-28 20:51:19 +02:00
Andreas Färber
fc60a8b675
tty: serial: owl: Implement console driver
...
Implement serial console driver to complement earlycon.
Based on LeMaker linux-actions tree.
Signed-off-by: Andreas Färber <[email protected] >
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2017-07-18 09:28:29 +02:00
Andreas Färber
e36361d70e
tty: serial: Add Actions Semi Owl UART earlycon
...
This implements an earlycon for Actions Semi S500/S900 SoCs.
Based on LeMaker linux-actions tree.
Signed-off-by: Andreas Färber <[email protected] >
Signed-off-by: Greg Kroah-Hartman <[email protected] >
2017-06-20 10:24:15 +08:00