mmc: uniphier-sd: register irqs before registering controller

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>
Link: https://lore.kernel.org/r/20230712141327.20827-1-wsa+renesas@sang-engineering.com
Signed-off-by: Ulf Hansson <ulf.hansson@linaro.org>
This commit is contained in:
Wolfram Sang 2023-07-12 16:13:27 +02:00 committed by Ulf Hansson
parent de2067448d
commit a5d8de1cb7

View file

@ -706,19 +706,19 @@ static int uniphier_sd_probe(struct platform_device *pdev)
tmio_data->max_segs = 1;
tmio_data->max_blk_count = U16_MAX;
ret = tmio_mmc_host_probe(host);
if (ret)
goto disable_clk;
sd_ctrl_write32_as_16_and_16(host, CTL_IRQ_MASK, TMIO_MASK_ALL);
ret = devm_request_irq(dev, irq, tmio_mmc_irq, IRQF_SHARED,
dev_name(dev), host);
if (ret)
goto remove_host;
goto disable_clk;
ret = tmio_mmc_host_probe(host);
if (ret)
goto disable_clk;
return 0;
remove_host:
tmio_mmc_host_remove(host);
disable_clk:
uniphier_sd_clk_disable(host);
free_host: