diff options
Diffstat (limited to 'arch/arm/mach-h720x/common.c')
-rw-r--r-- | arch/arm/mach-h720x/common.c | 60 |
1 files changed, 30 insertions, 30 deletions
diff --git a/arch/arm/mach-h720x/common.c b/arch/arm/mach-h720x/common.c index bdb3f6706801..51d4e44ab973 100644 --- a/arch/arm/mach-h720x/common.c +++ b/arch/arm/mach-h720x/common.c | |||
@@ -52,17 +52,17 @@ unsigned long h720x_gettimeoffset(void) | |||
52 | /* | 52 | /* |
53 | * mask Global irq's | 53 | * mask Global irq's |
54 | */ | 54 | */ |
55 | static void mask_global_irq (unsigned int irq ) | 55 | static void mask_global_irq(struct irq_data *d) |
56 | { | 56 | { |
57 | CPU_REG (IRQC_VIRT, IRQC_IER) &= ~(1 << irq); | 57 | CPU_REG (IRQC_VIRT, IRQC_IER) &= ~(1 << d->irq); |
58 | } | 58 | } |
59 | 59 | ||
60 | /* | 60 | /* |
61 | * unmask Global irq's | 61 | * unmask Global irq's |
62 | */ | 62 | */ |
63 | static void unmask_global_irq (unsigned int irq ) | 63 | static void unmask_global_irq(struct irq_data *d) |
64 | { | 64 | { |
65 | CPU_REG (IRQC_VIRT, IRQC_IER) |= (1 << irq); | 65 | CPU_REG (IRQC_VIRT, IRQC_IER) |= (1 << d->irq); |
66 | } | 66 | } |
67 | 67 | ||
68 | 68 | ||
@@ -70,10 +70,10 @@ static void unmask_global_irq (unsigned int irq ) | |||
70 | * ack GPIO irq's | 70 | * ack GPIO irq's |
71 | * Ack only for edge triggered int's valid | 71 | * Ack only for edge triggered int's valid |
72 | */ | 72 | */ |
73 | static void inline ack_gpio_irq(u32 irq) | 73 | static void inline ack_gpio_irq(struct irq_data *d) |
74 | { | 74 | { |
75 | u32 reg_base = GPIO_VIRT(IRQ_TO_REGNO(irq)); | 75 | u32 reg_base = GPIO_VIRT(IRQ_TO_REGNO(d->irq)); |
76 | u32 bit = IRQ_TO_BIT(irq); | 76 | u32 bit = IRQ_TO_BIT(d->irq); |
77 | if ( (CPU_REG (reg_base, GPIO_EDGE) & bit)) | 77 | if ( (CPU_REG (reg_base, GPIO_EDGE) & bit)) |
78 | CPU_REG (reg_base, GPIO_CLR) = bit; | 78 | CPU_REG (reg_base, GPIO_CLR) = bit; |
79 | } | 79 | } |
@@ -81,20 +81,20 @@ static void inline ack_gpio_irq(u32 irq) | |||
81 | /* | 81 | /* |
82 | * mask GPIO irq's | 82 | * mask GPIO irq's |
83 | */ | 83 | */ |
84 | static void inline mask_gpio_irq(u32 irq) | 84 | static void inline mask_gpio_irq(struct irq_data *d) |
85 | { | 85 | { |
86 | u32 reg_base = GPIO_VIRT(IRQ_TO_REGNO(irq)); | 86 | u32 reg_base = GPIO_VIRT(IRQ_TO_REGNO(d->irq)); |
87 | u32 bit = IRQ_TO_BIT(irq); | 87 | u32 bit = IRQ_TO_BIT(d->irq); |
88 | CPU_REG (reg_base, GPIO_MASK) &= ~bit; | 88 | CPU_REG (reg_base, GPIO_MASK) &= ~bit; |
89 | } | 89 | } |
90 | 90 | ||
91 | /* | 91 | /* |
92 | * unmask GPIO irq's | 92 | * unmask GPIO irq's |
93 | */ | 93 | */ |
94 | static void inline unmask_gpio_irq(u32 irq) | 94 | static void inline unmask_gpio_irq(struct irq_data *d) |
95 | { | 95 | { |
96 | u32 reg_base = GPIO_VIRT(IRQ_TO_REGNO(irq)); | 96 | u32 reg_base = GPIO_VIRT(IRQ_TO_REGNO(d->irq)); |
97 | u32 bit = IRQ_TO_BIT(irq); | 97 | u32 bit = IRQ_TO_BIT(d->irq); |
98 | CPU_REG (reg_base, GPIO_MASK) |= bit; | 98 | CPU_REG (reg_base, GPIO_MASK) |= bit; |
99 | } | 99 | } |
100 | 100 | ||
@@ -170,15 +170,15 @@ h720x_gpioe_demux_handler(unsigned int irq_unused, struct irq_desc *desc) | |||
170 | #endif | 170 | #endif |
171 | 171 | ||
172 | static struct irq_chip h720x_global_chip = { | 172 | static struct irq_chip h720x_global_chip = { |
173 | .ack = mask_global_irq, | 173 | .irq_ack = mask_global_irq, |
174 | .mask = mask_global_irq, | 174 | .irq_mask = mask_global_irq, |
175 | .unmask = unmask_global_irq, | 175 | .irq_unmask = unmask_global_irq, |
176 | }; | 176 | }; |
177 | 177 | ||
178 | static struct irq_chip h720x_gpio_chip = { | 178 | static struct irq_chip h720x_gpio_chip = { |
179 | .ack = ack_gpio_irq, | 179 | .irq_ack = ack_gpio_irq, |
180 | .mask = mask_gpio_irq, | 180 | .irq_mask = mask_gpio_irq, |
181 | .unmask = unmask_gpio_irq, | 181 | .irq_unmask = unmask_gpio_irq, |
182 | }; | 182 | }; |
183 | 183 | ||
184 | /* | 184 | /* |
@@ -199,29 +199,29 @@ void __init h720x_init_irq (void) | |||
199 | 199 | ||
200 | /* Initialize global IRQ's, fast path */ | 200 | /* Initialize global IRQ's, fast path */ |
201 | for (irq = 0; irq < NR_GLBL_IRQS; irq++) { | 201 | for (irq = 0; irq < NR_GLBL_IRQS; irq++) { |
202 | set_irq_chip(irq, &h720x_global_chip); | 202 | irq_set_chip_and_handler(irq, &h720x_global_chip, |
203 | set_irq_handler(irq, handle_level_irq); | 203 | handle_level_irq); |
204 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); | 204 | set_irq_flags(irq, IRQF_VALID | IRQF_PROBE); |
205 | } | 205 | } |
206 | 206 | ||
207 | /* Initialize multiplexed IRQ's, slow path */ | 207 | /* Initialize multiplexed IRQ's, slow path */ |
208 | for (irq = IRQ_CHAINED_GPIOA(0) ; irq <= IRQ_CHAINED_GPIOD(31); irq++) { | 208 | for (irq = IRQ_CHAINED_GPIOA(0) ; irq <= IRQ_CHAINED_GPIOD(31); irq++) { |
209 | set_irq_chip(irq, &h720x_gpio_chip); | 209 | irq_set_chip_and_handler(irq, &h720x_gpio_chip, |
210 | set_irq_handler(irq, handle_edge_irq); | 210 | handle_edge_irq); |
211 | set_irq_flags(irq, IRQF_VALID ); | 211 | set_irq_flags(irq, IRQF_VALID ); |
212 | } | 212 | } |
213 | set_irq_chained_handler(IRQ_GPIOA, h720x_gpioa_demux_handler); | 213 | irq_set_chained_handler(IRQ_GPIOA, h720x_gpioa_demux_handler); |
214 | set_irq_chained_handler(IRQ_GPIOB, h720x_gpiob_demux_handler); | 214 | irq_set_chained_handler(IRQ_GPIOB, h720x_gpiob_demux_handler); |
215 | set_irq_chained_handler(IRQ_GPIOC, h720x_gpioc_demux_handler); | 215 | irq_set_chained_handler(IRQ_GPIOC, h720x_gpioc_demux_handler); |
216 | set_irq_chained_handler(IRQ_GPIOD, h720x_gpiod_demux_handler); | 216 | irq_set_chained_handler(IRQ_GPIOD, h720x_gpiod_demux_handler); |
217 | 217 | ||
218 | #ifdef CONFIG_CPU_H7202 | 218 | #ifdef CONFIG_CPU_H7202 |
219 | for (irq = IRQ_CHAINED_GPIOE(0) ; irq <= IRQ_CHAINED_GPIOE(31); irq++) { | 219 | for (irq = IRQ_CHAINED_GPIOE(0) ; irq <= IRQ_CHAINED_GPIOE(31); irq++) { |
220 | set_irq_chip(irq, &h720x_gpio_chip); | 220 | irq_set_chip_and_handler(irq, &h720x_gpio_chip, |
221 | set_irq_handler(irq, handle_edge_irq); | 221 | handle_edge_irq); |
222 | set_irq_flags(irq, IRQF_VALID ); | 222 | set_irq_flags(irq, IRQF_VALID ); |
223 | } | 223 | } |
224 | set_irq_chained_handler(IRQ_GPIOE, h720x_gpioe_demux_handler); | 224 | irq_set_chained_handler(IRQ_GPIOE, h720x_gpioe_demux_handler); |
225 | #endif | 225 | #endif |
226 | 226 | ||
227 | /* Enable multiplexed irq's */ | 227 | /* Enable multiplexed irq's */ |