mbox series

[0/6] mmc_spi: mmc erase resolve

Message ID 20200629094730.10051-1-pragnesh.patel@sifive.com
Headers show
Series mmc_spi: mmc erase resolve | expand


Pragnesh Patel June 29, 2020, 9:47 a.m. UTC
Earlier "mmc erase " command reorts Ok but not actually erase the contents
of some SD cards. This series will resolve this issue.

There is still 1 limitation for some SDHC mmc_spi cards:
"mmc erase *blk#* cnt" can not erase only 1 block that means:

=> mmc erase 0x22 1

will not erase the contents of SD card. User has to erase multiple blocks at a time that means:

=> mmc erase 0x22 2

will erase the contents of SD card.

This limitation is from micro SD card side, i found this limitation
in Strontium micro SDHC - 4 GB (class 6).

Pragnesh Patel (6):
  mmc: mmc_spi: correct the while condition
  mmc: mmc_spi: generate R1 response for different mmc SPI commands
  mmc: read ssr for SD spi
  mmc: mmc_spi: Read R2 response for send status command - CMD13
  mmc: mmc_spi: Generate R1 response for erase block start and end
  mmc_spi: generate R1b response for erase and stop transmission command

 drivers/mmc/mmc.c     |  5 +++++
 drivers/mmc/mmc_spi.c | 52 ++++++++++++++++++++++++++++++++++++-------
 2 files changed, 49 insertions(+), 8 deletions(-)