[U-Boot] [PATCH] mmc: fix OCR Polling

Pantelis Antoniou panto at antoniou-consulting.com
Tue May 5 11:00:24 CEST 2015


Hi Peng,

> On Mar 19, 2015, at 10:22 , Peng Fan <Peng.Fan at freescale.com> wrote:
> 
> If in mmc_send_op_cond, OCR_BUSY is set in CMD1's response, then
> state is transfered to Ready state, and there is no need to send
> CMD1 again. Otherwise following CMD1 will recieve no response, or
> timeour error from driver such as fsl_esdhc.c.
> 
> If not into Ready state in previous CMD1, then continue CMD1 command.
> 
> In mmc_complete_op_cond, we use the value mmc->op_cond_response
> from mmc_send_op_cond, since there should be no CMD1 command between
> mmc_send_op_cond and mmc_complete_op_cond
> 
> Before fixing this, uboot log shows:
> "
> CMD_SEND:0
>                ARG                      0x00000000
>                MMC_RSP_NONE
> CMD_SEND:8
>                ARG                      0x000001AA
>                MMC_RSP_R1,5,6,7         0x18EC1504
> CMD_SEND:55
>                ARG                      0x00000000
>                MMC_RSP_R1,5,6,7         0x18EC1504
> CMD_SEND:0
>                ARG                      0x00000000
>                MMC_RSP_NONE
> CMD_SEND:1
>                ARG                      0x00000000
>                MMC_RSP_R3,4             0x00FF8080
> CMD_SEND:1
>                ARG                      0x40300000
>                MMC_RSP_R3,4             0xC0FF8080 --> Already OCR_BUSY set
> CMD_SEND:1
>                ARG                      0x40300000
>                MMC_RSP_R3,4             0x0096850A --> Failed CMD1
> MMC init failed
> "
> 
> Using this patch, this issue is fixed, emmc can be detected correctly.
> 
> 
> Signed-off-by: Peng Fan <Peng.Fan at freescale.com>
> ---
> drivers/mmc/mmc.c | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
> 


Thanks for the patch, but Andrew’s patchset is more complete.

I’ll pick up his fix instead.

Regards

— Pantelis



More information about the U-Boot mailing list