diff options
author | Ralf Baechle <ralf@linux-mips.org> | 2010-02-27 06:53:41 -0500 |
---|---|---|
committer | Ralf Baechle <ralf@linux-mips.org> | 2010-02-27 06:53:41 -0500 |
commit | 7fe2d9c41de132b51e550212aa5709fc4e132c2c (patch) | |
tree | 7a69c168990773d5d3f47c88293199fb506afd47 /arch/mips/nxp | |
parent | 541247f4d26f90ce0d277082d108feb121b6ae03 (diff) |
MIPS: PNX833x: Convert IRQ controller locks to raw spinlocks.
Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'arch/mips/nxp')
-rw-r--r-- | arch/mips/nxp/pnx833x/common/interrupts.c | 36 |
1 files changed, 18 insertions, 18 deletions
diff --git a/arch/mips/nxp/pnx833x/common/interrupts.c b/arch/mips/nxp/pnx833x/common/interrupts.c index 3b4f8586e21c..941916f8aaff 100644 --- a/arch/mips/nxp/pnx833x/common/interrupts.c +++ b/arch/mips/nxp/pnx833x/common/interrupts.c | |||
@@ -156,19 +156,19 @@ static int irqflags[PNX833X_PIC_NUM_IRQ]; /* initialized by zeroes */ | |||
156 | #define IRQFLAG_STARTED 1 | 156 | #define IRQFLAG_STARTED 1 |
157 | #define IRQFLAG_DISABLED 2 | 157 | #define IRQFLAG_DISABLED 2 |
158 | 158 | ||
159 | static DEFINE_SPINLOCK(pnx833x_irq_lock); | 159 | static DEFINE_RAW_SPINLOCK(pnx833x_irq_lock); |
160 | 160 | ||
161 | static unsigned int pnx833x_startup_pic_irq(unsigned int irq) | 161 | static unsigned int pnx833x_startup_pic_irq(unsigned int irq) |
162 | { | 162 | { |
163 | unsigned long flags; | 163 | unsigned long flags; |
164 | unsigned int pic_irq = irq - PNX833X_PIC_IRQ_BASE; | 164 | unsigned int pic_irq = irq - PNX833X_PIC_IRQ_BASE; |
165 | 165 | ||
166 | spin_lock_irqsave(&pnx833x_irq_lock, flags); | 166 | raw_spin_lock_irqsave(&pnx833x_irq_lock, flags); |
167 | 167 | ||
168 | irqflags[pic_irq] = IRQFLAG_STARTED; /* started, not disabled */ | 168 | irqflags[pic_irq] = IRQFLAG_STARTED; /* started, not disabled */ |
169 | pnx833x_hard_enable_pic_irq(pic_irq); | 169 | pnx833x_hard_enable_pic_irq(pic_irq); |
170 | 170 | ||
171 | spin_unlock_irqrestore(&pnx833x_irq_lock, flags); | 171 | raw_spin_unlock_irqrestore(&pnx833x_irq_lock, flags); |
172 | return 0; | 172 | return 0; |
173 | } | 173 | } |
174 | 174 | ||
@@ -177,12 +177,12 @@ static void pnx833x_shutdown_pic_irq(unsigned int irq) | |||
177 | unsigned long flags; | 177 | unsigned long flags; |
178 | unsigned int pic_irq = irq - PNX833X_PIC_IRQ_BASE; | 178 | unsigned int pic_irq = irq - PNX833X_PIC_IRQ_BASE; |
179 | 179 | ||
180 | spin_lock_irqsave(&pnx833x_irq_lock, flags); | 180 | raw_spin_lock_irqsave(&pnx833x_irq_lock, flags); |
181 | 181 | ||
182 | irqflags[pic_irq] = 0; /* not started */ | 182 | irqflags[pic_irq] = 0; /* not started */ |
183 | pnx833x_hard_disable_pic_irq(pic_irq); | 183 | pnx833x_hard_disable_pic_irq(pic_irq); |
184 | 184 | ||
185 | spin_unlock_irqrestore(&pnx833x_irq_lock, flags); | 185 | raw_spin_unlock_irqrestore(&pnx833x_irq_lock, flags); |
186 | } | 186 | } |
187 | 187 | ||
188 | static void pnx833x_enable_pic_irq(unsigned int irq) | 188 | static void pnx833x_enable_pic_irq(unsigned int irq) |
@@ -190,13 +190,13 @@ static void pnx833x_enable_pic_irq(unsigned int irq) | |||
190 | unsigned long flags; | 190 | unsigned long flags; |
191 | unsigned int pic_irq = irq - PNX833X_PIC_IRQ_BASE; | 191 | unsigned int pic_irq = irq - PNX833X_PIC_IRQ_BASE; |
192 | 192 | ||
193 | spin_lock_irqsave(&pnx833x_irq_lock, flags); | 193 | raw_spin_lock_irqsave(&pnx833x_irq_lock, flags); |
194 | 194 | ||
195 | irqflags[pic_irq] &= ~IRQFLAG_DISABLED; | 195 | irqflags[pic_irq] &= ~IRQFLAG_DISABLED; |
196 | if (irqflags[pic_irq] == IRQFLAG_STARTED) | 196 | if (irqflags[pic_irq] == IRQFLAG_STARTED) |
197 | pnx833x_hard_enable_pic_irq(pic_irq); | 197 | pnx833x_hard_enable_pic_irq(pic_irq); |
198 | 198 | ||
199 | spin_unlock_irqrestore(&pnx833x_irq_lock, flags); | 199 | raw_spin_unlock_irqrestore(&pnx833x_irq_lock, flags); |
200 | } | 200 | } |
201 | 201 | ||
202 | static void pnx833x_disable_pic_irq(unsigned int irq) | 202 | static void pnx833x_disable_pic_irq(unsigned int irq) |
@@ -204,12 +204,12 @@ static void pnx833x_disable_pic_irq(unsigned int irq) | |||
204 | unsigned long flags; | 204 | unsigned long flags; |
205 | unsigned int pic_irq = irq - PNX833X_PIC_IRQ_BASE; | 205 | unsigned int pic_irq = irq - PNX833X_PIC_IRQ_BASE; |
206 | 206 | ||
207 | spin_lock_irqsave(&pnx833x_irq_lock, flags); | 207 | raw_spin_lock_irqsave(&pnx833x_irq_lock, flags); |
208 | 208 | ||
209 | irqflags[pic_irq] |= IRQFLAG_DISABLED; | 209 | irqflags[pic_irq] |= IRQFLAG_DISABLED; |
210 | pnx833x_hard_disable_pic_irq(pic_irq); | 210 | pnx833x_hard_disable_pic_irq(pic_irq); |
211 | 211 | ||
212 | spin_unlock_irqrestore(&pnx833x_irq_lock, flags); | 212 | raw_spin_unlock_irqrestore(&pnx833x_irq_lock, flags); |
213 | } | 213 | } |
214 | 214 | ||
215 | static void pnx833x_ack_pic_irq(unsigned int irq) | 215 | static void pnx833x_ack_pic_irq(unsigned int irq) |
@@ -220,15 +220,15 @@ static void pnx833x_end_pic_irq(unsigned int irq) | |||
220 | { | 220 | { |
221 | } | 221 | } |
222 | 222 | ||
223 | static DEFINE_SPINLOCK(pnx833x_gpio_pnx833x_irq_lock); | 223 | static DEFINE_RAW_SPINLOCK(pnx833x_gpio_pnx833x_irq_lock); |
224 | 224 | ||
225 | static unsigned int pnx833x_startup_gpio_irq(unsigned int irq) | 225 | static unsigned int pnx833x_startup_gpio_irq(unsigned int irq) |
226 | { | 226 | { |
227 | int pin = irq - PNX833X_GPIO_IRQ_BASE; | 227 | int pin = irq - PNX833X_GPIO_IRQ_BASE; |
228 | unsigned long flags; | 228 | unsigned long flags; |
229 | spin_lock_irqsave(&pnx833x_gpio_pnx833x_irq_lock, flags); | 229 | raw_spin_lock_irqsave(&pnx833x_gpio_pnx833x_irq_lock, flags); |
230 | pnx833x_gpio_enable_irq(pin); | 230 | pnx833x_gpio_enable_irq(pin); |
231 | spin_unlock_irqrestore(&pnx833x_gpio_pnx833x_irq_lock, flags); | 231 | raw_spin_unlock_irqrestore(&pnx833x_gpio_pnx833x_irq_lock, flags); |
232 | return 0; | 232 | return 0; |
233 | } | 233 | } |
234 | 234 | ||
@@ -236,18 +236,18 @@ static void pnx833x_enable_gpio_irq(unsigned int irq) | |||
236 | { | 236 | { |
237 | int pin = irq - PNX833X_GPIO_IRQ_BASE; | 237 | int pin = irq - PNX833X_GPIO_IRQ_BASE; |
238 | unsigned long flags; | 238 | unsigned long flags; |
239 | spin_lock_irqsave(&pnx833x_gpio_pnx833x_irq_lock, flags); | 239 | raw_spin_lock_irqsave(&pnx833x_gpio_pnx833x_irq_lock, flags); |
240 | pnx833x_gpio_enable_irq(pin); | 240 | pnx833x_gpio_enable_irq(pin); |
241 | spin_unlock_irqrestore(&pnx833x_gpio_pnx833x_irq_lock, flags); | 241 | raw_spin_unlock_irqrestore(&pnx833x_gpio_pnx833x_irq_lock, flags); |
242 | } | 242 | } |
243 | 243 | ||
244 | static void pnx833x_disable_gpio_irq(unsigned int irq) | 244 | static void pnx833x_disable_gpio_irq(unsigned int irq) |
245 | { | 245 | { |
246 | int pin = irq - PNX833X_GPIO_IRQ_BASE; | 246 | int pin = irq - PNX833X_GPIO_IRQ_BASE; |
247 | unsigned long flags; | 247 | unsigned long flags; |
248 | spin_lock_irqsave(&pnx833x_gpio_pnx833x_irq_lock, flags); | 248 | raw_spin_lock_irqsave(&pnx833x_gpio_pnx833x_irq_lock, flags); |
249 | pnx833x_gpio_disable_irq(pin); | 249 | pnx833x_gpio_disable_irq(pin); |
250 | spin_unlock_irqrestore(&pnx833x_gpio_pnx833x_irq_lock, flags); | 250 | raw_spin_unlock_irqrestore(&pnx833x_gpio_pnx833x_irq_lock, flags); |
251 | } | 251 | } |
252 | 252 | ||
253 | static void pnx833x_ack_gpio_irq(unsigned int irq) | 253 | static void pnx833x_ack_gpio_irq(unsigned int irq) |
@@ -258,9 +258,9 @@ static void pnx833x_end_gpio_irq(unsigned int irq) | |||
258 | { | 258 | { |
259 | int pin = irq - PNX833X_GPIO_IRQ_BASE; | 259 | int pin = irq - PNX833X_GPIO_IRQ_BASE; |
260 | unsigned long flags; | 260 | unsigned long flags; |
261 | spin_lock_irqsave(&pnx833x_gpio_pnx833x_irq_lock, flags); | 261 | raw_spin_lock_irqsave(&pnx833x_gpio_pnx833x_irq_lock, flags); |
262 | pnx833x_gpio_clear_irq(pin); | 262 | pnx833x_gpio_clear_irq(pin); |
263 | spin_unlock_irqrestore(&pnx833x_gpio_pnx833x_irq_lock, flags); | 263 | raw_spin_unlock_irqrestore(&pnx833x_gpio_pnx833x_irq_lock, flags); |
264 | } | 264 | } |
265 | 265 | ||
266 | static int pnx833x_set_type_gpio_irq(unsigned int irq, unsigned int flow_type) | 266 | static int pnx833x_set_type_gpio_irq(unsigned int irq, unsigned int flow_type) |