Skip to contentSkip to conversation

mmc: sdhci-of-dwcmshc: downgrade HS200/HS400 clock-reduce message to dev_dbg

PATCH In review Jun Yan 4 participants 4 messages Oct 9 – Oct 30

Subsystems (2)
lore
Share & tools
lore

Jun Yan

author
#0 lore raw

PATCH 1/1 mmc: sdhci-of-dwcmshc: downgrade HS200/HS400 clock-reduce message to dev_dbg

dwcmshc_rk3568_set_clock() refuses to lower the bus clock below 52 MHz when the eMMC is in HS200/HS400 mode, since those modes require a minimum 52 MHz bus clock. This is expected behaviour, but it is currently reported at dev_err level and therefore fires on every boot and on every suspend/resume cycle, cluttering the kernel log.

Demote the message to dev_dbg so it stays out of the default log while remaining available via dynamic debug.

---
 drivers/mmc/host/sdhci-of-dwcmshc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/sdhci-of-dwcmshc.c +1 -1
index c688f3eaf468..b4fb1c1e6d99 100644
@@ -790,7 +790,7 @@ static void dwcmshc_rk3568_set_clock(struct sdhci_host *host, unsigned int clock
 	if (clock <= 52000000) {
 		if (host->mmc->ios.timing == MMC_TIMING_MMC_HS200 ||
 		    host->mmc->ios.timing == MMC_TIMING_MMC_HS400) {
-			dev_err(mmc_dev(host->mmc),
+			dev_dbg(mmc_dev(host->mmc),
 				"Can't reduce the clock below 52MHz in HS200/HS400 mode");
 			goto enable_clk;
 		}
Signature · 1 line
2.56.0
Reviewed-by on v1 1/1
#1 lore raw

Hi Jun

Quoted 9 lines · Jun Yan

dwcmshc_rk3568_set_clock() refuses to lower the bus clock below 52 MHz when the eMMC is in HS200/HS400 mode, since those modes require a minimum 52 MHz bus clock. This is expected behaviour, but it is currently reported at dev_err level and therefore fires on every boot and on every suspend/resume cycle, cluttering the kernel log.

Demote the message to dev_dbg so it stays out of the default log while remaining available via dynamic debug.

ios.clock and ios.timing are independent fields, updated by the MMC core through separate calls. During card init, the core will hit this that clock <= 52 MHz but timing in {HS200, HS400}, so it is a normal, intermediate state, not an error. So the message on every boot.

Changes it to dev_dbg is fine to me:

Thanks.

Quoted 18 lines
---
  drivers/mmc/host/sdhci-of-dwcmshc.c | 2 +-
  1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/sdhci-of-dwcmshc.c +1 -1
index c688f3eaf468..b4fb1c1e6d99 100644
@@ -790,7 +790,7 @@ static void dwcmshc_rk3568_set_clock(struct sdhci_host *host, unsigned int clock
  	if (clock <= 52000000) {
  		if (host->mmc->ios.timing == MMC_TIMING_MMC_HS200 ||
  		    host->mmc->ios.timing == MMC_TIMING_MMC_HS400) {
-			dev_err(mmc_dev(host->mmc),
+			dev_dbg(mmc_dev(host->mmc),
  				"Can't reduce the clock below 52MHz in HS200/HS400 mode");
  			goto enable_clk;
  		}
maintainer Acked-by on v1 1/1
#2 lore raw
In reply to Jun Yan
Quoted 10 lines · Jun Yan

dwcmshc_rk3568_set_clock() refuses to lower the bus clock below 52 MHz when the eMMC is in HS200/HS400 mode, since those modes require a minimum 52 MHz bus clock. This is expected behaviour, but it is currently reported at dev_err level and therefore fires on every boot and on every suspend/resume cycle, cluttering the kernel log.

Demote the message to dev_dbg so it stays out of the default log while remaining available via dynamic debug.

Quoted 17 lines
---
 drivers/mmc/host/sdhci-of-dwcmshc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/sdhci-of-dwcmshc.c +1 -1
index c688f3eaf468..b4fb1c1e6d99 100644
@@ -790,7 +790,7 @@ static void dwcmshc_rk3568_set_clock(struct sdhci_host *host, unsigned int clock
 	if (clock <= 52000000) {
 		if (host->mmc->ios.timing == MMC_TIMING_MMC_HS200 ||
 		    host->mmc->ios.timing == MMC_TIMING_MMC_HS400) {
-			dev_err(mmc_dev(host->mmc),
+			dev_dbg(mmc_dev(host->mmc),
 				"Can't reduce the clock below 52MHz in HS200/HS400 mode");
 			goto enable_clk;
 		}
#3 lore raw
In reply to Jun Yan
Quoted 11 lines · Jun Yan

dwcmshc_rk3568_set_clock() refuses to lower the bus clock below 52 MHz when the eMMC is in HS200/HS400 mode, since those modes require a minimum 52 MHz bus clock. This is expected behaviour, but it is currently reported at dev_err level and therefore fires on every boot and on every suspend/resume cycle, cluttering the kernel log.

Demote the message to dev_dbg so it stays out of the default log while remaining available via dynamic debug.

Applied for next, thanks!

Kind regards
Uffe

Quoted 20 lines
---
 drivers/mmc/host/sdhci-of-dwcmshc.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)
drivers/mmc/host/sdhci-of-dwcmshc.c +1 -2
index c688f3eaf468..b4fb1c1e6d99 100644
@@ -790,7 +790,7 @@ static void dwcmshc_rk3568_set_clock(struct sdhci_host *host, unsigned int clock
        if (clock <= 52000000) {
                if (host->mmc->ios.timing == MMC_TIMING_MMC_HS200 ||
                    host->mmc->ios.timing == MMC_TIMING_MMC_HS400) {
-                       dev_err(mmc_dev(host->mmc),
+                       dev_dbg(mmc_dev(host->mmc),
                                "Can't reduce the clock below 52MHz in HS200/HS400 mode");
                        goto enable_clk;
                }
--

2.56.0