aboutsummaryrefslogtreecommitdiff
path: root/include/linux/of_address.h
diff options
context:
space:
mode:
authorGrant Likely <grant.likely@secretlab.ca>2012-01-11 10:29:05 -0700
committerAndrey Konovalov <andrey.konovalov@linaro.org>2012-02-16 17:59:47 +0400
commitde7471ce3218920f2cb822835e6b6e7b9bd5b1b8 (patch)
tree1d01739ba0373fe06814a58cecdbd78ca1d24873 /include/linux/of_address.h
parenta690068d6f9f3011666febeebc1e23062802bcf6 (diff)
irq_domain: Add support for base irq and hwirq in legacy mappings
Add support for a legacy mapping where irq = (hwirq - first_hwirq + first_irq) so that a controller driver can allocate a fixed range of irq_descs and use a simple calculation to translate back and forth between linux and hw irq numbers. This is needed to use an irq_domain with many of the ARM interrupt controller drivers that manage their own irq_desc allocations. Ultimately the goal is to migrate those drivers to use the linear revmap, but doing it this way allows each driver to be converted separately which makes the migration path easier. This patch generalizes the IRQ_DOMAIN_MAP_LEGACY method to use (first_irq-first_hwirq) as the offset between hwirq and linux irq number, and adds checks to make sure that the hwirq number does not exceed range assigned to the controller. Signed-off-by: Grant Likely <grant.likely@secretlab.ca> Cc: Rob Herring <rob.herring@calxeda.com> Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Milton Miller <miltonm@bga.com> Tested-by: Olof Johansson <olof@lixom.net>
Diffstat (limited to 'include/linux/of_address.h')
0 files changed, 0 insertions, 0 deletions