Skip to contentSkip to conversation

rockchip: px30: enable fifo mode for both emmc and sdmmc on evb

PATCH New Heiko Stuebner 2 participants 2 messages Nov 19, 2019 Arm (32-bit)

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 rockchip: px30: enable fifo mode for both emmc and sdmmc on evb

From: Heiko Stuebner <[email protected]>

As part of loading trustedfirmware, the SPL is required to place portions of code into the socs sram but the mmc controllers can only do dma transfers into the regular memory, not sram.

The results of this are not directly visible in u-boot itself, but manifest as security-relate cpu aborts during boot of for example Linux.

There were a number of attempts to solve this elegantly but so far discussion is still ongoing, so to make the board at least boot correctly put both mmc controllers into fifo-mode, which also circumvents the issue for now.

---
 arch/arm/dts/px30-evb-u-boot.dtsi | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm/dts/px30-evb-u-boot.dtsi +4 -1
index 3de9c7068e..27b8364e6c 100644
@@ -31,12 +31,15 @@
 &sdmmc {
 	u-boot,dm-pre-reloc;
 
-	/* temporary till I find out why dma mode doesn't work */
+	/* mmc to sram can't do dma, prevent aborts transfering TF-A parts */
 	fifo-mode;
 };
 
 &emmc {
 	u-boot,dm-pre-reloc;
+
+	/* mmc to sram can't do dma, prevent aborts transfering TF-A parts */
+	fifo-mode;
 };
 
 &grf {
Signature · 1 line
2.24.0
#1 lore raw

PATCH 1/1 rockchip: px30: enable fifo mode for both emmc and sdmmc on evb

Heiko,

Quoted 26 lines · Heiko Stuebner

From: Heiko Stuebner <[email protected]>

As part of loading trustedfirmware, the SPL is required to place portions of code into the socs sram but the mmc controllers can only do dma transfers into the regular memory, not sram.

The results of this are not directly visible in u-boot itself, but manifest as security-relate cpu aborts during boot of for example Linux.

There were a number of attempts to solve this elegantly but so far discussion is still ongoing, so to make the board at least boot correctly put both mmc controllers into fifo-mode, which also circumvents the issue for now.

---
arch/arm/dts/px30-evb-u-boot.dtsi | 5 ++++-

1 file changed, 4 insertions(+), 1 deletion(-)
arch/arm/dts/px30-evb-u-boot.dtsi +0 -0
index 3de9c7068e..27b8364e6c 100644

arch/arm/dts/px30-evb-u-boot.dtsi line 35

Quoted 6 lines
arch/arm/dts/px30-evb-u-boot.dtsi +1 -1
@@ -31,12 +31,15 @@
 &sdmmc {
 	u-boot,dm-pre-reloc;
 
-	/* temporary till I find out why dma mode doesn't work */
+	/* mmc to sram can't do dma, prevent aborts transfering TF-A parts */
 	fifo-mode;

Could you add a u-boot,spl-fifo-mode property to the driver? Otherwise we force the controllers back to fifo-mode even for full U-Boot with the associated performance impact.

Thanks,
Philipp.

Quoted 13 lines
arch/arm/dts/px30-evb-u-boot.dtsi +3 -0
 };
 
 &emmc {
 	u-boot,dm-pre-reloc;
+
+	/* mmc to sram can't do dma, prevent aborts transfering TF-A parts */
+	fifo-mode;
 };
 
 &grf {
Signature · 1 line
2.24.0