Skip to contentSkip to conversation

mmc: send CMD0 before CMD1 for some MMC cards

PATCH New Yangbo Lu 3 participants 12 messages Mar 9, 2016 – Aug 2, 2016 MMC, SD and SDIO

lore
Share & tools
lore

Yangbo Lu

author
#0 lore raw

PATCH 1/1 mmc: send CMD0 before CMD1 for some MMC cards

When the MMC framework was added in u-boot, the mmc_go_idle was added before mmc_send_op_cond_iter in function mmc_send_op_cond annotating that some cards seemed to need this. Actually, we still need to do this in function mmc_complete_op_cond for those cards. This has been verified on Micron MTFC4GACAECN eMMC chip.

---
 drivers/mmc/mmc.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/mmc/mmc.c +3 -0
index ede5d6e..82e3268 100644
@@ -418,6 +418,9 @@ static int mmc_complete_op_cond(struct mmc *mmc)
 	uint start;
 	int err;
 
+	/* Some cards seem to need this */
+	mmc_go_idle(mmc);
+
 	mmc->op_cond_pending = 0;
 	if (!(mmc->ocr & OCR_BUSY)) {
 		start = get_timer(0);
Signature · 1 line
2.1.0.27.g96db324
author
#1 lore raw

PATCH 1/1 mmc: send CMD0 before CMD1 for some MMC cards

Any comments?
Thanks.

Best regards,
Yangbo Lu

Quoted 34 lines

-----Original Message-----
From: Yangbo Lu [mailto:yangbo.lu at nxp.com]
Sent: Wednesday, March 09, 2016 11:00 AM
To: u-boot at lists.denx.de
Cc: Pantelis Antoniou; Yangbo Lu
Subject: [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

When the MMC framework was added in u-boot, the mmc_go_idle was added before mmc_send_op_cond_iter in function mmc_send_op_cond annotating that some cards seemed to need this. Actually, we still need to do this in function mmc_complete_op_cond for those cards.
This has been verified on Micron MTFC4GACAECN eMMC chip.

---
 drivers/mmc/mmc.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/mmc/mmc.c index ede5d6e..82e3268 renamed from drivers/mmc/mmc.c +0 -0

100644

drivers/mmc/mmc.c +3 -1
@@ -418,6 +418,9 @@ static int mmc_complete_op_cond(struct mmc *mmc)
 	uint start;
 	int err;
 
+	/* Some cards seem to need this */
+	mmc_go_idle(mmc);
+
 	mmc->op_cond_pending = 0;
 	if (!(mmc->ocr & OCR_BUSY)) {
 		start = get_timer(0);
--

2.1.0.27.g96db324

author
#2 lore raw

PATCH 1/1 mmc: send CMD0 before CMD1 for some MMC cards

In reply to Yangbo Lu

Hi Tom,

Could you help to assign this mmc patch reviewing to right person? It seems no one had reviewed it for almost half year.

And another my mmc patch also needs to be reviewed. I submitted in May. Please help.
http://patchwork.ozlabs.org/patch/624448/

Thank you very much.

Best regards,
Yangbo Lu

Quoted 34 lines

-----Original Message-----
From: Yangbo Lu [mailto:yangbo.lu at nxp.com]
Sent: Wednesday, March 09, 2016 11:00 AM
To: u-boot at lists.denx.de
Cc: Pantelis Antoniou; Yangbo Lu
Subject: [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

When the MMC framework was added in u-boot, the mmc_go_idle was added before mmc_send_op_cond_iter in function mmc_send_op_cond annotating that some cards seemed to need this. Actually, we still need to do this in function mmc_complete_op_cond for those cards.
This has been verified on Micron MTFC4GACAECN eMMC chip.

---
 drivers/mmc/mmc.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/mmc/mmc.c index ede5d6e..82e3268 renamed from drivers/mmc/mmc.c +0 -0

100644

drivers/mmc/mmc.c +3 -1
@@ -418,6 +418,9 @@ static int mmc_complete_op_cond(struct mmc *mmc)
 	uint start;
 	int err;
 
+	/* Some cards seem to need this */
+	mmc_go_idle(mmc);
+
 	mmc->op_cond_pending = 0;
 	if (!(mmc->ocr & OCR_BUSY)) {
 		start = get_timer(0);
--

2.1.0.27.g96db324

#3 lore raw

PATCH 1/1 mmc: send CMD0 before CMD1 for some MMC cards

Quoted 10 lines · Yangbo Lu

Hi Tom,

Could you help to assign this mmc patch reviewing to right person? It seems no one had reviewed it for almost half year.

And another my mmc patch also needs to be reviewed. I submitted in May. Please help.
http://patchwork.ozlabs.org/patch/624448/

Quoted 18 lines

Thank you very much.

Best regards,
Yangbo Lu

Quoted 12 lines

-----Original Message-----
From: Yangbo Lu [mailto:yangbo.lu at nxp.com]
Sent: Wednesday, March 09, 2016 11:00 AM
To: u-boot at lists.denx.de
Cc: Pantelis Antoniou; Yangbo Lu
Subject: [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

When the MMC framework was added in u-boot, the mmc_go_idle was added before mmc_send_op_cond_iter in function mmc_send_op_cond annotating that some cards seemed to need this. Actually, we still need to do this in function mmc_complete_op_cond for those cards.
This has been verified on Micron MTFC4GACAECN eMMC chip.

If there is no go_idle(), then what happen?
If you share the information more, i can check the more..

Best Regards,
Jaehoon Chung

Quoted 30 lines
Quoted 21 lines
---
 drivers/mmc/mmc.c | 3 +++
 1 file changed, 3 insertions(+)
drivers/mmc/mmc.c index ede5d6e..82e3268 renamed from drivers/mmc/mmc.c +0 -0

100644

drivers/mmc/mmc.c +3 -1
@@ -418,6 +418,9 @@ static int mmc_complete_op_cond(struct mmc *mmc)
 	uint start;
 	int err;
 
+	/* Some cards seem to need this */
+	mmc_go_idle(mmc);
+
 	mmc->op_cond_pending = 0;
 	if (!(mmc->ocr & OCR_BUSY)) {
 		start = get_timer(0);
--
Quoted 1 line

2.1.0.27.g96db324

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#4 lore raw

PATCH 1/1 mmc: send CMD0 before CMD1 for some MMC cards

Quoted 24 lines · Jaehoon Chung
Quoted 23 lines · Yangbo Lu

Hi Tom,

Could you help to assign this mmc patch reviewing to right person? It seems no one had reviewed it for almost half year.

And another my mmc patch also needs to be reviewed. I submitted in May. Please help.
http://patchwork.ozlabs.org/patch/624448/

Thank you very much.

Best regards,
Yangbo Lu

Quoted 7 lines

-----Original Message-----
From: Yangbo Lu [mailto:yangbo.lu at nxp.com]
Sent: Wednesday, March 09, 2016 11:00 AM
To: u-boot at lists.denx.de
Cc: Pantelis Antoniou; Yangbo Lu
Subject: [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

Quoted 7 lines
Quoted 5 lines
Quoted 5 lines

When the MMC framework was added in u-boot, the mmc_go_idle was added before mmc_send_op_cond_iter in function mmc_send_op_cond annotating that some cards seemed to need this. Actually, we still need to do this in function mmc_complete_op_cond for those cards.
This has been verified on Micron MTFC4GACAECN eMMC chip.

If there is no go_idle(), then what happen?
If you share the information more, i can check the more..

Sounds interesting, I also want want to know what happen? It seems like you failed in CMD1? The eMMC device was always in busy device within 1 second?

Quoted 36 lines

Best Regards,
Jaehoon Chung

Quoted 13 lines
Quoted 13 lines
---
  drivers/mmc/mmc.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/mmc/mmc.c index ede5d6e..82e3268 renamed from drivers/mmc/mmc.c +0 -0

100644

drivers/mmc/mmc.c +0 -0
@@ -418,6 +418,9 @@ static int mmc_complete_op_cond(struct mmc *mmc)
  	uint start;
  	int err;
 
Quoted 15 lines
Quoted 8 lines
drivers/mmc/mmc.c +3 -1
+	/* Some cards seem to need this */
+	mmc_go_idle(mmc);
+
  	mmc->op_cond_pending = 0;
  	if (!(mmc->ocr & OCR_BUSY)) {
  		start = get_timer(0);
--

2.1.0.27.g96db324

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

author
#5 lore raw

PATCH 1/1 mmc: send CMD0 before CMD1 for some MMC cards

Hi Ziyuan and Jaehoon,

Quoted 40 lines

-----Original Message-----
From: Ziyuan Xu [mailto:xzy.xu at rock-chips.com]
Sent: Wednesday, July 27, 2016 9:37 PM
To: Jaehoon Chung; Yangbo Lu; u-boot at lists.denx.de; Tom Rini
Cc: Pantelis Antoniou
Subject: Re: [U-Boot] [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

Quoted 29 lines · Jaehoon Chung
Quoted 28 lines · Yangbo Lu

Hi Tom,

Could you help to assign this mmc patch reviewing to right person? It seems no one had reviewed it for almost half year.

And another my mmc patch also needs to be reviewed. I submitted in May. Please help.
http://patchwork.ozlabs.org/patch/624448/

Thank you very much.

Best regards,
Yangbo Lu

Quoted 12 lines

-----Original Message-----
From: Yangbo Lu [mailto:yangbo.lu at nxp.com]
Sent: Wednesday, March 09, 2016 11:00 AM
To: u-boot at lists.denx.de
Cc: Pantelis Antoniou; Yangbo Lu
Subject: [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

When the MMC framework was added in u-boot, the mmc_go_idle was added before mmc_send_op_cond_iter in function mmc_send_op_cond annotating that some cards seemed to need this. Actually, we still need to do this in function mmc_complete_op_cond for those cards. This has been verified on Micron MTFC4GACAECN eMMC chip.

Quoted 5 lines
Quoted 2 lines

If there is no go_idle(), then what happen?
If you share the information more, i can check the more..

Sounds interesting, I also want want to know what happen? It seems like you failed in CMD1? The eMMC device was always in busy device within 1 second?

[Lu Yangbo-B47093] This was an issue which our customer reported and required us to fix in March. They used NXP LS1020A platform and Micron MTFC4GACAECN eMMC, and reported they had to add CMD0 as below. Otherwise it couldn?t read OCR.

static int mmc_complete_op_cond(struct mmc *mmc) {
	struct mmc_cmd cmd;
	int timeout = 1000;
	uint start;
	int err;
#if defined (XXX_CHANGED)	
	// our eMMC chip (Micron MTFC4GACAECN) requires that it be put in idle mode before
	// negociating the operating voltage levels.
	mmc_go_idle(mmc);

#endif

I hadn?t reproduce this to get more details about this issue since I didn?t have one this kind eMMC card that time. Thanks.

Quoted 38 lines
Quoted 37 lines

Best Regards,
Jaehoon Chung

Quoted 14 lines
Quoted 14 lines
---
  drivers/mmc/mmc.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/mmc/mmc.c index renamed from drivers/mmc/mmc.c +0 -0

ede5d6e..82e3268
100644

drivers/mmc/mmc.c +0 -0
@@ -418,6 +418,9 @@ static int mmc_complete_op_cond(struct mmc *mmc)
  	uint start;
  	int err;
 
Quoted 15 lines
Quoted 8 lines
drivers/mmc/mmc.c +3 -1
+	/* Some cards seem to need this */
+	mmc_go_idle(mmc);
+
  	mmc->op_cond_pending = 0;
  	if (!(mmc->ocr & OCR_BUSY)) {
  		start = get_timer(0);
--

2.1.0.27.g96db324

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#6 lore raw

PATCH 1/1 mmc: send CMD0 before CMD1 for some MMC cards

Hi Yangbo,

Quoted 59 lines · Yangbo Lu

Hi Ziyuan and Jaehoon,

Quoted 40 lines

-----Original Message-----
From: Ziyuan Xu [mailto:xzy.xu at rock-chips.com]
Sent: Wednesday, July 27, 2016 9:37 PM
To: Jaehoon Chung; Yangbo Lu; u-boot at lists.denx.de; Tom Rini
Cc: Pantelis Antoniou
Subject: Re: [U-Boot] [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

Quoted 29 lines · Jaehoon Chung
Quoted 28 lines · Yangbo Lu

Hi Tom,

Could you help to assign this mmc patch reviewing to right person? It seems no one had reviewed it for almost half year.

And another my mmc patch also needs to be reviewed. I submitted in May. Please help.
http://patchwork.ozlabs.org/patch/624448/

Thank you very much.

Best regards,
Yangbo Lu

Quoted 12 lines

-----Original Message-----
From: Yangbo Lu [mailto:yangbo.lu at nxp.com]
Sent: Wednesday, March 09, 2016 11:00 AM
To: u-boot at lists.denx.de
Cc: Pantelis Antoniou; Yangbo Lu
Subject: [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

When the MMC framework was added in u-boot, the mmc_go_idle was added before mmc_send_op_cond_iter in function mmc_send_op_cond annotating that some cards seemed to need this. Actually, we still need to do this in function mmc_complete_op_cond for those cards. This has been verified on Micron MTFC4GACAECN eMMC chip.

Quoted 5 lines
Quoted 2 lines

If there is no go_idle(), then what happen?
If you share the information more, i can check the more..

Sounds interesting, I also want want to know what happen? It seems like you failed in CMD1? The eMMC device was always in busy device within 1 second?

[Lu Yangbo-B47093] This was an issue which our customer reported and required us to fix in March. They used NXP LS1020A platform and Micron MTFC4GACAECN eMMC, and reported they had to add CMD0 as below. Otherwise it couldn?t read OCR.

static int mmc_complete_op_cond(struct mmc *mmc) {
	struct mmc_cmd cmd;
	int timeout = 1000;
	uint start;
	int err;
Quoted 5 lines
#if defined (XXX_CHANGED)	
	// our eMMC chip (Micron MTFC4GACAECN) requires that it be put in idle mode before
	// negociating the operating voltage levels.
	mmc_go_idle(mmc);

#endif

Well, it seems to fix workaround. mmc_go_idle() means Device Reset.

mmc_complete_op_cond() function has added for reducing the booting time.
If mmc_go_idle() is added at here, there is no benefit, and it should be back to old concept.

I don't agree this patch..now.

Best Regards,
Jaehoon Chung

Quoted 44 lines

I hadn?t reproduce this to get more details about this issue since I didn?t have one this kind eMMC card that time. Thanks.

Quoted 38 lines
Quoted 37 lines

Best Regards,
Jaehoon Chung

Quoted 14 lines
Quoted 14 lines
---
  drivers/mmc/mmc.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/mmc/mmc.c index renamed from drivers/mmc/mmc.c +0 -0

ede5d6e..82e3268
100644

drivers/mmc/mmc.c +0 -0
@@ -418,6 +418,9 @@ static int mmc_complete_op_cond(struct mmc *mmc)
  	uint start;
  	int err;
 
Quoted 15 lines
Quoted 8 lines
drivers/mmc/mmc.c +3 -1
+	/* Some cards seem to need this */
+	mmc_go_idle(mmc);
+
  	mmc->op_cond_pending = 0;
  	if (!(mmc->ocr & OCR_BUSY)) {
  		start = get_timer(0);
--

2.1.0.27.g96db324

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

author
#7 lore raw

PATCH 1/1 mmc: send CMD0 before CMD1 for some MMC cards

Hi Jaehoon,

Quoted 79 lines

-----Original Message-----
From: Jaehoon Chung [mailto:jh80.chung at samsung.com]
Sent: Thursday, July 28, 2016 4:40 PM
To: Yangbo Lu; Ziyuan Xu; u-boot at lists.denx.de; Tom Rini
Cc: Pantelis Antoniou
Subject: Re: [U-Boot] [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

Hi Yangbo,

Quoted 43 lines · Yangbo Lu

Hi Ziyuan and Jaehoon,

Quoted 40 lines

-----Original Message-----
From: Ziyuan Xu [mailto:xzy.xu at rock-chips.com]
Sent: Wednesday, July 27, 2016 9:37 PM
To: Jaehoon Chung; Yangbo Lu; u-boot at lists.denx.de; Tom Rini
Cc: Pantelis Antoniou
Subject: Re: [U-Boot] [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

Quoted 29 lines · Jaehoon Chung
Quoted 28 lines · Yangbo Lu

Hi Tom,

Could you help to assign this mmc patch reviewing to right person? It seems no one had reviewed it for almost half year.

And another my mmc patch also needs to be reviewed. I submitted in May. Please help.
http://patchwork.ozlabs.org/patch/624448/

Thank you very much.

Best regards,
Yangbo Lu

Quoted 12 lines

-----Original Message-----
From: Yangbo Lu [mailto:yangbo.lu at nxp.com]
Sent: Wednesday, March 09, 2016 11:00 AM
To: u-boot at lists.denx.de
Cc: Pantelis Antoniou; Yangbo Lu
Subject: [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

When the MMC framework was added in u-boot, the mmc_go_idle was added before mmc_send_op_cond_iter in function mmc_send_op_cond annotating that some cards seemed to need this. Actually, we still need to do this in function mmc_complete_op_cond for those cards. This has been verified on Micron MTFC4GACAECN eMMC chip.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

If there is no go_idle(), then what happen?
If you share the information more, i can check the more..

Sounds interesting, I also want want to know what happen? It seems like you failed in CMD1? The eMMC device was always in busy device within 1 second?

[Lu Yangbo-B47093] This was an issue which our customer reported and

required us to fix in March.

Quoted 1 line

They used NXP LS1020A platform and Micron MTFC4GACAECN eMMC, and

reported they had to add CMD0 as below.

Quoted 10 lines

Otherwise it couldn?t read OCR.

static int mmc_complete_op_cond(struct mmc *mmc) {
	struct mmc_cmd cmd;
	int timeout = 1000;
	uint start;
	int err;
#if defined (XXX_CHANGED)
	// our eMMC chip (Micron MTFC4GACAECN) requires that it be put in

idle mode before

Quoted 3 lines
	// negociating the operating voltage levels.
	mmc_go_idle(mmc);

#endif

Quoted 8 lines

Well, it seems to fix workaround. mmc_go_idle() means Device Reset.

mmc_complete_op_cond() function has added for reducing the booting time. If mmc_go_idle() is added at here, there is no benefit, and it should be back to old concept.

I don't agree this patch..now.

[Lu Yangbo-B47093] Did you notice mmc_send_op_cond function? Before mmc_send_op_cond_iter sending CMD1, there always was mmc_go_idle. I don?t know why said 'Some cards seem to need this', but it must fix some issue.

static int mmc_send_op_cond(struct mmc *mmc)

{
        int err, i;

        /* Some cards seem to need this */
        mmc_go_idle(mmc);

        /* Asking to the card its capabilities */
        for (i = 0; i < 2; i++) {
                err = mmc_send_op_cond_iter(mmc, i != 0);
                if (err)
                        return err;

                /* exit if not busy (flag seems to be inverted) */
                if (mmc->ocr & OCR_BUSY)
                        break;
        }
        mmc->op_cond_pending = 1;
        return 0;
}

Now in mmc_complete_op_cond function, there may be the same issue. Without the mmc_go_idle, mmc_send_op_cond_iter failed to get ocr. Maybe I should move mmc_go_idle just before mmc_send_op_cond_iter, like this.

static int mmc_complete_op_cond(struct mmc *mmc)

{
        struct mmc_cmd cmd;
        int timeout = 1000;
        uint start;
        int err;

        mmc->op_cond_pending = 0;
        if (!(mmc->ocr & OCR_BUSY)) {
                start = get_timer(0);
                while (1) {
				/* Some cards seem to need this */
				mmc_go_idle(mmc);
                        err = mmc_send_op_cond_iter(mmc, 1);

If you think it's not proper, do you have any suggestion? :)

Thanks a lot.

Quoted 48 lines

Best Regards,
Jaehoon Chung

Quoted 3 lines

I hadn?t reproduce this to get more details about this issue since I

didn?t have one this kind eMMC card that time.

Quoted 41 lines

Thanks.

Quoted 38 lines
Quoted 37 lines

Best Regards,
Jaehoon Chung

Quoted 14 lines
Quoted 14 lines
---
  drivers/mmc/mmc.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/mmc/mmc.c index renamed from drivers/mmc/mmc.c +0 -0

ede5d6e..82e3268
100644

drivers/mmc/mmc.c +0 -0
@@ -418,6 +418,9 @@ static int mmc_complete_op_cond(struct mmc *mmc)
  	uint start;
  	int err;
 
Quoted 15 lines
Quoted 8 lines
drivers/mmc/mmc.c +3 -1
+	/* Some cards seem to need this */
+	mmc_go_idle(mmc);
+
  	mmc->op_cond_pending = 0;
  	if (!(mmc->ocr & OCR_BUSY)) {
  		start = get_timer(0);
--

2.1.0.27.g96db324

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#8 lore raw

PATCH 1/1 mmc: send CMD0 before CMD1 for some MMC cards

Quoted 119 lines · Yangbo Lu

Hi Jaehoon,

Quoted 79 lines

-----Original Message-----
From: Jaehoon Chung [mailto:jh80.chung at samsung.com]
Sent: Thursday, July 28, 2016 4:40 PM
To: Yangbo Lu; Ziyuan Xu; u-boot at lists.denx.de; Tom Rini
Cc: Pantelis Antoniou
Subject: Re: [U-Boot] [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

Hi Yangbo,

Quoted 43 lines · Yangbo Lu

Hi Ziyuan and Jaehoon,

Quoted 40 lines

-----Original Message-----
From: Ziyuan Xu [mailto:xzy.xu at rock-chips.com]
Sent: Wednesday, July 27, 2016 9:37 PM
To: Jaehoon Chung; Yangbo Lu; u-boot at lists.denx.de; Tom Rini
Cc: Pantelis Antoniou
Subject: Re: [U-Boot] [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

Quoted 29 lines · Jaehoon Chung
Quoted 28 lines · Yangbo Lu

Hi Tom,

Could you help to assign this mmc patch reviewing to right person? It seems no one had reviewed it for almost half year.

And another my mmc patch also needs to be reviewed. I submitted in May. Please help.
http://patchwork.ozlabs.org/patch/624448/

Thank you very much.

Best regards,
Yangbo Lu

Quoted 12 lines

-----Original Message-----
From: Yangbo Lu [mailto:yangbo.lu at nxp.com]
Sent: Wednesday, March 09, 2016 11:00 AM
To: u-boot at lists.denx.de
Cc: Pantelis Antoniou; Yangbo Lu
Subject: [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

When the MMC framework was added in u-boot, the mmc_go_idle was added before mmc_send_op_cond_iter in function mmc_send_op_cond annotating that some cards seemed to need this. Actually, we still need to do this in function mmc_complete_op_cond for those cards. This has been verified on Micron MTFC4GACAECN eMMC chip.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

If there is no go_idle(), then what happen?
If you share the information more, i can check the more..

Sounds interesting, I also want want to know what happen? It seems like you failed in CMD1? The eMMC device was always in busy device within 1 second?

[Lu Yangbo-B47093] This was an issue which our customer reported and

required us to fix in March.

Quoted 1 line

They used NXP LS1020A platform and Micron MTFC4GACAECN eMMC, and

reported they had to add CMD0 as below.

Quoted 10 lines

Otherwise it couldn?t read OCR.

static int mmc_complete_op_cond(struct mmc *mmc) {
	struct mmc_cmd cmd;
	int timeout = 1000;
	uint start;
	int err;
#if defined (XXX_CHANGED)
	// our eMMC chip (Micron MTFC4GACAECN) requires that it be put in

idle mode before

Quoted 3 lines
	// negociating the operating voltage levels.
	mmc_go_idle(mmc);

#endif

Quoted 8 lines

Well, it seems to fix workaround. mmc_go_idle() means Device Reset.

mmc_complete_op_cond() function has added for reducing the booting time. If mmc_go_idle() is added at here, there is no benefit, and it should be back to old concept.

I don't agree this patch..now.

[Lu Yangbo-B47093] Did you notice mmc_send_op_cond function? Before mmc_send_op_cond_iter sending CMD1, there always was mmc_go_idle. I don?t know why said 'Some cards seem to need this', but it must fix some issue.

static int mmc_send_op_cond(struct mmc *mmc)

{
        int err, i;

        /* Some cards seem to need this */
        mmc_go_idle(mmc);

        /* Asking to the card its capabilities */
        for (i = 0; i < 2; i++) {
                err = mmc_send_op_cond_iter(mmc, i != 0);
                if (err)
                        return err;

                /* exit if not busy (flag seems to be inverted) */
                if (mmc->ocr & OCR_BUSY)
                        break;
        }
        mmc->op_cond_pending = 1;
        return 0;
}

Now in mmc_complete_op_cond function, there may be the same issue. Without the mmc_go_idle, mmc_send_op_cond_iter failed to get ocr. Maybe I should move mmc_go_idle just before mmc_send_op_cond_iter, like this.

static int mmc_complete_op_cond(struct mmc *mmc)

Quoted 13 lines
{
        struct mmc_cmd cmd;
        int timeout = 1000;
        uint start;
        int err;

        mmc->op_cond_pending = 0;
        if (!(mmc->ocr & OCR_BUSY)) {
                start = get_timer(0);
                while (1) {
				/* Some cards seem to need this */
				mmc_go_idle(mmc);
                        err = mmc_send_op_cond_iter(mmc, 1);

If you need to add the mmc_go_idle(), then I think this point is right. :)

Best Regards,
Jaehoon Chung

Quoted 55 lines

If you think it's not proper, do you have any suggestion? :)

Thanks a lot.

Quoted 48 lines

Best Regards,
Jaehoon Chung

Quoted 3 lines

I hadn?t reproduce this to get more details about this issue since I

didn?t have one this kind eMMC card that time.

Quoted 41 lines

Thanks.

Quoted 38 lines
Quoted 37 lines

Best Regards,
Jaehoon Chung

Quoted 14 lines
Quoted 14 lines
---
  drivers/mmc/mmc.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/mmc/mmc.c index renamed from drivers/mmc/mmc.c +0 -0

ede5d6e..82e3268
100644

drivers/mmc/mmc.c +0 -0
@@ -418,6 +418,9 @@ static int mmc_complete_op_cond(struct mmc *mmc)
  	uint start;
  	int err;
 
Quoted 15 lines
Quoted 8 lines
drivers/mmc/mmc.c +3 -1
+	/* Some cards seem to need this */
+	mmc_go_idle(mmc);
+
  	mmc->op_cond_pending = 0;
  	if (!(mmc->ocr & OCR_BUSY)) {
  		start = get_timer(0);
--

2.1.0.27.g96db324

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

author
#9 lore raw

PATCH 1/1 mmc: send CMD0 before CMD1 for some MMC cards

Thank you, Jaehoon.
So I will send the new version later :)

Best regards,
Yangbo Lu

Quoted 207 lines

-----Original Message-----
From: Jaehoon Chung [mailto:jh80.chung at samsung.com]
Sent: Tuesday, August 02, 2016 3:13 PM
To: Yangbo Lu; Ziyuan Xu; u-boot at lists.denx.de; Tom Rini
Cc: Pantelis Antoniou
Subject: Re: [U-Boot] [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

Quoted 56 lines · Yangbo Lu

Hi Jaehoon,

Quoted 53 lines

-----Original Message-----
From: Jaehoon Chung [mailto:jh80.chung at samsung.com]
Sent: Thursday, July 28, 2016 4:40 PM
To: Yangbo Lu; Ziyuan Xu; u-boot at lists.denx.de; Tom Rini
Cc: Pantelis Antoniou
Subject: Re: [U-Boot] [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

Hi Yangbo,

Quoted 42 lines · Yangbo Lu

Hi Ziyuan and Jaehoon,

Quoted 39 lines

-----Original Message-----
From: Ziyuan Xu [mailto:xzy.xu at rock-chips.com]
Sent: Wednesday, July 27, 2016 9:37 PM
To: Jaehoon Chung; Yangbo Lu; u-boot at lists.denx.de; Tom Rini
Cc: Pantelis Antoniou
Subject: Re: [U-Boot] [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

Quoted 28 lines · Jaehoon Chung
Quoted 27 lines · Yangbo Lu

Hi Tom,

Could you help to assign this mmc patch reviewing to right person? It seems no one had reviewed it for almost half year.

And another my mmc patch also needs to be reviewed. I submitted in May. Please help.
http://patchwork.ozlabs.org/patch/624448/

Thank you very much.

Best regards,
Yangbo Lu

Quoted 11 lines

-----Original Message-----
From: Yangbo Lu [mailto:yangbo.lu at nxp.com]
Sent: Wednesday, March 09, 2016 11:00 AM
To: u-boot at lists.denx.de
Cc: Pantelis Antoniou; Yangbo Lu
Subject: [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

When the MMC framework was added in u-boot, the mmc_go_idle was added before mmc_send_op_cond_iter in function mmc_send_op_cond annotating that some cards seemed to need this. Actually, we still need to do this in function mmc_complete_op_cond for those

cards.

Quoted 21 lines
Quoted 21 lines
Quoted 8 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line

This has been verified on Micron MTFC4GACAECN eMMC chip.

If there is no go_idle(), then what happen?
If you share the information more, i can check the more..

Sounds interesting, I also want want to know what happen? It seems like you failed in CMD1? The eMMC device was always in busy device within 1 second?

[Lu Yangbo-B47093] This was an issue which our customer reported and

required us to fix in March.

Quoted 1 line

They used NXP LS1020A platform and Micron MTFC4GACAECN eMMC, and

reported they had to add CMD0 as below.

Quoted 10 lines

Otherwise it couldn?t read OCR.

static int mmc_complete_op_cond(struct mmc *mmc) {
	struct mmc_cmd cmd;
	int timeout = 1000;
	uint start;
	int err;
#if defined (XXX_CHANGED)
	// our eMMC chip (Micron MTFC4GACAECN) requires that it be put in
Quoted 8 lines
Quoted 8 lines

idle mode before

Quoted 3 lines
	// negociating the operating voltage levels.
	mmc_go_idle(mmc);

#endif

Well, it seems to fix workaround. mmc_go_idle() means Device Reset.

mmc_complete_op_cond() function has added for reducing the booting

time.

Quoted 7 lines
Quoted 5 lines

If mmc_go_idle() is added at here, there is no benefit, and it should be back to old concept.

I don't agree this patch..now.

[Lu Yangbo-B47093] Did you notice mmc_send_op_cond function? Before

mmc_send_op_cond_iter sending CMD1, there always was mmc_go_idle.

Quoted 1 line

I don?t know why said 'Some cards seem to need this', but it must fix

some issue.

Quoted 21 lines
static int mmc_send_op_cond(struct mmc *mmc) {
        int err, i;

        /* Some cards seem to need this */
        mmc_go_idle(mmc);

        /* Asking to the card its capabilities */
        for (i = 0; i < 2; i++) {
                err = mmc_send_op_cond_iter(mmc, i != 0);
                if (err)
                        return err;

                /* exit if not busy (flag seems to be inverted) */
                if (mmc->ocr & OCR_BUSY)
                        break;
        }
        mmc->op_cond_pending = 1;
        return 0;
}
Quoted 1 line

Now in mmc_complete_op_cond function, there may be the same issue.

Without the mmc_go_idle, mmc_send_op_cond_iter failed to get ocr.

Quoted 1 line

Maybe I should move mmc_go_idle just before mmc_send_op_cond_iter, like

this.

Quoted 14 lines
static int mmc_complete_op_cond(struct mmc *mmc) {
        struct mmc_cmd cmd;
        int timeout = 1000;
        uint start;
        int err;

        mmc->op_cond_pending = 0;
        if (!(mmc->ocr & OCR_BUSY)) {
                start = get_timer(0);
                while (1) {
				/* Some cards seem to need this */
				mmc_go_idle(mmc);
                        err = mmc_send_op_cond_iter(mmc, 1);

If you need to add the mmc_go_idle(), then I think this point is right. :)

Best Regards,
Jaehoon Chung

Quoted 24 lines

If you think it's not proper, do you have any suggestion? :)

Thanks a lot.

Quoted 18 lines

Best Regards,
Jaehoon Chung

Quoted 3 lines

I hadn?t reproduce this to get more details about this issue since I

didn?t have one this kind eMMC card that time.

Quoted 11 lines

Thanks.

Quoted 9 lines
Quoted 9 lines

Best Regards,
Jaehoon Chung

Quoted 5 lines
Quoted 5 lines
---
  drivers/mmc/mmc.c | 3 +++
  1 file changed, 3 insertions(+)
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/mmc/mmc.c static int mmc_complete_op_cond(struct mmc

Quoted 6 lines
drivers/mmc/mmc.c index renamed from drivers/mmc/mmc.c +0 -0

ede5d6e..82e3268
100644

drivers/mmc/mmc.c +0 -0
@@ -418,6 +418,9 @@ static int mmc_complete_op_cond(struct mmc

*mmc)

Quoted 25 lines
Quoted 24 lines
Quoted 24 lines
Quoted 23 lines
Quoted 22 lines
Quoted 18 lines
Quoted 11 lines
drivers/mmc/mmc.c +3 -1
  	uint start;
  	int err;
 
+	/* Some cards seem to need this */
+	mmc_go_idle(mmc);
+
  	mmc->op_cond_pending = 0;
  	if (!(mmc->ocr & OCR_BUSY)) {
  		start = get_timer(0);
--

2.1.0.27.g96db324

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

#10 lore raw

PATCH 1/1 mmc: send CMD0 before CMD1 for some MMC cards

In reply to Jaehoon Chung
Quoted 134 lines · Jaehoon Chung
Quoted 119 lines · Yangbo Lu

Hi Jaehoon,

Quoted 79 lines

-----Original Message-----
From: Jaehoon Chung [mailto:jh80.chung at samsung.com]
Sent: Thursday, July 28, 2016 4:40 PM
To: Yangbo Lu; Ziyuan Xu; u-boot at lists.denx.de; Tom Rini
Cc: Pantelis Antoniou
Subject: Re: [U-Boot] [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

Hi Yangbo,

Quoted 43 lines · Yangbo Lu

Hi Ziyuan and Jaehoon,

Quoted 40 lines

-----Original Message-----
From: Ziyuan Xu [mailto:xzy.xu at rock-chips.com]
Sent: Wednesday, July 27, 2016 9:37 PM
To: Jaehoon Chung; Yangbo Lu; u-boot at lists.denx.de; Tom Rini
Cc: Pantelis Antoniou
Subject: Re: [U-Boot] [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

Quoted 29 lines · Jaehoon Chung
Quoted 28 lines · Yangbo Lu

Hi Tom,

Could you help to assign this mmc patch reviewing to right person? It seems no one had reviewed it for almost half year.

And another my mmc patch also needs to be reviewed. I submitted in May. Please help.
http://patchwork.ozlabs.org/patch/624448/

Thank you very much.

Best regards,
Yangbo Lu

Quoted 12 lines

-----Original Message-----
From: Yangbo Lu [mailto:yangbo.lu at nxp.com]
Sent: Wednesday, March 09, 2016 11:00 AM
To: u-boot at lists.denx.de
Cc: Pantelis Antoniou; Yangbo Lu
Subject: [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

When the MMC framework was added in u-boot, the mmc_go_idle was added before mmc_send_op_cond_iter in function mmc_send_op_cond annotating that some cards seemed to need this. Actually, we still need to do this in function mmc_complete_op_cond for those cards. This has been verified on Micron MTFC4GACAECN eMMC chip.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

If there is no go_idle(), then what happen?
If you share the information more, i can check the more..

Sounds interesting, I also want want to know what happen? It seems like you failed in CMD1? The eMMC device was always in busy device within 1 second?

[Lu Yangbo-B47093] This was an issue which our customer reported and

required us to fix in March.

Quoted 1 line

They used NXP LS1020A platform and Micron MTFC4GACAECN eMMC, and

reported they had to add CMD0 as below.

Quoted 10 lines

Otherwise it couldn?t read OCR.

static int mmc_complete_op_cond(struct mmc *mmc) {
	struct mmc_cmd cmd;
	int timeout = 1000;
	uint start;
	int err;
#if defined (XXX_CHANGED)
	// our eMMC chip (Micron MTFC4GACAECN) requires that it be put in

idle mode before

Quoted 3 lines
	// negociating the operating voltage levels.
	mmc_go_idle(mmc);

#endif

Quoted 8 lines

Well, it seems to fix workaround. mmc_go_idle() means Device Reset.

mmc_complete_op_cond() function has added for reducing the booting time. If mmc_go_idle() is added at here, there is no benefit, and it should be back to old concept.

I don't agree this patch..now.

[Lu Yangbo-B47093] Did you notice mmc_send_op_cond function? Before mmc_send_op_cond_iter sending CMD1, there always was mmc_go_idle. I don?t know why said 'Some cards seem to need this', but it must fix some issue.

static int mmc_send_op_cond(struct mmc *mmc)

{
        int err, i;

        /* Some cards seem to need this */
        mmc_go_idle(mmc);

        /* Asking to the card its capabilities */
        for (i = 0; i < 2; i++) {
                err = mmc_send_op_cond_iter(mmc, i != 0);
                if (err)
                        return err;

                /* exit if not busy (flag seems to be inverted) */
                if (mmc->ocr & OCR_BUSY)
                        break;
        }
        mmc->op_cond_pending = 1;
        return 0;
}

Now in mmc_complete_op_cond function, there may be the same issue. Without the mmc_go_idle, mmc_send_op_cond_iter failed to get ocr. Maybe I should move mmc_go_idle just before mmc_send_op_cond_iter, like this.

static int mmc_complete_op_cond(struct mmc *mmc)

Quoted 13 lines
{
        struct mmc_cmd cmd;
        int timeout = 1000;
        uint start;
        int err;

        mmc->op_cond_pending = 0;
        if (!(mmc->ocr & OCR_BUSY)) {
                start = get_timer(0);
                while (1) {
				/* Some cards seem to need this */
				mmc_go_idle(mmc);
                        err = mmc_send_op_cond_iter(mmc, 1);
Quoted 1 line

If you need to add the mmc_go_idle(), then I think this point is right. :)

One more..i don't check in more detail.
Could you consider the below things?

1. located mmc_go_idle() before while()

2. included mmc_go_idle in while()

Best Regards,
Jaehoon Chung

Quoted 65 lines

Best Regards,
Jaehoon Chung

Quoted 55 lines

If you think it's not proper, do you have any suggestion? :)

Thanks a lot.

Quoted 48 lines

Best Regards,
Jaehoon Chung

Quoted 3 lines

I hadn?t reproduce this to get more details about this issue since I

didn?t have one this kind eMMC card that time.

Quoted 41 lines

Thanks.

Quoted 38 lines
Quoted 37 lines

Best Regards,
Jaehoon Chung

Quoted 14 lines
Quoted 14 lines
---
  drivers/mmc/mmc.c | 3 +++
  1 file changed, 3 insertions(+)
drivers/mmc/mmc.c index renamed from drivers/mmc/mmc.c +0 -0

ede5d6e..82e3268
100644

drivers/mmc/mmc.c +0 -0
@@ -418,6 +418,9 @@ static int mmc_complete_op_cond(struct mmc *mmc)
  	uint start;
  	int err;
 
Quoted 15 lines
Quoted 8 lines
drivers/mmc/mmc.c +3 -1
+	/* Some cards seem to need this */
+	mmc_go_idle(mmc);
+
  	mmc->op_cond_pending = 0;
  	if (!(mmc->ocr & OCR_BUSY)) {
  		start = get_timer(0);
--

2.1.0.27.g96db324

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

author
#11 lore raw

PATCH 1/1 mmc: send CMD0 before CMD1 for some MMC cards

Quoted 151 lines

-----Original Message-----
From: Jaehoon Chung [mailto:jh80.chung at samsung.com]
Sent: Tuesday, August 02, 2016 3:18 PM
To: Yangbo Lu; Ziyuan Xu; u-boot at lists.denx.de; Tom Rini
Cc: Pantelis Antoniou
Subject: Re: [U-Boot] [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

Quoted 53 lines · Jaehoon Chung
Quoted 52 lines · Yangbo Lu

Hi Jaehoon,

Quoted 49 lines

-----Original Message-----
From: Jaehoon Chung [mailto:jh80.chung at samsung.com]
Sent: Thursday, July 28, 2016 4:40 PM
To: Yangbo Lu; Ziyuan Xu; u-boot at lists.denx.de; Tom Rini
Cc: Pantelis Antoniou
Subject: Re: [U-Boot] [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

Hi Yangbo,

Quoted 38 lines · Yangbo Lu

Hi Ziyuan and Jaehoon,

Quoted 35 lines

-----Original Message-----
From: Ziyuan Xu [mailto:xzy.xu at rock-chips.com]
Sent: Wednesday, July 27, 2016 9:37 PM
To: Jaehoon Chung; Yangbo Lu; u-boot at lists.denx.de; Tom Rini
Cc: Pantelis Antoniou
Subject: Re: [U-Boot] [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

Quoted 24 lines · Jaehoon Chung
Quoted 23 lines · Yangbo Lu

Hi Tom,

Could you help to assign this mmc patch reviewing to right person? It seems no one had reviewed it for almost half year.

And another my mmc patch also needs to be reviewed. I submitted in May. Please help.
http://patchwork.ozlabs.org/patch/624448/

Thank you very much.

Best regards,
Yangbo Lu

Quoted 7 lines

-----Original Message-----
From: Yangbo Lu [mailto:yangbo.lu at nxp.com]
Sent: Wednesday, March 09, 2016 11:00 AM
To: u-boot at lists.denx.de
Cc: Pantelis Antoniou; Yangbo Lu
Subject: [PATCH] mmc: send CMD0 before CMD1 for some MMC cards

Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines
Quoted 4 lines

When the MMC framework was added in u-boot, the mmc_go_idle was added before mmc_send_op_cond_iter in function mmc_send_op_cond annotating that some cards seemed to need this. Actually, we still need to do this in function mmc_complete_op_cond for those

cards.

Quoted 22 lines
Quoted 22 lines
Quoted 22 lines
Quoted 9 lines
Quoted 6 lines
Quoted 3 lines
Quoted 1 line
Quoted 1 line

This has been verified on Micron MTFC4GACAECN eMMC chip.

If there is no go_idle(), then what happen?
If you share the information more, i can check the more..

Sounds interesting, I also want want to know what happen? It seems like you failed in CMD1? The eMMC device was always in busy device within 1 second?

[Lu Yangbo-B47093] This was an issue which our customer reported and

required us to fix in March.

Quoted 1 line

They used NXP LS1020A platform and Micron MTFC4GACAECN eMMC, and

reported they had to add CMD0 as below.

Quoted 10 lines

Otherwise it couldn?t read OCR.

static int mmc_complete_op_cond(struct mmc *mmc) {
	struct mmc_cmd cmd;
	int timeout = 1000;
	uint start;
	int err;
#if defined (XXX_CHANGED)
	// our eMMC chip (Micron MTFC4GACAECN) requires that it be put in
Quoted 8 lines
Quoted 8 lines
Quoted 8 lines

idle mode before

Quoted 3 lines
	// negociating the operating voltage levels.
	mmc_go_idle(mmc);

#endif

Well, it seems to fix workaround. mmc_go_idle() means Device Reset.

mmc_complete_op_cond() function has added for reducing the booting

time.

Quoted 7 lines
Quoted 7 lines
Quoted 5 lines

If mmc_go_idle() is added at here, there is no benefit, and it should be back to old concept.

I don't agree this patch..now.

[Lu Yangbo-B47093] Did you notice mmc_send_op_cond function? Before

mmc_send_op_cond_iter sending CMD1, there always was mmc_go_idle.

Quoted 1 line
Quoted 1 line

I don?t know why said 'Some cards seem to need this', but it must fix

some issue.

Quoted 21 lines
Quoted 21 lines
static int mmc_send_op_cond(struct mmc *mmc) {
        int err, i;

        /* Some cards seem to need this */
        mmc_go_idle(mmc);

        /* Asking to the card its capabilities */
        for (i = 0; i < 2; i++) {
                err = mmc_send_op_cond_iter(mmc, i != 0);
                if (err)
                        return err;

                /* exit if not busy (flag seems to be inverted) */
                if (mmc->ocr & OCR_BUSY)
                        break;
        }
        mmc->op_cond_pending = 1;
        return 0;
}
Quoted 1 line
Quoted 1 line

Now in mmc_complete_op_cond function, there may be the same issue.

Without the mmc_go_idle, mmc_send_op_cond_iter failed to get ocr.

Quoted 1 line
Quoted 1 line

Maybe I should move mmc_go_idle just before mmc_send_op_cond_iter,

like this.

Quoted 15 lines
Quoted 14 lines
static int mmc_complete_op_cond(struct mmc *mmc) {
        struct mmc_cmd cmd;
        int timeout = 1000;
        uint start;
        int err;

        mmc->op_cond_pending = 0;
        if (!(mmc->ocr & OCR_BUSY)) {
                start = get_timer(0);
                while (1) {
				/* Some cards seem to need this */
				mmc_go_idle(mmc);
                        err = mmc_send_op_cond_iter(mmc, 1);
Quoted 2 lines

If you need to add the mmc_go_idle(), then I think this point is right. :)

Quoted 7 lines

One more..i don't check in more detail.
Could you consider the below things?

1. located mmc_go_idle() before while()

2. included mmc_go_idle in while()

[Lu Yangbo-B47093] Thank you for your reminding.
From the customer code, I think locating it before while() should be what they want. Anyway, we didn?t know why some cards need this. But doing this really work:)

Quoted 70 lines

Best Regards,
Jaehoon Chung

Quoted 29 lines

Best Regards,
Jaehoon Chung

Quoted 25 lines

If you think it's not proper, do you have any suggestion? :)

Thanks a lot.

Quoted 19 lines

Best Regards,
Jaehoon Chung

Quoted 4 lines

I hadn?t reproduce this to get more details about this issue since I

didn?t have one this kind eMMC card that time.

Quoted 11 lines

Thanks.

Quoted 9 lines
Quoted 9 lines

Best Regards,
Jaehoon Chung

Quoted 5 lines
Quoted 5 lines
---
  drivers/mmc/mmc.c | 3 +++
  1 file changed, 3 insertions(+)
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines
Quoted 6 lines

drivers/mmc/mmc.c static int mmc_complete_op_cond(struct mmc

Quoted 6 lines
drivers/mmc/mmc.c index renamed from drivers/mmc/mmc.c +0 -0

ede5d6e..82e3268
100644

drivers/mmc/mmc.c +0 -0
@@ -418,6 +418,9 @@ static int mmc_complete_op_cond(struct mmc

*mmc)

Quoted 31 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 18 lines
Quoted 11 lines
drivers/mmc/mmc.c +3 -1
  	uint start;
  	int err;
 
+	/* Some cards seem to need this */
+	mmc_go_idle(mmc);
+
  	mmc->op_cond_pending = 0;
  	if (!(mmc->ocr & OCR_BUSY)) {
  		start = get_timer(0);
--

2.1.0.27.g96db324

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

Quoted 7 lines
Quoted 6 lines
Quoted 6 lines
Quoted 5 lines
Quoted 4 lines

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot

_______________________________________________
U-Boot mailing list
U-Boot at lists.denx.de
http://lists.denx.de/mailman/listinfo/u-boot