...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.
We explicitly disallow a driver unbind, since that doesn't have a
sensible use case anyway, and it allows us to drop the ".remove"
code for non-modular drivers.
Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.
We also delete the MODULE_LICENSE tag etc. since all that information
is already contained at the top of the file in the comments.
...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.
Since module_init translates to device_initcall in the non-modular
case, the init ordering remains unchanged with this commit.
We explicitly disallow a driver unbind, since that doesn't have a
sensible use case anyway, and it allows us to drop the ".remove"
code for non-modular drivers.
We don't replace module.h with init.h since the file already has that.
Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Slaby <jslaby@suse.com> Cc: Michael Ellerman <mpe@ellerman.id.au> Cc: Anton Blanchard <anton@samba.org> Cc: linuxppc-dev@lists.ozlabs.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anton Wuerfel [Thu, 14 Jan 2016 15:08:23 +0000 (16:08 +0100)]
tty: serial: 8250: Fix indentation warnings
Checkpatch complains about incorrect indentation of switch/case statements.
This patch fixes the corresponding warnings. Additionally some indentation
is changed to match the correct format specified in the Linux Kernel
Coding Style.
Signed-off-by: Anton Würfel <anton.wuerfel@fau.de> Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: linux-kernel@i4.cs.fau.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anton Wuerfel [Thu, 14 Jan 2016 15:08:22 +0000 (16:08 +0100)]
tty: serial: 8250: Merge duplicate conditions
This patch refactors a switch case statement by merging an if condition
in the default case into an identical condition right after the switch
statement.
This comes with a slight change in behaviour: If pci_netmos_9900_numports
returns 0, an additional warning is printed.
Signed-off-by: Anton Würfel <anton.wuerfel@fau.de> Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de> Suggested-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: linux-kernel@i4.cs.fau.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anton Wuerfel [Thu, 14 Jan 2016 15:08:21 +0000 (16:08 +0100)]
tty: serial: 8250: Correct conversion specifiers
This patch fixes compiler warnings about wrong conversion specifiers used
in a debug output in 8250_pnp.c. The precise warning is:
drivers/tty/serial/8250/8250_pnp.c: In function ‘serial_pnp_probe’:
include/linux/dynamic_debug.h:64:16: warning: format ‘%x’ expects argument
of [...]
drivers/tty/serial/8250/8250_pnp.c:467:2: note: in expansion of macro
‘dev_dbg’
dev_dbg(&dev->dev,
^
include/linux/dynamic_debug.h:64:16: warning: format ‘%lx’ expects argument
of [...]
drivers/tty/serial/8250/8250_pnp.c:467:2: note: in expansion of macro
‘dev_dbg’
dev_dbg(&dev->dev,
^
Those warnings never got triggered, because the command was nested
in an #ifdef, which is removed by a patch of this series.
Phillip Raffeck [Thu, 14 Jan 2016 15:08:20 +0000 (16:08 +0100)]
tty: serial: 8250: Remove SERIAL_DEBUG_PNP macro
This patch removes the macro SERIAL_DEBUG_PNP, which is used to enable
debugging at compile time.
As SERIAL_DEBUG_PNP is an orphan, the corresponding #ifdef is removed.
To keep the ability to enable debugging at compile time,
the call to printk(KERN_DEBUG ...) is replaced by a corresponding
call to dev_dbg(), which is configurable via CONFIG_DYNAMIC_DEBUG.
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de> Signed-off-by: Anton Würfel <anton.wuerfel@fau.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: linux-kernel@i4.cs.fau.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Phillip Raffeck [Thu, 14 Jan 2016 15:08:19 +0000 (16:08 +0100)]
tty: serial: 8250: Suitably replace printk
This patch replaces printk by the corresponding variant of dev_* in order
to fix checkpatch warnings. If no suitable device pointer is present, the
corresponding pr_* variant is used.
Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de> Signed-off-by: Anton Würfel <anton.wuerfel@fau.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: linux-kernel@i4.cs.fau.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anton Wuerfel [Thu, 14 Jan 2016 15:08:18 +0000 (16:08 +0100)]
tty: serial: 8250: Fix multi-line strings
Merged user-visible multi-line strings into a single line according to the
Linux Kernel Coding Style, which allows user-visible strings to exceed the
maximum line length of 80 characters. The main reason for this is to
facilitate grepping for these strings.
However, some strings were ignored in this patch, because the use of
format specifiers breaks the ability to grep anyway.
Signed-off-by: Anton Würfel <anton.wuerfel@fau.de> Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: linux-kernel@i4.cs.fau.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anton Wuerfel [Thu, 14 Jan 2016 15:08:17 +0000 (16:08 +0100)]
tty: serial: 8250: Add parentheses to macro
This patch fixes a checkpatch warning caused by missing parentheses
in the definition of a macro.
Furthermore redundant parentheses are removed in an assignment.
Signed-off-by: Anton Würfel <anton.wuerfel@fau.de> Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: linux-kernel@i4.cs.fau.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Anton Wuerfel [Thu, 14 Jan 2016 15:08:10 +0000 (16:08 +0100)]
tty: serial: 8250: Fix whitespace errors
This patch fixes whitespace errors reported by checkpatch to increase
readability. Main focus is on missing spaces after commas in
function headers and macros (like foo,bar edited to foo, bar).
Signed-off-by: Anton Würfel <anton.wuerfel@fau.de> Signed-off-by: Phillip Raffeck <phillip.raffeck@fau.de> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Cc: linux-kernel@i4.cs.fau.de Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
serial: zs: Fix a transmit lockup in console output
Transmit interrupts are disabled and the transmit buffer drained in the
course of console output so that polled transmission is possible. That
however causes a lost transmit interrupt as the TxIP bit in RR3 is only
set on a transmit buffer full-to-empty transition and then iff transmit
interrupts are enabled at the same time. Consequently if console output
disturbs a regular transmission in progress, the TxIP bit is never set
again and the transmission locks up waiting for a transmit interrupt.
Fix the problem by restarting transmission manually rather than waiting
for a transmit interrupt that will never happen.
Signed-off-by: Maciej W. Rozycki <macro@linux-mips.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Martin Sperl [Sun, 17 Jan 2016 12:15:30 +0000 (12:15 +0000)]
serial: bcm2835: add driver for bcm2835-aux-uart
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>
Rich Felker [Fri, 8 Jan 2016 20:33:50 +0000 (15:33 -0500)]
serial-uartlite: fix missing locking in isr
The uartlite driver suffers from missing/duplicate/corrupted character
data when the interrupt handler runs concurrently with access to the
device from another cpu. Take the port spinlock to exclude concurrent
access.
Rich Felker [Fri, 8 Jan 2016 20:34:05 +0000 (15:34 -0500)]
serial-uartlite: add earlycon support
Microblaze currently uses the old earlyprintk system, rather than the
unified earlycon support, to show boot messages on uartlite. Add
earlycon support so that other archs using uartlite can benefit from
it. The new code in uartlite.c is copied almost verbatim from
arch/microblaze/kernel/early_printk.c.
Paul Gortmaker [Thu, 7 Jan 2016 18:28:32 +0000 (13:28 -0500)]
drivers/tty: make serial 8250_ingenic.c explicitly non-modular
The Kconfig currently controlling compilation of this code is:
drivers/tty/serial/8250/Kconfig:config SERIAL_8250_INGENIC
drivers/tty/serial/8250/Kconfig: bool "Support for Ingenic SoC serial ports"
...meaning that it currently is not being built as a module by anyone.
Lets remove the modular code that is essentially orphaned, so that
when reading the driver there is no doubt it is builtin-only.
We explicitly disallow a driver unbind, since that doesn't have a
sensible use case anyway, and it allows us to drop the ".remove"
code for non-modular drivers.
Since module_platform_driver() uses the same init level priority as
builtin_platform_driver() the init ordering remains unchanged with
this commit.
Also note that MODULE_DEVICE_TABLE is a no-op for non-modular code.
We also delete the MODULE_LICENSE tag etc. since all that information
was (or is now) contained at the top of the file in the comments.
Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Slaby <jslaby@suse.com> Cc: Matt Redfearn <matt.redfearn@imgtec.com> Cc: Masahiro Yamada <yamada.masahiro@socionext.com> Cc: Paul Burton <paul.burton@imgtec.com> Cc: Peter Hurley <peter@hurleysoftware.com> Cc: linux-serial@vger.kernel.org Signed-off-by: Paul Gortmaker <paul.gortmaker@windriver.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
serial: sh-sci: Add support for SCIFA/SCIFB variable sampling rates
Add support for sparse variable sampling rates on SCIFA and SCIFB.
According to the datasheet, sampling rate 1/5 needs a small quirk to
avoid corrupting the first byte received.
This increases the range and accuracy of supported baud rates.
E.g. on r8a7791/koelsch:
- Supports now 134, 150, and standard 500000-4000000 bps,
- Perfect match for 134, 150, 500000, 1000000, 2000000, and 4000000
bps,
- Accuracy has increased for most standard bps values.
serial: sh-sci: Use a bitmask to indicate supported sampling rates
Replace the single sampling rate and special handling for HSCIF's
variable sampling rates by a bitmask and a custom iterator.
This prepares for the advent of SCIFA/SCIFB's sparse variable sampling
rates.
serial: sh-sci: Use premultiplier to handle half sampling rate
On SCIx variants different from HSCIF, the bit rate is equal to the
sampling clock rate divided by half the sampling rate. Currently this is
handled by dividing the sampling rate by two, which was OK as it was
always even.
Replace halving the sampling rate by premultiplying the base clock
frequency by 2, to accommodate odd sampling rates on SCIFA/SCIFB later.
Replace the shift value in the BRG divider calculation by a
premultiplication of the base clock frequency too, for consistency.
serial: sh-sci: Preserve SCIFA/SCIFB bit rate config for serial console
SCIFA and SCIFB have additional bit rate config bits in the Serial Mode
Register. Don't touch them when using the port as a serial console, as
we rely on the boot loader to have configured the serial port config.
Soren Brinkmann [Tue, 12 Jan 2016 01:41:39 +0000 (17:41 -0800)]
tty: xuartps: Improve sysrq handling
Handling magic sysrq included dropping a lock to avoid a deadlock that
happened when cdns_uart_console_write tried to acquire a lock in the
from the sysrq code path. By making the acquisition of the lock in
cdns_uart_console_write depending on port->sysrq, cdns_uart_handle_rx can be
simplified to simply call uart_handle_sysrq.
Soren Brinkmann [Tue, 12 Jan 2016 01:41:37 +0000 (17:41 -0800)]
tty: xuartps: Refactor IRQ handling
The system could deadlock handling RX IRQs when RX-related IRQ
conditions became true while the receiver was disabled. To avoid this,
enable/disable the RX/TX IRQs together with the receiver/transmitter.
Soren Brinkmann [Sat, 26 Dec 2015 10:43:56 +0000 (02:43 -0800)]
tty: xuartps: Move RX path into helper function
Move RX-related IRQ handling into a helper function.
Fixes a problem where every char received after a parity or frame error
in the current isr will also be tagged as a parity or frame error.
Soren Brinkmann [Sat, 26 Dec 2015 10:43:55 +0000 (02:43 -0800)]
tty: xuartps: Acquire port lock for shutdown
Shutting down the UART port can happen while console operations are in
progress. Holding the port lock serializes these operations and avoids
the UART HW to be disabled in the middle of console prints.
Soren Brinkmann [Sat, 26 Dec 2015 10:43:51 +0000 (02:43 -0800)]
tty: xuartps: Don't consider circular buffer when enabling transmitter
Restarting the transmitter even if the circ buffer is empty may be
necessary to push out remaining data when the port is restarted after
being stopped.
Cc: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Soren Brinkmann <soren.brinkmann@xilinx.com> Reviewed-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Soren Brinkmann [Sat, 26 Dec 2015 10:43:50 +0000 (02:43 -0800)]
tty: xuartps: Use spinlock to serialize HW access
Instead of disabling the IRQ, use the spin lock to serialize accesses to
the HW. This protects the driver from interference of non-IRQ callbacks
with each other and makes the driver more consistent in its
serialization method.
Jan Beulich [Tue, 22 Dec 2015 15:57:06 +0000 (08:57 -0700)]
serial/8250_pci: simplify Pericom handling
Considering that pci_pericom_setup(()'s only difference to
pci_default_setup() is the setting of the uartclk field, and taking
into account that this field already gets taken care of by having the
base_baud field filled in the pci_boards[] entries, there's no need
for both the function and the quirks table entry.
Signed-off-by: Jan Beulich <jbeulich@suse.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Arnd Bergmann [Wed, 20 Jan 2016 10:40:03 +0000 (11:40 +0100)]
serial: amba-pl011: mark vendor_zte as __maybe_unused
The pl011 driver has gone back and forth on the definition of the
ZTE specific variation of the hardware definitions, but the
current state is that the vendor definition is left in place
yet unused:
drivers/tty/serial/amba-pl011.c:190:27: warning: 'vendor_zte' defined but not used [-Wunused-variable]
I don't know what the plan forward is to get this code to work,
but the current behavior is a bit annoying as we get a warning
whenever we build this driver.
This patch does not help us to make it work, but at least
shuts up the warning.
Signed-off-by: Arnd Bergmann <arnd@arndb.de> Fixes: 7ec758718920 ("tty: amba-pl011: add support for ZTE UART (EXPERIMENTAL)") Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Timur Tabi [Fri, 15 Jan 2016 20:32:20 +0000 (14:32 -0600)]
serial: amba-pl011: use cpu_relax when polling registers
Busy loops that poll on a register should call cpu_relax(). On some
architectures, it can lower CPU power consumption or yield to a
hyperthreaded twin processor. It also serves as a compiler barrier,
so it can replace barrier() calls.
Signed-off-by: Timur Tabi <timur@codeaurora.org> Reviewed-by: Dave Martin <Dave.Martin@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jaeden Amero [Tue, 26 Jan 2016 11:34:49 +0000 (12:34 +0100)]
serial: atmel: Use atmel_port consistently
In all functions other than atmel_serial_probe_fifos,
atmel_serial_probe, and atmel_console_init, the name "port" is used to
refer to an instance of struct uart_port. In many of these functions,
"atmel_port" is used to refer to an instance of struct atmel_uart_port.
We make the use of the name "port" consistent by making
atmel_serial_probe_fifos, atmel_serial_probe, and atmel_console_init
use "atmel_port" to refer to an instance of struct atmel_uart_port
instead of the previous name of "port".
Signed-off-by: Jaeden Amero <jaeden.amero@ni.com> Signed-off-by: Kyle Roeschley <kyle.roeschley@ni.com> Acked-by: Karthik Manamcheri <karthik.manamcheri@ni.com>
[nicolas.ferre@atmel.com: fix typo in variable, adapt to newer kernel] Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Nicolas Ferre [Tue, 26 Jan 2016 10:26:14 +0000 (11:26 +0100)]
serial: atmel: trivial: clean the IP version decoding code
No functional change is associated with this patch.
A driver property depends on the Atmel serial IP revision. This property
is the way the rx timeout is handled: by an hardware or software timer.
So, change this property name and setup code so that it's easier to understand
and more future proof as the distinction of USART vs. UART is blurrier on newer
SoCs.
Variable names and debug comments are also adapted to make this code more obvious.
Signed-off-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Sebastian Frias [Fri, 18 Dec 2015 16:40:05 +0000 (17:40 +0100)]
8250: use callbacks to access UART_DLL/UART_DLM
Some UART HW has a single register combining UART_DLL/UART_DLM
(this was probably forgotten in the change that introduced the
callbacks, commit b32b19b8ffc05cbd3bf91c65e205f6a912ca15d9)
Fixes: b32b19b8ffc0 ("[SERIAL] 8250: set divisor register correctly ...") Signed-off-by: Sebastian Frias <sf84@laposte.net> Reviewed-by: Peter Hurley <peter@hurleysoftware.com> Cc: stable <stable@vger.kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Noam Camus [Sat, 12 Dec 2015 17:18:25 +0000 (19:18 +0200)]
serial: 8250_dw: Avoid serial_outx code duplicate with new dw8250_check_lcr()
With the help of Heikki we take common code that
makes sure LCR write wasn't ignored and put it in new function called
dw8250_check_lcr(). This function serves 3 serial_out routines:
dw8250_serial_out(), dw8250_serial_out32(), and dw8250_serial_outq().
This patch only brings better code reuse.
Signed-off-by: Noam Camus <noamc@ezchip.com> Cc: Heikki Krogerus <heikki.krogerus@linux.intel.com> Cc: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tty: 8250_omap: Use software emulated RS485 direction control
Use software emulated RS485 direction control to provide RS485 API
existed in omap_serial driver. Note that 8250_omap issues interrupt
on shift register empty which is single prerequesite for using software
emulated RS485.
Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Implementation of software emulation of RS485 direction handling is based
on omap_serial driver.
Before and after transmission RTS is set to the appropriate value.
Note that before calling serial8250_em485_init() the caller has to
ensure that UART will interrupt when shift register empty. Otherwise,
emultaion cannot be used.
Both serial8250_em485_init() and serial8250_em485_destroy() are
idempotent functions.
Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
tty: Move serial8250_stop_rx() in front of serial8250_start_tx()
Software RS485 emultaion is to be added in the following commit.
serial8250_start_tx() will need to refer serial8250_stop_rx().
Move serial8250_stop_rx() in front of serial8250_start_tx() in order
to avoid function forward declaration.
Signed-off-by: Matwey V. Kornilov <matwey@sai.msu.ru> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Jiri Slaby [Tue, 12 Jan 2016 09:59:07 +0000 (10:59 +0100)]
TTY: serial/m32r_sio, simplify old_serial_port
The only variables in old_serial_port are port and irq. So make
old_serial_port contain only those two and move the initialization of
the rest to the place where old_serial_port is actually read.
Also get rid of SERIAL_PORT_DFNS. It is ugly and having the
initializer where it belongs makes more sense. Finally, use already
defined UART_NR in the loop.
Jiri Slaby [Tue, 12 Jan 2016 09:59:06 +0000 (10:59 +0100)]
TTY: serial/m32r_sio, disband m32r_sio.h
The only needed information from the header is struct old_serial_port.
Move it to m32r_sio.c, make it const and anonymous. And kill the rest
from the header as it is dead stuff.
Given m32r_sio_suspend_port and m32r_sio_resume_port are local to
m32r_sio.c and unused, kill them from .c too.
Jiri Slaby [Tue, 12 Jan 2016 09:49:33 +0000 (10:49 +0100)]
TTY: serial/mpsc, clean up init/remove functions
There is a chain of up to 4 nested ifs in init and remove functions.
Instead, make the code linear and use goto's to handle failures.
Remove unneeded cast from mpsc_release_port by referencing pi->port
directly. And finally, use dev_dbg instead of pr_debug given we have
dev->dev node.
Jiri Slaby [Tue, 12 Jan 2016 09:49:32 +0000 (10:49 +0100)]
TTY: serial/mpsc, stop leaking mappings
When mpsc_routing_base, sdma_intr_base, mpsc_base, sdma_base, and
brg_base are mapped, they are never unmapped. The condition in the
free paths is always 'if (!XXX_base) { unmap }'. Fix it by inverting
the condition.
Peter Hurley [Sat, 16 Jan 2016 23:23:49 +0000 (15:23 -0800)]
serial: 8250_omap: Add omap8250 earlycon
Add DT earlycon for 8250_omap driver. This boot console is included
for kernels built with CONFIG_SERIAL_EARLYCON=y, CONFIG_OF=y,
CONFIG_SERIAL_8250_OMAP=y, and CONFIG_OF_EARLY_FLATTREE=y.
This boot console is enabled with the command line option "earlycon"
(without "=<name>...") when the DT 'stdout-path' property matches a
compatible uart. For example,
Peter Hurley [Sat, 16 Jan 2016 23:23:48 +0000 (15:23 -0800)]
of: earlycon: Log more helpful message if stdout-path node not found
Earlycon may fail to initialize for a variety of reasons, most of
which log the default early param message. If the stdout-path node is
not found, log the path which was not found (and suppress the
default early param message).
Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Hurley [Sat, 16 Jan 2016 23:23:44 +0000 (15:23 -0800)]
of: earlycon: Move address translation to of_setup_earlycon()
Cleanup the early DT/earlycon separation; remove the 'addr' parameter
from of_setup_earlycon() and get the uart phys addr directly with a
new wrapper function, of_flat_dt_translate_addr(). Limit
fdt_translate_address() to file scope.
Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Hurley [Sat, 16 Jan 2016 23:23:43 +0000 (15:23 -0800)]
of: earlycon: Initialize port fields from DT properties
Read the optional "reg-offset", "reg-shift", "reg-io-width" and endianness
properties and initialize the respective struct uart_port field if found.
NB: These bindings are common to several drivers and the values merely
indicate the default value; the registering earlycon setup() method can
simply override the values if required.
Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Hurley [Sat, 16 Jan 2016 23:23:40 +0000 (15:23 -0800)]
serial: earlycon: Fixup earlycon console name and index
Properly initialize the struct console 'name' and 'index' fields for
the registering earlycon. For earlycons w/o trailing numerals, the
index is set to 0; otherwise, the index is set to the value of the
trailing numeral. For example, the 'exynos4210' earlycon name == "exynos"
and index == 4210. Earlycons with embedded numerals will have all
non-trailing numerals as part of the name; for example, the 's3c2412'
earlycon name == "s3c" and index == 2412.
This ackward scheme was initially added for the uart8250 earlycon;
adopt this scheme for the other earlycon "drivers".
Introduce earlycon_init() which performs the string scanning and
initializes the name and index fields; encapsulate the other console
field initializations within.
Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Peter Hurley [Sat, 16 Jan 2016 23:23:39 +0000 (15:23 -0800)]
earlycon: Use common framework for earlycon declarations
Use a single common table of struct earlycon_id for both command line
and devicetree. Re-define OF_EARLYCON_DECLARE() macro to instance a
unique earlycon declaration (the declaration is only guaranteed to be
unique within a compilation unit; separate compilation units must still
use unique earlycon names).
The semantics of OF_EARLYCON_DECLARE() is different; it declares an
earlycon which can matched either on the command line or by devicetree.
EARLYCON_DECLARE() is semantically unchanged; it declares an earlycon
which is matched by command line only. Remove redundant instances of
EARLYCON_DECLARE().
This enables all earlycons to properly initialize struct console
with the appropriate name and index, which improves diagnostics and
enables direct earlycon-to-console handoff.
Acked-by: Rob Herring <robh@kernel.org> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
Linus Torvalds [Mon, 1 Feb 2016 01:36:45 +0000 (17:36 -0800)]
Merge tag 'usb-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb
Pull USB driver fixes from Greg KH:
"Here are some small USB fixes and new device ids for 4.5-rc2. Nothing
major here, full details are in the shortlog, and all of these have
been in linux-next successfully"
* tag 'usb-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb:
USB: option: fix Cinterion AHxx enumeration
USB: mxu11x0: fix memory leak on usb_serial private data
USB: serial: ftdi_sio: add support for Yaesu SCU-18 cable
USB: serial: option: Adding support for Telit LE922
USB: serial: visor: fix crash on detecting device without write_urbs
USB: visor: fix null-deref at probe
USB: cp210x: add ID for IAI USB to RS485 adaptor
usb: hub: do not clear BOS field during reset device
cdc-acm:exclude Samsung phone 04e8:685d
usb: cdc-acm: send zero packet for intel 7260 modem
usb: cdc-acm: handle unlinked urb in acm read callback
Linus Torvalds [Mon, 1 Feb 2016 01:09:39 +0000 (17:09 -0800)]
Merge tag 'tty-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty
Pull tty/serial fixes from Greg KH:
"Here are some small tty/serial driver fixes for 4.5-rc2.
They resolve a number of reported problems (the ioctl one specifically
has been pointed out by numerous people) and one patch adds some new
device ids for the 8250_pci driver. All have been in linux-next
successfully"
* tag 'tty-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/tty:
serial: 8250_pci: Add Intel Broadwell ports
staging/speakup: Use tty_ldisc_ref() for paste kworker
n_tty: Fix unsafe reference to "other" ldisc
tty: Fix unsafe ldisc reference via ioctl(TIOCGETD)
tty: Retry failed reopen if tty teardown in-progress
tty: Wait interruptibly for tty lock on reopen
Linus Torvalds [Mon, 1 Feb 2016 01:00:27 +0000 (17:00 -0800)]
Merge tag 'staging-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging
Pull staging fixes from Greg KH:
"Here are some small staging driver fixes for 4.5-rc2.
One of them predated 4.4-final, but I missed that merge window due to
the holliday. The others fix reported issues that have come up
recently. The tty change is needed for the speakup driver fix and has
the ack of the tty driver maintainer as well, i.e. myself :)
All have been in linux-next with no reported issues"
* tag 'staging-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/staging:
Staging: speakup: fix read scrolled-back VT
Staging: speakup: Fix getting port information
Revert "Staging: panel: usleep_range is preferred over udelay"
iio: adis_buffer: Fix out-of-bounds memory access
Linus Torvalds [Mon, 1 Feb 2016 00:55:04 +0000 (16:55 -0800)]
Merge tag 'driver-core-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core
Pull driver core fix from Greg KH:
"Here's a single driver core fix that resolves an issue a lot of users
have been hitting for a while now. It's been tested a lot and has
been in linux-next successfully for a while"
* tag 'driver-core-4.5-rc2' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/driver-core:
base/platform: Fix platform drivers with no probe callback
Linus Torvalds [Mon, 1 Feb 2016 00:17:19 +0000 (16:17 -0800)]
Merge branch 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull x86 fixes from Thomas Gleixner:
"A bit on the largish side due to a series of fixes for a regression in
the x86 vector management which was introduced in 4.3. This work was
started in December already, but it took some time to fix all corner
cases and a couple of older bugs in that area which were detected
while at it
Aside of that a few platform updates for intel-mid, quark and UV and
two fixes for in the mm code:
- Use proper types for pgprot values to avoid truncation
- Prevent a size truncation in the pageattr code when setting page
attributes for large mappings"
* 'x86-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (21 commits)
x86/mm/pat: Avoid truncation when converting cpa->numpages to address
x86/mm: Fix types used in pgprot cacheability flags translations
x86/platform/quark: Print boundaries correctly
x86/platform/UV: Remove EFI memmap quirk for UV2+
x86/platform/intel-mid: Join string and fix SoC name
x86/platform/intel-mid: Enable 64-bit build
x86/irq: Plug vector cleanup race
x86/irq: Call irq_force_move_complete with irq descriptor
x86/irq: Remove outgoing CPU from vector cleanup mask
x86/irq: Remove the cpumask allocation from send_cleanup_vector()
x86/irq: Clear move_in_progress before sending cleanup IPI
x86/irq: Remove offline cpus from vector cleanup
x86/irq: Get rid of code duplication
x86/irq: Copy vectormask instead of an AND operation
x86/irq: Check vector allocation early
x86/irq: Reorganize the search in assign_irq_vector
x86/irq: Reorganize the return path in assign_irq_vector
x86/irq: Do not use apic_chip_data.old_domain as temporary buffer
x86/irq: Validate that irq descriptor is still active
x86/irq: Fix a race in x86_vector_free_irqs()
...
Linus Torvalds [Sun, 31 Jan 2016 23:49:06 +0000 (15:49 -0800)]
Merge branch 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull timer fixes from Thomas Gleixner:
"The timer departement delivers:
- a regression fix for the NTP code along with a proper selftest
- prevent a spurious timer interrupt in the NOHZ lowres code
- a fix for user space interfaces returning the remaining time on
architectures with CONFIG_TIME_LOW_RES=y
- a few patches to fix COMPILE_TEST fallout"
* 'timers-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
tick/nohz: Set the correct expiry when switching to nohz/lowres mode
clocksource: Fix dependencies for archs w/o HAS_IOMEM
clocksource: Select CLKSRC_MMIO where needed
tick/sched: Hide unused oneshot timer code
kselftests: timers: Add adjtimex SETOFFSET validity tests
ntp: Fix ADJ_SETOFFSET being used w/ ADJ_NANO
itimers: Handle relative timers with CONFIG_TIME_LOW_RES proper
posix-timers: Handle relative timers with CONFIG_TIME_LOW_RES proper
timerfd: Handle relative timers with CONFIG_TIME_LOW_RES proper
hrtimer: Handle remaining time proper for TIME_LOW_RES
clockevents/tcb_clksrc: Prevent disabling an already disabled clock
Linus Torvalds [Sun, 31 Jan 2016 23:44:04 +0000 (15:44 -0800)]
Merge branch 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull scheduler fixes from Thomas Gleixner:
"Three small fixes in the scheduler/core:
- use after free in the numa code
- crash in the numa init code
- a simple spelling fix"
* 'sched-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
pid: Fix spelling in comments
sched/numa: Fix use-after-free bug in the task_numa_compare
sched: Fix crash in sched_init_numa()
Linus Torvalds [Sun, 31 Jan 2016 23:38:27 +0000 (15:38 -0800)]
Merge branch 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip
Pull perf fixes from Thomas Gleixner:
"This is much bigger than typical fixes, but Peter found a category of
races that spurred more fixes and more debugging enhancements. Work
started before the merge window, but got finished only now.
Aside of that this contains the usual small fixes to perf and tools.
Nothing particular exciting"
* 'perf-urgent-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip: (43 commits)
perf: Remove/simplify lockdep annotation
perf: Synchronously clean up child events
perf: Untangle 'owner' confusion
perf: Add flags argument to perf_remove_from_context()
perf: Clean up sync_child_event()
perf: Robustify event->owner usage and SMP ordering
perf: Fix STATE_EXIT usage
perf: Update locking order
perf: Remove __free_event()
perf/bpf: Convert perf_event_array to use struct file
perf: Fix NULL deref
perf/x86: De-obfuscate code
perf/x86: Fix uninitialized value usage
perf: Fix race in perf_event_exit_task_context()
perf: Fix orphan hole
perf stat: Do not clean event's private stats
perf hists: Fix HISTC_MEM_DCACHELINE width setting
perf annotate browser: Fix behaviour of Shift-Tab with nothing focussed
perf tests: Remove wrong semicolon in while loop in CQM test
perf: Synchronously free aux pages in case of allocation failure
...