diff options
author | Yann Sionneau <ysionneau@kalrayinc.com> | 2023-11-29 09:29:56 +0100 |
---|---|---|
committer | Sascha Hauer <s.hauer@pengutronix.de> | 2023-12-05 08:52:44 +0100 |
commit | 79d2850ebc7ad4ec92797f37503db21a729e12e0 (patch) | |
tree | 9ed71433f94c005a4a3ddbb1ffd6aa88252efb0b /drivers/mci/mci-core.c | |
parent | 519a68678cd37306ae41f8ff8eb5083853232f52 (diff) | |
download | barebox-79d2850ebc7ad4ec92797f37503db21a729e12e0.tar.gz barebox-79d2850ebc7ad4ec92797f37503db21a729e12e0.tar.xz |
mci: set RCA to 2 according to eMMC specification
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>
Link: https://lore.barebox.org/20231129082956.30622-1-ysionneau@kalrayinc.com
Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de>
Diffstat (limited to 'drivers/mci/mci-core.c')
-rw-r--r-- | drivers/mci/mci-core.c | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c index 07eca96a9d..2386284398 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; } |