[PATCH 06/10] mci: rockchip-dwcmshc-sdhci: use ADMA2

Ahmad Fatoum a.fatoum at pengutronix.de
Mon May 11 05:55:00 PDT 2026


Hello Sascha,

On 5/11/26 2:08 PM, Sascha Hauer wrote:
> The SDMA engine doesn't seem to be fast enough to keep up with HS400
> support. In preparation to add HS400 support to the driver switch to
> ADMA when available.
> 
> Assisted-by: Claude Opus 4.7 <noreply at anthropic.com>
> Signed-off-by: Sascha Hauer <s.hauer at pengutronix.de>
> ---
>  drivers/mci/rockchip-dwcmshc-sdhci.c | 5 +++++
>  1 file changed, 5 insertions(+)
> 
> diff --git a/drivers/mci/rockchip-dwcmshc-sdhci.c b/drivers/mci/rockchip-dwcmshc-sdhci.c
> index 04ee528f07..23c887e906 100644
> --- a/drivers/mci/rockchip-dwcmshc-sdhci.c
> +++ b/drivers/mci/rockchip-dwcmshc-sdhci.c
> @@ -361,6 +361,11 @@ static int rk_sdhci_probe(struct device *dev)
>  
>  	sdhci_setup_host(&host->sdhci);
>  
> +	ret = sdhci_setup_adma(&host->sdhci);
> +	if (ret && ret != -ENOTSUPP)
> +		dev_warn(dev, "ADMA setup failed (%pe), falling back to SDMA\n",
> +			 ERR_PTR(ret));

As transparent fallback is implemented, could this be folded into
sdhci_setup_host, so it's opt-out instead of opt-in?

Opt-out could be setting SDHCI_QUIRK_BROKEN_ADMA.

Cheers,
Ahmad

> +
>  	dev->priv = host;
>  
>  	return mci_register(&host->mci);
> 

-- 
Pengutronix e.K.                  |                             |
Steuerwalder Str. 21              | http://www.pengutronix.de/  |
31137 Hildesheim, Germany         | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686  | Fax:   +49-5121-206917-5555 |




More information about the barebox mailing list