]> git.karo-electronics.de Git - karo-tx-uboot.git/commitdiff
mmc: fix ERASE_GRP_DEF handling
authorHannes Petermaier <Hannes.Petermaier@br-automation.com>
Fri, 8 Aug 2014 07:47:22 +0000 (09:47 +0200)
committerPantelis Antoniou <panto@antoniou-consulting.com>
Fri, 3 Oct 2014 14:26:49 +0000 (17:26 +0300)
if we set manually this bit on the eMMC card using mmc_switch(...),
we also have to set it within our (before read) internal structure
'ext_csd'.

Otherwise following checks on this will fail.

Acked-by: Pantelis Antoniou <panto@antoniou-consulting.com>
Signed-off-by: Hannes Petermaier <oe5hpm@oevsv.at>
drivers/mmc/mmc.c

index a26f3cec20905fd900e5110128a06716597934f5..52a8e3631215e61fe733e0d7696a42ca852257f5 100644 (file)
@@ -1010,6 +1010,8 @@ static int mmc_startup(struct mmc *mmc)
 
                        if (err)
                                return err;
+                       else
+                               ext_csd[EXT_CSD_ERASE_GROUP_DEF] = 1;
 
                        /* Read out group size from ext_csd */
                        mmc->erase_grp_size =