1
0
mirror of https://xff.cz/git/u-boot/ synced 2025-09-01 16:52:14 +02:00

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>
This commit is contained in:
Jon Nettleton
2018-06-11 15:26:19 +03:00
committed by Stefano Babic
parent 31d9500498
commit 6c09eba507
2 changed files with 45 additions and 26 deletions

View File

@@ -752,6 +752,16 @@ int mmc_rpmb_write(struct mmc *mmc, void *addr, unsigned short blk,
int mmc_set_bkops_enable(struct mmc *mmc);
#endif
/**
* 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