From mboxrd@z Thu Jan 1 00:00:00 1970 From: Jaehoon Chung Date: Tue, 12 Aug 2014 13:24:32 +0900 Subject: [U-Boot] [PATCH] mmc: fix ERASE_GRP_DEF handling In-Reply-To: References: Message-ID: <53E99700.3030801@samsung.com> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi, Hannes. On 08/08/2014 04:47 PM, Hannes Petermaier wrote: > 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. > > Signed-off-by: Hannes Petermaier > --- > drivers/mmc/mmc.c | 2 ++ > 1 file changed, 2 insertions(+) > > diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c > index a26f3ce..52a8e36 100644 > --- a/drivers/mmc/mmc.c > +++ b/drivers/mmc/mmc.c > @@ -1010,6 +1010,8 @@ static int mmc_startup(struct mmc *mmc) > > if (err) > return err; > + else > + ext_csd[EXT_CSD_ERASE_GROUP_DEF] = 1; When is this value read? If i'm right, you means that it has to set before comparing with test_csd, right? It's reasonable, but i'm not sure that hard-coding is right. Best Regards, Jaehoon Chung > > /* Read out group size from ext_csd */ > mmc->erase_grp_size = >