Linux MultiMedia Card development
 help / color / mirror / Atom feed
From: Peter Geis <pgwipeout@gmail.com>
To: Jaehoon Chung <jh80.chung@samsung.com>,
	Ulf Hansson <ulf.hansson@linaro.org>,
	Heiko Stuebner <heiko@sntech.de>
Cc: Peter Geis <pgwipeout@gmail.com>,
	linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	linux-rockchip@lists.infradead.org, linux-kernel@vger.kernel.org
Subject: [PATCH] mmc: host: dw-mmc-rockchip: avoid logspam when cd-broken
Date: Mon, 28 Feb 2022 17:36:42 -0500	[thread overview]
Message-ID: <20220228223642.1136229-1-pgwipeout@gmail.com> (raw)

The dw_mmc-rockchip driver drops a large amound of logspam constantly
when the cd-broken flag is enabled.
Set the warning to be debug ratelimited in this case.

Signed-off-by: Peter Geis <pgwipeout@gmail.com>
---
 drivers/mmc/host/dw_mmc-rockchip.c | 9 +++++++--
 1 file changed, 7 insertions(+), 2 deletions(-)

diff --git a/drivers/mmc/host/dw_mmc-rockchip.c b/drivers/mmc/host/dw_mmc-rockchip.c
index 95d0ec0f5f3a..d0ebf0afa42a 100644
--- a/drivers/mmc/host/dw_mmc-rockchip.c
+++ b/drivers/mmc/host/dw_mmc-rockchip.c
@@ -50,8 +50,13 @@ static void dw_mci_rk3288_set_ios(struct dw_mci *host, struct mmc_ios *ios)
 		cclkin = ios->clock * RK3288_CLKGEN_DIV;
 
 	ret = clk_set_rate(host->ciu_clk, cclkin);
-	if (ret)
-		dev_warn(host->dev, "failed to set rate %uHz\n", ios->clock);
+	if (ret) {
+		/* this screams when card detection is broken */
+		if (host->slot->mmc->caps & MMC_CAP_NEEDS_POLL)
+			dev_dbg_ratelimited(host->dev, "failed to set rate %uHz\n", ios->clock);
+		else
+			dev_warn(host->dev, "failed to set rate %uHz\n", ios->clock);
+	}
 
 	bus_hz = clk_get_rate(host->ciu_clk) / RK3288_CLKGEN_DIV;
 	if (bus_hz != host->bus_hz) {
-- 
2.25.1


             reply	other threads:[~2022-02-28 22:36 UTC|newest]

Thread overview: 10+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-02-28 22:36 Peter Geis [this message]
2022-03-01 11:23 ` [PATCH] mmc: host: dw-mmc-rockchip: avoid logspam when cd-broken Robin Murphy
2022-03-01 11:49   ` Peter Geis
2022-03-01 12:38     ` Robin Murphy
2022-03-01 12:46       ` Peter Geis
2022-03-01 14:49         ` Peter Geis
2022-03-01 16:03           ` Robin Murphy
2022-03-02 10:22           ` Ulf Hansson
2022-03-02  1:03 ` Shawn Lin
2022-03-02  1:21   ` Peter Geis

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20220228223642.1136229-1-pgwipeout@gmail.com \
    --to=pgwipeout@gmail.com \
    --cc=heiko@sntech.de \
    --cc=jh80.chung@samsung.com \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=linux-rockchip@lists.infradead.org \
    --cc=ulf.hansson@linaro.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox