Re: [PATCH] mmc: meson-gx: Add reset for Response Mode Error Mask (RMEM)
From: Ulf Hansson
Date: Mon Nov 30 2026 - 10:54:12 EST
On Fri, Nov 20, 2026 at 6:53 AM Rong Chen via B4 Relay
<devnull+rong.chen.amlogic.com@xxxxxxxxxx> wrote:
>
> From: Rong Chen <rong.chen@xxxxxxxxxxx>
>
> 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
>
> Signed-off-by: Rong Chen <rong.chen@xxxxxxxxxxx>
> ---
> 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@xxxxxxxxxxx>
>
>