ARM: dts: imx6: enable pl310 "shared attribute override enable" bit
Subsystems (2)
PATCH 1/1 ARM: dts: imx6: enable pl310 "shared attribute override enable" bit
The default behavior of the L220 or PL310 cache controllers with respect to the shareable attribute is to transform "normal memory non-cacheable transactions" into "cacheable no allocate" (for reads) or "write through no write allocate" (for writes).
On i.MX6 series platforms, enet/audio/usb/nand DMA buffer have corruption without CMA. So set this property "arm,shared-override" in L2 dts node to enable "shared attribute override enable" bit.
--- arch/arm/boot/dts/imx6qdl.dtsi | 1 + arch/arm/boot/dts/imx6sl.dtsi | 1 + arch/arm/boot/dts/imx6sx.dtsi | 1 + 3 files changed, 3 insertions(+)
arch/arm/boot/dts/imx6qdl.dtsi +1 -0
@@ -185,6 +185,7 @@ cache-level = <2>; arm,tag-latency = <4 2 3>; arm,data-latency = <4 2 3>; + arm,shared-override; }; pcie: pcie at 0x01000000 {
arch/arm/boot/dts/imx6sl.dtsi +1 -0
@@ -113,6 +113,7 @@ cache-level = <2>; arm,tag-latency = <4 2 3>; arm,data-latency = <4 2 3>; + arm,shared-override; }; pmu {
arch/arm/boot/dts/imx6sx.dtsi +1 -0
@@ -155,6 +155,7 @@ cache-level = <2>; arm,tag-latency = <4 2 3>; arm,data-latency = <4 2 3>; + arm,shared-override; }; dma_apbh: dma-apbh at 01804000 {
Signature · 1 line
1.9.1
PATCH 1/1 ARM: dts: imx6: enable pl310 "shared attribute override enable" bit
Hi Andy,
Quoted 8 lines · Fugang Duan
The default behavior of the L220 or PL310 cache controllers with respect to the shareable attribute is to transform "normal memory non-cacheable transactions" into "cacheable no allocate" (for reads) or "write through no write allocate" (for writes).
On i.MX6 series platforms, enet/audio/usb/nand DMA buffer have corruption without CMA. So set this property "arm,shared-override" in L2 dts node to enable "shared attribute override enable" bit.
Do you happen to know if Vybrid could also suffer this too? Some IP's are the same/similar ones...
Did this manifest in any way?
--
Stefan
Quoted 44 lines
Signed-off-by Fugang Duan <[email protected]>--- arch/arm/boot/dts/imx6qdl.dtsi | 1 + arch/arm/boot/dts/imx6sl.dtsi | 1 + arch/arm/boot/dts/imx6sx.dtsi | 1 + 3 files changed, 3 insertions(+)arch/arm/boot/dts/imx6qdl.dtsi +1
-0@@ -185,6 +185,7 @@ cache-level = <2>; arm,tag-latency = <4 2 3>; arm,data-latency = <4 2 3>; + arm,shared-override; }; pcie: pcie at 0x01000000 {arch/arm/boot/dts/imx6sl.dtsi +1
-0@@ -113,6 +113,7 @@ cache-level = <2>; arm,tag-latency = <4 2 3>; arm,data-latency = <4 2 3>; + arm,shared-override; }; pmu {arch/arm/boot/dts/imx6sx.dtsi +1
-0@@ -155,6 +155,7 @@ cache-level = <2>; arm,tag-latency = <4 2 3>; arm,data-latency = <4 2 3>; + arm,shared-override; }; dma_apbh: dma-apbh at 01804000 {
PATCH 1/1 ARM: dts: imx6: enable pl310 "shared attribute override enable" bit
Am Mittwoch, den 20.01.2016, 21:08 -0800 schrieb Stefan Agner:
Quoted 8 lines
Hi Andy,
Quoted 5 lines · Fugang Duan
The default behavior of the L220 or PL310 cache controllers with respect to the shareable attribute is to transform "normal memory non-cacheable transactions" into "cacheable no allocate" (for reads) or "write through no write allocate" (for writes).
Quoted 7 lines
Quoted 3 lines
On i.MX6 series platforms, enet/audio/usb/nand DMA buffer have corruption without CMA. So set this property "arm,shared-override" in L2 dts node to enable "shared attribute override enable" bit.
Do you happen to know if Vybrid could also suffer this too? Some IP's are the same/similar ones...
This is a bug in the default configuration of the PL310 L2 cache controller. AFAIK Vybrid does not use this IP block, so it should be safe.
Regards,
Lucas
Quoted 50 lines
Did this manifest in any way?
--
StefanQuoted 44 lines
Signed-off-by Fugang Duan <[email protected]>--- arch/arm/boot/dts/imx6qdl.dtsi | 1 + arch/arm/boot/dts/imx6sl.dtsi | 1 + arch/arm/boot/dts/imx6sx.dtsi | 1 + 3 files changed, 3 insertions(+)arch/arm/boot/dts/imx6qdl.dtsi +1
-0@@ -185,6 +185,7 @@ cache-level = <2>; arm,tag-latency = <4 2 3>; arm,data-latency = <4 2 3>; + arm,shared-override; }; pcie: pcie at 0x01000000 {arch/arm/boot/dts/imx6sl.dtsi +1
-0@@ -113,6 +113,7 @@ cache-level = <2>; arm,tag-latency = <4 2 3>; arm,data-latency = <4 2 3>; + arm,shared-override; }; pmu {arch/arm/boot/dts/imx6sx.dtsi +1
-0@@ -155,6 +155,7 @@ cache-level = <2>; arm,tag-latency = <4 2 3>; arm,data-latency = <4 2 3>; + arm,shared-override; }; dma_apbh: dma-apbh at 01804000 {
Signature · 2 lines
Pengutronix e.K. | Lucas Stach | Industrial Linux Solutions | http://www.pengutronix.de/ |
PATCH 1/1 ARM: dts: imx6: enable pl310 "shared attribute override enable" bit
Quoted 13 lines · Lucas Stach
Am Mittwoch, den 20.01.2016, 21:08 -0800 schrieb Stefan Agner:
Quoted 12 lines
Hi Andy,
Quoted 8 lines · Fugang Duan
The default behavior of the L220 or PL310 cache controllers with respect to the shareable attribute is to transform "normal memory non-cacheable transactions" into "cacheable no allocate" (for reads) or "write through no write allocate" (for writes).
On i.MX6 series platforms, enet/audio/usb/nand DMA buffer have corruption without CMA. So set this property "arm,shared-override" in L2 dts node to enable "shared attribute override enable" bit.
Quoted 6 lines
Quoted 3 lines
Do you happen to know if Vybrid could also suffer this too? Some IP's are the same/similar ones...
This is a bug in the default configuration of the PL310 L2 cache controller. AFAIK Vybrid does not use this IP block, so it should be safe.
The ones with a 1 in the second digit come with the PL310 L2 cache controller (e.g. VF610). Currently U-Boot does not touch the L2 cache controller at all, however, reading this discussion sounds like this would be a good idea in the future...
--
Stefan
Quoted 50 lines
Quoted 50 lines
Did this manifest in any way?
--
StefanQuoted 44 lines
Signed-off-by Fugang Duan <[email protected]>--- arch/arm/boot/dts/imx6qdl.dtsi | 1 + arch/arm/boot/dts/imx6sl.dtsi | 1 + arch/arm/boot/dts/imx6sx.dtsi | 1 + 3 files changed, 3 insertions(+)arch/arm/boot/dts/imx6qdl.dtsi +1
-0@@ -185,6 +185,7 @@ cache-level = <2>; arm,tag-latency = <4 2 3>; arm,data-latency = <4 2 3>; + arm,shared-override; }; pcie: pcie at 0x01000000 {arch/arm/boot/dts/imx6sl.dtsi +1
-0@@ -113,6 +113,7 @@ cache-level = <2>; arm,tag-latency = <4 2 3>; arm,data-latency = <4 2 3>; + arm,shared-override; }; pmu {arch/arm/boot/dts/imx6sx.dtsi +1
-0@@ -155,6 +155,7 @@ cache-level = <2>; arm,tag-latency = <4 2 3>; arm,data-latency = <4 2 3>; + arm,shared-override; }; dma_apbh: dma-apbh at 01804000 {
PATCH 1/1 ARM: dts: imx6: enable pl310 "shared attribute override enable" bit
In reply to Fugang DuanAm Donnerstag, den 21.01.2016, 11:28 +0800 schrieb Fugang Duan:
Quoted 9 lines
The default behavior of the L220 or PL310 cache controllers with respect to the shareable attribute is to transform "normal memory non-cacheable transactions" into "cacheable no allocate" (for reads) or "write through no write allocate" (for writes).
On i.MX6 series platforms, enet/audio/usb/nand DMA buffer have corruption without CMA. So set this property "arm,shared-override" in L2 dts node to enable "shared attribute override enable" bit.
I'm not comfortable with this change. This is something that the bootloader/firmware should configure as this will crash if kernel is booted as non-secure.
Both U-Boot and Barebox are doing this configuration.
Regards,
Lucas
Quoted 43 lines
Signed-off-by Fugang Duan <[email protected]>--- arch/arm/boot/dts/imx6qdl.dtsi | 1 + arch/arm/boot/dts/imx6sl.dtsi | 1 + arch/arm/boot/dts/imx6sx.dtsi | 1 + 3 files changed, 3 insertions(+)arch/arm/boot/dts/imx6qdl.dtsi +1
-0@@ -185,6 +185,7 @@ cache-level = <2>; arm,tag-latency = <4 2 3>; arm,data-latency = <4 2 3>; + arm,shared-override; }; pcie: pcie at 0x01000000 {arch/arm/boot/dts/imx6sl.dtsi +1
-0@@ -113,6 +113,7 @@ cache-level = <2>; arm,tag-latency = <4 2 3>; arm,data-latency = <4 2 3>; + arm,shared-override; }; pmu {arch/arm/boot/dts/imx6sx.dtsi +1
-0@@ -155,6 +155,7 @@ cache-level = <2>; arm,tag-latency = <4 2 3>; arm,data-latency = <4 2 3>; + arm,shared-override; }; dma_apbh: dma-apbh at 01804000 {
Signature · 2 lines
Pengutronix e.K. | Lucas Stach | Industrial Linux Solutions | http://www.pengutronix.de/ |