dm: mmc: Allow disabling driver model in SPL
At present if U-Boot proper uses driver model for MMC, then SPL has to also. While this is desirable, it places a significant barrier to moving to driver model in some cases. For example, with a space-constrained SPL it may be necessary to enable CONFIG_SPL_OF_PLATDATA which involves adjusting some drivers. Add new SPL versions of the options for DM_MMC, DM_MMC_OPS and BLK. By default these follow their non-SPL versions, but this can be changed by boards which need it. Signed-off-by: Simon Glass <sjg@chromium.org>
This commit is contained in:
committed by
Jaehoon Chung
parent
745a94f352
commit
c4d660d4d0
@@ -115,7 +115,7 @@ static int spl_mmc_get_device_index(u32 boot_device)
|
||||
|
||||
static int spl_mmc_find_device(struct mmc **mmcp, u32 boot_device)
|
||||
{
|
||||
#ifdef CONFIG_DM_MMC
|
||||
#if CONFIG_IS_ENABLED(DM_MMC)
|
||||
struct udevice *dev;
|
||||
#endif
|
||||
int err, mmc_dev;
|
||||
@@ -132,7 +132,7 @@ static int spl_mmc_find_device(struct mmc **mmcp, u32 boot_device)
|
||||
return err;
|
||||
}
|
||||
|
||||
#ifdef CONFIG_DM_MMC
|
||||
#if CONFIG_IS_ENABLED(DM_MMC)
|
||||
err = uclass_get_device(UCLASS_MMC, mmc_dev, &dev);
|
||||
if (!err)
|
||||
*mmcp = mmc_get_mmc_dev(dev);
|
||||
|
||||
Reference in New Issue
Block a user