summaryrefslogtreecommitdiffstats
path: root/arch/arm/common/vic.c
Commit message (Collapse)AuthorAgeFilesLines
* ARM: 7236/1: vic: always use simple opsJamie Iles2012-01-031-1/+1
| | | | | | | | | | Now that irq_domain_simple_ops are available for non-DT users, use them in the VIC driver so that we don't get a NULL dereference in irq_domain_to_irq() when registering the domain. Cc: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Jamie Iles <jamie@jamieiles.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: 7183/1: vic: register the VIC for ST-modified VIC'sJamie Iles2011-12-111-2/+3
| | | | | | | | | | | When probing the VIC, the ST variant has a different probing method to account for the extra interrupts which meant we didn't previously call vic_register() which registered the irq_domain. Acked-by: Linus Walleij <linus.walleij@stericsson.com> Cc: Marc Zyngier <marc.zyngier@arm.com> Signed-off-by: Jamie Iles <jamie@jamieiles.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: VIC: remove non MULTI_IRQ_HANDLER supportJamie Iles2011-11-151-2/+0Star
| | | | | | | | Now that all platforms are converted to MULTI_IRQ_HANDLER, remove the legacy support. Tested-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
* ARM: vic: MULTI_IRQ_HANDLER handlerJamie Iles2011-11-151-0/+38
| | | | | | | | | | | | | | | | | | | | Add a handler for the VIC that is suitable for MULTI_IRQ_HANDLER platforms. This can replace the ASM entry macros for platforms that use the VIC. v4: - rebase ontop of move __exception and friends to asm/exception.h - rework polling loop to handle as many irqs as possible in one go v3: - simplify irq handling loop as suggested by Grant - service interrupts from msb->lsb order v2: - allow the handler be used for !CONFIG_OF - use irq_domain_to_irq() Cc: Rob Herring <robherring2@gmail.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Acked-by: Linus Walleij <linus.walleij@linaro.org> Tested-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
* ARM: vic: device tree bindingJamie Iles2011-11-151-28/+79
| | | | | | | | | | | | | | | | | | This adds a device tree binding for the VIC based on the of_irq_init() support. This adds an irqdomain to the vic and always registers all vics in the static vic array rather than for pm only to keep track of the irq domain. struct irq_data::hwirq is used where appropriate rather than runtime masking. v3: - include linux/export.h for THIS_MODULE v2: - use irq_domain_simple_ops - remove stub implementation of vic_of_init for !CONFIG_OF - Make VIC select IRQ_DOMAIN Reviewed-by: Rob Herring <robherring2@gmail.com> Reviewed-by: Grant Likely <grant.likely@secretlab.ca> Tested-by: Thomas Abraham <thomas.abraham@linaro.org> Signed-off-by: Jamie Iles <jamie@jamieiles.com>
*-. Merge branches 'arnd-randcfg-fixes', 'debug', 'io' (early part), 'l2x0', ↵Russell King2011-10-251-1/+2
|\ \ | | | | | | | | | 'p2v', 'pgt' (early part) and 'smp' into for-linus
| * | ARM: common/vic: use proper __iomem annotationsArnd Bergmann2011-10-011-1/+2
| |/ | | | | | | | | | | | | In vic_init, we pass addr into readl, so it needs to be a pointer, not a u32 address. Signed-off-by: Arnd Bergmann <arnd@arndb.de>
* / ARM: 7128/1: vic: Don't write to the read-only register VIC_IRQ_STATUSZoltan Devai2011-10-151-1/+0Star
|/ | | | | | | | This is unneeded and causes an abort on the SPMP8000 platform. Acked-by: Linus Walleij <linus.walleij@linaro.org> Signed-off-by: Zoltan Devai <zoss@devai.org> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: Use struct syscore_ops instead of sysdevs for PM in common codeRafael J. Wysocki2011-04-241-44/+25Star
| | | | | | | | | | | | | Convert some ARM architecture's common code to using struct syscore_ops objects for power management instead of sysdev classes and sysdevs. This simplifies the code and reduces the kernel's memory footprint. It also is necessary for removing sysdevs from the kernel entirely in the future. Signed-off-by: Rafael J. Wysocki <rjw@sisk.pl> Acked-by: Greg Kroah-Hartman <gregkh@suse.de>
* arm: Fold irq_set_chip/irq_set_handlerThomas Gleixner2011-03-291-2/+2
| | | | | | Use irq_set_chip_and_handler() instead. Converted with coccinelle. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* arm: Reorder irq_set_ function callsThomas Gleixner2011-03-291-1/+1
| | | | | | | | | | | | | | | | | | | | Reorder irq_set_chip() irq_set_chip_data() irq_set_handler() to irq_set_chip() irq_set_handler() irq_set_chip_data() so the next patch can combine irq_set_chip() and irq_set_handler() to irq_set_chip_and_handler(). Automated conversion with coccinelle. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* arm: Cleanup the irq namespaceThomas Gleixner2011-03-291-3/+3
| | | | | | Convert to the new function names. Automated with coccinelle. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* Merge branch 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-armLinus Torvalds2011-01-151-16/+16
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * 'devel-stable' of master.kernel.org:/home/rmk/linux-2.6-arm: (161 commits) ARM: pxa: fix building issue of missing physmap.h ARM: mmp: PXA910 drive strength FAST using wrong value ARM: mmp: MMP2 drive strength FAST using wrong value ARM: pxa: fix recursive calls in pxa_low_gpio_chip AT91: Support for gsia18s board AT91: Acme Systems FOX Board G20 board files AT91: board-sam9m10g45ek.c: Remove duplicate inclusion of mach/hardware.h ARM: pxa: fix suspend/resume array index miscalculation ARM: pxa: use cpu_has_ipr() consistently in irq.c ARM: pxa: remove unused variable in clock-pxa3xx.c ARM: pxa: fix warning in zeus.c ARM: sa1111: fix typo in sa1111_retrigger_lowirq() ARM mxs: clkdev related compile fixes ARM i.MX mx31_3ds: Fix MC13783 regulator names ARM: plat-stmp3xxx: irq_data conversion. ARM: plat-spear: irq_data conversion. ARM: plat-orion: irq_data conversion. ARM: plat-omap: irq_data conversion. ARM: plat-nomadik: irq_data conversion. ARM: plat-mxc: irq_data conversion. ... Fix up trivial conflict in arch/arm/plat-omap/gpio.c (Lennert Buytenhek's irq_data conversion clashing with some omap irq updates)
| * ARM: vic: irq_data conversion.Lennert Buytenhek2011-01-131-16/+16
| | | | | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
* | tree-wide: fix comment/printk typosUwe Kleine-König2010-11-011-1/+1
|/ | | | | | | | | | "gadget", "through", "command", "maintain", "maintain", "controller", "address", "between", "initiali[zs]e", "instead", "function", "select", "already", "equal", "access", "management", "hierarchy", "registration", "interest", "relative", "memory", "offset", "already", Signed-off-by: Uwe Kleine-König <u.kleine-koenig@pengutronix.de> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* ARM: 6025/1: vic: factor out common init codeHartley Sweeten2010-04-141-55/+52Star
| | | | | | | | | | | | This factors out the common initialization code for the two vic vendors into easier maintainable functions. Tested-by: Linus Walleij <linus.walleij@stericsson.com> Tested-by: Alessandro Rubini <rubini@unipv.it> Cc: Andrea Gallo <andrea.gallo@stericsson.com> Cc: Ben Dooks <ben-linux@fluff.org> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: 5881/1: vic.c: reorganize codeHartley Sweeten2010-01-201-133/+132Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This reorganizes the vic.c code in anticipation of a second patch to use struct vic_device as the data stored in set_irq_chip_data(). The code now has the following flow: 1) struct vic_device definition, static variables, and to_vic() moved to the start of the code. 2) common code (vic_init2) 3) vic power management callbacks 4) vic power management initialization/registration 5) irq_chip callbacks 6) vendor specific vic initialization 7) vic initialization In addition the typo vik_init_st is fixed (vic_init_st). There is no functional change with this patch. Tested-by: Linus Walleij <linus.walleij@stericsson.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Alessandro Rubini <rubini-list@gnudd.com> Comments from Hartley Sweeten: Please change from Cc to: Tested-by: Alessandro Rubini <rubini@unipv.it> Signed-off-by: H Hartley Sweeten <hsweeten@visionengravers.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: 5696/1: Include device.h in VIC driverLinus Walleij2009-09-151-0/+1
| | | | | | | | | Currently build with the next head fails on archs using PL190 VIC because when we include amba/bus.h we need to include device.h first. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* ARM: 5636/1: Move vendor enum to AMBA includeLinus Walleij2009-09-121-8/+4Star
| | | | | | | | | | This moves the primecell vendor enum definition inside vic.c out to linux/amba/bus.h where it belongs and replace any occurances of specific vendor ID:s with the respective enums instead. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 5583/1: VIC: acknowledge software interruptsAlessandro Rubini2009-07-021-1/+10
| | | | | | | | | | | | | The PrimeCell Vectored Interrupt Controller offers a way to trigger any interrupt through software. This is a useful tool for developing, but such software interrupt can only be acked by writing a bit in the "software clear" register, or the handler will loop forever. This splits ack from mask, and acks the soft irq in case it was the source. Signed-off-by: Alessandro Rubini <rubini@unipv.it> Acked-by: Andrea Gallo <andrea.gallo@stericsson.com> Acked-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 5582/1: VIC: support ST-modified version with a split initAlessandro Rubini2009-07-021-0/+88
| | | | | | | | | | The Nomadik SoC (not yet merged) has a modified PL090 VIC cell. This adds support for it by reading the PrimeCell ID at the end of the page and calling a separate init function. Signed-off-by: Alessandro Rubini <rubini@unipv.it> Acked-by: Andrea Gallo <andrea.gallo@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] VIC: Fix resume sources usageBen Dooks2009-06-171-2/+6
| | | | | | | The resume_mask wasn't being checked in vic_set_wake() to see if the IRQ was a valid wakeup source. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* [ARM] VIC: Add power management deviceBen Dooks2009-05-071-7/+214
| | | | | | | | | | | | | | Add power management support to the VIC by registering each VIC as a system device to get suspend/resume events going. Since the VIC registeration is done early, we need to record the VICs in a static array which is used to add the system devices later once the initcalls are run. This means there is now a configuration value for the number of VICs in the system. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* [ARM] 5455/1: Fix IRQ noise from VIC codeLinus Walleij2009-04-161-5/+4Star
| | | | | | | | | | | | | | | | The VIC code will attempt to perform som default set_irq_chip() and set_irq_chip_data() on all IRQs supported by the VIC, while the new IRQ handling code strictly checks for the global NR_IRQS to be respected also for these IRQs. This patch will respect the interrupt mask passed to the VIC driver and will prevent it from attempting to call these functions on any unused interrupts. Signed-off-by: Linus Walleij <linus.walleij@stericsson.com> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] VIC: Update asm/hardware/vic.h with PL192 informationBen Dooks2008-12-161-4/+4
| | | | | | | | | | | | The original arch/arm/include/asm/hardware/vic.h was written for the PL190 ARM VIC implementation, and as such does not have any information about the PL192 version. Add details about the PL192 and PL190 specific registers and any changes between the two units. Signed-off-by: Ben Dooks <ben-linux@fluff.org>
* [ARM] Convert asm/io.h to linux/io.hRussell King2008-09-061-1/+1
| | | | Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Remove compatibility layer for ARM irqsRussell King2006-11-301-4/+4
| | | | | | | | | | | | set_irq_chipdata -> set_irq_chip_data get_irq_chipdata -> get_irq_chip_data do_level_IRQ -> handle_level_irq do_edge_IRQ -> handle_edge_irq do_simple_IRQ -> handle_simple_irq irqdesc -> irq_desc irqchip -> irq_chip Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] 3739/1: genirq updates: irq_chip, add and use irq_chip.nameDavid Brownell2006-08-011-1/+2
| | | | | | | | | | | | | | | | | | | Patch from David Brownell ARM genirq cleanups/updates: - Start switching platforms to newer APIs * use "irq_chip" name, not "irqchip" * providing irq_chip.name - Show irq_chip.name in /proc/interrupts, like on x86. This update a bit more than half of the ARM code. The irq_chip.name values were chosen to match docs (if I have them) or be otherwise obvious ("FPGA", "CPLD", or matching the code). Signed-off-by: David Brownell <dbrownell@users.sourceforge.net> Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Adapt vic.c to allow for multiple VICs in a system.Russell King2006-03-211-22/+27
| | | | | | | Some SoCs have multiple VIC devices. Adapt the generic vic code to allow multiple implementations to be handled. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>
* [ARM] Separate VIC (vectored interrupt controller) support from VersatileRussell King2006-01-131-0/+92
Other machines may wish to make use of the VIC support code, so move it to arch/arm/common. Signed-off-by: Russell King <rmk+kernel@arm.linux.org.uk>