- 30 6月, 2022 4 次提交
-
-
由 Ilpo Järvinen 提交于
Accessing LSR requires port lock because it mutates lsr_saved_flags in serial_lsr_in(). Fixes: 197eb5c4 ("serial: 8250_dw: Use serial_lsr_in() in dw8250_handle_irq()") Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/c5879db7-bee9-93f-526e-872a292442@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Zhang Jiaming 提交于
Change 'timeing' to 'timing'. Change 'Characteres' to 'Characters'. Reviewed-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: NZhang Jiaming <jiaming@nfschina.com> Link: https://lore.kernel.org/r/20220629094411.39066-1-jiaming@nfschina.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chanho Park 提交于
Internal loopback mode can be supported by setting UCON register's Loopback Mode bit. The mode & bit can be supported since s3c2410 and later SoCs. The prefix of LOOPBACK / BIT(5) naming should be also changed to S3C2410_ in order to avoid confusion. Reviewed-by: NKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Reviewed-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: NChanho Park <chanho61.park@samsung.com> Link: https://lore.kernel.org/r/20220629004141.51484-1-chanho61.park@samsung.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chanho Park 提交于
Regarding Exynos Auto v9 SoC, it supports uarts up to 12. However, the maximum number of the ports has been derived from CONFIG_SERIAL_SAMSUNG_UARTS and tightly coupled with the config for previous Samsung SoCs such as s3c24xx and s3c64xx. To overcome this limitation, this changes the usage of the definition to UART_NR which is widely used from other serial drivers. This also defines the value to 12 only for ARM64 SoCs to not affect the change to previous arm32 SoCs. Instead of enumerating all the ports as predefined arrays, this introduces s3c24xx_serial_init_port_default that is initializing the structure as the default value. Reviewed-by: NHector Martin <marcan@marcan.st> Reviewed-by: NKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: NChanho Park <chanho61.park@samsung.com> Link: https://lore.kernel.org/r/20220629005538.60132-1-chanho61.park@samsung.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 27 6月, 2022 35 次提交
-
-
由 Ilpo Järvinen 提交于
Add 9th bit multipoint addressing mode for DW UART. 9th bit addressing can be used only when HW RS485 is available. Updating RAR (receive address register) is bit tricky because busy indication is not be available when DW UART is strictly 16550 compatible, which is the case with the hardware I was testing with. RAR should not be updated while receive is in progress which is now achieved by deasserting RE and waiting for one frame (in case rx would be in progress, the driver seems to have no way of knowing it w/o busy indication). Because of this complexity, it's better to avoid doing it unless really needed. Co-developed-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com> Co-developed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Co-developed-by: NRaymond Tan <raymond.tan@intel.com> Co-developed-by: NLakshmi Sowjanya <lakshmi.sowjanya.d@intel.com> Signed-off-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NRaymond Tan <raymond.tan@intel.com> Signed-off-by: NLakshmi Sowjanya <lakshmi.sowjanya.d@intel.com> Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220624204210.11112-7-ilpo.jarvinen@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ilpo Järvinen 提交于
Add support for RS-485 multipoint addressing using 9th bit [*]. The addressing mode is configured through ->rs485_config(). ADDRB in termios indicates 9th bit addressing mode is enabled. In this mode, 9th bit is used to indicate an address (byte) within the communication line. ADDRB can only be enabled/disabled through ->rs485_config() that is also responsible for setting the destination and receiver (filter) addresses. Add traps to detect unwanted changes to struct serial_rs485 layout using static_assert(). [*] Technically, RS485 is just an electronic spec and does not itself specify the 9th bit addressing mode but 9th bit seems at least "semi-standard" way to do addressing with RS485. Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220624204210.11112-6-ilpo.jarvinen@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ilpo Järvinen 提交于
To be able to alter ADDRB within ->rs485_config(), take termios_rwsem before calling ->rs485_config() and pass termios. Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220624204210.11112-5-ilpo.jarvinen@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ilpo Järvinen 提交于
Use 32-bit reads in order to not lose higher bits of DW UART regs. This change does not fix any known issue as the high bits are not used for anything related to 8250 driver (dw8250_readl_ext and dw8250_writel_ext used within the dwlib are already doing readl/writel/ioread32be/iowrite32be anyway). This change is necessary to enables 9th bit address mode. DW UART reports address frames with BIT(8) of LSR. Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220624204210.11112-4-ilpo.jarvinen@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ilpo Järvinen 提交于
Allow drivers to alter LSR save mask. Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220624204210.11112-3-ilpo.jarvinen@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ilpo Järvinen 提交于
DW flags address received as BIT(8) in LSR. In order to not lose that on read, enlarge lsr_saved_flags to u16. Adjust lsr/status variables and related call chains to use u16. Technically, some of these type conversion would not be needed but it doesn't hurt to be consistent. Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220624204210.11112-2-ilpo.jarvinen@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ilpo Järvinen 提交于
Per file BOTH_EMPTY defines are littering our source code here and there. Define once in serial.h and create helper for the check too. Reviewed-by: NJiri Slaby <jirislaby@kernel.org> Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220624205424.12686-7-ilpo.jarvinen@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ilpo Järvinen 提交于
Both UART_XMIT_SIZE and SERIAL_XMIT_SIZE are defined. Make them all UART_XMIT_SIZE. Reviewed-by: NJiri Slaby <jirislaby@kernel.org> Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220624205424.12686-6-ilpo.jarvinen@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ilpo Järvinen 提交于
Use C99 array initializer insteads of comments and make unmapped checks more obvious. Reviewed-by: NJiri Slaby <jirislaby@kernel.org> Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220624205424.12686-5-ilpo.jarvinen@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ilpo Järvinen 提交于
Instead of listing the bits for UART_LSR_BRK_ERROR_BITS and UART_MSR_ANY_DELTA in comment, use them to define instead. Reviewed-by: NJiri Slaby <jirislaby@kernel.org> Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220624205424.12686-4-ilpo.jarvinen@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ilpo Järvinen 提交于
Using UART_* to name defines is a bit problematic. When trying to do unrelated cleanup which also involved tweaking header inclusion logic, caused UART_CSR from serial_reg.h to leak into msm's namespace which is also among msm defines. Thus, rename all UART_* ones to MSM_UART_* to eliminate possibility of collisions. Reviewed-by: NJiri Slaby <jirislaby@kernel.org> Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220624205424.12686-3-ilpo.jarvinen@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ilpo Järvinen 提交于
Create static inline instead of define as it provides type safety and is safer wrt. macros expansion. Reviewed-by: NJiri Slaby <jirislaby@kernel.org> Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220624205424.12686-2-ilpo.jarvinen@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Claudiu Beznea 提交于
st-asc driver doesn't use helpers from pm_runtime.h thus remove its include. Reviewed-by: NPatrice Chotard <patrice.chotard@foss.st.com> Signed-off-by: NClaudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20220616140024.2081238-5-claudiu.beznea@microchip.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Claudiu Beznea 提交于
There is no need for clk_prepare_enable() at the beginning of atmel_console_setup() and clk_disable_unprepare() at the end of atmel_console_setup() as the clock is already enabled when calling atmel_console_setup() and its disablement is done at the end of probe. Acked-by: NRichard Genoud <richard.genoud@gmail.com> Signed-off-by: NClaudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20220616140024.2081238-4-claudiu.beznea@microchip.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Claudiu Beznea 提交于
Use devm_clk_get() for serial clock instead of clk_get()/clk_put(). With this move the clk_get in driver's probe function. Acked-by: NRichard Genoud <richard.genoud@gmail.com> Signed-off-by: NClaudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20220616140024.2081238-3-claudiu.beznea@microchip.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Claudiu Beznea 提交于
Stop using legacy PM ops and switch using dev_pm_ops. Along with it #ifdef CONFIG_PM are removed and __maybe_unused and pm_ptr() used instead. Coding style recommends (at chapter Conditional Compilation) to avoid using preprocessor conditional and use __maybe_unused instead. Acked-by: NRichard Genoud <richard.genoud@gmail.com> Signed-off-by: NClaudiu Beznea <claudiu.beznea@microchip.com> Link: https://lore.kernel.org/r/20220616140024.2081238-2-claudiu.beznea@microchip.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Sebastian Reichel 提交于
Add a Rockchip RK3588 compatible. Acked-by: NKrzysztof Kozlowski <krzysztof.kozlowski@linaro.org> Signed-off-by: NSebastian Reichel <sebastian.reichel@collabora.com> Link: https://lore.kernel.org/r/20220623161350.242079-1-sebastian.reichel@collabora.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Xiang wangx 提交于
Delete the redundant word 'the'. Signed-off-by: NXiang wangx <wangxiang@cdjrlc.com> Link: https://lore.kernel.org/r/20220620104653.5451-1-wangxiang@cdjrlc.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ilpo Järvinen 提交于
Add myself as maintainer for DW 8250 UART and up it to Supported. Reported-by: Nkernel test robot <lkp@intel.com> Reviewed-by: NAndy Shevchenko <andy.shevchenko@gmail.com> Acked-by: NFrom: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/be58b398-71ff-7c12-1bf1-a09181d9c80@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Wolfram Sang 提交于
Reviewed-by: NGeert Uytterhoeven <geert+renesas@glider.be> Acked-by: NRob Herring <robh@kernel.org> Signed-off-by: NWolfram Sang <wsa+renesas@sang-engineering.com> Link: https://lore.kernel.org/r/20220613131007.10027-1-wsa+renesas@sang-engineering.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Liang He 提交于
In soc_info(), of_find_node_by_type() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Acked-by: NTimur Tabi <timur@kernel.org> Signed-off-by: NLiang He <windhl@126.com> Link: https://lore.kernel.org/r/20220618060850.4058525-1-windhl@126.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Liang He 提交于
In tegra_uart_init(), of_find_matching_node() will return a node pointer with refcount incremented. We should use of_node_put() when it is not used anymore. Signed-off-by: NLiang He <windhl@126.com> Link: https://lore.kernel.org/r/20220615111747.3963930-1-windhl@126.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ilpo Järvinen 提交于
Since commit 31f6bd7f ("serial: Store character timing information to uart_port"), per frame timing information is available on uart_port. Uart port's timeout can be derived from frame_time by multiplying with fifosize. Most callers of uart_poll_timeout are not made under port's lock. To be on the safe side, make sure frame_time is only accessed once. As fifo_size is effectively a constant, it shouldn't cause any issues. Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220613113905.22962-1-ilpo.jarvinen@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ilpo Järvinen 提交于
The closing `` is missing. Add it. Fixes: 6bb6fa69 ("tty: Implement lookahead to process XON/XOFF timely") Reported-by: NStephen Rothwell <sfr@canb.auug.org.au> Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/9bc6d45d-48c8-519-1646-78ba22505b1f@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ilpo Järvinen 提交于
Use UART_LCR_DLAB instead of literal. Reviewed-by: NJiri Slaby <jirislaby@kernel.org> Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220613075736.12283-2-ilpo.jarvinen@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ilpo Järvinen 提交于
Use UART_LCR_WLEN8 instead of literal 0x03 in size_fifo(). Reviewed-by: NJiri Slaby <jirislaby@kernel.org> Signed-off-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Link: https://lore.kernel.org/r/20220613075736.12283-1-ilpo.jarvinen@linux.intel.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Christophe JAILLET 提交于
An SPDX-License-Identifier is already in place. There is no need to duplicate part of the corresponding license. Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/dbc54eff6f4e077d9126054f395d5bc5b3405917.1654936915.git.christophe.jaillet@wanadoo.frSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jiri Slaby 提交于
The code expects "translations" to have 256 (E_TABSZ) values. Use the macro instead of the constant to be explicit about this. Suggested-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: NJiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20220614090537.15557-8-jslaby@suse.czSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jiri Slaby 提交于
con_do_clear_unimap() sets dflt to NULL and then calls con_release_unimap() which does the very same as the first thing. So remove the former as it is apparently superfluous. Suggested-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: NJiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20220614090537.15557-7-jslaby@suse.czSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jiri Slaby 提交于
Use FIELD_GET() and GENMASK() helpers instead of direct shifts and ANDs. This makes the code even more obvious. I didn't know about the helpers at the time of writing the macros. Suggested-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: NJiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20220614090537.15557-6-jslaby@suse.czSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jiri Slaby 提交于
As a follow-up to the commit 4173f018 (tty/vt: consolemap: rename and document struct uni_pagedir), rename also the members of struct vc_data. I.e. pagedir -> pagedict. And while touching all the places, remove also the unnecessary vc_ prefix. Suggested-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Reviewed-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: NJiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20220614090537.15557-5-jslaby@suse.czSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jiri Slaby 提交于
The function uses too vague variable names like i, j, k for iterators, p, q, p1, p2 for pointers etc. Rename all these, so that it is clear what is going on: - dict: for dictionaries. - d, r, g: for dir, row, glyph iterators -- these are unsigned now. - dir, row: for directory and row pointers. - glyph: for the glyph. - and so on... This is a lot of shuffling, but the result pays off, IMO. Reviewed-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: NJiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20220614090537.15557-4-jslaby@suse.czSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jiri Slaby 提交于
The function still uses too vague parameter name after commit 50c92a1b (tty/vt: consolemap: saner variable names in set_inverse_trans_unicode()). So use "dict" instead of "p" for that parameter too. Reviewed-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: NJiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20220614090537.15557-3-jslaby@suse.czSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jiri Slaby 提交于
conp is unused in set_inverse_trans_unicode(), remove it. Reviewed-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: NJiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20220614090537.15557-2-jslaby@suse.czSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jiri Slaby 提交于
The code still uses constants (macros) as bounds in loops after commit 17945d31 (tty/vt: consolemap: use ARRAY_SIZE()). The contants are at least macros used also in the definition of the arrays. But use ARRAY_SIZE() on two more places to ensure the loops never run out of bounds even if the array definition change. Reviewed-by: NIlpo Järvinen <ilpo.jarvinen@linux.intel.com> Signed-off-by: NJiri Slaby <jslaby@suse.cz> Link: https://lore.kernel.org/r/20220614090537.15557-1-jslaby@suse.czSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 20 6月, 2022 1 次提交
-
-
由 Greg Kroah-Hartman 提交于
We need the tty/serial fixes in here as well. Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-