1. 30 3月, 2012 1 次提交
  2. 25 2月, 2012 1 次提交
    • G
      irq_domain/mips: Allow irq_domain on MIPS · abd2363f
      Grant Likely 提交于
      This patch makes IRQ_DOMAIN usable on MIPS.  It uses an ugly workaround
      to preserve current behaviour so that MIPS has time to add irq_domain
      registration to the irq controller drivers.  The workaround will be
      removed in Linux v3.6
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Cc: Ralf Baechle <ralf@linux-mips.org>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: linux-mips@linux-mips.org
      abd2363f
  3. 16 2月, 2012 9 次提交
    • G
      irq_domain: constify irq_domain_ops · a18dc81b
      Grant Likely 提交于
      Make irq_domain_ops pointer a constant to make it safer for multiple
      instances to share the same ops pointer and change the irq_domain code
      so that it does not modify the ops.
      
      v4: Fix mismatched type reference in powerpc code
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Milton Miller <miltonm@bga.com>
      Tested-by: NOlof Johansson <olof@lixom.net>
      a18dc81b
    • G
      irq_domain: Create common xlate functions that device drivers can use · 16b2e6e2
      Grant Likely 提交于
      Rather than having each interrupt controller driver creating its own barely
      unique .xlate function for irq_domain, create a library of translators which
      any driver can use directly.
      
      v5: - Remove irq_domain_xlate_pci().  It was incorrect.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Mark Salter <msalter@redhat.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Milton Miller <miltonm@bga.com>
      Tested-by: NOlof Johansson <olof@lixom.net>
      16b2e6e2
    • G
      irq_domain: Remove irq_domain_add_simple() · 6b783f7c
      Grant Likely 提交于
      irq_domain_add_simple() was a stop-gap measure until complete irq_domain
      support was complete.  This patch removes the irq_domain_add_simple()
      interface.
      
      This patch also drops the explicit irq_domain initialization performed
      by the mach-versatile code because the versatile interrupt controller
      already has irq_domain support built into it.  This was a bug that was
      hanging around quietly for a while, but with the full irq_domain which
      actually verifies that irq_domain ranges are available it would cause
      the registration to fail and the system wouldn't boot.
      
      v4: Fixed number of irqs in mx5 gpio code
      v2: Updated to pass in host_data pointer on irq_domain allocation.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Cc: Rob Herring <rob.herring@calxeda.com>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Milton Miller <miltonm@bga.com>
      Cc: Russell King <linux@arm.linux.org.uk>
      Tested-by: NOlof Johansson <olof@lixom.net>
      6b783f7c
    • G
      irq_domain: Remove 'new' irq_domain in favour of the ppc one · 75294957
      Grant Likely 提交于
      This patch removes the simplistic implementation of irq_domains and enables
      the powerpc infrastructure for all irq_domain users.  The powerpc
      infrastructure includes support for complex mappings between Linux and
      hardware irq numbers, and can manage allocation of irq_descs.
      
      This patch also converts the few users of irq_domain_add()/irq_domain_del()
      to call irq_domain_add_legacy() instead.
      
      v3: Fix bug that set up too many irqs in translation range.
      v2: Fix removal of irq_alloc_descs() call in gic driver
      Signed-off-by: NGrant 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: NOlof Johansson <olof@lixom.net>
      75294957
    • G
      irq_domain: Add support for base irq and hwirq in legacy mappings · 1bc04f2c
      Grant Likely 提交于
      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: NGrant 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: NOlof Johansson <olof@lixom.net>
      1bc04f2c
    • G
      irq_domain: Replace irq_alloc_host() with revmap-specific initializers · a8db8cf0
      Grant Likely 提交于
      Each revmap type has different arguments for setting up the revmap.
      This patch splits up the generator functions so that each revmap type
      can do its own setup and the user doesn't need to keep track of how
      each revmap type handles the arguments.
      
      This patch also adds a host_data argument to the generators.  There are
      cases where the host_data pointer will be needed before the function returns.
      ie. the legacy map calls the .map callback for each irq before returning.
      
      v2: - Add void *host_data argument to irq_domain_add_*() functions
          - fixed failure to compile
          - Moved IRQ_DOMAIN_MAP_* defines into irqdomain.c
      Signed-off-by: NGrant 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: NOlof Johansson <olof@lixom.net>
      a8db8cf0
    • G
      irq_domain: Remove references to old irq_host names · 68700650
      Grant Likely 提交于
      No functional changes.  Replaces non-exported references to 'host' with domain.
      Does not change any symbol names referenced by other .c files.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Milton Miller <miltonm@bga.com>
      Tested-by: NOlof Johansson <olof@lixom.net>
      68700650
    • G
      irq_domain: remove NO_IRQ from irq domain code · 03848373
      Grant Likely 提交于
      zero always means no irq when using irq domains.  Get rid of the NO_IRQ
      references.
      Signed-off-by: NGrant 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: NOlof Johansson <olof@lixom.net>
      03848373
    • G
      irq_domain: Move irq_domain code from powerpc to kernel/irq · cc79ca69
      Grant Likely 提交于
      This patch only moves the code.  It doesn't make any changes, and the
      code is still only compiled for powerpc.  Follow-on patches will generalize
      the code for other architectures.
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      Cc: Benjamin Herrenschmidt <benh@kernel.crashing.org>
      Cc: Thomas Gleixner <tglx@linutronix.de>
      Cc: Milton Miller <miltonm@bga.com>
      Tested-by: NOlof Johansson <olof@lixom.net>
      cc79ca69
  4. 15 2月, 2012 2 次提交
  5. 28 12月, 2011 1 次提交
  6. 24 12月, 2011 1 次提交
  7. 31 10月, 2011 1 次提交
  8. 20 9月, 2011 1 次提交
  9. 28 7月, 2011 2 次提交
    • G
      dt/irq: add irq_domain_generate_simple() helper · 7e713301
      Grant Likely 提交于
      irq_domain_generate_simple() is an easy way to generate an irq translation
      domain for simple irq controllers.  It assumes a flat 1:1 mapping from
      hardware irq number to an offset of the first linux irq number assigned
      to the controller
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      7e713301
    • G
      irq: add irq_domain translation infrastructure · 08a543ad
      Grant Likely 提交于
      This patch adds irq_domain infrastructure for translating from
      hardware irq numbers to linux irqs.  This is particularly important
      for architectures adding device tree support because the current
      implementation (excluding PowerPC and SPARC) cannot handle
      translation for more than a single interrupt controller.  irq_domain
      supports device tree translation for any number of interrupt
      controllers.
      
      This patch converts x86, Microblaze, ARM and MIPS to use irq_domain
      for device tree irq translation.  x86 is untested beyond compiling it,
      irq_domain is enabled for MIPS and Microblaze, but the old behaviour is
      preserved until the core code is modified to actually register an
      irq_domain yet.  On ARM it works and is required for much of the new
      ARM device tree board support.
      
      PowerPC has /not/ been converted to use this new infrastructure.  It
      is still missing some features before it can replace the virq
      infrastructure already in powerpc (see documentation on
      irq_domain_map/unmap for details).  Followup patches will add the
      missing pieces and migrate PowerPC to use irq_domain.
      
      SPARC has its own method of managing interrupts from the device tree
      and is unaffected by this change.
      Acked-by: NRalf Baechle <ralf@linux-mips.org>
      Signed-off-by: NGrant Likely <grant.likely@secretlab.ca>
      08a543ad