aboutsummaryrefslogtreecommitdiff
path: root/drivers
AgeCommit message (Collapse)Author
2015-03-26tty: cpm_uart: replace CONFIG_8xx by CONFIG_CPM1Christophe Leroy
Two config options exist to define powerpc MPC8xx: * CONFIG_PPC_8xx * CONFIG_8xx In addition, CONFIG_PPC_8xx also defines CONFIG_CPM1 as communication co-processor arch/powerpc/platforms/Kconfig.cputype has contained the following comment about CONFIG_8xx item for some years: "# this is temp to handle compat with arch=ppc" It looks like not many places still have that old CONFIG_8xx used, so it is likely to be a good time to get rid of it completely ? Signed-off-by: Christophe Leroy <christophe.leroy@c-s.fr> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: jsm: some off by one bugsDan Carpenter
"brd->nasync" amd "brd->maxports" are the same. They hold the number of filled out channels in the brd->channels[] array. These tests should be ">=" instead of ">" so that we don't read one element past the end. Signed-off-by: Dan Carpenter <dan.carpenter@oracle.com> Acked-by: Thadeu Lima de Souza Cascardo <cascardo@linux.vnet.ibm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: xuartps: Fix check in console_setup().Thomas Betker
cdns_uart_console_setup() checks port->mapbase != 0, but the port may not be initialized yet even if this condition is met [e.g., ioremap() may have failed]. Check port->membase != NULL instead, similar to cdns_early_console_setup(). Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: xuartps: Get rid of register access macros.Thomas Betker
Get rid of cdns_uart_readl() and cdns_uart_writel() and just call readl() and writel() directly. Most of the patch was created by search-and-replace (I had to convert a few lines manually, and break some lines longer than 80 columns): * s/cdns_uart_readl(/readl(port->membase + /g * s/cdns_uart_writel(\([^,]*\),/writel(\1, port->membase +/g Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com> Acked-by: Sören Brinkmann <soren.brinkmann@xilinx.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: xuartps: Fix iobase use.Thomas Betker
cdns_uart_get_port() sets port->iobase = 1 to "mark port in use", but this "in use" condition is not checked anywhere else in the code. So remove the line, keeping port->iobase = 0 (which also makes more sense). Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: xuartps: Fix cdns_uart_port[] definition.Thomas Betker
The code assumes that the array cdns_uart_port[] has dimension CDNS_UART_NR_PORTS, so let us define it this way. Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: xuartps: Fix register space size.Thomas Betker
The register space size is 0x1000, and this value [not 0xfff] should be provided to request_mem_region(), ioremap(), etc. Signed-off-by: Thomas Betker <thomas.betker@rohde-schwarz.com> Reviewed-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: of: set port iomem size from devicetreeMans Rullgard
Make the 8250 driver reserve exactly the mmio region specified in the devicetree. This prevents conflicts between UPIO_AU type UARTs and other devices mapped closer than the default size of 0x1000 (or 0x100 for RT2880). Signed-off-by: Mans Rullgard <mans@mansr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250: allow specifying iomem size in addition to addressMans Rullgard
This adds a mapsize field to struct uart_port to be used in conjunction with mapbase. If set, it overrides whatever value serial8250_port_size() would otherwise report. Signed-off-by: Mans Rullgard <mans@mansr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250_dw: add support for AMD SOC CarrizoKen Xue
Add ACPI identifier for UART on AMD SOC Carrizo. Signed-off-by: Ken Xue <Ken.Xue@amd.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26tty: constify of_device_id arrayFabian Frederick
of_device_id is always used as const. (See driver.of_match_table and open firmware functions) Signed-off-by: Fabian Frederick <fabf@skynet.be> Acked-by: Peter Korsgaard <peter@korsgaard.com> Acked-by: Timur Tabi <timur@tabi.org> Acked-by: Patrice Chotard <patrice.chotard@st.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26tty/hvc_opal: constify of_device_id arrayFabian Frederick
of_device_id is always used as const. (See driver.of_match_table and open firmware functions) Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: sh-sci: Update calculation of timeout for DMANobuhiro Iwamatsu
The current calculation method in the case of 9600bps, rounding error occurs has become setting that occur timeout faster than the required time. When we use 9600bps, 32byte buffer, 10 bit (CS8) and 100 HZ, it becomes 3 jiffies (30msec). In fact it is necessary 33msec. This updates to the calculation that are not actually less than the value set by the rounding error. Also, this is nothing will be calculated value when there is no load. If there are a lot of case load, overrun error will occur immediately. This is by the buffer size to be calculated twice the DMA buffer, and add the change of setting a sufficient time-out value. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: sh-sci: Add overrun handling of SCIFA and SCIFBNobuhiro Iwamatsu
SCIFA and SCIFB can detect the overrun, but it does not support. This adds overrun handling of SCIFA and SCIFB. Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> Signed-off-by: Yoshihiro Kaneko <ykaneko0929@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26sc16is7xx: enable the clockJakub Kicinski
Although clk_disable_unprepare() is called both on .remove() and in .probe() error path, the clock is never actually enabled. Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Signed-off-by: Jon Ringle <jringle@gridpoint.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26sc16is7xx: don't wipe out port configuration on shutdownJakub Kicinski
EFCR register contains RS-485 configuration which should not be changed by shutdown. Instead of doing a write only update the appropriate bits. Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Signed-off-by: Jon Ringle <jringle@gridpoint.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26sc16is7xx: remove ports on probe error pathJakub Kicinski
If ports are not explicitly removed on the error path the device will not get properly unregistered leaving /dev/ttySC* nodes in the filesystem. Signed-off-by: Jakub Kicinski <kubakici@wp.pl> Signed-off-by: Jon Ringle <jringle@gridpoint.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26tty/serial: omap: fix !wakeirq messageDoug Kehn
When wakeirq is not used/enabled, "no wakeirq for uart0" is output for all TTY as the log message is generated before the port line is initialized. [ 0.802656] Serial: 8250/16550 driver, 4 ports, IRQ sharing enabled [ 0.811700] omap_uart 44e09000.serial: no wakeirq for uart0 [ 0.812379] 44e09000.serial: ttyO0 at MMIO 0x44e09000 (irq = 88, base_baud = 3000000) is a OMAP UART0 [ 1.503622] console [ttyO0] enabled [ 1.509836] omap_uart 48022000.serial: no wakeirq for uart0 [ 1.516118] 48022000.serial: ttyO1 at MMIO 0x48022000 (irq = 89, base_baud = 3000000) is a OMAP UART1 [ 1.527711] omap_uart 48024000.serial: no wakeirq for uart0 [ 1.533881] 48024000.serial: ttyO2 at MMIO 0x48024000 (irq = 90, base_baud = 3000000) is a OMAP UART2 [ 1.545324] omap_uart 481a6000.serial: no wakeirq for uart0 [ 1.551410] 481a6000.serial: ttyO3 at MMIO 0x481a6000 (irq = 60, base_baud = 3000000) is a OMAP UART3 [ 1.562946] omap_uart 481a8000.serial: no wakeirq for uart0 [ 1.569036] 481a8000.serial: ttyO4 at MMIO 0x481a8000 (irq = 61, base_baud = 3000000) is a OMAP UART4 Fix by moving wakeirq initialization, check, and dev_info() call to after port line initialization and validation. Signed-off-by: Doug Kehn <rdkehn@yahoo.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26tty: serial: Remove orphaned serial driverStephen Boyd
This driver is orphaned now that mach-msm has been removed. Delete it. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: David Brown <davidb@codeaurora.org> Cc: Bryan Huntsman <bryanh@codeaurora.org> Cc: Daniel Walker <dwalker@fifo99.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26tty: serial: msm_serial: Remove dead codeStephen Boyd
This config no longer exists now that mach-msm has been removed. Delete it and the associated code. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: David Brown <davidb@codeaurora.org> Cc: Bryan Huntsman <bryanh@codeaurora.org> Cc: Daniel Walker <dwalker@fifo99.com> Signed-off-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250_pci: remove non-used var for F81504Peter Hung
Remove pci_fintek_setup() non-used var with calculation ciobase Signed-off-by: Peter Hung <hpeter+linux_kernel@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250: remove the redundant includeWang Long
The serial_core.h file have been included in header file serial_8250.h. so remove the "#include <serial_core.h>" in some 8250 serial drivers, because they have included the header file serial_8250.h. Signed-off-by: Wang Long <long.wanglong@huawei.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250: Check UART_SCR is writablePeter Hurley
Au1x00/RT2800+ doesn't implement the 8250 scratch register (and this may be true of other h/w currently supported by the 8250 driver); read back the canary value written to the scratch register to enable the console h/w restart after resume from system suspend. Fixes: 4516d50aabedb ("serial: 8250: Use canary to restart console ...") Reported-by: Mason <slash.tmp@free.fr> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250: Validate reg addr for Au1x00/RT288x i/o accessorsPeter Hurley
Au1x00/RT2800+ hardware has an alternate register layout which is remapped with lookup tables by the au_serial_in()/out() i/o accessors. However, the h/w does not support the complete 8250 register set, and accesses to unmapped registers cause out-of-bounds lookups. Further, because the lookup tables are defined by designated initializers, the tables may contain unmapped entries (although the current tables do not). Declare fixed-size lookup tables with contiguous initialization for the complete 8250 register map; unmapped registers are initialized to -1. Validate the register index (ie., 'offset') is in the range [0, table size). Return fixed value for unmapped register reads and ignore unmapped register writes. Reported-by: Mason <slash.tmp@free.fr> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Tested-by: Mans Rullgard <mans@mansr.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250: Declare base port operations constPeter Hurley
The base port operations dispatch table should never be modified at runtime; the proper way to override base port operations is to dup the port operations, modify the copy, and point port->ops at the copy. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250: Decouple RSA probePeter Hurley
Prepare for 8250 split; separate RSA probe and resource management from base port operations. Override base port operations for the config_port(), request_port() and release_port() methods to implement the optional RSA probe and resource management only in the universal/legacy 8250 driver. Introduce 'probe' flags for 8250 ports, which allows drivers higher up the driver stack to enable optional probes. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250: Only get RSA resource when requiredPeter Hurley
The probe for Remote Supervisor Adapter is limited to port i/o addresses which match one of the probe_rsa[] module parameter addresses. Limit RSA resource acquire to matching i/o ports. The result is a saner probe policy: only perform optional probes when specified rather than by default. NB: It is possible for userspace to set the port type == PORT_RSA with ioctl(TIOCSSERIAL) and then autoconfig with ioctl(TIOCSERCONFIG), which if it fails, may leave the port type set to PORT_RSA. Since this may have previously resulted in a working RSA port, this behavior is preserved. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250: Get RSA resource iff CONFIG_SERIAL_8250_RSAPeter Hurley
Support for Remote Supervisor Adapter is conditional on CONFIG_SERIAL_8250_RSA; only attempt RSA resource acquire if defined. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250: Initialize default dma handlers when setting defaultsPeter Hurley
Prepare for 8250 split; move default dma tx/rx handler initialization into serial8250_set_defaults(), which allows default dma ops to remain unexported from the base port operations module after the split. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250: Initialize fixed type fields when setting defaultsPeter Hurley
Prepare for 8250 split; move fixed type initialization into serial8250_set_defaults(). This enables uart_config[] array to remain file scope in base port operations after the split. NB: the call to serial8250_init_fixed_type_port() from serial8250_register_ports() was added by commit b5d228cc4f85 ("serial: copy UART properties of UPF_FIXED_TYPE ports provisioned using early_serial_setup") specifically to support ports initialized by early_serial_setup(). Since serial8250_set_defaults() is called from early_serial_setup(), fixed type initialization is now already handled there before serial8250_register_ports() is called. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250: Encapsulate port i/o method initPeter Hurley
Prepare for 8250 split; introduce serial8250_set_defaults() to set default port methods prior to driver override. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250: Separate port initializationPeter Hurley
Prepare for 8250 split; introduce serial8250_init_port() to initialize port fields uncoupled from port structure storage. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250: Separate legacy irq handling from core port operationsPeter Hurley
Prepare for 8250 split; decouple irq setup/teardown and handler from core port operations. Introduce setup_irq() and release_irq() 8250 driver methods; the 8250 core will use these methods to install and remove irq handling for the given 8250 port. Refactor irq chain linking/unlinking from 8250 core into univ8250_setup_irq()/univ8250_release_irq() for the universal 8250 driver. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250: Separate 8250 console interfacePeter Hurley
Prepare for 8250 core split; separate shared console interface from the console definition of the universal driver. Introduce 8250 shared console interface; serial8250_console_write() and serial8250_console_setup() which decouples the console operation from the port structure storage. Rename existing serial8250_console* identifiers to univ8250_console*. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250_early: Remove setup_early_serial8250_console()Peter Hurley
setup_earlycon() will now match and register the desired earlycon from the param string (as if 'earlycon=...' had been set on the command line). Use setup_earlycon() from existing arch call sites which start an earlycon directly. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: earlycon: Enable earlycon without command line paramPeter Hurley
Earlycon matching can only be triggered if 'earlycon=...' has been specified on the kernel command line. To workaround this limitation requires tight coupling between arches and specific serial drivers in order to start an earlycon. Devicetree avoids this limitation with a link table that contains the required data to match earlycons. Mirror this approach for earlycon match by name. Re-purpose EARLYCON_DECLARE to generate a table entry which associates name with setup() function. Re-purpose setup_earlycon() to scan this table for an earlycon match, which is registered if found. Declare one "earlycon" early_param, which calls setup_earlycon(). This design allows setup_earlycon() to be called directly with a param string (as if 'earlycon=...' had been set on the command line). Re-registration (either directly or by early_param) is prevented. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: earlycon: Refactor earlycon registrationPeter Hurley
Separate earlycon matching from registration; add register_earlycon which initializes and registers the matched earlycon. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: earlycon: Skip parse_options() if empty stringPeter Hurley
Earlycon param strings of the form earlycon=<name> are rejected from parse_options() with an error (which, in turn, results in a NULL argument for the setup() method options parameter). Only pass non-empty string to parse_options(); this will enable handling actual parse errors differently than expected and allow formats. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: earlycon: Ignore parse_options() error codePeter Hurley
Because setup_earlycon() continues to attempt console registration if an error occurred parsing the option string, the actual value of the error code from parse_options() is ignored. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250_early: Fix setup() error codePeter Hurley
If parsing failed to decode a valid uart addr, return -ENODEV instead of success. Although setup_earlycon() will detect the failure anyway (because the write() method has not been set), that behavior is not obvious and should not be relied on. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250_early: Assume uart already initialized if no baud optionPeter Hurley
The <baud><parity><bit> option string is not supplied if the earlycon is started via devicetree and OF_EARLYCON_DECLARE(). The option string is also not required if started via kernel command line parameters of the form: earlycon=uart,mmio,<addr> console=uart,mmio,<addr> If earlycon_device->baud is 0, then an option string was not supplied. In this case, assume the uart has already been initialized by the bootloader or firmware. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: earlycon: Move ->uartclk initializePeter Hurley
Initializing the ->uartclk field is not related to option parsing; relocate from parse_options() to setup_earlycon() (which mirrors the behavior of of_setup_earlycon()). Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250_early: Remove early_device variablePeter Hurley
early_device was only required for serial8250_find_port_for_earlycon(), which was replaced by extensible console matching. Fixup early_serial8250_write() to get the earlycon_device * from console->data (which is initialized by {of_}setup_earlycon()). Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: core: Fix kernel doc for uart_console_write()Peter Hurley
'/**' is required to start a kernel-doc comment block. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26console: Add extensible console matchingPeter Hurley
Add match() method to struct console which allows the console to perform console command line matching instead of (or in addition to) default console matching (ie., by fixed name and index). The match() method returns 0 to indicate a successful match; normal console matching occurs if no match() method is defined or the match() method returns non-zero. The match() method is expected to set the console index if required. Re-implement earlycon-to-console-handoff with direct matching of "console=uart|uart8250,..." to the 8250 ttyS console. Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250: Decouple core from skip_txen_test module paramPeter Hurley
Prepare for 8250 split; initialize the port flags based on the "skip_txen_test" module param to use the existing flag test. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250: Move ns16550a_goto_hispeed() to local headerPeter Hurley
Prepare for 8250_core.c file split; move shared inline function to local header file. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250: Simplify capabilities reset at port unregisterPeter Hurley
Since uart->port.type has just reset to PORT_UNKNOWN, capabilities are reset to uart_config[PORT_UNKNOWN].flags, which is 0. Removes unnecessary dependency on uart_config[]. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250: Remove duplicate ->handle_irq initializationPeter Hurley
set_io_from_upio() already initializes ->handle_irq to serial8250_default_handle_irq. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-03-26serial: 8250: Compute ttyS index from port minorPeter Hurley
Prepare for 8250 split; calculate the ttyS index directly from the port minor which avoids the global serial8250_reg reference from base port operations. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>