mmc: meson-gx: Add reset for Response Mode Error Mask (RMEM)
Subsystems (2)
PATCH 1/1 mmc: meson-gx: Add reset for Response Mode Error Mask (RMEM)
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.
--- drivers/mmc/host/meson-gx-mmc.c | 4 ++++ 1 file changed, 4 insertions(+)
drivers/mmc/host/meson-gx-mmc.c +4 -0
@@ -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,
Signature · 1 line
Rong Chen <[email protected]>
Quoted 10 lines · On Fri, Nov 20, 2026 at 6:53 AM Rong Chen via B4 Relay…
From: Rong Chen <[email protected]>
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.
Is this a fix or just something that seems like the right thing to do?
If a fix, should it be tagged for stable kernels?
Kind regards
Uffe
Quoted 38 lines
Signed-off-by Rong Chen <[email protected]>--- drivers/mmc/host/meson-gx-mmc.c | 4 ++++ 1 file changed, 4 insertions(+)drivers/mmc/host/meson-gx-mmc.c +4
-1@@ -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-dd4b9b36cb00Best regards,
--
Rong Chen <[email protected]>