diff options
author | Tony Lindgren <tony@atomide.com> | 2010-03-01 17:19:05 -0500 |
---|---|---|
committer | Tony Lindgren <tony@atomide.com> | 2010-03-01 17:19:05 -0500 |
commit | d702d12167a2c05a346f49aac7a311d597762495 (patch) | |
tree | baae42c299cce34d6df24b5d01f8b1d0b481bd9a /arch/powerpc/sysdev/i8259.c | |
parent | 9418c65f9bd861d0f7e39aab9cfb3aa6f2275d11 (diff) | |
parent | ac0f6f927db539e03e1f3f61bcd4ed57d5cde7a9 (diff) |
Merge with mainline to remove plat-omap/Kconfig conflict
Conflicts:
arch/arm/plat-omap/Kconfig
Diffstat (limited to 'arch/powerpc/sysdev/i8259.c')
-rw-r--r-- | arch/powerpc/sysdev/i8259.c | 24 |
1 files changed, 12 insertions, 12 deletions
diff --git a/arch/powerpc/sysdev/i8259.c b/arch/powerpc/sysdev/i8259.c index 0a55db8a5a29..6323e70e6bf4 100644 --- a/arch/powerpc/sysdev/i8259.c +++ b/arch/powerpc/sysdev/i8259.c | |||
@@ -23,7 +23,7 @@ static unsigned char cached_8259[2] = { 0xff, 0xff }; | |||
23 | #define cached_A1 (cached_8259[0]) | 23 | #define cached_A1 (cached_8259[0]) |
24 | #define cached_21 (cached_8259[1]) | 24 | #define cached_21 (cached_8259[1]) |
25 | 25 | ||
26 | static DEFINE_SPINLOCK(i8259_lock); | 26 | static DEFINE_RAW_SPINLOCK(i8259_lock); |
27 | 27 | ||
28 | static struct irq_host *i8259_host; | 28 | static struct irq_host *i8259_host; |
29 | 29 | ||
@@ -42,7 +42,7 @@ unsigned int i8259_irq(void) | |||
42 | if (pci_intack) | 42 | if (pci_intack) |
43 | irq = readb(pci_intack); | 43 | irq = readb(pci_intack); |
44 | else { | 44 | else { |
45 | spin_lock(&i8259_lock); | 45 | raw_spin_lock(&i8259_lock); |
46 | lock = 1; | 46 | lock = 1; |
47 | 47 | ||
48 | /* Perform an interrupt acknowledge cycle on controller 1. */ | 48 | /* Perform an interrupt acknowledge cycle on controller 1. */ |
@@ -74,7 +74,7 @@ unsigned int i8259_irq(void) | |||
74 | irq = NO_IRQ; | 74 | irq = NO_IRQ; |
75 | 75 | ||
76 | if (lock) | 76 | if (lock) |
77 | spin_unlock(&i8259_lock); | 77 | raw_spin_unlock(&i8259_lock); |
78 | return irq; | 78 | return irq; |
79 | } | 79 | } |
80 | 80 | ||
@@ -82,7 +82,7 @@ static void i8259_mask_and_ack_irq(unsigned int irq_nr) | |||
82 | { | 82 | { |
83 | unsigned long flags; | 83 | unsigned long flags; |
84 | 84 | ||
85 | spin_lock_irqsave(&i8259_lock, flags); | 85 | raw_spin_lock_irqsave(&i8259_lock, flags); |
86 | if (irq_nr > 7) { | 86 | if (irq_nr > 7) { |
87 | cached_A1 |= 1 << (irq_nr-8); | 87 | cached_A1 |= 1 << (irq_nr-8); |
88 | inb(0xA1); /* DUMMY */ | 88 | inb(0xA1); /* DUMMY */ |
@@ -95,7 +95,7 @@ static void i8259_mask_and_ack_irq(unsigned int irq_nr) | |||
95 | outb(cached_21, 0x21); | 95 | outb(cached_21, 0x21); |
96 | outb(0x20, 0x20); /* Non-specific EOI */ | 96 | outb(0x20, 0x20); /* Non-specific EOI */ |
97 | } | 97 | } |
98 | spin_unlock_irqrestore(&i8259_lock, flags); | 98 | raw_spin_unlock_irqrestore(&i8259_lock, flags); |
99 | } | 99 | } |
100 | 100 | ||
101 | static void i8259_set_irq_mask(int irq_nr) | 101 | static void i8259_set_irq_mask(int irq_nr) |
@@ -110,13 +110,13 @@ static void i8259_mask_irq(unsigned int irq_nr) | |||
110 | 110 | ||
111 | pr_debug("i8259_mask_irq(%d)\n", irq_nr); | 111 | pr_debug("i8259_mask_irq(%d)\n", irq_nr); |
112 | 112 | ||
113 | spin_lock_irqsave(&i8259_lock, flags); | 113 | raw_spin_lock_irqsave(&i8259_lock, flags); |
114 | if (irq_nr < 8) | 114 | if (irq_nr < 8) |
115 | cached_21 |= 1 << irq_nr; | 115 | cached_21 |= 1 << irq_nr; |
116 | else | 116 | else |
117 | cached_A1 |= 1 << (irq_nr-8); | 117 | cached_A1 |= 1 << (irq_nr-8); |
118 | i8259_set_irq_mask(irq_nr); | 118 | i8259_set_irq_mask(irq_nr); |
119 | spin_unlock_irqrestore(&i8259_lock, flags); | 119 | raw_spin_unlock_irqrestore(&i8259_lock, flags); |
120 | } | 120 | } |
121 | 121 | ||
122 | static void i8259_unmask_irq(unsigned int irq_nr) | 122 | static void i8259_unmask_irq(unsigned int irq_nr) |
@@ -125,17 +125,17 @@ static void i8259_unmask_irq(unsigned int irq_nr) | |||
125 | 125 | ||
126 | pr_debug("i8259_unmask_irq(%d)\n", irq_nr); | 126 | pr_debug("i8259_unmask_irq(%d)\n", irq_nr); |
127 | 127 | ||
128 | spin_lock_irqsave(&i8259_lock, flags); | 128 | raw_spin_lock_irqsave(&i8259_lock, flags); |
129 | if (irq_nr < 8) | 129 | if (irq_nr < 8) |
130 | cached_21 &= ~(1 << irq_nr); | 130 | cached_21 &= ~(1 << irq_nr); |
131 | else | 131 | else |
132 | cached_A1 &= ~(1 << (irq_nr-8)); | 132 | cached_A1 &= ~(1 << (irq_nr-8)); |
133 | i8259_set_irq_mask(irq_nr); | 133 | i8259_set_irq_mask(irq_nr); |
134 | spin_unlock_irqrestore(&i8259_lock, flags); | 134 | raw_spin_unlock_irqrestore(&i8259_lock, flags); |
135 | } | 135 | } |
136 | 136 | ||
137 | static struct irq_chip i8259_pic = { | 137 | static struct irq_chip i8259_pic = { |
138 | .name = " i8259 ", | 138 | .name = "i8259", |
139 | .mask = i8259_mask_irq, | 139 | .mask = i8259_mask_irq, |
140 | .disable = i8259_mask_irq, | 140 | .disable = i8259_mask_irq, |
141 | .unmask = i8259_unmask_irq, | 141 | .unmask = i8259_unmask_irq, |
@@ -241,7 +241,7 @@ void i8259_init(struct device_node *node, unsigned long intack_addr) | |||
241 | unsigned long flags; | 241 | unsigned long flags; |
242 | 242 | ||
243 | /* initialize the controller */ | 243 | /* initialize the controller */ |
244 | spin_lock_irqsave(&i8259_lock, flags); | 244 | raw_spin_lock_irqsave(&i8259_lock, flags); |
245 | 245 | ||
246 | /* Mask all first */ | 246 | /* Mask all first */ |
247 | outb(0xff, 0xA1); | 247 | outb(0xff, 0xA1); |
@@ -273,7 +273,7 @@ void i8259_init(struct device_node *node, unsigned long intack_addr) | |||
273 | outb(cached_A1, 0xA1); | 273 | outb(cached_A1, 0xA1); |
274 | outb(cached_21, 0x21); | 274 | outb(cached_21, 0x21); |
275 | 275 | ||
276 | spin_unlock_irqrestore(&i8259_lock, flags); | 276 | raw_spin_unlock_irqrestore(&i8259_lock, flags); |
277 | 277 | ||
278 | /* create a legacy host */ | 278 | /* create a legacy host */ |
279 | i8259_host = irq_alloc_host(node, IRQ_HOST_MAP_LEGACY, | 279 | i8259_host = irq_alloc_host(node, IRQ_HOST_MAP_LEGACY, |