02 Feb, 2016

1 commit

  • The Allwinner sunxi specific interrupt controller cannot be compiled
    for any architecture except arm:

    drivers/irqchip/irq-sun4i.c:25:26: fatal error: asm/mach/irq.h: No such file or directory
    compilation terminated.

    It turns out that this header is actually not needed for the driver, so remove
    it and allow compilation for other architectures like arm64.

    Signed-off-by: Andre Przywara
    Acked-by: Arnd Bergmann
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Jason Cooper
    Cc: Marc Zyngier
    Cc: Maxime Ripard
    Cc: Chen-Yu Tsai
    Cc: linux-sunxi@googlegroups.com
    Link: http://lkml.kernel.org/r/1454348370-3816-2-git-send-email-andre.przywara@arm.com
    Signed-off-by: Thomas Gleixner

    Andre Przywara
     

16 Sep, 2015

1 commit

  • 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
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Russell King
    Cc: Jason Cooper
    Cc: Kukjin Kim
    Cc: Krzysztof Kozlowski
    Cc: Stephen Warren
    Cc: Lee Jones
    Cc: Alexander Shiyan
    Cc: Maxime Ripard
    Cc: linux-rpi-kernel@lists.infradead.org
    Cc: linux-samsung-soc@vger.kernel.org
    Link: http://lkml.kernel.org/r/1440889285-5637-3-git-send-email-robh@kernel.org
    Signed-off-by: Thomas Gleixner

    Rob Herring
     

12 Jul, 2015

1 commit

  • The IRQCHIP_DECLARE macro moved to to 'include/linux/irqchip.h', so
    the local irqchip.h became an empty shell, which solely includes
    include/linux/irqchip.h

    Include the global header in all irqchip drivers instead of the local
    header, so we can remove it.

    Signed-off-by: Joel Porquet
    Cc: vgupta@synopsys.com
    Cc: monstr@monstr.eu
    Cc: ralf@linux-mips.org
    Cc: jason@lakedaemon.net
    Link: http://lkml.kernel.org/r/1882096.X39jVG8e0D@joel-zenbook
    Signed-off-by: Thomas Gleixner

    Joel Porquet
     

05 May, 2015

1 commit

  • The irq_domain_ops are not modified by the driver and the irqdomain core
    code accepts pointer to a const data.

    Signed-off-by: Krzysztof Kozlowski
    Cc: Jason Cooper
    Cc: Kukjin Kim
    Cc: Stephen Warren
    Cc: Lee Jones
    Cc: Matthias Brugger
    Cc: Maxime Ripard
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-rpi-kernel@lists.infradead.org
    Cc: linux-mediatek@lists.infradead.org
    Link: http://lkml.kernel.org/r/1430139264-4362-2-git-send-email-k.kozlowski.k@gmail.com
    Signed-off-by: Thomas Gleixner

    Krzysztof Kozlowski
     

03 Sep, 2014

1 commit


19 Mar, 2014

2 commits

  • Now that we only ack irq 0 the code can be simplified a lot.

    Also switch from read / modify / write to a simple write clear:
    1) This is what the android code does (it has a hack for acking irq 0
    in its unmask code doing this)

    2) read / modify / write simply does not make sense for an irq status
    register like this, if the other bits are writeable (and the data sheet says
    they are not) they should be write 1 to clear, since otherwise a read /
    modify / write can race with a device raising an interrupt and then clear
    the pending bit unintentionally

    Signed-off-by: Hans de Goede
    Acked-by: Maxime Ripard
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-sunxi@googlegroups.com
    Link: http://lkml.kernel.org/r/1394895894-8891-3-git-send-email-hdegoede@redhat.com
    Signed-off-by: Thomas Gleixner

    Hans de Goede
     
  • Since the sun4i irq chip does not require any action and clears the interrupt
    when the level goes back to inactive, we don't need to mask / unmask for
    non oneshot IRQs, to achieve this we make sun4i_irq_ack a nop for all irqs
    except irq 0 and use handle_fasteoi_irq for all interrupts.

    Now there might be a case when the device reactivates the interrupt
    before the RETI. But that does not matter as we run the primary
    interrupt handlers with interrupts disabled.

    This also allows us to get rid of needing to use 2 irq_chip structs, this
    means that the IRQCHIP_EOI_THREADED | IRQCHIP_EOI_IF_HANDLED will now influence
    all interrupts rather then just irq 0, but that does not matter as the eoi
    is now a nop anyways for all interrupts but irq 0.

    Signed-off-by: Hans de Goede
    Acked-by: Maxime Ripard
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-sunxi@googlegroups.com
    Link: http://lkml.kernel.org/r/1394895894-8891-2-git-send-email-hdegoede@redhat.com
    Signed-off-by: Thomas Gleixner

    Hans de Goede
     

14 Mar, 2014

4 commits

  • All IRQs except for IRQ 0 seem to not need acking, so drop acking for them.

    The ENMI needs to have the ack done *after* clearing the interrupt source,
    otherwise we will get a spurious interrupt for each real interrupt.

    So use the new IRQCHIP_EOI_THREADED flag for this in combination with
    handle_fasteoi_irq. This uses a separate irq_chip struct for IRQ 0,
    since we only want this behavior for IRQ 0.

    Signed-off-by: Hans de Goede
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-sunxi@googlegroups.com
    Cc: Maxime Ripard
    Link: http://lkml.kernel.org/r/1394733834-26839-5-git-send-email-hdegoede@redhat.com
    Signed-off-by: Thomas Gleixner

    Hans de Goede
     
  • The comment was claiming that we were masking all irqs, while the code actually
    *un*masks all of them.

    Signed-off-by: Hans de Goede
    Acked-by: Maxime Ripard
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-sunxi@googlegroups.com
    Link: http://lkml.kernel.org/r/1394733834-26839-4-git-send-email-hdegoede@redhat.com
    Signed-off-by: Thomas Gleixner

    Hans de Goede
     
  • SUN4I_IRQ_VECTOR_REG containing 0 can mean one of 3 things:

    1) no more irqs pending
    2) irq 0 pending
    3) spurious irq

    So if we immediately get a reading of 0, check the irq-pending reg
    to differentiate between 2 and 3. We only do this once to avoid
    the extra check in the common case of 1) hapening after having
    read the vector-reg once.

    Signed-off-by: Hans de Goede
    Acked-by: Maxime Ripard
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-sunxi@googlegroups.com
    Link: http://lkml.kernel.org/r/1394733834-26839-3-git-send-email-hdegoede@redhat.com
    Signed-off-by: Thomas Gleixner

    Hans de Goede
     
  • The Allwinner A10 compatibles were following a slightly different compatible
    patterns than the rest of the SoCs for historical reasons. Change the compatibles
    to match the other pattern in the irq controller driver for consistency.

    Signed-off-by: Maxime Ripard
    Cc: linux-arm-kernel@lists.infradead.org
    Signed-off-by: Thomas Gleixner

    Maxime Ripard
     

12 Mar, 2014

1 commit

  • LTO patches add __visible to the asmlinkage define, causing
    compilation warnings like:

    drivers/irqchip/irq-gic.c:283:1: warning: 'externally_visible'
    attribute have effect only on public objects [-Wattributes]

    Drop asmlinkage here to avoid such warnings.

    Reported-by: Olof's autobuilder
    Signed-off-by: Stephen Boyd
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: khilman@linaro.org
    Cc: Russell King
    Cc: Josh Cartwright
    Cc: Andi Kleen
    Link: http://lkml.kernel.org/r/1393980030-17770-1-git-send-email-sboyd@codeaurora.org
    Signed-off-by: Thomas Gleixner

    Stephen Boyd
     

05 Jul, 2013

1 commit


09 Apr, 2013

1 commit

  • During the introduction of the Allwinner SoC platforms, sunxi was
    initially meant as a generic name for all the variants of the Allwinner
    SoC.

    It was ok at the time of the support of only the A10 and A13 that
    looks pretty much the same, but it's beginning to be troublesome with
    the future addition of the Allwinner A31 (sun6i) that is quite
    different, and would introduce some weird logic, where sunxi would
    actually mean in some case sun4i and sun5i but without sun6i...

    Moreover, it makes the compatible strings naming scheme not consistent
    with other architectures, where usually for this kind of compability, we
    just use the oldest SoC name that has this IP, so let's do just this.

    Signed-off-by: Maxime Ripard

    Maxime Ripard