mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/stable/linux.git
synced 2024-10-01 22:54:01 +00:00
mmc: renesas_sdhi: register irqs before registering controller
commit 74f45de394
upstream.
IRQs should be ready to serve when we call mmc_add_host() via
tmio_mmc_host_probe(). To achieve that, ensure that all irqs are masked
before registering the handlers.
Signed-off-by: Wolfram Sang <wsa+renesas@sang-engineering.com>
Tested-by: Biju Das <biju.das.jz@bp.renesas.com>
Reviewed-by: Geert Uytterhoeven <geert+renesas@glider.be>
Tested-by: Geert Uytterhoeven <geert+renesas@glider.be>
Cc: stable@vger.kernel.org
Link: https://lore.kernel.org/r/20230712140011.18602-1-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:
parent
5294144b6a
commit
8d68582b93
1 changed files with 7 additions and 3 deletions
|
@ -975,6 +975,8 @@ int renesas_sdhi_probe(struct platform_device *pdev,
|
|||
host->sdcard_irq_setbit_mask = TMIO_STAT_ALWAYS_SET_27;
|
||||
host->sdcard_irq_mask_all = TMIO_MASK_ALL_RCAR2;
|
||||
host->reset = renesas_sdhi_reset;
|
||||
} else {
|
||||
host->sdcard_irq_mask_all = TMIO_MASK_ALL;
|
||||
}
|
||||
|
||||
/* Orginally registers were 16 bit apart, could be 32 or 64 nowadays */
|
||||
|
@ -1071,9 +1073,7 @@ int renesas_sdhi_probe(struct platform_device *pdev,
|
|||
host->ops.hs400_complete = renesas_sdhi_hs400_complete;
|
||||
}
|
||||
|
||||
ret = tmio_mmc_host_probe(host);
|
||||
if (ret < 0)
|
||||
goto edisclk;
|
||||
sd_ctrl_write32_as_16_and_16(host, CTL_IRQ_MASK, host->sdcard_irq_mask_all);
|
||||
|
||||
num_irqs = platform_irq_count(pdev);
|
||||
if (num_irqs < 0) {
|
||||
|
@ -1100,6 +1100,10 @@ int renesas_sdhi_probe(struct platform_device *pdev,
|
|||
goto eirq;
|
||||
}
|
||||
|
||||
ret = tmio_mmc_host_probe(host);
|
||||
if (ret < 0)
|
||||
goto edisclk;
|
||||
|
||||
dev_info(&pdev->dev, "%s base at %pa, max clock rate %u MHz\n",
|
||||
mmc_hostname(host->mmc), &res->start, host->mmc->f_max / 1000000);
|
||||
|
||||
|
|
Loading…
Reference in a new issue