Re: [PATCH] tty: serial: fsl_lpuart: fix del_timer_sync() vs timer routine deadlock

2016-12-03 Thread Bhuvanchandra DV
On 12/03/2016 02:58 AM, Nikita Yushchenko wrote: Problem found via lockdep: - lpuart_set_termios() calls del_timer_sync(>lpuart_timer) while holding sport->port.lock - sport->lpuart_timer routine is lpuart_timer_func() that calls lpuart_copy_rx_to_tty() that acquires same lock. To fix,

Re: [PATCH] tty: serial: fsl_lpuart: fix del_timer_sync() vs timer routine deadlock

2016-12-03 Thread Bhuvanchandra DV
On 12/03/2016 02:58 AM, Nikita Yushchenko wrote: Problem found via lockdep: - lpuart_set_termios() calls del_timer_sync(>lpuart_timer) while holding sport->port.lock - sport->lpuart_timer routine is lpuart_timer_func() that calls lpuart_copy_rx_to_tty() that acquires same lock. To fix,

Re: [PATCH] tty: serial: fsl_lpuart: fix del_timer_sync() vs timer routine deadlock

2016-12-03 Thread Bhuvanchandra DV
On 12/03/2016 02:25 PM, Nikita Yushchenko wrote: 03.12.2016 10:06, Bhuvanchandra DV пишет: On 12/03/2016 02:58 AM, Nikita Yushchenko wrote: Problem found via lockdep: - lpuart_set_termios() calls del_timer_sync(>lpuart_timer) while holding sport->port.lock - sport->lpu

Re: [PATCH] tty: serial: fsl_lpuart: fix del_timer_sync() vs timer routine deadlock

2016-12-03 Thread Bhuvanchandra DV
On 12/03/2016 02:25 PM, Nikita Yushchenko wrote: 03.12.2016 10:06, Bhuvanchandra DV пишет: On 12/03/2016 02:58 AM, Nikita Yushchenko wrote: Problem found via lockdep: - lpuart_set_termios() calls del_timer_sync(>lpuart_timer) while holding sport->port.lock - sport->lpu

Re: [PATCH] tty: serial: fsl_lpuart: Fix Tx DMA edge case

2016-10-10 Thread Bhuvanchandra DV
On 10/07/16 03:43, Aaron Brice wrote: In the case where head == 0 on the circular buffer, there should be one DMA buffer, not two. The second zero-length buffer would break the lpuart driver, transfer would never complete. Tested-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com>

Re: [PATCH] tty: serial: fsl_lpuart: Fix Tx DMA edge case

2016-10-10 Thread Bhuvanchandra DV
On 10/07/16 03:43, Aaron Brice wrote: In the case where head == 0 on the circular buffer, there should be one DMA buffer, not two. The second zero-length buffer would break the lpuart driver, transfer would never complete. Tested-by: Bhuvanchandra DV Signed-off-by: Aaron Brice

[PATCH v3 4/6] arm: dts: imx7: Update #pwm-cells for PWM polarity control

2016-10-07 Thread Bhuvanchandra DV
Update #pwm-cells to 3 in order to support PWM signal polarity control. Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> Acked-by: Rob Herring <r...@kernel.org> --- arch/arm/boot/dts/imx7s.dtsi | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --gi

[PATCH v3 4/6] arm: dts: imx7: Update #pwm-cells for PWM polarity control

2016-10-07 Thread Bhuvanchandra DV
Update #pwm-cells to 3 in order to support PWM signal polarity control. Signed-off-by: Bhuvanchandra DV Acked-by: Rob Herring --- arch/arm/boot/dts/imx7s.dtsi | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/imx7s.dtsi b/arch/arm/boot/dts/imx7s.dtsi

[PATCH v3 0/6] Support PWM polarity control

2016-10-07 Thread Bhuvanchandra DV
arm-kernel/msg530818.html Bhuvanchandra DV (3): arm: dts: imx7: Update #pwm-cells for PWM polarity control arm: dts: imx7-colibri: Use pwm polarity control arm: dts: imx7-colibri: Use enable-gpios for BL_ON Lothar Wassmann (3): pwm: print error messages with pr_err() instead of pr_de

[PATCH v3 2/6] pwm: core: make the PWM_POLARITY flag in DTB optional

2016-10-07 Thread Bhuvanchandra DV
driver without having to modify all existing DTS files. Signed-off-by: Lothar Wassmann <l...@karo-electronics.de> Signed-off-by: Lukasz Majewski <l.majew...@samsung.com> Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> Suggested-by: Sascha Hauer ---

[PATCH v3 0/6] Support PWM polarity control

2016-10-07 Thread Bhuvanchandra DV
arm-kernel/msg530818.html Bhuvanchandra DV (3): arm: dts: imx7: Update #pwm-cells for PWM polarity control arm: dts: imx7-colibri: Use pwm polarity control arm: dts: imx7-colibri: Use enable-gpios for BL_ON Lothar Wassmann (3): pwm: print error messages with pr_err() instead of pr_de

[PATCH v3 2/6] pwm: core: make the PWM_POLARITY flag in DTB optional

2016-10-07 Thread Bhuvanchandra DV
existing DTS files. Signed-off-by: Lothar Wassmann Signed-off-by: Lukasz Majewski Signed-off-by: Bhuvanchandra DV Suggested-by: Sascha Hauer --- drivers/pwm/core.c | 22 -- 1 file changed, 12 insertions(+), 10 deletions(-) diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c

[PATCH v3 1/6] pwm: print error messages with pr_err() instead of pr_debug()

2016-10-07 Thread Bhuvanchandra DV
From: Lothar Wassmann <l...@karo-electronics.de> Make the messages that are printed in case of fatal errors actually visible to the user without having to recompile the driver with debugging enabled. Signed-off-by: Lothar Waßmann <l...@karo-electronics.de> Signed-off-by: Bhuv

[PATCH v3 1/6] pwm: print error messages with pr_err() instead of pr_debug()

2016-10-07 Thread Bhuvanchandra DV
From: Lothar Wassmann Make the messages that are printed in case of fatal errors actually visible to the user without having to recompile the driver with debugging enabled. Signed-off-by: Lothar Waßmann Signed-off-by: Bhuvanchandra DV --- drivers/pwm/core.c | 4 ++-- 1 file changed, 2

Re: [PATCH v2 2/6] pwm: core: make the PWM_POLARITY flag in DTB optional

2016-10-07 Thread Bhuvanchandra DV
Hi Lukasz, On 10/06/16 12:06, Lukasz Majewski wrote: Hi Bhuvanchandra, From: Lothar Wassmann <l...@karo-electronics.de> Change the pwm chip driver registration, so that a chip driver that supports polarity inversion can still be used with DTBs that don't provide the 'PWM_POLARITY

Re: [PATCH v2 2/6] pwm: core: make the PWM_POLARITY flag in DTB optional

2016-10-07 Thread Bhuvanchandra DV
Hi Lukasz, On 10/06/16 12:06, Lukasz Majewski wrote: Hi Bhuvanchandra, From: Lothar Wassmann Change the pwm chip driver registration, so that a chip driver that supports polarity inversion can still be used with DTBs that don't provide the 'PWM_POLARITY' flag. This is done to provide

[PATCH v3 3/6] pwm: imx: support output polarity inversion

2016-10-07 Thread Bhuvanchandra DV
ski <l.majew...@samsung.com> Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> Acked-by: Shawn Guo <shawn@linaro.org> Reviewed-by: Sascha Hauer <s.ha...@pengutronix.de> --- Documentation/devicetree/bindings/pwm/imx-pwm.txt | 6 +-- drivers/pwm/pwm-im

[PATCH v3 3/6] pwm: imx: support output polarity inversion

2016-10-07 Thread Bhuvanchandra DV
From: Lothar Wassmann The i.MX pwm unit on i.MX27 and newer SoCs provides a configurable output polarity. This patch adds support to utilize this feature where available. Signed-off-by: Lothar Waßmann Signed-off-by: Lukasz Majewski Signed-off-by: Bhuvanchandra DV Acked-by: Shawn Guo

[PATCH v3 5/6] arm: dts: imx7-colibri: Use pwm polarity control

2016-10-07 Thread Bhuvanchandra DV
Configure PWM polarity control. Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- arch/arm/boot/dts/imx7-colibri.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx7-colibri.dtsi b/arch/arm/boot/dts/imx7-colibri.dtsi index a

[PATCH v3 5/6] arm: dts: imx7-colibri: Use pwm polarity control

2016-10-07 Thread Bhuvanchandra DV
Configure PWM polarity control. Signed-off-by: Bhuvanchandra DV --- arch/arm/boot/dts/imx7-colibri.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx7-colibri.dtsi b/arch/arm/boot/dts/imx7-colibri.dtsi index a9cc657..2af5e3e 100644 --- a/arch/arm

[PATCH v3 6/6] arm: dts: imx7-colibri: Use enable-gpios for BL_ON

2016-10-07 Thread Bhuvanchandra DV
Use pwm-backlight driver 'enable-gpios' property for backlight on/off control. Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- arch/arm/boot/dts/imx7-colibri.dtsi | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx7-colibr

[PATCH v3 6/6] arm: dts: imx7-colibri: Use enable-gpios for BL_ON

2016-10-07 Thread Bhuvanchandra DV
Use pwm-backlight driver 'enable-gpios' property for backlight on/off control. Signed-off-by: Bhuvanchandra DV --- arch/arm/boot/dts/imx7-colibri.dtsi | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx7-colibri.dtsi b/arch/arm/boot/dts/imx7

[PATCH v2 6/6] arm: dts: imx7-colibri: Use enable-gpios for BL_ON

2016-10-01 Thread Bhuvanchandra DV
Use pwm-backlight driver 'enable-gpios' property for backlight on/off control. Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- arch/arm/boot/dts/imx7-colibri.dtsi | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx7-colibr

[PATCH v2 6/6] arm: dts: imx7-colibri: Use enable-gpios for BL_ON

2016-10-01 Thread Bhuvanchandra DV
Use pwm-backlight driver 'enable-gpios' property for backlight on/off control. Signed-off-by: Bhuvanchandra DV --- arch/arm/boot/dts/imx7-colibri.dtsi | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx7-colibri.dtsi b/arch/arm/boot/dts/imx7

[PATCH v2 5/6] arm: dts: imx7-colibri: Use pwm polarity control

2016-10-01 Thread Bhuvanchandra DV
Configure PWM polarity control. Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- arch/arm/boot/dts/imx7-colibri.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx7-colibri.dtsi b/arch/arm/boot/dts/imx7-colibri.dtsi index a

[PATCH v2 0/6] Support PWM polarity control

2016-10-01 Thread Bhuvanchandra DV
]. [1] http://thread.gmane.org/gmane.linux.pwm/1621 [2] https://www.spinics.net/lists/arm-kernel/msg530818.html Bhuvanchandra DV (3): arm: dts: imx7: Update #pwm-cells for PWM polarity control arm: dts: imx7-colibri: Use pwm polarity control arm: dts: imx7-colibri: Use enable-gpios for BL_ON

[PATCH v2 5/6] arm: dts: imx7-colibri: Use pwm polarity control

2016-10-01 Thread Bhuvanchandra DV
Configure PWM polarity control. Signed-off-by: Bhuvanchandra DV --- arch/arm/boot/dts/imx7-colibri.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx7-colibri.dtsi b/arch/arm/boot/dts/imx7-colibri.dtsi index a9cc657..2af5e3e 100644 --- a/arch/arm

[PATCH v2 0/6] Support PWM polarity control

2016-10-01 Thread Bhuvanchandra DV
]. [1] http://thread.gmane.org/gmane.linux.pwm/1621 [2] https://www.spinics.net/lists/arm-kernel/msg530818.html Bhuvanchandra DV (3): arm: dts: imx7: Update #pwm-cells for PWM polarity control arm: dts: imx7-colibri: Use pwm polarity control arm: dts: imx7-colibri: Use enable-gpios for BL_ON

[PATCH v2 2/6] pwm: core: make the PWM_POLARITY flag in DTB optional

2016-10-01 Thread Bhuvanchandra DV
driver without having to modify all existing DTS files. Signed-off-by: Lothar Wassmann <l...@karo-electronics.de> Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> Suggested-by: Thierry Reding <thierry.red...@gmail.com> --- drivers/pwm/core.c | 27 ---

[PATCH v2 1/6] pwm: print error messages with pr_err() instead of pr_debug()

2016-10-01 Thread Bhuvanchandra DV
From: Lothar Wassmann <l...@karo-electronics.de> Make the messages that are printed in case of fatal errors actually visible to the user without having to recompile the driver with debugging enabled. Signed-off-by: Lothar Waßmann <l...@karo-electronics.de> Signed-off-by: Bhuv

[PATCH v2 1/6] pwm: print error messages with pr_err() instead of pr_debug()

2016-10-01 Thread Bhuvanchandra DV
From: Lothar Wassmann Make the messages that are printed in case of fatal errors actually visible to the user without having to recompile the driver with debugging enabled. Signed-off-by: Lothar Waßmann Signed-off-by: Bhuvanchandra DV --- drivers/pwm/core.c | 4 ++-- 1 file changed, 2

[PATCH v2 2/6] pwm: core: make the PWM_POLARITY flag in DTB optional

2016-10-01 Thread Bhuvanchandra DV
existing DTS files. Signed-off-by: Lothar Wassmann Signed-off-by: Bhuvanchandra DV Suggested-by: Thierry Reding --- drivers/pwm/core.c | 27 --- 1 file changed, 16 insertions(+), 11 deletions(-) diff --git a/drivers/pwm/core.c b/drivers/pwm/core.c index 195373e..aae8db3

[PATCH v2 3/6] pwm: imx: support output polarity inversion

2016-10-01 Thread Bhuvanchandra DV
ski <l.majew...@samsung.com> Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> Acked-by: Shawn Guo <shawn@linaro.org> Reviewed-by: Sascha Hauer <s.ha...@pengutronix.de> --- Documentation/devicetree/bindings/pwm/imx-pwm.txt | 6 +-- drivers/pwm/pwm-im

[PATCH v2 4/6] arm: dts: imx7: Update #pwm-cells for PWM polarity control

2016-10-01 Thread Bhuvanchandra DV
Update #pwm-cells to 3 in order to support PWM signal polarity control. Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> Acked-by: Rob Herring <r...@kernel.org> --- arch/arm/boot/dts/imx7s.dtsi | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --gi

[PATCH v2 3/6] pwm: imx: support output polarity inversion

2016-10-01 Thread Bhuvanchandra DV
From: Lothar Wassmann The i.MX pwm unit on i.MX27 and newer SoCs provides a configurable output polarity. This patch adds support to utilize this feature where available. Signed-off-by: Lothar Waßmann Signed-off-by: Lukasz Majewski Signed-off-by: Bhuvanchandra DV Acked-by: Shawn Guo

[PATCH v2 4/6] arm: dts: imx7: Update #pwm-cells for PWM polarity control

2016-10-01 Thread Bhuvanchandra DV
Update #pwm-cells to 3 in order to support PWM signal polarity control. Signed-off-by: Bhuvanchandra DV Acked-by: Rob Herring --- arch/arm/boot/dts/imx7s.dtsi | 8 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/arch/arm/boot/dts/imx7s.dtsi b/arch/arm/boot/dts/imx7s.dtsi

Re: [PATCH 1/3] arm: dts: imx7: Update #pwm-cells for PWM polarity control

2016-09-27 Thread Bhuvanchandra DV
On 09/23/16 23:22, Rob Herring wrote: On Mon, Sep 19, 2016 at 07:53:45PM +0530, Bhuvanchandra DV wrote: Update #pwm-cells to 3 in order to support PWM signal polarity control. Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- Documentation/devicetree/bindings/p

Re: [PATCH 1/3] arm: dts: imx7: Update #pwm-cells for PWM polarity control

2016-09-27 Thread Bhuvanchandra DV
On 09/23/16 23:22, Rob Herring wrote: On Mon, Sep 19, 2016 at 07:53:45PM +0530, Bhuvanchandra DV wrote: Update #pwm-cells to 3 in order to support PWM signal polarity control. Signed-off-by: Bhuvanchandra DV --- Documentation/devicetree/bindings/pwm/imx-pwm.txt | 6 +++--- arch/arm/boot

[PATCH 0/3] iMX7 PWM polarity control

2016-09-19 Thread Bhuvanchandra DV
] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-October/294027.html [2] https://www.spinics.net/lists/arm-kernel/msg530818.html Bhuvanchandra DV (3): arm: dts: imx7: Update #pwm-cells for PWM polarity control arm: dts: imx7-colibri: Use pwm polarity control arm: dts: imx7-colibri

[PATCH 0/3] iMX7 PWM polarity control

2016-09-19 Thread Bhuvanchandra DV
] http://lists.infradead.org/pipermail/linux-arm-kernel/2014-October/294027.html [2] https://www.spinics.net/lists/arm-kernel/msg530818.html Bhuvanchandra DV (3): arm: dts: imx7: Update #pwm-cells for PWM polarity control arm: dts: imx7-colibri: Use pwm polarity control arm: dts: imx7-colibri

[PATCH 2/3] arm: dts: imx7-colibri: Use pwm polarity control

2016-09-19 Thread Bhuvanchandra DV
Configure PWM polarity control. Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- arch/arm/boot/dts/imx7-colibri.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx7-colibri.dtsi b/arch/arm/boot/dts/imx7-colibri.dtsi index a

[PATCH 2/3] arm: dts: imx7-colibri: Use pwm polarity control

2016-09-19 Thread Bhuvanchandra DV
Configure PWM polarity control. Signed-off-by: Bhuvanchandra DV --- arch/arm/boot/dts/imx7-colibri.dtsi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx7-colibri.dtsi b/arch/arm/boot/dts/imx7-colibri.dtsi index a9cc657..2af5e3e 100644 --- a/arch/arm

[PATCH 1/3] arm: dts: imx7: Update #pwm-cells for PWM polarity control

2016-09-19 Thread Bhuvanchandra DV
Update #pwm-cells to 3 in order to support PWM signal polarity control. Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- Documentation/devicetree/bindings/pwm/imx-pwm.txt | 6 +++--- arch/arm/boot/dts/imx7s.dtsi | 8 2 files changed, 7 inse

[PATCH 1/3] arm: dts: imx7: Update #pwm-cells for PWM polarity control

2016-09-19 Thread Bhuvanchandra DV
Update #pwm-cells to 3 in order to support PWM signal polarity control. Signed-off-by: Bhuvanchandra DV --- Documentation/devicetree/bindings/pwm/imx-pwm.txt | 6 +++--- arch/arm/boot/dts/imx7s.dtsi | 8 2 files changed, 7 insertions(+), 7 deletions(-) diff --git

[PATCH 3/3] arm: dts: imx7-colibri: Use enable-gpios for BL_ON

2016-09-19 Thread Bhuvanchandra DV
Use pwm-backlight driver 'enable-gpios' property for backlight on/off control. Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- arch/arm/boot/dts/imx7-colibri.dtsi | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx7-colibr

[PATCH 3/3] arm: dts: imx7-colibri: Use enable-gpios for BL_ON

2016-09-19 Thread Bhuvanchandra DV
Use pwm-backlight driver 'enable-gpios' property for backlight on/off control. Signed-off-by: Bhuvanchandra DV --- arch/arm/boot/dts/imx7-colibri.dtsi | 10 +- 1 file changed, 9 insertions(+), 1 deletion(-) diff --git a/arch/arm/boot/dts/imx7-colibri.dtsi b/arch/arm/boot/dts/imx7

Re: [PATCH RESEND v2 0/8] Improve Rx/Tx DMA implementation

2016-08-03 Thread Bhuvanchandra DV
Hi Andrew, On 08/02/16 20:58, Andrew Lunn wrote: On Tue, Aug 02, 2016 at 01:23:32PM +0530, Bhuvanchandra DV wrote: Hello, Any comments on this patchset? I tested v1 on my Vybrid board and it fixed the corruption issues i was seeing with the console on a serial port. I will try to test

Re: [PATCH RESEND v2 0/8] Improve Rx/Tx DMA implementation

2016-08-03 Thread Bhuvanchandra DV
Hi Andrew, On 08/02/16 20:58, Andrew Lunn wrote: On Tue, Aug 02, 2016 at 01:23:32PM +0530, Bhuvanchandra DV wrote: Hello, Any comments on this patchset? I tested v1 on my Vybrid board and it fixed the corruption issues i was seeing with the console on a serial port. I will try to test

Re: [PATCH RESEND v2 0/8] Improve Rx/Tx DMA implementation

2016-08-02 Thread Bhuvanchandra DV
Hello, Any comments on this patchset? On 07/19/16 13:13, Bhuvanchandra DV wrote: Drop the clock change patch from v2 patchset[1] since it is applied. Changes since v1: Split suspend/resume patch. [1] https://lkml.org/lkml/2016/6/28/124 Bhuvanchandra DV (5): tty: serial: fsl_lpuart: Fix

Re: [PATCH RESEND v2 0/8] Improve Rx/Tx DMA implementation

2016-08-02 Thread Bhuvanchandra DV
Hello, Any comments on this patchset? On 07/19/16 13:13, Bhuvanchandra DV wrote: Drop the clock change patch from v2 patchset[1] since it is applied. Changes since v1: Split suspend/resume patch. [1] https://lkml.org/lkml/2016/6/28/124 Bhuvanchandra DV (5): tty: serial: fsl_lpuart: Fix

[PATCH RESEND v2 6/8] tty: serial: fsl_lpuart: Use scatter/gather DMA for Tx

2016-07-19 Thread Bhuvanchandra DV
Drop PIO to DMA switching and use scatter/gather DMA for Tx path to improve performance. Some part of the code is borrowed from imx serial driver. Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- drivers/tty/serial/fsl_lpuart.c | 257 ++---

[PATCH RESEND v2 6/8] tty: serial: fsl_lpuart: Use scatter/gather DMA for Tx

2016-07-19 Thread Bhuvanchandra DV
Drop PIO to DMA switching and use scatter/gather DMA for Tx path to improve performance. Some part of the code is borrowed from imx serial driver. Signed-off-by: Bhuvanchandra DV --- drivers/tty/serial/fsl_lpuart.c | 257 ++-- 1 file changed, 113 insertions

[PATCH RESEND v2 4/8] tty: serial: fsl_lpuart: Fix broken 8m/s1 support

2016-07-19 Thread Bhuvanchandra DV
By default the driver always configure the mode as 8s1 even when 8m1 mode is selected. Fix this by adding support to control the space/mark bit. Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- drivers/tty/serial/fsl_lpuart.c | 9 +++-- 1 file changed, 7 insertions

[PATCH RESEND v2 4/8] tty: serial: fsl_lpuart: Fix broken 8m/s1 support

2016-07-19 Thread Bhuvanchandra DV
By default the driver always configure the mode as 8s1 even when 8m1 mode is selected. Fix this by adding support to control the space/mark bit. Signed-off-by: Bhuvanchandra DV --- drivers/tty/serial/fsl_lpuart.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git

[PATCH RESEND v2 3/8] tty: serial: fsl_lpuart: fix clearing of receive flag

2016-07-19 Thread Bhuvanchandra DV
he data register is still required. This leads to a FIFO underrun. To avoid this, follow the advice in the overrun "Operation section": Unconditionally clear RXUF after using RXFLUSH. Signed-off-by: Stefan Agner <ste...@agner.ch> Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@t

[PATCH RESEND v2 3/8] tty: serial: fsl_lpuart: fix clearing of receive flag

2016-07-19 Thread Bhuvanchandra DV
l required. This leads to a FIFO underrun. To avoid this, follow the advice in the overrun "Operation section": Unconditionally clear RXUF after using RXFLUSH. Signed-off-by: Stefan Agner Signed-off-by: Bhuvanchandra DV --- drivers/tty/serial/fsl_lpuart.c | 9 ++--- 1 file changed

[PATCH RESEND v2 1/8] tty: serial: fsl_lpuart: consider TX FIFO too in tx_empty

2016-07-19 Thread Bhuvanchandra DV
itions between DMA and the driver by checking whether the TX DMA is in progress too. Signed-off-by: Stefan Agner <ste...@agner.ch> Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- drivers/tty/serial/fsl_lpuart.c | 14 -- 1 file changed, 12 insertions(+), 2 deleti

[PATCH RESEND v2 7/8] tty: serial: fsl_lpuart: Update suspend/resume for DMA mode

2016-07-19 Thread Bhuvanchandra DV
and start the DMA at resume. Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- drivers/tty/serial/fsl_lpuart.c | 44 + 1 file changed, 44 insertions(+) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 2

[PATCH RESEND v2 1/8] tty: serial: fsl_lpuart: consider TX FIFO too in tx_empty

2016-07-19 Thread Bhuvanchandra DV
and the driver by checking whether the TX DMA is in progress too. Signed-off-by: Stefan Agner Signed-off-by: Bhuvanchandra DV --- drivers/tty/serial/fsl_lpuart.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial

[PATCH RESEND v2 7/8] tty: serial: fsl_lpuart: Update suspend/resume for DMA mode

2016-07-19 Thread Bhuvanchandra DV
and start the DMA at resume. Signed-off-by: Bhuvanchandra DV --- drivers/tty/serial/fsl_lpuart.c | 44 + 1 file changed, 44 insertions(+) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 27687d5..134090a 100644 --- a/drivers

[PATCH RESEND v2 5/8] tty: serial: fsl_lpuart: Use cyclic DMA for Rx

2016-07-19 Thread Bhuvanchandra DV
driver. Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- drivers/tty/serial/fsl_lpuart.c | 483 +--- 1 file changed, 258 insertions(+), 225 deletions(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 6

[PATCH RESEND v2 5/8] tty: serial: fsl_lpuart: Use cyclic DMA for Rx

2016-07-19 Thread Bhuvanchandra DV
driver. Signed-off-by: Bhuvanchandra DV --- drivers/tty/serial/fsl_lpuart.c | 483 +--- 1 file changed, 258 insertions(+), 225 deletions(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 615f191..51d2b5a 100644 --- a/drivers

[PATCH RESEND v2 8/8] tty: serial: fsl_lpuart: Add support for RS-485

2016-07-19 Thread Bhuvanchandra DV
Enable Vybrid's build-in support for RS-485 auto RTS for controlling line direction of RS-485 transceiver driver. Enable RS485 feature by either using ioctrl 'TIOCSRS485' or enable it in the device tree by setting 'linux,rs485-enabled-at-boot-time' property. Signed-off-by: Bhuvanchandra DV

[PATCH RESEND v2 2/8] tty: serial: fsl_lpuart: support suspend/resume

2016-07-19 Thread Bhuvanchandra DV
From: Stefan Agner <ste...@agner.ch> Add suspend/resume support. Signed-off-by: Stefan Agner <ste...@agner.ch> Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- drivers/tty/serial/fsl_lpuart.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deleti

[PATCH RESEND v2 0/8] Improve Rx/Tx DMA implementation

2016-07-19 Thread Bhuvanchandra DV
Drop the clock change patch from v2 patchset[1] since it is applied. Changes since v1: Split suspend/resume patch. [1] https://lkml.org/lkml/2016/6/28/124 Bhuvanchandra DV (5): tty: serial: fsl_lpuart: Fix broken 8m/s1 support tty: serial: fsl_lpuart: Use cyclic DMA for Rx tty: serial

[PATCH RESEND v2 0/8] Improve Rx/Tx DMA implementation

2016-07-19 Thread Bhuvanchandra DV
Drop the clock change patch from v2 patchset[1] since it is applied. Changes since v1: Split suspend/resume patch. [1] https://lkml.org/lkml/2016/6/28/124 Bhuvanchandra DV (5): tty: serial: fsl_lpuart: Fix broken 8m/s1 support tty: serial: fsl_lpuart: Use cyclic DMA for Rx tty: serial

[PATCH RESEND v2 8/8] tty: serial: fsl_lpuart: Add support for RS-485

2016-07-19 Thread Bhuvanchandra DV
Enable Vybrid's build-in support for RS-485 auto RTS for controlling line direction of RS-485 transceiver driver. Enable RS485 feature by either using ioctrl 'TIOCSRS485' or enable it in the device tree by setting 'linux,rs485-enabled-at-boot-time' property. Signed-off-by: Bhuvanchandra DV

[PATCH RESEND v2 2/8] tty: serial: fsl_lpuart: support suspend/resume

2016-07-19 Thread Bhuvanchandra DV
From: Stefan Agner Add suspend/resume support. Signed-off-by: Stefan Agner Signed-off-by: Bhuvanchandra DV --- drivers/tty/serial/fsl_lpuart.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial

Re: [PATCH v2 0/9] Improve Rx/Tx DMA implementation

2016-07-04 Thread Bhuvanchandra DV
Ping! On 06/28/16 11:02, Bhuvanchandra DV wrote: Changes since v1: Split suspend/resume patch. Bhuvanchandra DV (5): tty: serial: fsl_lpuart: Fix broken 8m/s1 support tty: serial: fsl-lpuart: Use cyclic DMA for Rx tty: serial: fsl-lpuart: Use scatter/gather DMA for Tx tty: serial

Re: [PATCH v2 0/9] Improve Rx/Tx DMA implementation

2016-07-04 Thread Bhuvanchandra DV
Ping! On 06/28/16 11:02, Bhuvanchandra DV wrote: Changes since v1: Split suspend/resume patch. Bhuvanchandra DV (5): tty: serial: fsl_lpuart: Fix broken 8m/s1 support tty: serial: fsl-lpuart: Use cyclic DMA for Rx tty: serial: fsl-lpuart: Use scatter/gather DMA for Tx tty: serial

[PATCH v2 7/9] tty: serial: fsl-lpuart: Use scatter/gather DMA for Tx

2016-06-28 Thread Bhuvanchandra DV
Drop PIO to DMA switching and use scatter/gather DMA for Tx path to improve performance. Some part of the code is borrowed from imx serial driver. Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- drivers/tty/serial/fsl_lpuart.c | 257 ++---

[PATCH v2 7/9] tty: serial: fsl-lpuart: Use scatter/gather DMA for Tx

2016-06-28 Thread Bhuvanchandra DV
Drop PIO to DMA switching and use scatter/gather DMA for Tx path to improve performance. Some part of the code is borrowed from imx serial driver. Signed-off-by: Bhuvanchandra DV --- drivers/tty/serial/fsl_lpuart.c | 257 ++-- 1 file changed, 113 insertions

[PATCH v2 9/9] tty: serial: fsl_lpuart: Add support for RS-485

2016-06-28 Thread Bhuvanchandra DV
Enable Vybrid's build-in support for RS-485 auto RTS for controlling line direction of RS-485 transceiver driver. Enable RS485 feature by either using ioctrl 'TIOCSRS485' or enable it in the device tree by setting 'linux,rs485-enabled-at-boot-time' property. Signed-off-by: Bhuvanchandra DV

[PATCH v2 9/9] tty: serial: fsl_lpuart: Add support for RS-485

2016-06-28 Thread Bhuvanchandra DV
Enable Vybrid's build-in support for RS-485 auto RTS for controlling line direction of RS-485 transceiver driver. Enable RS485 feature by either using ioctrl 'TIOCSRS485' or enable it in the device tree by setting 'linux,rs485-enabled-at-boot-time' property. Signed-off-by: Bhuvanchandra DV

[PATCH v2 3/9] tty: serial: fsl_lpuart: support suspend/resume

2016-06-28 Thread Bhuvanchandra DV
From: Stefan Agner <ste...@agner.ch> Add suspend/resume support. Signed-off-by: Stefan Agner <ste...@agner.ch> Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- drivers/tty/serial/fsl_lpuart.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deleti

[PATCH v2 3/9] tty: serial: fsl_lpuart: support suspend/resume

2016-06-28 Thread Bhuvanchandra DV
From: Stefan Agner Add suspend/resume support. Signed-off-by: Stefan Agner Signed-off-by: Bhuvanchandra DV --- drivers/tty/serial/fsl_lpuart.c | 16 ++-- 1 file changed, 14 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial

[PATCH v2 8/9] tty: serial: fsl-lpuart: Update suspend/resume for DMA mode

2016-06-28 Thread Bhuvanchandra DV
and start the DMA at resume. Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- drivers/tty/serial/fsl_lpuart.c | 44 + 1 file changed, 44 insertions(+) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 2

[PATCH v2 8/9] tty: serial: fsl-lpuart: Update suspend/resume for DMA mode

2016-06-28 Thread Bhuvanchandra DV
and start the DMA at resume. Signed-off-by: Bhuvanchandra DV --- drivers/tty/serial/fsl_lpuart.c | 44 + 1 file changed, 44 insertions(+) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 27687d5..134090a 100644 --- a/drivers

[PATCH v2 0/9] Improve Rx/Tx DMA implementation

2016-06-28 Thread Bhuvanchandra DV
Changes since v1: Split suspend/resume patch. Bhuvanchandra DV (5): tty: serial: fsl_lpuart: Fix broken 8m/s1 support tty: serial: fsl-lpuart: Use cyclic DMA for Rx tty: serial: fsl-lpuart: Use scatter/gather DMA for Tx tty: serial: fsl-lpuart: Update suspend/resume for DMA mode tty

[PATCH v2 0/9] Improve Rx/Tx DMA implementation

2016-06-28 Thread Bhuvanchandra DV
Changes since v1: Split suspend/resume patch. Bhuvanchandra DV (5): tty: serial: fsl_lpuart: Fix broken 8m/s1 support tty: serial: fsl-lpuart: Use cyclic DMA for Rx tty: serial: fsl-lpuart: Use scatter/gather DMA for Tx tty: serial: fsl-lpuart: Update suspend/resume for DMA mode tty

[PATCH v2 5/9] tty: serial: fsl_lpuart: Fix broken 8m/s1 support

2016-06-28 Thread Bhuvanchandra DV
By default the driver always configure the mode as 8s1 even when 8m1 mode is selected. Fix this by adding support to control the space/mark bit. Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- drivers/tty/serial/fsl_lpuart.c | 9 +++-- 1 file changed, 7 insertions

[PATCH v2 5/9] tty: serial: fsl_lpuart: Fix broken 8m/s1 support

2016-06-28 Thread Bhuvanchandra DV
By default the driver always configure the mode as 8s1 even when 8m1 mode is selected. Fix this by adding support to control the space/mark bit. Signed-off-by: Bhuvanchandra DV --- drivers/tty/serial/fsl_lpuart.c | 9 +++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git

[PATCH v2 2/9] clk: imx: vf610: Disable automatic clock gating for lpuart in LPSTOP mode

2016-06-28 Thread Bhuvanchandra DV
, if wake is not enabled, the driver should disable the clocks explicitly to save power. Signed-off-by: Stefan Agner <ste...@agner.ch> Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- drivers/clk/imx/clk-vf610.c | 12 ++-- 1 file changed, 6 insertions(+), 6 del

[PATCH v2 2/9] clk: imx: vf610: Disable automatic clock gating for lpuart in LPSTOP mode

2016-06-28 Thread Bhuvanchandra DV
led, the driver should disable the clocks explicitly to save power. Signed-off-by: Stefan Agner Signed-off-by: Bhuvanchandra DV --- drivers/clk/imx/clk-vf610.c | 12 ++-- 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/drivers/clk/imx/clk-vf610.c b/drivers/clk/imx/clk-vf61

[PATCH v2 6/9] tty: serial: fsl-lpuart: Use cyclic DMA for Rx

2016-06-28 Thread Bhuvanchandra DV
driver. Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- drivers/tty/serial/fsl_lpuart.c | 483 +--- 1 file changed, 258 insertions(+), 225 deletions(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 6

[PATCH v2 6/9] tty: serial: fsl-lpuart: Use cyclic DMA for Rx

2016-06-28 Thread Bhuvanchandra DV
driver. Signed-off-by: Bhuvanchandra DV --- drivers/tty/serial/fsl_lpuart.c | 483 +--- 1 file changed, 258 insertions(+), 225 deletions(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 615f191..51d2b5a 100644 --- a/drivers

[PATCH v2 4/9] tty: serial: fsl_lpuart: fix clearing of receive flag

2016-06-27 Thread Bhuvanchandra DV
he data register is still required. This leads to a FIFO underrun. To avoid this, follow the advice in the overrun "Operation section": Unconditionally clear RXUF after using RXFLUSH. Signed-off-by: Stefan Agner <ste...@agner.ch> Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@t

[PATCH v2 4/9] tty: serial: fsl_lpuart: fix clearing of receive flag

2016-06-27 Thread Bhuvanchandra DV
l required. This leads to a FIFO underrun. To avoid this, follow the advice in the overrun "Operation section": Unconditionally clear RXUF after using RXFLUSH. Signed-off-by: Stefan Agner Signed-off-by: Bhuvanchandra DV --- drivers/tty/serial/fsl_lpuart.c | 9 ++--- 1 file changed

[PATCH v2 1/9] tty: serial: fsl_lpuart: consider TX FIFO too in tx_empty

2016-06-27 Thread Bhuvanchandra DV
itions between DMA and the driver by checking whether the TX DMA is in progress too. Signed-off-by: Stefan Agner <ste...@agner.ch> Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- drivers/tty/serial/fsl_lpuart.c | 14 -- 1 file changed, 12 insertions(+), 2 deleti

[PATCH v2 1/9] tty: serial: fsl_lpuart: consider TX FIFO too in tx_empty

2016-06-27 Thread Bhuvanchandra DV
and the driver by checking whether the TX DMA is in progress too. Signed-off-by: Stefan Agner Signed-off-by: Bhuvanchandra DV --- drivers/tty/serial/fsl_lpuart.c | 14 -- 1 file changed, 12 insertions(+), 2 deletions(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial

Re: [PATCH 1/8] tty: serial: fsl_lpuart: consider TX FIFO too in tx_empty

2016-06-27 Thread Bhuvanchandra DV
On 06/26/16 02:56, Greg KH wrote: On Thu, Jun 09, 2016 at 08:40:32PM +0530, Bhuvanchandra DV wrote: From: Stefan Agner <ste...@agner.ch> Currently the tx_empty callback only considers the Transmit Complete Flag (TC). The reference manual is not quite clear if the TC flag covers the T

Re: [PATCH 1/8] tty: serial: fsl_lpuart: consider TX FIFO too in tx_empty

2016-06-27 Thread Bhuvanchandra DV
On 06/26/16 02:56, Greg KH wrote: On Thu, Jun 09, 2016 at 08:40:32PM +0530, Bhuvanchandra DV wrote: From: Stefan Agner Currently the tx_empty callback only considers the Transmit Complete Flag (TC). The reference manual is not quite clear if the TC flag covers the TX FIFO too. Debug prints

[PATCH 6/8] tty: serial: fsl-lpuart: Use scatter/gather DMA for Tx Drop PIO to DMA switching and use scatter/gather DMA for Tx path to improve performance.

2016-06-09 Thread Bhuvanchandra DV
Some part of the code is borrowed from imx serial driver. Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- drivers/tty/serial/fsl_lpuart.c | 257 ++-- 1 file changed, 113 insertions(+), 144 deletions(-) diff --git a/drivers/tty/

[PATCH 6/8] tty: serial: fsl-lpuart: Use scatter/gather DMA for Tx Drop PIO to DMA switching and use scatter/gather DMA for Tx path to improve performance.

2016-06-09 Thread Bhuvanchandra DV
Some part of the code is borrowed from imx serial driver. Signed-off-by: Bhuvanchandra DV --- drivers/tty/serial/fsl_lpuart.c | 257 ++-- 1 file changed, 113 insertions(+), 144 deletions(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial

[PATCH 1/8] tty: serial: fsl_lpuart: consider TX FIFO too in tx_empty

2016-06-09 Thread Bhuvanchandra DV
From: Stefan Agner Currently the tx_empty callback only considers the Transmit Complete Flag (TC). The reference manual is not quite clear if the TC flag covers the TX FIFO too. Debug prints on real hardware have shown that from time to time the TC flag is asserted (indicating

[PATCH 8/8] tty: serial: fsl_lpuart: Add support for RS-485

2016-06-09 Thread Bhuvanchandra DV
Enable Vybrid's build-in support for RS-485 auto RTS for controlling line direction of RS-485 transceiver driver. Enable RS485 feature by either using ioctrl 'TIOCSRS485' or enable it in the device tree by setting 'linux,rs485-enabled-at-boot-time' property. Signed-off-by: Bhuvanchandra DV

[PATCH 1/8] tty: serial: fsl_lpuart: consider TX FIFO too in tx_empty

2016-06-09 Thread Bhuvanchandra DV
From: Stefan Agner Currently the tx_empty callback only considers the Transmit Complete Flag (TC). The reference manual is not quite clear if the TC flag covers the TX FIFO too. Debug prints on real hardware have shown that from time to time the TC flag is asserted (indicating Transmitter idle)

[PATCH 8/8] tty: serial: fsl_lpuart: Add support for RS-485

2016-06-09 Thread Bhuvanchandra DV
Enable Vybrid's build-in support for RS-485 auto RTS for controlling line direction of RS-485 transceiver driver. Enable RS485 feature by either using ioctrl 'TIOCSRS485' or enable it in the device tree by setting 'linux,rs485-enabled-at-boot-time' property. Signed-off-by: Bhuvanchandra DV

[PATCH 5/8] tty: serial: fsl-lpuart: Use cyclic DMA for Rx

2016-06-09 Thread Bhuvanchandra DV
driver. Signed-off-by: Bhuvanchandra DV <bhuvanchandra...@toradex.com> --- drivers/tty/serial/fsl_lpuart.c | 483 +--- 1 file changed, 258 insertions(+), 225 deletions(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 6

[PATCH 5/8] tty: serial: fsl-lpuart: Use cyclic DMA for Rx

2016-06-09 Thread Bhuvanchandra DV
driver. Signed-off-by: Bhuvanchandra DV --- drivers/tty/serial/fsl_lpuart.c | 483 +--- 1 file changed, 258 insertions(+), 225 deletions(-) diff --git a/drivers/tty/serial/fsl_lpuart.c b/drivers/tty/serial/fsl_lpuart.c index 615f191..51d2b5a 100644 --- a/drivers

  1   2   3   >