Skip to contentSkip to conversation

spl: mmc: Fix subsequent calls to spl_mmc_load with CONFIG_BLK

PATCH In review Sean Anderson 2 participants 2 messages Oct 8, 2023 – Oct 18, 2023

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 spl: mmc: Fix subsequent calls to spl_mmc_load with CONFIG_BLK

MMC devices do not have uclass platdata containing blk_descs, only their child block devices do. Fortunately, we have a function just for this purpose. This fixes subsequent calls to spl_mmc_load.

Fixes bf28d9a6599 ("spl: mmc: Use correct MMC device when loading image")

---

 common/spl/spl_mmc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
common/spl/spl_mmc.c +1 -1
index a665091b00f..2be991d5890 100644
@@ -396,7 +396,7 @@ static int spl_mmc_get_mmc_devnum(struct mmc *mmc)
 #if !CONFIG_IS_ENABLED(BLK)
 	block_dev = &mmc->block_dev;
 #else
-	block_dev = dev_get_uclass_plat(mmc->dev);
+	block_dev = mmc_get_blk_desc(mmc);
 #endif
 	return block_dev->devnum;
 }
Signature · 1 line
2.37.1
#1 lore raw
Quoted 5 lines · Sean Anderson

MMC devices do not have uclass platdata containing blk_descs, only their child block devices do. Fortunately, we have a function just for this purpose. This fixes subsequent calls to spl_mmc_load.

Applied to u-boot/master, thanks!

Signature · 1 line
Tom