diff mbox

[v3] arm: dts: exynos: Enable DMA support for UART modules on Exynos5 SoCs

Message ID 1482141648-21294-1-git-send-email-m.szyprowski@samsung.com (mailing list archive)
State Accepted
Headers show

Commit Message

Marek Szyprowski Dec. 19, 2016, 10 a.m. UTC
UART modules can use DMA for offloading data transfers and reducing
interrupts, so enable this feature for Exynos5 boards. Tested on
Google ChromeBook Snow (Exynos5250), Odroid XU (Exynos5410) and Odroid
XU3 (Exynos5422) boards.

Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
---
v3:
- added Exynos5410
- fixed serial 1/2 again, in v2 they were incorrectly swaped as a result
  of my hurry in patch posting

v2:
- added Exynos5250
- fixed copy/paste typo for serial 2 and 3
---
 arch/arm/boot/dts/exynos5250.dtsi | 8 ++++++++
 arch/arm/boot/dts/exynos5410.dtsi | 8 ++++++++
 arch/arm/boot/dts/exynos5420.dtsi | 8 ++++++++
 3 files changed, 24 insertions(+)

Comments

Alim Akhtar Dec. 22, 2016, 11:14 a.m. UTC | #1
Hello,

On 12/19/2016 03:30 PM, Marek Szyprowski wrote:
> UART modules can use DMA for offloading data transfers and reducing
> interrupts, so enable this feature for Exynos5 boards. Tested on
> Google ChromeBook Snow (Exynos5250), Odroid XU (Exynos5410) and Odroid
> XU3 (Exynos5422) boards.
>
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> v3:
> - added Exynos5410

make failed with this patch with below error:
   DTC     arch/arm/boot/dts/exynos5410-odroidxu.dtb
ERROR (phandle_references): Reference to non-existent node or label "pdma0"

ERROR (phandle_references): Reference to non-existent node or label "pdma0"

ERROR (phandle_references): Reference to non-existent node or label "pdma1"

ERROR (phandle_references): Reference to non-existent node or label "pdma1"

ERROR (phandle_references): Reference to non-existent node or label "pdma0"

ERROR (phandle_references): Reference to non-existent node or label "pdma0"

ERROR (phandle_references): Reference to non-existent node or label "pdma1"

ERROR (phandle_references): Reference to non-existent node or label "pdma1"

ERROR: Input tree has errors, aborting (use -f to force output)
make[1]: *** [arch/arm/boot/dts/exynos5410-odroidxu.dtb] Error 2
make: *** [dtbs] Error 2
-------------------------------------

I tried building against linux-next with tag v4.9.

69973b8 Linux 4.9
2e4333c Merge branch 'upstream' of 
git://git.linux-mips.org/pub/scm/ralf/upstream-linus
ba73515 MIPS: Lantiq: Fix mask of GPE frequency

Let me know if I am missing other patches.

> - fixed serial 1/2 again, in v2 they were incorrectly swaped as a result
>    of my hurry in patch posting
>
> v2:
> - added Exynos5250
> - fixed copy/paste typo for serial 2 and 3
> ---
>   arch/arm/boot/dts/exynos5250.dtsi | 8 ++++++++
>   arch/arm/boot/dts/exynos5410.dtsi | 8 ++++++++
>   arch/arm/boot/dts/exynos5420.dtsi | 8 ++++++++
>   3 files changed, 24 insertions(+)
>
> diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
> index b6d7444..0e04460 100644
> --- a/arch/arm/boot/dts/exynos5250.dtsi
> +++ b/arch/arm/boot/dts/exynos5250.dtsi
> @@ -1043,21 +1043,29 @@
>   &serial_0 {
>   	clocks = <&clock CLK_UART0>, <&clock CLK_SCLK_UART0>;
>   	clock-names = "uart", "clk_uart_baud0";
> +	dmas = <&pdma0 13>, <&pdma0 14>;
> +	dma-names = "rx", "tx";
>   };
>
>   &serial_1 {
>   	clocks = <&clock CLK_UART1>, <&clock CLK_SCLK_UART1>;
>   	clock-names = "uart", "clk_uart_baud0";
> +	dmas = <&pdma1 15>, <&pdma1 16>;
> +	dma-names = "rx", "tx";
>   };
>
>   &serial_2 {
>   	clocks = <&clock CLK_UART2>, <&clock CLK_SCLK_UART2>;
>   	clock-names = "uart", "clk_uart_baud0";
> +	dmas = <&pdma0 15>, <&pdma0 16>;
> +	dma-names = "rx", "tx";
>   };
>
>   &serial_3 {
>   	clocks = <&clock CLK_UART3>, <&clock CLK_SCLK_UART3>;
>   	clock-names = "uart", "clk_uart_baud0";
> +	dmas = <&pdma1 17>, <&pdma1 18>;
> +	dma-names = "rx", "tx";
>   };
>
>   #include "exynos5250-pinctrl.dtsi"
> diff --git a/arch/arm/boot/dts/exynos5410.dtsi b/arch/arm/boot/dts/exynos5410.dtsi
> index 2b6adaf..7eab4bc 100644
> --- a/arch/arm/boot/dts/exynos5410.dtsi
> +++ b/arch/arm/boot/dts/exynos5410.dtsi
> @@ -340,21 +340,29 @@
>   &serial_0 {
>   	clocks = <&clock CLK_UART0>, <&clock CLK_SCLK_UART0>;
>   	clock-names = "uart", "clk_uart_baud0";
> +	dmas = <&pdma0 13>, <&pdma0 14>;
> +	dma-names = "rx", "tx";
>   };
>
>   &serial_1 {
>   	clocks = <&clock CLK_UART1>, <&clock CLK_SCLK_UART1>;
>   	clock-names = "uart", "clk_uart_baud0";
> +	dmas = <&pdma1 15>, <&pdma1 16>;
> +	dma-names = "rx", "tx";
>   };
>
>   &serial_2 {
>   	clocks = <&clock CLK_UART2>, <&clock CLK_SCLK_UART2>;
>   	clock-names = "uart", "clk_uart_baud0";
> +	dmas = <&pdma0 15>, <&pdma0 16>;
> +	dma-names = "rx", "tx";
>   };
>
>   &serial_3 {
>   	clocks = <&clock CLK_UART3>, <&clock CLK_SCLK_UART3>;
>   	clock-names = "uart", "clk_uart_baud0";
> +	dmas = <&pdma1 17>, <&pdma1 18>;
> +	dma-names = "rx", "tx";
>   };
>
>   &sss {
> diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
> index 906a1a4..0154c2e 100644
> --- a/arch/arm/boot/dts/exynos5420.dtsi
> +++ b/arch/arm/boot/dts/exynos5420.dtsi
> @@ -1406,21 +1406,29 @@
>   &serial_0 {
>   	clocks = <&clock CLK_UART0>, <&clock CLK_SCLK_UART0>;
>   	clock-names = "uart", "clk_uart_baud0";
> +	dmas = <&pdma0 13>, <&pdma0 14>;
> +	dma-names = "rx", "tx";
>   };
>
>   &serial_1 {
>   	clocks = <&clock CLK_UART1>, <&clock CLK_SCLK_UART1>;
>   	clock-names = "uart", "clk_uart_baud0";
> +	dmas = <&pdma1 15>, <&pdma1 16>;
> +	dma-names = "rx", "tx";
>   };
>
>   &serial_2 {
>   	clocks = <&clock CLK_UART2>, <&clock CLK_SCLK_UART2>;
>   	clock-names = "uart", "clk_uart_baud0";
> +	dmas = <&pdma0 15>, <&pdma0 16>;
> +	dma-names = "rx", "tx";
>   };
>
>   &serial_3 {
>   	clocks = <&clock CLK_UART3>, <&clock CLK_SCLK_UART3>;
>   	clock-names = "uart", "clk_uart_baud0";
> +	dmas = <&pdma1 17>, <&pdma1 18>;
> +	dma-names = "rx", "tx";
>   };
>
>   &sss {
>
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Marek Szyprowski Dec. 22, 2016, 11:18 a.m. UTC | #2
Hi Alim,

On 2016-12-22 12:14, Alim Akhtar wrote:
> Hello,
>
> On 12/19/2016 03:30 PM, Marek Szyprowski wrote:
>> UART modules can use DMA for offloading data transfers and reducing
>> interrupts, so enable this feature for Exynos5 boards. Tested on
>> Google ChromeBook Snow (Exynos5250), Odroid XU (Exynos5410) and Odroid
>> XU3 (Exynos5422) boards.
>>
>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>> ---
>> v3:
>> - added Exynos5410
>
> make failed with this patch with below error:
>   DTC     arch/arm/boot/dts/exynos5410-odroidxu.dtb
> ERROR (phandle_references): Reference to non-existent node or label 
> "pdma0"
>
> ERROR (phandle_references): Reference to non-existent node or label 
> "pdma0"
>
> ERROR (phandle_references): Reference to non-existent node or label 
> "pdma1"
>
> ERROR (phandle_references): Reference to non-existent node or label 
> "pdma1"
>
> ERROR (phandle_references): Reference to non-existent node or label 
> "pdma0"
>
> ERROR (phandle_references): Reference to non-existent node or label 
> "pdma0"
>
> ERROR (phandle_references): Reference to non-existent node or label 
> "pdma1"
>
> ERROR (phandle_references): Reference to non-existent node or label 
> "pdma1"
>
> ERROR: Input tree has errors, aborting (use -f to force output)
> make[1]: *** [arch/arm/boot/dts/exynos5410-odroidxu.dtb] Error 2
> make: *** [dtbs] Error 2
> -------------------------------------
>
> I tried building against linux-next with tag v4.9.
>
> 69973b8 Linux 4.9
> 2e4333c Merge branch 'upstream' of 
> git://git.linux-mips.org/pub/scm/ralf/upstream-linus
> ba73515 MIPS: Lantiq: Fix mask of GPE frequency
>
> Let me know if I am missing other patches.

Please apply it on top of for-next branch from 
git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git

 > [...]

Best regards
Alim Akhtar Dec. 22, 2016, 12:07 p.m. UTC | #3
On 12/22/2016 04:48 PM, Marek Szyprowski wrote:
> Hi Alim,
>
> On 2016-12-22 12:14, Alim Akhtar wrote:
>> Hello,
>>
>> On 12/19/2016 03:30 PM, Marek Szyprowski wrote:
>>> UART modules can use DMA for offloading data transfers and reducing
>>> interrupts, so enable this feature for Exynos5 boards. Tested on
>>> Google ChromeBook Snow (Exynos5250), Odroid XU (Exynos5410) and Odroid
>>> XU3 (Exynos5422) boards.
>>>
>>> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
>>> ---
>>> v3:
>>> - added Exynos5410
>>
>> make failed with this patch with below error:
>>   DTC     arch/arm/boot/dts/exynos5410-odroidxu.dtb
>> ERROR (phandle_references): Reference to non-existent node or label
>> "pdma0"
>>
>> ERROR (phandle_references): Reference to non-existent node or label
>> "pdma0"
>>
>> ERROR (phandle_references): Reference to non-existent node or label
>> "pdma1"
>>
>> ERROR (phandle_references): Reference to non-existent node or label
>> "pdma1"
>>
>> ERROR (phandle_references): Reference to non-existent node or label
>> "pdma0"
>>
>> ERROR (phandle_references): Reference to non-existent node or label
>> "pdma0"
>>
>> ERROR (phandle_references): Reference to non-existent node or label
>> "pdma1"
>>
>> ERROR (phandle_references): Reference to non-existent node or label
>> "pdma1"
>>
>> ERROR: Input tree has errors, aborting (use -f to force output)
>> make[1]: *** [arch/arm/boot/dts/exynos5410-odroidxu.dtb] Error 2
>> make: *** [dtbs] Error 2
>> -------------------------------------
>>
>> I tried building against linux-next with tag v4.9.
>>
>> 69973b8 Linux 4.9
>> 2e4333c Merge branch 'upstream' of
>> git://git.linux-mips.org/pub/scm/ralf/upstream-linus
>> ba73515 MIPS: Lantiq: Fix mask of GPE frequency
>>
>> Let me know if I am missing other patches.
>
> Please apply it on top of for-next branch from
> git://git.kernel.org/pub/scm/linux/kernel/git/krzk/linux.git
>
Thanks Marek for the above link.
Tested this patch on exynos5800 peach-pi board.

Tested-by: Alim Akhtar <alim.akhtar@samsung.com>

>  > [...]
>
> Best regards
--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
Krzysztof Kozlowski Dec. 29, 2016, 2:09 p.m. UTC | #4
On Mon, Dec 19, 2016 at 11:00:48AM +0100, Marek Szyprowski wrote:
> UART modules can use DMA for offloading data transfers and reducing
> interrupts, so enable this feature for Exynos5 boards. Tested on
> Google ChromeBook Snow (Exynos5250), Odroid XU (Exynos5410) and Odroid
> XU3 (Exynos5422) boards.
> 
> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com>
> ---
> v3:
> - added Exynos5410
> - fixed serial 1/2 again, in v2 they were incorrectly swaped as a result
>   of my hurry in patch posting
> 
> v2:
> - added Exynos5250
> - fixed copy/paste typo for serial 2 and 3
> ---
>  arch/arm/boot/dts/exynos5250.dtsi | 8 ++++++++
>  arch/arm/boot/dts/exynos5410.dtsi | 8 ++++++++
>  arch/arm/boot/dts/exynos5420.dtsi | 8 ++++++++
>  3 files changed, 24 insertions(+)

Thanks, applied.

Best regards,
Krzysztof

--
To unsubscribe from this list: send the line "unsubscribe linux-samsung-soc" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html
diff mbox

Patch

diff --git a/arch/arm/boot/dts/exynos5250.dtsi b/arch/arm/boot/dts/exynos5250.dtsi
index b6d7444..0e04460 100644
--- a/arch/arm/boot/dts/exynos5250.dtsi
+++ b/arch/arm/boot/dts/exynos5250.dtsi
@@ -1043,21 +1043,29 @@ 
 &serial_0 {
 	clocks = <&clock CLK_UART0>, <&clock CLK_SCLK_UART0>;
 	clock-names = "uart", "clk_uart_baud0";
+	dmas = <&pdma0 13>, <&pdma0 14>;
+	dma-names = "rx", "tx";
 };
 
 &serial_1 {
 	clocks = <&clock CLK_UART1>, <&clock CLK_SCLK_UART1>;
 	clock-names = "uart", "clk_uart_baud0";
+	dmas = <&pdma1 15>, <&pdma1 16>;
+	dma-names = "rx", "tx";
 };
 
 &serial_2 {
 	clocks = <&clock CLK_UART2>, <&clock CLK_SCLK_UART2>;
 	clock-names = "uart", "clk_uart_baud0";
+	dmas = <&pdma0 15>, <&pdma0 16>;
+	dma-names = "rx", "tx";
 };
 
 &serial_3 {
 	clocks = <&clock CLK_UART3>, <&clock CLK_SCLK_UART3>;
 	clock-names = "uart", "clk_uart_baud0";
+	dmas = <&pdma1 17>, <&pdma1 18>;
+	dma-names = "rx", "tx";
 };
 
 #include "exynos5250-pinctrl.dtsi"
diff --git a/arch/arm/boot/dts/exynos5410.dtsi b/arch/arm/boot/dts/exynos5410.dtsi
index 2b6adaf..7eab4bc 100644
--- a/arch/arm/boot/dts/exynos5410.dtsi
+++ b/arch/arm/boot/dts/exynos5410.dtsi
@@ -340,21 +340,29 @@ 
 &serial_0 {
 	clocks = <&clock CLK_UART0>, <&clock CLK_SCLK_UART0>;
 	clock-names = "uart", "clk_uart_baud0";
+	dmas = <&pdma0 13>, <&pdma0 14>;
+	dma-names = "rx", "tx";
 };
 
 &serial_1 {
 	clocks = <&clock CLK_UART1>, <&clock CLK_SCLK_UART1>;
 	clock-names = "uart", "clk_uart_baud0";
+	dmas = <&pdma1 15>, <&pdma1 16>;
+	dma-names = "rx", "tx";
 };
 
 &serial_2 {
 	clocks = <&clock CLK_UART2>, <&clock CLK_SCLK_UART2>;
 	clock-names = "uart", "clk_uart_baud0";
+	dmas = <&pdma0 15>, <&pdma0 16>;
+	dma-names = "rx", "tx";
 };
 
 &serial_3 {
 	clocks = <&clock CLK_UART3>, <&clock CLK_SCLK_UART3>;
 	clock-names = "uart", "clk_uart_baud0";
+	dmas = <&pdma1 17>, <&pdma1 18>;
+	dma-names = "rx", "tx";
 };
 
 &sss {
diff --git a/arch/arm/boot/dts/exynos5420.dtsi b/arch/arm/boot/dts/exynos5420.dtsi
index 906a1a4..0154c2e 100644
--- a/arch/arm/boot/dts/exynos5420.dtsi
+++ b/arch/arm/boot/dts/exynos5420.dtsi
@@ -1406,21 +1406,29 @@ 
 &serial_0 {
 	clocks = <&clock CLK_UART0>, <&clock CLK_SCLK_UART0>;
 	clock-names = "uart", "clk_uart_baud0";
+	dmas = <&pdma0 13>, <&pdma0 14>;
+	dma-names = "rx", "tx";
 };
 
 &serial_1 {
 	clocks = <&clock CLK_UART1>, <&clock CLK_SCLK_UART1>;
 	clock-names = "uart", "clk_uart_baud0";
+	dmas = <&pdma1 15>, <&pdma1 16>;
+	dma-names = "rx", "tx";
 };
 
 &serial_2 {
 	clocks = <&clock CLK_UART2>, <&clock CLK_SCLK_UART2>;
 	clock-names = "uart", "clk_uart_baud0";
+	dmas = <&pdma0 15>, <&pdma0 16>;
+	dma-names = "rx", "tx";
 };
 
 &serial_3 {
 	clocks = <&clock CLK_UART3>, <&clock CLK_SCLK_UART3>;
 	clock-names = "uart", "clk_uart_baud0";
+	dmas = <&pdma1 17>, <&pdma1 18>;
+	dma-names = "rx", "tx";
 };
 
 &sss {