Commit graph

19 commits

Author SHA1 Message Date
Thomas Gleixner bd0b9ac405 genirq: Remove irq argument from irq flow handlers
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 <tglx@linutronix.de>
Cc: Julia Lawall <Julia.Lawall@lip6.fr>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
2015-09-16 15:47:51 +02:00
Olof Johansson 39aa437e18 Merge branch 'queue/irq/arm' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip into next/cleanup
Merge "ARM: Interrupt cleanups and API change preparation" from Thomas
Gleixner:

The following patch series contains the following changes:

    - Consolidation of chained interrupt handler setup/removal

    - Switch to functions which avoid a redundant interrupt
      descriptor lookup

    - Preparation of interrupt flow handlers for the 'irq' argument
      removal

* 'queue/irq/arm' of git://git.kernel.org/pub/scm/linux/kernel/git/tip/tip:
  ARM/orion/gpio: Prepare gpio_irq_handler for irq argument removal
  ARM/pxa: Prepare balloon3_irq_handler for irq argument removal
  ARM/pxa: Prepare *_irq_handler for irq argument removal
  ARM/dove: Prepare pmu_irq_handler for irq argument removal
  ARM/sa1111: Prepare sa1111_irq_handler for irq argument removal
  ARM/locomo: Prepare locomo_handler for irq argument removal
  ARM, irq: Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc
  ARM/LPC32xx: Use irq_set_handler_locked()
  ARM/irq: Use access helper irq_data_get_affinity_mask()
  ARM/locomo: Consolidate chained IRQ handler install/remove
  ARM/orion: Consolidate chained IRQ handler install/remove

Signed-off-by: Olof Johansson <olof@lixom.net>
2015-08-05 17:24:11 +02:00
Rob Herring e8d36d5dbb ARM: kill off set_irq_flags usage
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 <robh@kernel.org>
Cc: Russell King <linux@arm.linux.org.uk>
Cc: Sekhar Nori <nsekhar@ti.com>
Cc: Kevin Hilman <khilman@deeprootsystems.com>
Cc: Jason Cooper <jason@lakedaemon.net>
Cc: Andrew Lunn <andrew@lunn.ch>
Cc: Sebastian Hesselbarth <sebastian.hesselbarth@gmail.com>
Cc: Gregory Clement <gregory.clement@free-electrons.com>
Acked-by: Hans Ulli Kroll <ulli.kroll@googlemail.com>
Acked-by: Shawn Guo <shawnguo@kernel.org>
Cc: Sascha Hauer <kernel@pengutronix.de>
Cc: Imre Kaloz <kaloz@openwrt.org>
Acked-by: Krzysztof Halasa <khalasa@piap.pl>
Cc: Greg Ungerer <gerg@uclinux.org>
Cc: Roland Stigge <stigge@antcom.de>
Cc: Tony Lindgren <tony@atomide.com>
Cc: Daniel Mack <daniel@zonque.org>
Cc: Haojian Zhuang <haojian.zhuang@gmail.com>
Cc: Robert Jarzmik <robert.jarzmik@free.fr>
Cc: Simtec Linux Team <linux@simtec.co.uk>
Cc: Kukjin Kim <kgene@kernel.org>
Cc: Krzysztof Kozlowski <k.kozlowski@samsung.com>
Acked-by: Wan ZongShun <mcuos.com@gmail.com>
Cc: linux-arm-kernel@lists.infradead.org
Cc: linux-omap@vger.kernel.org
Cc: linux-samsung-soc@vger.kernel.org
Tested-by: Kevin Hilman <khilman@linaro.org>
Signed-off-by: Olof Johansson <olof@lixom.net>
2015-07-28 13:58:13 +02:00
Thomas Gleixner 8c06e117be ARM/LPC32xx: Use irq_set_handler_locked()
Use irq_set_handler_locked() as it avoids a redundant lookup of the
irq descriptor.

Search and replacement was done with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Jiang Liu <jiang.liu@linux.intel.com>
Cc: Julia Lawall <julia.lawall@lip6.fr>
Cc: Russell King <rmk+kernel@arm.linux.org.uk>
Cc: linux-arm-kernel@lists.infradead.org
2015-07-13 14:59:14 +02:00
Thomas Gleixner 93b6eb77b4 ARM/LPC32xx: Use irq not hwirq for __irq_set_handler_locked()
irq_data->hwirq is not guaranteed to be the same as irq_data->irq. It
might be in that particular case, but it's wrong nevertheless.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
Cc: Roland Stigge <stigge@antcom.de>
2015-06-26 21:37:47 +02:00
Roland Stigge 91deef8069 ARM: LPC32xx: Cleanup irq.c
This patch removes the IRQ mask initialization which is already done some lines
above.

This was actually a bug: The init was supposed to set the bits for the
(chained) SUB IRQs. But this is already fixed by the previous patch, doing this
implicitely via irq_set_chained_handler().

Signed-off-by: Roland Stigge <stigge@antcom.de>
2012-11-07 13:30:50 +01:00
Roland Stigge e40ec953b6 ARM: LPC32xx: Relocate calls to irq_set_chained_handler()
This patch fixes the issue of an access to a yet uninitialized data structure
at the point where irq_set_chained_handler() was called by moving the
respective calls to the end of lpc32xx_init_irq().

The call path was:

irq_set_chained_handler()
-> __irq_set_handler()
-> irq_startup()
-> irq_enable()
-> desc->irq_data.chip->irq_unmask()

at which point lpc32xx_unmask_irq() effectively read desc->irq_data.hwirq which
was only later initialized.

Signed-off-by: Roland Stigge <stigge@antcom.de>
2012-11-07 13:30:50 +01:00
Roland Stigge 2998b1d3b1 ARM: LPC32xx: Remove superfluous irq_alloc_descs()
This patch removes the call to irq_alloc_descs() which always returns an error
since the descriptors are always preallocated already.

Signed-off-by: Roland Stigge <stigge@antcom.de>
2012-11-07 13:30:50 +01:00
Roland Stigge 4607d65ab3 ARM: LPC32xx: Use handle_edge_irq() callback on edge type irqs
irq.c uses handle_level_irq() as the unconditional default handler. This patch
uses handle_edge_irq() instead for edge type irqs.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Srinivas Bakki <srinivas.bakki@nxp.com>
2012-09-06 11:39:10 +02:00
Roland Stigge f5c4227133 ARM: LPC32xx: Device tree support
This patch does the actual device tree switch for the LPC32xx SoC.

Signed-off-by: Roland Stigge <stigge@antcom.de>
2012-04-22 12:01:19 +02:00
Arnd Bergmann f66f9bdf6d Merge branch 'lpc32xx/drivers' into next/drivers 2012-03-15 14:48:42 +00:00
Roland Stigge c20b909be9 ARM: LPC32xx: Ethernet support
This patch adds ethernet support to the LPC32xx ARM architecture. The actual
driver in drivers/net is contained in a separate patch.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Acked-by: Arnd Bergmann <arnd@arndb.de>
2012-03-13 21:23:07 +01:00
Roland Stigge 94ed7830cb ARM: LPC32xx: irq.c: Clear latched event
This patch fixes the wakeup disable function by clearing latched events.

Signed-off-by: Roland Stigge <stigge@antcom.de>
Cc: stable@vger.kernel.org
2012-02-27 17:28:02 +01:00
Roland Stigge 35dd0a75d4 ARM: LPC32xx: Fix interrupt controller init
This patch fixes the initialization of the interrupt controller of the LPC32xx
by correctly setting up SIC1 and SIC2 instead of (wrongly) using the same value
as for the Main Interrupt Controller (MIC).

Signed-off-by: Roland Stigge <stigge@antcom.de>
Cc: stable@vger.kernel.org
2012-02-27 17:28:02 +01:00
Roland Stigge f6737055c1 ARM: LPC32xx: Fix irq on GPI_28
The GPI_28 IRQ was not registered properly. The registration of
IRQ_LPC32XX_GPI_28 was added and the (wrong) IRQ_LPC32XX_GPI_11 at
LPC32XX_SIC1_IRQ(4) was replaced by IRQ_LPC32XX_GPI_28 (see manual of
LPC32xx / interrupt controller).

Signed-off-by: Roland Stigge <stigge@antcom.de>
Cc: stable@vger.kernel.org
2012-02-27 17:28:02 +01:00
Thomas Gleixner f38c02f3b3 arm: Fold irq_set_chip/irq_set_handler
Use irq_set_chip_and_handler() instead. Converted with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:58 +02:00
Thomas Gleixner 6845664a6a arm: Cleanup the irq namespace
Convert to the new function names. Automated with coccinelle.

Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
2011-03-29 14:47:57 +02:00
Lennert Buytenhek 5638538117 ARM: lpc32xx: irq_data conversion.
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
2011-01-13 17:18:44 +01:00
Kevin Wells c4a0208fff ARM: LPC32XX: GPIO, timer, and IRQ drivers
Common drivers for the LPC32XX used on all platforms

Signed-off-by: Kevin Wells <wellsk40@gmail.com>
Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de>
2010-07-27 03:08:09 -07:00