summaryrefslogtreecommitdiffstats
path: root/include/mmc.h
diff options
context:
space:
mode:
authorSimon Glass <sjg@chromium.org>2015-06-23 15:38:48 -0600
committerSimon Glass <sjg@chromium.org>2015-07-21 17:39:25 -0600
commite7ecf7cb5a6b873daf2d88daf03034d51fad4acc (patch)
treed7bc50bfa1fc488a40f5a05795325c03653a0417 /include/mmc.h
parentfdfa39d3f20b669b0cdb8f5e934003e5689fd911 (diff)
downloadblackbird-obmc-uboot-e7ecf7cb5a6b873daf2d88daf03034d51fad4acc.tar.gz
blackbird-obmc-uboot-e7ecf7cb5a6b873daf2d88daf03034d51fad4acc.zip
dm: mmc: Add an MMC uclass
Add basic support for MMC, providing a uclass which can set up an MMC device. This allows MMC drivers to move to using driver model. Signed-off-by: Simon Glass <sjg@chromium.org>
Diffstat (limited to 'include/mmc.h')
-rw-r--r--include/mmc.h22
1 files changed, 22 insertions, 0 deletions
diff --git a/include/mmc.h b/include/mmc.h
index dd98b3b8ac..cda9a19ce0 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -266,6 +266,28 @@
#define MMC_NUM_BOOT_PARTITION 2
#define MMC_PART_RPMB 3 /* RPMB partition number */
+/* Driver model support */
+
+/**
+ * struct mmc_uclass_priv - Holds information about a device used by the uclass
+ */
+struct mmc_uclass_priv {
+ struct mmc *mmc;
+};
+
+/**
+ * mmc_get_mmc_dev() - get the MMC struct pointer for a device
+ *
+ * Provided that the device is already probed and ready for use, this value
+ * will be available.
+ *
+ * @dev: Device
+ * @return associated mmc struct pointer if available, else NULL
+ */
+struct mmc *mmc_get_mmc_dev(struct udevice *dev);
+
+/* End of driver model support */
+
struct mmc_cid {
unsigned long psn;
unsigned short oid;
OpenPOWER on IntegriCloud