dmaengine: cppi41: Add dma support to da8xx
Subsystems (3)
v2 cover dmaengine: cppi41: Add dma support to da8xx
This series add support of DA8xx to CPPI 4.1 driver.
As the CPPI 4.1 is now generic, we only had to add the glue for DA8xx.
This serie should applied on top of
"[PATCH v2 0/7] dmaengine: cppi41: Make CPPI 4.1 driver more generic".
Changes in v2:
- most of patches of v1 has been moved to the series
"[PATCH v2 0/7] dmaengine: cppi41: Make CPPI 4.1 driver more generic".
- some patches of v1 has been removed because they were no required anymore because CPPI 4.1 driver has been made more generic.
- In v1, the driver were managing the clock for DA8xx paltform. This is not needed as CPPI 4.1 will be a child of MUSB DA8xx glue, we can use PM runtime and let the DA8xx glue driver manage it.
Alexandre Bailon (3):
dt/bindings: da8xx-usb: Add binding for the CPPI 4.1 DMA controller
dmaengine: cppi41: Implement the glue for DA8xx
dmaengine: cppi41: Fix teardown warnings
.../devicetree/bindings/usb/da8xx-usb.txt | 42 ++++++++++++++++++++++ drivers/dma/cppi41.c | 28 +++++++++++++-- 2 files changed, 68 insertions(+), 2 deletions(-)
Signature · 6 lines
2.10.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20170117142016.11163-1-abailon-rdvid1DuHRBWk0Htik3J/[email protected]
PATCH v2 1/3 dt/bindings: da8xx-usb: Add binding for the CPPI 4.1 DMA controller
DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx cppi41 dma controller.
--- .../devicetree/bindings/usb/da8xx-usb.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+)
Documentation/devicetree/bindings/usb/da8xx-usb.txt +42 -0
@@ -18,10 +18,26 @@ Required properties: - phy-names: Should be "usb-phy" + - dmas: specifies the dma channels + + - dma-names: specifies the names of the channels. Use "rxN" for receive + and "txN" for transmit endpoints. N specifies the endpoint number. + Optional properties: ~~~~~~~~~~~~~~~~~~~~ - vbus-supply: Phandle to a regulator providing the USB bus power. +DMA +~~~ +- compatible: ti,da8xx-cppi41 +- reg: offset and length of the following register spaces: CPPI DMA Controller, + CPPI DMA Scheduler, Queue Manager +- reg-names: "controller", "scheduler", "queuemgr" +- #dma-cells: should be set to 2. The first number represents the + channel number (0 … 3 for endpoints 1 … 4). + The second number is 0 for RX and 1 for TX transfers. +- #dma-channels: should be set to 4 representing the 4 endpoints. + Example: usb_phy: usb-phy { compatible = "ti,da830-usb-phy";
@@ -31,6 +47,9 @@ Example: usb0: usb@200000 { compatible = "ti,da830-musb"; reg = <0x00200000 0x10000>; + ranges; + #address-cells = <1>; + #size-cells = <1>; interrupts = <58>; interrupt-names = "mc";
@@ -39,5 +58,28 @@ Example: phys = <&usb_phy 0>; phy-names = "usb-phy"; + dmas = <&cppi41dma 0 0 &cppi41dma 1 0 + &cppi41dma 2 0 &cppi41dma 3 0 + &cppi41dma 0 1 &cppi41dma 1 1 + &cppi41dma 2 1 &cppi41dma 3 1>; + dma-names = + "rx1", "rx2", "rx3", "rx4", + "tx1", "tx2", "tx3", "tx4"; + status = "okay"; + + cppi41dma: dma-controller@201000 { + compatible = "ti,da8xx-cppi41"; + reg = <0x201000 0x1000 + 0x202000 0x1000 + 0x204000 0x4000>; + reg-names = "controller", "scheduler", "queuemgr"; + interrupts = <58>; + interrupt-names = "glue"; + #dma-cells = <2>; + #dma-channels = <4>; + #dma-requests = <256>; + status = "okay"; + }; + };
Signature · 6 lines
2.10.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 20170117142016.11163-2-abailon-rdvid1DuHRBWk0Htik3J/[email protected]
Re: [PATCH v2 1/3] dt/bindings: da8xx-usb: Add binding for the CPPI 4.1 DMA controller
Quoted 1 line · Alexandre Bailon
DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx cppi41 dma controller.
"CPPI 4.1 DMA" again.
Quoted 23 lines
--- .../devicetree/bindings/usb/da8xx-usb.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+)Documentation/devicetree/bindings/usb/da8xx-usb.txt +5
-0@@ -18,10 +18,26 @@ Required properties: - phy-names: Should be "usb-phy" + - dmas: specifies the dma channels + + - dma-names: specifies the names of the channels. Use "rxN" for receive + and "txN" for transmit endpoints. N specifies the endpoint number. + Optional properties: ~~~~~~~~~~~~~~~~~~~~ - vbus-supply: Phandle to a regulator providing the USB bus power.
Documentation/devicetree/bindings/usb/da8xx-usb.txt Required properties: · line 39
Quoted 10 lines
Documentation/devicetree/bindings/usb/da8xx-usb.txt +10
-0+DMA +~~~ +- compatible: ti,da8xx-cppi41 +- reg: offset and length of the following register spaces: CPPI DMA Controller, + CPPI DMA Scheduler, Queue Manager +- reg-names: "controller", "scheduler", "queuemgr" +- #dma-cells: should be set to 2. The first number represents the + channel number (0 … 3 for endpoints 1 … 4). + The second number is 0 for RX and 1 for TX transfers. +- #dma-channels: should be set to 4 representing the 4 endpoints.
Shouldn't the # of channels be a part of the glue data?
[...]
Quoted 15 lines
Documentation/devicetree/bindings/usb/da8xx-usb.txt +10
-0@@ -39,5 +58,28 @@ Example: phys = <&usb_phy 0>; phy-names = "usb-phy"; + dmas = <&cppi41dma 0 0 &cppi41dma 1 0 + &cppi41dma 2 0 &cppi41dma 3 0 + &cppi41dma 0 1 &cppi41dma 1 1 + &cppi41dma 2 1 &cppi41dma 3 1>; + dma-names = + "rx1", "rx2", "rx3", "rx4", + "tx1", "tx2", "tx3", "tx4"; + status = "okay"; + + cppi41dma: dma-controller@201000 {
Documentation/devicetree/bindings/usb/da8xx-usb.txt Example: · line 81
Quoted 10 lines
Documentation/devicetree/bindings/usb/da8xx-usb.txt +10
-0+ compatible = "ti,da8xx-cppi41"; + reg = <0x201000 0x1000 + 0x202000 0x1000 + 0x204000 0x4000>; + reg-names = "controller", "scheduler", "queuemgr"; + interrupts = <58>; + interrupt-names = "glue"; + #dma-cells = <2>; + #dma-channels = <4>; + #dma-requests = <256>;
Not seeing this prop documented...
Documentation/devicetree/bindings/usb/da8xx-usb.txt Example: · line 82
Quoted 1 line
Documentation/devicetree/bindings/usb/da8xx-usb.txt +1
-0+ status = "okay";
Can be omitted.
Documentation/devicetree/bindings/usb/da8xx-usb.txt Example: · line 85
Quoted 4 lines
Documentation/devicetree/bindings/usb/da8xx-usb.txt +2
-0+ }; + };
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): d2d19518-5758-1af1-71cd-ab38f26734e7-M4DtvfQ/[email protected]
Re: [PATCH v2 1/3] dt/bindings: da8xx-usb: Add binding for the CPPI 4.1 DMA controller
Quoted 31 lines · Sergei Shtylyov
Quoted 1 line · Alexandre Bailon
DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx cppi41 dma controller.
"CPPI 4.1 DMA" again.Quoted 25 lines
--- .../devicetree/bindings/usb/da8xx-usb.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+)Documentation/devicetree/bindings/usb/da8xx-usb.txt +5
-0@@ -18,10 +18,26 @@ Required properties: - phy-names: Should be "usb-phy" + - dmas: specifies the dma channels + + - dma-names: specifies the names of the channels. Use "rxN" for receive + and "txN" for transmit endpoints. N specifies the endpoint number. + Optional properties: ~~~~~~~~~~~~~~~~~~~~ - vbus-supply: Phandle to a regulator providing the USB bus power.
Quoted 13 lines
Documentation/devicetree/bindings/usb/da8xx-usb.txt Required properties: · line 39
Quoted 11 lines
Documentation/devicetree/bindings/usb/da8xx-usb.txt +10
-0+DMA +~~~ +- compatible: ti,da8xx-cppi41 +- reg: offset and length of the following register spaces: CPPI DMA Controller, + CPPI DMA Scheduler, Queue Manager +- reg-names: "controller", "scheduler", "queuemgr" +- #dma-cells: should be set to 2. The first number represents the + channel number (0 … 3 for endpoints 1 … 4). + The second number is 0 for RX and 1 for TX transfers. +- #dma-channels: should be set to 4 representing the 4 endpoints.Shouldn't the # of channels be a part of the glue data?
TBH I don't think know. For AM33xx, the number of channels is defined so I did the same for DA850.
Quoted 21 lines
[...]
Quoted 19 lines
Documentation/devicetree/bindings/usb/da8xx-usb.txt +14
-0@@ -39,5 +58,28 @@ Example: phys = <&usb_phy 0>; phy-names = "usb-phy"; + dmas = <&cppi41dma 0 0 &cppi41dma 1 0 + &cppi41dma 2 0 &cppi41dma 3 0 + &cppi41dma 0 1 &cppi41dma 1 1 + &cppi41dma 2 1 &cppi41dma 3 1>; + dma-names = + "rx1", "rx2", "rx3", "rx4", + "tx1", "tx2", "tx3", "tx4"; + status = "okay"; + + cppi41dma: dma-controller@201000 { + compatible = "ti,da8xx-cppi41"; + reg = <0x201000 0x1000 + 0x202000 0x1000 + 0x204000 0x4000>;
Quoted 8 lines
Documentation/devicetree/bindings/usb/da8xx-usb.txt Example: · line 81
Quoted 6 lines
Documentation/devicetree/bindings/usb/da8xx-usb.txt +6
-0+ reg-names = "controller", "scheduler", "queuemgr"; + interrupts = <58>; + interrupt-names = "glue"; + #dma-cells = <2>; + #dma-channels = <4>; + #dma-requests = <256>;Not seeing this prop documented...
Right. Actually, this prop is not even used so I will just remove it.
Quoted 10 lines
Documentation/devicetree/bindings/usb/da8xx-usb.txt Example: · line 82
Quoted 2 lines
Documentation/devicetree/bindings/usb/da8xx-usb.txt +1
-0+ status = "okay";Can be omitted.
Quoted 4 lines
Documentation/devicetree/bindings/usb/da8xx-usb.txt +2
-0+ }; + };
Best Regards,
Alexandre
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/3] dt/bindings: da8xx-usb: Add binding for the CPPI 4.1 DMA controller
In reply to a message not in the archiveQuoted 17 lines · Alexandre Bailon
DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx cppi41 dma controller.
--- .../devicetree/bindings/usb/da8xx-usb.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+)Documentation/devicetree/bindings/usb/da8xx-usb.txt +2
-0@@ -18,10 +18,26 @@ Required properties: - phy-names: Should be "usb-phy" + - dmas: specifies the dma channels +
Documentation/devicetree/bindings/usb/da8xx-usb.txt Required properties: · line 32
Quoted 10 lines
Documentation/devicetree/bindings/usb/da8xx-usb.txt +6
-0+ - dma-names: specifies the names of the channels. Use "rxN" for receive + and "txN" for transmit endpoints. N specifies the endpoint number. + Optional properties: ~~~~~~~~~~~~~~~~~~~~ - vbus-supply: Phandle to a regulator providing the USB bus power. +DMA +~~~ +- compatible: ti,da8xx-cppi41
Almost missed this -- wildcards in this property are forbidden.
We should use "ti,da830-cppi41" as a least common denominator.
MBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): aa9b6761-c8de-13ea-1a62-9810ad92a6d4-M4DtvfQ/[email protected]
Re: [PATCH v2 1/3] dt/bindings: da8xx-usb: Add binding for the CPPI 4.1 DMA controller
Quoted 28 lines · Sergei Shtylyov
Quoted 26 lines · Alexandre Bailon
DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx cppi41 dma controller.
--- .../devicetree/bindings/usb/da8xx-usb.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+)Documentation/devicetree/bindings/usb/da8xx-usb.txt +5
-0@@ -18,10 +18,26 @@ Required properties: - phy-names: Should be "usb-phy" + - dmas: specifies the dma channels + + - dma-names: specifies the names of the channels. Use "rxN" for receive + and "txN" for transmit endpoints. N specifies the endpoint number. + Optional properties: ~~~~~~~~~~~~~~~~~~~~ - vbus-supply: Phandle to a regulator providing the USB bus power.
Quoted 6 lines
Documentation/devicetree/bindings/usb/da8xx-usb.txt Required properties: · line 32
Quoted 3 lines
Documentation/devicetree/bindings/usb/da8xx-usb.txt +3
-0+DMA +~~~ +- compatible: ti,da8xx-cppi41Almost missed this -- wildcards in this property are forbidden.
We should use "ti,da830-cppi41" as a least common denominator.
Documentation/devicetree/bindings/submitting-patches.txt states:
"
5) The wildcard "<chip>" may be used in compatible strings, as in the following example:
- compatible: Must contain '"nvidia,<chip>-pcie", "nvidia,tegra20-pcie"' where <chip> is tegra30, tegra132, ...
"
I take this to mean that using wildcards to denote an SoC family on which the same IP is present is okay to do. With that understanding, I think using ti,da8xx-cppi41 is fine too. Although I have no objections against using the more specific ti,da830-cppi41
Thanks,
Sekhar
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 710c724c-3831-e9d1-406b-76bdfed7b948-l0cyMroinI0@public.gmane.org
Re: [PATCH v2 1/3] dt/bindings: da8xx-usb: Add binding for the CPPI 4.1 DMA controller
Hello!
Quoted 39 lines · Sekhar Nori
Quoted 26 lines
Quoted 26 lines
DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx cppi41 dma controller.
--- .../devicetree/bindings/usb/da8xx-usb.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+)Documentation/devicetree/bindings/usb/da8xx-usb.txt +5
-0@@ -18,10 +18,26 @@ Required properties: - phy-names: Should be "usb-phy" + - dmas: specifies the dma channels + + - dma-names: specifies the names of the channels. Use "rxN" for receive + and "txN" for transmit endpoints. N specifies the endpoint number. + Optional properties: ~~~~~~~~~~~~~~~~~~~~ - vbus-supply: Phandle to a regulator providing the USB bus power.Quoted 6 lines
Documentation/devicetree/bindings/usb/da8xx-usb.txt Required properties: · line 32
Quoted 3 lines
Documentation/devicetree/bindings/usb/da8xx-usb.txt +3
-0+DMA +~~~ +- compatible: ti,da8xx-cppi41Almost missed this -- wildcards in this property are forbidden.
We should use "ti,da830-cppi41" as a least common denominator.
Documentation/devicetree/bindings/submitting-patches.txtstates:"
5) The wildcard "<chip>" may be used in compatible strings, as in the following example:
Quoted 7 lines
- compatible: Must contain '"nvidia,<chip>-pcie", "nvidia,tegra20-pcie"' where <chip> is tegra30, tegra132, ...
"I take this to mean that using wildcards to denote an SoC family on which the same IP is present is okay to do.> With that understanding, I think using ti,da8xx-cppi41 is fine too.
It doesn't really follow. I repeat, x's are not allowed.
[...]
Quoted 2 lines
Thanks,
Sekhar
MBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): d544f4f2-9303-8d68-0350-af9c53ff19aa-M4DtvfQ/[email protected]
Re: [PATCH v2 1/3] dt/bindings: da8xx-usb: Add binding for the CPPI 4.1 DMA controller
Hi Rob,
Quoted 49 lines · Sergei Shtylyov
Hello!
Quoted 45 lines · Sekhar Nori
Quoted 28 lines
Quoted 28 lines
DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx cppi41 dma controller.
--- .../devicetree/bindings/usb/da8xx-usb.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+)Documentation/devicetree/bindings/usb/da8xx-usb.txt +3
-0@@ -18,10 +18,26 @@ Required properties: - phy-names: Should be "usb-phy" + - dmas: specifies the dma channels + + - dma-names: specifies the names of the channels. Use "rxN" forreceive
Documentation/devicetree/bindings/usb/da8xx-usb.txt +2
-0+ and "txN" for transmit endpoints. N specifies the endpoint number. + Optional properties: ~~~~~~~~~~~~~~~~~~~~ - vbus-supply: Phandle to a regulator providing the USB bus power.Quoted 6 lines
Quoted 3 lines
+DMA
+~~~
+- compatible: ti,da8xx-cppi41Almost missed this -- wildcards in this property are forbidden.
We should use "ti,da830-cppi41" as a least common denominator.
Documentation/devicetree/bindings/submitting-patches.txtstates:"
5) The wildcard "<chip>" may be used in compatible strings, as in the following example:- compatible: Must contain '"nvidia,<chip>-pcie", "nvidia,tegra20-pcie"' where <chip> is tegra30, tegra132, ...
"
Quoted 5 lines
Quoted 3 lines
I take this to mean that using wildcards to denote an SoC family on which the same IP is present is okay to do.> With that understanding, I think using ti,da8xx-cppi41 is fine too.
It doesn't really follow. I repeat, x's are not allowed.
Can you clarify here? If x's are indeed not allowed, then I think the document is being ambiguous about what constitutes "The wildcard "<chip>""
Thanks,
Sekhar
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
A message that is not in the archive (sent off-list or not yet received): 69908f47-1920-b3f8-a307-2c9cb93c2c26-l0cyMroinI0@public.gmane.org
Re: [PATCH v2 1/3] dt/bindings: da8xx-usb: Add binding for the CPPI 4.1 DMA controller
Quoted 45 lines · Sekhar Nori
Quoted 45 lines
Quoted 45 lines
Quoted 28 lines
Quoted 28 lines
DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx cppi41 dma controller.
--- .../devicetree/bindings/usb/da8xx-usb.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+)Documentation/devicetree/bindings/usb/da8xx-usb.txt +3
-0@@ -18,10 +18,26 @@ Required properties: - phy-names: Should be "usb-phy" + - dmas: specifies the dma channels + + - dma-names: specifies the names of the channels. Use "rxN" forreceive
Documentation/devicetree/bindings/usb/da8xx-usb.txt +2
-0+ and "txN" for transmit endpoints. N specifies the endpoint number. + Optional properties: ~~~~~~~~~~~~~~~~~~~~ - vbus-supply: Phandle to a regulator providing the USB bus power.Quoted 6 lines
Quoted 3 lines
+DMA
+~~~
+- compatible: ti,da8xx-cppi41Almost missed this -- wildcards in this property are forbidden.
We should use "ti,da830-cppi41" as a least common denominator.
Documentation/devicetree/bindings/submitting-patches.txtstates:"
5) The wildcard "<chip>" may be used in compatible strings, as in the following example:- compatible: Must contain '"nvidia,<chip>-pcie", "nvidia,tegra20-pcie"' where <chip> is tegra30, tegra132, ...
"
Quoted 7 lines
Quoted 5 lines
Quoted 3 lines
I take this to mean that using wildcards to denote an SoC family on which the same IP is present is okay to do.> With that understanding, I think using ti,da8xx-cppi41 is fine too.
It doesn't really follow. I repeat, x's are not allowed.
Can you clarify here? If x's are indeed not allowed,
I have no idea where you got that they are allowed.
Quoted 2 lines
then I think the
document is being ambiguous about what constitutes "The wildcard "<chip>""
There 's no ambiguity because the wildcard is the word "<chip>" itself,
not anything other. Even if "<chip>" is used in the bindings, its possible values should be documented anyway.
Quoted 2 lines
Thanks,
Sekhar
MBR, Sergei
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: [PATCH v2 1/3] dt/bindings: da8xx-usb: Add binding for the CPPI 4.1 DMA controller
In reply to a message not in the archiveQuoted 42 lines · Sekhar Nori
Quoted 28 lines · Sergei Shtylyov
Quoted 26 lines · Alexandre Bailon
DT binding for the TI DA8xx/OMAP-L1x/AM17xx/AM18xx cppi41 dma controller.
--- .../devicetree/bindings/usb/da8xx-usb.txt | 42 ++++++++++++++++++++++ 1 file changed, 42 insertions(+)Documentation/devicetree/bindings/usb/da8xx-usb.txt +5
-0@@ -18,10 +18,26 @@ Required properties: - phy-names: Should be "usb-phy" + - dmas: specifies the dma channels + + - dma-names: specifies the names of the channels. Use "rxN" for receive + and "txN" for transmit endpoints. N specifies the endpoint number. + Optional properties: ~~~~~~~~~~~~~~~~~~~~ - vbus-supply: Phandle to a regulator providing the USB bus power.Quoted 6 lines
Documentation/devicetree/bindings/usb/da8xx-usb.txt Required properties: · line 32
Quoted 3 lines
Documentation/devicetree/bindings/usb/da8xx-usb.txt +3
-0+DMA +~~~ +- compatible: ti,da8xx-cppi41Almost missed this -- wildcards in this property are forbidden.
We should use "ti,da830-cppi41" as a least common denominator.
Documentation/devicetree/bindings/submitting-patches.txtstates:"
5) The wildcard "<chip>" may be used in compatible strings, as in the following example:
Quoted 8 lines
- compatible: Must contain '"nvidia,<chip>-pcie", "nvidia,tegra20-pcie"' where <chip> is tegra30, tegra132, ...
"I take this to mean that using wildcards to denote an SoC family on which the same IP is present is okay to do. With that understanding, I think using ti,da8xx-cppi41 is fine too. Although I have no objections against using the more specific ti,da830-cppi41
You may document things using the variable like above, but the end result of compatible strings should not have wildcards.
Rob
--
To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 2/3 dmaengine: cppi41: Implement the glue for DA8xx
In reply to a message not in the archiveThe DA8xx has a CPPI 4.1 DMA controller.
This is add the glue layer required to make it work on DA8xx.
--- drivers/dma/cppi41.c | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+)
drivers/dma/cppi41.c +24 -0
@@ -221,6 +221,20 @@ static const struct chan_queues am335x_usb_queues_rx[] = { [29] = { .submit = 30, .complete = 155}, }; +static const struct chan_queues da8xx_usb_queues_tx[] = { + [0 ] = { .submit =16 , .complete =24 }, + [1 ] = { .submit =18 , .complete =24 }, + [2 ] = { .submit =20 , .complete =24 }, + [3 ] = { .submit =22 , .complete =24 }, +}; + +static const struct chan_queues da8xx_usb_queues_rx[] = { + [0 ] = { .submit =1 , .complete =26 }, + [1 ] = { .submit =3 , .complete =26 }, + [2 ] = { .submit =5 , .complete =26 }, + [3 ] = { .submit =7 , .complete =26 }, +}; +struct cppi_glue_infos {irqreturn_t (*isr)(int irq,void *data);const struct chan_queues *queues_rx;
@@ -962,8 +976,18 @@ static const struct cppi_glue_infos am335x_usb_infos = { .qmgr_num_pend = 5, }; +static const struct cppi_glue_infos da8xx_usb_infos = { + .isr = cppi41_irq, + .queues_rx = da8xx_usb_queues_rx, + .queues_tx = da8xx_usb_queues_tx, + .td_queue = { .submit =31 , .complete =0 }, + .first_completion_queue =24 , + .qmgr_num_pend =2 , +}; +static const struct of_device_id cppi41_dma_ids[] = { { .compatible ="ti,am3359-cppi41" , .data = &am335x_usb_infos}, + { .compatible ="ti,da8xx-cppi41" , .data = &da8xx_usb_infos}, {}, };MODULE_DEVICE_TABLE (of, cppi41_dma_ids);
Signature · 6 lines
2.10.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html
PATCH v2 3/3 dmaengine: cppi41: Fix teardown warnings
In reply to a message not in the archiveDuring the teardown of a RX channel, because there is only one completion queue available for RX channel, descriptor of another channel may be popped which will cause 2 warnings:
- the first one because we popped a wrong descriptor
(neither the channel's descriptor, nor the teardown descriptor).
- the second one happen during the teardown of another channel, because we can't find the channel descriptor
(that is, the one that caused the first warning).
To avoid that, use one free queue instead of a transmit completion queue.
Note that fix doesn't fix all the teardown warnings:
I still get some when I run some corner case.
--- drivers/dma/cppi41.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-)
drivers/dma/cppi41.c +2 -2
@@ -630,7 +630,7 @@ static int cppi41_tear_down_chan(struct cppi41_channel *c)if (!c->is_tx) { reg |=GCR_STARV_RETRY ; reg |=GCR_DESC_TYPE_HOST ; - reg |= c->q_comp_num; + reg |= cdd->td_queue.complete; } reg |=GCR_TEARDOWN ;cppi_writel (reg, c->gcr_reg);
@@ -641,7 +641,7 @@ static int cppi41_tear_down_chan(struct cppi41_channel *c)if (!c->td_seen || !c->td_desc_seen) { desc_phys =cppi41_pop_desc (cdd, cdd->td_queue.complete); -if (!desc_phys) +if (!desc_phys && c->is_tx) desc_phys =cppi41_pop_desc (cdd, c->q_comp_num);if (desc_phys == c->desc_phys) {
Signature · 6 lines
2.10.2 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html