at91: sam9x5 dt: add usart dma definitions to dt
Subsystems (2)
PATCH 1/1 at91: sam9x5 dt: add usart dma definitions to dt
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.
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(+)
arch/arm/boot/dts/at91sam9x5.dtsi +12 -0
@@ -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";
arch/arm/boot/dts/at91sam9x5_usart3.dtsi +3 -0
@@ -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";
Signature · 1 line
1.9.1
PATCH 1/1 at91: sam9x5 dt: add usart dma definitions to dt
Quoted 4 lines · Jiri Prchal
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 <[email protected]>
Quoted 73 lines
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(+)arch/arm/boot/dts/at91sam9x5.dtsi +12
-0@@ -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";arch/arm/boot/dts/at91sam9x5_usart3.dtsi +3
-0@@ -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";Signature · 7 lines
1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
PATCH 1/1 at91: sam9x5 dt: add usart dma definitions to dt
On 14/10/2014 14:24, Ludovic Desroches :
Quoted 6 lines · Jiri Prchal
Quoted 4 lines
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 <[email protected]>
Stacked on top of at91-3.19-dt. Thanks!
Quoted 73 lines
Quoted 72 lines
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(+)arch/arm/boot/dts/at91sam9x5.dtsi +12
-0@@ -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";arch/arm/boot/dts/at91sam9x5_usart3.dtsi +3
-0@@ -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";Signature · 7 lines
1.9.1 _______________________________________________ linux-arm-kernel mailing list linux-arm-kernel at lists.infradead.org http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
Signature · 1 line
Nicolas Ferre
A message that is not in the archive (sent off-list or not yet received): [email protected]
at91: dt: dma usage
Hi,
Quoted 5 lines · Ji?? Prchal
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.
Signature · 3 lines
Alexandre Belloni, Free Electrons Embedded Linux, Kernel and Android engineering http://free-electrons.com
at91: dt: dma usage
Quoted 11 lines · On Wednesday 17 December 2014 21:16:22 Alexandre Belloni wrote:
Quoted 5 lines · Ji?? Prchal
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
at91: dt: dma usage
Quoted 8 lines · Arnd Bergmann
Quoted 7 lines · On Wednesday 17 December 2014 21:16:22 Alexandre Belloni wrote:
Quoted 5 lines · Ji?? Prchal
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".
Quoted 4 lines
Quoted 4 lines
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.
Quoted 3 lines
Could you use the
drivers/dma/virt-dma.cinfrastructure 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