mirror of https://lore.kernel.org/lkml/
 help / color / mirror / Atom feed
From: Rong Chen via B4 Relay <devnull+rong.chen.amlogic.com@kernel.org>
To: Ulf Hansson <ulfh@kernel.org>,
	 Neil Armstrong <neil.armstrong@linaro.org>,
	 Kevin Hilman <khilman@baylibre.com>,
	Jerome Brunet <jbrunet@baylibre.com>,
	 Martin Blumenstingl <martin.blumenstingl@googlemail.com>
Cc: linux-mmc@vger.kernel.org, linux-arm-kernel@lists.infradead.org,
	 linux-amlogic@lists.infradead.org, linux-kernel@vger.kernel.org,
	 Rong Chen <rong.chen@amlogic.com>
Subject: [PATCH] mmc: meson-gx: Add reset for Response Mode Error Mask (RMEM)
Date: Fri, 20 Nov 2026 13:53:23 +0800	[thread overview]
Message-ID: <20261120-a4_mmc-v1-1-5a84cbcdcace@amlogic.com> (raw)

From: Rong Chen <rong.chen@amlogic.com>

For T7 and older SoC families, the RMEM has no effect. Starting from
the SoC family A4, RMEM acts as an interrupt mask for the device status
field received in R1/R1b responses.

By setting RMEM to zero, the device status is ignored, thereby
preventing controller hangs caused by spurious IRQs under specific
device states.

Signed-off-by: Rong Chen <rong.chen@amlogic.com>
---
 drivers/mmc/host/meson-gx-mmc.c | 4 ++++
 1 file changed, 4 insertions(+)

diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c
index 49df33bbd8e5..9d9b00b199b6 100644
--- a/drivers/mmc/host/meson-gx-mmc.c
+++ b/drivers/mmc/host/meson-gx-mmc.c
@@ -113,6 +113,7 @@
 #define SD_EMMC_CMD_RSP1 0x60
 #define SD_EMMC_CMD_RSP2 0x64
 #define SD_EMMC_CMD_RSP3 0x68
+#define SD_EMMC_CMD_RMEM 0x150
 
 #define SD_EMMC_RXD 0x94
 #define SD_EMMC_TXD 0x94
@@ -1086,6 +1087,9 @@ static void meson_mmc_cfg_init(struct meson_host *host)
 	cfg |= CFG_ERR_ABORT;
 
 	writel(cfg, host->regs + SD_EMMC_CFG);
+
+	/* ignore status in response */
+	writel(0x0, host->regs + SD_EMMC_CMD_RMEM);
 }
 
 static int meson_mmc_card_busy(struct mmc_host *mmc)

---
base-commit: d2616724e01132376c78872b8324f38659af9f28
change-id: 20261120-a4_mmc-dd4b9b36cb00

Best regards,
-- 
Rong Chen <rong.chen@amlogic.com>



                 reply	other threads:[~2026-11-20  5:53 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

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=20261120-a4_mmc-v1-1-5a84cbcdcace@amlogic.com \
    --to=devnull+rong.chen.amlogic.com@kernel.org \
    --cc=jbrunet@baylibre.com \
    --cc=khilman@baylibre.com \
    --cc=linux-amlogic@lists.infradead.org \
    --cc=linux-arm-kernel@lists.infradead.org \
    --cc=linux-kernel@vger.kernel.org \
    --cc=linux-mmc@vger.kernel.org \
    --cc=martin.blumenstingl@googlemail.com \
    --cc=neil.armstrong@linaro.org \
    --cc=rong.chen@amlogic.com \
    --cc=ulfh@kernel.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

all inboxes | Powered by JetHome®