[PATCH] serial: 8250_mtk: support big baud rate.

2016-08-11 Thread Long Cheng
From: Eddie Huang <eddie.hu...@mediatek.com> mediatek can support baud rate up to 4M. the 'uart_get_baud_rate' function will limit the max baud rate. Modify max baud to remove the limit. Signed-off-by: Long Cheng <long.ch...@mediatek.com> --- drivers/tty/serial/8250/8250_m

[PATCH 3/4] serial: 8250-mtk: add uart DMA support

2017-02-16 Thread Long Cheng
Modify uart register to support DMA function. Signed-off-by: Long Cheng <long.ch...@mediatek.com> --- drivers/tty/serial/8250/8250_mtk.c | 194 +++- 1 file changed, 193 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drive

[PATCH 0/4] add uart DMA function

2017-02-16 Thread Long Cheng
, the code of UART DMA function. Long Cheng (4): dt-bindings: dma: uart: add uart dma bindings dmaengine: mtk_uart_dma: add Mediatek uart DMA support serial: 8250-mtk: add uart DMA support arm: dts: mt2701: add uart APDMA to device tree .../devicetree/bindings/dma/mtk_uart_dma.txt

[PATCH 2/4] dmaengine: mtk_uart_dma: add Mediatek uart DMA support

2017-02-16 Thread Long Cheng
In DMA engine framework, add 8250 mtk dma to support it. Signed-off-by: Long Cheng <long.ch...@mediatek.com> --- drivers/dma/Kconfig|9 + drivers/dma/Makefile |1 + drivers/dma/mtk_uart_dma.c | 955 3 files change

[PATCH 4/4] arm: dts: mt2701: add uart APDMA to device tree

2017-02-16 Thread Long Cheng
1. add uart APDMA controller device node 2. add uart 0/1/2/3 DMA function 3. uart0 is console, So disable DMA 4. enable uart2 port to test DMA function. Signed-off-by: Long Cheng <long.ch...@mediatek.com> --- arch/arm/boot/dts/mt2701-evb.dts | 22 ++ arch/arm/bo

[PATCH 1/4] dt-bindings: dma: uart: add uart dma bindings

2017-02-16 Thread Long Cheng
add uart dma bindings Signed-off-by: Long Cheng <long.ch...@mediatek.com> --- .../devicetree/bindings/dma/mtk_uart_dma.txt | 32 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/mtk_uart_dma.txt diff --git a/Documen

Re: [PATCH] serial: 8250_mtk: support big baud rate.

2016-08-24 Thread Long Cheng
On Fri, 2016-08-12 at 10:41 +0800, Long Cheng wrote: > From: Eddie Huang <eddie.hu...@mediatek.com> > > mediatek can support baud rate up to 4M. > the 'uart_get_baud_rate' function will limit the max baud rate. > Modify max baud to remove the limit. > > Signed-

[PATCH 1/4] dt-bindings: dma: uart: add uart dma bindings

2018-09-20 Thread Long Cheng
add uart dma bindings Signed-off-by: Long Cheng --- .../devicetree/bindings/dma/8250_mtk_dma.txt | 32 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/8250_mtk_dma.txt diff --git a/Documentation/devicetree/bindings/dma

[PATCH 0/4] add uart DMA function

2018-09-20 Thread Long Cheng
, the code of UART DMA function. Long Cheng (4): dt-bindings: dma: uart: add uart dma bindings dmaengine: mtk_uart_dma: add Mediatek uart DMA support serial: 8250-mtk: add uart DMA support arm: dts: mt2701: add uart APDMA to device tree .../devicetree/bindings/dma/8250_mtk_dma.txt

[PATCH 4/4] arm: dts: mt2701: add uart APDMA to device tree

2018-09-20 Thread Long Cheng
1. add uart APDMA controller device node 2. add uart 0/1/2/3 DMA function 3. uart0 is console, So disable DMA 4. enable uart2 port to test DMA function. Signed-off-by: Long Cheng --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 50 + 1 file changed, 50 insertions

[PATCH 2/4] dmaengine: mtk_uart_dma: add Mediatek uart DMA support

2018-09-20 Thread Long Cheng
In DMA engine framework, add 8250 mtk dma to support it. Signed-off-by: Long Cheng --- drivers/dma/8250_mtk_dma.c | 1049 drivers/dma/Kconfig| 11 + drivers/dma/Makefile |1 + 3 files changed, 1061 insertions(+) create mode

[PATCH 3/4] serial: 8250-mtk: add uart DMA support

2018-09-20 Thread Long Cheng
Modify uart register to support DMA function. Signed-off-by: Long Cheng --- drivers/tty/serial/8250/8250_mtk.c | 211 +++- 1 file changed, 210 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c

[PATCH v2 4/4] arm: dts: mt2701: add uart APDMA to device tree

2018-12-05 Thread Long Cheng
1. add uart APDMA controller device node 2. add uart 0/1/2/3/4/5 DMA function Signed-off-by: Long Cheng --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 50 + 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot

[PATCH v2 0/4] add uart DMA function

2018-12-05 Thread Long Cheng
, the code of UART DM Changes compared to v1: -mian revised file, 8250_mtk_dma.c --parameters renamed for standard --remove atomic operation Long Cheng (4): dt-bindings: dma: uart: add uart dma bindings dmaengine: mtk_uart_dma: add Mediatek uart DMA support serial: 8250-mtk: add uart DMA

[PATCH v2 1/4] dt-bindings: dma: uart: add uart dma bindings

2018-12-05 Thread Long Cheng
add uart dma bindings Signed-off-by: Long Cheng Reviewed-by: Rob Herring --- .../devicetree/bindings/dma/8250_mtk_dma.txt | 33 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/8250_mtk_dma.txt diff --git a/Documentation

[PATCH v2 2/4] dmaengine: mtk_uart_dma: add Mediatek uart DMA support

2018-12-05 Thread Long Cheng
In DMA engine framework, add 8250 mtk dma to support it. Signed-off-by: Long Cheng --- drivers/dma/mediatek/8250_mtk_dma.c | 894 +++ drivers/dma/mediatek/Kconfig| 11 + drivers/dma/mediatek/Makefile |1 + 3 files changed, 906 insertions

[PATCH v2 3/4] serial: 8250-mtk: add uart DMA support

2018-12-05 Thread Long Cheng
Modify uart register to support DMA function. Signed-off-by: Long Cheng --- drivers/tty/serial/8250/8250_mtk.c | 210 +++- 1 file changed, 209 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c

Re: [PATCH v2 2/4] dmaengine: mtk_uart_dma: add Mediatek uart DMA support

2018-12-06 Thread Long Cheng
On Wed, 2018-12-05 at 13:07 -0800, Sean Wang wrote: > . > On Wed, Dec 5, 2018 at 1:31 AM Long Cheng wrote: > > > > In DMA engine framework, add 8250 mtk dma to support it. > > > > Signed-off-by: Long Cheng > > --- > >

[PATCH v3 1/2] dmaengine: 8250_mtk_dma: add Mediatek uart DMA support

2018-12-06 Thread Long Cheng
In DMA engine framework, add 8250 mtk dma to support it. Signed-off-by: Long Cheng --- drivers/dma/mediatek/8250_mtk_dma.c | 847 +++ drivers/dma/mediatek/Kconfig| 11 + drivers/dma/mediatek/Makefile |1 + 3 files changed, 859 insertions

[PATCH v3 0/2] add uart DMA function

2018-12-06 Thread Long Cheng
, the code of UART DM Changes compared to v2: -remove unimportant parameters -instead of cookie, use APIs of virtual channel. -use of_dma_xlate_by_chan_id. Changes compared to v1: -mian revised file, 8250_mtk_dma.c --parameters renamed for standard --remove atomic operation Long Cheng (2

[PATCH v3 2/2] arm: dts: mt2701: add uart APDMA to device tree

2018-12-06 Thread Long Cheng
1. add uart APDMA controller device node 2. add uart 0/1/2/3/4/5 DMA function Signed-off-by: Long Cheng --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 50 + 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot

Re: [PATCH 4/4] serial: 8250-mtk: modify uart DMA rx

2019-05-21 Thread Long Cheng
On Fri, 2019-05-17 at 15:36 +0800, Long Cheng wrote: > On Wed, 2019-05-15 at 21:48 +0800, Nicolas Boichat wrote: > > On Sat, Apr 27, 2019 at 11:36 AM Long Cheng wrote: > > > > > > Modify uart rx and complete for DMA. > > > > I don't know much about the DM

[PATCH 2/2] serial: 8250-mtk: modify uart DMA rx

2019-05-23 Thread Long Cheng
Modify uart rx and complete for DMA Signed-off-by: Long Cheng --- drivers/tty/serial/8250/8250_mtk.c | 49 +++- 1 file changed, 20 insertions(+), 29 deletions(-) diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c index

[PATCH v13 1/2] arm: dts: mt2712: add uart APDMA to device tree

2019-05-23 Thread Long Cheng
1. add uart APDMA controller device node 2. add uart 0/1/2/3/4/5 DMA function Signed-off-by: Long Cheng --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 51 + 1 file changed, 51 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot

[PATCH v13 0/2] add uart DMA function

2019-05-23 Thread Long Cheng
--parameters renamed for standard --remove atomic operation Long Cheng (2): arm: dts: mt2712: add uart APDMA to device tree serial: 8250-mtk: modify uart DMA rx arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 51 + drivers/tty/serial/8250/8250_mtk.c| 49

Re: [PATCH 2/2] serial: 8250-mtk: modify uart DMA rx

2019-05-30 Thread Long Cheng
On Thu, 2019-05-23 at 15:35 +0800, Long Cheng wrote: Hi Greg, Just a gentle ping! thanks. > Modify uart rx and complete for DMA > > Signed-off-by: Long Cheng > --- > drivers/tty/serial/8250/8250_mtk.c | 49 > +++- > 1 file changed,

Re: [PATCH v10 1/3] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2019-02-13 Thread Long Cheng
On Mon, 2019-02-04 at 12:51 +0530, Vinod Koul wrote: Hi Vinod sir, > On 18-01-19, 11:10, Long Cheng wrote: > > +static enum dma_status mtk_uart_apdma_tx_status(struct dma_chan *chan, > > +dma_cookie_t cookie, > > +

Re: [PATCH v10 1/3] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2019-01-27 Thread Long Cheng
On Fri, 2019-01-18 at 11:10 +0800, Long Cheng wrote: Hi Vinod Koul, Just a gentle ping! thanks. > In DMA engine framework, add 8250 uart dma to support MediaTek uart. > If MediaTek uart enabled(SERIAL_8250_MT6577), and want to improve > the performance, can enable the function. >

[PATCH v10 0/3] add uart DMA function

2019-01-17 Thread Long Cheng
compared to v1: -mian revised file, 8250_mtk_dma.c --parameters renamed for standard --remove atomic operation Long Cheng (3): dmaengine: 8250_mtk_dma: add MediaTek uart DMA support arm: dts: mt2712: add uart APDMA to device tree dt-bindings: dma: uart: rename binding .../devicetree

[PATCH v10 3/3] dt-bindings: dma: uart: rename binding

2019-01-17 Thread Long Cheng
The filename matches mtk-uart-apdma.c. So using "mtk-uart-apdma.txt" should be better. Signed-off-by: Long Cheng --- .../devicetree/bindings/dma/8250_mtk_dma.txt | 33 .../devicetree/bindings/dma/mtk-uart-apdma.txt | 33 2 fil

[PATCH v10 2/3] arm: dts: mt2712: add uart APDMA to device tree

2019-01-17 Thread Long Cheng
1. add uart APDMA controller device node 2. add uart 0/1/2/3/4/5 DMA function Signed-off-by: Long Cheng --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 51 + 1 file changed, 51 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot

[PATCH v10 1/3] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2019-01-17 Thread Long Cheng
In DMA engine framework, add 8250 uart dma to support MediaTek uart. If MediaTek uart enabled(SERIAL_8250_MT6577), and want to improve the performance, can enable the function. Signed-off-by: Long Cheng --- drivers/dma/mediatek/Kconfig | 11 + drivers/dma/mediatek/Makefile

Re: [PATCH v5 1/2] dmaengine: 8250_mtk_dma: add Mediatek uart DMA support

2018-12-17 Thread Long Cheng
On Fri, 2018-12-14 at 12:09 -0800, Sean Wang wrote: thanks for your reply. > On Thu, Dec 13, 2018 at 3:36 AM Long Cheng wrote: > > Hope those comments did not get a response that means they're fine with you. > > < ... > > > > > > +struct mtk_dmadev { &g

Re: [PATCH v5 1/2] dmaengine: 8250_mtk_dma: add Mediatek uart DMA support

2018-12-17 Thread Long Cheng
On Mon, 2018-12-17 at 02:07 -0800, Sean Wang wrote: > On Mon, Dec 17, 2018 at 12:40 AM Long Cheng wrote: > > > > On Fri, 2018-12-14 at 12:09 -0800, Sean Wang wrote: > > < ... > > > > > > > > + > > > > >

Re: [PATCH v5 1/2] dmaengine: 8250_mtk_dma: add Mediatek uart DMA support

2018-12-13 Thread Long Cheng
On Tue, 2018-12-11 at 15:12 -0800, Sean Wang wrote: > Sorry for that I didn't have a full review at one time in the earlier version > >On Mon, Dec 10, 2018 at 9:37 PM Long Cheng > wrote: > > > > In DMA engine framework, add 8250 mtk dma to support it. > >

[PATCH v5 1/2] dmaengine: 8250_mtk_dma: add Mediatek uart DMA support

2018-12-10 Thread Long Cheng
In DMA engine framework, add 8250 mtk dma to support it. Signed-off-by: Long Cheng --- drivers/dma/mediatek/8250_mtk_dma.c | 830 +++ drivers/dma/mediatek/Kconfig| 11 + drivers/dma/mediatek/Makefile |1 + 3 files changed, 842 insertions

[PATCH v5 2/2] arm: dts: mt2712: add uart APDMA to device tree

2018-12-10 Thread Long Cheng
1. add uart APDMA controller device node 2. add uart 0/1/2/3/4/5 DMA function Signed-off-by: Long Cheng --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 50 + 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot

[PATCH v5 0/2] add uart DMA function

2018-12-10 Thread Long Cheng
revised file, 8250_mtk_dma.c --parameters renamed for standard --remove atomic operation Long Cheng (2): dmaengine: 8250_mtk_dma: add Mediatek uart DMA support arm: dts: mt2712: add uart APDMA to device tree arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 50 ++ drivers/dma/mediatek

[PATCH v6 1/2] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2018-12-18 Thread Long Cheng
In DMA engine framework, add 8250 uart dma to support MediaTek uart. If MediaTek uart enabled(SERIAL_8250_MT6577), and want to improve the performance, can enable the function. Signed-off-by: Long Cheng --- drivers/dma/mediatek/8250_mtk_dma.c | 694 +++ drivers

[PATCH v6 2/2] arm: dts: mt2712: add uart APDMA to device tree

2018-12-18 Thread Long Cheng
1. add uart APDMA controller device node 2. add uart 0/1/2/3/4/5 DMA function Signed-off-by: Long Cheng --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 50 + 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot

[PATCH v6 0/2] add uart DMA function

2018-12-18 Thread Long Cheng
of virtual channel. -use of_dma_xlate_by_chan_id. Changes compared to v1: -mian revised file, 8250_mtk_dma.c --parameters renamed for standard --remove atomic operation Long Cheng (2): dmaengine: 8250_mtk_dma: add MediaTek uart DMA support arm: dts: mt2712: add uart APDMA to device tree arch

[PATCH v2 2/4] dmaengine: mtk_uart_dma: add Mediatek uart DMA support

2018-12-05 Thread Long Cheng
In DMA engine framework, add 8250 mtk dma to support it. Signed-off-by: Long Cheng --- drivers/dma/mediatek/8250_mtk_dma.c | 894 +++ drivers/dma/mediatek/Kconfig| 11 + drivers/dma/mediatek/Makefile |1 + 3 files changed, 906 insertions

[PATCH v2 3/4] serial: 8250-mtk: add uart DMA support

2018-12-05 Thread Long Cheng
Modify uart register to support DMA function. Signed-off-by: Long Cheng --- drivers/tty/serial/8250/8250_mtk.c | 210 +++- 1 file changed, 209 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c

[PATCH v2 4/4] arm: dts: mt2701: add uart APDMA to device tree

2018-12-05 Thread Long Cheng
1. add uart APDMA controller device node 2. add uart 0/1/2/3/4/5 DMA function Signed-off-by: Long Cheng --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 50 + 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot

[PATCH v2 0/4] add uart DMA function

2018-12-05 Thread Long Cheng
, the code of UART DM Changes compared to v1: -mian revised file, 8250_mtk_dma.c --parameters renamed for standard --remove atomic operation Long Cheng (4): dt-bindings: dma: uart: add uart dma bindings dmaengine: mtk_uart_dma: add Mediatek uart DMA support serial: 8250-mtk: add uart DMA

[PATCH v2 1/4] dt-bindings: dma: uart: add uart dma bindings

2018-12-05 Thread Long Cheng
add uart dma bindings Signed-off-by: Long Cheng Reviewed-by: Rob Herring --- .../devicetree/bindings/dma/8250_mtk_dma.txt | 33 1 file changed, 33 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/8250_mtk_dma.txt diff --git a/Documentation

Re: [PATCH v2 2/4] dmaengine: mtk_uart_dma: add Mediatek uart DMA support

2018-12-06 Thread Long Cheng
On Wed, 2018-12-05 at 13:07 -0800, Sean Wang wrote: > . > On Wed, Dec 5, 2018 at 1:31 AM Long Cheng wrote: > > > > In DMA engine framework, add 8250 mtk dma to support it. > > > > Signed-off-by: Long Cheng > > --- > >

[PATCH 1/2] serial: 8250-mtk: add follow control

2019-04-25 Thread Long Cheng
Add SW and HW follow control function. Signed-off-by: Long Cheng --- drivers/tty/serial/8250/8250_mtk.c | 60 ++-- 1 file changed, 37 insertions(+), 23 deletions(-) diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c index

[PATCH 0/2] Perfect 8250 mtk uart function.

2019-04-25 Thread Long Cheng
Perfect 8250 mtk uart function, 1.Modify baudrate setting 2.Add follow control function Long Cheng (2): serial: 8250-mtk: add follow control serial: 8250-mtk: modify baudrate setting drivers/tty/serial/8250/8250_mtk.c | 162 +++-- 1 file changed, 139

[PATCH 2/2] serial: 8250-mtk: modify baudrate setting

2019-04-25 Thread Long Cheng
In termios function, add Fractional divider to adjust baudrate. Signed-off-by: Long Cheng --- drivers/tty/serial/8250/8250_mtk.c | 102 1 file changed, 102 insertions(+) diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c

Re: [PATCH 1/2] serial: 8250-mtk: add follow control

2019-04-25 Thread Long Cheng
On Thu, 2019-04-25 at 12:40 +0200, Matthias Brugger wrote: > > On 25/04/2019 10:41, Long Cheng wrote: > > Add SW and HW follow control function. > > Can you please explain a bit more what you are doing in this patch. > You change the setting of the registers for differe

[PATCH v12 0/4] add uart DMA function

2019-04-26 Thread Long Cheng
: -fix CONFIG_PM, will cause build fail Changes compared to v2: -remove unimportant parameters -instead of cookie, use APIs of virtual channel. -use of_dma_xlate_by_chan_id. Changes compared to v1: -mian revised file, 8250_mtk_dma.c --parameters renamed for standard --remove atomic operation Long

[PATCH 2/4] arm: dts: mt2712: add uart APDMA to device tree

2019-04-26 Thread Long Cheng
1. add uart APDMA controller device node 2. add uart 0/1/2/3/4/5 DMA function Signed-off-by: Long Cheng --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 51 + 1 file changed, 51 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot

[PATCH 4/4] serial: 8250-mtk: modify uart DMA rx

2019-04-26 Thread Long Cheng
Modify uart rx and complete for DMA. Signed-off-by: Long Cheng --- drivers/tty/serial/8250/8250_mtk.c | 53 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c index

[PATCH 1/4] dmaengine: mediatek: Add MediaTek UART APDMA support

2019-04-26 Thread Long Cheng
Add 8250 UART APDMA to support MediaTek UART. If MediaTek UART is enabled by SERIAL_8250_MT6577, and we can enable this driver to offload the UART device moving bytes. Signed-off-by: Long Cheng Signed-off-by: Sean Wang --- drivers/dma/mediatek/Kconfig | 11 + drivers/dma/mediatek

[PATCH 3/4] dt-bindings: dma: uart: rename binding

2019-04-26 Thread Long Cheng
The filename matches mtk-uart-apdma.c. So using "mtk-uart-apdma.txt" should be better. And add some property. Signed-off-by: Long Cheng --- .../devicetree/bindings/dma/8250_mtk_dma.txt | 33 .../devicetree/bindings/dma/mtk-uart-apdma.txt | 55 +

Re: [PATCH 4/4] serial: 8250-mtk: modify uart DMA rx

2019-05-17 Thread Long Cheng
On Wed, 2019-05-15 at 21:48 +0800, Nicolas Boichat wrote: > On Sat, Apr 27, 2019 at 11:36 AM Long Cheng wrote: > > > > Modify uart rx and complete for DMA. > > I don't know much about the DMA framework, but can you please explain > why you are making the changes in

Re: [PATCH v11 1/4] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2019-04-09 Thread Long Cheng
On Sun, 2019-03-10 at 19:15 +0800, Nicolas Boichat wrote: > On Thu, Mar 7, 2019 at 9:45 AM Long Cheng wrote: > > > > In DMA engine framework, add 8250 uart dma to support MediaTek uart. > > If MediaTek uart enabled(SERIAL_8250_MT6577), and want to improve > >

Re: [PATCH v11 1/4] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2019-04-11 Thread Long Cheng
On Sun, 2019-03-10 at 17:31 -0700, Sean Wang wrote: > Hi, Long > > List some comments as the below and this week I will find a board to > test and then improve the driver. > > Sean > > On Wed, Mar 6, 2019 at 5:45 PM Long Cheng wrote: > > > > In DMA

[PATCH v11 0/4] add uart DMA function

2019-03-06 Thread Long Cheng
: -remove unimportant parameters -instead of cookie, use APIs of virtual channel. -use of_dma_xlate_by_chan_id. Changes compared to v1: -mian revised file, 8250_mtk_dma.c --parameters renamed for standard --remove atomic operation Long Cheng (4): dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

[PATCH v11 4/4] serial: 8250-mtk: modify uart DMA rx

2019-03-06 Thread Long Cheng
Modify uart rx and complete for DMA. Signed-off-by: Long Cheng --- drivers/tty/serial/8250/8250_mtk.c | 53 1 file changed, 23 insertions(+), 30 deletions(-) diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c index

[PATCH v11 2/4] arm: dts: mt2712: add uart APDMA to device tree

2019-03-06 Thread Long Cheng
1. add uart APDMA controller device node 2. add uart 0/1/2/3/4/5 DMA function Signed-off-by: Long Cheng --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 51 + 1 file changed, 51 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot

[PATCH v11 1/4] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2019-03-06 Thread Long Cheng
In DMA engine framework, add 8250 uart dma to support MediaTek uart. If MediaTek uart enabled(SERIAL_8250_MT6577), and want to improve the performance, can enable the function. Signed-off-by: Long Cheng --- drivers/dma/mediatek/Kconfig | 11 + drivers/dma/mediatek/Makefile

[PATCH v11 3/4] dt-bindings: dma: uart: rename binding

2019-03-06 Thread Long Cheng
The filename matches mtk-uart-apdma.c. So using "mtk-uart-apdma.txt" should be better. And add some property. Signed-off-by: Long Cheng Reviewed-by: Rob Herring --- .../devicetree/bindings/dma/8250_mtk_dma.txt | 33 .../devicetree/bindings/dma/mtk-uart

Re: [PATCH v9 1/2] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2019-01-21 Thread Long Cheng
On Sun, 2019-01-20 at 10:57 +0530, Vinod Koul wrote: > On 10-01-19, 18:33, Long Cheng wrote: > > On Fri, 2019-01-04 at 22:49 +0530, Vinod Koul wrote: > > > On 02-01-19, 10:12, Long Cheng wrote: > > > > In DMA engine framework, add 8250 uart dma to support MediaTek

[PATCH v9 2/2] arm: dts: mt2712: add uart APDMA to device tree

2019-01-01 Thread Long Cheng
1. add uart APDMA controller device node 2. add uart 0/1/2/3/4/5 DMA function Signed-off-by: Long Cheng --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 50 + 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot

[PATCH v9 1/2] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2019-01-01 Thread Long Cheng
In DMA engine framework, add 8250 uart dma to support MediaTek uart. If MediaTek uart enabled(SERIAL_8250_MT6577), and want to improve the performance, can enable the function. Signed-off-by: Long Cheng --- drivers/dma/mediatek/8250_mtk_dma.c | 652 +++ drivers

[PATCH v9 0/2] add uart DMA function

2019-01-01 Thread Long Cheng
In Mediatek SOCs, the uart can support DMA function. Base on DMA engine formwork, we add the DMA code to support uart. And put the code under drivers/dma. This series contains document bindings, Kconfig to control the function enable or not, device tree including interrupt and dma device node,

Re: [PATCH v9 1/2] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2019-01-10 Thread Long Cheng
On Thu, 2019-01-03 at 09:39 +0800, Nicolas Boichat wrote: > On Wed, Jan 2, 2019 at 10:13 AM Long Cheng wrote: > > . > > +/* interrupt trigger level for tx */ > > +#define VFF_TX_THRE(n) ((n) * 7 / 8) > > +/* interrupt trigger level for rx */ > > +#

Re: [PATCH v9 1/2] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2019-01-10 Thread Long Cheng
On Wed, 2019-01-02 at 18:03 -0800, Randy Dunlap wrote: > Hi, > > While you are making changes, here are a few more: > hi OK, thanks for your comments. > > On 1/2/19 5:39 PM, Nicolas Boichat wrote: > > diff --git a/drivers/dma/mediatek/Kconfig b/drivers/dma/mediatek/Kconfig > > index

Re: [PATCH v9 1/2] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2019-01-10 Thread Long Cheng
On Fri, 2019-01-04 at 22:49 +0530, Vinod Koul wrote: > On 02-01-19, 10:12, Long Cheng wrote: > > In DMA engine framework, add 8250 uart dma to support MediaTek uart. > > If MediaTek uart enabled(SERIAL_8250_MT6577), and want to improve > > the performance, can enable the func

Re: [PATCH v9 1/2] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2019-01-10 Thread Long Cheng
On Thu, 2019-01-10 at 18:33 +0800, Long Cheng wrote: fix spell error > On Fri, 2019-01-04 at 22:49 +0530, Vinod Koul wrote: > > On 02-01-19, 10:12, Long Cheng wrote: > > > In DMA engine framework, add 8250 uart dma to support MediaTek uart. > > > If MediaTek uart

[PATCH v3 0/2] add uart DMA function

2018-12-06 Thread Long Cheng
, the code of UART DM Changes compared to v2: -remove unimportant parameters -instead of cookie, use APIs of virtual channel. -use of_dma_xlate_by_chan_id. Changes compared to v1: -mian revised file, 8250_mtk_dma.c --parameters renamed for standard --remove atomic operation Long Cheng (2

[PATCH v3 2/2] arm: dts: mt2701: add uart APDMA to device tree

2018-12-06 Thread Long Cheng
1. add uart APDMA controller device node 2. add uart 0/1/2/3/4/5 DMA function Signed-off-by: Long Cheng --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 50 + 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot

[PATCH v3 1/2] dmaengine: 8250_mtk_dma: add Mediatek uart DMA support

2018-12-06 Thread Long Cheng
In DMA engine framework, add 8250 mtk dma to support it. Signed-off-by: Long Cheng --- drivers/dma/mediatek/8250_mtk_dma.c | 847 +++ drivers/dma/mediatek/Kconfig| 11 + drivers/dma/mediatek/Makefile |1 + 3 files changed, 859 insertions

[PATCH v4 0/2] add uart DMA function

2018-12-09 Thread Long Cheng
for standard --remove atomic operation Long Cheng (2): dmaengine: 8250_mtk_dma: add Mediatek uart DMA support arm: dts: mt2701: add uart APDMA to device tree arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 50 ++ drivers/dma/mediatek/8250_mtk_dma.c | 830

[PATCH v4 1/2] dmaengine: 8250_mtk_dma: add Mediatek uart DMA support

2018-12-09 Thread Long Cheng
In DMA engine framework, add 8250 mtk dma to support it. Signed-off-by: Long Cheng --- drivers/dma/mediatek/8250_mtk_dma.c | 830 +++ drivers/dma/mediatek/Kconfig| 11 + drivers/dma/mediatek/Makefile |1 + 3 files changed, 842 insertions

[PATCH v4 2/2] arm: dts: mt2701: add uart APDMA to device tree

2018-12-09 Thread Long Cheng
1. add uart APDMA controller device node 2. add uart 0/1/2/3/4/5 DMA function Signed-off-by: Long Cheng --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 50 + 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot

[resend PATCH v4 1/2] dmaengine: 8250_mtk_dma: add Mediatek uart DMA support

2018-12-09 Thread Long Cheng
In DMA engine framework, add 8250 mtk dma to support it. Signed-off-by: Long Cheng --- drivers/dma/mediatek/8250_mtk_dma.c | 830 +++ drivers/dma/mediatek/Kconfig| 11 + drivers/dma/mediatek/Makefile |1 + 3 files changed, 842 insertions

[resend PATCH v4 0/2] add uart DMA function

2018-12-09 Thread Long Cheng
for standard --remove atomic operation Long Cheng (2): dmaengine: 8250_mtk_dma: add Mediatek uart DMA support arm: dts: mt2712: add uart APDMA to device tree arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 50 ++ drivers/dma/mediatek/8250_mtk_dma.c | 830

[resend PATCH v4 2/2] arm: dts: mt2712: add uart APDMA to device tree

2018-12-09 Thread Long Cheng
1. add uart APDMA controller device node 2. add uart 0/1/2/3/4/5 DMA function Signed-off-by: Long Cheng --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 50 + 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot

[PATCH v7 2/2] arm: dts: mt2712: add uart APDMA to device tree

2018-12-24 Thread Long Cheng
1. add uart APDMA controller device node 2. add uart 0/1/2/3/4/5 DMA function Signed-off-by: Long Cheng --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 50 + 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot

[PATCH v7 1/2] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2018-12-24 Thread Long Cheng
In DMA engine framework, add 8250 uart dma to support MediaTek uart. If MediaTek uart enabled(SERIAL_8250_MT6577), and want to improve the performance, can enable the function. Signed-off-by: Long Cheng --- drivers/dma/mediatek/8250_mtk_dma.c | 694 +++ drivers

[PATCH v7 0/2] add uart DMA function

2018-12-24 Thread Long Cheng
parameters -instead of cookie, use APIs of virtual channel. -use of_dma_xlate_by_chan_id. Changes compared to v1: -mian revised file, 8250_mtk_dma.c --parameters renamed for standard --remove atomic operation Long Cheng (2): dmaengine: 8250_mtk_dma: add MediaTek uart DMA support arm: dts

Re: [PATCH v7 1/2] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2018-12-25 Thread Long Cheng
2018 at 9:27 AM Long Cheng wrote: > > > > In DMA engine framework, add 8250 uart dma to support MediaTek uart. > > If MediaTek uart enabled(SERIAL_8250_MT6577), and want to improve > > the performance, can enable the function. > > > > Signed-off-by: Long Chen

Re: [PATCH v7 1/2] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2018-12-25 Thread Long Cheng
On Wed, 2018-12-26 at 08:05 +0800, Nicolas Boichat wrote: thanks. > On Tue, Dec 25, 2018 at 8:06 PM Long Cheng wrote: > > > > Thanks for your comments. > > > > On Tue, 2018-12-25 at 15:16 +0800, Nicolas Boichat wrote: > > > Not a full review, a fe

Re: [PATCH v7 1/2] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2018-12-26 Thread Long Cheng
On Wed, 2018-12-26 at 17:28 +0800, Nicolas Boichat wrote: .. > > > > > > +static int mtk_uart_apdma_device_pause(struct dma_chan *chan) > > > > > > +{ > > > > > > + /* just for check caps pass */ > > > > > > + return 0; > > > > > > +} > > > > > > + > > > > > > +static int

[PATCH v8 0/2] add uart DMA function

2018-12-29 Thread Long Cheng
fail Changes compared to v2: -remove unimportant parameters -instead of cookie, use APIs of virtual channel. -use of_dma_xlate_by_chan_id. Changes compared to v1: -mian revised file, 8250_mtk_dma.c --parameters renamed for standard --remove atomic operation Long Cheng (2): dmaengine: 8250_mtk_dma

[PATCH v8 1/2] dmaengine: 8250_mtk_dma: add MediaTek uart DMA support

2018-12-29 Thread Long Cheng
In DMA engine framework, add 8250 uart dma to support MediaTek uart. If MediaTek uart enabled(SERIAL_8250_MT6577), and want to improve the performance, can enable the function. Signed-off-by: Long Cheng --- drivers/dma/mediatek/8250_mtk_dma.c | 694 +++ drivers

[PATCH v8 2/2] arm: dts: mt2712: add uart APDMA to device tree

2018-12-29 Thread Long Cheng
1. add uart APDMA controller device node 2. add uart 0/1/2/3/4/5 DMA function Signed-off-by: Long Cheng --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 50 + 1 file changed, 50 insertions(+) diff --git a/arch/arm64/boot/dts/mediatek/mt2712e.dtsi b/arch/arm64/boot

[PATCH 4/4] arm: dts: mt2701: add uart APDMA to device tree

2018-09-20 Thread Long Cheng
1. add uart APDMA controller device node 2. add uart 0/1/2/3 DMA function 3. uart0 is console, So disable DMA 4. enable uart2 port to test DMA function. Signed-off-by: Long Cheng --- arch/arm64/boot/dts/mediatek/mt2712e.dtsi | 50 + 1 file changed, 50 insertions

[PATCH 2/4] dmaengine: mtk_uart_dma: add Mediatek uart DMA support

2018-09-20 Thread Long Cheng
In DMA engine framework, add 8250 mtk dma to support it. Signed-off-by: Long Cheng --- drivers/dma/8250_mtk_dma.c | 1049 drivers/dma/Kconfig| 11 + drivers/dma/Makefile |1 + 3 files changed, 1061 insertions(+) create mode

[PATCH 3/4] serial: 8250-mtk: add uart DMA support

2018-09-20 Thread Long Cheng
Modify uart register to support DMA function. Signed-off-by: Long Cheng --- drivers/tty/serial/8250/8250_mtk.c | 211 +++- 1 file changed, 210 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c

[PATCH 1/4] dt-bindings: dma: uart: add uart dma bindings

2018-09-20 Thread Long Cheng
add uart dma bindings Signed-off-by: Long Cheng --- .../devicetree/bindings/dma/8250_mtk_dma.txt | 32 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/8250_mtk_dma.txt diff --git a/Documentation/devicetree/bindings/dma

[PATCH 0/4] add uart DMA function

2018-09-20 Thread Long Cheng
, the code of UART DMA function. Long Cheng (4): dt-bindings: dma: uart: add uart dma bindings dmaengine: mtk_uart_dma: add Mediatek uart DMA support serial: 8250-mtk: add uart DMA support arm: dts: mt2701: add uart APDMA to device tree .../devicetree/bindings/dma/8250_mtk_dma.txt

Re: [PATCH] serial: 8250_mtk: support big baud rate.

2016-08-24 Thread Long Cheng
On Fri, 2016-08-12 at 10:41 +0800, Long Cheng wrote: > From: Eddie Huang > > mediatek can support baud rate up to 4M. > the 'uart_get_baud_rate' function will limit the max baud rate. > Modify max baud to remove the limit. > > Signed-off-by: Long Cheng > --- &g

[PATCH 0/4] add uart DMA function

2017-02-16 Thread Long Cheng
, the code of UART DMA function. Long Cheng (4): dt-bindings: dma: uart: add uart dma bindings dmaengine: mtk_uart_dma: add Mediatek uart DMA support serial: 8250-mtk: add uart DMA support arm: dts: mt2701: add uart APDMA to device tree .../devicetree/bindings/dma/mtk_uart_dma.txt

[PATCH 3/4] serial: 8250-mtk: add uart DMA support

2017-02-16 Thread Long Cheng
Modify uart register to support DMA function. Signed-off-by: Long Cheng --- drivers/tty/serial/8250/8250_mtk.c | 194 +++- 1 file changed, 193 insertions(+), 1 deletion(-) diff --git a/drivers/tty/serial/8250/8250_mtk.c b/drivers/tty/serial/8250/8250_mtk.c

[PATCH 1/4] dt-bindings: dma: uart: add uart dma bindings

2017-02-16 Thread Long Cheng
add uart dma bindings Signed-off-by: Long Cheng --- .../devicetree/bindings/dma/mtk_uart_dma.txt | 32 1 file changed, 32 insertions(+) create mode 100644 Documentation/devicetree/bindings/dma/mtk_uart_dma.txt diff --git a/Documentation/devicetree/bindings/dma

[PATCH 2/4] dmaengine: mtk_uart_dma: add Mediatek uart DMA support

2017-02-16 Thread Long Cheng
In DMA engine framework, add 8250 mtk dma to support it. Signed-off-by: Long Cheng --- drivers/dma/Kconfig|9 + drivers/dma/Makefile |1 + drivers/dma/mtk_uart_dma.c | 955 3 files changed, 965 insertions(+) create mode 100644

  1   2   >