Age | Commit message (Collapse) | Author | Files | Lines |
|
if we get the valid dma channels from dts, move to use dmaengine to do
rx/tx. because the dma hardware requires dma address and length to be
4bytes aligned, in this driver, we will still use PIO for non-aligned
bytes, and use dma for aligned bytes.
for rx, to keep the dmaengine always active, we use double-buffer, so
we issue two dma_desc at first, and maintain the status of both
1. dma transfer done: update in rx dma finish callback
2. dma buffer is inserted into tty: update in rx dma finish tasklet and
rx timeout tasklet
so we re-issue the dma_desc only if both 1&2 are finished.
for tx, as we know the actual length for every transfer, we don't need
the above double buffering.
Signed-off-by: Qipan Li <[email protected]>
Signed-off-by: Barry Song <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
startup_uart_controller() loses namespace, this patch
drops the function directly and move the content into
sirfsoc_uart_startup().
Signed-off-by: Qipan Li <[email protected]>
Signed-off-by: Barry Song <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
fix the typo in commit 2eb5618de87927e54 which uses two
gpios for rts/cts.
Signed-off-by: Qipan Li <[email protected]>
Signed-off-by: Barry Song <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Use devm_ioremap_resource instead of devm_request_and_ioremap.
This was done using the semantic patch
scripts/coccinelle/api/devm_ioremap_resource.cocci
and various manual modifications to move associated calls to
platform_get_resource closer to the resulting call to devm_ioremap_resource
and to remove the associated error handling code.
The initialization of port->mapbase is also moved lower, to take advantage
of the NULL test on res performed by devm_ioremap_resource.
Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
When a serial port is configured for RTS/CTS flow control, serial core
will disable the transmitter if it observes CTS is de-asserted. This is
perfectly reasonable and appropriate when the UART lacks the ability to
automatically perform CTS flow control.
However, if the UART hardware can manage flow control automatically, it
is important that software not get involved. When the DesignWare UART
enables 16C750 style auto-RTS/CTS it stops generating interrupts for
changes in CTS state so software mostly stays out of the way. However,
it does report the true state of CTS in the MSR so software may notice
it is de-asserted and respond by improperly disabling the transmitter.
Once this happens the transmitter will be blocked forever.
To avoid this situation, we simply lie to the 8250 and serial core by
reporting that CTS is asserted whenever auto-RTS/CTS mode is enabled.
Signed-off-by: Tim Kryger <[email protected]>
Reviewed-by: Matt Porter <[email protected]>
Reviewed-by: Markus Mayer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The recent patch to add RS485 contained a bug whereby the IER
interrupt was cleared down incorrectly.
This patch fixes the problem.
Signed-off-by: Mark Jackson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Function wait_for_xmitr is invoked only on functions that either depend
on CONFIG_CONSOLE_POLL or CONFIG_SERIAL_PCH_UART_CONSOLE.
This patch fixes the following warning:
drivers/tty/serial/pch_uart.c:1504:13: warning: ‘wait_for_xmitr’ defined but not used [-Wunused-function]
Signed-off-by: Luis Henriques <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
for USP-based UART, we use two gpios as RTS and CST pins.
Signed-off-by: Qipan Li <[email protected]>
Signed-off-by: Barry Song <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
pinctrl core will get default pinmux, so drop it in the sirfsoc serial driver.
Cc: Linus Walleij <[email protected]>
Signed-off-by: Barry Song <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch adds RS485 support to the OMAP serial driver, as
defined in:-
Documentation/devicetree/bindings/serial/rs485.txt
When a UART transmitter is connected to (eg) a RS485 driver, it is
necessary to turn the driver on/off as quickly as possible. This is
best achieved in the serial driver itself (rather than in userspace
where the latency can be quite large).
This patch allows a GPIO pin to be defined (via DT) that controls
the enabling of the driver at the start of a message, and disables
the driver when the message has been completed.
When RS485 is disabled, the RTS pin is set to on.
Signed-off-by: Mark Jackson <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Remove unneeded error handling on the result of a call to
platform_get_resource when the value is passed to devm_ioremap_resource.
Move the call to platform_get_resource adjacent to the call to
devm_ioremap_resource to make the connection between them more clear.
A simplified version of the semantic patch that makes this change is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@@
expression pdev,res,n,e,e1;
expression ret != 0;
identifier l;
@@
- res = platform_get_resource(pdev, IORESOURCE_MEM, n);
... when != res
- if (res == NULL) { ... \(goto l;\|return ret;\) }
... when != res
+ res = platform_get_resource(pdev, IORESOURCE_MEM, n);
e = devm_ioremap_resource(e1, res);
// </smpl>
Signed-off-by: Julia Lawall <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fix the following sparse warnings:
drivers/tty/serial/amba-pl011.c:687:20: warning: context imbalance in 'pl011_dma_flush_buffer' - unexpected unlock
drivers/tty/serial/amba-pl011.c:1200:13: warning: context imbalance in 'pl011_rx_chars' - unexpected unlock
Signed-off-by: Fabio Estevam <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The clock should be checked with the proper IS_ERR() api before using it.
Signed-off-by: John Crispin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Enable the clock if one is present when setting up the console.
Signed-off-by: Thomas Langer <[email protected]>
Acked-by: John Crispin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
__initdata should be placed between the variable name and equal
sign for the variable to be placed in the intended section.
Signed-off-by: Sachin Kamat <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
__initdata should be placed between the variable name and equal
sign for the variable to be placed in the intended section.
Signed-off-by: Sachin Kamat <[email protected]>
Acked-by: Sonic Zhang <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
'cons' is a pointer; thus NULL should be used instead of 0.
Also, local symbols are staticized.
Fix the following sparse warnings:
drivers/tty/serial/serial-tegra.c:1209:27: warning: Using plain integer as NULL pointer
drivers/tty/serial/serial-tegra.c:1240:29: warning: symbol 'tegra20_uart_chip_data' was not declared. Should it be static?
drivers/tty/serial/serial-tegra.c:1246:29: warning: symbol 'tegra30_uart_chip_data' was not declared. Should it be static?
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fix the following sparse warning:
drivers/tty/serial/msm_serial.c:237:37: error: incompatible types in comparison expression (different type sizes)
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
ioc4_serial_attach_one() is used only in this file.
Also, ioc4_serial is not used; it can be removed.
Fix the following sparse warnings:
drivers/tty/serial/ioc4_serial.c:300:3: warning: symbol 'ioc4_serial' was not declared. Should it be static?
drivers/tty/serial/ioc4_serial.c:2771:1: warning: symbol 'ioc4_serial_attach_one' was not declared. Should it be static?
Signed-off-by: Jingoo Han <[email protected]>
Acked-by: Patrick Gefre <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
icom_port->uart_port.membase is (unsigned char __iomem *); thus,
casting (unsigned char __iomem *) is necessary to fix the
following warning. Also, local symbols are staticized.
drivers/tty/serial/icom.c:108:26: warning: symbol 'start_proc' was not declared. Should it be static?
drivers/tty/serial/icom.c:116:26: warning: symbol 'stop_proc' was not declared. Should it be static?
drivers/tty/serial/icom.c:123:25: warning: symbol 'int_mask_tbl' was not declared. Should it be static?
drivers/tty/serial/icom.c:1569:54: warning: incorrect type in assignment (different address spaces)
drivers/tty/serial/icom.c:1569:54: expected unsigned char [noderef] <asn:2>*membase
drivers/tty/serial/icom.c:1569:54: got char *<noident>
drivers/tty/serial/icom.c:1090:9: warning: cast truncates bits from constant value (ffffff7f becomes 7f)
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
These local symbols are used only in this file.
Fix the following sparse warnings:
drivers/tty/serial/timbuart.c:165:6: warning: symbol 'timbuart_handle_rx_port' was not declared. Should it be static?
drivers/tty/serial/timbuart.c:187:6: warning: symbol 'timbuart_tasklet' was not declared. Should it be static?
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
max->port.membase is (unsigned char __iomem *); thus,
casting (unsigned char __iomem *) is necessary to fix
the following warning. Also, serial_m3110_ops() is staticized.
drivers/tty/serial/mrst_max3110.c:716:17: warning: symbol 'serial_m3110_ops' was not declared. Should it be static?
drivers/tty/serial/mrst_max3110.c:847:27: warning: incorrect type in assignment (different address spaces)
drivers/tty/serial/mrst_max3110.c:847:27: expected unsigned char [noderef] <asn:2>*membase
drivers/tty/serial/mrst_max3110.c:847:27: got void *<noident>
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Fix the following sparse warning:
drivers/tty/serial/8250/8250_early.c:196:26: error: incompatible types in comparison expression (different type sizes)
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
port->membase is (unsigned char __iomem *), not (unsigned long *)
__set_bit() uses (unsigned long *) as the second argument.
Thus, casting (unsigned long *)(unsigned long) is necessary
to fix the following sparse warnings.
drivers/tty/serial/samsung.c:142:33: warning: cast removes address space of expression
drivers/tty/serial/samsung.c:161:33: warning: cast removes address space of expression
drivers/tty/serial/samsung.c:176:33: warning: cast removes address space of expression
drivers/tty/serial/samsung.c:526:40: warning: cast removes address space of expression
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
These local symbols are used only in this file.
Fix the following sparse warnings:
drivers/tty/serial/sirfsoc_uart.c:147:6: warning: symbol 'sirfsoc_uart_start_tx' was not declared. Should it be static?
drivers/tty/serial/sirfsoc_uart.c:636:5: warning: symbol 'sirfsoc_uart_probe' was not declared. Should it be static?
Signed-off-by: Jingoo Han <[email protected]>
Acked-by: Barry Song <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Universal Serial Ports (USP) can be used as PCM, UART, SPI,
I2S etc. this makes the USP work as UART. the basic work
flow is same with UART controller, the main difference will
be offset of registers and bits.
this patch makes the old sirfsoc uart driver support both
sirf UART and USP-based UART by making their differences
become private data.
Signed-off-by: Qipan Li <[email protected]>
Signed-off-by: Barry Song <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
the marco and coming new CSR multiple SoCs have SET/CLR pair for
INTEN registers to avoid some read-modify-write.
this patch adds support for this and make the driver support current
up and coming mp SoCs.
Signed-off-by: Barry Song <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
devicetrees may have the linux,stdout-path property to specify the
console. This patch adds support to the i.MX serial driver for this.
Signed-off-by: Sascha Hauer <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Use devm_* functions in order to simplify cleanup
paths.
Signed-off-by: Gabor Juhos <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
These local symbols are used only in this file.
Fix the following sparse warnings:
drivers/tty/serial/pxa.c:793:17: warning: symbol 'serial_pxa_pops' was not declared. Should it be static?
drivers/tty/serial/pxa.c:971:12: warning: symbol 'serial_pxa_init' was not declared. Should it be static?
drivers/tty/serial/pxa.c:986:13: warning: symbol 'serial_pxa_exit' was not declared. Should it be static?
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This #if-0'd block wouldn't compile, so let's dispose it.
Signed-off-by: Daniel Mack <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The MXS_AUART_DMA_CONFIG is originally used to check if the DT node
is configured with the DMA property.
But now, the MXS_AUART_DMA_CONFIG is set unconditionally in the
serial_mxs_probe_dt(), so the check in the mxs_auart_settermios() is
not necessary anymore. This patch removes this macro.
Signed-off-by: Huang Shijie <[email protected]>
Acked-by: Shawn Guo <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The original DMA support works only when RTS/CTS is enabled.
(see the "e800163 serial: mxs-auart: add the DMA support for mx28")
But after several patches, DMA support has lost this limit.
(see the "bcc20f9 serial: mxs-auart: move to use generic DMA helper")
So an UART without the RTS/CTS lines may also enables the DMA support,
in which case the UART may gets unpredictable results.
This patch adds an optional property for the UART DT node
which indicates the UART has RTS and CTS lines, and it also means you
enable the DMA support for this UART.
This patch also adds a macro MXS_AUART_RTSCTS, and uses it to check
RTS/CTS before we enable the DMA for the UART.
Signed-off-by: Huang Shijie <[email protected]>
Signed-off-by: Huang Shijie <[email protected]>
Acked-by: Shawn Guo <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
We want the tty fixes in here as well.
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch fixes a below warning reported by kbuild test robot.
drivers/tty/serial/st-asc.c:727:28: warning: 'asc_match' defined but
not used [-Wunused-variable]
The code used in DT case is now ifdefed under CONFIG_OF to fix this
warning.
Signed-off-by: Srinivas Kandagatla <[email protected]>
Reported-by: Kbuild Test Robot <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This reverts commit 85c996907473e4ef824774b97b26499adf66521f.
Alexander wishes to remove this patch as it is incorrect.
Reported-by: Alexander Shiyan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Vineet Gupta <[email protected]>
Cc: Mischa Jonker <[email protected]>
Cc: Jiri Slaby <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Currently, Rx error handling only triggers if there is some Rx data.
Fix that by checking for error - before the data handling.
Reported-by: Mischa Jonker <[email protected]>
Tested-by: Mischa Jonker <[email protected]>
Signed-off-by: Vineet Gupta <[email protected]>
Cc: Jiri Slaby <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Add DT support to the SCCNCP serial driver.
Signed-off-by: Alexander Shiyan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch replaces switch in probe function to constant structure
for each supported IC. This makes code a bit smaller and cleaner and
helps adding DT support to the driver in the future.
Signed-off-by: Alexander Shiyan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch removes "frequency" parameter from SCCNXP platform_data
and uses CLK API for getting clock. If CLK ommited, default IC
frequency will be used instead.
Signed-off-by: Alexander Shiyan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The patch disables the regulator in case of errors, if we have it.
In addition, the patch adds support for deferred regulator probe and
makes error path are a bit clean.
Signed-off-by: Alexander Shiyan <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Signed-off-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
pdev->id is not a valid choice for device-tree probed devices. So use
the (properly determined) line from efm32_uart_probe consistenly
Signed-off-by: Uwe Kleine-König <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Use the wrapper function for retrieving the platform data instead of
accessing dev->platform_data directly.
Signed-off-by: Jingoo Han <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
We can't use dev->mod_index for selecting the interrupt routing entry,
because it's not an index into interrupt routing table. It will be even
wrong on a machine with 2 CPUs (4 cores). But all needed information is
contained in the PAT entries for the serial ports. mod[0] contains the
iosapic address and mod_info has some indications for the interrupt
input (at least it looks like it). This patch implements the searching
for the right iosapic and uses this interrupt input information.
Signed-off-by: Thomas Bogendoerfer <[email protected]>
Cc: <[email protected]> # 3.10
Signed-off-by: Helge Deller <[email protected]>
|
|
Storing one struct per known board would be overkill. Pre-cast the
driver_data pointer to an unsigned long to avoid the pointer to int
compiler warning:
drivers/tty/serial/pch_uart.c:431:10: warning: cast from pointer to
integer of different size [-Wpointer-to-int-cast]
Unify the signed-ness of the baud and uartclk types throughout the
driver.
Signed-off-by: Darren Hart <[email protected]>
Reported-by: kbuild test robot <[email protected]>
Cc: Jiri Slaby <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Because the UART lack of receive timeout register, so we use a timer to trigger
data receive.
The DBGU is regarded as UART.
Signed-off-by: Elen Song <[email protected]>
Signed-off-by: Ludovic Desroches <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Distinguish usart and uart by read ip name register,
The usart read name is "USAR",
The uart and dbgu read name is "DBGU".
Signed-off-by: Elen Song <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|