@@ -178,7 +178,7 @@ struct meson_gpio_irq_controller {
178
178
void __iomem * base ;
179
179
u32 channel_irqs [MAX_NUM_CHANNEL ];
180
180
DECLARE_BITMAP (channel_map , MAX_NUM_CHANNEL );
181
- spinlock_t lock ;
181
+ raw_spinlock_t lock ;
182
182
};
183
183
184
184
static void meson_gpio_irq_update_bits (struct meson_gpio_irq_controller * ctl ,
@@ -187,14 +187,14 @@ static void meson_gpio_irq_update_bits(struct meson_gpio_irq_controller *ctl,
187
187
unsigned long flags ;
188
188
u32 tmp ;
189
189
190
- spin_lock_irqsave (& ctl -> lock , flags );
190
+ raw_spin_lock_irqsave (& ctl -> lock , flags );
191
191
192
192
tmp = readl_relaxed (ctl -> base + reg );
193
193
tmp &= ~mask ;
194
194
tmp |= val ;
195
195
writel_relaxed (tmp , ctl -> base + reg );
196
196
197
- spin_unlock_irqrestore (& ctl -> lock , flags );
197
+ raw_spin_unlock_irqrestore (& ctl -> lock , flags );
198
198
}
199
199
200
200
static void meson_gpio_irq_init_dummy (struct meson_gpio_irq_controller * ctl )
@@ -244,20 +244,20 @@ meson_gpio_irq_request_channel(struct meson_gpio_irq_controller *ctl,
244
244
unsigned long flags ;
245
245
unsigned int idx ;
246
246
247
- spin_lock_irqsave (& ctl -> lock , flags );
247
+ raw_spin_lock_irqsave (& ctl -> lock , flags );
248
248
249
249
/* Find a free channel */
250
250
idx = find_first_zero_bit (ctl -> channel_map , ctl -> params -> nr_channels );
251
251
if (idx >= ctl -> params -> nr_channels ) {
252
- spin_unlock_irqrestore (& ctl -> lock , flags );
252
+ raw_spin_unlock_irqrestore (& ctl -> lock , flags );
253
253
pr_err ("No channel available\n" );
254
254
return - ENOSPC ;
255
255
}
256
256
257
257
/* Mark the channel as used */
258
258
set_bit (idx , ctl -> channel_map );
259
259
260
- spin_unlock_irqrestore (& ctl -> lock , flags );
260
+ raw_spin_unlock_irqrestore (& ctl -> lock , flags );
261
261
262
262
/*
263
263
* Setup the mux of the channel to route the signal of the pad
@@ -567,7 +567,7 @@ static int meson_gpio_irq_of_init(struct device_node *node, struct device_node *
567
567
if (!ctl )
568
568
return - ENOMEM ;
569
569
570
- spin_lock_init (& ctl -> lock );
570
+ raw_spin_lock_init (& ctl -> lock );
571
571
572
572
ctl -> base = of_iomap (node , 0 );
573
573
if (!ctl -> base ) {
0 commit comments