Skip to content

Commit

Permalink
---
Browse files Browse the repository at this point in the history
yaml
---
r: 182140
b: refs/heads/master
c: 7fe2d9c
h: refs/heads/master
v: v3
  • Loading branch information
Ralf Baechle committed Feb 27, 2010
1 parent fed5204 commit 896b37f
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 19 deletions.
2 changes: 1 addition & 1 deletion [refs]
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
---
refs/heads/master: 541247f4d26f90ce0d277082d108feb121b6ae03
refs/heads/master: 7fe2d9c41de132b51e550212aa5709fc4e132c2c
36 changes: 18 additions & 18 deletions trunk/arch/mips/nxp/pnx833x/common/interrupts.c
Original file line number Diff line number Diff line change
Expand Up @@ -156,19 +156,19 @@ static int irqflags[PNX833X_PIC_NUM_IRQ]; /* initialized by zeroes */
#define IRQFLAG_STARTED 1
#define IRQFLAG_DISABLED 2

static DEFINE_SPINLOCK(pnx833x_irq_lock);
static DEFINE_RAW_SPINLOCK(pnx833x_irq_lock);

static unsigned int pnx833x_startup_pic_irq(unsigned int irq)
{
unsigned long flags;
unsigned int pic_irq = irq - PNX833X_PIC_IRQ_BASE;

spin_lock_irqsave(&pnx833x_irq_lock, flags);
raw_spin_lock_irqsave(&pnx833x_irq_lock, flags);

irqflags[pic_irq] = IRQFLAG_STARTED; /* started, not disabled */
pnx833x_hard_enable_pic_irq(pic_irq);

spin_unlock_irqrestore(&pnx833x_irq_lock, flags);
raw_spin_unlock_irqrestore(&pnx833x_irq_lock, flags);
return 0;
}

Expand All @@ -177,39 +177,39 @@ static void pnx833x_shutdown_pic_irq(unsigned int irq)
unsigned long flags;
unsigned int pic_irq = irq - PNX833X_PIC_IRQ_BASE;

spin_lock_irqsave(&pnx833x_irq_lock, flags);
raw_spin_lock_irqsave(&pnx833x_irq_lock, flags);

irqflags[pic_irq] = 0; /* not started */
pnx833x_hard_disable_pic_irq(pic_irq);

spin_unlock_irqrestore(&pnx833x_irq_lock, flags);
raw_spin_unlock_irqrestore(&pnx833x_irq_lock, flags);
}

static void pnx833x_enable_pic_irq(unsigned int irq)
{
unsigned long flags;
unsigned int pic_irq = irq - PNX833X_PIC_IRQ_BASE;

spin_lock_irqsave(&pnx833x_irq_lock, flags);
raw_spin_lock_irqsave(&pnx833x_irq_lock, flags);

irqflags[pic_irq] &= ~IRQFLAG_DISABLED;
if (irqflags[pic_irq] == IRQFLAG_STARTED)
pnx833x_hard_enable_pic_irq(pic_irq);

spin_unlock_irqrestore(&pnx833x_irq_lock, flags);
raw_spin_unlock_irqrestore(&pnx833x_irq_lock, flags);
}

static void pnx833x_disable_pic_irq(unsigned int irq)
{
unsigned long flags;
unsigned int pic_irq = irq - PNX833X_PIC_IRQ_BASE;

spin_lock_irqsave(&pnx833x_irq_lock, flags);
raw_spin_lock_irqsave(&pnx833x_irq_lock, flags);

irqflags[pic_irq] |= IRQFLAG_DISABLED;
pnx833x_hard_disable_pic_irq(pic_irq);

spin_unlock_irqrestore(&pnx833x_irq_lock, flags);
raw_spin_unlock_irqrestore(&pnx833x_irq_lock, flags);
}

static void pnx833x_ack_pic_irq(unsigned int irq)
Expand All @@ -220,34 +220,34 @@ static void pnx833x_end_pic_irq(unsigned int irq)
{
}

static DEFINE_SPINLOCK(pnx833x_gpio_pnx833x_irq_lock);
static DEFINE_RAW_SPINLOCK(pnx833x_gpio_pnx833x_irq_lock);

static unsigned int pnx833x_startup_gpio_irq(unsigned int irq)
{
int pin = irq - PNX833X_GPIO_IRQ_BASE;
unsigned long flags;
spin_lock_irqsave(&pnx833x_gpio_pnx833x_irq_lock, flags);
raw_spin_lock_irqsave(&pnx833x_gpio_pnx833x_irq_lock, flags);
pnx833x_gpio_enable_irq(pin);
spin_unlock_irqrestore(&pnx833x_gpio_pnx833x_irq_lock, flags);
raw_spin_unlock_irqrestore(&pnx833x_gpio_pnx833x_irq_lock, flags);
return 0;
}

static void pnx833x_enable_gpio_irq(unsigned int irq)
{
int pin = irq - PNX833X_GPIO_IRQ_BASE;
unsigned long flags;
spin_lock_irqsave(&pnx833x_gpio_pnx833x_irq_lock, flags);
raw_spin_lock_irqsave(&pnx833x_gpio_pnx833x_irq_lock, flags);
pnx833x_gpio_enable_irq(pin);
spin_unlock_irqrestore(&pnx833x_gpio_pnx833x_irq_lock, flags);
raw_spin_unlock_irqrestore(&pnx833x_gpio_pnx833x_irq_lock, flags);
}

static void pnx833x_disable_gpio_irq(unsigned int irq)
{
int pin = irq - PNX833X_GPIO_IRQ_BASE;
unsigned long flags;
spin_lock_irqsave(&pnx833x_gpio_pnx833x_irq_lock, flags);
raw_spin_lock_irqsave(&pnx833x_gpio_pnx833x_irq_lock, flags);
pnx833x_gpio_disable_irq(pin);
spin_unlock_irqrestore(&pnx833x_gpio_pnx833x_irq_lock, flags);
raw_spin_unlock_irqrestore(&pnx833x_gpio_pnx833x_irq_lock, flags);
}

static void pnx833x_ack_gpio_irq(unsigned int irq)
Expand All @@ -258,9 +258,9 @@ static void pnx833x_end_gpio_irq(unsigned int irq)
{
int pin = irq - PNX833X_GPIO_IRQ_BASE;
unsigned long flags;
spin_lock_irqsave(&pnx833x_gpio_pnx833x_irq_lock, flags);
raw_spin_lock_irqsave(&pnx833x_gpio_pnx833x_irq_lock, flags);
pnx833x_gpio_clear_irq(pin);
spin_unlock_irqrestore(&pnx833x_gpio_pnx833x_irq_lock, flags);
raw_spin_unlock_irqrestore(&pnx833x_gpio_pnx833x_irq_lock, flags);
}

static int pnx833x_set_type_gpio_irq(unsigned int irq, unsigned int flow_type)
Expand Down

0 comments on commit 896b37f

Please sign in to comment.