summaryrefslogtreecommitdiffstats
path: root/drivers/tty/serial/8250
Commit message (Collapse)AuthorAgeFilesLines
* Merge tag 'tty-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/ttyLinus Torvalds2012-10-0111-286/+349
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Pull TTY changes from Greg Kroah-Hartman: "As we skipped the merge window for 3.6-rc1 for the tty tree, everything is now settled down and working properly, so we are ready for 3.7-rc1. Here's the patchset, it's big, but the large changes are removing a firmware file and adding a staging tty driver (it depended on the tty core changes, so it's going through this tree instead of the staging tree.) All of these patches have been in the linux-next tree for a while. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>" Fix up more-or-less trivial conflicts in - drivers/char/pcmcia/synclink_cs.c: tty NULL dereference fix vs tty_port_cts_enabled() helper function - drivers/staging/{Kconfig,Makefile}: add-add conflict (dgrp driver added close to other staging drivers) - drivers/staging/ipack/devices/ipoctal.c: "split ipoctal_channel from iopctal" vs "TTY: use tty_port_register_device" * tag 'tty-3.6' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty: (235 commits) tty/serial: Add kgdb_nmi driver tty/serial/amba-pl011: Quiesce interrupts in poll_get_char tty/serial/amba-pl011: Implement poll_init callback tty/serial/core: Introduce poll_init callback kdb: Turn KGDB_KDB=n stubs into static inlines kdb: Implement disable_nmi command kernel/debug: Mask KGDB NMI upon entry serial: pl011: handle corruption at high clock speeds serial: sccnxp: Make 'default' choice in switch last serial: sccnxp: Remove mask termios caps for SW flow control serial: sccnxp: Report actual baudrate back to core serial: samsung: Add poll_get_char & poll_put_char Powerpc 8xx CPM_UART setting MAXIDL register proportionaly to baud rate Powerpc 8xx CPM_UART maxidl should not depend on fifo size Powerpc 8xx CPM_UART too many interrupts Powerpc 8xx CPM_UART desynchronisation serial: set correct baud_base for EXSYS EX-41092 Dual 16950 serial: omap: fix the reciever line error case 8250: blacklist Winbond CIR port 8250_pnp: do pnp probe before legacy probe ...
| * serial: set correct baud_base for EXSYS EX-41092 Dual 16950Flavio Leitner2012-09-261-2/+7
| | | | | | | | | | | | | | | | | | | | Apparently the same card model has two IDs, so this patch complements the commit 39aced68d664291db3324d0fcf0985ab5626aac2 adding the missing one. Signed-off-by: Flavio Leitner <fbl@redhat.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * 8250: blacklist Winbond CIR portSean Young2012-09-262-7/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | The legacy serial driver will detect the Winbond CIR device as a serial port, since it looks exactly like a serial port unless you know what it is from the PNP ID. Here we track this port as a special PORT_8250_CIR type, preventing the legacy serial driver from probing it. Signed-off-by: Sean Young <sean@mess.org> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * 8250_pnp: do pnp probe before legacy probeSean Young2012-09-265-31/+41
| | | | | | | | | | | | | | | | | | | | | | | | | | We first probe the legacy serial ports and then check pnp. If there is a non-standard configuration then this might not work, also this change is needed so we can blacklist Winbond CIR based on PNP ID. For this to work the 8250_pnp driver must be merged into the 8250 module. Signed-off-by: Sean Young <sean@mess.org> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * 8250: fix autoconfig to work with serial consoleFlavio Leitner2012-09-211-11/+14
| | | | | | | | | | | | | | | | | | | | The autoconfig prints messages while holding the port's spinlock and that causes a deadlock when using serial console. Signed-off-by: Flavio Leitner <fbl@redhat.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * serial/8250: Limit the omap workarounds to omap1Tony Lindgren2012-09-111-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | These workarounds do not apply for CONFIG_ARCH_OMAP2PLUS at all, so let's make it just CONFIG_ARCH_OMAP1. This is needed to for ARM common zImage changes for omap2+ to avoid including plat and mach headers. Signed-off-by: Tony Lindgren <tony@atomide.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * 8250_pci: Add additional WCH CHC353 devicesAlan Cox2012-09-051-4/+37
| | | | | | | | | | | | | | | | | | These were reported in bugzilla long ago with a hack patch. Now we have a proper patch for one we can do the rest. Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=25102 Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * parport_serial: Add support for the WCH353 2S/1P multi-IO cardGuainluca Anzolin2012-09-051-8/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | To allow parport_serial to handle the card the same PCI ids are blacklisted in 8250_pci.c using the existing software blacklist mechanism. The blacklist array is also renamed because it now covers this new use case. Since the two serial ports are auto-detected as XScale instead of 16550A clones, we also add a quirk to 8250_pci.c to skip autodetection and set the correct port type. Signed-off-by: Gianluca Anzolin <gianluca@sottospazio.it> [Fold in fixes for the uart_8250 change] Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * serial: diminish usage of struct serial_uart_configPaul Gortmaker2012-09-051-3/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This structure might have made sense many years ago, but at this point it is only used in one specific driver, and referenced in stale comments elsewhere. Rather than change the sunsu.c driver, simply move the struct to be within the exclusive domain of that driver, so it won't get inadvertently picked up and used by other serial drivers going forward. The comments referencing the now driver specific struct are updated accordingly. Note that 8250.c has a struct that is similar in usage, with the name serial8250_config; but is 100% independent and untouched here. Cc: "David S. Miller" <davem@davemloft.net> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * 8250: add AgeStar AS-PRS2-009Alan Cox2012-08-161-0/+8
| | | | | | | | | | | | Signed-off-by: Alan Cox <alan@linux.intel.com> Resolves-bug: https://bugzilla.kernel.org/show_bug.cgi?id=22502 Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * 8250: three way resolve of the 8250 diffsAlan Cox2012-07-172-31/+1
| | | | | | | | | | | | | | | | This resolves the differences between the original 8250 patch, the revised 8250 patch and the independant clean up of the octeon driver (to use platform devices properly yay!) Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * 8250: add support for ASIX devices with a FIFO bugAlan Cox2012-07-123-5/+28
| | | | | | | | | | | | | | | | | | | | | | | | | | Information and a different patch provided by <donald@asix.com.tw>. We do it a little differently to keep the modularity and to avoid playing with RLSI. We add a new uart bug for the parity flaw and set it in the pci matches. If parity check is enabled then we drop the FIFO trigger to 1 as per the Asix reference code. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * 8250: propogate the bugs fieldAlan Cox2012-07-121-0/+1
| | | | | | | | | | | | | | Now we are using the uart_8250_port this is trivial Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * 8250: use the 8250 register interface not the legacy oneAlan Cox2012-07-128-178/+155
| | | | | | | | | | | | | | | | The old interface just copies bits over and calls the newer one. In addition we can now pass more information. Signed-off-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Merge 3.5-rc4 into tty-nextGreg Kroah-Hartman2012-06-261-1/+1
| |\ | | | | | | | | | | | | | | | | | | This is to pick up the serial port and tty changes in Linus's tree to allow everyone to sync up. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | 8250_pci: Remove duplicate struct pciserial_boardShawn Bohrer2012-06-121-9/+1
| | | | | | | | | | | | | | | | | | | | | | | | pbn_exsys_4055 is the same thing as pbn_b2_4_115200 so replace it with the standard pattern. Signed-off-by: Shawn Bohrer <shawn.bohrer@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * | serial/8250: Add LPC3220 standard UART typeRoland Stigge2012-06-121-0/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | LPC32xx has "Standard" UARTs that are actually 16550A compatible but have bigger FIFOs. Since the already supported 16X50 line still doesn't match here, we agreed on adding a new type. Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Alan Cox <alan@linux.intel.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | | make drivers with pci error handlers constStephen Hemminger2012-09-071-1/+1
| | | | | | | | | | | | | | | | | | Covers the rest of the uses of pci error handler. Signed-off-by: Stephen Hemminger <shemminger@vyatta.com> Signed-off-by: Bjorn Helgaas <bhelgaas@google.com>
* | | serial/8250: Add LPC3220 standard UART typeRoland Stigge2012-07-261-0/+8
| |/ |/| | | | | | | | | | | | | | | | | | | LPC32xx has "Standard" UARTs that are actually 16550A compatible but have bigger FIFOs. Since the already supported 16X50 line still doesn't match here, we agreed on adding a new type. Signed-off-by: Roland Stigge <stigge@antcom.de> Acked-by: Alan Cox <alan@linux.intel.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | serial: fix kernel-doc warnings in 8250.cRandy Dunlap2012-06-121-1/+1
|/ | | | | | | | | | | Fix kernel-doc warnings in drivers/tty/serial/8250/8250.c: Warning(drivers/tty/serial/8250/8250.c:3128): No description found for parameter 'up' Warning(drivers/tty/serial/8250/8250.c:3128): Excess function parameter 'port' description in 'serial8250_register_8250_port' Signed-off-by: Randy Dunlap <rdunlap@xenotime.net> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge branch 'delete-mca' of ↵Linus Torvalds2012-05-233-71/+0
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux Pull the MCA deletion branch from Paul Gortmaker: "It was good that we could support MCA machines back in the day, but realistically, nobody is using them anymore. They were mostly limited to 386-sx 16MHz CPU and some 486 class machines and never more than 64MB of RAM. Even the enthusiast hobbyist community seems to have dried up close to ten years ago, based on what you can find searching various websites dedicated to the relatively short lived hardware. So lets remove the support relating to CONFIG_MCA. There is no point carrying this forward, wasting cycles doing routine maintenance on it; wasting allyesconfig build time on validating it, wasting I/O on git grep'ping over it, and so on." Let's see if anybody screams. It generally has compiled, and James Bottomley pointed out that there was a MCA extension from NCR that allowed for up to 4GB of memory and PPro-class machines. So in *theory* there may be users out there. But even James (technically listed as a maintainer) doesn't actually have a system, and while Alan Cox claims to have a machine in his cellar that he offered to anybody who wants to take it off his hands, he didn't argue for keeping MCA support either. So we could bring it back. But somebody had better speak up and talk about how they have actually been using said MCA hardware with modern kernels for us to do that. And David already took the patch to delete all the networking driver code (commit a5e371f61ad3: "drivers/net: delete all code/drivers depending on CONFIG_MCA"). * 'delete-mca' of git://git.kernel.org/pub/scm/linux/kernel/git/paulg/linux: MCA: delete all remaining traces of microchannel bus support. scsi: delete the MCA specific drivers and driver code serial: delete the MCA specific 8250 support. arm: remove ability to select CONFIG_MCA
| * serial: delete the MCA specific 8250 support.Paul Gortmaker2012-05-173-71/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | The support for CONFIG_MCA is being removed, since the 20 year old hardware simply isn't capable of meeting today's software demands on CPU and memory resources. This commit removes the MCA specific 8250 UART code. Cc: Alan Cox <alan@linux.intel.com> Cc: linux-serial@vger.kernel.org Acked-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com>
* | serial8250-em: Add DT supportMagnus Damm2012-05-091-0/+7
| | | | | | | | | | | | | | | | Update the 8250_em driver to support DT. Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | serial8250-em: clk_get() IS_ERR() error handling fixMagnus Damm2012-05-091-1/+2
| | | | | | | | | | | | | | | | | | | | | | Update the 8250_em driver to correctly handle the case where no clock is associated with the device. The return value of clk_get() needs to be checked with IS_ERR() to avoid NULL pointer referencing. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | serial8250-em: Emma Mobile UART driver V2Magnus Damm2012-05-043-0/+187
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This is V2 of the Emma Mobile 8250 platform driver. The hardware itself has according to the data sheet up to 64 byte FIFOs but at this point we only make use of the 16550 compatible mode. To support this piece of hardware the common UART registers need to be remapped, and the access size differences need to be handled. The DLL and DLM registers can due to offset collision not be remapped easily, and because of that this driver makes use of ->dl_read() and ->dl_write() callbacks. This in turn requires a registration function that takes 8250-specific paramenters. Future potential enhancements include DT support, early platform driver console and fine grained PM. Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Alan Cox <alan@linux.intel.com> Acked-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | serial8250: Introduce serial8250_register_8250_port()Magnus Damm2012-05-021-32/+59
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Introduce yet another 8250 registration function. This time it is serial8250_register_8250_port() and it allows us to register 8250 hardware instances using struct uart_8250_port. The new function makes it possible to register 8250 hardware that makes use of 8250 specific callbacks such as ->dl_read() and ->dl_write(). Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | serial8250: Clean up default map and dl codeMagnus Damm2012-05-021-26/+12
| | | | | | | | | | | | | | | | | | | | Get rid of unused functions and macros now when Alchemy and RM9K are converted over to callbacks. Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | serial8250: Use dl_read()/dl_write() on RM9KMagnus Damm2012-05-021-33/+29
| | | | | | | | | | | | | | | | | | | | Convert the 8250 RM9K support code to make use of the new dl_read()/dl_write() callbacks. Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | serial8250: Use dl_read()/dl_write() on AlchemyMagnus Damm2012-05-021-41/+26
| | | | | | | | | | | | | | | | | | | | Convert the 8250 Alchemy support code to make use of the new dl_read()/dl_write() callbacks. Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | serial8250: Add dl_read()/dl_write() callbacksMagnus Damm2012-05-022-53/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | Convert serial_dl_read() and serial_dl_write() from macro to 8250 specific callbacks. This change makes it easier to support 8250 hardware with non-standard DLL and DLM register configurations such as Alchemy, RM9K and upcoming Emma Mobile UART hardware. Signed-off-by: Magnus Damm <damm@opensource.se> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | 8250.c: less than 2400 baud fix.Christian Melki2012-05-011-4/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We noticed that we were loosing data at speed less than 2400 baud. It turned out our (TI16750 compatible) uart with 64 byte outgoing fifo was truncated to 16 byte (bit 5 sets fifo len) when modifying the fcr reg. The input code still fills the buffer with 64 bytes if I remember correctly and thus data is lost. Our fix was to remove whiping of the fcr content and just add the TRIGGER_1 which we want for latency. I can't see why this would not work on less than 2400 always, for all uarts ... Otherwise one would have to make sure the filling of the fifo re-checks the current state of available fifo size (urrk). Signed-off-by: Christian Melki <christian.melki@ericsson.se> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | 8250_pci: fix pch uart matchingArnaud Patard2012-04-291-0/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | The rules used to make 8250_pci "ignore" the PCH uarts are lacking pci subids entries, preventing it to match and thus is breaking serial port support for theses systems. This has been tested on a nanoETXexpress-TT, which has a specifici uart clock. Tested-by: Erwan Velu <Erwan.Velu@zodiacaerospace.com> [stable@: please apply to 3.0-stable, 3.2-stable and 3.3-stable] Cc: stable <stable@vger.kernel.org> Signed-off-by: Arnaud Patard <apatard@hupstream.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | serial/8250_pci: fix suspend/resume vs init/exit quirksDan Williams2012-04-181-0/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Commit e86ff4a6 "serial/8250_pci: init-quirk msi support for kt serial controller" introduced a regression in suspend/resume by causing msi's to be enabled twice without an intervening disable. 00:16.3 Serial controller: Intel Corporation Patsburg KT Controller (rev 05) (prog-if 02 [16550]) Subsystem: Intel Corporation Device 7270 Flags: bus master, 66MHz, fast devsel, latency 0, IRQ 72 I/O ports at 4080 [size=8] Memory at d1c30000 (32-bit, non-prefetchable) [size=4K] Capabilities: [c8] Power Management version 3 Capabilities: [d0] MSI: Enable+ Count=1/1 Maskable- 64bit+ Kernel driver in use: serial [ 365.250523] sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:16.3/msi_irqs' [ 365.250525] Modules linked in: nls_utf8 ipv6 uinput sg iTCO_wdt iTCO_vendor_support ioatdma dca i2c_i801 i2c_core wmi sd_mod ahci libahci isci libsas libata scsi_transport_sas [last unloaded: scsi_wait_scan] [ 365.250540] Pid: 9030, comm: kworker/u:1 Tainted: G W 3.3.0-isci-3.0.213+ #1 [ 365.250542] Call Trace: [ 365.250545] [<ffffffff8115e955>] ? sysfs_add_one+0x99/0xad [ 365.250548] [<ffffffff8102db8b>] warn_slowpath_common+0x85/0x9e [ 365.250551] [<ffffffff8102dc96>] warn_slowpath_fmt+0x6e/0x70 [ 365.250555] [<ffffffff8115e8fa>] ? sysfs_add_one+0x3e/0xad [ 365.250558] [<ffffffff8115e8b4>] ? sysfs_pathname+0x3c/0x44 [ 365.250561] [<ffffffff8115e8b4>] ? sysfs_pathname+0x3c/0x44 [ 365.250564] [<ffffffff8115e8b4>] ? sysfs_pathname+0x3c/0x44 [ 365.250567] [<ffffffff8115e8b4>] ? sysfs_pathname+0x3c/0x44 [ 365.250570] [<ffffffff8115e955>] sysfs_add_one+0x99/0xad [ 365.250573] [<ffffffff8115f031>] create_dir+0x72/0xa5 [ 365.250577] [<ffffffff8115f194>] sysfs_create_dir+0xa2/0xbe [ 365.250581] [<ffffffff81262463>] kobject_add_internal+0x126/0x1f8 [ 365.250585] [<ffffffff8126255b>] kset_register+0x26/0x3f [ 365.250588] [<ffffffff8126275a>] kset_create_and_add+0x62/0x7c [ 365.250592] [<ffffffff81293619>] populate_msi_sysfs+0x34/0x103 [ 365.250595] [<ffffffff81293e1c>] pci_enable_msi_block+0x1b3/0x216 [ 365.250599] [<ffffffff81303f7c>] try_enable_msi+0x13/0x17 [ 365.250603] [<ffffffff81303fb3>] pciserial_resume_ports+0x21/0x42 [ 365.250607] [<ffffffff81304041>] pciserial_resume_one+0x50/0x57 [ 365.250610] [<ffffffff81283e1a>] pci_legacy_resume+0x38/0x47 [ 365.250613] [<ffffffff81283e7d>] pci_pm_restore+0x54/0x87 [ 365.250616] [<ffffffff81283e29>] ? pci_legacy_resume+0x47/0x47 [ 365.250619] [<ffffffff8131e9e8>] dpm_run_callback+0x48/0x7b [ 365.250623] [<ffffffff8131f39a>] device_resume+0x342/0x394 [ 365.250626] [<ffffffff8131f5b7>] async_resume+0x21/0x49 That patch has since been reverted, but by inspection it seems that pciserial_suspend_ports() should be invoking .exit() quirks to release resources acquired during .init(). Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | serial/8250_pci: Clear FIFOs for Intel ME Serial Over Lan device on BISudhakar Mamillapalli2012-04-183-0/+51
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using Serial Over Lan (SOL) over the virtual serial port in a Intel management engine (ME) device, on device reset the serial FIFOs need to be cleared to keep the FIFO indexes in-sync between the host and the engine. On a reset the serial device assertes BI, so using that as a cue FIFOs are cleared. So for this purpose a new handle_break callback has been added. One other problem is that the serial registers might temporarily go to 0 on reset of this device. So instead of using the IER register read, if 0 returned use the ier value in uart_8250_port. This is hidden under a custom serial_in. Cc: Nhan H Mai <nhan.h.mai@intel.com> Signed-off-by: Sudhakar Mamillapalli <sudhakar@fb.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | Merge 3.4-rc3 into tty-nextGreg Kroah-Hartman2012-04-182-21/+7
|\ \ | |/ | | | | | | | | This allows us to pick up some changes needed for other serial patches. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * serial/8250_pci: add a "force background timer" flag and use it for the "kt" ↵Dan Williams2012-04-092-4/+21
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | serial port Workaround dropped notifications in the iir register. Register reads coincident with new interrupt notifications sometimes result in this device clearing the interrupt event without reporting it in the read data. The serial core already has a heuristic for determining when a device has an untrustworthy iir register. In this case when we apriori know that the iir is faulty use a flag (UPF_BUG_THRE) to bypass the test and force usage of the background timer. [stable: 3.3.x] Acked-by: Alan Cox <alan@linux.intel.com> Cc: stable <stable@vger.kernel.org> Reported-by: Nhan H Mai <nhan.h.mai@intel.com> Reported-by: Sudhakar Mamillapalli <sudhakar@fb.com> Tested-by: Nhan H Mai <nhan.h.mai@intel.com> Tested-by: Sudhakar Mamillapalli <sudhakar@fb.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Revert "serial/8250_pci: setup-quirk workaround for the kt serial controller"Dan Williams2012-04-092-19/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit 448ac154c957c4580531fa0c8f2045816fe2f0e7. The semantic of UPF_IIR_ONCE is only guaranteed to workaround the race condition in the kt serial's iir register if the only source of interrupts is THRE (fifo-empty) events. An modem status event at the wrong time can again cause an iir read to drop the 'empty' status leading to a hang. So, revert this in preparation for using the existing "I don't trust my iir register" workaround in the 8250 core (UART_BUG_THRE). [stable: 3.3.x] Cc: stable <stable@vger.kernel.org> Acked-by: Alan Cox <alan@linux.intel.com> Cc: Sudhakar Mamillapalli <sudhakar@fb.com> Reported-by: Nhan H Mai <nhan.h.mai@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Revert "serial/8250_pci: init-quirk msi support for kt serial controller"Dan Williams2012-04-091-14/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reverts commit e86ff4a63c9fdd875ba8492577cd1ad2252f525c. This tried to enforce the semantics of one interrupt per iir read of the THRE (transmit-hold empty) status, but events from other sources (particularly modem status) defeat this guarantee. This change also broke 8250_pci suspend/resume support as pciserial_resume_ports() re-runs .init() quirks, but does not run .exit() quirks in pciserial_suspend_ports() leading to reports like: sysfs: cannot create duplicate filename '/devices/pci0000:00/0000:00:16.3/msi_irqs' ...and a subsequent crash. The mismatch of init/exit at suspend/resume seems like a bug in its own right. [stable: 3.3.x] Cc: stable <stable@vger.kernel.org> Acked-by: Alan Cox <alan@linux.intel.com> Cc: Sudhakar Mamillapalli <sudhakar@fb.com> Reported-by: Nhan H Mai <nhan.h.mai@intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | tegra, serial8250: add ->handle_break() uart_port opDan Williams2012-04-181-31/+3
|/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The "KT" serial port has another use case for a "received break" quirk, so before adding another special case to the 8250 core take this opportunity to push such quirks out of the core and into a uart_port op. Stephen says: "If the callback function is to no longer live in 8250.c itself, arch/arm/mach-tegra/devices.c isn't logically a good place to put it, and that file will be going away once we get rid of all the board files and move solely to device tree." ...so since 8250_pci.c houses all the quirks for pci serial devices this quirk is similarly housed in of_serial.c. Once the open firmware conversion completes the infrastructure details (include/linux/of_serial.h, and the export) can all be removed to make this self contained to of_serial.c. Cc: Nhan H Mai <nhan.h.mai@intel.com> Cc: Colin Cross <ccross@android.com> Cc: Olof Johansson <olof@lixom.net> [stephen: kill CONFIG_SERIAL_TEGRA in favor just using CONFIG_ARCH_TEGRA] Cc: Grant Likely <grant.likely@secretlab.ca> Acked-by: Arnd Bergmann <arnd@arndb.de> Acked-by: Sudhakar Mamillapalli <sudhakar@fb.com> Reported-by: Alan Cox <alan@lxorguk.ukuu.org.uk> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Dan Williams <dan.j.williams@intel.com> Acked-by: Stephen Warren <swarren@wwwdotorg.org> Tested-by: Stephen Warren <swarren@wwwdotorg.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Remove all #inclusions of asm/system.hDavid Howells2012-03-281-1/+0
| | | | | | | | | Remove all #inclusions of asm/system.h preparatory to splitting and killing it. Performed with the following command: perl -p -i -e 's!^#\s*include\s*<asm/system[.]h>.*\n!!' `grep -Irl '^#\s*include\s*<asm/system[.]h>' *` Signed-off-by: David Howells <dhowells@redhat.com>
* serial: remove back and forth conversions in serial_out_syncPaul Gortmaker2012-03-091-4/+3
| | | | | | | | | | | | | | | The two callers to serial_out_sync() have a struct port right there in scope, but then pass in a struct 8250_port which then is locally resolved back to a struct port. Delete the needless back and forth and just pass in the struct port directly. Rename the function to have "_port" in its name, so the name <--> args relationship is consistent with the other serial_in/out vs serial_port_in/out function classes. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: use serial_port_in/out vs serial_in/out in 8250Paul Gortmaker2012-03-091-80/+80
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | The serial_in and serial_out helpers are expecting to operate on an 8250_port struct. These in turn go after the contained normal port struct which actually has the actual in/out accessors. But what is happening in some cases, is that a function is passed in a port struct, and it runs container_of to get the 8250_port struct, and then it uses serial_in/out helpers on that. But when you do, it goes full circle, since it jumps back inside the 8250_port to find the contained port struct (which we already knew!). So, if we are operating in a scope where we know the struct port, then use the serial_port_in/out helpers and avoid the bouncing around. If we don't have the struct port handy, and it isn't worth making a local for it, then just leave things as-is which uses the serial_in/out helpers that will resolve the 8250_port onto the struct port. Mostly, gcc figures this out on its own -- so this doesn't bring to the table any revolutionary runtime delta. However, it is somewhat misleading to always hammer away on 8250 structs, when the actual underlying property isn't at all 8250 specific -- and this change makes that clear. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: reduce number of indirections in 8250 codePaul Gortmaker2012-03-091-155/+167
| | | | | | | | | | | | | | | | | | | | | | | | The serial_8250_port struct contains within a serial_port struct and many times one or the other, or both are in scope within functions via a passed in arg, or via container_of. However there are a lot of cases where we have access directly to the port pointer, but yet go through the parent 8250_port structure instead to get it. These should just use the port struct directly. Similarly there are cases where it makes sense (from a code cleanliness point of view) to declare a local for the port struct, so we aren't going through the parent 8250_port struct repeatedly to get to it. We get a small reduction in text size, but it appears that gcc was smart enough to internally be doing most of this already, so the readability improvement is the larger gain. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: delete useless void casts in 8250.cPaul Gortmaker2012-03-091-11/+11
| | | | | | | | | | | These might have worked some magic with an ancient gcc back in 1992, but "objdump --disassemble" on gcc 4.6 on x86-64 shows identical output before and after this commit. Send the casts and their hysterical rasins to the bitbucket. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: make 8250's serial_in shareable to other drivers.Paul Gortmaker2012-03-092-5/+10
| | | | | | | | | | | | | | | | | | | | | | | Currently 8250.c has serial_in and serial_out as shortcuts to doing the port I/O. They are implemented as macros a ways down in the file. This isn't by accident, but is implicitly required, so cpp doesn't mangle other instances of the common string "serial_in", as it exists as a field in the port struct itself. The above mangling avoidance violates the principle of least surprise, and it also prevents the shortcuts from being relocated up to the top of file, or into 8250.h -- either being a better location than the current one. Move them to 8250.h so other 8250-like drivers can also use the shortcuts, and in the process, make the conflicting names go away by using static inlines instead of macros. The object file size remains unchanged with this modification. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* serial: delete last unused traces of pausing I/O in 8250Paul Gortmaker2012-03-091-158/+150
| | | | | | | | | | | This is the last traces of pausing I/O that we had back some twenty years ago. Probably was only required for 8MHz ISA cards running "on the edge" at 12MHz. Anyway it hasn't been in use for years, so lets just bury it for good. Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: Alan Cox <alan@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: sparc: rename drivers/tty/serial/suncore.h -> include/linux/sunserialcore.hPaul Gortmaker2012-02-101-4/+3
| | | | | | | | | | | There are multiple users of this file from different source paths now, and rather than have ../ paths in include statements, just move the file to the linux header dir. Suggested-by: David S. Miller <davem@davemloft.net> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* Merge tag 'tty-3.3-rc3' tty-nextGreg Kroah-Hartman2012-02-101-14/+7
| | | | | | | This is needed to handle the 8250 file merge mess properly for future patches. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* m32r: relocate drivers back out of 8250 dirPaul Gortmaker2012-02-083-1391/+0
| | | | | | | | | | | | | | | | Commit 9bef3d4197379a995fa80f81950bbbf8d32e9e8b "serial: group all the 8250 related code together" inadvertently swept up the m32r driver in the move, because it had comments mentioning 8250 registers within it. However these are only there by nature of the driver being based off the 8250 source code -- the hardware itself does not actually have any relation to the original 8250 style UARTs. Reported-by: Jiri Slaby <jirislaby@gmail.com> Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* tty: fix a build failure on sparcCong Wang2012-02-031-1/+1
| | | | | | | | | | | | | | | | | On sparc, there is a build failure: drivers/tty/serial/8250/8250.c:48:21: error: suncore.h: No such file or directory drivers/tty/serial/8250/8250.c:3275: error: implicit declaration of function 'sunserial_register_minors' drivers/tty/serial/8250/8250.c:3305: error: implicit declaration of function 'sunserial_unregister_minors' this is due to commit 9bef3d4197379a995fa80f81950bbbf8d32e9e8b (serial: group all the 8250 related code together) moved these files into 8250/ subdirectory, but forgot to change the reference to drivers/tty/serial/suncore.h. Cc: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: WANG Cong <xiyou.wangcong@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
OpenPOWER on IntegriCloud