| Message ID | a93aa8e53d5ebf81a61be873d935c4e37cf5179c.1790975596.git.DaveWK225@protonmail.com |
|---|---|
| State | Superseded |
| Delegated to: | Tim Ouyang |
| Headers | show |
| Series | mmc: k1: fixes for the SpacemiT K1 SDHCI driver | expand |
On 03-10-2026 02:59, Dave Klotz wrote: > 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 <DaveWK225@protonmail.com> Reviewed-by: Tanmay Kathpalia <tanmay.kathpalia@altera.com>
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) {
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 <DaveWK225@protonmail.com> --- drivers/mmc/spacemit_sdhci.c | 11 ----------- 1 file changed, 11 deletions(-)