summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250/Kconfig
Commit message (Collapse)AuthorAgeFilesLines
* tty/serial/8250: use mctrl_gpio helpersYegor Yefremov2019-06-211-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | This patch permits the usage for GPIOs to control the CTS/RTS/DTR/DSR/DCD/RI signals. Changed by Stefan: Only call mctrl_gpio_init(), if the device has no ACPI companion device to not break existing ACPI based systems. Also only use the mctrl_gpio_ functions when "gpios" is available. Use MSR / MCR <-> TIOCM wrapper functions. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Mika Westerberg <mika.westerberg@linux.intel.com> Tested-by: Yegor Yefremov <yegorslists@googlemail.com> Cc: Mika Westerberg <mika.westerberg@linux.intel.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Giulio Benetti <giulio.benetti@micronovasrl.com> Cc: Yegor Yefremov <yegorslists@googlemail.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: add SPDX identifiers to Kconfig and MakefilesGreg Kroah-Hartman2019-04-041-0/+1
| | | | | | | | | | | | | There were a few Kconfig and Makefiles under drivers/tty/ that were missing a SPDX identifier. Fix that up so that automated tools can properly classify all kernel source files. Cc: Jiri Slaby <jslaby@suse.com> Cc: Jiri Kosina <jikos@kernel.org> Cc: Rob Herring <robh@kernel.org> Acked-by: David Sterba <dsterba@suse.com> Reviewed-by: Mukesh Ojha <mojha@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250_omap: Make 8250_omap driver driver depend on ARCH_K3Lokesh Vutla2018-09-181-1/+1
| | | | | | | | | | Allow 8250 omap serial driver to be used for K3 platforms. Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com> Signed-off-by: Nishanth Menon <nm@ti.com> Acked-by: Tony Lindgren <tony@atomide.com> Acked-by: Vignesh R <vigneshr@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* 8250-men-mcb: add support for 16z025 and 16z057Michael Moese2018-03-151-2/+3
| | | | | | | | | | | | | Add support for two MEN UARTs (16z025 and 16z057) to the 8250_men_mcb driver. The 16z025 consists of up to four ports, the 16z057 has exactly four ports. Apart from that, all of them share the Port settings. Signed-off-by: Michael Moese <mmoese@suse.de> Reported-by: Ben Turner <ben.turner@21net.com> Tested-by: Ben Turner <ben.turner@21net.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: forbid 8250 on s390Christian Borntraeger2017-12-151-0/+1
| | | | | | | | | | | | | Using "make kvmconfig" results in a potentially unusable linux image on s390. The reason is that both the (default on s390) sclp consoles as well as the 8250 console register a ttyS<x> as console. Since there will be no 8250 on s390 let's fence 8250. This will ensure that there is always a working sclp console. Reported-by: Alice Frosi <alice@linux.vnet.ibm.com> Signed-off-by: Christian Borntraeger <borntraeger@de.ibm.com> Reviewed-by: Hendrik Brueckner <brueckner@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Introduce 8250_men_mcbMichael Moese2017-08-281-0/+11
| | | | | | | | | | | | | | | This patch introduces the 8250_men_mcb driver for the MEN 16Z125 IP-Core. This is a 16550-type UART with a 60 byte FIFO. Due to strange old hardware, every board using this IP core requires different values for uartclk. A reasonable default is included in addition to the support of three boards. Additional values for other boards will be added later. This v2 has some whitespace fixes, I screwed this up yesterday. Signed-off-by: Michael Moese <michael.moese@men.de> Reviewed-by: Johannes Thumshirn <jthumshirn@suse.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers/serial: Add driver for Aspeed virtual UARTJeremy Kerr2017-05-181-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This change adds a driver for the 16550-based Aspeed virtual UART device. We use a similar process to the of_serial driver for device probe, but expose some VUART-specific functions through sysfs too. The VUART is two UART 'front ends' connected by their FIFO (no actual serial line in between). One is on the BMC side (management controller) and one is on the host CPU side. This driver is for the BMC side. The sysfs files allow the BMC userspace, which owns the system configuration policy, to specify at what IO port and interrupt number the host side will appear to the host on the Host <-> BMC LPC bus. It could be different on a different system (though most of them use 3f8/4). OpenPOWER host firmware doesn't like it when the host-side of the VUART's FIFO is not drained. This driver only disables host TX discard mode when the port is in use. We set the VUART enabled bit when we bind to the device, and clear it on unbind. We don't want to do this on open/release, as the host may be using this bit to configure serial output modes, which is independent of whether the devices has been opened by BMC userspace. Signed-off-by: Jeremy Kerr <jk@ozlabs.org> Signed-off-by: Joel Stanley <joel@jms.id.au> Acked-by: Rob Herring <robh@kernel.org> Reviewed-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250_EXAR: fix duplicate Kconfig text and add missing help textPaul Gortmaker2017-03-311-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | In commit d0aeaa83f0b0f7a92615bbdd6b1f96812f7dcfd2 ("serial: exar: split out the exar code from 8250_pci") the exar driver got its own Kconfig. However the text for the new option was never changed from the original 8250_PCI text, and hence it appears confusing when you get asked the same question twice: 8250/16550 PCI device support (SERIAL_8250_PCI) [Y/n/m/?] (NEW) 8250/16550 PCI device support (SERIAL_8250_EXAR) [Y/n/m] (NEW) Adding to the confusion, is that there is no help text for this new option to indicate it is specific to a certain family of cards. Fix both issues at the same time, as well as the space vs. tab issues introduced in the same commit. Fixes: d0aeaa83f0b0 ("serial: exar: split out the exar code from 8250_pci") Cc: Jiri Slaby <jslaby@suse.com> Cc: linux-serial@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Sudip Mukherjee <sudipm.mukherjee@gmail.com> Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250_pci: remove exar codeSudip Mukherjee2017-02-031-0/+1
| | | | | | | | | Remove the Exar specific codes from 8250_pci and blacklist those chips so that the new Exar serial driver binds to the devices. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: exar: split out the exar code from 8250_pciSudip Mukherjee2017-02-031-0/+4
| | | | | | | | | Add the serial driver for the Exar chips. And also register the platform device for the GPIO provided by the Exar chips. Reviewed-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Sudip Mukherjee <sudip.mukherjee@codethink.co.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250_mid: make option visibleJean Delvare2017-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Hiding tristate options with "if EXPERT" is usually not a good idea. You can decide that the driver should be included by default, but you don't know if the user wants it built-in or as a module. Hiding the option prevents the user from making that decision. This is even more problematic when said option selects other options. You end up with several device drivers forcibly built into the kernel. In this specific case, drivers 8250_mid, virt-dma, hsu_dma and hsu_dma_pci end up being built-in as soon as SERIAL_8250=y. It is very common for distribution kernels to build the subsystem core code into the kernel, because almost everybody will need it, but build all the device drivers as modules. This should be made possible. So drop the "if EXPERT" and make SERIAL_8250_MID visible. Signed-off-by: Jean Delvare <jdelvare@suse.de> Fixes: 1fc969c75986 ("serial: 8250_mid: make module available only on X86") Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Jiri Slaby <jslaby@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250_lpss: make option visibleJean Delvare2017-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | Hiding tristate options with "if EXPERT" is usually not a good idea. You can decide that the driver should be included by default, but you don't know if the user wants it built-in or as a module. Hiding the option prevents the user from making that decision. This is even more problematic when said option selects other options. You end up with several device drivers forcibly built into the kernel. In this specific case, drivers 8250_lpss, dw_dmac_core and dw_dmac_pci end up being built-in as soon as SERIAL_8250=y. It is very common for distribution kernels to build the subsystem core code into the kernel, because almost everybody will need it, but build all the device drivers as modules. This should be made possible. So drop the "if EXPERT" and make SERIAL_8250_LPSS visible. Signed-off-by: Jean Delvare <jdelvare@suse.de> Fixes: a13e19cf3dc1 ("serial: 8250_lpss: split LPSS driver to separate module") Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Jiri Slaby <jslaby@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250_pci: make option visibleJean Delvare2017-01-121-1/+1
| | | | | | | | | | | | | | | | | | | | Hiding tristate options with "if EXPERT" is usually not a good idea. You can decide that the driver should be included by default, but you don't know if the user wants it built-in or as a module. Hiding the option prevents the user from making that decision. In this specific case, driver 8250_pci ends up being built-in as soon as SERIAL_8250=y. It is very common for distribution kernels to build the subsystem core code into the kernel, because almost everybody will need it, but build all the device drivers as modules. This should be made possible. So drop the "if EXPERT" and make SERIAL_8250_PCI visible. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: Jiri Slaby <jslaby@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: rewrite pxa2xx-uart to use 8250_coreSergey Yanovich2016-10-271-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | pxa2xx-uart was a separate uart platform driver. It was declaring the same device names and numbers as 8250 driver. As a result, it was impossible to use 8250 driver on PXA SoCs. Upon closer examination pxa2xx-uart turned out to be a clone of 8250_core driver. Workaround for Erratum #19 according to Marvel(R) PXA270M Processor Specification Update (April 19, 2010) is dropped. 8250_core reads from FIFO immediately after checking DR bit in LSR. The patch leaves the original SERIAL_PXA driver around. The original driver is just marked DEPRECATED in Kconfig and C source. When the original driver is considered safe to remove, no changes to SERIAL_8250 will be necessary. Compiling SERIAL_8250_CONSOLE and SERIAL_PXA_CONSOLE even without SERIAL_8250_PXA breaks console for SERIAL_PXA. For this reasons, the new and the original drivers are made mutually exclusive. Signed-off-by: Sergei Ianovich <ynvich@gmail.com> CC: Heikki Krogerus <heikki.krogerus@linux.intel.com> CC: James Cameron <quozl@laptop.org> CC: Robert Jarzmik <robert.jarzmik@free.fr> CC: Russell King <linux@arm.linux.org.uk> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> [rebased on v4.8] Tested-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Robert Jarzmik <robert.jarzmik@free.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge 4.8-rc5 into tty-nextGreg Kroah-Hartman2016-09-051-1/+0Star
|\ | | | | | | | | | | We want the fixes in here for merge issues. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Revert "tty/serial/8250: use mctrl_gpio helpers"Andy Shevchenko2016-08-311-1/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Serial console is broken in v4.8-rcX. Mika and I independently bisected down to commit 4ef03d328769 ("tty/serial/8250: use mctrl_gpio helpers"). Since neither author nor anyone else didn't propose a solution we better revert it for now. This reverts commit 4ef03d328769eddbfeca1f1c958fdb181a69c341. Link: https://lkml.kernel.org/r/20160809130229.GN1729@lahna.fi.intel.com Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Tested-by: Mika Westerberg <mika.westerberg@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | serial: 8250_lpss: move Quark code from PCI driverAndy Shevchenko2016-08-311-0/+1
| | | | | | | | | | | | | | | | | | Intel Quark has DesignWare UART. Move the code from 8250_pci to 8250_lpss. Reviewed-by: Bryan O'Donoghue <pure.logic@nexus-software.ie> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Bryan O'Donoghue <pure.logic@nexus-software.ie> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | serial: 8250_lpss: split LPSS driver to separate moduleAndy Shevchenko2016-08-311-1/+14
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The SoCs, such as Intel Braswell, have DesignWare UART IP. Split out the support of such chips to a separate module which also will be used for Intel Quark later. The rationale to have the separate driver to be existing: - Do not contaminate 8250_pci.c anymore with LPSS related quirks - All of them are using same DMA engine and they are Designware IP which means that in the future we might share the code between 8250_dw.c and 8250_lpss.c - It reduces the kernel memory footprint on non-X86 machines where 8250_pci.c is in use Besides the split the driver also has been refactored, in particular a) the DMA and port setup are separate functions, b) the two new structures lpss8250 and lpss8250_board are introduced to keep necessary data instead of pciserial_board, c) DMA parameters are passed to the DMA setup via mentioned custom structure. Most of the changes are done due to the future support of UART DMA on Intel Quark. The Intel Quark UART DMA support is based on bits taking from BSP code published by Intel earlier. The driver does not use any specific power management. PCI core takes care of the default behaviour during suspend and resume. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Tested-by: Bryan O'Donoghue <pure.logic@nexus-software.ie> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250_ingenic: drop #if conditional surrounding earlycon codeMasahiro Yamada2016-06-251-1/+1
| | | | | | | | | | | | | The #if defined(CONFIG_SERIAL_EARLYCON) && !defined(MODULE) conditional has been added to the OF_EARLYCON_DECLARE() define. The same conditional can be dropped from 8250_ingenic.c because the unused symbols will be marked as __maybe_unsed. Also, the Kconfig dependency can become much simpler. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty/serial/8250: use mctrl_gpio helpersYegor Yefremov2016-06-251-0/+1
| | | | | | | | This patch permits the usage for GPIOs to control the CTS/RTS/DTR/DSR/DCD/RI signals. Signed-off-by: Yegor Yefremov <yegorslists@googlemail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250_uniphier: add COMPILE_TEST optionMasahiro Yamada2016-06-251-1/+2
| | | | | | | Add COMPILE_TEST for the compilation test coverage. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250: Integrate Fintek into 8250_baseRicardo Ribalda Delgado2016-04-301-8/+12
| | | | | | | | | | | | | | | | | | | | | The 8250_fintek driver advertises as the PNP0501 driver; however this conflicts with the standard 16550A uart PNP0501. The conflict causes the 8250_fintek driver to load with _every_ PNP0501, but never probe, and causing the entire 8250 driver stack to unload if the 8250_fintek driver is unloaded (modprobe doesn't know that 8250_pnp rather than 8250_fintek claimed the resource). This patch merges the Fintek driver into 8250_base. On autoconfig_16550 the device is probed to verify if it is a FINTEK device or not. This custom probing can be disabled completely via configuration. When a Fintek device is not probed it will behave as a standard 16550A device, with no RS485 capabilities. Reported-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Reviewed-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250_mid: make module available only on X86Andy Shevchenko2016-04-301-1/+3
| | | | | | | | | | | | There is no reason to compile module on non-X86 platforms, though COMPILE_TEST is provided for sake of what it does. While here, set default to SERIAL_8250 that user doesn't need an explicit option to be set and hide it from non-expert. Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Revert "serial: 8250: Add hardware dependency to RT288X option"Greg Kroah-Hartman2016-04-191-1/+0Star
| | | | | | | | | | | | | | | | This reverts commit 8d2acdb9fc3a544ab0442634531834d6007b5467. It's causing problems, and somehow I missed that Peter didn't like it at all :( So revert it for now until it gets sorted out. Reported-by: Mason <slash.tmp@free.fr> Cc: Peter Hurley <peter@hurleysoftware.com> Cc: Jean Delvare <jdelvare@suse.de> Cc: Mans Rullgard <mans@mansr.com> Cc: Jiri Slaby <jslaby@suse.com> Cc: John Crispin <blogic@openwrt.org> Signed-off-by: Greg Kroah-Hartman gregkh@linuxfoundation.org
* serial: 8250: describe CONFIG_SERIAL_8250_RSAMaciej S. Szmigiero2016-03-081-1/+6
| | | | | | | | | CONFIG_SERIAL_8250_RSA has waited for a long time to have meaningful help text so let's finally describe what this option actually does. Signed-off-by: Maciej S. Szmigiero <mail@maciej.szmigiero.name> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: serial: 8250: add MOXA Smartio MUE boards supportMathieu OTHACEHE2016-03-081-0/+10
| | | | | | | | | | | | | | | | | | | | | | | | | | Add support for : - CP-102E: 2 ports RS232 PCIE card - CP-102EL: 2 ports RS232 PCIE card - CP-132EL: 2 ports RS422/485 PCIE card - CP-114EL: 4 ports RS232/422/485 PCIE card - CP-104EL-A: 4 ports RS232 PCIE card - CP-168EL-A: 8 ports RS232 PCIE card - CP-118EL-A: 8 ports RS232/422/485 PCIE card - CP-118E-A: 8 ports RS422/485 PCIE card - CP-138E-A: 8 ports RS422/485 PCIE card - CP-134EL-A: 4 ports RS422/485 PCIE card - CP-116E-A (A): 8 ports RS232/422/485 PCIE card - CP-116E-A (B): 8 ports RS232/422/485 PCIE card This patch is based on information extracted from vendor mxupcie driver available on MOXA website. I was able to test it on a CP-168EL-A on PC. Signed-off-by: Mathieu OTHACEHE <m.othacehe@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250/mediatek: fix building with SERIAL_8250=mArnd Bergmann2016-03-081-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | The Mediatek 8250 driver has a 'bool' Kconfig symbol, but that breaks when SERIAL_8250 is a loadable module: drivers/tty/built-in.o: In function `mtk8250_set_termios': :(.text+0x1bee8): undefined reference to `serial8250_do_set_termios' :(.text+0x1bf10): undefined reference to `uart_get_baud_rate' :(.text+0x1c09c): undefined reference to `uart_get_divisor' drivers/tty/built-in.o: In function `mtk8250_do_pm': :(.text+0x1c0d0): undefined reference to `serial8250_do_pm' drivers/tty/built-in.o: In function `mtk8250_probe': :(.text+0x1c2e4): undefined reference to `serial8250_register_8250_port' serial/8250/8250_mtk.c:287:242: error: data definition has no type or storage class [-Werror] serial/8250/8250_mtk.c:287:122: error: 'mtk8250_platform_driver_init' defined but not used [-Werror=unused-function] This changes the symbol to a 'tristate', so the dependency on SERIAL_8250 also works when that is set to 'm'. To actually build the driver, we also need to include <linux/module.h>. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250/ingenic: fix building with SERIAL_8250=mArnd Bergmann2016-03-081-3/+4
| | | | | | | | | | | | | | | | | | The Ingenic 8250 driver has a 'bool' Kconfig symbol, but that breaks when SERIAL_8250 is a loadable module: drivers/tty/built-in.o: In function `ingenic_uart_probe': 8250_ingenic.c:(.text+0x1c1a0): undefined reference to `serial8250_register_8250_port' This changes the symbol to a 'tristate', plus a dependency on SERIAL_8250, which makes it work again. Unlike the other soc-specific backends, this one has no dependency on an architecture or a platform. I'm adding a dependency on MIPS || COMPILE_TEST as well here, to avoid showing the driver on architectures that are not interested in it. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250: Add hardware dependency to RT288X optionJean Delvare2016-03-081-0/+1
| | | | | | | | | | | | Kconfig option SERIAL_8250_RT288X seems to be only relevant on MIPS platforms, so do not present it on other architectures, unless build-testing. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Mans Rullgard <mans@mansr.com> Cc: Jiri Slaby <jslaby@suse.com> Acked-by: John Crispin <blogic@openwrt.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: bcm2835: add driver for bcm2835-aux-uartMartin Sperl2016-02-071-0/+24
| | | | | | | | | | | | | | | | | | | | 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 <kernel@martin.sperl.org> Acked-by: Eric Anholt <eric@anholt.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250_mid: fix broken DMA dependencyHeikki Krogerus2015-12-141-1/+1
| | | | | | | | | In order to enable HSU DMA PCI driver, the HSU DMA Engine must be enabled. This add a check for that. Reported-by: kbuild test robot <fengguang.wu@intel.com> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250: move of_serial code to 8250 directoryArnd Bergmann2015-12-141-0/+9
| | | | | | | | | | | | As the of-serial driver is now 8250 specific, we can move the file to a more appropriate place in teh 8250 subdirectory and adapt the Kconfig help text and file name. I'm leaving the CONFIG_SERIAL_OF_PLATFORM symbol unchanged to avoid breaking user configuration files unnecessarily. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250_ingenic: allow to be independent of SERIAL_8250_CONSOLEMasahiro Yamada2015-12-141-1/+1
| | | | | | | | | | | | This UART driver should not depend on the console. They should be orthogonal. Surround the earlycon code with CONFIG_SERIAL_EARLYCON conditional and rip off "depends on SERIAL_8250_CONSOLE". Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250_ingenic: delete redundant "select SERIAL_EARLYCON"Masahiro Yamada2015-12-141-1/+0Star
| | | | | | | | | | | SERIAL_8250_INGENIC depends on SERIAL_8250_CONSOLE, which already selects SERIAL_EARLYCON. This line is redundant. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250_mid: Add missing dependencyHeikki Krogerus2015-11-211-0/+1
| | | | | | | | | | | | | | | | 8250_mid uses rational_best_approximation() function, so the driver needs to select CONFIG_RATIONAL option. This fixes build error when CONFIG_RATIONAL is not enabled: drivers/built-in.o: In function `mid8250_set_termios': 8250_mid.c:(.text+0x10169a): undefined reference to `rational_best_approximation' Reported-by: Randy Dunlap <rdunlap@infradead.org> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Andy Shevchenko <andy.shevchenko@gmail.com> Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* dmaengine: hsu: make the UART driver in control of selecting this driverHeikki Krogerus2015-10-181-0/+2
| | | | | | | | | | | | | | | HSU (High Speed UART) DMA engine, like the name suggests, is an integrated DMA engine for UART and UART alone. Therefore, making the UART drivers responsible of selecting it and removing the user selectable option for it. The UARTs with this DMA engine can always select HSU_DMA when SERIAL_8250_DMA option is enabled. Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Vinod Koul <vinod.koul@intel.com> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250_pci: Intel MID UART support to its own driverHeikki Krogerus2015-10-181-0/+8
| | | | | | | | | | | | | | | | | | | Intel MID UART quirks require already quite a bit of code in 8250_pci.c. On new Intel platforms where it is used, the integrated DMA engine no longer has its own PCI device, but is instead configured from the UART's MMIO. That means we will have to add even more code for handling just MID UARTs. Instead of adding that to 8250_pci.c, splitting the support of Intel MID UART into its own driver. Handling of the integrated DMA engine becomes much simpler this way. Own driver will also remove the need for things like specific set_termios hooks for every board using this UART, and simplify the handling of it in general. Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Acked-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: Enable Freescale 16550 workaround on armScott Wood2015-10-181-2/+2
| | | | | | | | | | | | | The same serial hardware is present on LS2080A which is arm64, and LS1021A which is arm32, so don't limit the workaround to PPC. Unlike PPC which uses arch/powerpc/kernel/legacy_serial.c, the ARM targets use drivers/tty/serial/of_serial.c, so add the handle_irq override check there as well. Signed-off-by: Scott Wood <scottwood@freescale.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250: simplify ralink/alchemy register remap selectionMans Rullgard2015-10-041-4/+5
| | | | | | | | | | | | | | | | | | | 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: Mans Rullgard <mans@mansr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* drivers/tty: make serial 8250_lpc18xx.c Kconfig a tristatePaul Gortmaker2015-10-041-1/+1
| | | | | | | | | | | | | | | | | | | | | The Kconfig currently controlling compilation of this code is: 8250/Kconfig:config SERIAL_8250_LPC18XX 8250/Kconfig: bool "NXP LPC18xx/43xx serial port support" ...meaning that it currently is not being built as a module by anyone. When targetting orphaned modular code in non-modular drivers, this came up. Joachim indicated that the driver was actually meant to be tristate but ended up bool by accident. So here we make it tristate instead of removing the modular code that was essentially orphaned. Suggested-by: Joachim Eastwood <manabian@gmail.com> Cc: Jiri Slaby <jslaby@suse.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge branch 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linusLinus Torvalds2015-06-271-0/+9
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull MIPS updates from Ralf Baechle: - Improvements to the tlb_dump code - KVM fixes - Add support for appended DTB - Minor improvements to the R12000 support - Minor improvements to the R12000 support - Various platform improvments for BCM47xx - The usual pile of minor cleanups - A number of BPF fixes and improvments - Some improvments to the support for R3000 and DECstations - Some improvments to the ATH79 platform support - A major patchset for the JZ4740 SOC adding support for the CI20 platform - Add support for the Pistachio SOC - Minor BMIPS/BCM63xx platform support improvments. - Avoid "SYNC 0" as memory barrier when unlocking spinlocks - Add support for the XWR-1750 board. - Paul's __cpuinit/__cpuinitdata cleanups. - New Malta CPU board support large memory so enable ZONE_DMA32. * 'upstream' of git://git.linux-mips.org/pub/scm/ralf/upstream-linus: (131 commits) MIPS: spinlock: Adjust arch_spin_lock back-off time MIPS: asmmacro: Ensure 64-bit FP registers are used with MSA MIPS: BCM47xx: Simplify handling SPROM revisions MIPS: Cobalt Don't use module_init in non-modular MTD registration. MIPS: BCM47xx: Move NVRAM driver to the drivers/firmware/ MIPS: use for_each_sg() MIPS: BCM47xx: Don't select BCMA_HOST_PCI MIPS: BCM47xx: Add helper variable for storing NVRAM length MIPS: IRQ/IP27: Move IRQ allocation API to platform code. MIPS: Replace smp_mb with release barrier function in unlocks. MIPS: i8259: DT support MIPS: Malta: Basic DT plumbing MIPS: include errno.h for ENODEV in mips-cm.h MIPS: Define GCR_GIC_STATUS register fields MIPS: BPF: Introduce BPF ASM helpers MIPS: BPF: Use BPF register names to describe the ABI MIPS: BPF: Move register definition to the BPF header MIPS: net: BPF: Replace RSIZE with SZREG MIPS: BPF: Free up some callee-saved registers MIPS: Xtalk: Update xwidget.h with known Xtalk device numbers ...
| * serial: 8250_ingenic: support for Ingenic SoC UARTsPaul Burton2015-06-211-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce a driver suitable for use with the UARTs present in Ingenic SoCs such as the JZ4740 & JZ4780. These are described as being ns16550 compatible but aren't quite - they require the setting of an extra bit in the FCR register to enable the UART module. The serial_out implementation is the same as that in arch/mips/jz4740/serial.c - which will shortly be removed. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Slaby <jslaby@suse.cz> Cc: Lars-Peter Clausen <lars@metafoo.de> Cc: linux-serial@vger.kernel.org Cc: linux-mips@linux-mips.org Cc: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Cc: Peter Hurley <peter@hurleysoftware.com> Cc: Alan Cox <alan@linux.intel.com> Cc: linux-kernel@vger.kernel.org Cc: Matthias Brugger <matthias.bgg@gmail.com> Cc: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Cc: Tony Lindgren <tony@atomide.com> Cc: John Crispin <blogic@openwrt.org> Patchwork: https://patchwork.linux-mips.org/patch/10159/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
* | serial: 8250: add LPC18xx/43xx UART driverJoachim Eastwood2015-05-311-0/+8
| | | | | | | | | | | | | | | | | | | | | | Serial port driver for the 8250-based UART found on LPC18xx/43xx devices. The UART is 16550A compatible with additional features like RS485 support, synchronous mode, IrDA, and DMA. For now only basic UART and RS485 operation is supported. Signed-off-by: Joachim Eastwood <manabian@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | serial: 8250_uniphier: add UniPhier serial driverMasahiro Yamada2015-05-311-0/+7
|/ | | | | | | | | | | | | | | | | Add the driver for on-chip UART used on UniPhier SoCs. This hardware is similar to 8250, but the register mapping is slightly different: - The offset to FCR, MCR is different. - The divisor latch access bit does not exist. Instead, the divisor latch register is available at offset 9. This driver overrides serial_{in,out}, dl_{read,write} callbacks, but wants to borrow most of code from 8250_core.c. Signed-off-by: Masahiro Yamada <yamada.masahiro@socionext.com> Reviewed-by: Matthias Brugger <matthias.bgg@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: 8250_pci: replace switch-case by formulaAndy Shevchenko2015-03-261-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch replaces a switch-case by a formula using rational best approximation that does necessary calculations for byt_set_termios(). Below is a list of the calculations done for all defined baud rates. Each line in a format: 1) numerator, 2) denominator, 3) prescaler, 4) Fuart, 5) port UART clock, 6) list of baud rates with DLAB values. 4 5 16 80000000 80000000 2500000(2) 14 25 16 56000000 56000000 3500000(1) 16 25 16 64000000 64000000 500000(8),1000000(4),2000000(2), 4000000(1) 24 25 16 96000000 96000000 1500000(4),3000000(2) 2180 3103 16 70254592 70254592 134(32768) 2304 3125 16 73728000 73728000 576000(8),1152000(4) 8192 15625 16 52428800 52428800 50(65536),200(16384) 9216 15625 16 58982400 58982400 1800(2048),57600(64),115200(32), 230400(16),460800(8),921600(4),1843200(2) 12288 15625 16 78643200 78643200 75(65536),150(32768),300(16384), 600(8192),1200(4096),2400(2048), 4800(1024),9600(512),19200(256),38400(128) 9893 17154 16 57671680 57671680 110(32768) Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Peter Hurley <peter@hurleysoftware.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: serial: 8250: omap: add ttySx console if the user didn'tSebastian Andrzej Siewior2015-01-091-0/+19
| | | | | | | | | | | This patch invokes add_preferred_console() with ttyS based on ttyO arguments if the user didn't specify it on its own. This ensures that the user will see the kernel booting on his serial console in case he forgot to update the command line. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: ralink: adds Mediatek MT7620 serialJohn Crispin2014-11-061-1/+1
| | | | | | | | Add the config symbol for Mediatek MT7620 SoC to the SERIAL_8250_RT288X dependencies. Signed-off-by: John Crispin <blogic@openwrt.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: serial: Add 8250-core based omap driverSebastian Andrzej Siewior2014-11-061-0/+9
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This patch provides a 8250-core based UART driver for the internal OMAP UART. The long term goal is to provide the same functionality as the current OMAP uart driver and DMA support. I tried to merge omap-serial code together with the 8250-core code. There should should be hardly a noticable difference. The trigger levels are different compared to omap-serial: - omap serial TX: Interrupt comes after TX FIFO has room for 16 bytes. TX of 4096 bytes in one go results in 256 interrupts RX: Interrupt comes after there is on byte in the FIFO. RX of 4096 bytes results in 4096 interrupts. - this driver TX: Interrupt comes once the TX FIFO is empty. TX of 4096 bytes results in 65 interrupts. That means there will be gaps on the line while the driver reloads the FIFO. RX: Interrupt comes once there are 48 bytes in the FIFO or less over "longer" time frame. We have 1 / 11520 * 10^3 * 16 => 1.38… ms 1.38ms to react and purge the FIFO on 115200,8N1. Since the other driver fired after each byte it had ~5.47ms time to react. This _may_ cause problems if one relies on no missing bytes and has no flow control. On the other hand we get only 85 interrupts for the same amount of data. It has been only tested as console UART on am335x-evm, dra7-evm and beagle bone. I also did some longer raw-transfers to meassure the load. The device name is ttyS based instead of ttyO. If a ttyO based node name is required please ask udev for it. If both driver are activated (this and omap-serial) then this serial driver will take control over the device due to the link order v9…v10: - Tony noticed that omap3 won't show anything after waking up from core off. In v9 I reworked the register restore and set IER to 0 by accident. This went unnoticed because start_tx usually sets ier (either due to DMA bug or due to TX-complete IRQ). - dropped EFR and SLEEP from capabilities. We do have both but nobody should touch it. We already handle SLEEP ourself. - make the private copy of the registers (like EFR) u8 instead u32 - drop MDR1 & DL[ML] reset in restore registers. Does not look required it is set to the required value later. - update MDR1 & SCR only if changed. - set MDR1 as the last thing. The errata says that we should setup everything before MDR1 set. - avoid div by 0 in omap_8250_get_divisor() if baud rate gets very large (Frans Klaver fixed the same thing omap-serial) - drop "is in early stage" from Kconfig. v8…v9: - less on a file seems to hang the am335x after a while. I believe I introduce this bug a while ago since I can reproduce this prior to v8. Fixed by redoing the omap8250_restore_regs() v7…v8: - redo the register write. There is now one function for that which is used from set_termios() and runtime-resume. - drop PORT_OMAP_16750 and move the setup to the omap file. We have our own set termios function anyway (Heikki Krogerus) - use MEM instead of MEM32. TRM of AM/DM37x says that 32bit access on THR might result in data abort. We only need 32bit access in the errata function which is before we use 8250's read function so it doesn't matter. v4…v7: - change trigger levels after some tests with raw transfers. v3…v4: - drop RS485 support - wire up ->throttle / ->unthrottle v2…v3: - wire up startup & shutdown for wakeup-irq handling. - RS485 handling (well the core does). v1…v2: - added runtime PM. Could somebody could please double check this? - added omap_8250_set_termios() Reviewed-by: Tony Lindgren <tony@atomide.com> Tested-by: Tony Lindgren <tony@atomide.com> Tested-by: Frans Klaver <frans.klaver@xsens.com> Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: serial: 8250: Add Mediatek UART driverMatthias Brugger2014-09-101-0/+6
| | | | | | | | | | | The device has a highspeed register which influences the calcualtion of the divisor. The chip lacks support for some baudrates. When requested, we set the divisor to the next smaller baudrate and adjust the c_cflag accordingly. Signed-off-by: Matthias Brugger <matthias.bgg@gmail.com> Reviewed-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: Add support for Fintek F81216A LPC to 4 UARTRicardo Ribalda Delgado2014-09-091-0/+9
| | | | | | | | | | This patch lets you set the RS485 cappabilites of the device through TIOCSRS485 and TIOCGRS485 as defined on Documentation/serial/serial-rs485.txt In order to probe the device, the PNP id and the device id is used. Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>