Re: sdhci-esdhc-imx : cannot read eMMC

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



2014-09-04 11:55 GMT+02:00 Jean-Michel Hautbois <jhautbois@xxxxxxxxx>:
> 2014-09-04 11:43 GMT+02:00 Arnd Bergmann <arnd@xxxxxxxx>:
>> On Thursday 04 September 2014 17:37:59 Dong Aisheng wrote:
>>> index 49f04bc..83d17a9 100644
>>> --- a/drivers/mmc/core/mmc_ops.c
>>> +++ b/drivers/mmc/core/mmc_ops.c
>>> @@ -440,6 +440,12 @@ int __mmc_switch(struct mmc_card *card, u8 set,
>>> u8 index, u8 value,
>>>         if (!use_busy_signal)
>>>                 return 0;
>>>
>>> +       /*
>>> +        * WORKAROUND: for Sandisk eMMC cards, it might need certain delay
>>> +        * before sending CMD13 after CMD6
>>> +        */
>>> +       mdelay(1);
>>> +
>>>         /* Must check status to be sure of no errors */
>>>         timeout = jiffies + msecs_to_jiffies(MMC_OPS_TIMEOUT_MS);
>>>         do {
>>>
>>>
>>
>> mdelay() is a rather nasty function to call because it hogs the CPU.
>> Better use msleep(), which will allow another process to use the
>> CPU in the meantime.
>> It might be worthwhile to check the manufacturer ID field so we
>> don't delay the boot process for non-sandisk devices.
>
> OK, so I will also move MFID defines from drivers/mmc/core/block.c to
> include/linux/mmc/card.h which will allow the use of these defines
> from mmc_ops.c.
>
> I am testing right now and if it works, I will send a patch.
> Thanks,
> JM

And that will not work because card->cid.manfid is not yet defined
when __mmc_switch() is called.
The patch works, but now I need to have it SANDISK dependent.

Thanks,
JM
--
To unsubscribe from this list: send the line "unsubscribe linux-mmc" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Index of Archives]     [Linux USB Devel]     [Linux Media]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux