Skip to contentSkip to conversation

ARM: dts: imx6qdl: Specify IMX6QDL_CLK_IPG as "ipg" clock to SDMA

PATCH Applied Andrey Smirnov 3 participants 13 messages Mar 29, 2019 – Apr 20, 2019

Subsystems (2)
lore
Share & tools
lore
#0 lore raw

PATCH v3 1/9 ARM: dts: imx6qdl: Specify IMX6QDL_CLK_IPG as "ipg" clock to SDMA

Since 25aaa75df1e6 SDMA driver uses clock rates of "ipg" and "ahb" clock to determine if it needs to configure the IP block as operating at 1:1 or 1:2 clock ratio (ACR bit in SDMAARM_CONFIG). Specifying both clocks as IMX6QDL_CLK_SDMA results in driver incorrectly thinking that ratio is 1:1 which results in broken SDMA funtionality(this at least breaks RAVE SP serdev driver on RDU2). Fix the code to specify IMX6QDL_CLK_IPG as "ipg" clock for SDMA, to avoid detecting incorrect clock ratio.

Fixes 25aaa75df1e6 ("dmaengine: imx-sdma: add clock ratio 1:1 check")
Cc Angus Ainslie (Purism) <[email protected]>
Cc Chris Healy <[email protected]>
Cc Lucas Stach <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Shawn Guo <[email protected]>
---
 arch/arm/boot/dts/imx6qdl.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6qdl.dtsi +1 -1
index 9f9aa6e7ed0e..354feba077b2 100644
@@ -949,7 +949,7 @@
 				compatible = "fsl,imx6q-sdma", "fsl,imx35-sdma";
 				reg = <0x020ec000 0x4000>;
 				interrupts = <0 2 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clks IMX6QDL_CLK_SDMA>,
+				clocks = <&clks IMX6QDL_CLK_IPG>,
 					 <&clks IMX6QDL_CLK_SDMA>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
Signature · 1 line
2.20.1
#1 lore raw

PATCH v3 2/9 ARM: dts: imx6sx: Specify IMX6SX_CLK_IPG as "ipg" clock to SDMA

Since 25aaa75df1e6 SDMA driver uses clock rates of "ipg" and "ahb" clock to determine if it needs to configure the IP block as operating at 1:1 or 1:2 clock ratio (ACR bit in SDMAARM_CONFIG). Specifying both clocks as IMX6SX_CLK_SDMA results in driver incorrectly thinking that ratio is 1:1 which results in broken SDMA funtionality. Fix the code to specify IMX6SX_CLK_IPG as "ipg" clock for SDMA, to avoid detecting incorrect clock ratio.

Fixes 25aaa75df1e6 ("dmaengine: imx-sdma: add clock ratio 1:1 check")
Cc Angus Ainslie (Purism) <[email protected]>
Cc Chris Healy <[email protected]>
Cc Lucas Stach <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Shawn Guo <[email protected]>
---
 arch/arm/boot/dts/imx6sx.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6sx.dtsi +1 -1
index df0c59519886..b16a123990a2 100644
@@ -820,7 +820,7 @@
 				compatible = "fsl,imx6sx-sdma", "fsl,imx6q-sdma";
 				reg = <0x020ec000 0x4000>;
 				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clks IMX6SX_CLK_SDMA>,
+				clocks = <&clks IMX6SX_CLK_IPG>,
 					 <&clks IMX6SX_CLK_SDMA>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
Signature · 7 lines
2.20.1


_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel
#2 lore raw

PATCH v3 3/9 ARM: dts: imx7d: Specify IMX7D_CLK_IPG as "ipg" clock to SDMA

In reply to Andrey Smirnov

Since 25aaa75df1e6 SDMA driver uses clock rates of "ipg" and "ahb" clock to determine if it needs to configure the IP block as operating at 1:1 or 1:2 clock ratio (ACR bit in SDMAARM_CONFIG). Specifying both clocks as IMX7D_CLK_SDMA results in driver incorrectly thinking that ratio is 1:1 which results in broken SDMA funtionality. Fix the code to specify IMX7D_CLK_IPG as "ipg" clock for SDMA, to avoid detecting incorrect clock ratio.

Fixes 25aaa75df1e6 ("dmaengine: imx-sdma: add clock ratio 1:1 check")
Cc Angus Ainslie (Purism) <[email protected]>
Cc Chris Healy <[email protected]>
Cc Lucas Stach <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Shawn Guo <[email protected]>
---
 arch/arm/boot/dts/imx7s.dtsi | 4 ++--
 1 file changed, 2 insertions(+), 2 deletions(-)
arch/arm/boot/dts/imx7s.dtsi +2 -2
index e67c8dd4bdab..31c610e6c788 100644
@@ -1071,8 +1071,8 @@
 				compatible = "fsl,imx7d-sdma", "fsl,imx35-sdma";
 				reg = <0x30bd0000 0x10000>;
 				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clks IMX7D_SDMA_CORE_CLK>,
-					 <&clks IMX7D_AHB_CHANNEL_ROOT_CLK>;
+				clocks = <&clks IMX7D_IPG_ROOT_CLK>,
+					 <&clks IMX7D_SDMA_CORE_CLK>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
 				fsl,sdma-ram-script-name = "imx/sdma/sdma-imx7d.bin";
Signature · 1 line
2.20.1
#3 lore raw

PATCH v3 4/9 ARM: dts: imx6ul: Specify IMX6UL_CLK_IPG as "ipg" clock to SDMA

In reply to Andrey Smirnov

Since 25aaa75df1e6 SDMA driver uses clock rates of "ipg" and "ahb" clock to determine if it needs to configure the IP block as operating at 1:1 or 1:2 clock ratio (ACR bit in SDMAARM_CONFIG). Specifying both clocks as IMX6UL_CLK_SDMA results in driver incorrectly thinking that ratio is 1:1 which results in broken SDMA funtionality. Fix the code to specify IMX6UL_CLK_IPG as "ipg" clock for SDMA, to avoid detecting incorrect clock ratio.

Fixes 25aaa75df1e6 ("dmaengine: imx-sdma: add clock ratio 1:1 check")
Cc Angus Ainslie (Purism) <[email protected]>
Cc Chris Healy <[email protected]>
Cc Lucas Stach <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Shawn Guo <[email protected]>
---
 arch/arm/boot/dts/imx6ul.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6ul.dtsi +1 -1
index a77bbcae4571..bbf010c73336 100644
@@ -708,7 +708,7 @@
 					     "fsl,imx35-sdma";
 				reg = <0x020ec000 0x4000>;
 				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clks IMX6UL_CLK_SDMA>,
+				clocks = <&clks IMX6UL_CLK_IPG>,
 					 <&clks IMX6UL_CLK_SDMA>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
Signature · 1 line
2.20.1
#4 lore raw

PATCH v3 5/9 ARM: dts: imx6sll: Specify IMX6SLL_CLK_IPG as "ipg" clock to SDMA

In reply to Andrey Smirnov

Since 25aaa75df1e6 SDMA driver uses clock rates of "ipg" and "ahb" clock to determine if it needs to configure the IP block as operating at 1:1 or 1:2 clock ratio (ACR bit in SDMAARM_CONFIG). Specifying both clocks as IMX6SLL_CLK_SDMA result in driver incorrectly thinking that ratio is 1:1 which results in broken SDMA funtionality. Fix the code to specify IMX6SLL_CLK_IPG as "ipg" clock for SDMA, to avoid detecting incorrect clock ratio.

Fixes 25aaa75df1e6 ("dmaengine: imx-sdma: add clock ratio 1:1 check")
Cc Angus Ainslie (Purism) <[email protected]>
Cc Chris Healy <[email protected]>
Cc Lucas Stach <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Shawn Guo <[email protected]>
---
 arch/arm/boot/dts/imx6sll.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6sll.dtsi +1 -1
index 62847c68330b..ed598d72038c 100644
@@ -621,7 +621,7 @@
 				compatible = "fsl,imx6sll-sdma", "fsl,imx35-sdma";
 				reg = <0x020ec000 0x4000>;
 				interrupts = <GIC_SPI 2 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clks IMX6SLL_CLK_SDMA>,
+				clocks = <&clks IMX6SLL_CLK_IPG>,
 					 <&clks IMX6SLL_CLK_SDMA>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
Signature · 1 line
2.20.1
#5 lore raw

PATCH v3 6/9 ARM: dts: imx6sx: Specify IMX6SX_CLK_IPG as "ahb" clock to SDMA

In reply to Andrey Smirnov

Since 25aaa75df1e6 SDMA driver uses clock rates of "ipg" and "ahb" clock to determine if it needs to configure the IP block as operating at 1:1 or 1:2 clock ratio (ACR bit in SDMAARM_CONFIG). Specifying both clocks as IMX6SL_CLK_SDMA results in driver incorrectly thinking that ratio is 1:1 which results in broken SDMA funtionality. Fix the code to specify IMX6SL_CLK_AHB as "ahb" clock for SDMA, to avoid detecting incorrect clock ratio.

Fixes 25aaa75df1e6 ("dmaengine: imx-sdma: add clock ratio 1:1 check")
Cc Angus Ainslie (Purism) <[email protected]>
Cc Chris Healy <[email protected]>
Cc Lucas Stach <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Shawn Guo <[email protected]>
---
 arch/arm/boot/dts/imx6sl.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6sl.dtsi +1 -1
index 0ad5d507abec..9ddbeea64b72 100644
@@ -748,7 +748,7 @@
 				reg = <0x020ec000 0x4000>;
 				interrupts = <0 2 IRQ_TYPE_LEVEL_HIGH>;
 				clocks = <&clks IMX6SL_CLK_SDMA>,
-					 <&clks IMX6SL_CLK_SDMA>;
+					 <&clks IMX6SL_CLK_AHB>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
 				/* imx6sl reuses imx6q sdma firmware */
Signature · 1 line
2.20.1
#6 lore raw

PATCH v3 7/9 ARM: dts: imx53: Specify IMX5_CLK_IPG as "ahb" clock to SDMA

In reply to Andrey Smirnov

Since 25aaa75df1e6 SDMA driver uses clock rates of "ipg" and "ahb" clock to determine if it needs to configure the IP block as operating at 1:1 or 1:2 clock ratio (ACR bit in SDMAARM_CONFIG). Specifying both clocks as IMX5_CLK_SDMA results in driver incorrectly thinking that ratio is 1:1 which results in broken SDMA funtionality. Fix the code to specify IMX5_CLK_AHB as "ahb" clock for SDMA, to avoid detecting incorrect clock ratio.

Fixes 25aaa75df1e6 ("dmaengine: imx-sdma: add clock ratio 1:1 check")
Cc Angus Ainslie (Purism) <[email protected]>
Cc Chris Healy <[email protected]>
Cc Lucas Stach <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Shawn Guo <[email protected]>
---
 arch/arm/boot/dts/imx53.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx53.dtsi +1 -1
index b3300300aabe..9b672ed2486d 100644
@@ -702,7 +702,7 @@
 				reg = <0x63fb0000 0x4000>;
 				interrupts = <6>;
 				clocks = <&clks IMX5_CLK_SDMA_GATE>,
-					 <&clks IMX5_CLK_SDMA_GATE>;
+					 <&clks IMX5_CLK_AHB>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
 				fsl,sdma-ram-script-name = "imx/sdma/sdma-imx53.bin";
Signature · 1 line
2.20.1
#7 lore raw

PATCH v3 8/9 ARM: dts: imx51: Specify IMX5_CLK_IPG as "ahb" clock to SDMA

In reply to Andrey Smirnov

Since 25aaa75df1e6 SDMA driver uses clock rates of "ipg" and "ahb" clock to determine if it needs to configure the IP block as operating at 1:1 or 1:2 clock ratio (ACR bit in SDMAARM_CONFIG). Specifying both clocks as IMX5_CLK_SDMA results in driver incorrectly thinking that ratio is 1:1 which results in broken SDMA funtionality. Fix the code to specify IMX5_CLK_AHB as "ahb" clock for SDMA, to avoid detecting incorrect clock ratio.

Fixes 25aaa75df1e6 ("dmaengine: imx-sdma: add clock ratio 1:1 check")
Cc Angus Ainslie (Purism) <[email protected]>
Cc Chris Healy <[email protected]>
Cc Lucas Stach <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Shawn Guo <[email protected]>
---
 arch/arm/boot/dts/imx51.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx51.dtsi +1 -1
index 0b28b68a17bb..e3fa3d213cd8 100644
@@ -502,7 +502,7 @@
 				reg = <0x83fb0000 0x4000>;
 				interrupts = <6>;
 				clocks = <&clks IMX5_CLK_SDMA_GATE>,
-					 <&clks IMX5_CLK_SDMA_GATE>;
+					 <&clks IMX5_CLK_AHB>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
 				fsl,sdma-ram-script-name = "imx/sdma/sdma-imx51.bin";
Signature · 1 line
2.20.1
#8 lore raw

PATCH v3 9/9 ARM: dts: imx50: Specify IMX5_CLK_IPG as "ahb" clock to SDMA

In reply to Andrey Smirnov

Since 25aaa75df1e6 SDMA driver uses clock rates of "ipg" and "ahb" clock to determine if it needs to configure the IP block as operating at 1:1 or 1:2 clock ratio (ACR bit in SDMAARM_CONFIG). Specifying both clocks as IMX5_CLK_SDMA results in driver incorrectly thinking that ratio is 1:1 which results in broken SDMA funtionality. Fix the code to specify IMX5_CLK_AHB as "ahb" clock for SDMA, to avoid detecting incorrect clock ratio.

Fixes 25aaa75df1e6 ("dmaengine: imx-sdma: add clock ratio 1:1 check")
Cc Angus Ainslie (Purism) <[email protected]>
Cc Chris Healy <[email protected]>
Cc Lucas Stach <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Shawn Guo <[email protected]>
---
 arch/arm/boot/dts/imx50.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx50.dtsi +1 -1
index 5dd61bff3b76..0bfe7c91d0eb 100644
@@ -430,7 +430,7 @@
 				reg = <0x63fb0000 0x4000>;
 				interrupts = <6>;
 				clocks = <&clks IMX5_CLK_SDMA_GATE>,
-					 <&clks IMX5_CLK_SDMA_GATE>;
+					 <&clks IMX5_CLK_AHB>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
 				fsl,sdma-ram-script-name = "imx/sdma/sdma-imx50.bin";
Signature · 1 line
2.20.1
Tested-by on v3 1/9
#9 lore raw
In reply to Andrey Smirnov
Quoted 10 lines · Andrey Smirnov

Since 25aaa75df1e6 SDMA driver uses clock rates of "ipg" and "ahb" clock to determine if it needs to configure the IP block as operating at 1:1 or 1:2 clock ratio (ACR bit in SDMAARM_CONFIG). Specifying both clocks as IMX6QDL_CLK_SDMA results in driver incorrectly thinking that ratio is 1:1 which results in broken SDMA funtionality(this at least breaks RAVE SP serdev driver on RDU2). Fix the code to specify IMX6QDL_CLK_IPG as "ipg" clock for SDMA, to avoid detecting incorrect clock ratio.

Thank you for this! I the 5.1 kernel is the first revision to include the i.MX6 kit from Logic PD and I thought I messed something up, so I was off in a completely different direction trying to figure out why it was broken. With your patch, my board works again!

Quoted 3 lines
Fixes 25aaa75df1e6 ("dmaengine: imx-sdma: add clock ratio 1:1 check")
Quoted 32 lines
Cc Angus Ainslie (Purism) <[email protected]>
Cc Chris Healy <[email protected]>
Cc Lucas Stach <[email protected]>
Cc Fabio Estevam <[email protected]>
Cc Shawn Guo <[email protected]>
---
 arch/arm/boot/dts/imx6qdl.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6qdl.dtsi +1 -2
index 9f9aa6e7ed0e..354feba077b2 100644
@@ -949,7 +949,7 @@
                                compatible = "fsl,imx6q-sdma", "fsl,imx35-sdma";
                                reg = <0x020ec000 0x4000>;
                                interrupts = <0 2 IRQ_TYPE_LEVEL_HIGH>;
-                               clocks = <&clks IMX6QDL_CLK_SDMA>,
+                               clocks = <&clks IMX6QDL_CLK_IPG>,
                                         <&clks IMX6QDL_CLK_SDMA>;
                                clock-names = "ipg", "ahb";
                                #dma-cells = <3>;
--

2.20.1

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

Applied
#10 lore raw
In reply to Andrey Smirnov
Quoted 10 lines · Andrey Smirnov

Since 25aaa75df1e6 SDMA driver uses clock rates of "ipg" and "ahb" clock to determine if it needs to configure the IP block as operating at 1:1 or 1:2 clock ratio (ACR bit in SDMAARM_CONFIG). Specifying both clocks as IMX6QDL_CLK_SDMA results in driver incorrectly thinking that ratio is 1:1 which results in broken SDMA funtionality(this at least breaks RAVE SP serdev driver on RDU2). Fix the code to specify IMX6QDL_CLK_IPG as "ipg" clock for SDMA, to avoid detecting incorrect clock ratio.

Fixes 25aaa75df1e6 ("dmaengine: imx-sdma: add clock ratio 1:1 check")

Since we have a fix in the dma driver, I dropped the Fixes tag here.

Applied all, thanks.

Shawn

Quoted 29 lines
---
 arch/arm/boot/dts/imx6qdl.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6qdl.dtsi +1 -1
index 9f9aa6e7ed0e..354feba077b2 100644
@@ -949,7 +949,7 @@
 				compatible = "fsl,imx6q-sdma", "fsl,imx35-sdma";
 				reg = <0x020ec000 0x4000>;
 				interrupts = <0 2 IRQ_TYPE_LEVEL_HIGH>;
-				clocks = <&clks IMX6QDL_CLK_SDMA>,
+				clocks = <&clks IMX6QDL_CLK_IPG>,
 					 <&clks IMX6QDL_CLK_SDMA>;
 				clock-names = "ipg", "ahb";
 				#dma-cells = <3>;
Signature · 1 line
2.20.1
#11 lore raw
Quoted 11 lines · Shawn Guo
Quoted 9 lines · Andrey Smirnov

Since 25aaa75df1e6 SDMA driver uses clock rates of "ipg" and "ahb" clock to determine if it needs to configure the IP block as operating at 1:1 or 1:2 clock ratio (ACR bit in SDMAARM_CONFIG). Specifying both clocks as IMX6QDL_CLK_SDMA results in driver incorrectly thinking that ratio is 1:1 which results in broken SDMA funtionality(this at least breaks RAVE SP serdev driver on RDU2). Fix the code to specify IMX6QDL_CLK_IPG as "ipg" clock for SDMA, to avoid detecting incorrect clock ratio.

Quoted 5 lines
Quoted 1 line
Fixes 25aaa75df1e6 ("dmaengine: imx-sdma: add clock ratio 1:1 check")

Since we have a fix in the dma driver, I dropped the Fixes tag here.

Applied all, thanks.

Do you know if the SDMA fixes will be back-ported to 5.0.y branch? To get 5.0 working, I need to manually apply the patches.

thanks

adam

Quoted 37 lines

Shawn

Quoted 27 lines
---
 arch/arm/boot/dts/imx6qdl.dtsi | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
arch/arm/boot/dts/imx6qdl.dtsi +1 -2
index 9f9aa6e7ed0e..354feba077b2 100644
@@ -949,7 +949,7 @@
                              compatible = "fsl,imx6q-sdma", "fsl,imx35-sdma";
                              reg = <0x020ec000 0x4000>;
                              interrupts = <0 2 IRQ_TYPE_LEVEL_HIGH>;
-                             clocks = <&clks IMX6QDL_CLK_SDMA>,
+                             clocks = <&clks IMX6QDL_CLK_IPG>,
                                       <&clks IMX6QDL_CLK_SDMA>;
                              clock-names = "ipg", "ahb";
                              #dma-cells = <3>;
--
Quoted 2 lines

2.20.1

_______________________________________________
linux-arm-kernel mailing list
[email protected]
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

#12 lore raw
Quoted 12 lines · Adam Ford
Quoted 11 lines · Shawn Guo
Quoted 9 lines · Andrey Smirnov

Since 25aaa75df1e6 SDMA driver uses clock rates of "ipg" and "ahb" clock to determine if it needs to configure the IP block as operating at 1:1 or 1:2 clock ratio (ACR bit in SDMAARM_CONFIG). Specifying both clocks as IMX6QDL_CLK_SDMA results in driver incorrectly thinking that ratio is 1:1 which results in broken SDMA funtionality(this at least breaks RAVE SP serdev driver on RDU2). Fix the code to specify IMX6QDL_CLK_IPG as "ipg" clock for SDMA, to avoid detecting incorrect clock ratio.

Quoted 8 lines
Quoted 5 lines
Quoted 1 line
Fixes 25aaa75df1e6 ("dmaengine: imx-sdma: add clock ratio 1:1 check")

Since we have a fix in the dma driver, I dropped the Fixes tag here.

Applied all, thanks.

Do you know if the SDMA fixes will be back-ported to 5.0.y branch? To get 5.0 working, I need to manually apply the patches.

I'm confused here. The regression was caused by 25aaa75df1e6 ("dmaengine: imx-sdma: add clock ratio 1:1 check"), which only lands on mainline with v5.1-rc1. How would 5.0.y branch need fixing?

Shawn