drivers/mmc/host/uniphier-sd.c | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-)
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>
---
So, I converted this other TMIO core user as well. But I don't have HW
to test, so it would be great if someone could step up and test it.
drivers/mmc/host/uniphier-sd.c | 12 ++++++------
1 file changed, 6 insertions(+), 6 deletions(-)
diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c
index 61acd69fac0e..4dc079f74c1b 100644
--- a/drivers/mmc/host/uniphier-sd.c
+++ b/drivers/mmc/host/uniphier-sd.c
@@ -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:
--
2.30.2
On Wed, 12 Jul 2023 at 16:13, Wolfram Sang <wsa+renesas@sang-engineering.com> wrote: > > 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> Applied for next so we can get it tested in linux-next, thanks! Kind regards Uffe > --- > > So, I converted this other TMIO core user as well. But I don't have HW > to test, so it would be great if someone could step up and test it. > > drivers/mmc/host/uniphier-sd.c | 12 ++++++------ > 1 file changed, 6 insertions(+), 6 deletions(-) > > diff --git a/drivers/mmc/host/uniphier-sd.c b/drivers/mmc/host/uniphier-sd.c > index 61acd69fac0e..4dc079f74c1b 100644 > --- a/drivers/mmc/host/uniphier-sd.c > +++ b/drivers/mmc/host/uniphier-sd.c > @@ -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: > -- > 2.30.2 >
© 2016 - 2026 Red Hat, Inc.