mirror of
https://github.com/u-boot/u-boot.git
synced 2025-04-23 13:56:20 +00:00
drivers:optee:rpmb: initialize drivers of mmc devices in UCLASS_BLK for rpmb access
CONFIG_MMC only initializes drivers for devices in UCLASS_MMC, we need to initialize drivers for devices of type IF_TYPE_MMC in UCLASS_BLK as well because they are the child devices of devices in UCLASS_MMC. This is required for feature RPMB since it will access eMMC in optee-os. Signed-off-by: Judy Wang <wangjudy@microsoft.com> [trini: Add my SoB line and adjust Judy's name in git, having emailed off-list] Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
parent
fb84517d52
commit
05947cb1d8
1 changed files with 9 additions and 0 deletions
|
@ -72,6 +72,10 @@ static struct mmc *get_mmc(struct optee_private *priv, int dev_id)
|
||||||
debug("Cannot find RPMB device\n");
|
debug("Cannot find RPMB device\n");
|
||||||
return NULL;
|
return NULL;
|
||||||
}
|
}
|
||||||
|
if (mmc_init(mmc)) {
|
||||||
|
log(LOGC_BOARD, LOGL_ERR, "%s:MMC device %d init failed\n", __func__, dev_id);
|
||||||
|
return NULL;
|
||||||
|
}
|
||||||
if (!(mmc->version & MMC_VERSION_MMC)) {
|
if (!(mmc->version & MMC_VERSION_MMC)) {
|
||||||
debug("Device id %d is not an eMMC device\n", dev_id);
|
debug("Device id %d is not an eMMC device\n", dev_id);
|
||||||
return NULL;
|
return NULL;
|
||||||
|
@ -104,6 +108,11 @@ static u32 rpmb_get_dev_info(u16 dev_id, struct rpmb_dev_info *info)
|
||||||
if (!mmc)
|
if (!mmc)
|
||||||
return TEE_ERROR_ITEM_NOT_FOUND;
|
return TEE_ERROR_ITEM_NOT_FOUND;
|
||||||
|
|
||||||
|
if (mmc_init(mmc)) {
|
||||||
|
log(LOGC_BOARD, LOGL_ERR, "%s:MMC device %d init failed\n", __func__, dev_id);
|
||||||
|
return TEE_ERROR_NOT_SUPPORTED;
|
||||||
|
}
|
||||||
|
|
||||||
if (!mmc->ext_csd)
|
if (!mmc->ext_csd)
|
||||||
return TEE_ERROR_GENERIC;
|
return TEE_ERROR_GENERIC;
|
||||||
|
|
||||||
|
|
Loading…
Add table
Reference in a new issue