From a4c577f981569bf34e997cd85618f922409d6b2f Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Pali=20Roh=C3=A1r?= Date: Wed, 14 Jul 2021 16:37:29 +0200 Subject: mmc: mmc_get_op_cond: Allow quiet detection of eMMC MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Add a new 'quiet' argument to mmc_get_op_cond() function which avoids printing error message when SD/eMMC card is not detected. Espressobin and mx6cuboxi boards use this function for detecting presence of eMMC and therefore it is expected and normal that eMMC does not have to be connected. So error message "Card did not respond to voltage select!" should be skipped in this case as it is not an error. Signed-off-by: Pali Rohár Reviewed-by: Stefan Roese Acked-by: Jaehoon Chung --- drivers/mmc/mmc.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'drivers/mmc/mmc.c') diff --git a/drivers/mmc/mmc.c b/drivers/mmc/mmc.c index 1e83007..8078a89 100644 --- a/drivers/mmc/mmc.c +++ b/drivers/mmc/mmc.c @@ -2766,7 +2766,7 @@ static int mmc_power_cycle(struct mmc *mmc) 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; @@ -2842,7 +2842,8 @@ retry: 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; } @@ -2882,7 +2883,7 @@ int mmc_start_init(struct mmc *mmc) return -ENOMEDIUM; } - err = mmc_get_op_cond(mmc); + err = mmc_get_op_cond(mmc, false); if (!err) mmc->init_in_progress = 1; -- cgit v1.1