spacemit_sdhci_get_b_max() limits every SD read in the SPL to a single block, so loading a ~1 MiB u-boot.itb from a card takes about 2000 separate commands. The controller handles multi-block PIO reads in the SPL: the OrangePi RV2 has loaded U-Boot from microSD with them through the v2026.07 and v2026.10 trees.
Drop the limit and use the host's b_max. Signed-off-by: Dave Klotz <[email protected]> --- drivers/mmc/spacemit_sdhci.c | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/drivers/mmc/spacemit_sdhci.c b/drivers/mmc/spacemit_sdhci.c index bbd49b76c6..fec95e3bd7 100644 --- a/drivers/mmc/spacemit_sdhci.c +++ b/drivers/mmc/spacemit_sdhci.c @@ -324,16 +324,6 @@ static int spacemit_sdhci_wait_dat0(struct udevice *dev, int state, return 0; } -static int spacemit_sdhci_get_b_max(struct udevice *dev, void *dst, - lbaint_t blkcnt) -{ - struct mmc *mmc = mmc_get_mmc_dev(dev); - - if (IS_ENABLED(CONFIG_SPL_BUILD) && mmc && IS_SD(mmc)) - return 1; - return mmc->cfg->b_max; -} - static void spacemit_sdhci_set_control_reg(struct sdhci_host *host) { struct mmc *mmc = host->mmc; @@ -574,7 +564,6 @@ static int spacemit_sdhci_probe(struct udevice *dev) spacemit_mmc_ops = sdhci_ops; spacemit_mmc_ops.wait_dat0 = spacemit_sdhci_wait_dat0; - spacemit_mmc_ops.get_b_max = spacemit_sdhci_get_b_max; ret = clk_get_bulk(dev, &plat->clks); if (ret) { -- 2.55.0
