From: Sascha Hauer <sha@pengutronix.de>
To: Yann Sionneau <ysionneau@kalrayinc.com>
Cc: barebox@lists.infradead.org
Subject: Re: [PATCH] mci: set RCA to 2 according to eMMC specification
Date: Tue, 5 Dec 2023 08:52:56 +0100 [thread overview]
Message-ID: <20231205075256.GJ1057032@pengutronix.de> (raw)
In-Reply-To: <20231129082956.30622-1-ysionneau@kalrayinc.com>
On Wed, Nov 29, 2023 at 09:29:56AM +0100, Yann Sionneau wrote:
> According to eMMC Protocol Specification JESD84-B51 Section 7.5
>
> ```
> The writable 16-bit relative Device address (RCA) register carries the Device
> address assigned by the host during the Device identification. This address is
> used for the addressed host-Device communication after the Device identification
> procedure. The default value of the RCA register is 0x0001. The value 0x0000 is
> reserved to set all Devices into the Stand-by State with CMD7.
> ```
>
> So definetely 0 does not seem to be a good value.
> Second, the specification says in
> A.6 High-speed e•MMC bus functions / A.6.1 Bus initialization:
>
> ```
> 17. Send CMD3 with a chosen RCA, with value greater than 1
> ```
>
> And third, I used a VIP (Verification IP) and plugged it to a simulated host
> controller chip running Barebox and it said:
>
> ```
> MGC_EMMC: EMMC_SET_RELATIVE_ADDR_INCORR:152 - Set relative addr should be
> greater than 1. address given is = 16'h0001
> Refer to the eMMC Protocol Specification JESD84-B51 Section 7.5
> ```
>
> Note that with an RCA value of 0 or 1, the VIP would print the same error message.
>
> Set RCA to 2 instead of 0 for eMMC/MMC case.
>
> Signed-off-by: Yann Sionneau <ysionneau@kalrayinc.com>
> ---
> drivers/mci/mci-core.c | 2 +-
> 1 file changed, 1 insertion(+), 1 deletion(-)
Applied, thanks
Sascha
>
> diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
> index 6d0d647377..b9a8580927 100644
> --- a/drivers/mci/mci-core.c
> +++ b/drivers/mci/mci-core.c
> @@ -450,7 +450,7 @@ static int mmc_send_op_cond(struct mci *mci)
> mci->ocr = cmd.response[0];
>
> mci->high_capacity = ((mci->ocr & OCR_HCS) == OCR_HCS);
> - mci->rca = 0;
> + mci->rca = 2;
>
> return 0;
> }
> --
> 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 |
prev parent reply other threads:[~2023-12-05 7:54 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-11-29 8:29 Yann Sionneau
2023-12-05 7:52 ` Sascha Hauer [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20231205075256.GJ1057032@pengutronix.de \
--to=sha@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=ysionneau@kalrayinc.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox