- 01 5月, 2016 4 次提交
-
-
由 Peter Hurley 提交于
Using fake IIR values to perform rx dma operations unnecessarily conflates separate operations, stopping in-progress dma with starting new dma. Introduce serial8250_rx_dma_flush() to handle stopping in-progress dma [omap8250 already has equivalent omap_8250_rx_dma_flush()]. Replace rx_dma(UART_IIR_RX_TIMEOUT) with the equivalent *_rx_dma_flush(), and rx_dma(0) with the equivalent *_rx_dma(). Handle IIR steering in the irq handler with handle_rx_dma() helper. Signed-off-by: NPeter Hurley <peter@hurleysoftware.com> Reviewed-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Peter Hurley 提交于
If !up->dma == F, then up->dma == T and can be elided from the (up->dma && up->dma->tx_err) sub-expression. Signed-off-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Peter Hurley 提交于
dma_err is not used other than for boolean evaluation; substitute the actual operation directly. Signed-off-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Wan Ahmad Zainie 提交于
Exposes get_mctrl() function so that it can be overriden with platform specific implementation. Signed-off-by: NWan Ahmad Zainie <wan.ahmad.zainie.wan.mohamad@intel.com> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NHeikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 19 4月, 2016 1 次提交
-
-
由 Yegor Yefremov 提交于
When in half-duplex mode RX will be disabled before TX, but not enabled after deactivating transmitter. This patch enables UART_IER_RLSI and UART_IER_RDI interrupts after TX is over. Cc: Matwey V. Kornilov <matwey@sai.msu.ru> Signed-off-by: NYegor Yefremov <yegorslists@googlemail.com> Fixes: e490c914 ("tty: Add software emulated RS485 support for 8250") Acked-by: NMatwey V. Kornilov <matwey@sai.msu.ru> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 08 3月, 2016 2 次提交
-
-
由 Andy Shevchenko 提交于
up_to_u8250p() casts struct uart_port * to struct uart_8250_port *. Update code to use it instead of open coded variant. Signed-off-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Matwey V. Kornilov 提交于
serial8250_em485_init() is supposed to be protected with p->port.lock spinlock. This may lead to issues when kmalloc sleeps, so it is better to use GFP_ATOMIC in this spinlocked context. Fixes: e490c914 ("tty: Add software emulated RS485 support for 8250") Reported-by: NИльяс Гасанов <torso.nafi@gmail.com> Signed-off-by: NMatwey V. Kornilov <matwey@sai.msu.ru> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 07 2月, 2016 8 次提交
-
-
由 Anton Wuerfel 提交于
Checkpatch complains about incorrect indentation of switch/case statements. This patch fixes the corresponding warnings. Additionally some indentation is changed to match the correct format specified in the Linux Kernel Coding Style. Signed-off-by: NAnton Würfel <anton.wuerfel@fau.de> Signed-off-by: NPhillip Raffeck <phillip.raffeck@fau.de> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: linux-kernel@i4.cs.fau.de Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Phillip Raffeck 提交于
This patch replaces printk by the corresponding variant of dev_* in order to fix checkpatch warnings. If no suitable device pointer is present, the corresponding pr_* variant is used. Signed-off-by: NPhillip Raffeck <phillip.raffeck@fau.de> Signed-off-by: NAnton Würfel <anton.wuerfel@fau.de> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: linux-kernel@i4.cs.fau.de Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Anton Wuerfel 提交于
Checkpatch outputs some warnings about incorrect comment style, which is fixed by this patch. Signed-off-by: NAnton Würfel <anton.wuerfel@fau.de> Signed-off-by: NPhillip Raffeck <phillip.raffeck@fau.de> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: linux-kernel@i4.cs.fau.de Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Anton Wuerfel 提交于
Indentation is changed to match the correct format of using tabs instead of spaces wherever possible. Signed-off-by: NAnton Würfel <anton.wuerfel@fau.de> Signed-off-by: NPhillip Raffeck <phillip.raffeck@fau.de> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: NPeter Hurley <peter@hurleysoftware.com> Cc: linux-kernel@i4.cs.fau.de Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Anton Wuerfel 提交于
This patch fixes whitespace errors reported by checkpatch to increase readability. Main focus is on missing spaces after commas in function headers and macros (like foo,bar edited to foo, bar). Signed-off-by: NAnton Würfel <anton.wuerfel@fau.de> Signed-off-by: NPhillip Raffeck <phillip.raffeck@fau.de> Reviewed-by: NAndy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: linux-kernel@i4.cs.fau.de Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Sebastian Frias 提交于
Some UART HW has a single register combining UART_DLL/UART_DLM (this was probably forgotten in the change that introduced the callbacks, commit b32b19b8) Fixes: b32b19b8 ("[SERIAL] 8250: set divisor register correctly ...") Signed-off-by: NSebastian Frias <sf84@laposte.net> Reviewed-by: NPeter Hurley <peter@hurleysoftware.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Matwey V. Kornilov 提交于
Implementation of software emulation of RS485 direction handling is based on omap_serial driver. Before and after transmission RTS is set to the appropriate value. Note that before calling serial8250_em485_init() the caller has to ensure that UART will interrupt when shift register empty. Otherwise, emultaion cannot be used. Both serial8250_em485_init() and serial8250_em485_destroy() are idempotent functions. Signed-off-by: NMatwey V. Kornilov <matwey@sai.msu.ru> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Matwey V. Kornilov 提交于
Software RS485 emultaion is to be added in the following commit. serial8250_start_tx() will need to refer serial8250_stop_rx(). Move serial8250_stop_rx() in front of serial8250_start_tx() in order to avoid function forward declaration. Signed-off-by: NMatwey V. Kornilov <matwey@sai.msu.ru> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 29 1月, 2016 5 次提交
-
-
由 Peter Hurley 提交于
Signed-off-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Peter Hurley 提交于
After masking all interrupts, wait for the irq handler to complete before continuing shutdown. Signed-off-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Peter Hurley 提交于
The defunct low_latency input steering executed flush_to_ldisc() directly from interrupt context so dropping the port lock was necessary to avoid deadlock. That steering was removed by commit a9c3f68f Author: Peter Hurley <peter@hurleysoftware.com> Date: Sat Feb 22 07:31:21 2014 -0500 tty: Fix low_latency BUG Signed-off-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Peter Hurley 提交于
When max_count is reached, the rx loop exits. However, UART_LSR has already been read so those char flags are lost, and subsequent rx status will be for the wrong byte until the rx fifo drains. Reported-by: NGeorge Spelvin <linux@horizon.com> Signed-off-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Peter Hurley 提交于
Factor the read/process one char inner loop to a separate helper function serial8250_read_char(). No functional change. Signed-off-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 14 12月, 2015 1 次提交
-
-
由 Masahiro Yamada 提交于
Currently, 8-bit (MMIO) and 32-bit (MMIO32) register interfaces are supported for the 8250 console, but the 16-bit (MMIO16) is not. The 8250 UART device on my board is connected to a 16-bit bus and my main motivation is to use earlycon with it. (Refer to arch/arm/boot/dts/uniphier-support-card.dtsi) Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 05 10月, 2015 6 次提交
-
-
由 Mans Rullgard 提交于
This adds an entry to the uart_config table for PORT_RT2880 enabling rx/tx FIFOs. The UART is actually a Palmchip BK-3103 which is found in several devices from Alchemy/RMI, Ralink, and Sigma Designs. Signed-off-by: NMans Rullgard <mans@mansr.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Peter Hurley 提交于
Move h/w reinit of serial console restore-from-suspend into standalone helper function. No functional change. Signed-off-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 James Hogan 提交于
When the UART clock is set slightly under 1.8432MHz, the 8250 driver core doesn't permit the 115200 baud rate since it calculates the maximum frequency to pass to uart_get_baud_rate by simply dividing the uart clock by 16 which yields a value slightly under 115200, even though the frequency is close enough for the UART to operate reliably. Therefore add some tolerance in the calculation of the maximum baud rate. 1% tolerance allows for marginally slower uart clk than nominal without introducing transmission errors. Signed-off-by: NJames Hogan <james.hogan@imgtec.com> [pjh: Forward-port & refactor original patch; change tolerance to 1%] Signed-off-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Mans Rullgard 提交于
Some SoCs, including Ralink/Mediatek and Alchemy Au1xxx, have a 16550-like UART with a non-standard register layout. These are supported by a simple mapping table in 8250_port.c Rather than list every SoC type using this access mode in the ifdefs there, allow selecting the SERIAL_8250_RT288X Kconfig option with any system and default it to y for the known cases needing it. The help text is reworded accordingly. This change simplifies adding support for other SoCs also using the same UART. The name of the option is a little misleading, but not knowing the true origin of this UART, it is as good a choice as any. Signed-off-by: NMans Rullgard <mans@mansr.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Taichi Kageyama 提交于
The following race conditions can happen when a serial port is used as console. Case1: CPU_B is used to detect an interrupt from a serial port, but it can have interrupts disabled during the waiting time. Case2: CPU_B clears UART_IER just after CPU_A sets UART_IER and then a serial port may not make an interrupt. Case3: CPU_A sets UART_IER just after CPU_B clears UART_IER. This is an unexpected behavior for serial8250_console_write(). CPU_A [autoconfig_irq] | CPU_B [serial8250_console_write] ----------------------------|--------------------------------------- | probe_irq_on() | spin_lock_irqsave(&port->lock,) serial_outp(,UART_IER,0x0f) | serial_out(,UART_IER,0) udelay(20); | uart_console_write() probe_irq_off() | | spin_unlock_irqrestore(&port->lock,) Case1 and 2 can make autoconfig_irq() failed. In these cases, the console doesn't work in interrupt mode and "input overrun" (which can make operation mistakes) can happen on some systems. Especially in the Case1, It is known that the problem happens with high rate every boot once it occurs because the boot sequence is always almost same. port mutex makes sure that the autoconfig operation is exclusive of any other concurrent HW access except by the console operation. console lock is required in autoconfig_irq(). Signed-off-by: NTaichi Kageyama <t-kageyama@cp.jp.nec.com> Cc: Naoya Horiguchi <n-horiguchi@ah.jp.nec.com> Reviewed-by: NPeter Hurley <peter@hurleysoftware.com> Reviewed-by: NThomas Gleixner <tglx@linutronix.de> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Maciej S. Szmigiero 提交于
CIR type serial ports aren't real serial ports. This is just a way to prevent legacy 8250 serial driver from probing and eventually binding some resources. Since in current state such ports aren't providing any real functionality and it is not possible to change their type via setserial/ioctl(TIOCSSERIAL) (due to UPF_FIXED_PORT flag set on them) it is simpler and cleaner to not register them at all with serial core. Print a short message in this case so it is known to user what has happened. This way checks for PORT_8250_CIR in serial port callbacks can be removed too, since they won't ever be called. Signed-off-by: NMaciej Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 23 9月, 2015 1 次提交
-
-
由 Jonathan McDowell 提交于
The split of the 8250 driver into a 8250_base/8250.ko resulted in a lack of a license for the 8250_base.ko module. This caused the module to fail to load and the kernel to be tainted. Add the appropriate MODULE_LICENSE to 8250_port.c, which is always compiled into 8250_base.ko Signed-off-by: NJonathan McDowell <noodles@earth.li> Reported-by: NMikael Pettersson <mikpelinux@gmail.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 24 7月, 2015 3 次提交
-
-
由 Joerg Roedel 提交于
The XR17V35X UART needs the ECB bit set in its XR_EFR register to enable access to IER [7:5], ISR [5:4], FCR[5:4], MCR[7:5], and MSR [7:0]. Also reset the IER register to mask interrupts after access to all bits of this register has been enabled. This makes my 8-port XR17V35X working with the in-kernel serial driver. Cc: Joe Schultz <jschultz@xes-inc.com> Signed-off-by: NJoerg Roedel <jroedel@suse.de> Reviewed-by: NPeter Hurley <peter@hurleysoftware.com> Reviewed-by: NMichael Welling <mwelling@ieee.org> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Peter Hurley 提交于
An already-active sender can swamp the interrupt handler with "too much work" if the rx interrupts are enabled when the fifo is disabled and operating in single-byte mode. Defer rx and line status interrupt enable until after the fifos are enabled in set_termios(), but at least initialize the shadow IER value with the interrupts which will be enabled. Signed-off-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Peter Hurley 提交于
Refactor base port operations into new file; 8250_port.c. Legacy irq handling, RSA port support, port storage for universal driver, driver definition, module parameters and linkage remain in 8250_core.c The source file split and resulting modules is diagrammed below: 8250_core.c ====> 8250_core.c __ \ \ \ +-- 8250.ko (alias 8250_core) \ 8250_pnp.c __/ (universal driver) \ => 8250_port.c __ \ +-- 8250_base.ko 8250_dma.c __/ (port operations) Signed-off-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 01 6月, 2015 1 次提交
-
-
由 Masahiro Yamada 提交于
serial8250_set_mctrl() is a void type function. Returning something does not look nice. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 11 5月, 2015 2 次提交
-
-
由 Masahiro Yamada 提交于
The port.fifosize member has already been copied at 8 lines above. Maybe the compiler optimization can clean it away, but just in case. Signed-off-by: NMasahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Jan Kiszka 提交于
When nr_uarts was set to 0 (via config or 8250_core.nr_uarts), we crash early on x86 because serial8250_isa_init_ports dereferences base_ops which remains NULL. In fact, there is nothing to do for all the callers of serial8250_isa_init_ports if there are no uarts. Based on suggestions by Peter Hurley. Signed-off-by: NJan Kiszka <jan.kiszka@siemens.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 07 5月, 2015 2 次提交
-
-
由 Valentin Rothberg 提交于
Remove CONFIG_SERIAL_DETECT_IRQ and CONFIG_SERIAL_MANY_PORTS, and substitute all references to the proper 8250 Kconfig options. Now, the actual Kconfig dependencies are not hidden when reading the code and static analyzers are less confused. Signed-off-by: NValentin Rothberg <valentinrothberg@gmail.com> Reviewed-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Valentin Rothberg 提交于
This file local CPP identifier is not referenced anywhere else, so we can safely remove it. Signed-off-by: NValentin Rothberg <valentinrothberg@gmail.com> Reviewed-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 15 4月, 2015 1 次提交
-
-
由 Kevin Cernekee 提交于
Add cases for UPIO_MEM32BE wherever there are currently cases handling UPIO_MEM32. Signed-off-by: NKevin Cernekee <cernekee@gmail.com> Reviewed-by: NPeter Hurley <peter@hurleysoftware.com> Acked-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: NRob Herring <robh@kernel.org>
-
- 10 4月, 2015 2 次提交
-
-
由 Peter Hurley 提交于
Document the expected behavior of kernel command lines of the forms: console=uart[8250],io|mmio|mmio32,<addr>[,options] console=uart[8250],<addr>[,options] and earlycon=uart[8250],io|mmio|mmio32,<addr>[,options] earlycon=uart[8250],<addr>[,options] Signed-off-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
由 Peter Hurley 提交于
Restore undocumented behavior of kernel command line parameters of the forms: console=uart[8250],io|mmio|mmio32,<addr>[,options] console=uart[8250],<addr>[,options] where 'options' have not been specified; in this case, the hardware is assumed to be initialized. Fixes: c7cef0a8 ("console: Add extensible console matching") Reported-by: NYinghai Lu <yinghai@kernel.org> Signed-off-by: NPeter Hurley <peter@hurleysoftware.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 27 3月, 2015 1 次提交
-
-
由 Mans Rullgard 提交于
This adds a mapsize field to struct uart_port to be used in conjunction with mapbase. If set, it overrides whatever value serial8250_port_size() would otherwise report. Signed-off-by: NMans Rullgard <mans@mansr.com> Signed-off-by: NGreg Kroah-Hartman <gregkh@linuxfoundation.org>
-