/* eMMC is mmc dev num 1 */
mmc_dev = find_mmc_device(1);
- emmc = (mmc_dev && mmc_get_op_cond(mmc_dev) == 0);
+ emmc = (mmc_dev && mmc_get_op_cond(mmc_dev, true) == 0);
/* if eMMC is not present then remove it from DM */
if (!emmc && mmc_dev) {
mmc = find_mmc_device(2);
if (!mmc)
return 0;
- return (mmc_get_op_cond(mmc) < 0) ? 0 : 1;
+ return (mmc_get_op_cond(mmc, true) < 0) ? 0 : 1;
}
int checkboard(void)
return mmc_power_on(mmc);
}
-int mmc_get_op_cond(struct mmc *mmc)
+int mmc_get_op_cond(struct mmc *mmc, bool quiet)
{
bool uhs_en = supports_uhs(mmc->cfg->host_caps);
int err;
if (err) {
#if !defined(CONFIG_SPL_BUILD) || defined(CONFIG_SPL_LIBCOMMON_SUPPORT)
- pr_err("Card did not respond to voltage select! : %d\n", err);
+ if (!quiet)
+ pr_err("Card did not respond to voltage select! : %d\n", err);
#endif
return -EOPNOTSUPP;
}
return -ENOMEDIUM;
}
- err = mmc_get_op_cond(mmc);
+ err = mmc_get_op_cond(mmc, false);
if (!err)
mmc->init_in_progress = 1;
* the presence of SD/eMMC when no card detect logic is available.
*
* @param mmc Pointer to a MMC device struct
+ * @param quiet Be quiet, do not print error messages when card is not detected.
* @return 0 on success, <0 on error.
*/
-int mmc_get_op_cond(struct mmc *mmc);
+int mmc_get_op_cond(struct mmc *mmc, bool quiet);
/**
* Start device initialization and return immediately; it does not block on