- 19 Jan, 2023 39 commits
-
-
Jiri Slaby (SUSE) authored
NO_VC_UNI_SCREEN is defined nowhere. Remove the last reference to it. Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20230112080136.4929-3-jirislaby@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jiri Slaby (SUSE) authored
Its definition depends on the NO_VC_UNI_SCREEN macro. But that is never defined, so remove all this completely. I.e. expand the macro to vc->vc_uni_screen everywhere. Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20230112080136.4929-2-jirislaby@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jiri Slaby (SUSE) authored
VC_UNI_SCREEN_DEBUG is always defined as 0, so this code is never executed. Drop it along with VC_UNI_SCREEN_DEBUG. Signed-off-by: Jiri Slaby (SUSE) <jirislaby@kernel.org> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20230112080136.4929-1-jirislaby@kernel.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nate Drude authored
Some SoCs like the i.MX93 have aliases for up to eight UARTs, see: https://github.com/torvalds/linux/blob/v6.1/arch/arm64/boot/dts/freescale/imx93.dtsi#L31-L38 Increase UART_NR from 6 to 8 to support lpuart7 and lpuart8 and avoid initialization failures like the following: [ 0.837146] fsl-lpuart 42690000.serial: serial6 out of range [ 0.842814] fsl-lpuart: probe of 42690000.serial failed with error -22 Signed-off-by: Nate Drude <nate.d@variscite.com> Reviewed-by: Sherry Sun <sherry.sun@nxp.com> Link: https://lore.kernel.org/r/20221222145634.2217793-1-nate.d@variscite.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sherry Sun authored
The comment in imx_uart_shutdown() says to disable the break condition, but it doesn't actually do that, here fix this by disabling UCR1_SNDBRK when closing the uart port like other uart drivers do. Signed-off-by: Sherry Sun <sherry.sun@nxp.com> Link: https://lore.kernel.org/r/20221214031137.28815-4-sherry.sun@nxp.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sherry Sun authored
Need to disable the break condition for lpuart driver when closing the uart port like other uart drivers do. Signed-off-by: Sherry Sun <sherry.sun@nxp.com> Link: https://lore.kernel.org/r/20221214031137.28815-3-sherry.sun@nxp.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sherry Sun authored
LPUART IP has a bug that it treats the CTS as higher priority than the break signal, which cause the break signal sending through UARTCTRL_SBK may impacted by the CTS input if the HW flow control is enabled. Add this workaround patch to fix the IP bug, we can disable CTS before asserting SBK to avoid any interference from CTS, and re-enable it when break off. Such as for the bluetooth chip power save feature, host can let the BT chip get into sleep state by sending a UART break signal, and wake it up by turning off the UART break. If the BT chip enters the sleep mode successfully, it will pull up the CTS line, if the BT chip is woken up, it will pull down the CTS line. If without this workaround patch, the UART TX pin cannot send the break signal successfully as it affected by the BT CTS pin. After adding this patch, the BT power save feature can work well. Signed-off-by: Sherry Sun <sherry.sun@nxp.com> Link: https://lore.kernel.org/r/20221214031137.28815-2-sherry.sun@nxp.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sherry Sun authored
The LPUART Status Register needs to be cleared when closing the uart port to get a clean environment when reopening the uart. Fixes: 380c966c ("tty: serial: fsl_lpuart: add 32-bit register interface support") Signed-off-by: Sherry Sun <sherry.sun@nxp.com> Link: https://lore.kernel.org/r/20221125101953.18753-4-sherry.sun@nxp.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sherry Sun authored
UARTBAUD_RDMAE and UARTBAUD_TDMAE are enabled in lpuart32_startup(), but lpuart32_shutdown() not disable them, only free the dma ring buffer and release the dma channels, so here disable the Rx/Tx DMA first in lpuart32_shutdown(). Fixes: 42b68768 ("serial: fsl_lpuart: DMA support for 32-bit variant") Signed-off-by: Sherry Sun <sherry.sun@nxp.com> Link: https://lore.kernel.org/r/20221125101953.18753-3-sherry.sun@nxp.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sherry Sun authored
For the lpuart driver, the Idle Line Interrupt Enable now is only needed for the CPU mode, so enable the UARTCTRL_ILIE at the correct place, and clear it when shutdown. Also need to configure the suitable UARTCTRL_IDLECFG, now the value is 0x7, represent 128 idle characters will trigger the Idle Line Interrupt. Signed-off-by: Sherry Sun <sherry.sun@nxp.com> Link: https://lore.kernel.org/r/20221125101953.18753-2-sherry.sun@nxp.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sven Schnelle authored
If a user specifies an invalid console like 'console=tty3000', the vt driver should prevent setting up a vt entry for that. Suggested-by: Jiri Slaby <jirislaby@kernel.org> Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Link: https://lore.kernel.org/r/20221209112737.3222509-3-svens@linux.ibm.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sven Schnelle authored
When specifying an invalid console= device like console=tty3270, tty_driver_lookup_tty() returns the tty struct without checking whether index is a valid number. To reproduce: qemu-system-x86_64 -enable-kvm -nographic -serial mon:stdio \ -kernel ../linux-build-x86/arch/x86/boot/bzImage \ -append "console=ttyS0 console=tty3270" This crashes with: [ 0.770599] BUG: kernel NULL pointer dereference, address: 00000000000000ef [ 0.771265] #PF: supervisor read access in kernel mode [ 0.771773] #PF: error_code(0x0000) - not-present page [ 0.772609] Oops: 0000 [#1] PREEMPT SMP PTI [ 0.774878] RIP: 0010:tty_open+0x268/0x6f0 [ 0.784013] chrdev_open+0xbd/0x230 [ 0.784444] ? cdev_device_add+0x80/0x80 [ 0.784920] do_dentry_open+0x1e0/0x410 [ 0.785389] path_openat+0xca9/0x1050 [ 0.785813] do_filp_open+0xaa/0x150 [ 0.786240] file_open_name+0x133/0x1b0 [ 0.786746] filp_open+0x27/0x50 [ 0.787244] console_on_rootfs+0x14/0x4d [ 0.787800] kernel_init_freeable+0x1e4/0x20d [ 0.788383] ? rest_init+0xc0/0xc0 [ 0.788881] kernel_init+0x11/0x120 [ 0.789356] ret_from_fork+0x22/0x30 Signed-off-by: Sven Schnelle <svens@linux.ibm.com> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20221209112737.3222509-2-svens@linux.ibm.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Krzysztof Kozlowski authored
Convert the Qualcomm MSM SoC UART (non-DMA) bindings to DT schema. Signed-off-by: Krzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: Rob Herring <robh@kernel.org> Link: https://lore.kernel.org/r/20221201133036.45288-1-krzysztof.kozlowski@linaro.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ilpo Järvinen authored
Use existing defines for the serial register values in 8250_early. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20221125130509.8482-7-ilpo.jarvinen@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ilpo Järvinen authored
16750 indicates 64 bytes FIFO with a IIR bit. Add define for it and make related code more obvious. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20221125130509.8482-6-ilpo.jarvinen@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ilpo Järvinen authored
Don't use magic literals & comments but define a real field instead for UART_IIR_FIFO_ENABLED and name also the values. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20221125130509.8482-5-ilpo.jarvinen@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ilpo Järvinen authored
Use proper names from MCR bits. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20221125130509.8482-4-ilpo.jarvinen@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ilpo Järvinen authored
Add UART_MSR_STATUS_BITS for CD, RI, DSR & CTS. Use names for the literal. Don't make the define for combined flags part of UAPI. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20221125130509.8482-3-ilpo.jarvinen@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ilpo Järvinen authored
Instead of literal 0x0f, add a define for enabling all IER bits the 8250 driver is interested in. Don't make the define for combined flags part of UAPI. Signed-off-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20221125130509.8482-2-ilpo.jarvinen@linux.intel.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jean Delvare authored
Since commit 0166dc11 ("of: make CONFIG_OF user selectable"), it is possible to test-build any driver which depends on OF on any architecture by explicitly selecting OF. Therefore depending on COMPILE_TEST as an alternative is no longer needed. It is actually better to always build such drivers with OF enabled, so that the test builds are closer to how each driver will actually be built on its intended target. Building them without OF may not test much as the compiler will optimize out potentially large parts of the code. In the worst case, this could even pop false positive warnings. Dropping COMPILE_TEST here improves the quality of our testing and avoids wasting time on non-existent issues. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Karol Gugala <kgugala@antmicro.com> Cc: Mateusz Holenko <mholenko@antmicro.com> Cc: Gabriel Somlo <gsomlo@gmail.com> Cc: Joel Stanley <joel@jms.id.au> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Gabriel Somlo <gsomlo@gmail.com> Link: https://lore.kernel.org/r/20221125142756.3e51a28d@endymion.delvareSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gabriel Somlo authored
The polling liteuart_putchar() function is only called from methods conditionally enabled by CONFIG_SERIAL_LITEUART_CONSOLE. Move its definition closer to the console code where it is dependent on the same config option. Signed-off-by: Gabriel Somlo <gsomlo@gmail.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20221123130500.1030189-15-gsomlo@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gabriel Somlo authored
Switch the TX path to IRQ-driven operation, while maintaining support for polling mode via the poll timer. Signed-off-by: Gabriel Somlo <gsomlo@gmail.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20221123130500.1030189-14-gsomlo@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gabriel Somlo authored
Add support for IRQ-driven RX. Support for the TX path will be added in a separate commit. Signed-off-by: Gabriel Somlo <gsomlo@gmail.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20221123130500.1030189-13-gsomlo@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gabriel Somlo authored
Move definitions for liteuart_[stop|start]_tx(), liteuart_stop_rx(), and liteuart_putchar() to a more convenient location in preparation for adding IRQ support. This patch contains no functional changes. Signed-off-by: Gabriel Somlo <gsomlo@gmail.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20221123130500.1030189-12-gsomlo@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gabriel Somlo authored
Convert the rx loop into its own dedicated function, and (for now) call it from the poll timer. This is in preparation for adding irq support to the receive path. Signed-off-by: Gabriel Somlo <gsomlo@gmail.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20221123130500.1030189-11-gsomlo@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gabriel Somlo authored
The `status` variable will always be `1` when passed into the call to `uart_insert_char()`, so it can be eliminated altogether. Use `u8` as the type for `ch`, as it matches the return type of the `litex_read8()` call which produces its value. Signed-off-by: Gabriel Somlo <gsomlo@gmail.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20221123130500.1030189-10-gsomlo@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gabriel Somlo authored
Simply provide the hard-coded TTY_NORMAL flag to uart_insert_char() directly -- no need to dedicate a variable for that exclusive purpose. Signed-off-by: Gabriel Somlo <gsomlo@gmail.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20221123130500.1030189-9-gsomlo@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gabriel Somlo authored
While receiving characters, it is necessary to acknowledge each one by writing to the EV_PENDING register's EV_RX bit. Ensure we do not also gratuitously set the EV_TX bit in the process. Signed-off-by: Gabriel Somlo <gsomlo@gmail.com> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20221123130500.1030189-8-gsomlo@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gabriel Somlo authored
Calling tty_flip_buffer_push() for each individual received character is overkill. Move it out of the rx loop, and only call it once per set of characters received together. Signed-off-by: Gabriel Somlo <gsomlo@gmail.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20221123130500.1030189-7-gsomlo@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gabriel Somlo authored
Signed-off-by: Gabriel Somlo <gsomlo@gmail.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20221123130500.1030189-6-gsomlo@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gabriel Somlo authored
Remove regshift and iobase port fields, since they are unused by the driver. Signed-off-by: Gabriel Somlo <gsomlo@gmail.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20221123130500.1030189-5-gsomlo@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gabriel Somlo authored
Remove stub uart_ops methods that are not called unconditionally from serial_core. Signed-off-by: Gabriel Somlo <gsomlo@gmail.com> Reviewed-by: Ilpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20221123130500.1030189-4-gsomlo@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gabriel Somlo authored
Replace magic bit constants (e.g., 1, 2, 4) with BIT(x) expressions. Signed-off-by: Gabriel Somlo <gsomlo@gmail.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20221123130500.1030189-3-gsomlo@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gabriel Somlo authored
Replace hard-coded instances of "liteuart" with KBUILD_MODNAME. Signed-off-by: Gabriel Somlo <gsomlo@gmail.com> Reviewed-by: Geert Uytterhoeven <geert@linux-m68k.org> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20221123130500.1030189-2-gsomlo@gmail.comSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Bin Meng authored
Now that earlycon semihost driver works on RISC-V too, let's use a much more generic name for the driver. Signed-off-by: Bin Meng <bmeng@tinylab.org> Tested-by: Sergey Matyukevich <sergey.matyukevich@syntacore.com> Acked-by: Palmer Dabbelt <palmer@rivosinc.com> Link: https://lore.kernel.org/r/20221209150437.795918-4-bmeng@tinylab.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Bin Meng authored
Per RISC-V semihosting spec [1], implement semihost.h for the existing Arm semihosting earlycon driver to work on RISC-V. Link: https://github.com/riscv/riscv-semihosting-spec/blob/main/riscv-semihosting-spec.adoc [1] Signed-off-by: Bin Meng <bmeng@tinylab.org> Tested-by: Sergey Matyukevich <sergey.matyukevich@syntacore.com> Acked-by: Palmer Dabbelt <palmer@rivosinc.com> Link: https://lore.kernel.org/r/20221209150437.795918-3-bmeng@tinylab.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Bin Meng authored
Move smh_putc() variants in respective arch/*/include/asm/semihost.h, in preparation to add RISC-V support. Signed-off-by: Bin Meng <bmeng@tinylab.org> Tested-by: Sergey Matyukevich <sergey.matyukevich@syntacore.com> Acked-by: Palmer Dabbelt <palmer@rivosinc.com> Link: https://lore.kernel.org/r/20221209150437.795918-2-bmeng@tinylab.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ricardo Ribalda authored
Now that the clock frequency is also part of the options, 16 bytes is too little. Without this patch dmesg does not show the whole options, Eg: earlycon: uart0 at MMIO32 0x00000000fedc9000 (options '115200n8,480000') instead of: '115200n8,48000000' Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20221123-serial-clk-v3-2-49c516980ae0@chromium.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ricardo Ribalda authored
Some platforms, namely AMD Picasso, use non standard uart clocks (48M), witch makes it impossible to use with earlycon. Let the user select its own frequency. Signed-off-by: Ricardo Ribalda <ribalda@chromium.org> Reviewed-by: Jiri Slaby <jirislaby@kernel.org> Link: https://lore.kernel.org/r/20221123-serial-clk-v3-1-49c516980ae0@chromium.orgSigned-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 15 Jan, 2023 1 commit
-
-
Linus Torvalds authored
-