aboutsummaryrefslogtreecommitdiff
path: root/include/mmc.h
diff options
context:
space:
mode:
authorJon Nettleton2018-06-11 15:26:19 +0300
committerStefano Babic2018-07-23 10:17:04 +0200
commit6c09eba507f9f78cfc96db760d064d70d691e9b9 (patch)
treea89409542bf787b5033d24adeb898206a5f2ef33 /include/mmc.h
parent31d9500498b9c9c4eff6a5b1075db7ea4a2db165 (diff)
mmc: break out get_op_cond code to its own function
This code is useful for testing the existance of devices that do not have card detect capabilities. This breaks out the core functionality and leaves the actual init logic and error reporting in mmc_start_init(). Signed-off-by: Jon Nettleton <jon@solid-run.com> Signed-off-by: Baruch Siach <baruch@tkos.co.il> Reviewed-by: Stefano Babic <sbabic@denx.de>
Diffstat (limited to 'include/mmc.h')
-rw-r--r--include/mmc.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/include/mmc.h b/include/mmc.h
index 1729292d27b..df4255b828a 100644
--- a/include/mmc.h
+++ b/include/mmc.h
@@ -754,6 +754,16 @@ int mmc_set_bkops_enable(struct mmc *mmc);
/**
* Start device initialization and return immediately; it does not block on
+ * polling OCR (operation condition register) status. Useful for checking
+ * the presence of SD/eMMC when no card detect logic is available.
+ *
+ * @param mmc Pointer to a MMC device struct
+ * @return 0 on success, <0 on error.
+ */
+int mmc_get_op_cond(struct mmc *mmc);
+
+/**
+ * Start device initialization and return immediately; it does not block on
* polling OCR (operation condition register) status. Then you should call
* mmc_init, which would block on polling OCR status and complete the device
* initializatin.