@@ -102,7 +102,7 @@ struct armada_37xx_pinctrl {
102
102
struct device * dev ;
103
103
struct gpio_chip gpio_chip ;
104
104
struct irq_chip irq_chip ;
105
- spinlock_t irq_lock ;
105
+ raw_spinlock_t irq_lock ;
106
106
struct pinctrl_desc pctl ;
107
107
struct pinctrl_dev * pctl_dev ;
108
108
struct armada_37xx_pin_group * groups ;
@@ -523,9 +523,9 @@ static void armada_37xx_irq_ack(struct irq_data *d)
523
523
unsigned long flags ;
524
524
525
525
armada_37xx_irq_update_reg (& reg , d );
526
- spin_lock_irqsave (& info -> irq_lock , flags );
526
+ raw_spin_lock_irqsave (& info -> irq_lock , flags );
527
527
writel (d -> mask , info -> base + reg );
528
- spin_unlock_irqrestore (& info -> irq_lock , flags );
528
+ raw_spin_unlock_irqrestore (& info -> irq_lock , flags );
529
529
}
530
530
531
531
static void armada_37xx_irq_mask (struct irq_data * d )
@@ -536,10 +536,10 @@ static void armada_37xx_irq_mask(struct irq_data *d)
536
536
unsigned long flags ;
537
537
538
538
armada_37xx_irq_update_reg (& reg , d );
539
- spin_lock_irqsave (& info -> irq_lock , flags );
539
+ raw_spin_lock_irqsave (& info -> irq_lock , flags );
540
540
val = readl (info -> base + reg );
541
541
writel (val & ~d -> mask , info -> base + reg );
542
- spin_unlock_irqrestore (& info -> irq_lock , flags );
542
+ raw_spin_unlock_irqrestore (& info -> irq_lock , flags );
543
543
}
544
544
545
545
static void armada_37xx_irq_unmask (struct irq_data * d )
@@ -550,10 +550,10 @@ static void armada_37xx_irq_unmask(struct irq_data *d)
550
550
unsigned long flags ;
551
551
552
552
armada_37xx_irq_update_reg (& reg , d );
553
- spin_lock_irqsave (& info -> irq_lock , flags );
553
+ raw_spin_lock_irqsave (& info -> irq_lock , flags );
554
554
val = readl (info -> base + reg );
555
555
writel (val | d -> mask , info -> base + reg );
556
- spin_unlock_irqrestore (& info -> irq_lock , flags );
556
+ raw_spin_unlock_irqrestore (& info -> irq_lock , flags );
557
557
}
558
558
559
559
static int armada_37xx_irq_set_wake (struct irq_data * d , unsigned int on )
@@ -564,14 +564,14 @@ static int armada_37xx_irq_set_wake(struct irq_data *d, unsigned int on)
564
564
unsigned long flags ;
565
565
566
566
armada_37xx_irq_update_reg (& reg , d );
567
- spin_lock_irqsave (& info -> irq_lock , flags );
567
+ raw_spin_lock_irqsave (& info -> irq_lock , flags );
568
568
val = readl (info -> base + reg );
569
569
if (on )
570
570
val |= (BIT (d -> hwirq % GPIO_PER_REG ));
571
571
else
572
572
val &= ~(BIT (d -> hwirq % GPIO_PER_REG ));
573
573
writel (val , info -> base + reg );
574
- spin_unlock_irqrestore (& info -> irq_lock , flags );
574
+ raw_spin_unlock_irqrestore (& info -> irq_lock , flags );
575
575
576
576
return 0 ;
577
577
}
@@ -583,7 +583,7 @@ static int armada_37xx_irq_set_type(struct irq_data *d, unsigned int type)
583
583
u32 val , reg = IRQ_POL ;
584
584
unsigned long flags ;
585
585
586
- spin_lock_irqsave (& info -> irq_lock , flags );
586
+ raw_spin_lock_irqsave (& info -> irq_lock , flags );
587
587
armada_37xx_irq_update_reg (& reg , d );
588
588
val = readl (info -> base + reg );
589
589
switch (type ) {
@@ -607,11 +607,11 @@ static int armada_37xx_irq_set_type(struct irq_data *d, unsigned int type)
607
607
break ;
608
608
}
609
609
default :
610
- spin_unlock_irqrestore (& info -> irq_lock , flags );
610
+ raw_spin_unlock_irqrestore (& info -> irq_lock , flags );
611
611
return - EINVAL ;
612
612
}
613
613
writel (val , info -> base + reg );
614
- spin_unlock_irqrestore (& info -> irq_lock , flags );
614
+ raw_spin_unlock_irqrestore (& info -> irq_lock , flags );
615
615
616
616
return 0 ;
617
617
}
@@ -626,7 +626,7 @@ static int armada_37xx_edge_both_irq_swap_pol(struct armada_37xx_pinctrl *info,
626
626
627
627
regmap_read (info -> regmap , INPUT_VAL + 4 * reg_idx , & l );
628
628
629
- spin_lock_irqsave (& info -> irq_lock , flags );
629
+ raw_spin_lock_irqsave (& info -> irq_lock , flags );
630
630
p = readl (info -> base + IRQ_POL + 4 * reg_idx );
631
631
if ((p ^ l ) & (1 << bit_num )) {
632
632
/*
@@ -647,7 +647,7 @@ static int armada_37xx_edge_both_irq_swap_pol(struct armada_37xx_pinctrl *info,
647
647
ret = -1 ;
648
648
}
649
649
650
- spin_unlock_irqrestore (& info -> irq_lock , flags );
650
+ raw_spin_unlock_irqrestore (& info -> irq_lock , flags );
651
651
return ret ;
652
652
}
653
653
@@ -664,11 +664,11 @@ static void armada_37xx_irq_handler(struct irq_desc *desc)
664
664
u32 status ;
665
665
unsigned long flags ;
666
666
667
- spin_lock_irqsave (& info -> irq_lock , flags );
667
+ raw_spin_lock_irqsave (& info -> irq_lock , flags );
668
668
status = readl_relaxed (info -> base + IRQ_STATUS + 4 * i );
669
669
/* Manage only the interrupt that was enabled */
670
670
status &= readl_relaxed (info -> base + IRQ_EN + 4 * i );
671
- spin_unlock_irqrestore (& info -> irq_lock , flags );
671
+ raw_spin_unlock_irqrestore (& info -> irq_lock , flags );
672
672
while (status ) {
673
673
u32 hwirq = ffs (status ) - 1 ;
674
674
u32 virq = irq_find_mapping (d , hwirq +
@@ -695,12 +695,12 @@ static void armada_37xx_irq_handler(struct irq_desc *desc)
695
695
696
696
update_status :
697
697
/* Update status in case a new IRQ appears */
698
- spin_lock_irqsave (& info -> irq_lock , flags );
698
+ raw_spin_lock_irqsave (& info -> irq_lock , flags );
699
699
status = readl_relaxed (info -> base +
700
700
IRQ_STATUS + 4 * i );
701
701
/* Manage only the interrupt that was enabled */
702
702
status &= readl_relaxed (info -> base + IRQ_EN + 4 * i );
703
- spin_unlock_irqrestore (& info -> irq_lock , flags );
703
+ raw_spin_unlock_irqrestore (& info -> irq_lock , flags );
704
704
}
705
705
}
706
706
chained_irq_exit (chip , desc );
@@ -731,7 +731,7 @@ static int armada_37xx_irqchip_register(struct platform_device *pdev,
731
731
struct device * dev = & pdev -> dev ;
732
732
unsigned int i , nr_irq_parent ;
733
733
734
- spin_lock_init (& info -> irq_lock );
734
+ raw_spin_lock_init (& info -> irq_lock );
735
735
736
736
nr_irq_parent = of_irq_count (np );
737
737
if (!nr_irq_parent ) {
0 commit comments