Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 140354
b: refs/heads/master
c: 4c0d214
h: refs/heads/master
v: v3
  • Loading branch information
Johannes Weiner authored and Chris Zankel committed Apr 3, 2009
1 parent 38afb0f commit 75e9c50
Show file tree
Hide file tree
Showing 4 changed files with 25 additions and 1 deletion.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 72197b18bc0e86feba7cc9f907551e30948bd526
refs/heads/master: 4c0d214144bcedc0b3582c88d6313055949755b5
3 changes: 3 additions & 0 deletions trunk/arch/xtensa/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
7 changes: 7 additions & 0 deletions trunk/arch/xtensa/include/asm/irq.h
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
14 changes: 14 additions & 0 deletions trunk/arch/xtensa/kernel/irq.c
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,18 @@ static void xtensa_irq_unmask(unsigned int irq)
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);
Expand All @@ -146,6 +158,8 @@ static int xtensa_irq_retrigger(unsigned int irq)

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,
Expand Down

0 comments on commit 75e9c50

Please sign in to comment.