Patchwork [U-Boot] MMC may wrongly regconize 2GB eMMC as high capacity

login
register
mail settings
Submitter Raffaele Recalcati
Date March 23, 2011, 2:06 p.m.
Message ID <AANLkTimOceE2WtdiSJhf39TpfzxF5a5fnF2Px=WugLVA@mail.gmail.com>
Download mbox | patch
Permalink /patch/88083/
State Accepted
Delegated to: Andy Fleming
Headers show

Comments

Raffaele Recalcati - March 23, 2011, 2:06 p.m.
Hi Terry,

> So I guess:
> mmc_init calls mmc_send_op_cond  that set  high_capacity,
> than it calls mmc_startup, that, with MMC_CMD_SEND_CSD  command, set
> the capacity, using values in CSD register.
> So I guess that mmc_change_freq should not recalculate high_capacity.
>
> It seems better, isn't it?
>
> Regards,
> Raffaele
>

Finally I think that it is enough to apply the following patch in order
to fix the issue.

Regards,
Raffaele



--

Patch

diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c
index 3819fcf..1dfbab9 100644
--- a/drivers/mmc/mmc.c
+++ b/drivers/mmc/mmc.c
@@ -538,9 +538,6 @@  int mmc_change_freq(struct mmc *mmc)
        if (err)
                return err;

-       if (ext_csd[212] || ext_csd[213] || ext_csd[214] || ext_csd[215])
-               mmc->high_capacity = 1;
-
        cardtype = ext_csd[196] & 0xf;

        err = mmc_switch(mmc, EXT_CSD_CMD_SET_NORMAL, EXT_CSD_HS_TIMING, 1);