diff options
author | Simon Glass <sjg@chromium.org> | 2016-10-01 14:43:17 -0600 |
---|---|---|
committer | sjg <sjg@chromium.org> | 2016-10-09 21:36:27 -0600 |
commit | 561e624c350ee5c281da46d23aee70b0523d4d39 (patch) | |
tree | 90b951a068b0d3282f24acf70428a85e944ae2a4 /drivers/mmc/mmc_write.c | |
parent | d5fe013ceefe72466f192fd17f1dae8ce29684ef (diff) | |
download | u-boot-561e624c350ee5c281da46d23aee70b0523d4d39.tar.gz |
dm: mmc: Support erase
At present erase is not suported with CONFIG_DM_OPS. Add it so that MMC
devices can be erased.
Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'drivers/mmc/mmc_write.c')
-rw-r--r-- | drivers/mmc/mmc_write.c | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/drivers/mmc/mmc_write.c b/drivers/mmc/mmc_write.c index 2289640375..54acbf7336 100644 --- a/drivers/mmc/mmc_write.c +++ b/drivers/mmc/mmc_write.c @@ -66,9 +66,15 @@ err_out: return err; } -unsigned long mmc_berase(struct blk_desc *block_dev, lbaint_t start, - lbaint_t blkcnt) +#ifdef CONFIG_BLK +ulong mmc_berase(struct udevice *dev, lbaint_t start, lbaint_t blkcnt) +#else +ulong mmc_berase(struct blk_desc *block_dev, lbaint_t start, lbaint_t blkcnt) +#endif { +#ifdef CONFIG_BLK + struct blk_desc *block_dev = dev_get_uclass_platdata(dev); +#endif int dev_num = block_dev->devnum; int err = 0; u32 start_rem, blkcnt_rem; |