mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] mci: eMMC responds to CMD12 with R1 in case of read
@ 2023-11-29  9:36 Yann Sionneau
  2023-11-29  9:40 ` Yann Sionneau
  0 siblings, 1 reply; 4+ messages in thread
From: Yann Sionneau @ 2023-11-29  9:36 UTC (permalink / raw)
  To: barebox; +Cc: Yann Sionneau

eMMC specification JESD84-B51 states page 126
table 49 — Basic commands (class 0 and class 1) that
CMD12 (STOP_TRANSMISSION) response is R1 for read cases
and R1b for write cases.

Fix wrong reponse type in eMMC read cases.

Signed-off-by: Yann Sionneau <ysionneau@kalrayinc.com>
---
 drivers/mci/mci-core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 3cd6fc73f4..f34023f580 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -298,7 +298,8 @@ static int mci_read_block(struct mci *mci, void *dst, int blocknum,
 	ret = mci_send_cmd(mci, &cmd, &data);
 
 	if (ret || blocks > 1) {
-		mci_setup_cmd(&cmd, MMC_CMD_STOP_TRANSMISSION, 0, MMC_RSP_R1);
+		mci_setup_cmd(&cmd, MMC_CMD_STOP_TRANSMISSION, 0,
+			      IS_SD(mci) ? MMC_RSP_R1b : MMC_RSP_R1);
 		mci_send_cmd(mci, &cmd, NULL);
 	}
 	return ret;
-- 
2.42.0








^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mci: eMMC responds to CMD12 with R1 in case of read
  2023-11-29  9:36 [PATCH] mci: eMMC responds to CMD12 with R1 in case of read Yann Sionneau
@ 2023-11-29  9:40 ` Yann Sionneau
  0 siblings, 0 replies; 4+ messages in thread
From: Yann Sionneau @ 2023-11-29  9:40 UTC (permalink / raw)
  To: barebox

Please disregard this patch, I'll re-send a new one that actually applies...

On 29/11/2023 10:36, Yann Sionneau wrote:
> eMMC specification JESD84-B51 states page 126
> table 49 — Basic commands (class 0 and class 1) that
> CMD12 (STOP_TRANSMISSION) response is R1 for read cases
> and R1b for write cases.
>
> Fix wrong reponse type in eMMC read cases.
>
> Signed-off-by: Yann Sionneau <ysionneau@kalrayinc.com>
> ---
>   drivers/mci/mci-core.c | 3 ++-
>   1 file changed, 2 insertions(+), 1 deletion(-)
>
> diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
> index 3cd6fc73f4..f34023f580 100644
> --- a/drivers/mci/mci-core.c
> +++ b/drivers/mci/mci-core.c
> @@ -298,7 +298,8 @@ static int mci_read_block(struct mci *mci, void *dst, int blocknum,
>   	ret = mci_send_cmd(mci, &cmd, &data);
>   
>   	if (ret || blocks > 1) {
> -		mci_setup_cmd(&cmd, MMC_CMD_STOP_TRANSMISSION, 0, MMC_RSP_R1);
> +		mci_setup_cmd(&cmd, MMC_CMD_STOP_TRANSMISSION, 0,
> +			      IS_SD(mci) ? MMC_RSP_R1b : MMC_RSP_R1);
>   		mci_send_cmd(mci, &cmd, NULL);
>   	}
>   	return ret;







^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] mci: eMMC responds to CMD12 with R1 in case of read
  2023-11-29  9:41 Yann Sionneau
@ 2023-12-05  7:53 ` Sascha Hauer
  0 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2023-12-05  7:53 UTC (permalink / raw)
  To: Yann Sionneau; +Cc: barebox

On Wed, Nov 29, 2023 at 10:41:49AM +0100, Yann Sionneau wrote:
> eMMC specification JESD84-B51 states page 126
> table 49 — Basic commands (class 0 and class 1) that
> CMD12 (STOP_TRANSMISSION) response is R1 for read cases
> and R1b for write cases.
> 
> Fix wrong reponse type in eMMC read cases.
> 
> Signed-off-by: Yann Sionneau <ysionneau@kalrayinc.com>
> ---
>  drivers/mci/mci-core.c | 3 ++-
>  1 file changed, 2 insertions(+), 1 deletion(-)

Applied, thanks

Sascha

> 
> diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
> index 07eca96a9d..f34023f580 100644
> --- a/drivers/mci/mci-core.c
> +++ b/drivers/mci/mci-core.c
> @@ -298,7 +298,8 @@ static int mci_read_block(struct mci *mci, void *dst, int blocknum,
>  	ret = mci_send_cmd(mci, &cmd, &data);
>  
>  	if (ret || blocks > 1) {
> -		mci_setup_cmd(&cmd, MMC_CMD_STOP_TRANSMISSION, 0, MMC_RSP_R1b);
> +		mci_setup_cmd(&cmd, MMC_CMD_STOP_TRANSMISSION, 0,
> +			      IS_SD(mci) ? MMC_RSP_R1b : MMC_RSP_R1);
>  		mci_send_cmd(mci, &cmd, NULL);
>  	}
>  	return ret;
> -- 
> 2.42.0
> 
> 
> 
> 
> 
> 
> 

-- 
Pengutronix e.K.                           |                             |
Steuerwalder Str. 21                       | http://www.pengutronix.de/  |
31137 Hildesheim, Germany                  | Phone: +49-5121-206917-0    |
Amtsgericht Hildesheim, HRA 2686           | Fax:   +49-5121-206917-5555 |



^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] mci: eMMC responds to CMD12 with R1 in case of read
@ 2023-11-29  9:41 Yann Sionneau
  2023-12-05  7:53 ` Sascha Hauer
  0 siblings, 1 reply; 4+ messages in thread
From: Yann Sionneau @ 2023-11-29  9:41 UTC (permalink / raw)
  To: barebox; +Cc: Yann Sionneau

eMMC specification JESD84-B51 states page 126
table 49 — Basic commands (class 0 and class 1) that
CMD12 (STOP_TRANSMISSION) response is R1 for read cases
and R1b for write cases.

Fix wrong reponse type in eMMC read cases.

Signed-off-by: Yann Sionneau <ysionneau@kalrayinc.com>
---
 drivers/mci/mci-core.c | 3 ++-
 1 file changed, 2 insertions(+), 1 deletion(-)

diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 07eca96a9d..f34023f580 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -298,7 +298,8 @@ static int mci_read_block(struct mci *mci, void *dst, int blocknum,
 	ret = mci_send_cmd(mci, &cmd, &data);
 
 	if (ret || blocks > 1) {
-		mci_setup_cmd(&cmd, MMC_CMD_STOP_TRANSMISSION, 0, MMC_RSP_R1b);
+		mci_setup_cmd(&cmd, MMC_CMD_STOP_TRANSMISSION, 0,
+			      IS_SD(mci) ? MMC_RSP_R1b : MMC_RSP_R1);
 		mci_send_cmd(mci, &cmd, NULL);
 	}
 	return ret;
-- 
2.42.0








^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2023-12-05  7:54 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2023-11-29  9:36 [PATCH] mci: eMMC responds to CMD12 with R1 in case of read Yann Sionneau
2023-11-29  9:40 ` Yann Sionneau
2023-11-29  9:41 Yann Sionneau
2023-12-05  7:53 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox