aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-pxa
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/mach-pxa')
-rw-r--r--arch/arm/mach-pxa/balloon3.c23
-rw-r--r--arch/arm/mach-pxa/clock-pxa3xx.c1
-rw-r--r--arch/arm/mach-pxa/cm-x2xx-pci.c2
-rw-r--r--arch/arm/mach-pxa/generic.h4
-rw-r--r--arch/arm/mach-pxa/irq.c83
-rw-r--r--arch/arm/mach-pxa/lpd270.c17
-rw-r--r--arch/arm/mach-pxa/lubbock.c17
-rw-r--r--arch/arm/mach-pxa/mainstone.c17
-rw-r--r--arch/arm/mach-pxa/pcm990-baseboard.c15
-rw-r--r--arch/arm/mach-pxa/pxa25x.c7
-rw-r--r--arch/arm/mach-pxa/pxa27x.c9
-rw-r--r--arch/arm/mach-pxa/pxa3xx.c36
-rw-r--r--arch/arm/mach-pxa/spitz.c1
-rw-r--r--arch/arm/mach-pxa/viper.c22
-rw-r--r--arch/arm/mach-pxa/zeus.c26
15 files changed, 140 insertions, 140 deletions
diff --git a/arch/arm/mach-pxa/balloon3.c b/arch/arm/mach-pxa/balloon3.c
index ccb2d0cebcc3..a134a1413e01 100644
--- a/arch/arm/mach-pxa/balloon3.c
+++ b/arch/arm/mach-pxa/balloon3.c
@@ -477,25 +477,25 @@ static inline void balloon3_leds_init(void) {}
477/****************************************************************************** 477/******************************************************************************
478 * FPGA IRQ 478 * FPGA IRQ
479 ******************************************************************************/ 479 ******************************************************************************/
480static void balloon3_mask_irq(unsigned int irq) 480static void balloon3_mask_irq(struct irq_data *d)
481{ 481{
482 int balloon3_irq = (irq - BALLOON3_IRQ(0)); 482 int balloon3_irq = (d->irq - BALLOON3_IRQ(0));
483 balloon3_irq_enabled &= ~(1 << balloon3_irq); 483 balloon3_irq_enabled &= ~(1 << balloon3_irq);
484 __raw_writel(~balloon3_irq_enabled, BALLOON3_INT_CONTROL_REG); 484 __raw_writel(~balloon3_irq_enabled, BALLOON3_INT_CONTROL_REG);
485} 485}
486 486
487static void balloon3_unmask_irq(unsigned int irq) 487static void balloon3_unmask_irq(struct irq_data *d)
488{ 488{
489 int balloon3_irq = (irq - BALLOON3_IRQ(0)); 489 int balloon3_irq = (d->irq - BALLOON3_IRQ(0));
490 balloon3_irq_enabled |= (1 << balloon3_irq); 490 balloon3_irq_enabled |= (1 << balloon3_irq);
491 __raw_writel(~balloon3_irq_enabled, BALLOON3_INT_CONTROL_REG); 491 __raw_writel(~balloon3_irq_enabled, BALLOON3_INT_CONTROL_REG);
492} 492}
493 493
494static struct irq_chip balloon3_irq_chip = { 494static struct irq_chip balloon3_irq_chip = {
495 .name = "FPGA", 495 .name = "FPGA",
496 .ack = balloon3_mask_irq, 496 .irq_ack = balloon3_mask_irq,
497 .mask = balloon3_mask_irq, 497 .irq_mask = balloon3_mask_irq,
498 .unmask = balloon3_unmask_irq, 498 .irq_unmask = balloon3_unmask_irq,
499}; 499};
500 500
501static void balloon3_irq_handler(unsigned int irq, struct irq_desc *desc) 501static void balloon3_irq_handler(unsigned int irq, struct irq_desc *desc)
@@ -504,8 +504,13 @@ static void balloon3_irq_handler(unsigned int irq, struct irq_desc *desc)
504 balloon3_irq_enabled; 504 balloon3_irq_enabled;
505 do { 505 do {
506 /* clear useless edge notification */ 506 /* clear useless edge notification */
507 if (desc->chip->ack) 507 if (desc->irq_data.chip->irq_ack) {
508 desc->chip->ack(BALLOON3_AUX_NIRQ); 508 struct irq_data *d;
509
510 d = irq_get_irq_data(BALLOON3_AUX_NIRQ);
511 desc->irq_data.chip->irq_ack(d);
512 }
513
509 while (pending) { 514 while (pending) {
510 irq = BALLOON3_IRQ(0) + __ffs(pending); 515 irq = BALLOON3_IRQ(0) + __ffs(pending);
511 generic_handle_irq(irq); 516 generic_handle_irq(irq);
diff --git a/arch/arm/mach-pxa/clock-pxa3xx.c b/arch/arm/mach-pxa/clock-pxa3xx.c
index 1b08a34ab234..3f864cd0bd28 100644
--- a/arch/arm/mach-pxa/clock-pxa3xx.c
+++ b/arch/arm/mach-pxa/clock-pxa3xx.c
@@ -115,7 +115,6 @@ static unsigned long clk_pxa3xx_smemc_getrate(struct clk *clk)
115{ 115{
116 unsigned long acsr = ACSR; 116 unsigned long acsr = ACSR;
117 unsigned long memclkcfg = __raw_readl(MEMCLKCFG); 117 unsigned long memclkcfg = __raw_readl(MEMCLKCFG);
118 unsigned int smcfs = (acsr >> 23) & 0x7;
119 118
120 return BASE_CLK * smcfs_mult[(acsr >> 23) & 0x7] / 119 return BASE_CLK * smcfs_mult[(acsr >> 23) & 0x7] /
121 df_clkdiv[(memclkcfg >> 16) & 0x3]; 120 df_clkdiv[(memclkcfg >> 16) & 0x3];
diff --git a/arch/arm/mach-pxa/cm-x2xx-pci.c b/arch/arm/mach-pxa/cm-x2xx-pci.c
index 0f3130599770..a2380cd76f80 100644
--- a/arch/arm/mach-pxa/cm-x2xx-pci.c
+++ b/arch/arm/mach-pxa/cm-x2xx-pci.c
@@ -59,7 +59,7 @@ void __init cmx2xx_pci_adjust_zones(unsigned long *zone_size,
59static void cmx2xx_it8152_irq_demux(unsigned int irq, struct irq_desc *desc) 59static void cmx2xx_it8152_irq_demux(unsigned int irq, struct irq_desc *desc)
60{ 60{
61 /* clear our parent irq */ 61 /* clear our parent irq */
62 desc->chip->ack(irq); 62 desc->irq_data.chip->irq_ack(&desc->irq_data);
63 63
64 it8152_irq_demux(irq, desc); 64 it8152_irq_demux(irq, desc);
65} 65}
diff --git a/arch/arm/mach-pxa/generic.h b/arch/arm/mach-pxa/generic.h
index 6205dc9a2b9d..a079d8baa45a 100644
--- a/arch/arm/mach-pxa/generic.h
+++ b/arch/arm/mach-pxa/generic.h
@@ -9,11 +9,13 @@
9 * published by the Free Software Foundation. 9 * published by the Free Software Foundation.
10 */ 10 */
11 11
12struct irq_data;
12struct sys_timer; 13struct sys_timer;
13 14
14extern struct sys_timer pxa_timer; 15extern struct sys_timer pxa_timer;
15extern void __init pxa_init_irq(int irq_nr, 16extern void __init pxa_init_irq(int irq_nr,
16 int (*set_wake)(unsigned int, unsigned int)); 17 int (*set_wake)(struct irq_data *,
18 unsigned int));
17extern void __init pxa25x_init_irq(void); 19extern void __init pxa25x_init_irq(void);
18#ifdef CONFIG_CPU_PXA26x 20#ifdef CONFIG_CPU_PXA26x
19extern void __init pxa26x_init_irq(void); 21extern void __init pxa26x_init_irq(void);
diff --git a/arch/arm/mach-pxa/irq.c b/arch/arm/mach-pxa/irq.c
index 54e91c9e71c8..2693e3c3776f 100644
--- a/arch/arm/mach-pxa/irq.c
+++ b/arch/arm/mach-pxa/irq.c
@@ -53,37 +53,48 @@ 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 inline void __iomem *irq_base(int i)
57{
58 static unsigned long phys_base[] = {
59 0x40d00000,
60 0x40d0009c,
61 0x40d00130,
62 };
63
64 return (void __iomem *)io_p2v(phys_base[i]);
65}
66
67static void pxa_mask_irq(struct irq_data *d)
57{ 68{
58 void __iomem *base = get_irq_chip_data(irq); 69 void __iomem *base = irq_data_get_irq_chip_data(d);
59 uint32_t icmr = __raw_readl(base + ICMR); 70 uint32_t icmr = __raw_readl(base + ICMR);
60 71
61 icmr &= ~(1 << IRQ_BIT(irq)); 72 icmr &= ~(1 << IRQ_BIT(d->irq));
62 __raw_writel(icmr, base + ICMR); 73 __raw_writel(icmr, base + ICMR);
63} 74}
64 75
65static void pxa_unmask_irq(unsigned int irq) 76static void pxa_unmask_irq(struct irq_data *d)
66{ 77{
67 void __iomem *base = get_irq_chip_data(irq); 78 void __iomem *base = irq_data_get_irq_chip_data(d);
68 uint32_t icmr = __raw_readl(base + ICMR); 79 uint32_t icmr = __raw_readl(base + ICMR);
69 80
70 icmr |= 1 << IRQ_BIT(irq); 81 icmr |= 1 << IRQ_BIT(d->irq);
71 __raw_writel(icmr, base + ICMR); 82 __raw_writel(icmr, base + ICMR);
72} 83}
73 84
74static struct irq_chip pxa_internal_irq_chip = { 85static struct irq_chip pxa_internal_irq_chip = {
75 .name = "SC", 86 .name = "SC",
76 .ack = pxa_mask_irq, 87 .irq_ack = pxa_mask_irq,
77 .mask = pxa_mask_irq, 88 .irq_mask = pxa_mask_irq,
78 .unmask = pxa_unmask_irq, 89 .irq_unmask = pxa_unmask_irq,
79}; 90};
80 91
81/* 92/*
82 * GPIO IRQs for GPIO 0 and 1 93 * GPIO IRQs for GPIO 0 and 1
83 */ 94 */
84static int pxa_set_low_gpio_type(unsigned int irq, unsigned int type) 95static int pxa_set_low_gpio_type(struct irq_data *d, unsigned int type)
85{ 96{
86 int gpio = irq - IRQ_GPIO0; 97 int gpio = d->irq - IRQ_GPIO0;
87 98
88 if (__gpio_is_occupied(gpio)) { 99 if (__gpio_is_occupied(gpio)) {
89 pr_err("%s failed: GPIO is configured\n", __func__); 100 pr_err("%s failed: GPIO is configured\n", __func__);
@@ -103,31 +114,17 @@ static int pxa_set_low_gpio_type(unsigned int irq, unsigned int type)
103 return 0; 114 return 0;
104} 115}
105 116
106static void pxa_ack_low_gpio(unsigned int irq) 117static void pxa_ack_low_gpio(struct irq_data *d)
107{
108 GEDR0 = (1 << (irq - IRQ_GPIO0));
109}
110
111static void pxa_mask_low_gpio(unsigned int irq)
112{
113 struct irq_desc *desc = irq_to_desc(irq);
114
115 desc->chip->mask(irq);
116}
117
118static void pxa_unmask_low_gpio(unsigned int irq)
119{ 118{
120 struct irq_desc *desc = irq_to_desc(irq); 119 GEDR0 = (1 << (d->irq - IRQ_GPIO0));
121
122 desc->chip->unmask(irq);
123} 120}
124 121
125static struct irq_chip pxa_low_gpio_chip = { 122static struct irq_chip pxa_low_gpio_chip = {
126 .name = "GPIO-l", 123 .name = "GPIO-l",
127 .ack = pxa_ack_low_gpio, 124 .irq_ack = pxa_ack_low_gpio,
128 .mask = pxa_mask_low_gpio, 125 .irq_mask = pxa_mask_irq,
129 .unmask = pxa_unmask_low_gpio, 126 .irq_unmask = pxa_unmask_irq,
130 .set_type = pxa_set_low_gpio_type, 127 .irq_set_type = pxa_set_low_gpio_type,
131}; 128};
132 129
133static void __init pxa_init_low_gpio_irq(set_wake_t fn) 130static void __init pxa_init_low_gpio_irq(set_wake_t fn)
@@ -141,22 +138,12 @@ static void __init pxa_init_low_gpio_irq(set_wake_t fn)
141 138
142 for (irq = IRQ_GPIO0; irq <= IRQ_GPIO1; irq++) { 139 for (irq = IRQ_GPIO0; irq <= IRQ_GPIO1; irq++) {
143 set_irq_chip(irq, &pxa_low_gpio_chip); 140 set_irq_chip(irq, &pxa_low_gpio_chip);
141 set_irq_chip_data(irq, irq_base(0));
144 set_irq_handler(irq, handle_edge_irq); 142 set_irq_handler(irq, handle_edge_irq);
145 set_irq_flags(irq, IRQF_VALID); 143 set_irq_flags(irq, IRQF_VALID);
146 } 144 }
147 145
148 pxa_low_gpio_chip.set_wake = fn; 146 pxa_low_gpio_chip.irq_set_wake = fn;
149}
150
151static inline void __iomem *irq_base(int i)
152{
153 static unsigned long phys_base[] = {
154 0x40d00000,
155 0x40d0009c,
156 0x40d00130,
157 };
158
159 return (void __iomem *)io_p2v(phys_base[i >> 5]);
160} 147}
161 148
162void __init pxa_init_irq(int irq_nr, set_wake_t fn) 149void __init pxa_init_irq(int irq_nr, set_wake_t fn)
@@ -168,7 +155,7 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)
168 pxa_internal_irq_nr = irq_nr; 155 pxa_internal_irq_nr = irq_nr;
169 156
170 for (n = 0; n < irq_nr; n += 32) { 157 for (n = 0; n < irq_nr; n += 32) {
171 void __iomem *base = irq_base(n); 158 void __iomem *base = irq_base(n >> 5);
172 159
173 __raw_writel(0, base + ICMR); /* disable all IRQs */ 160 __raw_writel(0, base + ICMR); /* disable all IRQs */
174 __raw_writel(0, base + ICLR); /* all IRQs are IRQ, not FIQ */ 161 __raw_writel(0, base + ICLR); /* all IRQs are IRQ, not FIQ */
@@ -188,7 +175,7 @@ void __init pxa_init_irq(int irq_nr, set_wake_t fn)
188 /* only unmasked interrupts kick us out of idle */ 175 /* only unmasked interrupts kick us out of idle */
189 __raw_writel(1, irq_base(0) + ICCR); 176 __raw_writel(1, irq_base(0) + ICCR);
190 177
191 pxa_internal_irq_chip.set_wake = fn; 178 pxa_internal_irq_chip.irq_set_wake = fn;
192 pxa_init_low_gpio_irq(fn); 179 pxa_init_low_gpio_irq(fn);
193} 180}
194 181
@@ -200,7 +187,7 @@ static int pxa_irq_suspend(struct sys_device *dev, pm_message_t state)
200{ 187{
201 int i; 188 int i;
202 189
203 for (i = 0; i < pxa_internal_irq_nr; i += 32) { 190 for (i = 0; i < pxa_internal_irq_nr / 32; i++) {
204 void __iomem *base = irq_base(i); 191 void __iomem *base = irq_base(i);
205 192
206 saved_icmr[i] = __raw_readl(base + ICMR); 193 saved_icmr[i] = __raw_readl(base + ICMR);
@@ -219,14 +206,14 @@ static int pxa_irq_resume(struct sys_device *dev)
219{ 206{
220 int i; 207 int i;
221 208
222 for (i = 0; i < pxa_internal_irq_nr; i += 32) { 209 for (i = 0; i < pxa_internal_irq_nr / 32; i++) {
223 void __iomem *base = irq_base(i); 210 void __iomem *base = irq_base(i);
224 211
225 __raw_writel(saved_icmr[i], base + ICMR); 212 __raw_writel(saved_icmr[i], base + ICMR);
226 __raw_writel(0, base + ICLR); 213 __raw_writel(0, base + ICLR);
227 } 214 }
228 215
229 if (!cpu_is_pxa25x()) 216 if (cpu_has_ipr())
230 for (i = 0; i < pxa_internal_irq_nr; i++) 217 for (i = 0; i < pxa_internal_irq_nr; i++)
231 __raw_writel(saved_ipr[i], IRQ_BASE + IPR(i)); 218 __raw_writel(saved_ipr[i], IRQ_BASE + IPR(i));
232 219
diff --git a/arch/arm/mach-pxa/lpd270.c b/arch/arm/mach-pxa/lpd270.c
index 8ab62a677807..c9a3e775c2de 100644
--- a/arch/arm/mach-pxa/lpd270.c
+++ b/arch/arm/mach-pxa/lpd270.c
@@ -95,9 +95,9 @@ static unsigned long lpd270_pin_config[] __initdata = {
95 95
96static unsigned int lpd270_irq_enabled; 96static unsigned int lpd270_irq_enabled;
97 97
98static void lpd270_mask_irq(unsigned int irq) 98static void lpd270_mask_irq(struct irq_data *d)
99{ 99{
100 int lpd270_irq = irq - LPD270_IRQ(0); 100 int lpd270_irq = d->irq - LPD270_IRQ(0);
101 101
102 __raw_writew(~(1 << lpd270_irq), LPD270_INT_STATUS); 102 __raw_writew(~(1 << lpd270_irq), LPD270_INT_STATUS);
103 103
@@ -105,9 +105,9 @@ static void lpd270_mask_irq(unsigned int irq)
105 __raw_writew(lpd270_irq_enabled, LPD270_INT_MASK); 105 __raw_writew(lpd270_irq_enabled, LPD270_INT_MASK);
106} 106}
107 107
108static void lpd270_unmask_irq(unsigned int irq) 108static void lpd270_unmask_irq(struct irq_data *d)
109{ 109{
110 int lpd270_irq = irq - LPD270_IRQ(0); 110 int lpd270_irq = d->irq - LPD270_IRQ(0);
111 111
112 lpd270_irq_enabled |= 1 << lpd270_irq; 112 lpd270_irq_enabled |= 1 << lpd270_irq;
113 __raw_writew(lpd270_irq_enabled, LPD270_INT_MASK); 113 __raw_writew(lpd270_irq_enabled, LPD270_INT_MASK);
@@ -115,9 +115,9 @@ static void lpd270_unmask_irq(unsigned int irq)
115 115
116static struct irq_chip lpd270_irq_chip = { 116static struct irq_chip lpd270_irq_chip = {
117 .name = "CPLD", 117 .name = "CPLD",
118 .ack = lpd270_mask_irq, 118 .irq_ack = lpd270_mask_irq,
119 .mask = lpd270_mask_irq, 119 .irq_mask = lpd270_mask_irq,
120 .unmask = lpd270_unmask_irq, 120 .irq_unmask = lpd270_unmask_irq,
121}; 121};
122 122
123static void lpd270_irq_handler(unsigned int irq, struct irq_desc *desc) 123static void lpd270_irq_handler(unsigned int irq, struct irq_desc *desc)
@@ -126,7 +126,8 @@ static void lpd270_irq_handler(unsigned int irq, struct irq_desc *desc)
126 126
127 pending = __raw_readw(LPD270_INT_STATUS) & lpd270_irq_enabled; 127 pending = __raw_readw(LPD270_INT_STATUS) & lpd270_irq_enabled;
128 do { 128 do {
129 desc->chip->ack(irq); /* clear useless edge notification */ 129 /* clear useless edge notification */
130 desc->irq_data.chip->irq_ack(&desc->irq_data);
130 if (likely(pending)) { 131 if (likely(pending)) {
131 irq = LPD270_IRQ(0) + __ffs(pending); 132 irq = LPD270_IRQ(0) + __ffs(pending);
132 generic_handle_irq(irq); 133 generic_handle_irq(irq);
diff --git a/arch/arm/mach-pxa/lubbock.c b/arch/arm/mach-pxa/lubbock.c
index 3072dbea5c1f..dca20de306bb 100644
--- a/arch/arm/mach-pxa/lubbock.c
+++ b/arch/arm/mach-pxa/lubbock.c
@@ -122,15 +122,15 @@ EXPORT_SYMBOL(lubbock_set_misc_wr);
122 122
123static unsigned long lubbock_irq_enabled; 123static unsigned long lubbock_irq_enabled;
124 124
125static void lubbock_mask_irq(unsigned int irq) 125static void lubbock_mask_irq(struct irq_data *d)
126{ 126{
127 int lubbock_irq = (irq - LUBBOCK_IRQ(0)); 127 int lubbock_irq = (d->irq - LUBBOCK_IRQ(0));
128 LUB_IRQ_MASK_EN = (lubbock_irq_enabled &= ~(1 << lubbock_irq)); 128 LUB_IRQ_MASK_EN = (lubbock_irq_enabled &= ~(1 << lubbock_irq));
129} 129}
130 130
131static void lubbock_unmask_irq(unsigned int irq) 131static void lubbock_unmask_irq(struct irq_data *d)
132{ 132{
133 int lubbock_irq = (irq - LUBBOCK_IRQ(0)); 133 int lubbock_irq = (d->irq - LUBBOCK_IRQ(0));
134 /* the irq can be acknowledged only if deasserted, so it's done here */ 134 /* the irq can be acknowledged only if deasserted, so it's done here */
135 LUB_IRQ_SET_CLR &= ~(1 << lubbock_irq); 135 LUB_IRQ_SET_CLR &= ~(1 << lubbock_irq);
136 LUB_IRQ_MASK_EN = (lubbock_irq_enabled |= (1 << lubbock_irq)); 136 LUB_IRQ_MASK_EN = (lubbock_irq_enabled |= (1 << lubbock_irq));
@@ -138,16 +138,17 @@ static void lubbock_unmask_irq(unsigned int irq)
138 138
139static struct irq_chip lubbock_irq_chip = { 139static struct irq_chip lubbock_irq_chip = {
140 .name = "FPGA", 140 .name = "FPGA",
141 .ack = lubbock_mask_irq, 141 .irq_ack = lubbock_mask_irq,
142 .mask = lubbock_mask_irq, 142 .irq_mask = lubbock_mask_irq,
143 .unmask = lubbock_unmask_irq, 143 .irq_unmask = lubbock_unmask_irq,
144}; 144};
145 145
146static void lubbock_irq_handler(unsigned int irq, struct irq_desc *desc) 146static void lubbock_irq_handler(unsigned int irq, struct irq_desc *desc)
147{ 147{
148 unsigned long pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled; 148 unsigned long pending = LUB_IRQ_SET_CLR & lubbock_irq_enabled;
149 do { 149 do {
150 desc->chip->ack(irq); /* clear our parent irq */ 150 /* clear our parent irq */
151 desc->irq_data.chip->irq_ack(&desc->irq_data);
151 if (likely(pending)) { 152 if (likely(pending)) {
152 irq = LUBBOCK_IRQ(0) + __ffs(pending); 153 irq = LUBBOCK_IRQ(0) + __ffs(pending);
153 generic_handle_irq(irq); 154 generic_handle_irq(irq);
diff --git a/arch/arm/mach-pxa/mainstone.c b/arch/arm/mach-pxa/mainstone.c
index 740c03590e3b..d4b6f2375f2c 100644
--- a/arch/arm/mach-pxa/mainstone.c
+++ b/arch/arm/mach-pxa/mainstone.c
@@ -123,15 +123,15 @@ static unsigned long mainstone_pin_config[] = {
123 123
124static unsigned long mainstone_irq_enabled; 124static unsigned long mainstone_irq_enabled;
125 125
126static void mainstone_mask_irq(unsigned int irq) 126static void mainstone_mask_irq(struct irq_data *d)
127{ 127{
128 int mainstone_irq = (irq - MAINSTONE_IRQ(0)); 128 int mainstone_irq = (d->irq - MAINSTONE_IRQ(0));
129 MST_INTMSKENA = (mainstone_irq_enabled &= ~(1 << mainstone_irq)); 129 MST_INTMSKENA = (mainstone_irq_enabled &= ~(1 << mainstone_irq));
130} 130}
131 131
132static void mainstone_unmask_irq(unsigned int irq) 132static void mainstone_unmask_irq(struct irq_data *d)
133{ 133{
134 int mainstone_irq = (irq - MAINSTONE_IRQ(0)); 134 int mainstone_irq = (d->irq - MAINSTONE_IRQ(0));
135 /* the irq can be acknowledged only if deasserted, so it's done here */ 135 /* the irq can be acknowledged only if deasserted, so it's done here */
136 MST_INTSETCLR &= ~(1 << mainstone_irq); 136 MST_INTSETCLR &= ~(1 << mainstone_irq);
137 MST_INTMSKENA = (mainstone_irq_enabled |= (1 << mainstone_irq)); 137 MST_INTMSKENA = (mainstone_irq_enabled |= (1 << mainstone_irq));
@@ -139,16 +139,17 @@ static void mainstone_unmask_irq(unsigned int irq)
139 139
140static struct irq_chip mainstone_irq_chip = { 140static struct irq_chip mainstone_irq_chip = {
141 .name = "FPGA", 141 .name = "FPGA",
142 .ack = mainstone_mask_irq, 142 .irq_ack = mainstone_mask_irq,
143 .mask = mainstone_mask_irq, 143 .irq_mask = mainstone_mask_irq,
144 .unmask = mainstone_unmask_irq, 144 .irq_unmask = mainstone_unmask_irq,
145}; 145};
146 146
147static void mainstone_irq_handler(unsigned int irq, struct irq_desc *desc) 147static void mainstone_irq_handler(unsigned int irq, struct irq_desc *desc)
148{ 148{
149 unsigned long pending = MST_INTSETCLR & mainstone_irq_enabled; 149 unsigned long pending = MST_INTSETCLR & mainstone_irq_enabled;
150 do { 150 do {
151 desc->chip->ack(irq); /* clear useless edge notification */ 151 /* clear useless edge notification */
152 desc->irq_data.chip->irq_ack(&desc->irq_data);
152 if (likely(pending)) { 153 if (likely(pending)) {
153 irq = MAINSTONE_IRQ(0) + __ffs(pending); 154 irq = MAINSTONE_IRQ(0) + __ffs(pending);
154 generic_handle_irq(irq); 155 generic_handle_irq(irq);
diff --git a/arch/arm/mach-pxa/pcm990-baseboard.c b/arch/arm/mach-pxa/pcm990-baseboard.c
index f33647a8e0b7..90820faa711a 100644
--- a/arch/arm/mach-pxa/pcm990-baseboard.c
+++ b/arch/arm/mach-pxa/pcm990-baseboard.c
@@ -241,23 +241,23 @@ static struct platform_device pcm990_backlight_device = {
241 241
242static unsigned long pcm990_irq_enabled; 242static unsigned long pcm990_irq_enabled;
243 243
244static void pcm990_mask_ack_irq(unsigned int irq) 244static void pcm990_mask_ack_irq(struct irq_data *d)
245{ 245{
246 int pcm990_irq = (irq - PCM027_IRQ(0)); 246 int pcm990_irq = (d->irq - PCM027_IRQ(0));
247 PCM990_INTMSKENA = (pcm990_irq_enabled &= ~(1 << pcm990_irq)); 247 PCM990_INTMSKENA = (pcm990_irq_enabled &= ~(1 << pcm990_irq));
248} 248}
249 249
250static void pcm990_unmask_irq(unsigned int irq) 250static void pcm990_unmask_irq(struct irq_data *d)
251{ 251{
252 int pcm990_irq = (irq - PCM027_IRQ(0)); 252 int pcm990_irq = (d->irq - PCM027_IRQ(0));
253 /* the irq can be acknowledged only if deasserted, so it's done here */ 253 /* the irq can be acknowledged only if deasserted, so it's done here */
254 PCM990_INTSETCLR |= 1 << pcm990_irq; 254 PCM990_INTSETCLR |= 1 << pcm990_irq;
255 PCM990_INTMSKENA = (pcm990_irq_enabled |= (1 << pcm990_irq)); 255 PCM990_INTMSKENA = (pcm990_irq_enabled |= (1 << pcm990_irq));
256} 256}
257 257
258static struct irq_chip pcm990_irq_chip = { 258static struct irq_chip pcm990_irq_chip = {
259 .mask_ack = pcm990_mask_ack_irq, 259 .irq_mask_ack = pcm990_mask_ack_irq,
260 .unmask = pcm990_unmask_irq, 260 .irq_unmask = pcm990_unmask_irq,
261}; 261};
262 262
263static void pcm990_irq_handler(unsigned int irq, struct irq_desc *desc) 263static void pcm990_irq_handler(unsigned int irq, struct irq_desc *desc)
@@ -265,7 +265,8 @@ static void pcm990_irq_handler(unsigned int irq, struct irq_desc *desc)
265 unsigned long pending = (~PCM990_INTSETCLR) & pcm990_irq_enabled; 265 unsigned long pending = (~PCM990_INTSETCLR) & pcm990_irq_enabled;
266 266
267 do { 267 do {
268 desc->chip->ack(irq); /* clear our parent IRQ */ 268 /* clear our parent IRQ */
269 desc->irq_data.chip->irq_ack(&desc->irq_data);
269 if (likely(pending)) { 270 if (likely(pending)) {
270 irq = PCM027_IRQ(0) + __ffs(pending); 271 irq = PCM027_IRQ(0) + __ffs(pending);
271 generic_handle_irq(irq); 272 generic_handle_irq(irq);
diff --git a/arch/arm/mach-pxa/pxa25x.c b/arch/arm/mach-pxa/pxa25x.c
index 3f5241c84894..fbc5b775f895 100644
--- a/arch/arm/mach-pxa/pxa25x.c
+++ b/arch/arm/mach-pxa/pxa25x.c
@@ -22,6 +22,7 @@
22#include <linux/platform_device.h> 22#include <linux/platform_device.h>
23#include <linux/suspend.h> 23#include <linux/suspend.h>
24#include <linux/sysdev.h> 24#include <linux/sysdev.h>
25#include <linux/irq.h>
25 26
26#include <asm/mach/map.h> 27#include <asm/mach/map.h>
27#include <mach/hardware.h> 28#include <mach/hardware.h>
@@ -282,15 +283,15 @@ static inline void pxa25x_init_pm(void) {}
282/* PXA25x: supports wakeup from GPIO0..GPIO15 and RTC alarm 283/* PXA25x: supports wakeup from GPIO0..GPIO15 and RTC alarm
283 */ 284 */
284 285
285static int pxa25x_set_wake(unsigned int irq, unsigned int on) 286static int pxa25x_set_wake(struct irq_data *d, unsigned int on)
286{ 287{
287 int gpio = IRQ_TO_GPIO(irq); 288 int gpio = IRQ_TO_GPIO(d->irq);
288 uint32_t mask = 0; 289 uint32_t mask = 0;
289 290
290 if (gpio >= 0 && gpio < 85) 291 if (gpio >= 0 && gpio < 85)
291 return gpio_set_wake(gpio, on); 292 return gpio_set_wake(gpio, on);
292 293
293 if (irq == IRQ_RTCAlrm) { 294 if (d->irq == IRQ_RTCAlrm) {
294 mask = PWER_RTC; 295 mask = PWER_RTC;
295 goto set_pwer; 296 goto set_pwer;
296 } 297 }
diff --git a/arch/arm/mach-pxa/pxa27x.c b/arch/arm/mach-pxa/pxa27x.c
index b2130b7a7b52..987301ff4c33 100644
--- a/arch/arm/mach-pxa/pxa27x.c
+++ b/arch/arm/mach-pxa/pxa27x.c
@@ -18,6 +18,7 @@
18#include <linux/platform_device.h> 18#include <linux/platform_device.h>
19#include <linux/sysdev.h> 19#include <linux/sysdev.h>
20#include <linux/io.h> 20#include <linux/io.h>
21#include <linux/irq.h>
21 22
22#include <asm/mach/map.h> 23#include <asm/mach/map.h>
23#include <mach/hardware.h> 24#include <mach/hardware.h>
@@ -343,18 +344,18 @@ static inline void pxa27x_init_pm(void) {}
343/* PXA27x: Various gpios can issue wakeup events. This logic only 344/* PXA27x: Various gpios can issue wakeup events. This logic only
344 * handles the simple cases, not the WEMUX2 and WEMUX3 options 345 * handles the simple cases, not the WEMUX2 and WEMUX3 options
345 */ 346 */
346static int pxa27x_set_wake(unsigned int irq, unsigned int on) 347static int pxa27x_set_wake(struct irq_data *d, unsigned int on)
347{ 348{
348 int gpio = IRQ_TO_GPIO(irq); 349 int gpio = IRQ_TO_GPIO(d->irq);
349 uint32_t mask; 350 uint32_t mask;
350 351
351 if (gpio >= 0 && gpio < 128) 352 if (gpio >= 0 && gpio < 128)
352 return gpio_set_wake(gpio, on); 353 return gpio_set_wake(gpio, on);
353 354
354 if (irq == IRQ_KEYPAD) 355 if (d->irq == IRQ_KEYPAD)
355 return keypad_set_wake(on); 356 return keypad_set_wake(on);
356 357
357 switch (irq) { 358 switch (d->irq) {
358 case IRQ_RTCAlrm: 359 case IRQ_RTCAlrm:
359 mask = PWER_RTC; 360 mask = PWER_RTC;
360 break; 361 break;
diff --git a/arch/arm/mach-pxa/pxa3xx.c b/arch/arm/mach-pxa/pxa3xx.c
index e14818f5d950..a7a19e1cd640 100644
--- a/arch/arm/mach-pxa/pxa3xx.c
+++ b/arch/arm/mach-pxa/pxa3xx.c
@@ -229,11 +229,11 @@ static void __init pxa3xx_init_pm(void)
229 pxa_cpu_pm_fns = &pxa3xx_cpu_pm_fns; 229 pxa_cpu_pm_fns = &pxa3xx_cpu_pm_fns;
230} 230}
231 231
232static int pxa3xx_set_wake(unsigned int irq, unsigned int on) 232static int pxa3xx_set_wake(struct irq_data *d, unsigned int on)
233{ 233{
234 unsigned long flags, mask = 0; 234 unsigned long flags, mask = 0;
235 235
236 switch (irq) { 236 switch (d->irq) {
237 case IRQ_SSP3: 237 case IRQ_SSP3:
238 mask = ADXER_MFP_WSSP3; 238 mask = ADXER_MFP_WSSP3;
239 break; 239 break;
@@ -322,40 +322,40 @@ static inline void pxa3xx_init_pm(void) {}
322#define pxa3xx_set_wake NULL 322#define pxa3xx_set_wake NULL
323#endif 323#endif
324 324
325static void pxa_ack_ext_wakeup(unsigned int irq) 325static void pxa_ack_ext_wakeup(struct irq_data *d)
326{ 326{
327 PECR |= PECR_IS(irq - IRQ_WAKEUP0); 327 PECR |= PECR_IS(d->irq - IRQ_WAKEUP0);
328} 328}
329 329
330static void pxa_mask_ext_wakeup(unsigned int irq) 330static void pxa_mask_ext_wakeup(struct irq_data *d)
331{ 331{
332 ICMR2 &= ~(1 << ((irq - PXA_IRQ(0)) & 0x1f)); 332 ICMR2 &= ~(1 << ((d->irq - PXA_IRQ(0)) & 0x1f));
333 PECR &= ~PECR_IE(irq - IRQ_WAKEUP0); 333 PECR &= ~PECR_IE(d->irq - IRQ_WAKEUP0);
334} 334}
335 335
336static void pxa_unmask_ext_wakeup(unsigned int irq) 336static void pxa_unmask_ext_wakeup(struct irq_data *d)
337{ 337{
338 ICMR2 |= 1 << ((irq - PXA_IRQ(0)) & 0x1f); 338 ICMR2 |= 1 << ((d->irq - PXA_IRQ(0)) & 0x1f);
339 PECR |= PECR_IE(irq - IRQ_WAKEUP0); 339 PECR |= PECR_IE(d->irq - IRQ_WAKEUP0);
340} 340}
341 341
342static int pxa_set_ext_wakeup_type(unsigned int irq, unsigned int flow_type) 342static int pxa_set_ext_wakeup_type(struct irq_data *d, unsigned int flow_type)
343{ 343{
344 if (flow_type & IRQ_TYPE_EDGE_RISING) 344 if (flow_type & IRQ_TYPE_EDGE_RISING)
345 PWER |= 1 << (irq - IRQ_WAKEUP0); 345 PWER |= 1 << (d->irq - IRQ_WAKEUP0);
346 346
347 if (flow_type & IRQ_TYPE_EDGE_FALLING) 347 if (flow_type & IRQ_TYPE_EDGE_FALLING)
348 PWER |= 1 << (irq - IRQ_WAKEUP0 + 2); 348 PWER |= 1 << (d->irq - IRQ_WAKEUP0 + 2);
349 349
350 return 0; 350 return 0;
351} 351}
352 352
353static struct irq_chip pxa_ext_wakeup_chip = { 353static struct irq_chip pxa_ext_wakeup_chip = {
354 .name = "WAKEUP", 354 .name = "WAKEUP",
355 .ack = pxa_ack_ext_wakeup, 355 .irq_ack = pxa_ack_ext_wakeup,
356 .mask = pxa_mask_ext_wakeup, 356 .irq_mask = pxa_mask_ext_wakeup,
357 .unmask = pxa_unmask_ext_wakeup, 357 .irq_unmask = pxa_unmask_ext_wakeup,
358 .set_type = pxa_set_ext_wakeup_type, 358 .irq_set_type = pxa_set_ext_wakeup_type,
359}; 359};
360 360
361static void __init pxa_init_ext_wakeup_irq(set_wake_t fn) 361static void __init pxa_init_ext_wakeup_irq(set_wake_t fn)
@@ -368,7 +368,7 @@ static void __init pxa_init_ext_wakeup_irq(set_wake_t fn)
368 set_irq_flags(irq, IRQF_VALID); 368 set_irq_flags(irq, IRQF_VALID);
369 } 369 }
370 370
371 pxa_ext_wakeup_chip.set_wake = fn; 371 pxa_ext_wakeup_chip.irq_set_wake = fn;
372} 372}
373 373
374void __init pxa3xx_init_irq(void) 374void __init pxa3xx_init_irq(void)
diff --git a/arch/arm/mach-pxa/spitz.c b/arch/arm/mach-pxa/spitz.c
index 0bc938729c4c..b49a2c21124c 100644
--- a/arch/arm/mach-pxa/spitz.c
+++ b/arch/arm/mach-pxa/spitz.c
@@ -25,6 +25,7 @@
25#include <linux/spi/corgi_lcd.h> 25#include <linux/spi/corgi_lcd.h>
26#include <linux/spi/pxa2xx_spi.h> 26#include <linux/spi/pxa2xx_spi.h>
27#include <linux/mtd/sharpsl.h> 27#include <linux/mtd/sharpsl.h>
28#include <linux/mtd/physmap.h>
28#include <linux/input/matrix_keypad.h> 29#include <linux/input/matrix_keypad.h>
29#include <linux/regulator/machine.h> 30#include <linux/regulator/machine.h>
30#include <linux/io.h> 31#include <linux/io.h>
diff --git a/arch/arm/mach-pxa/viper.c b/arch/arm/mach-pxa/viper.c
index de69b203afa7..49eeeab23689 100644
--- a/arch/arm/mach-pxa/viper.c
+++ b/arch/arm/mach-pxa/viper.c
@@ -249,9 +249,9 @@ static inline int viper_bit_to_irq(int bit)
249 return viper_isa_irqs[bit] + PXA_ISA_IRQ(0); 249 return viper_isa_irqs[bit] + PXA_ISA_IRQ(0);
250} 250}
251 251
252static void viper_ack_irq(unsigned int irq) 252static void viper_ack_irq(struct irq_data *d)
253{ 253{
254 int viper_irq = viper_irq_to_bitmask(irq); 254 int viper_irq = viper_irq_to_bitmask(d->irq);
255 255
256 if (viper_irq & 0xff) 256 if (viper_irq & 0xff)
257 VIPER_LO_IRQ_STATUS = viper_irq; 257 VIPER_LO_IRQ_STATUS = viper_irq;
@@ -259,14 +259,14 @@ static void viper_ack_irq(unsigned int irq)
259 VIPER_HI_IRQ_STATUS = (viper_irq >> 8); 259 VIPER_HI_IRQ_STATUS = (viper_irq >> 8);
260} 260}
261 261
262static void viper_mask_irq(unsigned int irq) 262static void viper_mask_irq(struct irq_data *d)
263{ 263{
264 viper_irq_enabled_mask &= ~(viper_irq_to_bitmask(irq)); 264 viper_irq_enabled_mask &= ~(viper_irq_to_bitmask(d->irq));
265} 265}
266 266
267static void viper_unmask_irq(unsigned int irq) 267static void viper_unmask_irq(struct irq_data *d)
268{ 268{
269 viper_irq_enabled_mask |= viper_irq_to_bitmask(irq); 269 viper_irq_enabled_mask |= viper_irq_to_bitmask(d->irq);
270} 270}
271 271
272static inline unsigned long viper_irq_pending(void) 272static inline unsigned long viper_irq_pending(void)
@@ -283,7 +283,7 @@ static void viper_irq_handler(unsigned int irq, struct irq_desc *desc)
283 do { 283 do {
284 /* we're in a chained irq handler, 284 /* we're in a chained irq handler,
285 * so ack the interrupt by hand */ 285 * so ack the interrupt by hand */
286 desc->chip->ack(irq); 286 desc->irq_data.chip->irq_ack(&desc->irq_data);
287 287
288 if (likely(pending)) { 288 if (likely(pending)) {
289 irq = viper_bit_to_irq(__ffs(pending)); 289 irq = viper_bit_to_irq(__ffs(pending));
@@ -294,10 +294,10 @@ static void viper_irq_handler(unsigned int irq, struct irq_desc *desc)
294} 294}
295 295
296static struct irq_chip viper_irq_chip = { 296static struct irq_chip viper_irq_chip = {
297 .name = "ISA", 297 .name = "ISA",
298 .ack = viper_ack_irq, 298 .irq_ack = viper_ack_irq,
299 .mask = viper_mask_irq, 299 .irq_mask = viper_mask_irq,
300 .unmask = viper_unmask_irq 300 .irq_unmask = viper_unmask_irq
301}; 301};
302 302
303static void __init viper_init_irq(void) 303static void __init viper_init_irq(void)
diff --git a/arch/arm/mach-pxa/zeus.c b/arch/arm/mach-pxa/zeus.c
index bf034c7670dd..f4b053b35815 100644
--- a/arch/arm/mach-pxa/zeus.c
+++ b/arch/arm/mach-pxa/zeus.c
@@ -83,19 +83,19 @@ static inline int zeus_bit_to_irq(int bit)
83 return zeus_isa_irqs[bit] + PXA_ISA_IRQ(0); 83 return zeus_isa_irqs[bit] + PXA_ISA_IRQ(0);
84} 84}
85 85
86static void zeus_ack_irq(unsigned int irq) 86static void zeus_ack_irq(struct irq_data *d)
87{ 87{
88 __raw_writew(zeus_irq_to_bitmask(irq), ZEUS_CPLD_ISA_IRQ); 88 __raw_writew(zeus_irq_to_bitmask(d->irq), ZEUS_CPLD_ISA_IRQ);
89} 89}
90 90
91static void zeus_mask_irq(unsigned int irq) 91static void zeus_mask_irq(struct irq_data *d)
92{ 92{
93 zeus_irq_enabled_mask &= ~(zeus_irq_to_bitmask(irq)); 93 zeus_irq_enabled_mask &= ~(zeus_irq_to_bitmask(d->irq));
94} 94}
95 95
96static void zeus_unmask_irq(unsigned int irq) 96static void zeus_unmask_irq(struct irq_data *d)
97{ 97{
98 zeus_irq_enabled_mask |= zeus_irq_to_bitmask(irq); 98 zeus_irq_enabled_mask |= zeus_irq_to_bitmask(d->irq);
99} 99}
100 100
101static inline unsigned long zeus_irq_pending(void) 101static inline unsigned long zeus_irq_pending(void)
@@ -111,7 +111,7 @@ static void zeus_irq_handler(unsigned int irq, struct irq_desc *desc)
111 do { 111 do {
112 /* we're in a chained irq handler, 112 /* we're in a chained irq handler,
113 * so ack the interrupt by hand */ 113 * so ack the interrupt by hand */
114 desc->chip->ack(gpio_to_irq(ZEUS_ISA_GPIO)); 114 desc->irq_data.chip->irq_ack(&desc->irq_data);
115 115
116 if (likely(pending)) { 116 if (likely(pending)) {
117 irq = zeus_bit_to_irq(__ffs(pending)); 117 irq = zeus_bit_to_irq(__ffs(pending));
@@ -122,10 +122,10 @@ static void zeus_irq_handler(unsigned int irq, struct irq_desc *desc)
122} 122}
123 123
124static struct irq_chip zeus_irq_chip = { 124static struct irq_chip zeus_irq_chip = {
125 .name = "ISA", 125 .name = "ISA",
126 .ack = zeus_ack_irq, 126 .irq_ack = zeus_ack_irq,
127 .mask = zeus_mask_irq, 127 .irq_mask = zeus_mask_irq,
128 .unmask = zeus_unmask_irq, 128 .irq_unmask = zeus_unmask_irq,
129}; 129};
130 130
131static void __init zeus_init_irq(void) 131static void __init zeus_init_irq(void)
@@ -830,8 +830,8 @@ static void __init zeus_init(void)
830 pr_info("Zeus CPLD V%dI%d\n", (system_rev & 0xf0) >> 4, (system_rev & 0x0f)); 830 pr_info("Zeus CPLD V%dI%d\n", (system_rev & 0xf0) >> 4, (system_rev & 0x0f));
831 831
832 /* Fix timings for dm9000s (CS1/CS2)*/ 832 /* Fix timings for dm9000s (CS1/CS2)*/
833 msc0 = __raw_readl(MSC0) & 0x0000ffff | (dm9000_msc << 16); 833 msc0 = (__raw_readl(MSC0) & 0x0000ffff) | (dm9000_msc << 16);
834 msc1 = __raw_readl(MSC1) & 0xffff0000 | dm9000_msc; 834 msc1 = (__raw_readl(MSC1) & 0xffff0000) | dm9000_msc;
835 __raw_writel(msc0, MSC0); 835 __raw_writel(msc0, MSC0);
836 __raw_writel(msc1, MSC1); 836 __raw_writel(msc1, MSC1);
837 837