linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH] Revert "irqchip/mtk-sysirq: Convert to a platform driver"
@ 2020-08-19 16:19 Enric Balletbo i Serra
       [not found] ` <C9E59107-CE83-4554-9447-5DE5BEE09A3B@fw-web.de>
  0 siblings, 1 reply; 13+ messages in thread
From: Enric Balletbo i Serra @ 2020-08-19 16:19 UTC (permalink / raw)
  To: linux-kernel
  Cc: drinkcat, Jason Cooper, Saravana Kannan, Marc Zyngier, Hanks Chen,
	linux-mediatek, hsinyi, matthias.bgg, Frank Wunderlich,
	Collabora Kernel ML, Thomas Gleixner, linux-arm-kernel

This reverts commit f97dbf48ca43009e8b8bcdf07f47fc9f06149b36.

Although converting to a platform driver sounds good, doing this for the
MediaTek devices has a side effect, the probe of the driver is delayed
and the interrupt controller is not available for other drivers when
they probe. For MT8173 that means that the `systimer` and `mtk_cmdq`
drivers will fail to probe with the following errors:

  [    0.000197] Failed to map interrupt for /soc/timer@10008000
  [    0.000209] Failed to initialize '/soc/timer@10008000': -22
  [    0.067386] mtk_cmdq 10212000.mailbox: failed to register ISR (-22)

For MT8183, apart from the above errors, you will get the `pinctrl`
driver without the EINT support, because the `pinctrl` is probed before
the interrupt controller, for what is worth, then it doesn't booting
properly.

  [    0.062309] mt8183-pinctrl 10005000.pinctrl: Failed to add EINT, but pinctrl still can work

While deferring these drivers until the irqchip is available could be an
option, at this point, seems reasonable to revert this commit for now until
all these drivers are properly handling/deferring when the irqchip is not
available.

Cc: Saravana Kannan <saravanak@google.com>
Cc: Marc Zyngier <maz@kernel.org>
Cc: Hanks Chen <hanks.chen@mediatek.com>
Fixes: f97dbf48ca43 ("irqchip/mtk-sysirq: Convert to a platform driver")
Signed-off-by: Enric Balletbo i Serra <enric.balletbo@collabora.com>
---

 drivers/irqchip/irq-mtk-sysirq.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/irqchip/irq-mtk-sysirq.c b/drivers/irqchip/irq-mtk-sysirq.c
index 7299c5ab4d10..6ff98b87e5c0 100644
--- a/drivers/irqchip/irq-mtk-sysirq.c
+++ b/drivers/irqchip/irq-mtk-sysirq.c
@@ -231,6 +231,4 @@ static int __init mtk_sysirq_of_init(struct device_node *node,
 	kfree(chip_data);
 	return ret;
 }
-IRQCHIP_PLATFORM_DRIVER_BEGIN(mtk_sysirq)
-IRQCHIP_MATCH("mediatek,mt6577-sysirq", mtk_sysirq_of_init)
-IRQCHIP_PLATFORM_DRIVER_END(mtk_sysirq)
+IRQCHIP_DECLARE(mtk_sysirq, "mediatek,mt6577-sysirq", mtk_sysirq_of_init);
-- 
2.28.0


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 13+ messages in thread
* [PATCH] Revert "irqchip/mtk-sysirq: Convert to a platform driver"
@ 2020-08-17 14:57 Frank Wunderlich
  2020-08-17 15:04 ` Enric Balletbo Serra
  2020-08-17 15:27 ` Marc Zyngier
  0 siblings, 2 replies; 13+ messages in thread
From: Frank Wunderlich @ 2020-08-17 14:57 UTC (permalink / raw)
  To: linux-mediatek
  Cc: Jason Cooper, Frank Wunderlich, Marc Zyngier, linux-kernel,
	Matthias Brugger, Thomas Gleixner, linux-arm-kernel

From: Frank Wunderlich <frank-w@public-files.de>

This reverts commit f97dbf48ca43009e8b8bcdf07f47fc9f06149b36 which
breaks bootup of arm/arm64 devices like bananapi-r2/mt7623 and
bananapi-r64/mt7622

Signed-off-by: Frank Wunderlich <frank-w@public-files.de>
---
 drivers/irqchip/irq-mtk-sysirq.c | 4 +---
 1 file changed, 1 insertion(+), 3 deletions(-)

diff --git a/drivers/irqchip/irq-mtk-sysirq.c b/drivers/irqchip/irq-mtk-sysirq.c
index 7299c5ab4d10..6ff98b87e5c0 100644
--- a/drivers/irqchip/irq-mtk-sysirq.c
+++ b/drivers/irqchip/irq-mtk-sysirq.c
@@ -231,6 +231,4 @@ static int __init mtk_sysirq_of_init(struct device_node *node,
 	kfree(chip_data);
 	return ret;
 }
-IRQCHIP_PLATFORM_DRIVER_BEGIN(mtk_sysirq)
-IRQCHIP_MATCH("mediatek,mt6577-sysirq", mtk_sysirq_of_init)
-IRQCHIP_PLATFORM_DRIVER_END(mtk_sysirq)
+IRQCHIP_DECLARE(mtk_sysirq, "mediatek,mt6577-sysirq", mtk_sysirq_of_init);
-- 
2.25.1


_______________________________________________
linux-arm-kernel mailing list
linux-arm-kernel@lists.infradead.org
http://lists.infradead.org/mailman/listinfo/linux-arm-kernel

^ permalink raw reply related	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2020-08-21 14:15 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2020-08-19 16:19 [PATCH] Revert "irqchip/mtk-sysirq: Convert to a platform driver" Enric Balletbo i Serra
     [not found] ` <C9E59107-CE83-4554-9447-5DE5BEE09A3B@fw-web.de>
2020-08-19 18:51   ` Saravana Kannan
2020-08-20  7:56     ` Marc Zyngier
2020-08-20  8:07       ` Saravana Kannan
2020-08-20 14:53         ` Marc Zyngier
2020-08-20 19:39           ` Saravana Kannan
2020-08-21  9:20           ` Enric Balletbo i Serra
2020-08-21 10:17             ` Marc Zyngier
2020-08-21 14:03               ` Frank Wunderlich
  -- strict thread matches above, loose matches on Subject: below --
2020-08-17 14:57 Frank Wunderlich
2020-08-17 15:04 ` Enric Balletbo Serra
2020-08-21 14:07   ` Frank Wunderlich
2020-08-17 15:27 ` Marc Zyngier

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).