summaryrefslogtreecommitdiff
path: root/drivers/irqchip
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2022-05-27 00:51:38 +0300
committerLinus Torvalds <torvalds@linux-foundation.org>2022-05-27 00:51:38 +0300
commit7182e897695d5b70fb772736f1f08639ca0fff78 (patch)
tree68a590ba26acfa3f2cfd1002247b48131476f3f9 /drivers/irqchip
parentf1f88bb51f1ae9d7eec9ef871355dea033bac02d (diff)
parent5a7cb9f3978d1fe8cfba798b4c9c054ce226e8fd (diff)
downloadlinux-7182e897695d5b70fb772736f1f08639ca0fff78.tar.xz
Merge tag 'gpio-updates-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux
Pull gpio updates from Bartosz Golaszewski: "We have lots of small changes all over the place, but no huge reworks or new drivers: - use ioread()/iowrite() interfaces instead of raw inb()/outb() in drivers - make irqchips immutable due to the new warning popping up when drivers try to modify the irqchip structures - add new compatibles to dt-bindings for realtek-otto, renesas-rcar and pca95xx - add support for new models to gpio-rcar, gpio-pca953x & gpio-realtek-otto - allow parsing of GPIO hogs represented as children nodes of gpio-uniphier - define a set of common GPIO consumer strings in dt-bindings - shrink code in gpio-ml-ioh by using more devres interfaces - pass arguments to devm_kcalloc() in correct order in gpio-sim - add new helpers for iterating over GPIO firmware nodes and descriptors to gpiolib core and use it in several drivers - drop unused syscon_regmap_lookup_by_compatible() function - correct format specifiers and signedness of variables in GPIO ACPI - drop unneeded error checks in gpio-ftgpio - stop using the deprecated of_gpio.h header in gpio-zevio - drop platform_data support in gpio-max732x - simplify Kconfig dependencies in gpio-vf610 - use raw spinlocks where needed to make PREEMPT_RT happy - fix return values in board files using gpio-pcf857x - convert more drivers to using fwnode instead of of_node - minor fixes and improvements in gpiolib core" * tag 'gpio-updates-for-v5.19' of git://git.kernel.org/pub/scm/linux/kernel/git/brgl/linux: (55 commits) gpio: sifive: Make the irqchip immutable gpio: rcar: Make the irqchip immutable gpio: pcf857x: Make the irqchip immutable gpio: pca953x: Make the irqchip immutable gpio: dwapb: Make the irqchip immutable gpio: sim: Use correct order for the parameters of devm_kcalloc() gpio: ml-ioh: Convert to use managed functions pcim* and devm_* gpio: ftgpio: Remove unneeded ERROR check before clk_disable_unprepare gpio: ws16c48: Utilize iomap interface gpio: gpio-mm: Utilize iomap interface gpio: 104-idio-16: Utilize iomap interface gpio: 104-idi-48: Utilize iomap interface gpio: 104-dio-48e: Utilize iomap interface gpio: zevio: drop of_gpio.h header gpio: max77620: Make the irqchip immutable dt-bindings: gpio: pca95xx: add entry for pca6408 gpio: pca953xx: Add support for pca6408 gpio: max732x: Drop unused support for irq and setup code via platform data gpio: vf610: drop the SOC_VF610 dependency for GPIO_VF610 gpio: syscon: Remove usage of syscon_regmap_lookup_by_compatible ...
Diffstat (limited to 'drivers/irqchip')
-rw-r--r--drivers/irqchip/irq-ixp4xx.c126
1 files changed, 4 insertions, 122 deletions
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 <linux/irq.h>
#include <linux/io.h>
#include <linux/irqchip.h>
-#include <linux/irqchip/irq-ixp4xx.h>
#include <linux/irqdomain.h>
#include <linux/of.h>
#include <linux/of_address.h>
@@ -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;
@@ -196,56 +196,6 @@ static const struct irq_domain_ops ixp4xx_irqdomain_ops = {
};
/**
- * 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
* @irqbase: Virtual memory base for the interrupt controller
@@ -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