24 Jun, 2016

1 commit

  • Fix the use of __raw IO accessors when the readl/writel_relaxed
    are better. This should fix issues if the kernel is running as
    big endian.

    Signed-off-by: Ben Dooks
    [jac: reformat subject line, fix commit message typo]
    Link: https://lkml.kernel.org/r/1466504432-24187-9-git-send-email-ben.dooks@codethink.co.uk
    Signed-off-by: Jason Cooper

    Ben Dooks
     

14 Oct, 2015

1 commit

  • The struct irq_domain contains a "struct device_node *" field
    (of_node) that is almost the only link between the irqdomain
    and the device tree infrastructure.

    In order to prepare for the removal of that field, convert all
    users to use irq_domain_get_of_node() instead.

    Signed-off-by: Marc Zyngier
    Reviewed-and-tested-by: Hanjun Guo
    Tested-by: Lorenzo Pieralisi
    Cc:
    Cc: Tomasz Nowicki
    Cc: Suravee Suthikulpanit
    Cc: Graeme Gregory
    Cc: Jake Oshins
    Cc: Jiang Liu
    Cc: Jason Cooper
    Cc: Rafael J. Wysocki
    Link: http://lkml.kernel.org/r/1444737105-31573-2-git-send-email-marc.zyngier@arm.com
    Signed-off-by: Thomas Gleixner

    Marc Zyngier
     

16 Sep, 2015

2 commits

  • 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
     
  • Most interrupt flow handlers do not use the irq argument. Those few
    which use it can retrieve the irq number from the irq descriptor.

    Remove the argument.

    Search and replace was done with coccinelle and some extra helper
    scripts around it. Thanks to Julia for her help!

    Signed-off-by: Thomas Gleixner
    Cc: Julia Lawall
    Cc: Jiang Liu

    Thomas Gleixner
     

23 Jul, 2015

1 commit


17 Jul, 2015

1 commit


12 Jul, 2015

3 commits

  • Use irq_desc_get_xxx() to avoid redundant lookup of irq_desc while we
    already have a pointer to corresponding irq_desc.

    Signed-off-by: Jiang Liu
    Cc: Konrad Rzeszutek Wilk
    Cc: Tony Luck
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Bjorn Helgaas
    Cc: Benjamin Herrenschmidt
    Cc: Randy Dunlap
    Cc: Yinghai Lu
    Cc: Borislav Petkov
    Cc: Jason Cooper
    Cc: Kukjin Kim
    Cc: Krzysztof Kozlowski
    Cc: Maxime Ripard
    Link: http://lkml.kernel.org/r/1433391238-19471-11-git-send-email-jiang.liu@linux.intel.com
    Signed-off-by: Thomas Gleixner

    Jiang Liu
     
  • Chained irq handlers usually set up handler data as well. We now have
    a function to set both under irq_desc->lock. Replace the two calls
    with one.

    Search and conversion was done with coccinelle:

    @@
    expression E1, E2, E3;
    @@
    (
    -if (irq_set_handler_data(E1, E2) != 0)
    - BUG();
    |
    -irq_set_handler_data(E1, E2);
    )
    -irq_set_chained_handler(E1, E3);
    +irq_set_chained_handler_and_data(E1, E3, E2);

    @@
    expression E1, E2, E3;
    @@
    (
    -if (irq_set_handler_data(E1, E2) != 0)
    - BUG();
    ...
    |
    -irq_set_handler_data(E1, E2);
    ...
    )
    -irq_set_chained_handler(E1, E3);
    +irq_set_chained_handler_and_data(E1, E3, E2);

    Reported-by: Russell King
    Signed-off-by: Thomas Gleixner
    Cc: Julia Lawall
    Cc: Thomas Gleixner
    Cc: Jason Cooper
    Cc: Kukjin Kim
    Cc: Krzysztof Kozlowski
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: linux-samsung-soc@vger.kernel.org

    Thomas Gleixner
     
  • 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
     

16 Jun, 2015

1 commit

  • The Exynos interrupt combiner IP loses its state when the SoC enters
    into a low power state during a Suspend-to-RAM. This means that if a
    IRQ is used as a source, the interrupts for the devices are disabled
    when the system is resumed from a sleep state so are not triggered.

    Save the interrupt enable set register for each combiner group and
    restore it after resume to make sure that the interrupts are enabled.

    Signed-off-by: Javier Martinez Canillas
    Reviewed-by: Krzysztof Kozlowski
    Cc: Jason Cooper
    Cc: Kukjin Kim
    Cc: Tomasz Figa
    Cc: Doug Anderson
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: Peter Chubb
    Cc: Shuah Khan
    Cc: Chanho Park
    Cc: Sudeep Holla
    Link: http://lkml.kernel.org/r/1434087795-13990-1-git-send-email-javier.martinez@collabora.co.uk
    Signed-off-by: Thomas Gleixner

    Javier Martinez Canillas
     

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

  • The following compilation error occurs on 64-bit Exynos7 SoC:

    drivers/irqchip/exynos-combiner.c: In function ‘combiner_irq_domain_map’:
    drivers/irqchip/exynos-combiner.c:162:2: error: implicit declaration of function ‘set_irq_flags’ [-Werror=implicit-function-declaration]
    set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
    ^
    drivers/irqchip/exynos-combiner.c:162:21: error: ‘IRQF_VALID’ undeclared (first use in this function)
    set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);
    ^
    drivers/irqchip/exynos-combiner.c:162:21: note: each undeclared identifier is reported only once for each function it appears in
    drivers/irqchip/exynos-combiner.c:162:34: error: ‘IRQF_PROBE’ undeclared (first use in this function)
    set_irq_flags(irq, IRQF_VALID | IRQF_PROBE);

    Fix the build error by including linux/interrupt.h.

    Signed-off-by: Naveen Krishna Chatradhi
    Cc: Thomas Gleixner
    Cc: Jason Cooper
    Cc: Sudeep Holla
    Link: https://lkml.kernel.org/r/1409722329-18309-1-git-send-email-ch.naveen@samsung.com
    Signed-off-by: Jason Cooper

    Naveen Krishna Chatradhi
     

14 Feb, 2014

1 commit


02 Dec, 2013

1 commit


16 Jul, 2013

1 commit


28 Jun, 2013

1 commit

  • combiner_init() is referenced only in this file. Make it
    static.

    Signed-off-by: Sachin Kamat
    Cc: linux-arm-kernel@lists.infradead.org
    Cc: kgene.kim@samsung.com
    Cc: t.figa@samsung.com
    Cc: arnd@arndb.de
    Cc: patches@linaro.org
    Link: http://lkml.kernel.org/r/1372246597-32323-2-git-send-email-sachin.kamat@linaro.org
    Signed-off-by: Thomas Gleixner

    Sachin Kamat
     

08 May, 2013

1 commit

  • Pull late ARM Exynos multiplatform changes from Arnd Bergmann:
    "These continue the multiplatform support for exynos, adding support
    for building most of the essential drivers (clocksource, clk, irqchip)
    when combined with other platforms. As a result, it should become
    really easy to add full multiplatform exynos support in 3.11, although
    we don't yet enable it for 3.10.

    The changes were not included in the earlier multiplatform series in
    order to avoid clashes with the other Exynos updates.

    This also includes work from Tomasz Figa to fix the pwm clocksource
    code on Exynos, which is not strictly required for multiplatform, but
    related to the other patches in this set and needed as a bug fix for
    at least one board."

    * tag 'multiplatform-for-linus-2' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (22 commits)
    ARM: dts: exynops4210: really add universal_c210 dts
    ARM: dts: exynos4210: Add basic dts file for universal_c210 board
    ARM: dts: exynos4: Add node for PWM device
    ARM: SAMSUNG: Do not register legacy timer interrupts on Exynos
    clocksource: samsung_pwm_timer: Work around rounding errors in clockevents core
    clocksource: samsung_pwm_timer: Correct programming of clock events
    clocksource: samsung_pwm_timer: Use proper clockevents max_delta
    clocksource: samsung_pwm_timer: Add support for non-DT platforms
    clocksource: samsung_pwm_timer: Drop unused samsung_pwm struct
    clocksource: samsung_pwm_timer: Keep all driver data in a structure
    clocksource: samsung_pwm_timer: Make PWM spinlock global
    clocksource: samsung_pwm_timer: Let platforms select the driver
    Documentation: Add device tree bindings for Samsung PWM timers
    clocksource: add samsung pwm timer driver
    irqchip: exynos: look up irq using irq_find_mapping
    irqchip: exynos: pass irq_base from platform
    irqchip: exynos: localize irq lookup for ATAGS
    irqchip: exynos: allocate combiner_data dynamically
    irqchip: exynos: pass max combiner number to combiner_init
    ARM: exynos: add missing properties for combiner IRQs
    ...

    Linus Torvalds
     

05 May, 2013

1 commit

  • Pull ARM SoC driver changes from Olof Johansson:
    "This is a rather large set of patches for device drivers that for one
    reason or another the subsystem maintainer preferred to get merged
    through the arm-soc tree. There are both new drivers as well as
    existing drivers that are getting converted from platform-specific
    code into standalone drivers using the appropriate subsystem specific
    interfaces.

    In particular, we can now have pinctrl, clk, clksource and irqchip
    drivers in one file per driver, without the need to call into platform
    specific interface, or to get called from platform specific code, as
    long as all information about the hardware is provided through a
    device tree.

    Most of the drivers we touch this time are for clocksource. Since now
    most of them are part of drivers/clocksource, I expect that we won't
    have to touch these again from arm-soc and can let the clocksource
    maintainers take care of these in the future.

    Another larger part of this series is specific to the exynos platform,
    which is seeing some significant effort in upstreaming and
    modernization of its device drivers this time around, which
    unfortunately is also the cause for the churn and a lot of the merge
    conflicts.

    There is one new subsystem that gets merged as part of this series:
    the reset controller interface, which is a very simple interface for
    taking devices on the SoC out of reset or back into reset. Patches to
    use this interface on i.MX follow later in this merge window, and we
    are going to have other platforms (at least tegra and sirf) get
    converted in 3.11. This will let us get rid of platform specific
    callbacks in a number of platform independent device drivers."

    * tag 'drivers-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (256 commits)
    irqchip: s3c24xx: add missing __init annotations
    ARM: dts: Disable the RTC by default on exynos5
    clk: exynos5250: Fix parent clock for sclk_mmc{0,1,2,3}
    ARM: exynos: restore mach/regs-clock.h for exynos5
    clocksource: exynos_mct: fix build error on non-DT
    pinctrl: vt8500: wmt: Fix checking return value of pinctrl_register()
    irqchip: vt8500: Convert arch-vt8500 to new irqchip infrastructure
    reset: NULL deref on allocation failure
    reset: Add reset controller API
    dt: describe base reset signal binding
    ARM: EXYNOS: Add arm-pmu DT binding for exynos421x
    ARM: EXYNOS: Add arm-pmu DT binding for exynos5250
    ARM: EXYNOS: Enable PMUs for exynos4
    irqchip: exynos-combiner: Correct combined IRQs for exynos4
    irqchip: exynos-combiner: Add set_irq_affinity function for combiner_irq
    ARM: EXYNOS: fix compilation error introduced due to common clock migration
    clk: exynos5250: Fix divider values for sclk_mmc{0,1,2,3}
    clk: exynos4: export clocks required for fimc-is
    clk: samsung: Fix compilation error
    clk: tegra: fix enum tegra114_clk to match binding
    ...

    Linus Torvalds
     

20 Apr, 2013

5 commits

  • Since we want to move to using the linear IRQ domain in the
    future, we cannot rely on the irq numbers to be contiguous
    and need to look up the irq from the hwirq using the domain.

    This also turns the bogus comparison with NR_IRQ into a
    more meaningful check to see if the number has a valid mapping.

    Signed-off-by: Arnd Bergmann

    Arnd Bergmann
     
  • The platform code knows the IRQ base, while the irqchip driver
    should really not. This is a littly hacky because we still
    hardwire the IRQ base to 160 for the combiner in the DT case,
    when we should really use -1. Removing that line will cause
    a linear IRQ domain to be use, as we should.

    Signed-off-by: Arnd Bergmann
    Cc: Thomas Gleixner

    Arnd Bergmann
     
  • The IRQ_SPI() macro is not available in the driver when building with sparse
    IRQs or multiplatform, so let's move all users of this into one function
    that we can leave out when building DT-only.

    Signed-off-by: Arnd Bergmann
    Cc: Thomas Gleixner

    Arnd Bergmann
     
  • The number of combiners on a given SoC is a platform specific
    constant, and we cannot encode this number on a multiplatform
    kernel since the header file defining it is not available.

    Allocating the structure dynamically ends up cleaner anyway
    since we keep all the data local.

    Signed-off-by: Arnd Bergmann
    Cc: Thomas Gleixner

    Arnd Bergmann
     
  • We can find out the number of combined IRQs from the device
    tree, but in case of ATAGS boot, the driver currently uses
    hardcoded values based on the SoC type. We can't do that
    in general for a multiplatform kernel, so let's instead pass
    this information from platform code directly in case of
    ATAGS boot.

    Signed-off-by: Arnd Bergmann
    Cc: Thomas Gleixner

    Arnd Bergmann
     

09 Apr, 2013

2 commits

  • This patch corrects combined IRQs for exynos4 series platform. The exynos4412
    has four extra combined irq group and the exynos4212 has two more combined
    irqs
    than exynos4210. Each irq is mapped to IRQ_SPI(xx). Unfortunately, extra 4
    combined IRQs isn't sequential. So, we need to map the irqs manually.

    Signed-off-by: Chanho Park
    Signed-off-by: Kyungmin Park
    [kgene.kim@samsung.com: changes moved into drivers/irqchip/]
    Signed-off-by: Kukjin Kim

    Chanho Park
     
  • This patch adds set_irq_affinity function for combiner_irq. We need this
    function to enable a arm-pmu because the pmu of exynos has combined type
    irqs.

    Reviewed-by: Thomas Abraham
    Signed-off-by: Chanho Park
    Signed-off-by: Kyungmin Park
    [kgene.kim@samsung.com: changes moved into drivers/irqchip/]
    Signed-off-by: Kukjin Kim

    Chanho Park
     

27 Mar, 2013

1 commit

  • These functions have been introduced by commit 10a8c383 (irq: introduce
    entry and exit functions for chained handlers) in asm/mach/irq.h. This
    patch moves them to linux/irqchip/chained_irq.h so that generic irqchip
    drivers do not rely on architecture specific header files.

    Signed-off-by: Catalin Marinas
    Tested-by: Marc Zyngier
    Cc: Russell King
    Cc: Thomas Gleixner
    Cc: Rob Herring

    Catalin Marinas
     

13 Feb, 2013

1 commit

  • Exynos boot is broken with commit 0529e315 (ARM: use common irqchip_init
    for GIC init). This commit split the irqchip initialization into 2 calls
    to of_irq_init. This does not work because of_irq_init requires interrupt
    parents to be in the match list.

    Rather than reverting exynos changes, make it do the proper thing by using
    IRQCHIP_DECLARE. This requires moving the combiner code to drivers/irqchip.

    Reported-by: Doug Anderson
    Signed-off-by: Rob Herring
    Cc: Kukjin Kim
    Cc: Russell King
    Cc: Thomas Gleixner
    Cc: linux-samsung-soc@vger.kernel.org
    Signed-off-by: Olof Johansson

    Rob Herring