[PATCH 2/9] mci: core: add cbx extraction function

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

 



The CBX field is only present for eMMC and designates the type:

00 - Device (Removable)
01 - BGA (Discrete embedded)
10 - POP
11 - Reserved

Signed-off-by: Stefan Kerkmann <s.kerkmann@xxxxxxxxxxxxxx>
---
 drivers/mci/mci-core.c | 11 +++++++++++
 1 file changed, 11 insertions(+)

diff --git a/drivers/mci/mci-core.c b/drivers/mci/mci-core.c
index 07ac7dd512..2a71fdd39a 100644
--- a/drivers/mci/mci-core.c
+++ b/drivers/mci/mci-core.c
@@ -1917,6 +1917,17 @@ static unsigned extract_mid(struct mci *mci)
 		return UNSTUFF_BITS(mci->cid, 120, 8);
 }
 
+/**
+ * Extract the CBX from the CID
+ * @param mci Instance data
+ *
+ * The 'CBX' is encoded in bit 113:112 in the CID and only present in MMC cards
+ */
+static unsigned extract_cbx(struct mci *mci)
+{
+	return UNSTUFF_BITS(mci->cid, 112, 2);
+}
+
 /**
  * Extract the OEM/Application ID from the CID
  * @param mci Instance data

-- 
2.39.2





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

  Powered by Linux