* [PATCH] MIPS: lantiq: irq: register the interrupt controllers with irqchip_init
@ 2021-01-09 19:53 Martin Blumenstingl
2021-01-13 10:40 ` Thomas Bogendoerfer
0 siblings, 1 reply; 2+ messages in thread
From: Martin Blumenstingl @ 2021-01-09 19:53 UTC (permalink / raw)
To: linux-mips; +Cc: tsbogend, linux-kernel, john, hauke, Martin Blumenstingl
Add support for more interrupt controllers by switching from
of_irq_init() to irqchip_init() in Lantiq's arch_init_irq(). This
requires switching the ICU interrupt controller to use
IRQCHIP_DECLARE(), like a real irqchip driver would do.
This is needed for future changes when new irqchip drivers are
implemented:
- a dedicated driver for the EIU interrupt controller
- a driver for the MSI PIC (Programmable Interrupt Controller) found on
VRX200 and newer SoCs
- ..or any other driver which uses IRQCHIP_DECLARE
Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
---
arch/mips/lantiq/irq.c | 8 +++-----
1 file changed, 3 insertions(+), 5 deletions(-)
diff --git a/arch/mips/lantiq/irq.c b/arch/mips/lantiq/irq.c
index df8eed3875f6..76806d11e483 100644
--- a/arch/mips/lantiq/irq.c
+++ b/arch/mips/lantiq/irq.c
@@ -8,6 +8,7 @@
#include <linux/interrupt.h>
#include <linux/ioport.h>
#include <linux/sched.h>
+#include <linux/irqchip.h>
#include <linux/irqdomain.h>
#include <linux/of_platform.h>
#include <linux/of_address.h>
@@ -422,12 +423,9 @@ unsigned int get_c0_compare_int(void)
return CP0_LEGACY_COMPARE_IRQ;
}
-static const struct of_device_id of_irq_ids[] __initconst = {
- { .compatible = "lantiq,icu", .data = icu_of_init },
- {},
-};
+IRQCHIP_DECLARE(lantiq_icu, "lantiq,icu", icu_of_init);
void __init arch_init_irq(void)
{
- of_irq_init(of_irq_ids);
+ irqchip_init();
}
--
2.30.0
^ permalink raw reply related [flat|nested] 2+ messages in thread
* Re: [PATCH] MIPS: lantiq: irq: register the interrupt controllers with irqchip_init
2021-01-09 19:53 [PATCH] MIPS: lantiq: irq: register the interrupt controllers with irqchip_init Martin Blumenstingl
@ 2021-01-13 10:40 ` Thomas Bogendoerfer
0 siblings, 0 replies; 2+ messages in thread
From: Thomas Bogendoerfer @ 2021-01-13 10:40 UTC (permalink / raw)
To: Martin Blumenstingl; +Cc: linux-mips, linux-kernel, john, hauke
On Sat, Jan 09, 2021 at 08:53:51PM +0100, Martin Blumenstingl wrote:
> Add support for more interrupt controllers by switching from
> of_irq_init() to irqchip_init() in Lantiq's arch_init_irq(). This
> requires switching the ICU interrupt controller to use
> IRQCHIP_DECLARE(), like a real irqchip driver would do.
>
> This is needed for future changes when new irqchip drivers are
> implemented:
> - a dedicated driver for the EIU interrupt controller
> - a driver for the MSI PIC (Programmable Interrupt Controller) found on
> VRX200 and newer SoCs
> - ..or any other driver which uses IRQCHIP_DECLARE
>
> Signed-off-by: Martin Blumenstingl <martin.blumenstingl@googlemail.com>
> ---
> arch/mips/lantiq/irq.c | 8 +++-----
> 1 file changed, 3 insertions(+), 5 deletions(-)
applied to mips-next.
Thomas.
--
Crap can work. Given enough thrust pigs will fly, but it's not necessarily a
good idea. [ RFC1925, 2.3 ]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2021-01-13 10:44 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2021-01-09 19:53 [PATCH] MIPS: lantiq: irq: register the interrupt controllers with irqchip_init Martin Blumenstingl
2021-01-13 10:40 ` Thomas Bogendoerfer
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).