mmc: renesas_sdhi: use custom mask for TMIO_MASK_ALL
authorWolfram Sang <wsa+renesas@sang-engineering.com>
Thu, 4 Mar 2021 09:29:03 +0000 (10:29 +0100)
committerUlf Hansson <ulf.hansson@linaro.org>
Tue, 30 Mar 2021 09:42:01 +0000 (11:42 +0200)
Populate the new member for custom mask values to make sure this value
is applied whenever needed. Also, rename the define holding the value
because this is not only about initialization anymore.

Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Reviewed-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Tested-by: Yoshihiro Shimoda <yoshihiro.shimoda.uh@renesas.com>
Link: https://lore.kernel.org/r/20210304092903.8534-1-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/renesas_sdhi_core.c
drivers/mmc/host/tmio_mmc.h

index 158c21e5a942fbb4f699ab4478d007c8de183acb..09a5e0dafbef346edf39e2861a93ecad2f7f09b7 100644 (file)
@@ -573,7 +573,7 @@ static void renesas_sdhi_reset(struct tmio_mmc_host *host)
                               sd_scc_read32(host, priv, SH_MOBILE_SDHI_SCC_RVSCNTL));
        }
 
-       sd_ctrl_write32_as_16_and_16(host, CTL_IRQ_MASK, TMIO_MASK_INIT_RCAR2);
+       sd_ctrl_write32_as_16_and_16(host, CTL_IRQ_MASK, TMIO_MASK_ALL_RCAR2);
 
        if (sd_ctrl_read16(host, CTL_VERSION) >= SDHI_VER_GEN3_SD) {
                val = sd_ctrl_read16(host, CTL_SD_MEM_CARD_OPT);
@@ -1034,6 +1034,7 @@ int renesas_sdhi_probe(struct platform_device *pdev,
                host->ops.start_signal_voltage_switch =
                        renesas_sdhi_start_signal_voltage_switch;
                host->sdcard_irq_setbit_mask = TMIO_STAT_ALWAYS_SET_27;
+               host->sdcard_irq_mask_all = TMIO_MASK_ALL_RCAR2;
                host->reset = renesas_sdhi_reset;
        }
 
index 7d5201d6a006ebcd0f1a32728098041e54c8fe82..f936aad945ce3ea0382628fb6bd29af4e51f487f 100644 (file)
 
 /* Define some IRQ masks */
 /* This is the mask used at reset by the chip */
-#define TMIO_MASK_INIT_RCAR2   0x8b7f031d /* Initial value for R-Car Gen2+ */
 #define TMIO_MASK_ALL           0x837f031d
+#define TMIO_MASK_ALL_RCAR2    0x8b7f031d
 #define TMIO_MASK_READOP  (TMIO_STAT_RXRDY | TMIO_STAT_DATAEND)
 #define TMIO_MASK_WRITEOP (TMIO_STAT_TXRQ | TMIO_STAT_DATAEND)
 #define TMIO_MASK_CMD     (TMIO_STAT_CMDRESPEND | TMIO_STAT_CMDTIMEOUT | \