Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

irqchip/irq-brcmstb-l2: Switch to IRQCHIP_PLATFORM_DRIVER

Allow the user selection and building of this interrupt controller
driver as a module since it is used on ARM/ARM64 based systems as a
second level interrupt controller hanging off the ARM GIC and is
therefore loadable during boot.

Signed-off-by: Florian Fainelli <f.fainelli@gmail.com>
Signed-off-by: Marc Zyngier <maz@kernel.org>
Link: https://lore.kernel.org/r/20211020184859.2705451-9-f.fainelli@gmail.com

authored by

Florian Fainelli and committed by
Marc Zyngier
51d9db5c fcd0f63d

+12 -8
+3 -1
drivers/irqchip/Kconfig
··· 128 128 select IRQ_DOMAIN 129 129 130 130 config BRCMSTB_L2_IRQ 131 - bool 131 + tristate "Broadcom STB generic L2 interrupt controller driver" 132 + depends on ARCH_BCM2835 || ARCH_BRCMSTB || BMIPS_GENERIC 133 + default ARCH_BCM2835 || ARCH_BRCMSTB || BMIPS_GENERIC 132 134 select GENERIC_IRQ_CHIP 133 135 select IRQ_DOMAIN 134 136
+9 -7
drivers/irqchip/irq-brcmstb-l2.c
··· 275 275 { 276 276 return brcmstb_l2_intc_of_init(np, parent, &l2_edge_intc_init); 277 277 } 278 - IRQCHIP_DECLARE(brcmstb_l2_intc, "brcm,l2-intc", brcmstb_l2_edge_intc_of_init); 279 - IRQCHIP_DECLARE(brcmstb_hif_spi_l2_intc, "brcm,hif-spi-l2-intc", 280 - brcmstb_l2_edge_intc_of_init); 281 - IRQCHIP_DECLARE(brcmstb_upg_aux_aon_l2_intc, "brcm,upg-aux-aon-l2-intc", 282 - brcmstb_l2_edge_intc_of_init); 283 278 284 279 static int __init brcmstb_l2_lvl_intc_of_init(struct device_node *np, 285 280 struct device_node *parent) 286 281 { 287 282 return brcmstb_l2_intc_of_init(np, parent, &l2_lvl_intc_init); 288 283 } 289 - IRQCHIP_DECLARE(bcm7271_l2_intc, "brcm,bcm7271-l2-intc", 290 - brcmstb_l2_lvl_intc_of_init); 284 + 285 + IRQCHIP_PLATFORM_DRIVER_BEGIN(brcmstb_l2) 286 + IRQCHIP_MATCH("brcm,l2-intc", brcmstb_l2_edge_intc_of_init) 287 + IRQCHIP_MATCH("brcm,hif-spi-l2-intc", brcmstb_l2_edge_intc_of_init) 288 + IRQCHIP_MATCH("brcm,upg-aux-aon-l2-intc", brcmstb_l2_edge_intc_of_init) 289 + IRQCHIP_MATCH("brcm,bcm7271-l2-intc", brcmstb_l2_lvl_intc_of_init) 290 + IRQCHIP_PLATFORM_DRIVER_END(brcmstb_l2) 291 + MODULE_DESCRIPTION("Broadcom STB generic L2 interrupt controller"); 292 + MODULE_LICENSE("GPL v2");