If there isn't a DT alias then of_alias_get_id() will return
-ENODEV. This will cause the msm_serial driver to fail probe,
when we want to keep the previous behavior where we generated a
dynamic line number at probe time. Restore this behavior by
generating a dynamic id if the line number is still negative
after checking for an alias or in the non-DT case looking at the
.id field of the platform device.
Reported-by: Kevin Hilman <[email protected]>
Tested-by: Kevin Hilman <[email protected]>
Signed-off-by: Stephen Boyd <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Commit 68952076e9 ("vt: Remove
vt_get_kmsg_redirect() from uapi header") fails to compile if
!CONFIG_VT_CONSOLE.
Move macro definition for vt_get_kmsg_redirect() up with file-scope
function declarations.
Reported-by: Jim Davis <[email protected]>
Signed-off-by: Peter Hurley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Exynos7 has a similar serial controller to that present in older Samsung
SoCs. To re-use the existing serial driver on Exynos7 we need to have
SERIAL_SAMSUNG_UARTS_4 and SERIAL_SAMSUNG_UARTS selected. This is not
possible because these symbols are dependent on PLAT_SAMSUNG which is
not present for the ARMv8 based exynos7.
Change the dependency of these symbols from PLAT_SAMSUNG to the serial
driver thus making it available on exynos7. As the existing platform
specific code making use of these symbols is related to uart driver this
change in dependency should not cause any issues.
Signed-off-by: Pankaj Dubey <[email protected]>
Signed-off-by: Naveen Krishna Chatradhi <[email protected]>
Signed-off-by: Abhilash Kesavan <[email protected]>
Acked-by: Greg Kroah-Hartman <[email protected]>
Signed-off-by: Kukjin Kim <[email protected]>
This patch fix spelling typo in printk and Kconfig within
various part of kernel sources.
Signed-off-by: Masanari Iida <[email protected]>
Acked-by: Randy Dunlap <[email protected]>
Signed-off-by: Jiri Kosina <[email protected]>
This reverts commit 1bd8324535.
To quote Olof:
This commit broke a whole lot of tegra boards in last night's
-next here. In particular, I've been looking at
tegra20-seaboard, which now doesn't boot with console any more.
Breaking existing systems is bad.
Reported-by: Olof Johansson <[email protected]>
Cc: Lucas Stach <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Add equivalent attributes to those provided in the platform data
for use when RX DMA is enabled.
Signed-off-by: Andrew Jackson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
If the DMA engine doesn't support residue processing then the RX DMA
handling won't work terribly well if polling is enabled. So, disable
RX DMA if residue handling isn't available.
Signed-off-by: Andrew Jackson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The DMA engines on some systems require that the dma_length is set
when using scatter gather lists.
Signed-off-by: Andrew Jackson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The existing code assumed that PL011_DMA_BUFFER_SIZE == UART_XMIT_SIZE,
which may not always be the case. This allows for these two being
different sizes and not copying too much data.
Signed-off-by: Andrew Jackson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Allocating with __GFP_DMA avoids the need for bounce buffers
Signed-off-by: Andrew Jackson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
There is no real value in displaying "serial: Freescale lpuart driver" in every
boot.
The uart_register_driver() can fail and even so the "serial: Freescale lpuart
driver" will be displayed, which is not really helpful.
This is particularly annoying when booting multi_v7_defconfig kernel on a SoC
that is not a Vybrid/Layerscape and even though this message gets displayed.
Signed-off-by: Fabio Estevam <[email protected]>
Acked-by: Jingchang Lu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
'res' will be automatically checked inside devm_ioremap_resource(), so there is
no need to explicitly perform a NULL check.
Signed-off-by: Fabio Estevam <[email protected]>
Acked-by: Jingchang Lu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit removes the address of Free Software Foundation from each
of the mentioned file in order to suppress the checkpatch warning.
Signed-off-by: Konrad Zapalowicz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit enables support for the Digi Classic adapters line in the
jsm driver. This means changes in:
- device probing code
- device cleanup code
- driver description (Kconfig)
The init/cleanup code is based on the staging/dgnc driver.
Signed-off-by: Konrad Zapalowicz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit adds the Digi Classic board implementation to the
staging/jsm driver.
The code here is taken from the staging/dgnc driver and modified to
match the serial/jsm state. This work is mostly based on the changes
that has been done to the code handling the Digi Neo cards with the
inspiration coming from the diff between staging/dgnc and serial/jsm
as well as the LKML history for the jsm_neo.c
The code compiles now and has no sparse and checkpatch errors or
warnings.
Signed-off-by: Konrad Zapalowicz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
In serial8250_rx_chars(), max_count is set to 256. Due to the
post-decrement operator used in the while() condition, the maximum
number of iterations actually 257. This is not a problem, but it is
mildly surprising if you're debugging. Use pre-decrement instead.
Signed-off-by: Frans Klaver <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
When somebody calls TIOCSSERIAL ioctl with serial flags to set one of
* ASYNC_SESSION_LOCKOUT
* ASYNC_PGRP_LOCKOUT
* ASYNC_CALLOUT_NOHUP
* ASYNC_AUTOPROBE
nothing happens. We actually ignore the flags for over a decade at
least (I checked 2.6.0).
So start yelling at users who use those flags, that they shouldn't.
Signed-off-by: Jiri Slaby <[email protected]>
Cc: Peter Hurley <[email protected]>
Cc: Alan Cox <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This commit adds the UART structure for the Digi Classic cards. This
code comes from the staging/dgnc driver.
Signed-off-by: Konrad Zapalowicz <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
port->membase was allocated using devm_ioremap_nocache, so ideally
we should unmap it using devm_iounmap. but it was using iounmap.
Signed-off-by: Sudip Mukherjee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
In the serial8250_tx_dma() the tx_err flag is set in case of error. Thus, there
is no need to repeat this in __dma_tx_complete().
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Since we have the same check inside the function we may drop it away in
__dma_tx_complete().
Signed-off-by: Andy Shevchenko <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Introduce an homogeneous lock system between setting and using the rs485
data of the uart_port.
This patch should not be split into multiple ones in order to avoid
leaving the tree in an unstable state.
Acked-by: Nicolas Ferre <[email protected]>
Reviewed-by: Alan Cox <[email protected]>
Suggested-by: Alan Cox <[email protected]>
Cc: Nicolas Ferre <[email protected]>
Cc: Jiri Slaby <[email protected]>
Cc: One Thousand Gnomes <[email protected]>
Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Once there is no more handlers for TIOC[GS]RS485 there is no need to
call the driver specific ioctl when the generic implementation is
missing.
Reviewed-by: Alan Cox <[email protected]>
Cc: Jiri Slaby <[email protected]>
Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
In order to unify all the rs485 ioctl handling
Use the implementation of TIOC[GS]RS485 ioctl handling on serial_core.
Reviewed-by: Alan Cox <[email protected]>
Cc: Jiri Slaby <[email protected]>
Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
In order to unify all the rs485 ioctl handling
Use the implementation of TIOC[GS]RS485 ioctl handling on serial_core.
Reviewed-by: Alan Cox <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Jiri Slaby <[email protected]>
Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
In order to unify all the rs485 ioctl handling.
Use the implementation of TIOC[GS]RS485 ioctl handling on serial_core.
Reviewed-by: Alan Cox <[email protected]>
Cc: Jiri Slaby <[email protected]>
Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
In order to unify all the rs485 ioctl handling.
Use the implementation of TIOC[GS]RS485 ioctl handling on serial_core.
Reviewed-by: Alan Cox <[email protected]>
Cc: Jiri Slaby <[email protected]>
Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
In order to unify all the rs485 ioctl handling.
Use the implementation of TIOC[GS]RS485 ioctl handling on serial_core.
Reviewed-by: Alan Cox <[email protected]>
Cc: Jiri Slaby <[email protected]>
Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
In order to remove the handler for rs485 ioctls on serial_8250, all the
drivers must use the implementation on serial_core.
Reviewed-by: Alan Cox <[email protected]>
Cc: Jiri Slaby <[email protected]>
Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The following drivers: 8250_core, atmel_serial, max310x, mcf, omap-serial
and sci16is7xx implement code to handle RS485 ioctls.
In order to avoid code duplication, we implement a simple ioctl handler
on the serial_core layer.
This handler can be used by all the other drivers instead of duplicating
code.
Until this is the only RS485 ioctl handler, it will try first the
rs485_config callback and if it is not present it will call the driver
specific ioctl.
Reviewed-by: Alan Cox <[email protected]>
Cc: Greg Kroah-Hartman <[email protected]>
Cc: Jiri Slaby <[email protected]>
Signed-off-by: Ricardo Ribalda Delgado <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
fixed a sparse warning in 8250_core.c :
incorrect type in assignment (different address spaces)
the warning was because an unsigned char pointer was being assigned to
a pointer of unsigned char __iomem type .
Signed-off-by: Sudip Mukherjee <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
WCH382 is a PCI-E card with 1 LPT and 2 DB9 COM ports detected as
Serial controller: Device 1c00:3250 (rev 10) (prog-if 05 [16850])
Signed-off-by: Sergej Pupykin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Switching to the N_PPS line discipline may require enabling
modem status interrupts; conversely switching from N_PPS may
require disabling modem status interrupts.
Affected drivers:
8250
amba-pl010
atmel
Cc: Nicolas Ferre <[email protected]>
Cc: Russell King <[email protected]>
Signed-off-by: Peter Hurley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Three UART drivers (8250, atmel & amba-pl010) directly call their
enable_ms() method; the uart port lock must be acquired before
any h/w programming.
Signed-off-by: Peter Hurley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
UART drivers which enable modem status interrupts when switching
to N_PPS line discipline need to determine if modem status
interrupts should be disabled when switching from N_PPS.
Specifically, the set_ldisc() notification needs to evaluate
UART_ENABLE_MS() which requires termios->c_cflag.
Convert in-tree UART drivers to new interface.
Signed-off-by: Peter Hurley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Three UART drivers (8250, atmel & amba-pl010) enable modem status
interrupts if the line discipline is changed to N_PPS. However,
the uart port flags may only be safely modified while holding the
port mutex.
Signed-off-by: Peter Hurley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Allow a tty driver to safely access termios settings while handling
the set_ldisc() notification. UART drivers use the set_ldisc()
notification to check if the N_PPS line discipline is being enabled;
if so, modem status interrupts may also need to be enabled. Conversely,
modem status interrupts may need to be disabled if switching away
from the N_PPS line discipline.
Signed-off-by: Peter Hurley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The line discipline buffer and the tty buffers must be flushed again
after hardware shutdown; otherwise, a brief window exists between the
ldisc flush in tty_port_close_start() and the subsequent
tty_port_shutdown(), during which more data could be received into the
tty buffers. A racing open might then be able to receive data from the
previous session.
Signed-off-by: Peter Hurley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The port->lock does not protect the filp->f_op field; move
the tty_hung_up_p() test outside the port->lock critical section
in tty_port_close_start().
Signed-off-by: Peter Hurley <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Add support for setting the state of the DTR and RTS signals.
Acked-by: Soren Brinkmann <[email protected]>
Signed-off-by: Lars-Peter Clausen <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Get index of serial line from device tree using function of_alias_get_id().
If no alias is found, the 8250 core takes care of incrementing the line number.
Signed-off-by: Julien CHAUVEAU <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
The general agreed way to specify a fixed line number
for a serial console is to provide a "serial" alias
in the devicetree. Start parsing this property in
of_serial.
Signed-off-by: Lucas Stach <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
Check the return value of ioremap_nocache to make sure we got a
valid mapping.
Signed-off-by: Aaron Sierra <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
This adds 32-bit register lpuart32 power management support,
this also updates the 8-bit register lpuart resume function.
Signed-off-by: Jingchang Lu <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
We are removing the dmaengine_device_control API, that shouldn't even have been
exposed in the first place. Change the callers to use the proper API.
Signed-off-by: Maxime Ripard <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>