Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]
Groups > linux.kernel > #1455819 > unrolled thread
| Started by | Fabio Estevam <festevam@gmail.com> |
|---|---|
| First post | 2016-08-03 16:30 +0200 |
| Last post | 2016-08-09 15:40 +0200 |
| Articles | 11 — 5 participants |
Back to article view | Back to linux.kernel
This discussion starts older than the indexed window; earlier articles aren't shown. The article labeled Started by
below is the oldest one visible, not the original post.
Re: [PATCH 2/2] imx53.dtsi : Add DMA configuration for UART Fabio Estevam <festevam@gmail.com> - 2016-08-03 16:30 +0200
[PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> - 2016-08-04 12:30 +0200
Re: [PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART Alexander Shiyan <shc_work@mail.ru> - 2016-08-04 13:30 +0200
Re: [PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART Fabio Estevam <festevam@gmail.com> - 2016-08-06 22:10 +0200
[PATCH 2/2] imx53.dtsi : Add DMA configuration for UART Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> - 2016-08-08 11:30 +0200
[PATCH 1/2] Allowing UART DMA to be configured on i.MX53 Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> - 2016-08-08 11:40 +0200
Re: [PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART Shawn Guo <shawnguo@kernel.org> - 2016-08-09 15:40 +0200
[PATCH v2 1/2] Allowing UART DMA to be configured on i.MX53 Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> - 2016-08-04 12:40 +0200
[PATCH 1/1] imx53.dtsi: Add IPU nodes for csi Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> - 2016-08-04 16:00 +0200
Re: [PATCH 1/1] imx53.dtsi: Add IPU nodes for csi Philipp Zabel <p.zabel@pengutronix.de> - 2016-08-05 11:40 +0200
Re: [PATCH 1/1] imx53.dtsi: Add IPU nodes for csi Shawn Guo <shawnguo@kernel.org> - 2016-08-09 15:40 +0200
| From | Fabio Estevam <festevam@gmail.com> |
|---|---|
| Date | 2016-08-03 16:30 +0200 |
| Subject | Re: [PATCH 2/2] imx53.dtsi : Add DMA configuration for UART |
| Message-ID | <s25lf-3EJ-5@gated-at.bofh.it> |
Hi Fabien, On Wed, Aug 3, 2016 at 11:13 AM, Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> wrote: > In order to use sdma with UART, we need to add DMA configuration in device tree. > > Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> > --- > arch/arm/boot/dts/imx53.dtsi | 8 ++++++++ > 1 file changed, 8 insertions(+) > > diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi > index cd17037..de545e2 100644 > --- a/arch/arm/boot/dts/imx53.dtsi > +++ b/arch/arm/boot/dts/imx53.dtsi > @@ -217,6 +217,8 @@ > clocks = <&clks IMX5_CLK_UART3_IPG_GATE>, > <&clks IMX5_CLK_UART3_PER_GATE>; > clock-names = "ipg", "per"; > + dmas = <&sdma 42 4 0>, <&sdma 43 4 0>; > + dma-names = "rx", "tx"; > status = "disabled"; > }; Care to add the dma channels for uart1 as well? Thanks
[toc] | [next] | [standalone]
| From | Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> |
|---|---|
| Date | 2016-08-04 12:30 +0200 |
| Subject | [PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART |
| Message-ID | <s2o4y-7BP-25@gated-at.bofh.it> |
| In reply to | #1455819 |
In order to use sdma with UART, we need to add DMA configuration in device tree. Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> --- arch/arm/boot/dts/imx53.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi index cd17037..c1bc97c 100644 --- a/arch/arm/boot/dts/imx53.dtsi +++ b/arch/arm/boot/dts/imx53.dtsi @@ -217,6 +217,8 @@ clocks = <&clks IMX5_CLK_UART3_IPG_GATE>, <&clks IMX5_CLK_UART3_PER_GATE>; clock-names = "ipg", "per"; + dmas = <&sdma 42 4 0>, <&sdma 43 4 0>; + dma-names = "rx", "tx"; status = "disabled"; }; @@ -498,6 +500,8 @@ clocks = <&clks IMX5_CLK_UART1_IPG_GATE>, <&clks IMX5_CLK_UART1_PER_GATE>; clock-names = "ipg", "per"; + dmas = <&sdma 18 4 0>, <&sdma 19 4 0>; + dma-names = "rx", "tx"; status = "disabled"; }; @@ -508,6 +512,8 @@ clocks = <&clks IMX5_CLK_UART2_IPG_GATE>, <&clks IMX5_CLK_UART2_PER_GATE>; clock-names = "ipg", "per"; + dmas = <&sdma 12 4 0>, <&sdma 13 4 0>; + dma-names = "rx", "tx"; status = "disabled"; }; @@ -591,6 +597,8 @@ clocks = <&clks IMX5_CLK_UART4_IPG_GATE>, <&clks IMX5_CLK_UART4_PER_GATE>; clock-names = "ipg", "per"; + dmas = <&sdma 2 4 0>, <&sdma 3 4 0>; + dma-names = "rx", "tx"; status = "disabled"; }; }; @@ -621,6 +629,8 @@ clocks = <&clks IMX5_CLK_UART5_IPG_GATE>, <&clks IMX5_CLK_UART5_PER_GATE>; clock-names = "ipg", "per"; + dmas = <&sdma 16 4 0>, <&sdma 17 4 0>; + dma-names = "rx", "tx"; status = "disabled"; }; -- 2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Alexander Shiyan <shc_work@mail.ru> |
|---|---|
| Date | 2016-08-04 13:30 +0200 |
| Subject | Re: [PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART |
| Message-ID | <s2p0B-8g0-3@gated-at.bofh.it> |
| In reply to | #1456311 |
>Четверг, 4 августа 2016, 13:22 +03:00 от Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>: > >In order to use sdma with UART, we need to add DMA configuration in device tree. > >Signed-off-by: Fabien Lahoudere < fabien.lahoudere@collabora.co.uk > >--- > arch/arm/boot/dts/imx53.dtsi | 10 ++++++++++ > 1 file changed, 10 insertions(+) ... Hello. UART SDMA has been tested by me for i.MX51. So, on my opinion, In the first part of the patch, we just need to remove is_imx6q_uart() check on and always let the devicetree decide about DMA usage. Thanks. ---
[toc] | [prev] | [next] | [standalone]
| From | Fabio Estevam <festevam@gmail.com> |
|---|---|
| Date | 2016-08-06 22:10 +0200 |
| Subject | Re: [PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART |
| Message-ID | <s3g4V-1Yq-29@gated-at.bofh.it> |
| In reply to | #1456350 |
On Thu, Aug 4, 2016 at 7:49 AM, Alexander Shiyan <shc_work@mail.ru> wrote: > Hello. > > UART SDMA has been tested by me for i.MX51. > So, on my opinion, In the first part of the patch, we just need to remove is_imx6q_uart() > check on and always let the devicetree decide about DMA usage. Yes, agreed.
[toc] | [prev] | [next] | [standalone]
| From | Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> |
|---|---|
| Date | 2016-08-08 11:30 +0200 |
| Message-ID | <s3P2G-7YV-47@gated-at.bofh.it> |
| In reply to | #1457298 |
In order to use sdma with UART, we need to add DMA configuration in device tree. Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> --- arch/arm/boot/dts/imx53.dtsi | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi index cd17037..c1bc97c 100644 --- a/arch/arm/boot/dts/imx53.dtsi +++ b/arch/arm/boot/dts/imx53.dtsi @@ -217,6 +217,8 @@ clocks = <&clks IMX5_CLK_UART3_IPG_GATE>, <&clks IMX5_CLK_UART3_PER_GATE>; clock-names = "ipg", "per"; + dmas = <&sdma 42 4 0>, <&sdma 43 4 0>; + dma-names = "rx", "tx"; status = "disabled"; }; @@ -498,6 +500,8 @@ clocks = <&clks IMX5_CLK_UART1_IPG_GATE>, <&clks IMX5_CLK_UART1_PER_GATE>; clock-names = "ipg", "per"; + dmas = <&sdma 18 4 0>, <&sdma 19 4 0>; + dma-names = "rx", "tx"; status = "disabled"; }; @@ -508,6 +512,8 @@ clocks = <&clks IMX5_CLK_UART2_IPG_GATE>, <&clks IMX5_CLK_UART2_PER_GATE>; clock-names = "ipg", "per"; + dmas = <&sdma 12 4 0>, <&sdma 13 4 0>; + dma-names = "rx", "tx"; status = "disabled"; }; @@ -591,6 +597,8 @@ clocks = <&clks IMX5_CLK_UART4_IPG_GATE>, <&clks IMX5_CLK_UART4_PER_GATE>; clock-names = "ipg", "per"; + dmas = <&sdma 2 4 0>, <&sdma 3 4 0>; + dma-names = "rx", "tx"; status = "disabled"; }; }; @@ -621,6 +629,8 @@ clocks = <&clks IMX5_CLK_UART5_IPG_GATE>, <&clks IMX5_CLK_UART5_PER_GATE>; clock-names = "ipg", "per"; + dmas = <&sdma 16 4 0>, <&sdma 17 4 0>; + dma-names = "rx", "tx"; status = "disabled"; }; -- 2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> |
|---|---|
| Date | 2016-08-08 11:40 +0200 |
| Subject | [PATCH 1/2] Allowing UART DMA to be configured on i.MX53 |
| Message-ID | <s3P2G-7YV-49@gated-at.bofh.it> |
| In reply to | #1457298 |
From: Martyn Welch <martyn.welch@collabora.co.uk>
The UART DMA was only being configured on i.MX6Q compatible devices. We
know that the DMA also works for i.MX53 devices, so allow DMA to be
configured on those devices too.
Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
drivers/tty/serial/imx.c | 17 +++++++++++++++--
1 file changed, 15 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index 08ccfe1..1c9315a 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -190,6 +190,7 @@
enum imx_uart_type {
IMX1_UART,
IMX21_UART,
+ IMX53_UART,
IMX6Q_UART,
};
@@ -247,6 +248,10 @@ static struct imx_uart_data imx_uart_devdata[] = {
.uts_reg = IMX21_UTS,
.devtype = IMX21_UART,
},
+ [IMX53_UART] = {
+ .uts_reg = IMX21_UTS,
+ .devtype = IMX53_UART,
+ },
[IMX6Q_UART] = {
.uts_reg = IMX21_UTS,
.devtype = IMX6Q_UART,
@@ -261,6 +266,9 @@ static const struct platform_device_id imx_uart_devtype[] = {
.name = "imx21-uart",
.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX21_UART],
}, {
+ .name = "imx53-uart",
+ .driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX53_UART],
+ }, {
.name = "imx6q-uart",
.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX6Q_UART],
}, {
@@ -271,6 +279,7 @@ MODULE_DEVICE_TABLE(platform, imx_uart_devtype);
static const struct of_device_id imx_uart_dt_ids[] = {
{ .compatible = "fsl,imx6q-uart", .data = &imx_uart_devdata[IMX6Q_UART], },
+ { .compatible = "fsl,imx53-uart", .data = &imx_uart_devdata[IMX53_UART], },
{ .compatible = "fsl,imx1-uart", .data = &imx_uart_devdata[IMX1_UART], },
{ .compatible = "fsl,imx21-uart", .data = &imx_uart_devdata[IMX21_UART], },
{ /* sentinel */ }
@@ -292,6 +301,11 @@ static inline int is_imx21_uart(struct imx_port *sport)
return sport->devdata->devtype == IMX21_UART;
}
+static inline int is_imx53_uart(struct imx_port *sport)
+{
+ return sport->devdata->devtype == IMX53_UART;
+}
+
static inline int is_imx6q_uart(struct imx_port *sport)
{
return sport->devdata->devtype == IMX6Q_UART;
@@ -1254,8 +1268,7 @@ static int imx_startup(struct uart_port *port)
writel(temp & ~UCR4_DREN, sport->port.membase + UCR4);
/* Can we enable the DMA support? */
- if (is_imx6q_uart(sport) && !uart_console(port) &&
- !sport->dma_is_inited)
+ if (!uart_console(port) && !sport->dma_is_inited)
imx_uart_dma_init(sport);
spin_lock_irqsave(&sport->port.lock, flags);
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Shawn Guo <shawnguo@kernel.org> |
|---|---|
| Date | 2016-08-09 15:40 +0200 |
| Subject | Re: [PATCH v2 2/2] imx53.dtsi : Add DMA configuration for UART |
| Message-ID | <s4fqa-8bw-19@gated-at.bofh.it> |
| In reply to | #1456311 |
On Thu, Aug 04, 2016 at 12:22:37PM +0200, Fabien Lahoudere wrote: > In order to use sdma with UART, we need to add DMA configuration in device tree. > > Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> Changed subject prefix to 'ARM: dts: imx53: ', and applied patch. Shawn
[toc] | [prev] | [next] | [standalone]
| From | Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> |
|---|---|
| Date | 2016-08-04 12:40 +0200 |
| Subject | [PATCH v2 1/2] Allowing UART DMA to be configured on i.MX53 |
| Message-ID | <s2o4y-7BP-27@gated-at.bofh.it> |
| In reply to | #1455819 |
From: Martyn Welch <martyn.welch@collabora.co.uk>
The UART DMA was only being configured on i.MX6Q compatible devices. We
know that the DMA also works for i.MX53 devices, so allow DMA to be
configured on those devices too.
Signed-off-by: Martyn Welch <martyn.welch@collabora.co.uk>
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
drivers/tty/serial/imx.c | 18 ++++++++++++++++--
1 file changed, 16 insertions(+), 2 deletions(-)
diff --git a/drivers/tty/serial/imx.c b/drivers/tty/serial/imx.c
index c190986..11afe58 100644
--- a/drivers/tty/serial/imx.c
+++ b/drivers/tty/serial/imx.c
@@ -190,6 +190,7 @@
enum imx_uart_type {
IMX1_UART,
IMX21_UART,
+ IMX53_UART,
IMX6Q_UART,
};
@@ -247,6 +248,10 @@ static struct imx_uart_data imx_uart_devdata[] = {
.uts_reg = IMX21_UTS,
.devtype = IMX21_UART,
},
+ [IMX53_UART] = {
+ .uts_reg = IMX21_UTS,
+ .devtype = IMX53_UART,
+ },
[IMX6Q_UART] = {
.uts_reg = IMX21_UTS,
.devtype = IMX6Q_UART,
@@ -261,6 +266,9 @@ static const struct platform_device_id imx_uart_devtype[] = {
.name = "imx21-uart",
.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX21_UART],
}, {
+ .name = "imx53-uart",
+ .driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX53_UART],
+ }, {
.name = "imx6q-uart",
.driver_data = (kernel_ulong_t) &imx_uart_devdata[IMX6Q_UART],
}, {
@@ -271,6 +279,7 @@ MODULE_DEVICE_TABLE(platform, imx_uart_devtype);
static const struct of_device_id imx_uart_dt_ids[] = {
{ .compatible = "fsl,imx6q-uart", .data = &imx_uart_devdata[IMX6Q_UART], },
+ { .compatible = "fsl,imx53-uart", .data = &imx_uart_devdata[IMX53_UART], },
{ .compatible = "fsl,imx1-uart", .data = &imx_uart_devdata[IMX1_UART], },
{ .compatible = "fsl,imx21-uart", .data = &imx_uart_devdata[IMX21_UART], },
{ /* sentinel */ }
@@ -292,6 +301,11 @@ static inline int is_imx21_uart(struct imx_port *sport)
return sport->devdata->devtype == IMX21_UART;
}
+static inline int is_imx53_uart(struct imx_port *sport)
+{
+ return sport->devdata->devtype == IMX53_UART;
+}
+
static inline int is_imx6q_uart(struct imx_port *sport)
{
return sport->devdata->devtype == IMX6Q_UART;
@@ -1254,8 +1268,8 @@ static int imx_startup(struct uart_port *port)
writel(temp & ~UCR4_DREN, sport->port.membase + UCR4);
/* Can we enable the DMA support? */
- if (is_imx6q_uart(sport) && !uart_console(port) &&
- !sport->dma_is_inited) {
+ if ((is_imx6q_uart(sport) || is_imx53_uart(sport)) &&
+ !uart_console(port) && !sport->dma_is_inited) {
retval = imx_uart_dma_init(sport);
if (retval) {
clk_disable_unprepare(sport->clk_per);
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> |
|---|---|
| Date | 2016-08-04 16:00 +0200 |
| Subject | [PATCH 1/1] imx53.dtsi: Add IPU nodes for csi |
| Message-ID | <s2rlL-1t2-17@gated-at.bofh.it> |
| In reply to | #1455819 |
We have the following messages that tell csi devices are not used:
imx-ipuv3 18000000.ipu: no port@0 node in /soc/ipu@18000000, not using CSI0
imx-ipuv3 18000000.ipu: no port@1 node in /soc/ipu@18000000, not using CSI1
So we add them in the common device tree to make CSI ports available on
imx53 boards.
Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
---
arch/arm/boot/dts/imx53.dtsi | 8 ++++++++
1 file changed, 8 insertions(+)
diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
index c1bc97c..0777b41 100644
--- a/arch/arm/boot/dts/imx53.dtsi
+++ b/arch/arm/boot/dts/imx53.dtsi
@@ -136,6 +136,14 @@
clock-names = "bus", "di0", "di1";
resets = <&src 2>;
+ ipu_csi0: port@0 {
+ reg = <0>;
+ };
+
+ ipu_csi1: port@1 {
+ reg = <1>;
+ };
+
ipu_di0: port@2 {
#address-cells = <1>;
#size-cells = <0>;
--
2.7.4
[toc] | [prev] | [next] | [standalone]
| From | Philipp Zabel <p.zabel@pengutronix.de> |
|---|---|
| Date | 2016-08-05 11:40 +0200 |
| Subject | Re: [PATCH 1/1] imx53.dtsi: Add IPU nodes for csi |
| Message-ID | <s2JLH-5EJ-5@gated-at.bofh.it> |
| In reply to | #1456411 |
Am Donnerstag, den 04.08.2016, 15:47 +0200 schrieb Fabien Lahoudere:
> We have the following messages that tell csi devices are not used:
> imx-ipuv3 18000000.ipu: no port@0 node in /soc/ipu@18000000, not using CSI0
> imx-ipuv3 18000000.ipu: no port@1 node in /soc/ipu@18000000, not using CSI1
>
> So we add them in the common device tree to make CSI ports available on
> imx53 boards.
>
> Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk>
> ---
> arch/arm/boot/dts/imx53.dtsi | 8 ++++++++
> 1 file changed, 8 insertions(+)
>
> diff --git a/arch/arm/boot/dts/imx53.dtsi b/arch/arm/boot/dts/imx53.dtsi
> index c1bc97c..0777b41 100644
> --- a/arch/arm/boot/dts/imx53.dtsi
> +++ b/arch/arm/boot/dts/imx53.dtsi
> @@ -136,6 +136,14 @@
> clock-names = "bus", "di0", "di1";
> resets = <&src 2>;
>
> + ipu_csi0: port@0 {
> + reg = <0>;
> + };
> +
> + ipu_csi1: port@1 {
> + reg = <1>;
> + };
> +
> ipu_di0: port@2 {
> #address-cells = <1>;
> #size-cells = <0>;
Acked-by: Philipp Zabel <p.zabel@pengutronix.de>
regards
Philipp
[toc] | [prev] | [next] | [standalone]
| From | Shawn Guo <shawnguo@kernel.org> |
|---|---|
| Date | 2016-08-09 15:40 +0200 |
| Subject | Re: [PATCH 1/1] imx53.dtsi: Add IPU nodes for csi |
| Message-ID | <s4fqa-8bw-17@gated-at.bofh.it> |
| In reply to | #1456411 |
On Thu, Aug 04, 2016 at 03:47:32PM +0200, Fabien Lahoudere wrote: > We have the following messages that tell csi devices are not used: > imx-ipuv3 18000000.ipu: no port@0 node in /soc/ipu@18000000, not using CSI0 > imx-ipuv3 18000000.ipu: no port@1 node in /soc/ipu@18000000, not using CSI1 > > So we add them in the common device tree to make CSI ports available on > imx53 boards. > > Signed-off-by: Fabien Lahoudere <fabien.lahoudere@collabora.co.uk> Updated subject 'ARM: dts: imx53: ...', and applied patch. Shawn
[toc] | [prev] | [standalone]
Back to top | Article view | linux.kernel
csiph-web