mmc: dw_mmc: Drop use of ->init_card() callback
authorUlf Hansson <ulf.hansson@linaro.org>
Wed, 20 Oct 2021 10:29:07 +0000 (12:29 +0200)
committerUlf Hansson <ulf.hansson@linaro.org>
Thu, 21 Oct 2021 19:47:30 +0000 (21:47 +0200)
commit61840edc88138cb7e274ac530aeec6de36fbf386
tree30e409e5d18b51522474113de7f5a26aeefb1ee2
parentf85a15c5efe1d7d2c4e3ed069a3b8b7653cb6a0d
mmc: dw_mmc: Drop use of ->init_card() callback

For dw_mmc, the ->init_card() callback is being used to turn on/off
automatic internal clock gating for powersave, which is needed to properly
support SDIO irqs on DAT1.

However, using the ->init_card() comes with a drawback in this case, as it
means that the powersave feature becomes disabled, no matter whether the
SDIO irqs becomes turned on or not. To improve the behaviour, let's change
into using the ->enable_sdio_irq() callback instead. This works fine,
because dw_mmc uses sdio_signal_irq() to signal the irqs, thus the
->enable_sdio_irq() is never executed from within atomic context.

Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Reviewed-by: Douglas Anderson <dianders@chromium.org>
Link: https://lore.kernel.org/r/20211020102907.70195-1-ulf.hansson@linaro.org
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
drivers/mmc/host/dw_mmc.c