diff options
author | Jaehoon Chung <jh80.chung@samsung.com> | 2020-01-17 15:06:54 +0900 |
---|---|---|
committer | Peng Fan <peng.fan@nxp.com> | 2020-02-17 14:55:04 +0800 |
commit | 4af6659605abd707da3acc9ea525514e999b7aef (patch) | |
tree | 3a08fba574dab681e8a05d0be0b84a642231afc6 /drivers/mmc | |
parent | ae93d8106bdb5926efef9222d553adb295ebce96 (diff) | |
download | u-boot-4af6659605abd707da3acc9ea525514e999b7aef.tar.gz u-boot-4af6659605abd707da3acc9ea525514e999b7aef.tar.xz u-boot-4af6659605abd707da3acc9ea525514e999b7aef.zip |
mmc: fix the build error when MMC_WRITE is disabled
erase_grp_size is used, when MMC_WRITE is enabled.
- error: ‘struct mmc’ has no member named ‘erase_grp_size’
Signed-off-by: Jaehoon Chung <jh80.chung@samsung.com>
Reviewed-by: Peng Fan <peng.fan@nxp.com>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/mmc.c | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index d43983d4a6..6a2b855435 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -1126,9 +1126,11 @@ int mmc_hwpart_config(struct mmc *mmc, ext_csd[EXT_CSD_ERASE_GROUP_DEF] = 1; +#if CONFIG_IS_ENABLED(MMC_WRITE) /* update erase group size to be high-capacity */ mmc->erase_grp_size = ext_csd[EXT_CSD_HC_ERASE_GRP_SIZE] * 1024; +#endif } |