diff options
author | Simon Glass <sjg@chromium.org> | 2017-07-04 13:31:19 -0600 |
---|---|---|
committer | Jaehoon Chung <jh80.chung@samsung.com> | 2017-08-01 11:58:00 +0900 |
commit | c4d660d4d0abcde0fdbcee8401b215fc2b56d7aa (patch) | |
tree | 4cde2f77de3c28d2462e3ec42ba9e2d85bc42d30 /drivers/mmc/mmc-uclass.c | |
parent | 745a94f352b8f6f05e038110d3ce44d211bf31f3 (diff) | |
download | u-boot-c4d660d4d0abcde0fdbcee8401b215fc2b56d7aa.zip u-boot-c4d660d4d0abcde0fdbcee8401b215fc2b56d7aa.tar.gz u-boot-c4d660d4d0abcde0fdbcee8401b215fc2b56d7aa.tar.bz2 |
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>
Diffstat (limited to 'drivers/mmc/mmc-uclass.c')
-rw-r--r-- | drivers/mmc/mmc-uclass.c | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/drivers/mmc/mmc-uclass.c b/drivers/mmc/mmc-uclass.c index 994d268..3e90725 100644 --- a/drivers/mmc/mmc-uclass.c +++ b/drivers/mmc/mmc-uclass.c @@ -15,7 +15,7 @@ DECLARE_GLOBAL_DATA_PTR; -#ifdef CONFIG_DM_MMC_OPS +#if CONFIG_IS_ENABLED(DM_MMC_OPS) int dm_mmc_send_cmd(struct udevice *dev, struct mmc_cmd *cmd, struct mmc_data *data) { @@ -91,7 +91,7 @@ struct mmc *mmc_get_mmc_dev(struct udevice *dev) return upriv->mmc; } -#ifdef CONFIG_BLK +#if CONFIG_IS_ENABLED(BLK) struct mmc *find_mmc_device(int dev_num) { struct udevice *dev, *mmc_dev; @@ -198,7 +198,7 @@ int mmc_bind(struct udevice *dev, struct mmc *mmc, const struct mmc_config *cfg) struct udevice *bdev; int ret, devnum = -1; -#ifdef CONFIG_DM_MMC_OPS +#if CONFIG_IS_ENABLED(DM_MMC_OPS) if (!mmc_get_ops(dev)) return -ENOSYS; #endif |