- 10 10月, 2019 2 次提交
-
-
由 Anson Huang 提交于
All i.MX SoCs except i.MX1 have ONLY one necessary IRQ, use platform_get_irq_optional() to get second/third IRQ which are optional to avoid below error message during probe: [ 0.726219] imx-uart 30860000.serial: IRQ index 1 not found [ 0.731329] imx-uart 30860000.serial: IRQ index 2 not found Fixes: 7723f4c5 ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: NAnson Huang <Anson.Huang@nxp.com> Link: https://lore.kernel.org/r/1570614559-11900-1-git-send-email-Anson.Huang@nxp.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Randy Dunlap 提交于
Fix Sphinx warning in serial_core.c: ../drivers/tty/serial/serial_core.c:1969: WARNING: Definition list ends without a blank line; unexpected unindent. Fixes: 73abaf87 ("serial: earlycon: Refactor parse_options into serial core") Signed-off-by: NRandy Dunlap <rdunlap@infradead.org> Cc: Peter Hurley <peter@hurleysoftware.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Link: https://lore.kernel.org/r/e989641c-224a-1090-e596-e7cc800bed44@infradead.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 07 10月, 2019 3 次提交
-
-
由 Adam Ford 提交于
There are two checks to see if the manual gpio is configured, but these the check is seeing if the structure is NULL instead it should check to see if there are CTS and/or RTS pins defined. This patch uses checks for those individual pins instead of checking for the structure itself to restore auto RTS/CTS. Signed-off-by: NAdam Ford <aford173@gmail.com> Reviewed-by: NYegor Yefremov <yegorslists@googlemail.com> Link: https://lore.kernel.org/r/20191006163314.23191-2-aford173@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Adam Ford 提交于
When using mctrl_gpio_to_gpiod, it dereferences gpios into a single requested GPIO. This dereferencing can break if gpios is NULL, so this patch adds a NULL check before dereferencing it. If gpios is NULL, this function will also return NULL. Signed-off-by: NAdam Ford <aford173@gmail.com> Reviewed-by: NYegor Yefremov <yegorslists@googlemail.com> Link: https://lore.kernel.org/r/20191006163314.23191-1-aford173@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Andrey Smirnov 提交于
Fix incorrect read-modify-write sequence in lpuart_flush_buffer() that was reading from UARTPFIFO and writing to UARTCFIFO instead of operating solely on the latter. Fixes: 9bc19af9 ("tty: serial: fsl_lpuart: Flush HW FIFOs in .flush_buffer") Signed-off-by: NAndrey Smirnov <andrew.smirnov@gmail.com> Reported-by: NVivien Didelot <vivien.didelot@gmail.com> Tested-by: NVivien Didelot <vivien.didelot@gmail.com> Tested-by: NAndrew Lunn <andrew@lunn.ch> Reviewed-by: NFabio Estevam <festevam@gmail.com> Cc: Stefan Agner <stefan@agner.ch> Cc: Chris Healy <cphealy@gmail.com> Cc: Cory Tusar <cory.tusar@zii.aero> Cc: Lucas Stach <l.stach@pengutronix.de> Cc: Jiri Slaby <jslaby@suse.com> Link: https://lore.kernel.org/r/20191004215537.5308-1-andrew.smirnov@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 04 10月, 2019 8 次提交
-
-
由 Randy Dunlap 提交于
Fix tty driver build on SPARC by not using __exitdata. It appears that SPARC does not support section .exit.data. Fixes these build errors: `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o `.exit.data' referenced in section `.exit.text' of drivers/tty/n_hdlc.o: defined in discarded section `.exit.data' of drivers/tty/n_hdlc.o Reported-by: Nkbuild test robot <lkp@intel.com> Fixes: 06324664 ("format-security: move static strings to const") Signed-off-by: NRandy Dunlap <rdunlap@infradead.org> Cc: Kees Cook <keescook@chromium.org> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: "David S. Miller" <davem@davemloft.net> Cc: Andrew Morton <akpm@linux-foundation.org> Link: https://lore.kernel.org/r/675e7bd9-955b-3ff3-1101-a973b58b5b75@infradead.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Michal Simek 提交于
There are two parts which should be fixed. The first one is to assigned uartps_major at the end of probe() to avoid complicated logic when something fails. The second part is initialized uartps_major number to 0 when last device is removed. This will ensure that on next probe driver will ask for new dynamic major number. Fixes: ab262666 ("serial: uartps: Use the same dynamic major number for all ports") Reported-by: NPaul Thomas <pthomas8589@gmail.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: NMichal Simek <michal.simek@xilinx.com> Link: https://lore.kernel.org/r/d2652cda992833315c4f96f06953eb547f928918.1570194248.git.michal.simek@xilinx.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Randy Dunlap 提交于
Call uart_unregister_driver() conditionally instead of unconditionally, only if it has been previously registered. This uses driver.state, just as the sh-sci.c driver does. Fixes this null pointer dereference in tty_unregister_driver(), since the 'driver' argument is null: general protection fault: 0000 [#1] PREEMPT SMP KASAN PTI RIP: 0010:tty_unregister_driver+0x25/0x1d0 Fixes: 238b8721 ("[PATCH] serial uartlite driver") Signed-off-by: NRandy Dunlap <rdunlap@infradead.org> Cc: stable <stable@vger.kernel.org> Cc: Peter Korsgaard <jacmet@sunsite.dk> Link: https://lore.kernel.org/r/9c8e6581-6fcc-a595-0897-4d90f5d710df@infradead.orgSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Stefan-gabriel Mirea 提交于
Following an incorrect indentation reported to me by Dan Carpenter, I noticed that the SysRq lines were inherited from the lpuart driver[1] (note how the 'continue' is aligned to 'sport->port.sysrq = 0') and we have never actually tested the SysRq support. 'sport->sysrq = 0' is not necessary neither before nor after 'continue', because sysrq will already be 0 after uart_handle_sysrq_char() will finish. Also, since the LINFlexD driver never called uart_handle_break(), sysrq would have never been set to a nonzero value, so uart_handle_sysrq_char() was not going to do anything. Break conditions are detected based on a null data byte along with a framing error (stop bit sampled to 0). [1] https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/tty/serial/fsl_lpuart.c?h=b3e3bf2ef2c74f5ce5c19510edbbb9bfc1d249c2#n659 Fixes: 09864c1c ("tty: serial: Add linflexuart driver for S32V234") Signed-off-by: NStefan-Gabriel Mirea <stefan-gabriel.mirea@nxp.com> Reported-by: Nkbuild test robot <lkp@intel.com> Reported-by: NDan Carpenter <dan.carpenter@oracle.com> Link: https://lore.kernel.org/r/20190918184439.7465-1-stefan-gabriel.mirea@nxp.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Geert Uytterhoeven 提交于
As platform_get_irq() now prints an error when the interrupt does not exist, scary warnings may be printed for optional interrupts: sh-sci e6550000.serial: IRQ index 1 not found sh-sci e6550000.serial: IRQ index 2 not found sh-sci e6550000.serial: IRQ index 3 not found sh-sci e6550000.serial: IRQ index 4 not found sh-sci e6550000.serial: IRQ index 5 not found Fix this by calling platform_get_irq_optional() instead for all but the first interrupts, which are optional. Fixes: 7723f4c5 ("driver core: platform: Add an error message to platform_get_irq*()") Signed-off-by: NGeert Uytterhoeven <geert+renesas@glider.be> Reviewed-by: NStephen Boyd <swboyd@chromium.org> Reviewed-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Tested-by: NYoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com> Link: https://lore.kernel.org/r/20191001180743.1041-1-geert+renesas@glider.beSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Christoph Hellwig 提交于
The sifive serial driver implements earlycon support, but unless another driver is built in that supports earlycon support it won't be usable. Explicitly select SERIAL_EARLYCON instead. Signed-off-by: NChristoph Hellwig <hch@lst.de> Reviewed-by: NPaul Walmsley <paul.walmsley@sifive.com> Link: https://lore.kernel.org/r/20190910055923.28384-1-hch@lst.deSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Christophe JAILLET 提交于
'exit' functions should be marked as __exit, not __init. Fixes: c10b1332 ("tty: serial: Add RDA8810PL UART driver") Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/20190910041702.7357-1-christophe.jaillet@wanadoo.frSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Christophe JAILLET 提交于
'exit' functions should be marked as __exit, not __init. Fixes: fc60a8b6 ("tty: serial: owl: Implement console driver") Signed-off-by: NChristophe JAILLET <christophe.jaillet@wanadoo.fr> Link: https://lore.kernel.org/r/20190910041129.6978-1-christophe.jaillet@wanadoo.frSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 05 9月, 2019 13 次提交
-
-
由 Krishna Yarlagadda 提交于
Add PIO mode support in receive and transmit path with RX interrupt trigger of 16 bytes for Tegra194 and older chips. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NKrishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/1567572187-29820-13-git-send-email-kyarlagadda@nvidia.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Krishna Yarlagadda 提交于
Standard UART controllers support +/-4% baud rate error tolerance. Tegra186 only supports 0% to +4% error tolerance whereas other Tegra chips support standard +/-4% rate. Add chip data for knowing error tolerance level for each soc. Creating new compatible for Tegra194 chip as it supports baud rate error tolerance of -2 to +2%, different from older chips. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NKrishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/1567572187-29820-12-git-send-email-kyarlagadda@nvidia.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Krishna Yarlagadda 提交于
Add support to adjust baud rates to fall under supported tolerance range through DT. Tegra186 chip has a hardware issue resulting in frame errors when tolerance level for baud rate is negative. Provided entries to adjust baud rate to be within acceptable range and work with devices that can send negative baud rate. Also report error when baud rate set is out of tolerance range of controller updated in device tree. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NKrishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/1567572187-29820-11-git-send-email-kyarlagadda@nvidia.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Krishna Yarlagadda 提交于
Add support to use 8 bytes trigger for Tegra186 SOC. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NKrishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/1567572187-29820-9-git-send-email-kyarlagadda@nvidia.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Krishna Yarlagadda 提交于
Set maximum number of UART ports to 8 as older chips have 5 ports and Tergra186 and later chips will have 8 ports. Add this info to chip data. Read device tree compatible of this driver and register uart driver with max ports of matching chip data. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NKrishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/1567572187-29820-8-git-send-email-kyarlagadda@nvidia.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Krishna Yarlagadda 提交于
Chips prior to Tegra186 needed delay of 3 UART clock cycles to avoid data loss. This issue is fixed in Tegra186 and a new flag is added to check if FIFO mode is enabled. chip data updated to check if this flag is available for a chip. Tegra186 has new compatible to enable this flag. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NKrishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/1567572187-29820-7-git-send-email-kyarlagadda@nvidia.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Krishna Yarlagadda 提交于
Report overrun/parity/frame/break errors to top tty layer. Add support to ignore break character if IGNBRK is set. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NKrishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/1567572187-29820-5-git-send-email-kyarlagadda@nvidia.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shardar Shariff Md 提交于
FIFO reset/flush code implemented now does not follow programming guidelines. RTS line has to be turned off while flushing FIFOs to avoid new transfers. Also check LSR bits UART_LSR_TEMT and UART_LSR_DR to confirm FIFOs are flushed. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NKrishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/1567572187-29820-4-git-send-email-kyarlagadda@nvidia.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Ahung Cheng 提交于
This avoids two race conditions from the UART shutdown sequence both leading to 'Machine check error in AXI2APB' and kernel oops. One was that the clock was disabled before the DMA was terminated making it possible for the DMA callbacks to be called after the clock was disabled. These callbacks could write to the UART registers causing timeout. The second was that the clock was disabled before the UART was completely flagged as closed. This is done after the shutdown is called and a new write could be started after the clock was disabled. tegra_uart_start_pio_tx could be called causing timeout. Given that the baud rate is reset at the end of shutdown sequence, this fix is to examine the baud rate to avoid register access from both race conditions. Besides, terminate the DMA before disabling the clock. Signed-off-by: NAhung Cheng <ahcheng@nvidia.com> Signed-off-by: NShardar Mohammed <smohammed@nvidia.com> Signed-off-by: NKrishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/1567572187-29820-3-git-send-email-kyarlagadda@nvidia.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Shardar Shariff Md 提交于
Add support to ignore read characters if CREAD flag is not set. Signed-off-by: NShardar Shariff Md <smohammed@nvidia.com> Signed-off-by: NKrishna Yarlagadda <kyarlagadda@nvidia.com> Link: https://lore.kernel.org/r/1567572187-29820-2-git-send-email-kyarlagadda@nvidia.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chunyan Zhang 提交于
The sequence of arguments which was passed to handle_lsr_errors() didn't match the parameters defined in that function, &lsr was passed to flag and &flag was passed to lsr, this patch fixed that. Fixes: b7396a38 ("tty/serial: Add Spreadtrum sc9836-uart driver support") Signed-off-by: NChunyan Zhang <chunyan.zhang@unisoc.com> Signed-off-by: NChunyan Zhang <zhang.lyra@gmail.com> Cc: stable <stable@vger.kernel.org> Link: https://lore.kernel.org/r/20190905074151.5268-1-zhang.lyra@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Christoph Vogtländer 提交于
As documented in the data-sheet, the transmitter must be disabled before activating AutoCTS or auto transmitter flow control. Accordingly, the transmitter must be enabled after AutoCTS or auto transmitter flow control gets deactivated. Signed-off-by: NChristoph Vogtländer <c.vogtlaender@sigma-surface-science.com> Link: https://lore.kernel.org/r/20190904121746.4641-1-c.vogtlaender@sigma-surface-science.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Christoph Vogtländer 提交于
Commit 391f93f2 ("serial: core: Rework hw-assisted flow control support") has changed the way the AutoCTS mode is handled. According to that change, serial drivers which enable H/W AutoCTS mode must set UPSTAT_AUTORTS, UPSTAT_AUTOCTS and UPSTAT_AUTOXOFF to prevent the serial core from inadvertently disabling RX or TX. This patch adds proper handling of UPSTAT_AUTORTS, UPSTAT_AUTOCTS and UPSTAT_AUTOXOFF flags. Signed-off-by: NChristoph Vogtländer <c.vogtlaender@sigma-surface-science.com> Link: https://lore.kernel.org/r/20190904121141.4570-1-c.vogtlaender@sigma-surface-science.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 04 9月, 2019 14 次提交
-
-
由 kbuild test robot 提交于
drivers/tty/serial/fsl_linflexuart.c:907:3-8: No need to set .owner here. The core will do it. Remove .owner field if calls are used which set it automatically Generated by: scripts/coccinelle/api/platform_no_drv_owner.cocci Fixes: b953815b819b ("tty: serial: Add linflexuart driver for S32V234") CC: Stefan-gabriel Mirea <stefan-gabriel.mirea@nxp.com> Signed-off-by: Nkbuild test robot <lkp@intel.com> Reviewed-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Link: https://lore.kernel.org/r/20190825142837.zt3hpa22c7iofg3v@48261080c7f1Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Stefan-gabriel Mirea 提交于
The "fsl,s32-linflexuart" compatible string is too generic. Make it SoC specific. Signed-off-by: NStefan-Gabriel Mirea <stefan-gabriel.mirea@nxp.com> Link: https://lore.kernel.org/r/20190823191115.18490-4-stefan-gabriel.mirea@nxp.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Martin Hundebøll 提交于
When tearing down the n_gsm ldisc while one or more of its child ports are open, a lock dep warning occurs: [ 56.254258] ====================================================== [ 56.260447] WARNING: possible circular locking dependency detected [ 56.266641] 5.2.0-00118-g1fd58e20e5b0 #30 Not tainted [ 56.271701] ------------------------------------------------------ [ 56.277890] cmux/271 is trying to acquire lock: [ 56.282436] 8215283a (&tty->legacy_mutex){+.+.}, at: __tty_hangup.part.0+0x58/0x27c [ 56.290128] [ 56.290128] but task is already holding lock: [ 56.295970] e9e2b842 (&gsm->mutex){+.+.}, at: gsm_cleanup_mux+0x9c/0x15c [ 56.302699] [ 56.302699] which lock already depends on the new lock. [ 56.302699] [ 56.310884] [ 56.310884] the existing dependency chain (in reverse order) is: [ 56.318372] [ 56.318372] -> #2 (&gsm->mutex){+.+.}: [ 56.323624] mutex_lock_nested+0x1c/0x24 [ 56.328079] gsm_cleanup_mux+0x9c/0x15c [ 56.332448] gsmld_ioctl+0x418/0x4e8 [ 56.336554] tty_ioctl+0x96c/0xcb0 [ 56.340492] do_vfs_ioctl+0x41c/0xa5c [ 56.344685] ksys_ioctl+0x34/0x60 [ 56.348535] ret_fast_syscall+0x0/0x28 [ 56.352815] 0xbe97cc04 [ 56.355791] [ 56.355791] -> #1 (&tty->ldisc_sem){++++}: [ 56.361388] tty_ldisc_lock+0x50/0x74 [ 56.365581] tty_init_dev+0x88/0x1c4 [ 56.369687] tty_open+0x1c8/0x430 [ 56.373536] chrdev_open+0xa8/0x19c [ 56.377560] do_dentry_open+0x118/0x3c4 [ 56.381928] path_openat+0x2fc/0x1190 [ 56.386123] do_filp_open+0x68/0xd4 [ 56.390146] do_sys_open+0x164/0x220 [ 56.394257] kernel_init_freeable+0x328/0x3e4 [ 56.399146] kernel_init+0x8/0x110 [ 56.403078] ret_from_fork+0x14/0x20 [ 56.407183] 0x0 [ 56.409548] [ 56.409548] -> #0 (&tty->legacy_mutex){+.+.}: [ 56.415402] __mutex_lock+0x64/0x90c [ 56.419508] mutex_lock_nested+0x1c/0x24 [ 56.423961] __tty_hangup.part.0+0x58/0x27c [ 56.428676] gsm_cleanup_mux+0xe8/0x15c [ 56.433043] gsmld_close+0x48/0x90 [ 56.436979] tty_ldisc_kill+0x2c/0x6c [ 56.441173] tty_ldisc_release+0x88/0x194 [ 56.445715] tty_release_struct+0x14/0x44 [ 56.450254] tty_release+0x36c/0x43c [ 56.454365] __fput+0x94/0x1e8 Avoid the warning by doing the port hangup asynchronously. Signed-off-by: NMartin Hundebøll <martin@geanix.com> Link: https://lore.kernel.org/r/20190822215601.9028-1-martin@geanix.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chunyan Zhang 提交于
The sprd serial console can work with only 26M fixed clock, but the probe() is returning fail if the clock "enable" is not configured in device tree. This patch will fix the problem to let the uart device which is used for console can be initialized even missing "enable" clock configured in devicetree. We should make sure the debug function as available as we can. Signed-off-by: NChunyan Zhang <chunyan.zhang@unisoc.com> Signed-off-by: NChunyan Zhang <zhang.lyra@gmail.com> Reviewed-by: NBaolin Wang <baolin.wang@linaro.org> Tested-by: NBaolin Wang <baolin.wang@linaro.org> Link: https://lore.kernel.org/r/20190826072929.7696-4-zhang.lyra@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chunyan Zhang 提交于
Use console_initcall to save the console index we selected on the command line to sprd_console before probe finished. Thus we can make different processes to the uart devices during initialization according to whether it is used for console. Signed-off-by: NChunyan Zhang <chunyan.zhang@unisoc.com> Signed-off-by: NChunyan Zhang <zhang.lyra@gmail.com> Reviewed-by: NBaolin Wang <baolin.wang@linaro.org> Tested-by: NBaolin Wang <baolin.wang@linaro.org> Link: https://lore.kernel.org/r/20190826072929.7696-3-zhang.lyra@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Chunyan Zhang 提交于
When calling sprd_console_setup(), sprd_uart_port probably is NULL, we should check that first instead of checking its items directly. Also we should check membase to avoid accessing uart device before its initialization finished. Signed-off-by: NChunyan Zhang <chunyan.zhang@unisoc.com> Signed-off-by: NChunyan Zhang <zhang.lyra@gmail.com> Reviewed-by: NBaolin Wang <baolin.wang@linaro.org> Tested-by: NBaolin Wang <baolin.wang@linaro.org> Link: https://lore.kernel.org/r/20190826072929.7696-2-zhang.lyra@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Richard Genoud 提交于
Since commit 18dfef9c ("serial: atmel: convert to irq handling provided mctrl-gpio"), the GPIOs interrupts are handled by mctrl_gpio_irq_handle(). So, atmel_get_lines_status() can be completely killed and replaced by : atmel_uart_readl(port, ATMEL_US_CSR); Suggested-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Acked-by: NUwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: NRichard Genoud <richard.genoud@gmail.com> Link: https://lore.kernel.org/r/20190826071752.30396-1-richard.genoud@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Sergey Organov 提交于
This should help to avoid unnecessary gaps in transmission while adding little overhead due to low default Tx threshold level (2 bytes). Signed-off-by: NSergey Organov <sorganov@gmail.com> Link: https://lore.kernel.org/r/1567017475-11919-6-git-send-email-sorganov@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Sergey Organov 提交于
imx_set_termios(): avoid writing baud rate divider registers when the values to be written are the same as current. Any writing seems to restart transmission/receiving logic in the hardware, that leads to data breakage even when rate doesn't in fact change. E.g., user switches RTS/CTS handshake and suddenly gets broken bytes. Signed-off-by: NSergey Organov <sorganov@gmail.com> Link: https://lore.kernel.org/r/1567017475-11919-5-git-send-email-sorganov@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Sergey Organov 提交于
imx_set_termios(): disabling individual interrupt requests in UART for duration of the routine is pointless. Get rid of it. Signed-off-by: NSergey Organov <sorganov@gmail.com> Link: https://lore.kernel.org/r/1567017475-11919-4-git-send-email-sorganov@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Sergey Organov 提交于
imx_set_termios(): stopping receiver and transmitter does harm when something that doesn't touch transmission format/rate changes, such as RTS/CTS handshake. OTOH, it does no good on baud rate or format change, as synchronization on upper-level protocols is still required to do it right. Therefore, just stop doing it. Signed-off-by: NSergey Organov <sorganov@gmail.com> Link: https://lore.kernel.org/r/1567017475-11919-3-git-send-email-sorganov@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Sergey Organov 提交于
imx_set_termios(): remove busy-waiting "drain Tx FIFO" loop. Worse yet, it was potentially unbounded wait due to RTS/CTS (hardware) handshake. Let user space ensure draining is done before termios change, if draining is needed in the first place. Signed-off-by: NSergey Organov <sorganov@gmail.com> Link: https://lore.kernel.org/r/1567017475-11919-2-git-send-email-sorganov@gmail.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jan Kundrát 提交于
A recent change split the insertion loop into two parts. The first part accessed bytes 0, 1, ... (rxlen - 2), and the second part by mistake took offset `rxlen` instead of the correct `rxlen - 1`. So one byte was not stored, and the final access wrote past the end of the rx_buf. Fixes: 9c12d739 (tty: max310x: Split uart characters insertion loop) Signed-off-by: NJan Kundrát <jan.kundrat@cesnet.cz> Reviewed-by: NSerge Semin <fancer.lancer@gmail.com> Link: https://lore.kernel.org/r/13ea227620aaad8a7231d42ed03a8508297d4eb3.1567027079.git.jan.kundrat@cesnet.czSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Wei Yongjun 提交于
spinlock can be initialized automatically with DEFINE_SPINLOCK() rather than explicitly calling spin_lock_init(). Signed-off-by: NWei Yongjun <weiyongjun1@huawei.com> Link: https://lore.kernel.org/r/20190827114614.102037-1-weiyongjun1@huawei.comSigned-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-