aboutsummaryrefslogtreecommitdiff
path: root/drivers/tty
AgeCommit message (Collapse)AuthorFilesLines
2016-02-06serial: zs: Fix a transmit lockup in console outputMaciej W. Rozycki1-0/+4
Transmit interrupts are disabled and the transmit buffer drained in the course of console output so that polled transmission is possible. That however causes a lost transmit interrupt as the TxIP bit in RR3 is only set on a transmit buffer full-to-empty transition and then iff transmit interrupts are enabled at the same time. Consequently if console output disturbs a regular transmission in progress, the TxIP bit is never set again and the transmission locks up waiting for a transmit interrupt. Fix the problem by restarting transmission manually rather than waiting for a transmit interrupt that will never happen. Signed-off-by: Maciej W. Rozycki <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial: bcm2835: add driver for bcm2835-aux-uartMartin Sperl3-0/+171
The bcm2835 SOC contains an auxiliary uart, which is very close to the ns16550 with some differences. The big difference is that the uart HW is not using an internal divider of 16 but 8, which results in an effictive baud-rate being twice the requested baud-rate. This driver handles this device correctly and handles the difference in the HW divider by scaling up the clock by a factor of 2. The approach to write a separate (wrapper) driver instead of using a multiplying clock and "ns16550" as compatibility in the device-tree has been recommended by Stephen Warren. Signed-off-by: Martin Sperl <[email protected]> Acked-by: Eric Anholt <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial: 8250: of: Enable suspend/resume for 8250_of driverWang Dongsheng1-0/+1
Suspend/resume functions should work for 8250_of driver. Signed-off-by: Wang Dongsheng <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06ARM: OMAP: serial: Rename DRIVER_NAMEJean Delvare1-1/+1
DRIVER_NAME is too generic to be used in a driver-specific platform data file. Use a name specific to the driver instead, to avoid collisions. Signed-off-by: Jean Delvare <[email protected]> Acked-by: Tony Lindgren <[email protected]> Cc: Jiri Slaby <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: Add support for PCIe WCH382 2S multi-IO cardJeremy McNicoll1-0/+21
WCH382 2S board is a PCIe card with 2 DB9 COM ports detected as Serial controller: Device 1c00:3253 (rev 10) (prog-if 05 [16850]) Signed-off-by: Jeremy McNicoll <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial/omap: mark wait_for_xmitr as __maybe_unusedArnd Bergmann1-1/+1
The wait_for_xmitr() function is only used if CONFIG_CONSOLE_POLL or CONFIG_SERIAL_OMAP_CONSOLE are set, but when both are disabled, the compiler warns about it being unused: drivers/tty/serial/omap-serial.c:1168:13: warning: 'wait_for_xmitr' defined but not used [-Wunused-func We could add more #ifdefs to work around it, but adding __maybe_unused seems nicer. Signed-off-by: Arnd Bergmann <[email protected]> Fixes: 2172076d2399 ("serial/omap-serial: Deinline wait_for_xmitr, save 165 bytes") Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial: omap: Prevent DoS using unprivileged ioctl(TIOCSRS485)Peter Hurley1-2/+6
The omap-serial driver emulates RS485 delays using software timers, but neglects to clamp the input values from the unprivileged ioctl(TIOCSRS485). Because the software implementation busy-waits, malicious userspace could stall the cpu for ~49 days. Clamp the input values to < 100ms. Fixes: 4a0ac0f55b18 ("OMAP: add RS485 support") Cc: <[email protected]> # 3.12+ Signed-off-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-068250: uniphier: allow modular build with 8250 consoleArnd Bergmann1-1/+1
The recently added uniphier 8250 port driver supports early console probing, and it supports being built as a module, but the combination of the two fails to link: ERROR: "early_serial8250_setup" [drivers/tty/serial/8250/8250_uniphier.ko] undefined! Given that earlycon support in a loadable module makes no sense, making that code conditional on 'MODULE' is a correct solution. Signed-off-by: Arnd Bergmann <[email protected]> Fixes: b8d20e06eaad ("serial: 8250_uniphier: add earlycon support") Acked-by: Masahiro Yamada <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial-uartlite: fix missing locking in isrRich Felker1-0/+4
The uartlite driver suffers from missing/duplicate/corrupted character data when the interrupt handler runs concurrently with access to the device from another cpu. Take the port spinlock to exclude concurrent access. Signed-off-by: Rich Felker <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial-uartlite: add earlycon supportRich Felker2-0/+42
Microblaze currently uses the old earlyprintk system, rather than the unified earlycon support, to show boot messages on uartlite. Add earlycon support so that other archs using uartlite can benefit from it. The new code in uartlite.c is copied almost verbatim from arch/microblaze/kernel/early_printk.c. Signed-off-by: Rich Felker <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06drivers/tty: make serial 8250_ingenic.c explicitly non-modularPaul Gortmaker1-21/+7
The Kconfig currently controlling compilation of this code is: drivers/tty/serial/8250/Kconfig:config SERIAL_8250_INGENIC drivers/tty/serial/8250/Kconfig: bool "Support for Ingenic SoC serial ports" ...meaning that it currently is not being built as a module by anyone. Lets remove the modular code that is essentially orphaned, so that when reading the driver there is no doubt it is builtin-only. We explicitly disallow a driver unbind, since that doesn't have a sensible use case anyway, and it allows us to drop the ".remove" code for non-modular drivers. Since module_platform_driver() uses the same init level priority as builtin_platform_driver() the init ordering remains unchanged with this commit. Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code. We also delete the MODULE_LICENSE tag etc. since all that information was (or is now) contained at the top of the file in the comments. Cc: Greg Kroah-Hartman <[email protected]> Cc: Jiri Slaby <[email protected]> Cc: Matt Redfearn <[email protected]> Cc: Masahiro Yamada <[email protected]> Cc: Paul Burton <[email protected]> Cc: Peter Hurley <[email protected]> Cc: [email protected] Signed-off-by: Paul Gortmaker <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial: core: remove baud_rates when serial console setupJeffy Chen1-31/+2
Currently, when tring to set up a serial console with a higher baud rate, it would fallback to 921600. Tested-by: Jianqun Xu <[email protected]> Signed-off-by: Jeffy Chen <[email protected]> Reviewed-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial: sh-sci: Add support for SCIFA/SCIFB variable sampling ratesGeert Uytterhoeven1-2/+27
Add support for sparse variable sampling rates on SCIFA and SCIFB. According to the datasheet, sampling rate 1/5 needs a small quirk to avoid corrupting the first byte received. This increases the range and accuracy of supported baud rates. E.g. on r8a7791/koelsch: - Supports now 134, 150, and standard 500000-4000000 bps, - Perfect match for 134, 150, 500000, 1000000, 2000000, and 4000000 bps, - Accuracy has increased for most standard bps values. Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial: sh-sci: Use a bitmask to indicate supported sampling ratesGeert Uytterhoeven1-39/+27
Replace the single sampling rate and special handling for HSCIF's variable sampling rates by a bitmask and a custom iterator. This prepares for the advent of SCIFA/SCIFB's sparse variable sampling rates. Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial: sh-sci: Use premultiplier to handle half sampling rateGeert Uytterhoeven1-6/+10
On SCIx variants different from HSCIF, the bit rate is equal to the sampling clock rate divided by half the sampling rate. Currently this is handled by dividing the sampling rate by two, which was OK as it was always even. Replace halving the sampling rate by premultiplying the base clock frequency by 2, to accommodate odd sampling rates on SCIFA/SCIFB later. Replace the shift value in the BRG divider calculation by a premultiplication of the base clock frequency too, for consistency. Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial: sh-sci: Preserve SCIFA/SCIFB bit rate config for serial consoleGeert Uytterhoeven1-1/+2
SCIFA and SCIFB have additional bit rate config bits in the Serial Mode Register. Don't touch them when using the port as a serial console, as we rely on the boot loader to have configured the serial port config. Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial: sh-sci: Add more Serial Mode Register documentationGeert Uytterhoeven2-1/+16
Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial: imx: Fix suspend / resume.Martin Fuzzey1-1/+4
When a non console i.MX UART is enabled in the device tree, system suspend fails due to an unprepared clock: [ 638.794563] PM: Syncing filesystems ... done. [ 638.878902] Freezing user space processes ... (elapsed 0.002 seconds) done. [ 638.888454] Freezing remaining freezable tasks ... (elapsed 0.001 seconds) done. [ 638.996697] PM: suspend of devices complete after 97.200 msecs [ 639.002611] PM: suspend devices took 0.100 seconds [ 639.013020] PM: late suspend of devices complete after 2.288 msecs [ 639.021486] ------------[ cut here ]------------ [ 639.026147] WARNING: CPU: 0 PID: 488 at drivers/clk/clk.c:732 clk_core_enable+0xc0/0x12c() [ 639.034413] Modules linked in: [ 639.037490] CPU: 0 PID: 488 Comm: system_server Tainted: G W 4.4.0-rc5-pknbsp-svn2214-atag-v4.4-rc5-121-gebfd9cb #1304 [ 639.049312] Hardware name: Freescale i.MX53 (Device Tree Support) [ 639.055444] [<c0016d54>] (unwind_backtrace) from [<c00140f8>] (show_stack+0x20/0x24) [ 639.063199] [<c00140f8>] (show_stack) from [<c02c99a0>] (dump_stack+0x20/0x28) [ 639.070442] [<c02c99a0>] (dump_stack) from [<c0024ca8>] (warn_slowpath_common+0x88/0xc0) [ 639.078541] [<c0024ca8>] (warn_slowpath_common) from [<c0024d0c>] (warn_slowpath_null+0x2c/0x34) [ 639.087332] [<c0024d0c>] (warn_slowpath_null) from [<c05171e8>] (clk_core_enable+0xc0/0x12c) [ 639.095777] [<c05171e8>] (clk_core_enable) from [<c05172f8>] (clk_enable+0x2c/0x40) [ 639.103441] [<c05172f8>] (clk_enable) from [<c0349880>] (imx_serial_port_suspend_noirq+0x20/0xe0) [ 639.112336] [<c0349880>] (imx_serial_port_suspend_noirq) from [<c03a26a0>] (dpm_run_callback+0x68/0x16c) [ 639.121825] [<c03a26a0>] (dpm_run_callback) from [<c03a2898>] (__device_suspend_noirq+0xf4/0x22c) [ 639.130705] [<c03a2898>] (__device_suspend_noirq) from [<c03a4b0c>] (dpm_suspend_noirq+0x148/0x30c) [ 639.139764] [<c03a4b0c>] (dpm_suspend_noirq) from [<c00511d4>] (suspend_devices_and_enter+0x2e8/0x6a4) [ 639.149078] [<c00511d4>] (suspend_devices_and_enter) from [<c00518a0>] (pm_suspend+0x310/0x4b8) [ 639.157782] [<c00518a0>] (pm_suspend) from [<c00500ec>] (state_store+0x7c/0xcc) [ 639.165099] [<c00500ec>] (state_store) from [<c02cb6dc>] (kobj_attr_store+0x1c/0x28) [ 639.172858] [<c02cb6dc>] (kobj_attr_store) from [<c01633d4>] (sysfs_kf_write+0x54/0x58) [ 639.180871] [<c01633d4>] (sysfs_kf_write) from [<c01629b4>] (kernfs_fop_write+0x100/0x1c8) [ 639.189152] [<c01629b4>] (kernfs_fop_write) from [<c00fb8b8>] (__vfs_write+0x3c/0xe8) [ 639.196991] [<c00fb8b8>] (__vfs_write) from [<c00fc810>] (vfs_write+0xa4/0x160) [ 639.204307] [<c00fc810>] (vfs_write) from [<c00fcac4>] (SyS_write+0x4c/0x98) [ 639.211363] [<c00fcac4>] (SyS_write) from [<c0010760>] (ret_fast_syscall+0x0/0x3c) This does not happen for the common case of a single UART used as a console (since imx_console_setup() already does a prepare) Signed-off-by: Martin Fuzzey <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: xuartps: Consolidate TX handlingSoren Brinkmann1-57/+40
start_tx and the ISR used largely identical code to transmit data. Consolidate that in one place. Signed-off-by: Soren Brinkmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: xuartps: Remove '_OFFSET' suffix from #definesSoren Brinkmann1-115/+106
Remove the _OFFSET suffix from all register defines which makes code a little easier to read and avoids a few line breaks. Suggested-by: Peter Hurley <[email protected]> Signed-off-by: Soren Brinkmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: xuartps: Improve sysrq handlingSoren Brinkmann1-15/+5
Handling magic sysrq included dropping a lock to avoid a deadlock that happened when cdns_uart_console_write tried to acquire a lock in the from the sysrq code path. By making the acquisition of the lock in cdns_uart_console_write depending on port->sysrq, cdns_uart_handle_rx can be simplified to simply call uart_handle_sysrq. Suggested-by: Peter Hurley <[email protected]> Signed-off-by: Soren Brinkmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: xuartps: Cleanup: Reformat if-elseSoren Brinkmann1-62/+62
Convert an if-else into the more common early return on error, reducing the indent level of the happy path. Signed-off-by: Soren Brinkmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: xuartps: Refactor IRQ handlingSoren Brinkmann1-6/+11
The system could deadlock handling RX IRQs when RX-related IRQ conditions became true while the receiver was disabled. To avoid this, enable/disable the RX/TX IRQs together with the receiver/transmitter. Signed-off-by: Soren Brinkmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: xuartps: Move request_irq to after setting up the HWSoren Brinkmann1-9/+12
Request_irq() should be _after_ h/w programming, otherwise an interrupt could be triggered and in-progress before the h/w has been setup. Reported-by: Peter Hurley <[email protected]> Signed-off-by: Soren Brinkmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: xuartps: Move RX path into helper functionSoren Brinkmann1-22/+28
Move RX-related IRQ handling into a helper function. Fixes a problem where every char received after a parity or frame error in the current isr will also be tagged as a parity or frame error. Signed-off-by: Soren Brinkmann <[email protected]> Reviewed-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: xuartps: Acquire port lock for shutdownSoren Brinkmann1-0/+6
Shutting down the UART port can happen while console operations are in progress. Holding the port lock serializes these operations and avoids the UART HW to be disabled in the middle of console prints. Signed-off-by: Soren Brinkmann <[email protected]> Reviewed-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: xuartps: Keep lock for whole ISRSoren Brinkmann1-2/+0
The RX path in the interrupt handler released a lock unnecessarily. Signed-off-by: Soren Brinkmann <[email protected]> Reviewed-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: xuartps: Improve startup functionSoren Brinkmann1-8/+12
The startup function is supposed to initialize the UART for receiving. Hence, don't enable the TX part. Also, protect HW accesses with the port lock. Signed-off-by: Soren Brinkmann <[email protected]> Reviewed-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: xuartps: Clear interrupt status register in shutdownSoren Brinkmann1-0/+1
When shutting down the UART, clear the interrupt status register. Bits in the ISR are cleared by writing them as '1'. Signed-off-by: Soren Brinkmann <[email protected]> Reviewed-by: Peter Hurley <[email protected]> Reviewed-by: Moritz Fischer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: xuartps: Don't consider circular buffer when enabling transmitterSoren Brinkmann1-1/+4
Restarting the transmitter even if the circ buffer is empty may be necessary to push out remaining data when the port is restarted after being stopped. Cc: Peter Hurley <[email protected]> Signed-off-by: Soren Brinkmann <[email protected]> Reviewed-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: xuartps: Use spinlock to serialize HW accessSoren Brinkmann1-12/+6
Instead of disabling the IRQ, use the spin lock to serialize accesses to the HW. This protects the driver from interference of non-IRQ callbacks with each other and makes the driver more consistent in its serialization method. Signed-off-by: Soren Brinkmann <[email protected]> Reviewed-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: xuartps: Beautify read-modify writesSoren Brinkmann1-6/+9
Non-functional, formatting changes to ease reading the code. Signed-off-by: Soren Brinkmann <[email protected]> Reviewed-by: Peter Hurley <[email protected]> Reviewed-by: Moritz Fischer <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial: sh-sci: Add CONFIG_SERIAL_EARLYCON supportYoshinori Sato2-5/+78
"earlyprintk" is architecture specific option. General "earlycon" option support is much better. Signed-off-by: Yoshinori Sato <[email protected]> [uli: preserve other SCSCR bits when asserting RE and TE] Signed-off-by: Ulrich Hecht <[email protected]> [geert: rewording, #ifdef rework] Signed-off-by: Geert Uytterhoeven <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial/8250_pci: simplify Pericom handlingJan Beulich1-33/+0
Considering that pci_pericom_setup(()'s only difference to pci_default_setup() is the setting of the uartclk field, and taking into account that this field already gets taken care of by having the base_baud field filled in the pci_boards[] entries, there's no need for both the function and the quirks table entry. Signed-off-by: Jan Beulich <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial: 8250_pci: use to_pci_dev()Geliang Tang1-2/+1
Use to_pci_dev() instead of open-coding it. Signed-off-by: Geliang Tang <[email protected]> Reviewed-by: Andy Shevchenko <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial: amba-pl011: mark vendor_zte as __maybe_unusedArnd Bergmann1-1/+1
The pl011 driver has gone back and forth on the definition of the ZTE specific variation of the hardware definitions, but the current state is that the vendor definition is left in place yet unused: drivers/tty/serial/amba-pl011.c:190:27: warning: 'vendor_zte' defined but not used [-Wunused-variable] I don't know what the plan forward is to get this code to work, but the current behavior is a bit annoying as we get a warning whenever we build this driver. This patch does not help us to make it work, but at least shuts up the warning. Signed-off-by: Arnd Bergmann <[email protected]> Fixes: 7ec758718920 ("tty: amba-pl011: add support for ZTE UART (EXPERIMENTAL)") Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial: amba-pl011: use cpu_relax when polling registersTimur Tabi1-9/+8
Busy loops that poll on a register should call cpu_relax(). On some architectures, it can lower CPU power consumption or yield to a hyperthreaded twin processor. It also serves as a compiler barrier, so it can replace barrier() calls. Signed-off-by: Timur Tabi <[email protected]> Reviewed-by: Dave Martin <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06sc16is7xx: fix incorrect register bits macroWills Wang1-6/+6
In datasheet, Modem Status Register MSR[4-7] reflect the modem pins CTS/DSR/RI/CD signal state. Signed-off-by: Wills Wang <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial: atmel: Use atmel_port consistentlyJaeden Amero1-47/+48
In all functions other than atmel_serial_probe_fifos, atmel_serial_probe, and atmel_console_init, the name "port" is used to refer to an instance of struct uart_port. In many of these functions, "atmel_port" is used to refer to an instance of struct atmel_uart_port. We make the use of the name "port" consistent by making atmel_serial_probe_fifos, atmel_serial_probe, and atmel_console_init use "atmel_port" to refer to an instance of struct atmel_uart_port instead of the previous name of "port". Signed-off-by: Jaeden Amero <[email protected]> Signed-off-by: Kyle Roeschley <[email protected]> Acked-by: Karthik Manamcheri <[email protected]> [[email protected]: fix typo in variable, adapt to newer kernel] Signed-off-by: Nicolas Ferre <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial: atmel: add support for new UART versionNicolas Ferre1-3/+4
Starting with sama5d2, the new UART revision has an hardware timer. So, add it to the IP detection code and set the "has_hw_timer" property for it. Signed-off-by: Nicolas Ferre <[email protected]> Reported-by: David Mosberger <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial: atmel: trivial: clean the IP version decoding codeNicolas Ferre1-16/+16
No functional change is associated with this patch. A driver property depends on the Atmel serial IP revision. This property is the way the rx timeout is handled: by an hardware or software timer. So, change this property name and setup code so that it's easier to understand and more future proof as the distinction of USART vs. UART is blurrier on newer SoCs. Variable names and debug comments are also adapted to make this code more obvious. Signed-off-by: Nicolas Ferre <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-068250: use callbacks to access UART_DLL/UART_DLMSebastian Frias1-12/+6
Some UART HW has a single register combining UART_DLL/UART_DLM (this was probably forgotten in the change that introduced the callbacks, commit b32b19b8ffc05cbd3bf91c65e205f6a912ca15d9) Fixes: b32b19b8ffc0 ("[SERIAL] 8250: set divisor register correctly ...") Signed-off-by: Sebastian Frias <[email protected]> Reviewed-by: Peter Hurley <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial: Remove 68328 driverFrederik Völkel3-1321/+0
It's old, messy and mostly unmaintained. Remove it as suggested by Peter Hurley and Alan. Signed-off-by: Frederik Völkel <[email protected]> Signed-off-by: Lukas Braun <[email protected]> Reviewed-by: Peter Hurley <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: serial: constify psc_ops structsAya Mahfouz1-4/+4
Constifies psc_ops structures in tty's serial port driver since they are not modified after their initialization. Detected and found using Coccinelle. Suggested-by: Julia Lawall <[email protected]> Signed-off-by: Aya Mahfouz <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial: 8250_dw: Do not use readl/writel before checking port iotypeNoam Camus1-2/+10
Direct call to readl()/writel() is checked against iotype and in case of UPIO_MEM32BE we use ioread32be()/iowrite32be() instead of them. Signed-off-by: Noam Camus <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial: 8250_dw: Add support for big-endian MMIO accessesNoam Camus1-0/+23
Add support for UPIO_MEM32BE in addition to UPIO_MEM32. For big endian we use 2 new accessors similar to little endian, called dw8250_serial_out32be() and dw8250_serial_in32be(). Signed-off-by: Noam Camus <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06serial: 8250_dw: Avoid serial_outx code duplicate with new dw8250_check_lcr()Noam Camus1-49/+42
With the help of Heikki we take common code that makes sure LCR write wasn't ignored and put it in new function called dw8250_check_lcr(). This function serves 3 serial_out routines: dw8250_serial_out(), dw8250_serial_out32(), and dw8250_serial_outq(). This patch only brings better code reuse. Signed-off-by: Noam Camus <[email protected]> Cc: Heikki Krogerus <[email protected]> Cc: Andy Shevchenko <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: 8250_omap: Use software emulated RS485 direction controlMatwey V. Kornilov1-0/+31
Use software emulated RS485 direction control to provide RS485 API existed in omap_serial driver. Note that 8250_omap issues interrupt on shift register empty which is single prerequesite for using software emulated RS485. Signed-off-by: Matwey V. Kornilov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: Add software emulated RS485 support for 8250Matwey V. Kornilov2-4/+221
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: Matwey V. Kornilov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-02-06tty: Move serial8250_stop_rx() in front of serial8250_start_tx()Matwey V. Kornilov1-13/+13
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: Matwey V. Kornilov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>