diff options
author | Heiner Kallweit <hkallweit1@gmail.com> | 2022-08-25 21:53:42 +0200 |
---|---|---|
committer | Ulf Hansson <ulf.hansson@linaro.org> | 2022-09-14 11:53:48 +0200 |
commit | 6f6fac8af6be0fe8af147ab09b81d7e9d84722ce (patch) | |
tree | f3a9fd0ca32f1300e6c2622261cea4f862e9bdd4 /drivers/mmc | |
parent | 8827f85e3010a26b18ab7401e535c80b0d023ce0 (diff) | |
download | linux-stable-6f6fac8af6be0fe8af147ab09b81d7e9d84722ce.tar.gz linux-stable-6f6fac8af6be0fe8af147ab09b81d7e9d84722ce.tar.bz2 linux-stable-6f6fac8af6be0fe8af147ab09b81d7e9d84722ce.zip |
mmc: meson-gx: adjust and re-use constant IRQ_EN_MASK
Constant IRQ_EN_MASK has no user currently. In preparation of adding
SDIO interrupt support, revive it and adjust it to our needs.
Signed-off-by: Heiner Kallweit <hkallweit1@gmail.com>
Link: https://lore.kernel.org/r/8056622f-2adf-4763-7423-9ccdf4ca78e1@gmail.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Diffstat (limited to 'drivers/mmc')
-rw-r--r-- | drivers/mmc/host/meson-gx-mmc.c | 18 |
1 files changed, 7 insertions, 11 deletions
diff --git a/drivers/mmc/host/meson-gx-mmc.c b/drivers/mmc/host/meson-gx-mmc.c index fc462995cf94..8c404390c92c 100644 --- a/drivers/mmc/host/meson-gx-mmc.c +++ b/drivers/mmc/host/meson-gx-mmc.c @@ -101,8 +101,7 @@ #define IRQ_RESP_STATUS BIT(14) #define IRQ_SDIO BIT(15) #define IRQ_EN_MASK \ - (IRQ_CRC_ERR | IRQ_TIMEOUTS | IRQ_END_OF_CHAIN | IRQ_RESP_STATUS |\ - IRQ_SDIO) + (IRQ_CRC_ERR | IRQ_TIMEOUTS | IRQ_END_OF_CHAIN) #define SD_EMMC_CMD_CFG 0x50 #define SD_EMMC_CMD_ARG 0x54 @@ -934,17 +933,16 @@ static irqreturn_t meson_mmc_irq(int irq, void *dev_id) struct meson_host *host = dev_id; struct mmc_command *cmd; struct mmc_data *data; - u32 irq_en, status, raw_status; + u32 status, raw_status; irqreturn_t ret = IRQ_NONE; - irq_en = readl(host->regs + SD_EMMC_IRQ_EN); raw_status = readl(host->regs + SD_EMMC_STATUS); - status = raw_status & irq_en; + status = raw_status & IRQ_EN_MASK; if (!status) { dev_dbg(host->dev, - "Unexpected IRQ! irq_en 0x%08x - status 0x%08x\n", - irq_en, raw_status); + "Unexpected IRQ! irq_en 0x%08lx - status 0x%08x\n", + IRQ_EN_MASK, raw_status); return IRQ_NONE; } @@ -1226,10 +1224,8 @@ static int meson_mmc_probe(struct platform_device *pdev) /* clear, ack and enable interrupts */ writel(0, host->regs + SD_EMMC_IRQ_EN); - writel(IRQ_CRC_ERR | IRQ_TIMEOUTS | IRQ_END_OF_CHAIN, - host->regs + SD_EMMC_STATUS); - writel(IRQ_CRC_ERR | IRQ_TIMEOUTS | IRQ_END_OF_CHAIN, - host->regs + SD_EMMC_IRQ_EN); + writel(IRQ_EN_MASK, host->regs + SD_EMMC_STATUS); + writel(IRQ_EN_MASK, host->regs + SD_EMMC_IRQ_EN); ret = request_threaded_irq(host->irq, meson_mmc_irq, meson_mmc_irq_thread, IRQF_ONESHOT, |