From c83227a5d05ed77b634ce4c2fc5f143ae2a4d6f5 Mon Sep 17 00:00:00 2001 From: Linus Walleij Date: Thu, 21 Apr 2022 22:06:54 +0200 Subject: irq/gpio: ixp4xx: Drop boardfile probe path The boardfiles for IXP4xx have been deleted. Delete all the quirks and code dealing with that boot path and rely solely on device tree boot. Fix some missing static keywords that the kernel test robot was complaining about while we're at it. Cc: Bartosz Golaszewski Acked-by: Marc Zyngier Signed-off-by: Linus Walleij Signed-off-by: Bartosz Golaszewski --- drivers/irqchip/irq-ixp4xx.c | 126 ++----------------------------------------- 1 file changed, 4 insertions(+), 122 deletions(-) (limited to 'drivers/irqchip') diff --git a/drivers/irqchip/irq-ixp4xx.c b/drivers/irqchip/irq-ixp4xx.c index fb68f8c59fbb..5fba907b9052 100644 --- a/drivers/irqchip/irq-ixp4xx.c +++ b/drivers/irqchip/irq-ixp4xx.c @@ -13,7 +13,6 @@ #include #include #include -#include #include #include #include @@ -106,7 +105,8 @@ static void ixp4xx_irq_unmask(struct irq_data *d) } } -asmlinkage void __exception_irq_entry ixp4xx_handle_irq(struct pt_regs *regs) +static asmlinkage void __exception_irq_entry +ixp4xx_handle_irq(struct pt_regs *regs) { struct ixp4xx_irq *ixi = &ixirq; unsigned long status; @@ -195,56 +195,6 @@ static const struct irq_domain_ops ixp4xx_irqdomain_ops = { .free = irq_domain_free_irqs_common, }; -/** - * ixp4xx_get_irq_domain() - retrieve the ixp4xx irq domain - * - * This function will go away when we transition to DT probing. - */ -struct irq_domain *ixp4xx_get_irq_domain(void) -{ - struct ixp4xx_irq *ixi = &ixirq; - - return ixi->domain; -} -EXPORT_SYMBOL_GPL(ixp4xx_get_irq_domain); - -/* - * This is the Linux IRQ to hwirq mapping table. This goes away when - * we have DT support as all IRQ resources are defined in the device - * tree. It will register all the IRQs that are not used by the hierarchical - * GPIO IRQ chip. The "holes" inbetween these IRQs will be requested by - * the GPIO driver using . This is a step-gap solution. - */ -struct ixp4xx_irq_chunk { - int irq; - int hwirq; - int nr_irqs; -}; - -static const struct ixp4xx_irq_chunk ixp4xx_irq_chunks[] = { - { - .irq = 16, - .hwirq = 0, - .nr_irqs = 6, - }, - { - .irq = 24, - .hwirq = 8, - .nr_irqs = 11, - }, - { - .irq = 46, - .hwirq = 30, - .nr_irqs = 2, - }, - /* Only on the 436 variants */ - { - .irq = 48, - .hwirq = 32, - .nr_irqs = 10, - }, -}; - /** * ixp4x_irq_setup() - Common setup code for the IXP4xx interrupt controller * @ixi: State container @@ -298,75 +248,8 @@ static int __init ixp4xx_irq_setup(struct ixp4xx_irq *ixi, return 0; } -/** - * ixp4xx_irq_init() - Function to initialize the irqchip from boardfiles - * @irqbase: physical base for the irq controller - * @is_356: if this is an IXP43x, IXP45x or IXP46x SoC variant - */ -void __init ixp4xx_irq_init(resource_size_t irqbase, - bool is_356) -{ - struct ixp4xx_irq *ixi = &ixirq; - void __iomem *base; - struct fwnode_handle *fwnode; - struct irq_fwspec fwspec; - int nr_chunks; - int ret; - int i; - - base = ioremap(irqbase, 0x100); - if (!base) { - pr_crit("IXP4XX: could not ioremap interrupt controller\n"); - return; - } - fwnode = irq_domain_alloc_fwnode(&irqbase); - if (!fwnode) { - pr_crit("IXP4XX: no domain handle\n"); - return; - } - ret = ixp4xx_irq_setup(ixi, base, fwnode, is_356); - if (ret) { - pr_crit("IXP4XX: failed to set up irqchip\n"); - irq_domain_free_fwnode(fwnode); - } - - nr_chunks = ARRAY_SIZE(ixp4xx_irq_chunks); - if (!is_356) - nr_chunks--; - - /* - * After adding OF support, this is no longer needed: irqs - * will be allocated for the respective fwnodes. - */ - for (i = 0; i < nr_chunks; i++) { - const struct ixp4xx_irq_chunk *chunk = &ixp4xx_irq_chunks[i]; - - pr_info("Allocate Linux IRQs %d..%d HW IRQs %d..%d\n", - chunk->irq, chunk->irq + chunk->nr_irqs - 1, - chunk->hwirq, chunk->hwirq + chunk->nr_irqs - 1); - fwspec.fwnode = fwnode; - fwspec.param[0] = chunk->hwirq; - fwspec.param[1] = IRQ_TYPE_LEVEL_HIGH; - fwspec.param_count = 2; - ret = __irq_domain_alloc_irqs(ixi->domain, - chunk->irq, - chunk->nr_irqs, - NUMA_NO_NODE, - &fwspec, - false, - NULL); - if (ret < 0) { - pr_crit("IXP4XX: can not allocate irqs in hierarchy %d\n", - ret); - return; - } - } -} -EXPORT_SYMBOL_GPL(ixp4xx_irq_init); - -#ifdef CONFIG_OF -int __init ixp4xx_of_init_irq(struct device_node *np, - struct device_node *parent) +static int __init ixp4xx_of_init_irq(struct device_node *np, + struct device_node *parent) { struct ixp4xx_irq *ixi = &ixirq; void __iomem *base; @@ -400,4 +283,3 @@ IRQCHIP_DECLARE(ixp45x, "intel,ixp45x-interrupt", ixp4xx_of_init_irq); IRQCHIP_DECLARE(ixp46x, "intel,ixp46x-interrupt", ixp4xx_of_init_irq); -#endif -- cgit v1.2.3