#include <asm/mach-imx/boot_mode.h>
#include <g_dnl.h>
#include <linux/libfdt.h>
+#include <mmc.h>
DECLARE_GLOBAL_DATA_PTR;
return 0;
}
#endif
+
+#ifdef CONFIG_IMX_TRUSTY_OS
+int check_rpmb_blob(struct mmc *mmc);
+
+int mmc_image_load_late(struct mmc *mmc)
+{
+ /* Check the rpmb key blob for trusty enabled platfrom. */
+ return check_rpmb_blob(mmc);
+}
+#endif
}
#if defined(CONFIG_IMX_TRUSTY_OS)
-/* Pre-declaration of check_rpmb_blob. */
-int check_rpmb_blob(struct mmc *mmc);
int mmc_load_image_raw_sector_dual_uboot(struct spl_image_info *spl_image,
struct mmc *mmc);
#endif
+int __weak mmc_image_load_late(struct mmc *mmc)
+{
+ return 0;
+}
+
static __maybe_unused
int mmc_load_image_raw_sector(struct spl_image_info *spl_image,
struct mmc *mmc, unsigned long sector)
return -1;
}
- /* Images loaded, now check the rpmb keyblob for Trusty OS. */
-#if defined(CONFIG_IMX_TRUSTY_OS) && !defined(CONFIG_AVB_ATX)
- ret = check_rpmb_blob(mmc);
-#endif
-
+ ret = mmc_image_load_late(mmc);
return ret;
}