* [PATCH] at91: sam9x5 dt: add usart dma definitions to dt
@ 2014-10-10 6:35 Jiri Prchal
2014-10-10 8:12 ` Ludovic Desroches
0 siblings, 1 reply; 10+ messages in thread
From: Jiri Prchal @ 2014-10-10 6:35 UTC (permalink / raw)
To: linux-arm-kernel
This patch adds usart dma definitions to both dtsi for sam9x5 chips. Without
usage of dma it's unable to catch all bytes on usart receiver.
Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
---
arch/arm/boot/dts/at91sam9x5.dtsi | 20 ++++++++++++++++++++
arch/arm/boot/dts/at91sam9x5_usart3.dtsi | 5 +++++
2 files changed, 25 insertions(+)
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
index 726274f..f9acf6d 100644
--- a/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -860,6 +860,11 @@
interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_dbgu>;
+ atmel,use-dma-tx;
+ atmel,use-dma-rx;
+ dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(8)>,
+ <&dma1 1 (AT91_DMA_CFG_PER_ID(9) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
+ dma-names = "tx", "rx";
clocks = <&mck>;
clock-names = "usart";
status = "disabled";
@@ -871,6 +876,11 @@
interrupts = <5 IRQ_TYPE_LEVEL_HIGH 5>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usart0>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(3)>,
+ <&dma0 1 (AT91_DMA_CFG_PER_ID(4) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
+ dma-names = "tx", "rx";
clocks = <&usart0_clk>;
clock-names = "usart";
status = "disabled";
@@ -882,6 +892,11 @@
interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usart1>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(5)>,
+ <&dma0 1 (AT91_DMA_CFG_PER_ID(6) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
+ dma-names = "tx", "rx";
clocks = <&usart1_clk>;
clock-names = "usart";
status = "disabled";
@@ -893,6 +908,11 @@
interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usart2>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(12)>,
+ <&dma1 1 (AT91_DMA_CFG_PER_ID(13) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
+ dma-names = "tx", "rx";
clocks = <&usart2_clk>;
clock-names = "usart";
status = "disabled";
diff --git a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
index 140217a5..731da0e 100644
--- a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
@@ -57,6 +57,11 @@
interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usart3>;
+ atmel,use-dma-rx;
+ atmel,use-dma-tx;
+ dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(14)>,
+ <&dma1 1 (AT91_DMA_CFG_PER_ID(15) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
+ dma-names = "tx", "rx";
clocks = <&usart3_clk>;
clock-names = "usart";
status = "disabled";
--
1.9.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] at91: sam9x5 dt: add usart dma definitions to dt
2014-10-10 6:35 [PATCH] at91: sam9x5 dt: add usart dma definitions to dt Jiri Prchal
@ 2014-10-10 8:12 ` Ludovic Desroches
2014-10-10 8:39 ` Nicolas Ferre
0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Desroches @ 2014-10-10 8:12 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On Fri, Oct 10, 2014 at 08:35:56AM +0200, Jiri Prchal wrote:
> This patch adds usart dma definitions to both dtsi for sam9x5 chips. Without
> usage of dma it's unable to catch all bytes on usart receiver.
>
Adding DMA configuration is a good idea. But I think we will have an
issue because we have too many requested channels for DMA0.
Adding usart0, 9 dma channels will be requested. So a choice has to be
done. On DMA0 we have:
- 2 channels for SSC,
- 1 channel for MMC,
- 2 channels for I2C0,
- 2 channels for SPI0,
- 2 channels for USART0.
I have only mentionned enabled devices.
Regards
Ludovic
> Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
> ---
> arch/arm/boot/dts/at91sam9x5.dtsi | 20 ++++++++++++++++++++
> arch/arm/boot/dts/at91sam9x5_usart3.dtsi | 5 +++++
> 2 files changed, 25 insertions(+)
>
> diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
> index 726274f..f9acf6d 100644
> --- a/arch/arm/boot/dts/at91sam9x5.dtsi
> +++ b/arch/arm/boot/dts/at91sam9x5.dtsi
> @@ -860,6 +860,11 @@
> interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_dbgu>;
> + atmel,use-dma-tx;
> + atmel,use-dma-rx;
> + dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(8)>,
> + <&dma1 1 (AT91_DMA_CFG_PER_ID(9) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
> + dma-names = "tx", "rx";
> clocks = <&mck>;
> clock-names = "usart";
> status = "disabled";
> @@ -871,6 +876,11 @@
> interrupts = <5 IRQ_TYPE_LEVEL_HIGH 5>;
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_usart0>;
> + atmel,use-dma-rx;
> + atmel,use-dma-tx;
> + dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(3)>,
> + <&dma0 1 (AT91_DMA_CFG_PER_ID(4) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
> + dma-names = "tx", "rx";
> clocks = <&usart0_clk>;
> clock-names = "usart";
> status = "disabled";
> @@ -882,6 +892,11 @@
> interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_usart1>;
> + atmel,use-dma-rx;
> + atmel,use-dma-tx;
> + dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(5)>,
> + <&dma0 1 (AT91_DMA_CFG_PER_ID(6) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
> + dma-names = "tx", "rx";
> clocks = <&usart1_clk>;
> clock-names = "usart";
> status = "disabled";
> @@ -893,6 +908,11 @@
> interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_usart2>;
> + atmel,use-dma-rx;
> + atmel,use-dma-tx;
> + dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(12)>,
> + <&dma1 1 (AT91_DMA_CFG_PER_ID(13) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
> + dma-names = "tx", "rx";
> clocks = <&usart2_clk>;
> clock-names = "usart";
> status = "disabled";
> diff --git a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
> index 140217a5..731da0e 100644
> --- a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
> +++ b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
> @@ -57,6 +57,11 @@
> interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_usart3>;
> + atmel,use-dma-rx;
> + atmel,use-dma-tx;
> + dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(14)>,
> + <&dma1 1 (AT91_DMA_CFG_PER_ID(15) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
> + dma-names = "tx", "rx";
> clocks = <&usart3_clk>;
> clock-names = "usart";
> status = "disabled";
> --
> 1.9.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] at91: sam9x5 dt: add usart dma definitions to dt
2014-10-10 8:12 ` Ludovic Desroches
@ 2014-10-10 8:39 ` Nicolas Ferre
2014-10-10 9:22 ` Jiří Prchal
0 siblings, 1 reply; 10+ messages in thread
From: Nicolas Ferre @ 2014-10-10 8:39 UTC (permalink / raw)
To: linux-arm-kernel
On 10/10/2014 10:12, Ludovic Desroches :
> Hi,
>
> On Fri, Oct 10, 2014 at 08:35:56AM +0200, Jiri Prchal wrote:
>> This patch adds usart dma definitions to both dtsi for sam9x5 chips. Without
>> usage of dma it's unable to catch all bytes on usart receiver.
At which speed, with which kind of load on the CPU?
> Adding DMA configuration is a good idea. But I think we will have an
> issue because we have too many requested channels for DMA0.
>
> Adding usart0, 9 dma channels will be requested. So a choice has to be
> done. On DMA0 we have:
> - 2 channels for SSC,
> - 1 channel for MMC,
> - 2 channels for I2C0,
> - 2 channels for SPI0,
> - 2 channels for USART0.
Yes, so maybe disable the DMA for SPI0. But the decision is pretty
related to the use of the board. So I would not change things...
> I have only mentioned enabled devices.
Yes indeed,
So maybe we can add the "dmas" properties in the files mentioned by
Jiri, but not enable them like you did Ludovic in this patch:
d24cd78399a3625a69887c8124638260c1c37a2b (ARM: at91: sama5d3: add usart
dma configurations)
Bye,
>> Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
>> ---
>> arch/arm/boot/dts/at91sam9x5.dtsi | 20 ++++++++++++++++++++
>> arch/arm/boot/dts/at91sam9x5_usart3.dtsi | 5 +++++
>> 2 files changed, 25 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
>> index 726274f..f9acf6d 100644
>> --- a/arch/arm/boot/dts/at91sam9x5.dtsi
>> +++ b/arch/arm/boot/dts/at91sam9x5.dtsi
>> @@ -860,6 +860,11 @@
>> interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
>> pinctrl-names = "default";
>> pinctrl-0 = <&pinctrl_dbgu>;
>> + atmel,use-dma-tx;
>> + atmel,use-dma-rx;
>> + dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(8)>,
>> + <&dma1 1 (AT91_DMA_CFG_PER_ID(9) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
>> + dma-names = "tx", "rx";
>> clocks = <&mck>;
>> clock-names = "usart";
>> status = "disabled";
>> @@ -871,6 +876,11 @@
>> interrupts = <5 IRQ_TYPE_LEVEL_HIGH 5>;
>> pinctrl-names = "default";
>> pinctrl-0 = <&pinctrl_usart0>;
>> + atmel,use-dma-rx;
>> + atmel,use-dma-tx;
>> + dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(3)>,
>> + <&dma0 1 (AT91_DMA_CFG_PER_ID(4) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
>> + dma-names = "tx", "rx";
>> clocks = <&usart0_clk>;
>> clock-names = "usart";
>> status = "disabled";
>> @@ -882,6 +892,11 @@
>> interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
>> pinctrl-names = "default";
>> pinctrl-0 = <&pinctrl_usart1>;
>> + atmel,use-dma-rx;
>> + atmel,use-dma-tx;
>> + dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(5)>,
>> + <&dma0 1 (AT91_DMA_CFG_PER_ID(6) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
>> + dma-names = "tx", "rx";
>> clocks = <&usart1_clk>;
>> clock-names = "usart";
>> status = "disabled";
>> @@ -893,6 +908,11 @@
>> interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
>> pinctrl-names = "default";
>> pinctrl-0 = <&pinctrl_usart2>;
>> + atmel,use-dma-rx;
>> + atmel,use-dma-tx;
>> + dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(12)>,
>> + <&dma1 1 (AT91_DMA_CFG_PER_ID(13) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
>> + dma-names = "tx", "rx";
>> clocks = <&usart2_clk>;
>> clock-names = "usart";
>> status = "disabled";
>> diff --git a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
>> index 140217a5..731da0e 100644
>> --- a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
>> +++ b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
>> @@ -57,6 +57,11 @@
>> interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
>> pinctrl-names = "default";
>> pinctrl-0 = <&pinctrl_usart3>;
>> + atmel,use-dma-rx;
>> + atmel,use-dma-tx;
>> + dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(14)>,
>> + <&dma1 1 (AT91_DMA_CFG_PER_ID(15) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
>> + dma-names = "tx", "rx";
>> clocks = <&usart3_clk>;
>> clock-names = "usart";
>> status = "disabled";
>> --
>> 1.9.1
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
>
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] at91: sam9x5 dt: add usart dma definitions to dt
2014-10-10 8:39 ` Nicolas Ferre
@ 2014-10-10 9:22 ` Jiří Prchal
0 siblings, 0 replies; 10+ messages in thread
From: Jiří Prchal @ 2014-10-10 9:22 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
Dne 10.10.2014 v 10:39 Nicolas Ferre napsal(a):
> On 10/10/2014 10:12, Ludovic Desroches :
>> Hi,
>>
>> On Fri, Oct 10, 2014 at 08:35:56AM +0200, Jiri Prchal wrote:
>>> This patch adds usart dma definitions to both dtsi for sam9x5 chips. Without
>>> usage of dma it's unable to catch all bytes on usart receiver.
>
> At which speed, with which kind of load on the CPU?
At 115200b/s, load aprox. 10% at 400MHz.
>
>> Adding DMA configuration is a good idea. But I think we will have an
>> issue because we have too many requested channels for DMA0.
I discovered that dma has only 8 channels for 15 peripherals right now.
And it makes big problem to me, I need at least 9ch on dma0 since on dma1 need only 6.
>>
>> Adding usart0, 9 dma channels will be requested. So a choice has to be
>> done. On DMA0 we have:
>> - 2 channels for SSC,
>> - 1 channel for MMC,
>> - 2 channels for I2C0,
>> - 2 channels for SPI0,
>> - 2 channels for USART0.
>
> Yes, so maybe disable the DMA for SPI0. But the decision is pretty
> related to the use of the board. So I would not change things...
No, SPI0 need too.
>
>> I have only mentioned enabled devices.
>
> Yes indeed,
>
> So maybe we can add the "dmas" properties in the files mentioned by
> Jiri, but not enable them like you did Ludovic in this patch:
>
> d24cd78399a3625a69887c8124638260c1c37a2b (ARM: at91: sama5d3: add usart
> dma configurations)
>
> Bye,
But is it possible to enable/disable dma at runtime from userspace?
>
>
>>> Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
>>> ---
>>> arch/arm/boot/dts/at91sam9x5.dtsi | 20 ++++++++++++++++++++
>>> arch/arm/boot/dts/at91sam9x5_usart3.dtsi | 5 +++++
>>> 2 files changed, 25 insertions(+)
>>>
>>> diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
>>> index 726274f..f9acf6d 100644
>>> --- a/arch/arm/boot/dts/at91sam9x5.dtsi
>>> +++ b/arch/arm/boot/dts/at91sam9x5.dtsi
>>> @@ -860,6 +860,11 @@
>>> interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
>>> pinctrl-names = "default";
>>> pinctrl-0 = <&pinctrl_dbgu>;
>>> + atmel,use-dma-tx;
>>> + atmel,use-dma-rx;
>>> + dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(8)>,
>>> + <&dma1 1 (AT91_DMA_CFG_PER_ID(9) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
>>> + dma-names = "tx", "rx";
>>> clocks = <&mck>;
>>> clock-names = "usart";
>>> status = "disabled";
>>> @@ -871,6 +876,11 @@
>>> interrupts = <5 IRQ_TYPE_LEVEL_HIGH 5>;
>>> pinctrl-names = "default";
>>> pinctrl-0 = <&pinctrl_usart0>;
>>> + atmel,use-dma-rx;
>>> + atmel,use-dma-tx;
>>> + dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(3)>,
>>> + <&dma0 1 (AT91_DMA_CFG_PER_ID(4) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
>>> + dma-names = "tx", "rx";
>>> clocks = <&usart0_clk>;
>>> clock-names = "usart";
>>> status = "disabled";
>>> @@ -882,6 +892,11 @@
>>> interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
>>> pinctrl-names = "default";
>>> pinctrl-0 = <&pinctrl_usart1>;
>>> + atmel,use-dma-rx;
>>> + atmel,use-dma-tx;
>>> + dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(5)>,
>>> + <&dma0 1 (AT91_DMA_CFG_PER_ID(6) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
>>> + dma-names = "tx", "rx";
>>> clocks = <&usart1_clk>;
>>> clock-names = "usart";
>>> status = "disabled";
>>> @@ -893,6 +908,11 @@
>>> interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
>>> pinctrl-names = "default";
>>> pinctrl-0 = <&pinctrl_usart2>;
>>> + atmel,use-dma-rx;
>>> + atmel,use-dma-tx;
>>> + dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(12)>,
>>> + <&dma1 1 (AT91_DMA_CFG_PER_ID(13) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
>>> + dma-names = "tx", "rx";
>>> clocks = <&usart2_clk>;
>>> clock-names = "usart";
>>> status = "disabled";
>>> diff --git a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
>>> index 140217a5..731da0e 100644
>>> --- a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
>>> +++ b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
>>> @@ -57,6 +57,11 @@
>>> interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
>>> pinctrl-names = "default";
>>> pinctrl-0 = <&pinctrl_usart3>;
>>> + atmel,use-dma-rx;
>>> + atmel,use-dma-tx;
>>> + dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(14)>,
>>> + <&dma1 1 (AT91_DMA_CFG_PER_ID(15) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
>>> + dma-names = "tx", "rx";
>>> clocks = <&usart3_clk>;
>>> clock-names = "usart";
>>> status = "disabled";
>>> --
>>> 1.9.1
>>>
>>>
>>> _______________________________________________
>>> linux-arm-kernel mailing list
>>> linux-arm-kernel at lists.infradead.org
>>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>>
>>
>
>
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] at91: sam9x5 dt: add usart dma definitions to dt
@ 2014-10-13 9:02 Jiri Prchal
2014-10-14 12:24 ` Ludovic Desroches
0 siblings, 1 reply; 10+ messages in thread
From: Jiri Prchal @ 2014-10-13 9:02 UTC (permalink / raw)
To: linux-arm-kernel
This patch adds usart dma definitions to both dtsi for sam9x5 chips. Without
usage of dma it's unable to catch all bytes on usart receiver.
Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
v2: Add only definitions, enable them in board file.
---
arch/arm/boot/dts/at91sam9x5.dtsi | 12 ++++++++++++
arch/arm/boot/dts/at91sam9x5_usart3.dtsi | 3 +++
2 files changed, 15 insertions(+)
diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
index 726274f..bbb3ba6 100644
--- a/arch/arm/boot/dts/at91sam9x5.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5.dtsi
@@ -860,6 +860,9 @@
interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_dbgu>;
+ dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(8)>,
+ <&dma1 1 (AT91_DMA_CFG_PER_ID(9) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
+ dma-names = "tx", "rx";
clocks = <&mck>;
clock-names = "usart";
status = "disabled";
@@ -871,6 +874,9 @@
interrupts = <5 IRQ_TYPE_LEVEL_HIGH 5>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usart0>;
+ dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(3)>,
+ <&dma0 1 (AT91_DMA_CFG_PER_ID(4) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
+ dma-names = "tx", "rx";
clocks = <&usart0_clk>;
clock-names = "usart";
status = "disabled";
@@ -882,6 +888,9 @@
interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usart1>;
+ dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(5)>,
+ <&dma0 1 (AT91_DMA_CFG_PER_ID(6) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
+ dma-names = "tx", "rx";
clocks = <&usart1_clk>;
clock-names = "usart";
status = "disabled";
@@ -893,6 +902,9 @@
interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usart2>;
+ dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(12)>,
+ <&dma1 1 (AT91_DMA_CFG_PER_ID(13) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
+ dma-names = "tx", "rx";
clocks = <&usart2_clk>;
clock-names = "usart";
status = "disabled";
diff --git a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
index 140217a5..43bb5b5 100644
--- a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
+++ b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
@@ -57,6 +57,9 @@
interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
pinctrl-names = "default";
pinctrl-0 = <&pinctrl_usart3>;
+ dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(14)>,
+ <&dma1 1 (AT91_DMA_CFG_PER_ID(15) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
+ dma-names = "tx", "rx";
clocks = <&usart3_clk>;
clock-names = "usart";
status = "disabled";
--
1.9.1
^ permalink raw reply related [flat|nested] 10+ messages in thread
* [PATCH] at91: sam9x5 dt: add usart dma definitions to dt
2014-10-13 9:02 [PATCH] at91: sam9x5 dt: add usart dma definitions to dt Jiri Prchal
@ 2014-10-14 12:24 ` Ludovic Desroches
2014-10-21 16:38 ` Nicolas Ferre
0 siblings, 1 reply; 10+ messages in thread
From: Ludovic Desroches @ 2014-10-14 12:24 UTC (permalink / raw)
To: linux-arm-kernel
On Mon, Oct 13, 2014 at 11:02:16AM +0200, Jiri Prchal wrote:
> This patch adds usart dma definitions to both dtsi for sam9x5 chips. Without
> usage of dma it's unable to catch all bytes on usart receiver.
>
> Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
>
> v2: Add only definitions, enable them in board file.
> ---
> arch/arm/boot/dts/at91sam9x5.dtsi | 12 ++++++++++++
> arch/arm/boot/dts/at91sam9x5_usart3.dtsi | 3 +++
> 2 files changed, 15 insertions(+)
>
> diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
> index 726274f..bbb3ba6 100644
> --- a/arch/arm/boot/dts/at91sam9x5.dtsi
> +++ b/arch/arm/boot/dts/at91sam9x5.dtsi
> @@ -860,6 +860,9 @@
> interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_dbgu>;
> + dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(8)>,
> + <&dma1 1 (AT91_DMA_CFG_PER_ID(9) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
> + dma-names = "tx", "rx";
> clocks = <&mck>;
> clock-names = "usart";
> status = "disabled";
> @@ -871,6 +874,9 @@
> interrupts = <5 IRQ_TYPE_LEVEL_HIGH 5>;
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_usart0>;
> + dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(3)>,
> + <&dma0 1 (AT91_DMA_CFG_PER_ID(4) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
> + dma-names = "tx", "rx";
> clocks = <&usart0_clk>;
> clock-names = "usart";
> status = "disabled";
> @@ -882,6 +888,9 @@
> interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_usart1>;
> + dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(5)>,
> + <&dma0 1 (AT91_DMA_CFG_PER_ID(6) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
> + dma-names = "tx", "rx";
> clocks = <&usart1_clk>;
> clock-names = "usart";
> status = "disabled";
> @@ -893,6 +902,9 @@
> interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_usart2>;
> + dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(12)>,
> + <&dma1 1 (AT91_DMA_CFG_PER_ID(13) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
> + dma-names = "tx", "rx";
> clocks = <&usart2_clk>;
> clock-names = "usart";
> status = "disabled";
> diff --git a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
> index 140217a5..43bb5b5 100644
> --- a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
> +++ b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
> @@ -57,6 +57,9 @@
> interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
> pinctrl-names = "default";
> pinctrl-0 = <&pinctrl_usart3>;
> + dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(14)>,
> + <&dma1 1 (AT91_DMA_CFG_PER_ID(15) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
> + dma-names = "tx", "rx";
> clocks = <&usart3_clk>;
> clock-names = "usart";
> status = "disabled";
> --
> 1.9.1
>
>
> _______________________________________________
> linux-arm-kernel mailing list
> linux-arm-kernel at lists.infradead.org
> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
^ permalink raw reply [flat|nested] 10+ messages in thread
* [PATCH] at91: sam9x5 dt: add usart dma definitions to dt
2014-10-14 12:24 ` Ludovic Desroches
@ 2014-10-21 16:38 ` Nicolas Ferre
[not found] ` <54477097.1050909@aksignal.cz>
0 siblings, 1 reply; 10+ messages in thread
From: Nicolas Ferre @ 2014-10-21 16:38 UTC (permalink / raw)
To: linux-arm-kernel
On 14/10/2014 14:24, Ludovic Desroches :
> On Mon, Oct 13, 2014 at 11:02:16AM +0200, Jiri Prchal wrote:
>> This patch adds usart dma definitions to both dtsi for sam9x5 chips. Without
>> usage of dma it's unable to catch all bytes on usart receiver.
>>
>> Signed-off-by: Jiri Prchal <jiri.prchal@aksignal.cz>
> Acked-by: Ludovic Desroches <ludovic.desroches@atmel.com>
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Stacked on top of at91-3.19-dt. Thanks!
>> v2: Add only definitions, enable them in board file.
>> ---
>> arch/arm/boot/dts/at91sam9x5.dtsi | 12 ++++++++++++
>> arch/arm/boot/dts/at91sam9x5_usart3.dtsi | 3 +++
>> 2 files changed, 15 insertions(+)
>>
>> diff --git a/arch/arm/boot/dts/at91sam9x5.dtsi b/arch/arm/boot/dts/at91sam9x5.dtsi
>> index 726274f..bbb3ba6 100644
>> --- a/arch/arm/boot/dts/at91sam9x5.dtsi
>> +++ b/arch/arm/boot/dts/at91sam9x5.dtsi
>> @@ -860,6 +860,9 @@
>> interrupts = <1 IRQ_TYPE_LEVEL_HIGH 7>;
>> pinctrl-names = "default";
>> pinctrl-0 = <&pinctrl_dbgu>;
>> + dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(8)>,
>> + <&dma1 1 (AT91_DMA_CFG_PER_ID(9) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
>> + dma-names = "tx", "rx";
>> clocks = <&mck>;
>> clock-names = "usart";
>> status = "disabled";
>> @@ -871,6 +874,9 @@
>> interrupts = <5 IRQ_TYPE_LEVEL_HIGH 5>;
>> pinctrl-names = "default";
>> pinctrl-0 = <&pinctrl_usart0>;
>> + dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(3)>,
>> + <&dma0 1 (AT91_DMA_CFG_PER_ID(4) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
>> + dma-names = "tx", "rx";
>> clocks = <&usart0_clk>;
>> clock-names = "usart";
>> status = "disabled";
>> @@ -882,6 +888,9 @@
>> interrupts = <6 IRQ_TYPE_LEVEL_HIGH 5>;
>> pinctrl-names = "default";
>> pinctrl-0 = <&pinctrl_usart1>;
>> + dmas = <&dma0 1 AT91_DMA_CFG_PER_ID(5)>,
>> + <&dma0 1 (AT91_DMA_CFG_PER_ID(6) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
>> + dma-names = "tx", "rx";
>> clocks = <&usart1_clk>;
>> clock-names = "usart";
>> status = "disabled";
>> @@ -893,6 +902,9 @@
>> interrupts = <7 IRQ_TYPE_LEVEL_HIGH 5>;
>> pinctrl-names = "default";
>> pinctrl-0 = <&pinctrl_usart2>;
>> + dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(12)>,
>> + <&dma1 1 (AT91_DMA_CFG_PER_ID(13) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
>> + dma-names = "tx", "rx";
>> clocks = <&usart2_clk>;
>> clock-names = "usart";
>> status = "disabled";
>> diff --git a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
>> index 140217a5..43bb5b5 100644
>> --- a/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
>> +++ b/arch/arm/boot/dts/at91sam9x5_usart3.dtsi
>> @@ -57,6 +57,9 @@
>> interrupts = <8 IRQ_TYPE_LEVEL_HIGH 5>;
>> pinctrl-names = "default";
>> pinctrl-0 = <&pinctrl_usart3>;
>> + dmas = <&dma1 1 AT91_DMA_CFG_PER_ID(14)>,
>> + <&dma1 1 (AT91_DMA_CFG_PER_ID(15) | AT91_DMA_CFG_FIFOCFG_ASAP)>;
>> + dma-names = "tx", "rx";
>> clocks = <&usart3_clk>;
>> clock-names = "usart";
>> status = "disabled";
>> --
>> 1.9.1
>>
>>
>> _______________________________________________
>> linux-arm-kernel mailing list
>> linux-arm-kernel at lists.infradead.org
>> http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
>
--
Nicolas Ferre
^ permalink raw reply [flat|nested] 10+ messages in thread
* at91: dt: dma usage
[not found] ` <54477097.1050909@aksignal.cz>
@ 2014-12-17 20:16 ` Alexandre Belloni
2014-12-17 21:49 ` Arnd Bergmann
0 siblings, 1 reply; 10+ messages in thread
From: Alexandre Belloni @ 2014-12-17 20:16 UTC (permalink / raw)
To: linux-arm-kernel
Hi,
On 22/10/2014 at 10:53:43 +0200, Ji?? Prchal wrote :
> in fact that in at91sam chips has a lot of peripherals but only 2*8 dma channels
> and as my patch in last week "at91: sam9x5 dt: add usart dma definitions to dt"
> adds only dma definitions, not make to use them, leave it on board definition,
> shouldn't do the same all other peripherals definitions?
> I think that I2C, SPI are not as necessary as USART, but thous are always "on".
Not much discussion happened on that and I have the feeling this is
something we have to sort out. Until the dma driver are able to allocate
channels dynamically, it is true that this may be something we shouldn't
enable in the dtsi and let people activate dma in the board dts.
--
Alexandre Belloni, Free Electrons
Embedded Linux, Kernel and Android engineering
http://free-electrons.com
^ permalink raw reply [flat|nested] 10+ messages in thread
* at91: dt: dma usage
2014-12-17 20:16 ` at91: dt: dma usage Alexandre Belloni
@ 2014-12-17 21:49 ` Arnd Bergmann
2015-01-09 15:42 ` Ludovic Desroches
0 siblings, 1 reply; 10+ messages in thread
From: Arnd Bergmann @ 2014-12-17 21:49 UTC (permalink / raw)
To: linux-arm-kernel
On Wednesday 17 December 2014 21:16:22 Alexandre Belloni wrote:
> On 22/10/2014 at 10:53:43 +0200, Ji?? Prchal wrote :
> > in fact that in at91sam chips has a lot of peripherals but only 2*8 dma channels
> > and as my patch in last week "at91: sam9x5 dt: add usart dma definitions to dt"
> > adds only dma definitions, not make to use them, leave it on board definition,
> > shouldn't do the same all other peripherals definitions?
> > I think that I2C, SPI are not as necessary as USART, but thous are always "on".
>
> Not much discussion happened on that and I have the feeling this is
> something we have to sort out. Until the dma driver are able to allocate
> channels dynamically, it is true that this may be something we shouldn't
> enable in the dtsi and let people activate dma in the board dts.
Could you use the drivers/dma/virt-dma.c infrastructure in the driver
to do this? Are you already planning to use it?
Arnd
^ permalink raw reply [flat|nested] 10+ messages in thread
* at91: dt: dma usage
2014-12-17 21:49 ` Arnd Bergmann
@ 2015-01-09 15:42 ` Ludovic Desroches
0 siblings, 0 replies; 10+ messages in thread
From: Ludovic Desroches @ 2015-01-09 15:42 UTC (permalink / raw)
To: linux-arm-kernel
On Wed, Dec 17, 2014 at 10:49:55PM +0100, Arnd Bergmann wrote:
> On Wednesday 17 December 2014 21:16:22 Alexandre Belloni wrote:
> > On 22/10/2014 at 10:53:43 +0200, Ji?? Prchal wrote :
> > > in fact that in at91sam chips has a lot of peripherals but only 2*8 dma channels
> > > and as my patch in last week "at91: sam9x5 dt: add usart dma definitions to dt"
> > > adds only dma definitions, not make to use them, leave it on board definition,
> > > shouldn't do the same all other peripherals definitions?
> > > I think that I2C, SPI are not as necessary as USART, but thous are always "on".
> >
> > Not much discussion happened on that and I have the feeling this is
> > something we have to sort out. Until the dma driver are able to allocate
> > channels dynamically, it is true that this may be something we shouldn't
> > enable in the dtsi and let people activate dma in the board dts.
People can override dma-names to disable dma use for a device.
>
> Could you use the drivers/dma/virt-dma.c infrastructure in the driver
> to do this? Are you already planning to use it?
Yes we could use virtual channels. We planned to use it for xdmac but
there is more channels so it's not a high priority. Concerning hdmac, it
will be useful due to the low number of channels but, at the moment,
it's not planned to switch to virtual channels.
Ludovic
^ permalink raw reply [flat|nested] 10+ messages in thread
end of thread, other threads:[~2015-01-09 15:42 UTC | newest]
Thread overview: 10+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-10-13 9:02 [PATCH] at91: sam9x5 dt: add usart dma definitions to dt Jiri Prchal
2014-10-14 12:24 ` Ludovic Desroches
2014-10-21 16:38 ` Nicolas Ferre
[not found] ` <54477097.1050909@aksignal.cz>
2014-12-17 20:16 ` at91: dt: dma usage Alexandre Belloni
2014-12-17 21:49 ` Arnd Bergmann
2015-01-09 15:42 ` Ludovic Desroches
-- strict thread matches above, loose matches on Subject: below --
2014-10-10 6:35 [PATCH] at91: sam9x5 dt: add usart dma definitions to dt Jiri Prchal
2014-10-10 8:12 ` Ludovic Desroches
2014-10-10 8:39 ` Nicolas Ferre
2014-10-10 9:22 ` Jiří Prchal
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.