- 06 Nov, 2014 40 commits
-
-
Peter Hurley authored
Commit 479e9b94 ("serial: Refactor uart_flush_buffer() from uart_close") refactored the uart_flush_buffer() in uart_close() into those drivers that define a flush_buffer() method. However, in the amba-pl011 driver configured without CONFIG_DMA_ENGINE, flush_buffer() is a NULL method, so the direct call fails to compile. Check and call the flush_buffer() method through the ops table instead. Reported-by: Fengguang Wu <fengguang.wu@intel.com> Cc: Russell King <linux@arm.linux.org.uk> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Peng Fan authored
This patch fixes sparse warning: "obsolete struct initializer, use C99 syntax" Signed-off-by: Peng Fan <van.freenix@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Peter Hurley authored
devm_kzalloc() already warns if allocation fails; remove duplicate message. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Peter Hurley authored
vt_get_kmsg_redirect() only has meaning to the console driver as an alias for calling vt_kmsg_redirect(). Move the macro definition to the only source file which uses it; remove from uapi/linux/vt.h Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Peter Hurley authored
The last vestige of ASYNC_SPLIT_TERMIOS was removed by commit 'cris: Remove obsolete ASYNC_SPLIT_TERMIOS behavior'. Mark the flag as defunct in the uapi header. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Peter Hurley authored
ASYNC_SPLIT_TERMIOS behavior is a remnant of the long-dead /dev/cuaXX callout device. Split termios handling was removed tree-wide in v2.5.71 by: commit 99a21ede Author: Alexander Viro <viro@www.linux.org.uk> Date: Wed Jun 11 07:41:28 2003 -0700 [PATCH] tty_driver refcounting killed the last remnants of callout stuff - we don't need to mess with storing termios privately anymore. which pre-dated the re-introduction into the cris serial driver in v2.6.7 by: commit 311a5ffe Author: Andrew Morton <akpm@osdl.org> Date: Mon May 31 18:52:29 2004 -0700 [PATCH] CRIS architecture update From: "Mikael Starvik" <mikael.starvik@axis.com> - Lots of fixes from 2.4. - Updated for 2.6.6. - Added IDE driver Cc: Mikael Starvik <starvik@axis.com> Cc: Jesper Nilsson <jesper.nilsson@axis.com> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Peter Hurley authored
setup_serial_console() is obsolete and has been superseded by early_serial_setup() which is called at the end of the function. The IA64 arch does not call this function; only the m68k arch setup calls this function. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Peter Hurley authored
serial_console_init() is not defined by the tty core; remove declaration. Note that the powerpc arch boot code contains a serial_console_init() declaration in arch/powerpc/boot/ops.h which is restricted to the powerpc arch boot. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Peter Hurley authored
pcxe_open() has no definition in mainline; remove declaration. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Peter Hurley authored
The use of older function ptr calling style, (*fn)(), makes static analysis more error-prone; replace with modern fn() style. Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Peter Hurley authored
tty_hung_up_p() is equivalent to the open-coded test in tty_open(). Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Joe Perches authored
Precedence of & and >> is not the same and is not left to right. shift has higher precedence and should be done after the mask. Add parentheses around the masks. Signed-off-by: Joe Perches <joe@perches.com> Acked-by: David Sterba <dsterba@suse.cz> Reviewed-by: Jiri Kosina <jkosina@suse.cz> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio Estevam authored
There is no real value in displaying "Serial: IMX driver" in every boot. The uart_register_driver() can fail and even so the "Serial: IMX 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 i.MX and even though this message gets displayed. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio Estevam authored
When kzalloc() fails the core MM will already complain about it, so there is no need to have the error message locally. Remove the unneeded error message. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio Estevam authored
Instead of jumping to 'error_out1' label we can simplify the code and return the error code directly. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio Estevam authored
On a imx system with ttymxc0, ttymxc1 and ttymxc4 registered we see the following output from 'cat /proc/interrupts': $ cat /proc/interrupts CPU0 ... 58: 39 GIC 58 2020000.serial 67: 115 GIC 67 21f8000.i2c The only uart irq that appears is ttymxc0, which is the console. As ttymxc1 and ttymxc4 will only have their irq registered at imx_startup(), they are not shown right after probe. Transmitting to ttymxc1 and ttymxc4 will cause their irqs to be registered, but the output shows: $ echo "111111" > /dev/ttymxc1 $ echo "444444" > /dev/ttymxc4 $ cat /proc/interrupts CPU0 ... 58: 150 GIC 58 2020000.serial 59: 1 GIC 59 62: 1 GIC 62 67: 115 GIC 67 21f8000.i2c ,which misses printing the associated device address. In order to fix this, register all the irqs inside the probe function via devm_request_irq(), which will correctly report the serial interrupts associated with their correspondent serial device and also helps simplyfing the code by avoiding the calls to free_irq(). $ echo "111111" > /dev/ttymxc1 $ echo "444444" > /dev/ttymxc4 $ cat /proc/interrupts CPU0 .... 58: 202 GIC 58 2020000.serial 59: 1 GIC 59 21e8000.serial 62: 1 GIC 62 21f4000.serial 67: 115 GIC 67 21f8000.i2c Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Kumar Gala authored
For the case in which we just provide an address as an argument to the earlycon console type like: earlycon=msm_serial_dm,0xf991e000 We would report this as an IO port based mapping and not as MMIO. Simple fix to use the port->iotype to decide which message to print. Signed-off-by: Kumar Gala <galak@codeaurora.org> Acked-by: Mark RUtland <mark.rutland@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Greg Kroah-Hartman authored
We need the fixes in drivers/tty/tty_io.c that were done in there for future patches in this branch. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ricardo Ribalda Delgado authored
Commit e676253b ("serial/8250: Add support for RS485 IOCTLs") added references to TIOC[SG]RS48 on 8250_core.c. This change triggered the need to define them in all the arches that uses tty/serial. This made #ifdef TIOC[SG]RS48 obsolete. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Slaby <jslaby@suse.cz> Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ricardo Ribalda Delgado authored
Commit e676253b ("serial/8250: Add support for RS485 IOCTLs") added references to TIOC[SG]RS48 on 8250_core.c. This change triggered the need to define them in all the arches that uses tty/serial. This made #ifdef TIOC[SG]RS48 obsolete. Cc: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Cc: Jiri Slaby <jslaby@suse.cz> Cc: linux-serial@vger.kernel.org Cc: linux-kernel@vger.kernel.org Signed-off-by: Ricardo Ribalda Delgado <ricardo.ribalda@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Ray Jui authored
The dma pointer under struct uart_8250_port is currently left unassigned for non-ACPI platforms. It should be pointing to the dma member in struct dw8250_data like how it was done for ACPI, so the core 8250 code will try to request for DMA when registering the port If DMA is not enabled in device tree, request DMA will fail and the driver will fall back to PIO Signed-off-by: Ray Jui <rjui@broadcom.com> Reviewed-by: JD (Jiandong) Zheng <jdzheng@broadcom.com> Reviewed-by: Scott Branden <sbranden@broadcom.com> Tested-by: Scott Branden <sbranden@broadcom.com> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Masanari Iida authored
This patch remove unnecessary KERN_ERR in pr_warning() within hvcs.c Signed-off-by: Masanari Iida <standby24x7@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Gregory Hermant authored
This patch allows to read the REV_ID register in SPI mode and consequently to properly detect the max3109. Indeed in SPI mode, this register is only accessible by using indirect addressing. Signed-off-by: Gregory Hermant <gregory.hermant@calao-systems.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Paul Bolle authored
Commit 32726d2d ("ARM: SAMSUNG: Remove legacy clock code") removed the Kconfig symbol SAMSUNG_CLOCK. Remove the last checks for its macro, and the dead code they hide, too. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabian Frederick authored
Use container_of instead of casting first structure member. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabian Frederick authored
Use container_of instead of casting first structure member. Signed-off-by: Fabian Frederick <fabf@skynet.be> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabian Frederick authored
Use container_of instead of casting first structure member. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabian Frederick authored
Use container_of instead of casting first structure member. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabian Frederick authored
Use container_of instead of casting first structure member. Signed-off-by: Fabian Frederick <fabf@skynet.be> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabian Frederick authored
Use container_of instead of casting first structure member. Signed-off-by: Fabian Frederick <fabf@skynet.be> Acked-by: David S. Miller <davem@davemloft.net> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabian Frederick authored
Use container_of instead of casting first structure member. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabian Frederick authored
Use container_of instead of casting first structure member. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabian Frederick authored
Use container_of instead of casting first structure member. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabian Frederick authored
Use container_of instead of casting first structure member. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabian Frederick authored
Use container_of instead of casting first structure member. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabian Frederick authored
Use container_of instead of casting first structure member. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabian Frederick authored
Use container_of instead of casting first structure member. Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sebastian Andrzej Siewior authored
This patch adds the required pieces to 8250-OMAP UART driver for DMA support. The TX burst size is set to 1 so we can send an arbitrary amount of bytes. The RX burst is currently set to 48 which means we receive an DMA interrupt every 48 bytes and have to reprogram everything. Less bytes in the RX-FIFO mean that no DMA transfer will happen and the UART will send a RX-timeout _or_ RDI event at which point the FIFO will be manually purged. There is a workaround for TX-DMA on AM33xx where we put the first byte into the FIFO to kick start the DMA process. Haven't seen this problem on OMAP36xx (beagle board xm) or DRA7xx. On AM375x there is "Usage Note 2.7: UART: Cannot Acknowledge Idle Requests in Smartidle Mode When Configured for DMA Operations" in the errata document. This problem persists even after disabling DMA in the UART and will be addressed in the HWMOD. v10: - delay update_registers() from set_termios() until TX-DMA is done. It has been reported / proved that invoking update_registers() while TX-DMA is in progress may stall the DMA operation and it won't finish. - use the new omap DMA-TX-RX hooks and DMA only interrupt routine. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sebastian Andrzej Siewior authored
We have (or will have) custom DMA callbacks in the omap driver due to the different behaviour in the RX and TX case. To make this work we need a few changes in the IRQ handler to invoke the rx_handler again after the "manual" mode or retry the tx_handler again before falling back to the manual mode. Heikki didn't want to see the extra hacks in the generic / default irq handler and Peter wasn't too happy about an OMAP-only IRQ handler. The way I planned it is to use this extra IRQ routine only in DMA case. If Peter dislike this approach then I hope Heikki doesn't block changes in the default IRQ handler :) Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Reviewed-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sebastian Andrzej Siewior authored
The omap needs a DMA request pending right away. If it is enqueued once the bytes are in the FIFO then nothing will happen and the FIFO will be later purged via RX-timeout interrupt. This patch enqueues RX-DMA request on completion but not if it was aborted on error. The first enqueue will happen in the driver in startup. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Reviewed-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-