[PATCH 0/3] Support SDMA mode on RPI4 target - 32bit

Matthias Brugger matthias.bgg at gmail.com
Thu Jan 30 12:24:49 CET 2020



On 23/01/2020 00:15, Jaehoon Chung wrote:
> RPI4's SDHCI controller is supported SDMA mode. (Checked on kernel side)
> But It doesn't use on u-boot side. Then it's too slow about read/write performance.
> This patchset is supported SDMA mode on RPI4 target(32bit).
> - I didn't test on RPI4 64bit.

I tested it on RPi4 64bit:
diff --git a/configs/rpi_4_defconfig b/configs/rpi_4_defconfig
index 17ecad3aa5..6f5a2dd6e8 100644
--- a/configs/rpi_4_defconfig
+++ b/configs/rpi_4_defconfig
@@ -26,6 +26,7 @@ CONFIG_DFU_MMC=y
 CONFIG_DM_KEYBOARD=y
 CONFIG_DM_MMC=y
 CONFIG_MMC_SDHCI=y
+CONFIG_MMC_SDHCI_SDMA=y
 CONFIG_MMC_SDHCI_BCM2835=y
 CONFIG_DM_ETH=y
 CONFIG_BCMGENET=y

Changed the debug to a printf and gave it a try:
U-Boot 2020.04-rc1-00010-ga963cbc9e0-dirty (Jan 30 2020 - 12:18:02 +0100)

DRAM:  1.9 GiB
RPI 4 Model B (0xb03111)
MMC:   sdhci_setup_cfg: Your controller doesn't support SDMA!!
emmc2 at 7e340000: 0, mmcnr at 7e300000: 1

That's at least surprising. Any idea why it should be supported on 32 bit but
not on 64 bit?
Or did you add DTS properties to enable SDMA?

Regards,
Matthias

> 
> Read/write time about 8MB file
> Before
> - Read : 1.472 seconds
> - Write : 4.690 seconds
> After
> - Read : 0.359 seconds
> - Write : 0.574 seconds
> 
> This patch is based on my RFC's patches.
> 
> Jaehoon Chung (3):
>   mmc: sdhci: use phys2bus macro when dma address is accessed
>   mmc: sdhci: not return error when SDMA is not supported
>   configs: rpi_4_32b_defconfig: enable SDHCI_SDMA config
> 
>  configs/rpi_4_32b_defconfig |  1 +
>  drivers/mmc/sdhci.c         | 16 +++++++++-------
>  2 files changed, 10 insertions(+), 7 deletions(-)
> 


More information about the U-Boot mailing list