aboutsummaryrefslogtreecommitdiff
path: root/drivers/irqchip/irq-versatile-fpga.c
AgeCommit message (Collapse)AuthorFilesLines
2016-04-26irqchip: versatile-fpga: add new compatible for OX810SE SoCNeil Armstrong1-0/+1
Under the OX810SE, this exact same interface is used as "Reference Peripheral Specification" Interrupt Controller, so add a new compatible string in order to support the Oxford Semiconductor OX810SE SoC interrupt controller. Acked-by: Marc Zyngier <[email protected]> Signed-off-by: Neil Armstrong <[email protected]>
2015-09-16irqchip: Kill off set_irq_flags usageRob Herring1-1/+1
set_irq_flags is ARM specific with custom flags which have genirq equivalents. Convert drivers to use the genirq interfaces directly, so we can kill off set_irq_flags. The translation of flags is as follows: IRQF_VALID -> !IRQ_NOREQUEST IRQF_PROBE -> !IRQ_NOPROBE IRQF_NOAUTOEN -> IRQ_NOAUTOEN For IRQs managed by an irqdomain, the irqdomain core code handles clearing and setting IRQ_NOREQUEST already, so there is no need to do this in .map() functions and we can simply remove the set_irq_flags calls. Some users also modify IRQ_NOPROBE and this has been maintained although it is not clear that is really needed. There appears to be a great deal of blind copy and paste of this code. Signed-off-by: Rob Herring <[email protected]> Cc: [email protected] Cc: Russell King <[email protected]> Cc: Jason Cooper <[email protected]> Cc: Kukjin Kim <[email protected]> Cc: Krzysztof Kozlowski <[email protected]> Cc: Stephen Warren <[email protected]> Cc: Lee Jones <[email protected]> Cc: Alexander Shiyan <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2015-09-16genirq: Remove irq argument from irq flow handlersThomas Gleixner1-4/+4
Most interrupt flow handlers do not use the irq argument. Those few which use it can retrieve the irq number from the irq descriptor. Remove the argument. Search and replace was done with coccinelle and some extra helper scripts around it. Thanks to Julia for her help! Signed-off-by: Thomas Gleixner <[email protected]> Cc: Julia Lawall <[email protected]> Cc: Jiang Liu <[email protected]>
2015-07-16irqchip/versatile-fpga: Prepare fpga_irq_handle for irq argument removalThomas Gleixner1-1/+2
The irq argument of most interrupt flow handlers is unused or merily used instead of a local variable. The handlers which need the irq argument can retrieve the irq number from the irq descriptor. Search and update was done with coccinelle and the invaluable help of Julia Lawall. Signed-off-by: Thomas Gleixner <[email protected]> Cc: Julia Lawall <[email protected]>
2015-07-11irqchip/versatile: Consolidate chained IRQ handler install/removeThomas Gleixner1-2/+2
Chained irq handlers usually set up handler data as well. We now have a function to set both under irq_desc->lock. Replace the two calls with one. Search and conversion was done with coccinelle: @@ expression E1, E2, E3; @@ ( -if (irq_set_handler_data(E1, E2) != 0) - BUG(); | -irq_set_handler_data(E1, E2); ) -irq_set_chained_handler(E1, E3); +irq_set_chained_handler_and_data(E1, E3, E2); @@ expression E1, E2, E3; @@ ( -if (irq_set_handler_data(E1, E2) != 0) - BUG(); ... | -irq_set_handler_data(E1, E2); ... ) -irq_set_chained_handler(E1, E3); +irq_set_chained_handler_and_data(E1, E3, E2); Reported-by: Russell King <[email protected]> Signed-off-by: Thomas Gleixner <[email protected]> Cc: Julia Lawall <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Jason Cooper <[email protected]>
2015-07-11irqchip: Prepare for local stub header removalJoel Porquet1-2/+1
The IRQCHIP_DECLARE macro moved to to 'include/linux/irqchip.h', so the local irqchip.h became an empty shell, which solely includes include/linux/irqchip.h Include the global header in all irqchip drivers instead of the local header, so we can remove it. Signed-off-by: Joel Porquet <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/1882096.X39jVG8e0D@joel-zenbook Signed-off-by: Thomas Gleixner <[email protected]>
2015-05-05irqchip: Constify irq_domain_opsKrzysztof Kozlowski1-1/+1
The irq_domain_ops are not modified by the driver and the irqdomain core code accepts pointer to a const data. Signed-off-by: Krzysztof Kozlowski <[email protected]> Cc: Jason Cooper <[email protected]> Cc: Kukjin Kim <[email protected]> Cc: Stephen Warren <[email protected]> Cc: Lee Jones <[email protected]> Cc: Matthias Brugger <[email protected]> Cc: Maxime Ripard <[email protected]> Cc: [email protected] Cc: [email protected] Cc: [email protected] Link: http://lkml.kernel.org/r/[email protected] Signed-off-by: Thomas Gleixner <[email protected]>
2014-09-03irqchip: versatile-fpga: Convert to handle_domain_irqMarc Zyngier1-1/+1
Use the new handle_domain_irq method to handle interrupts. Signed-off-by: Marc Zyngier <[email protected]> Link: https://lkml.kernel.org/r/[email protected] Signed-off-by: Jason Cooper <[email protected]>
2014-06-24irqchip: versatile-fpga: add support for arm,versatile-sicRob Herring1-0/+11
The secondary controller on ARM Versatile AB and PB is similar to other ARM platforms, but has a pass-thru register to connect some interrupts directly to interrupt inputs on the primary interrupt controller. The PIC_ENABLES register needs to be configured for proper operation when the matching node is arm,versatile-sic. Add the the necessary IRQCHIP_DECLARE as well. Signed-off-by: Rob Herring <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Jason Cooper <[email protected]> Cc: Arnd Bergmann <[email protected]> Acked-by: Linus Walleij <[email protected]>
2014-06-24irqchip: versatile-fpga: Add IRQCHIP_DECLARE supportRob Herring1-1/+6
Add support for initialization using IRQCHIP_DECLARE. This also requires that the controller initialization set the handle_irq function pointer itself when it is a primary controller. Signed-off-by: Rob Herring <[email protected]> Cc: Thomas Gleixner <[email protected]> Cc: Jason Cooper <[email protected]> Acked-by: Linus Walleij <[email protected]>
2014-01-03irqchip: versatile FPGA: support cascaded interrupts from DTLinus Walleij1-2/+13
The Versatile FPGA interrupt controller supports cascading interrupts, i.e. that its output is connected to the input of another interrupt controller. This makes it possible to pass a parent interrupt from the device tree and print it in the boot log if applicable. Acked-by: Thomas Gleixner <[email protected]> Signed-off-by: Linus Walleij <[email protected]>
2013-06-08irqchip: Return -EPERM for reserved IRQsGrant Likely1-1/+1
The irqdomain core will report a log message for any attempted map call that fails unless the error code is -EPERM. This patch changes the Versatile irq controller drivers to use -EPERM because it is normal for a subset of the IRQ inputs to be marked as reserved on the various Versatile platforms. Signed-off-by: Grant Likely <[email protected]>
2013-03-27irq: versatile: rename Kconfig macro in printkPaul Bolle1-1/+1
Commit 2389d5014342e9535aad212d0c68d439aaf534ba ("ARM: plat-versatile: move FPGA irq driver to drivers/irqchip") changed Kconfig symbol PLAT_VERSATILE_FPGA_IRQ_NR to VERSATILE_FPGA_IRQ_NR. It forgot to change one reference to the related macro in a printk. Signed-off-by: Paul Bolle <[email protected]> Signed-off-by: Jiri Kosina <[email protected]>
2012-11-30irq: versatile: delete dangling variableLinus Walleij1-1/+0
This one was just creating noise like this: drivers/irqchip/irq-versatile-fpga.c: In function 'fpga_irq_of_init': drivers/irqchip/irq-versatile-fpga.c:180:24: warning: unused variable 'f' Reported-by: Russell King <[email protected]> Signed-off-by: Linus Walleij <[email protected]> Signed-off-by: Olof Johansson <[email protected]>
2012-11-04ARM: plat-versatile: move FPGA irq driver to drivers/irqchipLinus Walleij1-0/+204
This moves the Versatile FPGA interrupt controller driver, used in the Integrator/AP, Integrator/CP and some Versatile boards, out of arch/arm/plat-versatile and down to drivers/irqchip where we have consensus that such drivers belong. The header file is consequently moved to <linux/platform_data/irq-versatile-fpga.h>. Signed-off-by: Linus Walleij <[email protected]>