aboutsummaryrefslogtreecommitdiffstats
path: root/arch/powerpc/platforms/52xx/mpc52xx_pic.c
Commit message (Collapse)AuthorAgeFilesLines
* powerpc/mpc62xx_pic: Fix get_irq handling of NO_IRQMilton Miller2011-05-191-1/+3
| | | | | | | | | | | | | | | | If none of irq category bits were set mpc52xx_get_irq() would pass NO_IRQ_IGNORE (-1) to irq_linear_revmap, which does an unsigned compare and declares the interrupt above the linear map range. It then punts to irq_find_mapping, which performs a linear search of all irqs, which will likely miss and only then return NO_IRQ. If no status bit is set, then we should return NO_IRQ directly. The interrupt should not be suppressed from spurious counting, in fact that is the definition of supurious. Signed-off-by: Milton Miller <miltonm@bga.com> Acked-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc/irq: Stop exporting irq_mapGrant Likely2011-05-041-66/+13
| | | | | | First step in eliminating irq_map[] table entirely Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* Fix common misspellingsLucas De Marchi2011-03-311-1/+1
| | | | | | Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <lucas.demarchi@profusion.mobi>
* powerpc: Convert to new irq_* function namesThomas Gleixner2011-03-291-3/+3
| | | | | | Scripted with coccinelle. Signed-off-by: Thomas Gleixner <tglx@linutronix.de>
* powerpc: platforms/52xx irq_data conversion.Lennert Buytenhek2011-03-101-40/+40
| | | | | Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: Make "intspec" pointers in irq_host->xlate() constRoman Fietze2009-12-091-1/+1
| | | | | | | | | | Writing a driver using SCLPC on the MPC5200B I detected, that the intspec arrays to map irqs to Linux virq cannot be const, because the mapping and xlate functions only take non const pointers. All those functions do not modify the intspec, so a const pointer could be used. Signed-off-by: Roman Fietze <roman.fietze@telemotive.de> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc: Fixup last users of irq_chip->typenameThomas Gleixner2009-11-241-4/+4
| | | | | | | | | | | The typename member of struct irq_chip was kept for migration purposes and is obsolete since more than 2 years. Fix up the leftovers. Signed-off-by: Thomas Gleixner <tglx@linutronix.de> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: linuxppc-dev@ozlabs.org Acked-by: Geoff Levand <geoffrey.levand@am.sony.com> Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
* powerpc/5200: Refactor mpc5200 interrupt controller driverGrant Likely2009-02-041-88/+59
| | | | | | | | | | | Rework the mpc5200-pic driver to simplify it and fix up the setting of desc->status when set_type is called for internal IRQs (so they are reported as level, not edge). The simplification is due to splitting off the handling of external IRQs into a separate block so they don't need to be handled as exceptions in the normal CRIT, MAIN and PERP paths. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* powerpc/5200: Remove pr_debug() from hot paths in irq driverGrant Likely2009-02-041-23/+0
| | | | | | | | | pr_debug() calls in the 'hot' *_mask(), *_unmask(), *_ack() and get_irq() makes adding #define DEBUG pretty much useless. Remove these calls because they completely swamp the output. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Reviewed-by: Wolfram Sang <w.sang@pengutronix.de>
* powerpc/mpc52xx: Properly update irq_desc when set_type() is called.Grant Likely2009-01-091-1/+7
| | | | | | | | | | | The MPC5200 PIC driver doesn't correctly update the .status field of the irq_desc structure when the set_type hook is called. This patch adds the required code. Also cleans up the external IRQ typename field to be something easier to read (very minor). Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* powerpc/mpc5200: Make internal 5200 PIC the default interrupt controllerGrant Likely2008-12-211-0/+2
| | | | | | | | | | The MPC5200 internal interrupt controller setup function needs to set the default interrupt controller when it is called. Without this irq_create_of_mapping() cannot be called without first determining the pointer to the irq controller (ie. call with controller = NULL). Reported-by: Steven Cavanagh <scavanagh@secretlab.ca> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* powerpc/mpc5200: Document and tidy irq driverGrant Likely2008-12-211-65/+170
| | | | | | | | | | | | This patch adds documentation to the mpc5200 interrupt controller driver and cleans up some minor coding conventions. It also moves the contents of mpc52xx_pic.h into the driver proper (except for a small common bit that is moved to the common mpc52xx.h) because the information encoded there is not required by any other part of kernel code. Finally for code readability sake, the L2_OFFSET shift value is removed because the code using it resolves to a noop. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* [POWERPC] mpc5200: add interrupt type functionSascha Hauer2008-04-291-0/+38
| | | | | | | | Add a set_type function for external (GPIO) interrupts. Signed-off-by: Juergen Beisert <j.beisert@pengutronix.de> Signed-off-by: Sascha Hauer <s.hauer@pengutronix.de> Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* [POWERPC] mpc5200: normalize compatible property bindingsGrant Likely2008-01-261-2/+14
| | | | | | | | | | | | | | Update MPC5200 drivers to also look for compatible properties in the form "fsl,mpc5200-*" to better conform to open firmware generic names recommended practice as published here: http://www.openfirmware.org/1275/practice/gnames/gnamv14a.html This patch should *not* break compatibility with older device trees which do not use the 'fsl,' prefix. The drivers will still bind against the older names also. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* [POWERPC] mpc5200: eliminate mpc52xx_*_map_*() functions.Grant Likely2008-01-181-3/+5
| | | | | | | mpc5200 platform code defines a bunch of map functions which duplicate the functionality of of_iomap(). Remove them and use of_iomap() instead. Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
* [POWERPC] MPC52xx: Trim includes on mpc5200 platform support codeGrant Likely2007-10-101-10/+1
| | | | | | | Drop unnecessary includes for MPC5200 based boards Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Sylvain Munaut <tnt@246tnt.com>
* [POWERPC] Provide a default irq_host match, which matches on an exact of_nodeMichael Ellerman2007-09-141-7/+0
| | | | | | | | | The most common match semantic is an exact match based on the device node. So provide a default implementation that does this, and hook it up if no match routine is specified. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Add an optional device_node pointer to the irq_hostMichael Ellerman2007-09-141-3/+2
| | | | | | | | | | The majority of irq_host implementations (3 out of 4) are associated with a device_node, and need to stash it somewhere. Rather than having it somewhere different for each host, add an optional device_node pointer to the irq_host structure. Signed-off-by: Michael Ellerman <michael@ellerman.id.au> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Clean out a bunch of duplicate includesJesper Juhl2007-08-171-1/+0
| | | | | | | | This removes several duplicate includes from arch/powerpc/. Signed-off-by: Jesper Juhl <jesper.juhl@gmail.com> Acked-by: Benjamin Herrenschmidt <benh@kernel.crashing.org> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] mpc52xx_pic: fix main interrupt maskingDomen Puncer2007-04-121-2/+2
| | | | | | | | | The bit setting was off by one. Tested with RTC and GPIO_WKUP interrupts. Signed-off-by: Domen Puncer <domen.puncer@telargo.com> Signed-off-by: Sylvain Munaut <tnt@246tNt.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Fixup mp5200 drivers to match device tree changesGrant Likely2007-02-131-5/+5
| | | | | Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Add common routines for 52xx support in arch/powerpcGrant Likely2006-12-041-88/+22
| | | | | | | | | | Adds utility routines used by 52xx device drivers and board support code. Main functionality is to add device nodes to the of_platform_bus, retrieve the IPB bus frequency, and find+ioremap device registers. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Sylvain Munaut <tnt@246tNt.com> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Separate IRQ config / register set from main headerSylvain Munaut2006-12-041-0/+1
| | | | | | | | | There is no need to expose these settings outside the scope of the interrupt controller code itself. Signed-off-by: Sylvain Munaut <tnt@246tNt.com> Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Paul Mackerras <paulus@samba.org>
* [POWERPC] Move MPC52xx PIC driver into arch/powerpc/platforms/52xxGrant Likely2006-12-041-0/+538
No other chips use this device, it belongs in a 52xx-specific path. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Signed-off-by: Sylvain Munaut <tnt@246tNt.com> Signed-off-by: Paul Mackerras <paulus@samba.org>