lkml.org 
[lkml]   [2009]   [Mar]   [10]   [last100]   RSS Feed
Views: [wrap][no wrap]   [headers]  [forward] 
 
Messages in this thread
    Patch in this message
    /
    Date
    From
    Subject[patch 3/8] xtensa: variant irq set callbacks
    Allow the core variant code to provide irq enable/disable callbacks.

    The s6000 has a crossbar that multiplexes peripheral IRQ lines to a
    smaller number of core lines. These callbacks allow the s6000 variant
    to program the crossbar when core lines are toggled.

    Signed-off-by: Johannes Weiner <jw@emlix.com>
    ---
    arch/xtensa/Kconfig | 3 +++
    arch/xtensa/include/asm/irq.h | 7 +++++++
    arch/xtensa/kernel/irq.c | 14 ++++++++++++++
    3 files changed, 24 insertions(+)

    --- a/arch/xtensa/Kconfig
    +++ b/arch/xtensa/Kconfig
    @@ -51,6 +51,9 @@ source "kernel/Kconfig.freezer"
    config MMU
    def_bool n

    +config VARIANT_IRQ_SWITCH
    + def_bool n
    +
    menu "Processor type and features"

    choice
    --- a/arch/xtensa/include/asm/irq.h
    +++ b/arch/xtensa/include/asm/irq.h
    @@ -14,6 +14,13 @@
    #include <platform/hardware.h>
    #include <variant/core.h>

    +#ifdef CONFIG_VARIANT_IRQ_SWITCH
    +#include <variant/irq.h>
    +#else
    +static inline void variant_irq_enable(unsigned int irq) { }
    +static inline void variant_irq_disable(unsigned int irq) { }
    +#endif
    +
    #ifndef PLATFORM_NR_IRQS
    # define PLATFORM_NR_IRQS 0
    #endif
    --- a/arch/xtensa/kernel/irq.c
    +++ b/arch/xtensa/kernel/irq.c
    @@ -132,6 +132,18 @@ static void xtensa_irq_unmask(unsigned i
    set_sr (cached_irq_mask, INTENABLE);
    }

    +static void xtensa_irq_enable(unsigned int irq)
    +{
    + variant_irq_enable(irq);
    + xtensa_irq_unmask(irq);
    +}
    +
    +static void xtensa_irq_disable(unsigned int irq)
    +{
    + xtensa_irq_mask(irq);
    + variant_irq_disable(irq);
    +}
    +
    static void xtensa_irq_ack(unsigned int irq)
    {
    set_sr(1 << irq, INTCLEAR);
    @@ -146,6 +158,8 @@ static int xtensa_irq_retrigger(unsigned

    static struct irq_chip xtensa_irq_chip = {
    .name = "xtensa",
    + .enable = xtensa_irq_enable,
    + .disable = xtensa_irq_disable,
    .mask = xtensa_irq_mask,
    .unmask = xtensa_irq_unmask,
    .ack = xtensa_irq_ack,
    --



    \
     
     \ /
      Last update: 2009-03-10 14:07    [W:0.020 / U:1.104 seconds]
    ©2003-2016 Jasper Spaans. hosted at Digital OceanAdvertise on this site