aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa/irq.c
diff options
context:
space:
mode:
authorLennert Buytenhek <buytenh@wantstofly.org>2010-11-29 05:18:26 -0500
committerLennert Buytenhek <buytenh@wantstofly.org>2011-01-13 11:18:56 -0500
commita3f4c927d379cfaa597bc8ff75dc9d28f8d9200e (patch)
tree39521557543e91134b5a7e190bdf7b7ac2787e04 /arch/arm/mach-pxa/irq.c
parent406b005045ad18ffa08c439545801e1c8cec4b5e (diff)
ARM: PXA SoCs: irq_data conversion.
Signed-off-by: Lennert Buytenhek <buytenh@secretlab.ca>
Diffstat (limited to 'arch/arm/mach-pxa/irq.c')
-rw-r--r--arch/arm/mach-pxa/irq.c50
1 files changed, 25 insertions, 25 deletions
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index 54e91c9e71c8..3f7f5bf05f3a 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -53,37 +53,37 @@ static inline int cpu_has_ipr(void)
53 return !cpu_is_pxa25x(); 53 return !cpu_is_pxa25x();
54} 54}
55 55
56static void pxa_mask_irq(unsigned int irq) 56static void pxa_mask_irq(struct irq_data *d)
57{ 57{
58 void __iomem *base = get_irq_chip_data(irq); 58 void __iomem *base = irq_data_get_irq_chip_data(d);
59 uint32_t icmr = __raw_readl(base + ICMR); 59 uint32_t icmr = __raw_readl(base + ICMR);
60 60
61 icmr &= ~(1 << IRQ_BIT(irq)); 61 icmr &= ~(1 << IRQ_BIT(d->irq));
62 __raw_writel(icmr, base + ICMR); 62 __raw_writel(icmr, base + ICMR);
63} 63}
64 64
65static void pxa_unmask_irq(unsigned int irq) 65static void pxa_unmask_irq(struct irq_data *d)
66{ 66{
67 void __iomem *base = get_irq_chip_data(irq); 67 void __iomem *base = irq_data_get_irq_chip_data(d);
68 uint32_t icmr = __raw_readl(base + ICMR); 68 uint32_t icmr = __raw_readl(base + ICMR);
69 69
70 icmr |= 1 << IRQ_BIT(irq); 70 icmr |= 1 << IRQ_BIT(d->irq);
71 __raw_writel(icmr, base + ICMR); 71 __raw_writel(icmr, base + ICMR);
72} 72}
73 73
74static struct irq_chip pxa_internal_irq_chip = { 74static struct irq_chip pxa_internal_irq_chip = {
75 .name = "SC", 75 .name = "SC",
76 .ack = pxa_mask_irq, 76 .irq_ack = pxa_mask_irq,
77 .mask = pxa_mask_irq, 77 .irq_mask = pxa_mask_irq,
78 .unmask = pxa_unmask_irq, 78 .irq_unmask = pxa_unmask_irq,
79}; 79};
80 80
81/* 81/*
82 * GPIO IRQs for GPIO 0 and 1 82 * GPIO IRQs for GPIO 0 and 1
83 */ 83 */
84static int pxa_set_low_gpio_type(unsigned int irq, unsigned int type) 84static int pxa_set_low_gpio_type(struct irq_data *d, unsigned int type)
85{ 85{
86 int gpio = irq - IRQ_GPIO0; 86 int gpio = d->irq - IRQ_GPIO0;
87 87
88 if (__gpio_is_occupied(gpio)) { 88 if (__gpio_is_occupied(gpio)) {
89 pr_err("%s failed: GPIO is configured\n", __func__); 89 pr_err("%s failed: GPIO is configured\n", __func__);
@@ -103,31 +103,31 @@ static int pxa_set_low_gpio_type(unsigned int irq, unsigned int type)
103 return 0; 103 return 0;
104} 104}
105 105
106static void pxa_ack_low_gpio(unsigned int irq) 106static void pxa_ack_low_gpio(struct irq_data *d)
107{ 107{
108 GEDR0 = (1 << (irq - IRQ_GPIO0)); 108 GEDR0 = (1 << (d->irq - IRQ_GPIO0));
109} 109}
110 110
111static void pxa_mask_low_gpio(unsigned int irq) 111static void pxa_mask_low_gpio(struct irq_data *d)
112{ 112{
113 struct irq_desc *desc = irq_to_desc(irq); 113 struct irq_desc *desc = irq_to_desc(d->irq);
114 114
115 desc->chip->mask(irq); 115 desc->irq_data.chip->irq_mask(d);
116} 116}
117 117
118static void pxa_unmask_low_gpio(unsigned int irq) 118static void pxa_unmask_low_gpio(struct irq_data *d)
119{ 119{
120 struct irq_desc *desc = irq_to_desc(irq); 120 struct irq_desc *desc = irq_to_desc(d->irq);
121 121
122 desc->chip->unmask(irq); 122 desc->irq_data.chip->irq_unmask(d);
123} 123}
124 124
125static struct irq_chip pxa_low_gpio_chip = { 125static struct irq_chip pxa_low_gpio_chip = {
126 .name = "GPIO-l", 126 .name = "GPIO-l",
127 .ack = pxa_ack_low_gpio, 127 .irq_ack = pxa_ack_low_gpio,
128 .mask = pxa_mask_low_gpio, 128 .irq_mask = pxa_mask_low_gpio,
129 .unmask = pxa_unmask_low_gpio, 129 .irq_unmask = pxa_unmask_low_gpio,
130 .set_type = pxa_set_low_gpio_type, 130 .irq_set_type = pxa_set_low_gpio_type,
131}; 131};
132 132
133static void __init pxa_init_low_gpio_irq(set_wake_t fn) 133static void __init pxa_init_low_gpio_irq(set_wake_t fn)
@@ -145,7 +145,7 @@ static void __init pxa_init_low_gpio_irq(set_wake_t fn)
145 set_irq_flags(irq, IRQF_VALID); 145 set_irq_flags(irq, IRQF_VALID);
146 } 146 }
147 147
148 pxa_low_gpio_chip.set_wake = fn; 148 pxa_low_gpio_chip.irq_set_wake = fn;
149} 149}
150 150
151static inline void __iomem *irq_base(int i) 151static inline void __iomem *irq_base(int i)
@@ -188,7 +188,7 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)
188 /* only unmasked interrupts kick us out of idle */ 188 /* only unmasked interrupts kick us out of idle */
189 __raw_writel(1, irq_base(0) + ICCR); 189 __raw_writel(1, irq_base(0) + ICCR);
190 190
191 pxa_internal_irq_chip.set_wake = fn; 191 pxa_internal_irq_chip.irq_set_wake = fn;
192 pxa_init_low_gpio_irq(fn); 192 pxa_init_low_gpio_irq(fn);
193} 193}
194 194