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

Sascha Hauer s.hauer at pengutronix.de
Mon May 11 07:01:55 PDT 2026


On 2026-05-11 14:55, Ahmad Fatoum wrote:
> 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?

I don't expect much advantage from ADMA for drivers that do not need it.
The advantage is that ADMA can do scatter gather DMA, but we don't make
use of it in barebox.

I'd rather leave it opt-in for now at least for a few rounds.

Sascha

--
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