Re: [PATCH 6/6] tty: serial: Add 8250-core based omap driver

2014-07-16 Thread Sebastian Andrzej Siewior
On 07/11/2014 08:41 AM, Tony Lindgren wrote: I tried this with am335x-evm, dra7-evm and beaglebone (omap5-uevm and am335x-evmsk didn't want to boot a kernel and omap4-blaze didn't even want to show MLO/U-boot) with the same result. None of these SoCs support off-idle with mainline kernel so

[PATCH 1/5] tty: serial: 8250 core: provide a function to export uart_8250_port

2014-07-16 Thread Sebastian Andrzej Siewior
based on the line argument. For runtime suspend I need access to this struct not only to make serial_out() work but also to properly restore up-ier and up-mcr. Acked-by: Alan Cox a...@linux.intel.com Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250.h

[PATCH 5/5] tty: serial: Add 8250-core based omap driver

2014-07-16 Thread Sebastian Andrzej Siewior
) 2014 Sebastian Andrzej Siewior + * + */ + +#include linux/device.h +#include linux/io.h +#include linux/module.h +#include linux/serial_8250.h +#include linux/serial_core.h +#include linux/serial_reg.h +#include linux/platform_device.h +#include linux/slab.h +#include linux/of.h +#include linux

[PATCH 3/5] tty: serial: 8250 core: allow to set -throttle / -unthrottle callbacks

2014-07-16 Thread Sebastian Andrzej Siewior
(uart_throttle()) if the feature flags are set. Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_core.c | 14 ++ include/linux/serial_core.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/drivers/tty/serial/8250/8250_core.c

[PATCH 4/5] tty: serial: 8250 core: add runtime pm

2014-07-16 Thread Sebastian Andrzej Siewior
as pm_runtime_use_autosuspend() + pm_runtime_enable() isn't invoked on the device. v3…v4: - added runtime to the console code - removed device_may_wakeup() from serial8250_set_sleep() Cc: mika.westerb...@linux.intel.com Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers

[PATCH v4] 8250-core based serial driver for OMAP

2014-07-16 Thread Sebastian Andrzej Siewior
I converted most of the omap-serial over to the 8250-core based code where it once was forked from. I dropped the rs485 support for now. The runtime-pm does not crash any machines because none of them shutdown the IP core and/or enter deep idle where it would metter. Sebastian -- To unsubscribe

[PATCH 2/5] tty: serial: 8250 core: allow to overwrite export serial8250_startup()

2014-07-16 Thread Sebastian Andrzej Siewior
a...@linux.intel.com Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_core.c | 26 -- include/linux/serial_8250.h | 2 ++ include/linux/serial_core.h | 2 ++ 3 files changed, 28 insertions(+), 2 deletions(-) diff

Re: [PATCH 4/5] tty: serial: 8250 core: add runtime pm

2014-07-16 Thread Sebastian Andrzej Siewior
On 07/16/2014 05:16 PM, Felipe Balbi wrote: Hi, Hi Felipe, On Wed, Jul 16, 2014 at 04:45:02PM +0200, Sebastian Andrzej Siewior wrote: @@ -1280,6 +1285,7 @@ static void serial8250_stop_tx(struct uart_port *port) struct uart_8250_port *up = container_of(port, struct uart_8250_port, port

Re: [PATCH 4/5] tty: serial: 8250 core: add runtime pm

2014-07-16 Thread Sebastian Andrzej Siewior
On 07/16/2014 06:06 PM, Felipe Balbi wrote: well, other than in probe and other functions which need to make sure clocks are on, but it seems unnecessary to enable/disable in every function. What do you have in mind? Do you plan to let the uart on while the minicom is attached but is doing

Re: [PATCH 5/5] tty: serial: Add 8250-core based omap driver

2014-07-17 Thread Sebastian Andrzej Siewior
* Tony Lindgren | 2014-07-17 00:09:00 [-0700]: Seems to boot a bit further now with output from serial console initially, then I'm getting the following error again that's probably related to clocks not enabled when the registers are accessed: It is (mostly) the same thing as before. We have

Re: [PATCH 5/5] tty: serial: Add 8250-core based omap driver

2014-07-17 Thread Sebastian Andrzej Siewior
On 07/17/2014 10:12 AM, Tony Lindgren wrote: Hmm it could be that it works for a while because the clocks are on from the bootloader and pm_runtime calls won't do anything. This could happen if the interconnect data based on the ti,hwmods entry is not getting matched to the new driver. This

Re: [PATCH 5/5] tty: serial: Add 8250-core based omap driver

2014-07-17 Thread Sebastian Andrzej Siewior
On 07/17/2014 04:54 PM, Felipe Balbi wrote: Hi, On Wed, Jul 16, 2014 at 04:45:03PM +0200, Sebastian Andrzej Siewior wrote: +static int omap_8250_startup(struct uart_port *port) +{ +struct uart_8250_port *up = +container_of(port, struct uart_8250_port, port); +struct

Re: [PATCH 4/5] tty: serial: 8250 core: add runtime pm

2014-07-17 Thread Sebastian Andrzej Siewior
* Peter Hurley | 2014-07-17 11:31:59 [-0400]: On 07/16/2014 12:06 PM, Felipe Balbi wrote: On Wed, Jul 16, 2014 at 05:54:56PM +0200, Sebastian Andrzej Siewior wrote: On 07/16/2014 05:16 PM, Felipe Balbi wrote: I wonder if you should get_sync() on start_tx() and only put_autosuspend() at stop_tx

Re: [PATCH 4/5] tty: serial: 8250 core: add runtime pm

2014-07-17 Thread Sebastian Andrzej Siewior
On 07/17/2014 06:02 PM, Felipe Balbi wrote: diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index 2e4a93b..480a1c0 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b/drivers/tty/serial/8250/8250_core.c @@ -1283,6 +1283,9 @@ static inline void

Re: [PATCH 4/5] tty: serial: 8250 core: add runtime pm

2014-07-18 Thread Sebastian Andrzej Siewior
On 07/17/2014 06:18 PM, Felipe Balbi wrote: No, this is okay. If you look, it checks for up-ier UART_IER_THRI. On the second invocation it will see that this bit is already set and therefore won't call get_sync() for the second time. That bit is removed in the _stop_tx() path. oh, right.

dma support for 8250-omap serial driver

2014-07-29 Thread Sebastian Andrzej Siewior
Hi, this series is on top of [PATCH v4] 8250-core based serial driver for OMAP. I will refresh it once I fixed the runtime-pm issue. Patches 1-3 are independent of the series and just bug fixes. Patches 4+ are RFC only for now. Its been tested on dra7, am33xx won't work as-is (even with patch 5

[PATCH 1/7] dmaengine: edma: fix two faults which happen with the 8250_dma user

2014-07-29 Thread Sebastian Andrzej Siewior
vinod.k...@intel.com Cc: Dan Williams dan.j.willi...@intel.com Cc: dmaeng...@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/dma/edma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index

[PATCH 2/7] dmaengine: omap-dma: complete the transfer on terminate_all

2014-07-29 Thread Sebastian Andrzej Siewior
Koul vinod.k...@intel.com Cc: Dan Williams dan.j.willi...@intel.com Cc: dmaeng...@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/dma/omap-dma.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c

[PATCH 3/7] serial: 8250_dma: continue TX dma on dma error

2014-07-29 Thread Sebastian Andrzej Siewior
heikki.kroge...@linux.intel.com Cc: Greg Kroah-Hartman gre...@linuxfoundation.org Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_dma.c | 11 +-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/8250/8250_dma.c b

[RFC PATCH 7/7] tty: serial: 8250: omap: add dma support

2014-07-29 Thread Sebastian Andrzej Siewior
a bug somewhere in the driver(s) Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_omap.c | 92 +++-- 1 file changed, 78 insertions(+), 14 deletions(-) diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty

[RFC PATCH 6/7] arm: dts: dra7: add DMA properties for UART

2014-07-29 Thread Sebastian Andrzej Siewior
Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- arch/arm/boot/dts/dra7.dtsi | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi index 10066f4..a904561 100644 --- a/arch/arm/boot/dts/dra7.dtsi +++ b/arch/arm

[RFC PATCH 4/7] serial: 8250_dma: enqueue RX dma again on completion.

2014-07-29 Thread Sebastian Andrzej Siewior
Krogerus heikki.kroge...@linux.intel.com Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_core.c | 3 +++ drivers/tty/serial/8250/8250_dma.c | 12 +--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/8250

[RFC PATCH 5/7] arm: dts: am33xx: add DMA properties for UART

2014-07-29 Thread Sebastian Andrzej Siewior
Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- arch/arm/boot/dts/am33xx.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index 4a4e02d..cdccbd6 100644 --- a/arch/arm/boot/dts/am33xx.dtsi +++ b/arch/arm

Re: [PATCH 2/7] dmaengine: omap-dma: complete the transfer on terminate_all

2014-07-29 Thread Sebastian Andrzej Siewior
On 07/29/2014 08:58 PM, Sebastian Andrzej Siewior wrote: diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c index b19f04f..81ede01 100644 --- a/drivers/dma/omap-dma.c +++ b/drivers/dma/omap-dma.c @@ -970,6 +970,12 @@ static int omap_dma_terminate_all(struct omap_chan *c

Re: [PATCH 1/7] dmaengine: edma: fix two faults which happen with the 8250_dma user

2014-07-31 Thread Sebastian Andrzej Siewior
On 07/31/2014 02:17 PM, Vinod Koul wrote: On Tue, Jul 29, 2014 at 08:58:58PM +0200, Sebastian Andrzej Siewior wrote: The rx path of the 8250_dma user in the RX-timeout case: - it starts the RX transfer - if the rx-timeout interrupt occures, it dmaengine_pause() the transfer - step two

Re: [PATCH 1/7] dmaengine: edma: fix two faults which happen with the 8250_dma user

2014-08-08 Thread Sebastian Andrzej Siewior
* Vinod Koul | 2014-07-31 17:47:02 [+0530]: On Tue, Jul 29, 2014 at 08:58:58PM +0200, Sebastian Andrzej Siewior wrote: The rx path of the 8250_dma user in the RX-timeout case: - it starts the RX transfer - if the rx-timeout interrupt occures, it dmaengine_pause() the transfer - step two

Re: [PATCH 5/5] tty: serial: Add 8250-core based omap driver

2014-08-13 Thread Sebastian Andrzej Siewior
On 07/21/2014 11:35 AM, Tony Lindgren wrote: Looks like the following is needed to avoid the error, no idea why.. But this is what we also do in omap-serial.c. It may be needed in other places too? Yes, there was a third one on shutdown. Also, no luck yet on runtime PM. If the console is

[PATCH 05/15] tty: serial: Add 8250-core based omap driver

2014-08-15 Thread Sebastian Andrzej Siewior
/ -unthrottle v2…v3: - wire up startup shutdown for wakeup-irq handling. - RS485 handling (well the core does). v1…v2: - added runtime PM. Could somebody could please double check this? - added omap_8250_set_termios() Signed-off-by: Sebastian Andrzej Siewior bige

[PATCH 07/15] tty: serial: 8250_dma: enqueue RX dma again on completion.

2014-08-15 Thread Sebastian Andrzej Siewior
in the driver in startup. Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_core.c | 3 +++ drivers/tty/serial/8250/8250_dma.c | 12 +--- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/8250/8250_core.c b

[PATCH 08/15] dmaengine: edma: fix two faults which happen with the 8250_dma user

2014-08-15 Thread Sebastian Andrzej Siewior
-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/dma/edma.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/drivers/dma/edma.c b/drivers/dma/edma.c index d08c4de..ff05dd4 100644 --- a/drivers/dma/edma.c +++ b/drivers/dma/edma.c @@ -256,6 +256,7 @@ static int

[PATCH 02/15] tty: serial: 8250_core: allow to set -throttle / -unthrottle callbacks

2014-08-15 Thread Sebastian Andrzej Siewior
(uart_throttle()) if the feature flags are set. Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_core.c | 14 ++ include/linux/serial_core.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/drivers/tty/serial/8250/8250_core.c b

[PATCH 06/15] tty: serial: 8250_dma: handle error on TX submit

2014-08-15 Thread Sebastian Andrzej Siewior
of serial8250_start_tx() succeed then the dma_tx_err flag along with the THRI bit is removed and DMA only usage may continue. Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_core.c | 2 +- drivers/tty/serial/8250/8250_dma.c | 30

[PATCH 01/15] tty: serial: 8250_core: allow to overwrite export serial8250_startup()

2014-08-15 Thread Sebastian Andrzej Siewior
a...@linux.intel.com Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_core.c | 26 -- include/linux/serial_8250.h | 2 ++ include/linux/serial_core.h | 2 ++ 3 files changed, 28 insertions(+), 2 deletions(-) diff

[PATCH 04/15] tty: serial: 8250_core: read only RX if there is something in the FIFO

2014-08-15 Thread Sebastian Andrzej Siewior
) Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_core.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index ae268e3..cc90c19 100644

[PATCH 09/15] dmaengine: omap-dma: complete the transfer on terminate_all

2014-08-15 Thread Sebastian Andrzej Siewior
-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/dma/omap-dma.c | 7 +++ 1 file changed, 7 insertions(+) diff --git a/drivers/dma/omap-dma.c b/drivers/dma/omap-dma.c index b19f04f..81ede01 100644 --- a/drivers/dma/omap-dma.c +++ b/drivers/dma/omap-dma.c @@ -970,6 +970,12 @@ static

[PATCH 03/15] tty: serial: 8250_core: add run time pm

2014-08-15 Thread Sebastian Andrzej Siewior
and introduce UART_CAP_RPM to ensure RPM put is invoked after the TX FIFO is empty. v3…v4: - added runtime to the console code - removed device_may_wakeup() from serial8250_set_sleep() Cc: mika.westerb...@linux.intel.com Signed-off-by: Sebastian Andrzej Siewior bige

[PATCH v7] 8250-core based serial driver for OMAP + DMA

2014-08-15 Thread Sebastian Andrzej Siewior
This is my complete queue fo the omap serial driver based on the 8250 core code. I played with it on beagle bone, am335x-evm and dra7xx including DMA. The uncertain remain the runtime-pm pieces. I hacked a small serial testing application which sent 10x 4KiB of data in raw mode. The number of

[PATCH 10/15] tty: serial: 8250_dma: Add a TX trigger workaround for AM33xx

2014-08-15 Thread Sebastian Andrzej Siewior
-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250.h | 1 + drivers/tty/serial/8250/8250_dma.c | 18 +++--- 2 files changed, 16 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/8250/8250.h b/drivers/tty/serial/8250/8250.h index

[PATCH 11/15] tty: serial: 8250_dma: handle the when UART response while DMA remains idle

2014-08-15 Thread Sebastian Andrzej Siewior
times until we receive the RX_TIMEOUT event. At that point the FIFO is usually full and we risk to overflow the FIFO. Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_dma.c | 22 ++ 1 file changed, 22 insertions(+) diff --git

[PATCH 12/15] tty: serial: 8250_dma: add pm runtime

2014-08-15 Thread Sebastian Andrzej Siewior
-buffer is still empty we put RPM via __stop_tx(). Should it been filed then in the start_tx() path we should program the DMA transfer and remove the error flag and the THRI bit. Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_dma.c | 16

[PATCH 15/15] tty: serial: 8250: omap: add dma support

2014-08-15 Thread Sebastian Andrzej Siewior
(beagle bone) or DRA7xx. Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_omap.c | 79 +++-- 1 file changed, 76 insertions(+), 3 deletions(-) diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250

[PATCH 14/15] arm: dts: dra7: add DMA properties for UART

2014-08-15 Thread Sebastian Andrzej Siewior
Cc: devicet...@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- arch/arm/boot/dts/dra7.dtsi | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi index 10066f4..a904561 100644 --- a/arch/arm

[PATCH 13/15] arm: dts: am33xx: add DMA properties for UART

2014-08-15 Thread Sebastian Andrzej Siewior
Cc: devicet...@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- arch/arm/boot/dts/am33xx.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index 4a4e02d..cdccbd6 100644 --- a/arch/arm/boot

Re: [PATCH v7] 8250-core based serial driver for OMAP + DMA

2014-08-15 Thread Sebastian Andrzej Siewior
On 08/15/2014 08:17 PM, Lennart Sorensen wrote: Are you saying that with the new driver you have to respond to the RX irq faster than before to avoid overflows? It is not quite clear. Yes. The irq fires 46 bytes giving you 16 bytes buffer before overflow vs 63 bytes buffer the old one had.

Re: [PATCH 05/15] tty: serial: Add 8250-core based omap driver

2014-08-15 Thread Sebastian Andrzej Siewior
On 08/15/2014 08:37 PM, Lennart Sorensen wrote: On Fri, Aug 15, 2014 at 07:42:33PM +0200, Sebastian Andrzej Siewior wrote: This patch provides a 8250-core based UART driver for the internal OMAP UART. The long term goal is to provide the same functionality as the current OMAP uart driver

Re: [PATCH 05/15] tty: serial: Add 8250-core based omap driver

2014-08-15 Thread Sebastian Andrzej Siewior
On 08/15/2014 09:33 PM, Lennart Sorensen wrote: On the other hand if you use DMA then it can handle transfers 64bytes in one go and you can start transfers while the FIFO is not completely empty. You can dma more than the fifo size? Yes. The UART asserts the DMA line as long as there is

Re: [PATCH v7] 8250-core based serial driver for OMAP + DMA

2014-08-17 Thread Sebastian Andrzej Siewior
* Tony Lindgren | 2014-08-15 13:28:27 [-0700]: It configured the trigger levels to 1 for RX and 16 for TX. Hmm that weird RX trigger level is a workaround for lost characters. See commit 0ba5f66836 (tty: serial: OMAP: use a 1-byte RX FIFO threshold in PIO mode :) There's paste test in that

Re: [PATCH 15/15] tty: serial: 8250: omap: add dma support

2014-08-21 Thread Sebastian Andrzej Siewior
On 08/15/2014 11:02 PM, Tony Lindgren wrote: * Sebastian Andrzej Siewior bige...@linutronix.de [140815 11:13]: +#ifdef CONFIG_SERIAL_8250_DMA +if (pdev-dev.of_node) { +/* + * Oh DMA support. If there are no DMA properties in the DT then + * we

Re: [PATCH 05/15] tty: serial: Add 8250-core based omap driver

2014-08-21 Thread Sebastian Andrzej Siewior
On 08/15/2014 11:07 PM, Tony Lindgren wrote: Nice, now it mostly works for me with off-idle too :) That is as long as I have the DMA channels commented out in the .dts file. And I'm still seeing an occasional hang with pstore console just showing: [ 289.076538] In-band Error seen by MPU

Re: [PATCH 1/7] dmaengine: edma: fix two faults which happen with the 8250_dma user

2014-08-21 Thread Sebastian Andrzej Siewior
On 08/19/2014 05:12 PM, Vinod Koul wrote: desc = dmaengine_prep_slave_single(rxchan, …); rx_cookie = dmaengine_submit(desc); dma_async_issue_pending(rxchan); ssleep(2); /* Now assume that the transfer did not start */ st = dmaengine_tx_status(rxchan, rx_cookie,

Re: [PATCH 15/15] tty: serial: 8250: omap: add dma support

2014-08-27 Thread Sebastian Andrzej Siewior
On 08/21/2014 08:44 PM, Tony Lindgren wrote: Also, with DMA enabled, looks like omap deeper idle states are blocked as the DMA stays reserved. After I commented out the DMA info for my console UART, PM started working. Hmm. This would explain something. This would mean that I should cancel

Re: [PATCH 15/15] tty: serial: 8250: omap: add dma support

2014-08-28 Thread Sebastian Andrzej Siewior
* Tony Lindgren | 2014-08-27 13:23:14 [-0700]: which means I just enable DMA mode in UART and disable it. No DMA operations were performed. With this change I see a lost character now and then which means the UART-IP goes into off and loses its context. Good. However I don't see core off

Re: [PATCH 1/7] dmaengine: edma: fix two faults which happen with the 8250_dma user

2014-08-28 Thread Sebastian Andrzej Siewior
On 08/28/2014 09:06 AM, Vinod Koul wrote: On Thu, Aug 21, 2014 at 03:09:12PM +0200, Sebastian Andrzej Siewior wrote: On 08/19/2014 05:12 PM, Vinod Koul wrote: desc = dmaengine_prep_slave_single(rxchan, …); rx_cookie = dmaengine_submit(desc); dma_async_issue_pending(rxchan

Re: [PATCH 15/15] tty: serial: 8250: omap: add dma support

2014-08-28 Thread Sebastian Andrzej Siewior
On 08/28/2014 06:46 PM, Tony Lindgren wrote: To use DMA you don't have to enable it in SCR register you can also use the FCR register. The manual says that you can only write this DMA enable bit in the FCR register if the baud clock is not running. And guess what: same thing: I only *toggle*

Re: [PATCH 05/15] tty: serial: Add 8250-core based omap driver

2014-08-29 Thread Sebastian Andrzej Siewior
On 08/16/2014 12:44 AM, Tony Lindgren wrote: Oh and echo mem /sys/power/state and then hitting a key on the serial console won't wake the system. Does that need to be manually configured for device_may_wakeup()? This is what it looks like: /# echo enabled

Re: [PATCH 07/15] tty: serial: 8250_dma: enqueue RX dma again on completion.

2014-08-29 Thread Sebastian Andrzej Siewior
On 08/18/2014 12:52 PM, One Thousand Gnomes wrote: if (!up-dma || dma_err) status = serial8250_rx_chars(up, status); + +if (dma_err port-type == PORT_OMAP_16750) +serial8250_rx_dma(up, 0); Can we stick to a 'has dma' flag

Re: [PATCH 15/15] tty: serial: 8250: omap: add dma support

2014-08-29 Thread Sebastian Andrzej Siewior
On 08/29/2014 06:12 PM, Tony Lindgren wrote: Looks like the paste bug is there for sure, doing off idle and pasting 240 characters to the console can hang the UART RX after few attempts, and pasting 16 charactes won't show up at all if the system is idling. So you may want to play with that

Re: [PATCH 05/15] tty: serial: Add 8250-core based omap driver

2014-09-01 Thread Sebastian Andrzej Siewior
On 08/18/2014 03:46 PM, Heikki Krogerus wrote: On Fri, Aug 15, 2014 at 07:42:33PM +0200, Sebastian Andrzej Siewior wrote: diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index cc90c19..ab003b6 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b

Re: [PATCH 06/15] tty: serial: 8250_dma: handle error on TX submit

2014-09-01 Thread Sebastian Andrzej Siewior
On 08/18/2014 03:57 PM, Heikki Krogerus wrote: On Fri, Aug 15, 2014 at 07:42:34PM +0200, Sebastian Andrzej Siewior wrote: diff --git a/include/linux/serial_8250.h b/include/linux/serial_8250.h index b161eee..02e82dc 100644 --- a/include/linux/serial_8250.h +++ b/include/linux/serial_8250.h

Re: [PATCH 03/15] tty: serial: 8250_core: add run time pm

2014-09-01 Thread Sebastian Andrzej Siewior
On 08/20/2014 11:39 AM, Frans Klaver wrote: static int serial8250_get_poll_char(struct uart_port *port) { - unsigned char lsr = serial_port_in(port, UART_LSR); + unsigned char lsr; + int status; + + serial8250_rpm_get(up); or up won't be defined below. You probably need

Re: [PATCH 15/15] tty: serial: 8250: omap: add dma support

2014-09-01 Thread Sebastian Andrzej Siewior
On 08/29/2014 06:12 PM, Tony Lindgren wrote: Looks like the paste bug is there for sure, doing off idle and pasting 240 characters to the console can hang the UART RX after few attempts, and pasting 16 charactes won't show up at all if the system is idling. So you may want to play with that

Re: [PATCH 15/15] tty: serial: 8250: omap: add dma support

2014-09-02 Thread Sebastian Andrzej Siewior
On 09/01/2014 07:47 PM, Sebastian Andrzej Siewior wrote: Comparing it with serial-omap I see the same thing: I takes approx the same amount of data until the first one is displayed. After a lot of long writes which wake the chip up from idle I manage to freeze both, the serial-omap driver

Re: [PATCH] mfd: twl4030-power: Fix PM idle pin configuration to not conflict with regulators

2014-09-03 Thread Sebastian Andrzej Siewior
On 09/03/2014 02:24 AM, Tony Lindgren wrote: I assume you mean beagleboard-ab, not beaglebone-ab :) you assume correct. reverting this commit on top of -rc3 makes mmc0 work again. Again, I assume you're talking about reverting daebabd57, not 43fef47f94a1. Anyways, here's a debug hack I

Re: [PATCH 15/15] tty: serial: 8250: omap: add dma support

2014-09-03 Thread Sebastian Andrzej Siewior
On 09/02/2014 10:15 PM, Tony Lindgren wrote: - I see to face two kind of deaths: - the LED still goes on and off and the uart just does not respond even if I tell the button print something on the screen (the button also changes the frequency of the LED so I know that the button is

Re: [PATCH] mfd: twl4030-power: Fix PM idle pin configuration to not conflict with regulators

2014-09-04 Thread Sebastian Andrzej Siewior
On 09/03/2014 08:39 PM, Tony Lindgren wrote: good.txt and bad.txt are from the late_initcall. $ diff -u good.txt bad.txt --- good.txt2014-09-03 10:29:58.920317368 +0200 +++ bad.txt 2014-09-03 10:28:57.064313222 +0200 Hmm can you check that you have good.txt and bad.txt the right

Re: [PATCH 15/15] tty: serial: 8250: omap: add dma support

2014-09-04 Thread Sebastian Andrzej Siewior
On 09/03/2014 07:48 PM, Tony Lindgren wrote: I will check this upper part of this email soon… OK. At least it's starting to now sound that the bugs are pretty much the same with 8250 and serial-omap :) Do you see a reason for not posting the entire series again since now I am bug compatible

[PATCH 3/3] ARM: DTS: AM335x: Drop TSC's wire-config parameters

2014-09-04 Thread Sebastian Andrzej Siewior
: devicet...@vger.kernel.org Signed-off-by: Jeff Lance j-lan...@ti.com [bigeasy: split, add .dts files to the removal] Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- .../devicetree/bindings/input/touchscreen/ti-tsc-adc.txt | 10 -- arch/arm/boot/dts/am335x-evm.dts

[PATCH 1/3] Input: ti_am335x_tsc: Fix incorrect step config 5 wire touschscreen

2014-09-04 Thread Sebastian Andrzej Siewior
and bit_yp = STEPCONFIG_YNN. Not quite the same :) Fixes: bb76dc09ddfc (input: ti_am33x_tsc: Order of TSC wires, made configurable) Signed-off-by: Jeff Lance j-lan...@ti.com Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/input/touchscreen/ti_am335x_tsc.c | 2 +- 1 file

[PATCH 2/3] input: ti_am335x_tsc: Remove DT wire-config parameter

2014-09-04 Thread Sebastian Andrzej Siewior
Cousson bcous...@baylibre.com Cc: Tony Lindgren t...@atomide.com Signed-off-by: Jeff Lance j-lan...@ti.com [bigeasy: refresh, drop AIN defines.] Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/input/touchscreen/ti_am335x_tsc.c | 109 +- 1 file

Re: [PATCH 15/15] tty: serial: 8250: omap: add dma support

2014-09-04 Thread Sebastian Andrzej Siewior
On 09/04/2014 04:52 PM, Tony Lindgren wrote: Yeah makes sense to me. Thanks for ensuring the bug compability :) Thanks. What about the ttyOx vs ttySx. Do you want me to add kernel line fixup somewhere arch/arm or we ignore this for now? Greg didn't say anything… Regards, Tony

[PATCH] mfd: ti_am335x_tscadc: Update logic in CTRL register for 5-wire TS

2014-09-04 Thread Sebastian Andrzej Siewior
-off-by: Jeff Lance j-lan...@ti.com [bigeasy: keep the change mfd only] Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- I've been looking at moving this piece and the idle mode setting into the TSC driver. Kinda odd that I have to patch within the MFD driver for this TSC related

[PATCH v8 00/18] 8250-core based serial driver for OMAP + DMA

2014-09-05 Thread Sebastian Andrzej Siewior
This is my complete queue fo the omap serial driver based on the 8250 core code. I played with it on beagle bone, am335x-evm and dra7xx including DMA. The runtime-pm pieces look now bug-compatible with the omap-serial driver. Besides the runtime-om improvement I also fixed a few corner cases for

[PATCH 02/18] tty: serial: 8250_core: allow to overwrite export serial8250_startup()

2014-09-05 Thread Sebastian Andrzej Siewior
a...@linux.intel.com Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_core.c | 25 +++-- include/linux/serial_8250.h | 2 ++ include/linux/serial_core.h | 2 ++ 3 files changed, 27 insertions(+), 2 deletions(-) diff

[PATCH 08/18] tty: serial: Add 8250-core based omap driver

2014-09-05 Thread Sebastian Andrzej Siewior
handling. - RS485 handling (well the core does). v1…v2: - added runtime PM. Could somebody could please double check this? - added omap_8250_set_termios() Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_omap.c | 905

[PATCH 01/18] tty: serial: 8250_core: provide a function to export uart_8250_port

2014-09-05 Thread Sebastian Andrzej Siewior
based on the line argument. For run time suspend I need access to this struct not only to make serial_out() work but also to properly restore up-ier and up-mcr. Acked-by: Alan Cox a...@linux.intel.com Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250.h

[PATCH 09/18] tty: serial: 8250_dma: handle error on TX submit

2014-09-05 Thread Sebastian Andrzej Siewior
of serial8250_start_tx() succeed then the dma_tx_err flag along with the THRI bit is removed and DMA only usage may continue. Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250.h | 1 + drivers/tty/serial/8250/8250_core.c | 4 +++- drivers/tty/serial/8250

[PATCH 03/18] tty: serial: 8250_core: allow to set -throttle / -unthrottle callbacks

2014-09-05 Thread Sebastian Andrzej Siewior
(uart_throttle()) if the feature flags are set. Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_core.c | 14 ++ include/linux/serial_core.h | 2 ++ 2 files changed, 16 insertions(+) diff --git a/drivers/tty/serial/8250/8250_core.c b

[PATCH 07/18] tty: serial: 8250_core: remove UART_IER_RDI in serial8250_stop_rx()

2014-09-05 Thread Sebastian Andrzej Siewior
-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index 8f5fb81d5fad..e8df7cd85ba7 100644 --- a/drivers/tty/serial/8250

[PATCH 05/18] tty: serial: 8250_core: read only RX if there is something in the FIFO

2014-09-05 Thread Sebastian Andrzej Siewior
) Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_core.c | 11 ++- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index f9dd20ebab52..eaab8974a456 100644

[PATCH 04/18] tty: serial: 8250_core: add run time pm

2014-09-05 Thread Sebastian Andrzej Siewior
device_may_wakeup() from serial8250_set_sleep() Cc: mika.westerb...@linux.intel.com Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250.h | 1 + drivers/tty/serial/8250/8250_core.c | 133 include/linux/serial_8250.h

[PATCH 06/18] tty: serial: 8250_core: user the -line argument as a hint in serial8250_find_match_or_unused()

2014-09-05 Thread Sebastian Andrzej Siewior
Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_core.c | 5 + 1 file changed, 5 insertions(+) diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial/8250/8250_core.c index eaab8974a456..8f5fb81d5fad 100644 --- a/drivers/tty/serial/8250/8250_core.c +++ b

[PATCH 18/18] tty: serial: 8250: omap: add dma support

2014-09-05 Thread Sebastian Andrzej Siewior
Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_omap.c | 49 + 1 file changed, 49 insertions(+) diff --git a/drivers/tty/serial/8250/8250_omap.c b/drivers/tty/serial/8250/8250_omap.c index 4128bbc35089..7e98dd413203 100644 --- a/drivers/tty

[PATCH 16/18] arm: dts: am33xx: add DMA properties for UART

2014-09-05 Thread Sebastian Andrzej Siewior
Cc: devicet...@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- arch/arm/boot/dts/am33xx.dtsi | 6 ++ 1 file changed, 6 insertions(+) diff --git a/arch/arm/boot/dts/am33xx.dtsi b/arch/arm/boot/dts/am33xx.dtsi index 3a0a161342ba..078a760a4a21 100644

[PATCH 15/18] tty: serial: 8250_dma: add pm runtime

2014-09-05 Thread Sebastian Andrzej Siewior
-buffer is still empty we put RPM via __stop_tx(). Should it been filed then in the start_tx() path we should program the DMA transfer and remove the error flag and the THRI bit. Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_dma.c | 16

[PATCH 17/18] arm: dts: dra7: add DMA properties for UART

2014-09-05 Thread Sebastian Andrzej Siewior
Cc: devicet...@vger.kernel.org Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- arch/arm/boot/dts/dra7.dtsi | 12 1 file changed, 12 insertions(+) diff --git a/arch/arm/boot/dts/dra7.dtsi b/arch/arm/boot/dts/dra7.dtsi index d678152db4cb..f273e3811f75 100644

[PATCH 12/18] tty: serial: 8250_dma: optimize the xmit path due to UART_BUG_DMA_TX

2014-09-05 Thread Sebastian Andrzej Siewior
enabled. The result is that we end up manually filling the FIFO. We could be a little better at this and try DMA once again. If it works, it works and if not we do it manually. Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_core.c | 16

[PATCH 13/18] tty: serial: 8250_dma: keep own book keeping about RX transfers

2014-09-05 Thread Sebastian Andrzej Siewior
for the TX side. *Now* we learn about the RX status based on our bookkeeping and don't need dmaengine_tx_status() for this anymore. Cc: vinod.k...@intel.com Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250.h | 1 + drivers/tty/serial/8250/8250_dma.c

[PATCH 11/18] tty: serial: 8250_dma: Add a TX trigger workaround for AM33xx

2014-09-05 Thread Sebastian Andrzej Siewior
the first byte into the FIFO to kick start the transfer. v7…v8: - fix the problem when get invoked and the FIFO is full. Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250.h | 3 +++ drivers/tty/serial/8250/8250_dma.c | 39

[PATCH 10/18] tty: serial: 8250_dma: enqueue RX dma again on completion.

2014-09-05 Thread Sebastian Andrzej Siewior
in the driver in startup. Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250.h | 3 ++- drivers/tty/serial/8250/8250_core.c | 3 +++ drivers/tty/serial/8250/8250_dma.c | 12 +--- 3 files changed, 14 insertions(+), 4 deletions(-) diff

Re: [PATCH v8 00/18] 8250-core based serial driver for OMAP + DMA

2014-09-08 Thread Sebastian Andrzej Siewior
* Frans Klaver | 2014-09-08 16:46:18 [+0200]: - ncurses based applications (vi, less) don't play nice for me on the console with this series. less doesn't show me anything. vi doesn't return to console properly. Can you give a test case - I seem seem to get stuck in a serial8250: too much

Re: [PATCH v8 00/18] 8250-core based serial driver for OMAP + DMA

2014-09-08 Thread Sebastian Andrzej Siewior
* Sebastian Andrzej Siewior | 2014-09-08 17:15:01 [+0200]: * Frans Klaver | 2014-09-08 16:46:18 [+0200]: - ncurses based applications (vi, less) don't play nice for me on the console with this series. less doesn't show me anything. vi doesn't return to console properly. Can you give a test

Re: [PATCH 11/18] tty: serial: 8250_dma: Add a TX trigger workaround for AM33xx

2014-09-08 Thread Sebastian Andrzej Siewior
On 09/08/2014 06:41 PM, Tony Lindgren wrote: * Sebastian Andrzej Siewior bige...@linutronix.de [140905 12:28]: This problem has not been seen on DRA7 or beaglebone (OMAP3). I am not sure if this is UART-IP core specific or DMA engine. Maybe check this comment for future reference too because

Re: [PATCH v8 00/18] 8250-core based serial driver for OMAP + DMA

2014-09-09 Thread Sebastian Andrzej Siewior
On 09/08/2014 07:55 PM, Tony Lindgren wrote: * Tony Lindgren t...@atomide.com [140908 10:41]: * Sebastian Andrzej Siewior bige...@linutronix.de [140905 12:03]: This is my complete queue fo the omap serial driver based on the 8250 core code. I played with it on beagle bone, am335x-evm

Re: [PATCH v8 00/18] 8250-core based serial driver for OMAP + DMA

2014-09-09 Thread Sebastian Andrzej Siewior
On 09/08/2014 08:33 PM, Frans Klaver wrote: Thanks. I'll give it a spin on Wednesday. Could you please pull the upcoming v9 first? git://git.breakpoint.cc/bigeasy/linux.git uart_v9_pre1 This solves a few of my am335x related issues. The problem that the uart freezes on beagle board xm is

Re: [PATCH v8 00/18] 8250-core based serial driver for OMAP + DMA

2014-09-10 Thread Sebastian Andrzej Siewior
On 09/10/2014 04:15 PM, Frans Klaver wrote: On Tue, Sep 09, 2014 at 09:41:20PM +0200, Sebastian Andrzej Siewior wrote: On 09/08/2014 08:33 PM, Frans Klaver wrote: Thanks. I'll give it a spin on Wednesday. Could you please pull the upcoming v9 first? git://git.breakpoint.cc/bigeasy

[PATCH 06/16] tty: serial: Add 8250-core based omap driver

2014-09-10 Thread Sebastian Andrzej Siewior
runtime PM. Could somebody could please double check this? - added omap_8250_set_termios() Reviewed-by: Tony Lindgren t...@atomide.com Tested-by: Tony Lindgren t...@atomide.com Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_omap.c

[PATCH 00/16 v9] omap 8250 based uart + DMA

2014-09-10 Thread Sebastian Andrzej Siewior
the diff of v8…v9 is small: - rebased on top's of Greg's tty-next branch - fixed #10 where we might have THRE interrupt enabled for longer than needed - re-did register setup in #10. Before this less file could freeze the am335x-evm. Sebastian -- To unsubscribe from this list: send the line

[PATCH 09/16] tty: serial: 8250_dma: Add a TX trigger workaround for AM33xx

2014-09-10 Thread Sebastian Andrzej Siewior
the first byte into the FIFO to kick start the transfer. v7…v8: - fix the problem when get invoked and the FIFO is full. Reviewed-by: Tony Lindgren t...@atomide.com Tested-by: Tony Lindgren t...@atomide.com Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty

[PATCH 07/16] tty: serial: 8250_dma: handle error on TX submit

2014-09-10 Thread Sebastian Andrzej Siewior
of serial8250_start_tx() succeed then the dma_tx_err flag along with the THRI bit is removed and DMA only usage may continue. Reviewed-by: Tony Lindgren t...@atomide.com Tested-by: Tony Lindgren t...@atomide.com Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250.h

[PATCH 05/16] tty: serial: 8250_core: remove UART_IER_RDI in serial8250_stop_rx()

2014-09-10 Thread Sebastian Andrzej Siewior
Lindgren t...@atomide.com Tested-by: Tony Lindgren t...@atomide.com Signed-off-by: Sebastian Andrzej Siewior bige...@linutronix.de --- drivers/tty/serial/8250/8250_core.c | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_core.c b/drivers/tty/serial

<    1   2   3   4   5   >