- 07 Mar, 2015 39 commits
-
-
Peter Hurley authored
Prepare to support console-defined matching; refactor the command line parameter string processing from parse_options() into a new core function, uart_parse_earlycon(), which decodes command line parameters of the form: earlycon=<name>,io|mmio|mmio32,<addr>,<options> console=<name>,io|mmio|mmio32,<addr>,<options> earlycon=<name>,0x<addr>,<options> console=<name>,0x<addr>,<options> Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Leilei Zhao authored
The tasklet may be scheduled and executed after serial port was shutdown, for example, DMA rx callback will schedule the tasklet while serial port is shutting down, especially serial port is sending and receiving data in a higher baud rate and it's killed by external program. In this case, tasklet_kill can only clear the current scheduling out, so tasklet should be disabled to prevent being executed in later scheduling. Otherwise, the tasklet executed after serial port was shutdown can lead to kernel crash. Signed-off-by: Leilei Zhao <leilei.zhao@atmel.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Leilei Zhao authored
The property in device tree will be reading each time when tty is opened, so the ops of serial port should be set after that instead of setting once in probe. Otherwise, the ops of serial port is inconsistent with the state of serial work manner. For example, the atmel serial driver can't work when switching to PIO mode due to DMA channel is not available. Signed-off-by: Leilei Zhao <leilei.zhao@atmel.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Leilei Zhao authored
The function of atmel_init_property is to set the work manner of atmel serial ports according to the property in device trees. If DMA or PDC is not set or something goes wrong in getting property, the work manner will switch to general PIO mode, thus there will not be any failure case in this function. It's actually a procedure. So changing the return type from int to void. Signed-off-by: Leilei Zhao <leilei.zhao@atmel.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Leilei Zhao authored
The buffer size set in DMA is inconsistent with its allocation. So keep them consistent here. The structure atmel_uart_char is used in PIO mode with its meaning. But here in DMA, all of the buffer is treated as general char. Signed-off-by: Leilei Zhao <leilei.zhao@atmel.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Leilei Zhao authored
We only use buf of ring In DMA rx function while using buf of xmit in DMA tx function. So in DMA rx we need definitively to check the buf of ring which is corresponding to DMA rx function. And use macro PAGE_ALIGNED to simplify the expression. Signed-off-by: Leilei Zhao <leilei.zhao@atmel.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Jorge Ramirez-Ortiz authored
Fix a race condition that happens when device_initcall(pl011_dma_initicall) is executed before all the devices have been probed - this issue was observed on a hisi_6220 SoC (HiKey board from Linaro). The deferred driver probing framework relies on late_initcall to trigger deferred probes so it is just possible that, even with a valid DMA driver ready to be loaded, we fail to synchronize with it. The proposed implementation delays probing the DMA until dma_startup. As this is invoked on port startup and port resume - but DMA probing is only required once - we avoid calling multiple times using a new field in uart_amba_port to track this scenario. This commit allows for subsequent attempts to associate an external DMA if the DMA driver itself is not available (but present in the deferred probe pending list). Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez-ortiz@linaro.org> Reviewed-by: Rob Herring <robh@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Dave Martin authored
Getting the TX IRQ re-asserted from scratch can be inefficient in some setups. This patch avoids clearing the TX IRQ across pl011_shutdown()... pl011_startup(), so that if the port is closed and reopened, the IRQ will still work afterwards without having to bootstrap it again. The TX IRQ continues to be masked in IMSC when the UART is not in use. Signed-off-by: Dave Martin <Dave.Martin@arm.com> Tested-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Dave Martin authored
The current PL011 driver transmits a dummy character when the UART is opened, to assert the TX IRQ for the first time (see pl011_startup()). The UART is put in loopback mode temporarily, so the receiver presumably shouldn't see anything. However... At least some platforms containing a PL011 send characters down the wire even when loopback mode is enabled. This means that a spurious NUL character may be seen at the receiver when the PL011 is opened through the TTY layer. The current code also temporarily sets the baud rate to maximum and the character width to the minimum, to that the dummy TX completes as quickly as possible. If this is seen by the receiver it will result in a framing error and can knock the receiver out of sync -- turning subsequent output into garbage until synchronisation is reestablished. (Particularly problematic during boot with systemd.) To avoid spurious transmissions, this patch removes assumptions about whether the TX IRQ will fire until at least one TX IRQ has been seen. Instead, the UART will unmask the TX IRQ and then slow-start via polling and timer-based soft IRQs initially. If the TTY layer writes enough data to fill the FIFO to the interrupt threshold in one go, the TX IRQ should assert, at which point the driver changes to fully interrupt-driven TX. In this way, the TX IRQ is activated as a side-effect instead of being done deliberately. This should also mean that the driver works on the SBSA Generic UART[1] (a cut-down PL011) without invasive changes. The Generic UART lacks some features needed for the dummy TX approach to work (FIFO disabling and loopback). [1] Server Base System Architecture (ARM-DEN-0029-v2.3) http://infocenter.arm.com/ (click-thru required :/) Signed-off-by: Dave Martin <Dave.Martin@arm.com> Tested-by: Andre Przywara <andre.przywara@arm.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Peter Crosthwaite authored
All instances of "ttyPS" use this macro except for this one. Convert it. Signed-off-by: Peter Crosthwaite <peter.crosthwaite@xilinx.com> Acked-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Peter Hurley authored
The Spreadtrum UART is accessed with mmio; declare the proper iotype. Also prevent userspace from assigning any other iotype via ioctl(TIOCSSERIAL). Signed-off-by: Peter Hurley <peter@hurleysoftware.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Uwe Kleine-König authored
The transmitter is expected to be controlled by the UART's RTS pin. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Uwe Kleine-König authored
Support for IRDA was added in 2009 in commit v2.6.31-rc1~399^2~2. There are no in-tree users. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Uwe Kleine-König authored
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Uwe Kleine-König authored
Fix indention, remove old address of the FSF, remove in-file changelog, mention Freescale. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Uwe Kleine-König authored
There is no benefit in keeping this information in RAM when it's not used any more, so better use function local variables instead. These members are unused since c0d1c6b0 ("serial: imx: Fix the reporting of interrupts") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Uwe Kleine-König authored
This if (0) exists since the driver was introduced in commit c49bde83 ([ARM PATCH] 1956/2: Re: Motorola i.MX serial driver) back in 2004. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Uwe Kleine-König authored
The writeable bits in the USR2 register are all "write 1 to clear" so only write the bits that actually should be cleared. Fixes: f1f836e4 ("serial: imx: Add Rx Fifo overrun error message") Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
Since we have a native 8250 driver carrying the Intel MID serial devices the specific support is not needed anymore. This patch removes it for Intel MID. Note that the console device name is changed from ttyMFDx to ttySx. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Acked-by: Ingo Molnar <mingo@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
Intel Penwell supports 3 HSUART ports which are 8250 compatible. The patch adds necessary bits to the driver. The functions have intel_mid_* prefix due to more than one platform will use this code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
The HSU DMA is developed to support High Speed UART controllers found in particular on Intel MID platforms such as Intel Medfield. The existing implementation is tighten to the drivers/tty/serial/mfd.c driver and has a lot of disadvantages. Besides that we would like to get rid of the old HS UART driver in regarding to extending the 8250 which supports generic DMAEngine API. That's why the current driver has been developed. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Joseph Kogut authored
Fixed misspelling of 'Medfield' Signed-off-by: Joseph Kogut <joseph.kogut@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Axel Lin authored
Current code uses the alias id as array subscript of ar933x_console_ports. So the valid id is 0 ... CONFIG_SERIAL_AR933X_NR_UARTS - 1. Signed-off-by: Axel Lin <axel.lin@ingics.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Uwe Kleine-König authored
Instead of ignoring errors returned by devm_gpiod_get_index use devm_gpiod_get_index_optional which results in slightly more strict error handling which is good. Also use the fourth parameter to devm_gpiod_get_index_optional to be able to drop the explicit direction setting. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Uwe Kleine-König authored
Drivers using mctrl-gpio must not pass invalid values for struct mctrl_gpios *. All drivers were fixed in this regard and so some checks can go away or be simplified. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Uwe Kleine-König authored
If mctrl_gpio_init returns an error code this value should be forwarded and the driver must not simply ignore this failure. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Uwe Kleine-König authored
mctrl_gpio_init is fully aware of being optional. If it returns an error code this indicates a real error that must not be ignored. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Uwe Kleine-König authored
mctrl_gpio_init at present doesn't return NULL. (It might be used in the future when no gpios are to be used indicating success.) Properly pass error returned and also make driver probing fail on error. Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Nicholas Mc Guire authored
This is only an API consolidation and should make things more readable it replaces var * HZ / 1000 by msecs_to_jiffies(var). Signed-off-by: Nicholas Mc Guire <hofrat@osadl.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabio Estevam authored
UBRC is a read-only register, so we should not store and restore it inside imx_flush_buffer(). Reported-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Fugang Duan <B38611@freescale.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Lad, Prabhakar authored
this patch fixes following sparse warnings: bcm63xx_uart.c:857:43: warning: Using plain integer as NULL pointer bcm63xx_uart.c:871:35: warning: Using plain integer as NULL pointer Signed-off-by: Lad, Prabhakar <prabhakar.csengg@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Mika Westerberg authored
Without this the module does not load automatically whenever suitable platform device appears. Reported-by: Jerome Blin <jerome.blin@intel.com> Signed-off-by: Mika Westerberg <mika.westerberg@linux.intel.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Paul Bolle authored
Building sprd_serial.o when CONFIG_PM_SLEEP is not defined triggers these warnings: drivers/tty/serial/sprd_serial.c:755:12: warning: ‘sprd_suspend’ defined but not used [-Wunused-function] static int sprd_suspend(struct device *dev) ^ drivers/tty/serial/sprd_serial.c:764:12: warning: ‘sprd_resume’ defined but not used [-Wunused-function] static int sprd_resume(struct device *dev) ^ Let's compile these functions only when CONFIG_PM_SLEEP is defined. Signed-off-by: Paul Bolle <pebolle@tiscali.nl> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Sanjeev Sharma authored
Make of_device_id array const. Signed-off-by: Sanjeev Sharma <Sanjeev_Sharma@mentor.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Michal Simek authored
No functional changes. Signed-off-by: Michal Simek <michal.simek@xilinx.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Andy Shevchenko authored
Convert the legacy system PM callbacks to new ones. Meanwhile, remove the redudant calls to the PCI for changing a power state since it's done by bus code. Signed-off-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Kevin Hao authored
In the current kernel, the CONFIG_PPC_OF is always 'y' for the ppc arch. So we don't need to check it with other ppc specific options. Signed-off-by: Kevin Hao <haokexin@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Fabian Frederick authored
Use helper functions to access current->state. Direct assignments are prone to races and therefore buggy. Thanks to Peter Zijlstra for the exact definition of the problem. Suggested-By: Peter Zijlstra <peterz@infradead.org> Signed-off-by: Fabian Frederick <fabf@skynet.be> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
Arnd Bergmann authored
As more ARM platforms are moving into ARCH_MULTIPLATFORM, we can now have integrator and versatile in the same kernel, and first one selects this driver, causing a Kconfig warning: warning: (ARCH_INTEGRATOR_AP) selects SERIAL_AMBA_PL010 which has unmet direct dependencies (TTY && HAS_IOMEM && ARM_AMBA && (BROKEN || !ARCH_VERSATILE)) It turns out that it has not been broken on versatile for a long time, so we can remove the statement here. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
-
- 03 Mar, 2015 1 commit
-
-
Linus Torvalds authored
-