~ubuntu-branches/debian/wheezy/linux-2.6/wheezy

« back to all changes in this revision

Viewing changes to arch/mips/jazz/irq.c

  • Committer: Bazaar Package Importer
  • Author(s): Ben Hutchings, Ben Hutchings, Aurelien Jarno, Martin Michlmayr
  • Date: 2011-04-06 13:53:30 UTC
  • mfrom: (43.1.5 sid)
  • Revision ID: james.westby@ubuntu.com-20110406135330-wjufxhd0tvn3zx4z
Tags: 2.6.38-3
[ Ben Hutchings ]
* [ppc64] Add to linux-tools package architectures (Closes: #620124)
* [amd64] Save cr4 to mmu_cr4_features at boot time (Closes: #620284)
* appletalk: Fix bugs introduced when removing use of BKL
* ALSA: Fix yet another race in disconnection
* cciss: Fix lost command issue
* ath9k: Fix kernel panic in AR2427
* ses: Avoid kernel panic when lun 0 is not mapped
* PCI/ACPI: Report ASPM support to BIOS if not disabled from command line

[ Aurelien Jarno ]
* rtlwifi: fix build when PCI is not enabled.

[ Martin Michlmayr ]
* rtlwifi: Eliminate udelay calls with too large values (Closes: #620204)

Show diffs side-by-side

added added

removed removed

Lines of Context:
12
12
#include <linux/kernel.h>
13
13
#include <linux/smp.h>
14
14
#include <linux/spinlock.h>
 
15
#include <linux/irq.h>
15
16
 
16
17
#include <asm/irq_cpu.h>
17
18
#include <asm/i8253.h>
20
21
#include <asm/jazz.h>
21
22
#include <asm/pgtable.h>
22
23
 
23
 
static DEFINE_SPINLOCK(r4030_lock);
 
24
static DEFINE_RAW_SPINLOCK(r4030_lock);
24
25
 
25
26
static void enable_r4030_irq(unsigned int irq)
26
27
{
27
28
        unsigned int mask = 1 << (irq - JAZZ_IRQ_START);
28
29
        unsigned long flags;
29
30
 
30
 
        spin_lock_irqsave(&r4030_lock, flags);
 
31
        raw_spin_lock_irqsave(&r4030_lock, flags);
31
32
        mask |= r4030_read_reg16(JAZZ_IO_IRQ_ENABLE);
32
33
        r4030_write_reg16(JAZZ_IO_IRQ_ENABLE, mask);
33
 
        spin_unlock_irqrestore(&r4030_lock, flags);
 
34
        raw_spin_unlock_irqrestore(&r4030_lock, flags);
34
35
}
35
36
 
36
37
void disable_r4030_irq(unsigned int irq)
38
39
        unsigned int mask = ~(1 << (irq - JAZZ_IRQ_START));
39
40
        unsigned long flags;
40
41
 
41
 
        spin_lock_irqsave(&r4030_lock, flags);
 
42
        raw_spin_lock_irqsave(&r4030_lock, flags);
42
43
        mask &= r4030_read_reg16(JAZZ_IO_IRQ_ENABLE);
43
44
        r4030_write_reg16(JAZZ_IO_IRQ_ENABLE, mask);
44
 
        spin_unlock_irqrestore(&r4030_lock, flags);
 
45
        raw_spin_unlock_irqrestore(&r4030_lock, flags);
45
46
}
46
47
 
47
48
static struct irq_chip r4030_irq_type = {