Commit a5d8de1c authored by Wolfram Sang's avatar Wolfram Sang Committed by Ulf Hansson

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: default avatarWolfram Sang <wsa+renesas@sang-engineering.com>
Link: https://lore.kernel.org/r/20230712141327.20827-1-wsa+renesas@sang-engineering.comSigned-off-by: default avatarUlf Hansson <ulf.hansson@linaro.org>
parent de206744
......@@ -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:
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment