From: Sascha Silbe <[email protected]>
The Marvell SDIO host controller can transmit Erase commands to the card quite
fine.
Signed-off-by: Sascha Silbe <[email protected]>
---
drivers/mmc/host/mvsdio.c | 3 ++-
1 files changed, 2 insertions(+), 1 deletions(-)
Tested on OpenRD-Base using a SanDisk 4GB class 4 card (retail). The
BLKDISCARD ioctl returned immediately, no timeout issue encountered.
I had to remove and reinsert the card to read the new (i.e. erased) data, but
that's most likely either by design or a bug on a different layer.
diff --git a/drivers/mmc/host/mvsdio.c b/drivers/mmc/host/mvsdio.c
index eeb1147..758251d 100644
--- a/drivers/mmc/host/mvsdio.c
+++ b/drivers/mmc/host/mvsdio.c
@@ -735,7 +735,8 @@ static int __init mvsd_probe(struct platform_device *pdev)
mmc->ocr_avail = MMC_VDD_32_33 | MMC_VDD_33_34;
mmc->caps = MMC_CAP_4_BIT_DATA | MMC_CAP_SDIO_IRQ |
- MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED;
+ MMC_CAP_SD_HIGHSPEED | MMC_CAP_MMC_HIGHSPEED |
+ MMC_CAP_ERASE;
mmc->f_min = DIV_ROUND_UP(host->base_clock, MVSD_BASE_DIV_MAX);
mmc->f_max = maxfreq;
--
1.7.4.1