[PATCH] mci: set RCA to 2 according to eMMC specification

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxx>
---
 drivers/mci/mci-core.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

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









[Index of Archives]     [Linux Embedded]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]     [XFree86]

  Powered by Linux