imx31_gpio.c revision 1.1.24.1 1 1.1.24.1 yamt /* $NetBSD: imx31_gpio.c,v 1.1.24.1 2008/05/16 02:21:56 yamt Exp $ */
2 1.1.24.1 yamt /*-
3 1.1.24.1 yamt * Copyright (c) 2007 The NetBSD Foundation, Inc.
4 1.1.24.1 yamt * All rights reserved.
5 1.1.24.1 yamt *
6 1.1.24.1 yamt * This code is derived from software contributed to The NetBSD Foundation
7 1.1.24.1 yamt * by Matt Thomas
8 1.1.24.1 yamt *
9 1.1.24.1 yamt * Redistribution and use in source and binary forms, with or without
10 1.1.24.1 yamt * modification, are permitted provided that the following conditions
11 1.1.24.1 yamt * are met:
12 1.1.24.1 yamt * 1. Redistributions of source code must retain the above copyright
13 1.1.24.1 yamt * notice, this list of conditions and the following disclaimer.
14 1.1.24.1 yamt * 2. Redistributions in binary form must reproduce the above copyright
15 1.1.24.1 yamt * notice, this list of conditions and the following disclaimer in the
16 1.1.24.1 yamt * documentation and/or other materials provided with the distribution.
17 1.1.24.1 yamt *
18 1.1.24.1 yamt * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
19 1.1.24.1 yamt * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
20 1.1.24.1 yamt * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
21 1.1.24.1 yamt * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
22 1.1.24.1 yamt * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
23 1.1.24.1 yamt * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
24 1.1.24.1 yamt * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
25 1.1.24.1 yamt * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
26 1.1.24.1 yamt * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
27 1.1.24.1 yamt * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
28 1.1.24.1 yamt * POSSIBILITY OF SUCH DAMAGE.
29 1.1.24.1 yamt */
30 1.1.24.1 yamt #include <sys/cdefs.h>
31 1.1.24.1 yamt __KERNEL_RCSID(0, "$NetBSD: imx31_gpio.c,v 1.1.24.1 2008/05/16 02:21:56 yamt Exp $");
32 1.1.24.1 yamt
33 1.1.24.1 yamt #define _INTR_PRIVATE
34 1.1.24.1 yamt
35 1.1.24.1 yamt #include "locators.h"
36 1.1.24.1 yamt #include "gpio.h"
37 1.1.24.1 yamt
38 1.1.24.1 yamt #include <sys/param.h>
39 1.1.24.1 yamt #include <sys/evcnt.h>
40 1.1.24.1 yamt
41 1.1.24.1 yamt #include <uvm/uvm_extern.h>
42 1.1.24.1 yamt
43 1.1.24.1 yamt #include <machine/intr.h>
44 1.1.24.1 yamt
45 1.1.24.1 yamt #include <arm/cpu.h>
46 1.1.24.1 yamt #include <arm/armreg.h>
47 1.1.24.1 yamt #include <arm/cpufunc.h>
48 1.1.24.1 yamt
49 1.1.24.1 yamt #include <machine/atomic.h>
50 1.1.24.1 yamt #include <machine/bus.h>
51 1.1.24.1 yamt
52 1.1.24.1 yamt #include <arm/imx/imx31reg.h>
53 1.1.24.1 yamt #include <arm/imx/imx31var.h>
54 1.1.24.1 yamt #include <arm/pic/picvar.h>
55 1.1.24.1 yamt
56 1.1.24.1 yamt #if NGPIO > 0
57 1.1.24.1 yamt #include <sys/gpio.h>
58 1.1.24.1 yamt #include <dev/gpio/gpiovar.h>
59 1.1.24.1 yamt #endif
60 1.1.24.1 yamt
61 1.1.24.1 yamt static void gpio_pic_block_irqs(struct pic_softc *, size_t, uint32_t);
62 1.1.24.1 yamt static void gpio_pic_unblock_irqs(struct pic_softc *, size_t, uint32_t);
63 1.1.24.1 yamt static int gpio_pic_find_pending_irqs(struct pic_softc *);
64 1.1.24.1 yamt static void gpio_pic_establish_irq(struct pic_softc *, struct intrsource *);
65 1.1.24.1 yamt
66 1.1.24.1 yamt const struct pic_ops gpio_pic_ops = {
67 1.1.24.1 yamt .pic_block_irqs = gpio_pic_block_irqs,
68 1.1.24.1 yamt .pic_unblock_irqs = gpio_pic_unblock_irqs,
69 1.1.24.1 yamt .pic_find_pending_irqs = gpio_pic_find_pending_irqs,
70 1.1.24.1 yamt .pic_establish_irq = gpio_pic_establish_irq,
71 1.1.24.1 yamt };
72 1.1.24.1 yamt
73 1.1.24.1 yamt struct gpio_softc {
74 1.1.24.1 yamt struct device gpio_dev;
75 1.1.24.1 yamt struct pic_softc gpio_pic;
76 1.1.24.1 yamt bus_space_tag_t gpio_memt;
77 1.1.24.1 yamt bus_space_handle_t gpio_memh;
78 1.1.24.1 yamt uint32_t gpio_enable_mask;
79 1.1.24.1 yamt uint32_t gpio_edge_mask;
80 1.1.24.1 yamt uint32_t gpio_level_mask;
81 1.1.24.1 yamt #if NGPIO > 0
82 1.1.24.1 yamt struct gpio_chipset_tag gpio_chipset;
83 1.1.24.1 yamt gpio_pin_t gpio_pins[32];
84 1.1.24.1 yamt #endif
85 1.1.24.1 yamt };
86 1.1.24.1 yamt
87 1.1.24.1 yamt #define PIC_TO_SOFTC(pic) \
88 1.1.24.1 yamt ((struct gpio_softc *)((char *)(pic) - \
89 1.1.24.1 yamt offsetof(struct gpio_softc, gpio_pic)))
90 1.1.24.1 yamt
91 1.1.24.1 yamt #define GPIO_READ(gpio, reg) \
92 1.1.24.1 yamt bus_space_read_4((gpio)->gpio_memt, (gpio)->gpio_memh, (reg))
93 1.1.24.1 yamt #define GPIO_WRITE(gpio, reg, val) \
94 1.1.24.1 yamt bus_space_write_4((gpio)->gpio_memt, (gpio)->gpio_memh, (reg), (val))
95 1.1.24.1 yamt
96 1.1.24.1 yamt void
97 1.1.24.1 yamt gpio_pic_unblock_irqs(struct pic_softc *pic, size_t irq_base, uint32_t irq_mask)
98 1.1.24.1 yamt {
99 1.1.24.1 yamt struct gpio_softc * const gpio = PIC_TO_SOFTC(pic);
100 1.1.24.1 yamt KASSERT(irq_base == 0);
101 1.1.24.1 yamt
102 1.1.24.1 yamt gpio->gpio_enable_mask |= irq_mask;
103 1.1.24.1 yamt /*
104 1.1.24.1 yamt * If this a level source, ack it now. If it's still asserted
105 1.1.24.1 yamt * it'll come back.
106 1.1.24.1 yamt */
107 1.1.24.1 yamt if (irq_mask & gpio->gpio_level_mask)
108 1.1.24.1 yamt GPIO_WRITE(gpio, GPIO_ISR, irq_mask);
109 1.1.24.1 yamt GPIO_WRITE(gpio, GPIO_IMR, gpio->gpio_enable_mask);
110 1.1.24.1 yamt }
111 1.1.24.1 yamt
112 1.1.24.1 yamt void
113 1.1.24.1 yamt gpio_pic_block_irqs(struct pic_softc *pic, size_t irq_base, uint32_t irq_mask)
114 1.1.24.1 yamt {
115 1.1.24.1 yamt struct gpio_softc * const gpio = PIC_TO_SOFTC(pic);
116 1.1.24.1 yamt KASSERT(irq_base == 0);
117 1.1.24.1 yamt
118 1.1.24.1 yamt gpio->gpio_enable_mask &= ~irq_mask;
119 1.1.24.1 yamt GPIO_WRITE(gpio, GPIO_IMR, gpio->gpio_enable_mask);
120 1.1.24.1 yamt }
121 1.1.24.1 yamt
122 1.1.24.1 yamt int
123 1.1.24.1 yamt gpio_pic_find_pending_irqs(struct pic_softc *pic)
124 1.1.24.1 yamt {
125 1.1.24.1 yamt struct gpio_softc * const gpio = PIC_TO_SOFTC(pic);
126 1.1.24.1 yamt uint32_t v;
127 1.1.24.1 yamt uint32_t pending;
128 1.1.24.1 yamt
129 1.1.24.1 yamt v = GPIO_READ(gpio, GPIO_ISR);
130 1.1.24.1 yamt pending = (v & gpio->gpio_enable_mask);
131 1.1.24.1 yamt if (pending == 0)
132 1.1.24.1 yamt return 0;
133 1.1.24.1 yamt
134 1.1.24.1 yamt /*
135 1.1.24.1 yamt * Disable the pending interrupts.
136 1.1.24.1 yamt */
137 1.1.24.1 yamt gpio->gpio_enable_mask &= ~pending;
138 1.1.24.1 yamt GPIO_WRITE(gpio, GPIO_IMR, gpio->gpio_enable_mask);
139 1.1.24.1 yamt
140 1.1.24.1 yamt /*
141 1.1.24.1 yamt * If any of the sources are edge triggered, ack them now so
142 1.1.24.1 yamt * we won't lose them.
143 1.1.24.1 yamt */
144 1.1.24.1 yamt if (v & gpio->gpio_edge_mask)
145 1.1.24.1 yamt GPIO_WRITE(gpio, GPIO_ISR, v & gpio->gpio_edge_mask);
146 1.1.24.1 yamt
147 1.1.24.1 yamt /*
148 1.1.24.1 yamt * Now find all the pending bits and mark them as pending.
149 1.1.24.1 yamt */
150 1.1.24.1 yamt do {
151 1.1.24.1 yamt int irq;
152 1.1.24.1 yamt KASSERT(pending != 0);
153 1.1.24.1 yamt irq = 31 - __builtin_clz(pending);
154 1.1.24.1 yamt pending &= ~__BIT(irq);
155 1.1.24.1 yamt pic_mark_pending(&gpio->gpio_pic, irq);
156 1.1.24.1 yamt } while (pending != 0);
157 1.1.24.1 yamt
158 1.1.24.1 yamt return 1;
159 1.1.24.1 yamt }
160 1.1.24.1 yamt
161 1.1.24.1 yamt #define GPIO_TYPEMAP \
162 1.1.24.1 yamt ((GPIO_ICR_LEVEL_LOW << (2*IST_LEVEL_LOW)) | \
163 1.1.24.1 yamt (GPIO_ICR_LEVEL_HIGH << (2*IST_LEVEL_HIGH)) | \
164 1.1.24.1 yamt (GPIO_ICR_EDGE_RISING << (2*IST_EDGE_RISING)) | \
165 1.1.24.1 yamt (GPIO_ICR_EDGE_FALLING << (2*IST_EDGE_FALLING)))
166 1.1.24.1 yamt
167 1.1.24.1 yamt void
168 1.1.24.1 yamt gpio_pic_establish_irq(struct pic_softc *pic, struct intrsource *is)
169 1.1.24.1 yamt {
170 1.1.24.1 yamt struct gpio_softc * const gpio = PIC_TO_SOFTC(pic);
171 1.1.24.1 yamt KASSERT(is->is_irq < 32);
172 1.1.24.1 yamt uint32_t irq_mask = __BIT(is->is_irq);
173 1.1.24.1 yamt uint32_t v;
174 1.1.24.1 yamt unsigned int icr_shift, icr_reg;
175 1.1.24.1 yamt unsigned int gtype;
176 1.1.24.1 yamt
177 1.1.24.1 yamt /*
178 1.1.24.1 yamt * Make sure the irq isn't enabled and not asserting.
179 1.1.24.1 yamt */
180 1.1.24.1 yamt gpio->gpio_enable_mask &= ~irq_mask;
181 1.1.24.1 yamt GPIO_WRITE(gpio, GPIO_IMR, gpio->gpio_enable_mask);
182 1.1.24.1 yamt GPIO_WRITE(gpio, GPIO_ISR, irq_mask);
183 1.1.24.1 yamt
184 1.1.24.1 yamt /*
185 1.1.24.1 yamt * Convert the type to a gpio type and figure out which bits in what
186 1.1.24.1 yamt * register we have to tweak.
187 1.1.24.1 yamt */
188 1.1.24.1 yamt gtype = (GPIO_TYPEMAP >> (2 * is->is_type)) & 3;
189 1.1.24.1 yamt icr_shift = (is->is_irq & 0x0f) << 1;
190 1.1.24.1 yamt icr_reg = GPIO_ICR1 + ((is->is_irq & 0x10) >> 2);
191 1.1.24.1 yamt
192 1.1.24.1 yamt /*
193 1.1.24.1 yamt * Set the interrupt type.
194 1.1.24.1 yamt */
195 1.1.24.1 yamt v = GPIO_READ(gpio, icr_reg);
196 1.1.24.1 yamt v &= ~(3 << icr_shift);
197 1.1.24.1 yamt v |= gtype << icr_shift;
198 1.1.24.1 yamt GPIO_WRITE(gpio, icr_reg, v);
199 1.1.24.1 yamt
200 1.1.24.1 yamt /*
201 1.1.24.1 yamt * Mark it as input.
202 1.1.24.1 yamt */
203 1.1.24.1 yamt v = GPIO_READ(gpio, GPIO_DIR);
204 1.1.24.1 yamt v &= ~irq_mask;
205 1.1.24.1 yamt GPIO_WRITE(gpio, GPIO_DIR, v);
206 1.1.24.1 yamt
207 1.1.24.1 yamt /*
208 1.1.24.1 yamt * Now record the type of interrupt.
209 1.1.24.1 yamt */
210 1.1.24.1 yamt if (gtype == GPIO_ICR_EDGE_RISING || gtype == GPIO_ICR_EDGE_FALLING) {
211 1.1.24.1 yamt gpio->gpio_edge_mask |= irq_mask;
212 1.1.24.1 yamt gpio->gpio_level_mask &= ~irq_mask;
213 1.1.24.1 yamt } else {
214 1.1.24.1 yamt gpio->gpio_edge_mask &= ~irq_mask;
215 1.1.24.1 yamt gpio->gpio_level_mask |= irq_mask;
216 1.1.24.1 yamt }
217 1.1.24.1 yamt }
218 1.1.24.1 yamt
219 1.1.24.1 yamt static int gpio_match(device_t, cfdata_t, void *);
220 1.1.24.1 yamt static void gpio_attach(device_t, device_t, void *);
221 1.1.24.1 yamt
222 1.1.24.1 yamt CFATTACH_DECL(imxgpio,
223 1.1.24.1 yamt sizeof(struct gpio_softc),
224 1.1.24.1 yamt gpio_match, gpio_attach,
225 1.1.24.1 yamt NULL, NULL);
226 1.1.24.1 yamt
227 1.1.24.1 yamt #if NGPIO > 0
228 1.1.24.1 yamt
229 1.1.24.1 yamt static int
230 1.1.24.1 yamt imxgpio_pin_read(void *arg, int pin)
231 1.1.24.1 yamt {
232 1.1.24.1 yamt struct gpio_softc * const gpio = arg;
233 1.1.24.1 yamt
234 1.1.24.1 yamt return (GPIO_READ(gpio, GPIO_DR) >> pin) & 1;
235 1.1.24.1 yamt }
236 1.1.24.1 yamt
237 1.1.24.1 yamt static void
238 1.1.24.1 yamt imxgpio_pin_write(void *arg, int pin, int value)
239 1.1.24.1 yamt {
240 1.1.24.1 yamt struct gpio_softc * const gpio = arg;
241 1.1.24.1 yamt uint32_t mask = 1 << pin;
242 1.1.24.1 yamt uint32_t old, new;
243 1.1.24.1 yamt
244 1.1.24.1 yamt old = GPIO_READ(gpio, GPIO_DR);
245 1.1.24.1 yamt if (value)
246 1.1.24.1 yamt new = old | mask;
247 1.1.24.1 yamt else
248 1.1.24.1 yamt new = old & ~mask;
249 1.1.24.1 yamt
250 1.1.24.1 yamt if (old != new)
251 1.1.24.1 yamt GPIO_WRITE(gpio, GPIO_DR, new);
252 1.1.24.1 yamt }
253 1.1.24.1 yamt
254 1.1.24.1 yamt static void
255 1.1.24.1 yamt imxgpio_pin_ctl(void *arg, int pin, int flags)
256 1.1.24.1 yamt {
257 1.1.24.1 yamt struct gpio_softc * const gpio = arg;
258 1.1.24.1 yamt uint32_t mask = 1 << pin;
259 1.1.24.1 yamt uint32_t old, new;
260 1.1.24.1 yamt
261 1.1.24.1 yamt old = GPIO_READ(gpio, GPIO_DIR);
262 1.1.24.1 yamt new = old;
263 1.1.24.1 yamt switch (flags & (GPIO_PIN_INPUT|GPIO_PIN_OUTPUT)) {
264 1.1.24.1 yamt case GPIO_PIN_INPUT: new |= mask; break;
265 1.1.24.1 yamt case GPIO_PIN_OUTPUT: new &= ~mask; break;
266 1.1.24.1 yamt default: return;
267 1.1.24.1 yamt }
268 1.1.24.1 yamt if (old != new)
269 1.1.24.1 yamt GPIO_WRITE(gpio, GPIO_DIR, new);
270 1.1.24.1 yamt }
271 1.1.24.1 yamt
272 1.1.24.1 yamt static void
273 1.1.24.1 yamt gpio_defer(device_t self)
274 1.1.24.1 yamt {
275 1.1.24.1 yamt struct gpio_softc * const gpio = (void *) self;
276 1.1.24.1 yamt struct gpio_chipset_tag * const gp = &gpio->gpio_chipset;
277 1.1.24.1 yamt struct gpiobus_attach_args gba;
278 1.1.24.1 yamt gpio_pin_t *pins;
279 1.1.24.1 yamt uint32_t mask, dir, value;
280 1.1.24.1 yamt int pin;
281 1.1.24.1 yamt
282 1.1.24.1 yamt gp->gp_cookie = gpio;
283 1.1.24.1 yamt gp->gp_pin_read = imxgpio_pin_read;
284 1.1.24.1 yamt gp->gp_pin_write = imxgpio_pin_write;
285 1.1.24.1 yamt gp->gp_pin_ctl = imxgpio_pin_ctl;
286 1.1.24.1 yamt
287 1.1.24.1 yamt gba.gba_gc = gp;
288 1.1.24.1 yamt gba.gba_pins = gpio->gpio_pins;
289 1.1.24.1 yamt gba.gba_npins = __arraycount(gpio->gpio_pins);
290 1.1.24.1 yamt
291 1.1.24.1 yamt dir = GPIO_READ(gpio, GPIO_DIR);
292 1.1.24.1 yamt value = GPIO_READ(gpio, GPIO_DR);
293 1.1.24.1 yamt for (pin = 0, mask = 1, pins = gpio->gpio_pins;
294 1.1.24.1 yamt pin < 32; pin++, mask <<= 1, pins++) {
295 1.1.24.1 yamt pins->pin_num = pin;
296 1.1.24.1 yamt if ((gpio->gpio_edge_mask|gpio->gpio_level_mask) & mask)
297 1.1.24.1 yamt pins->pin_caps = GPIO_PIN_INPUT;
298 1.1.24.1 yamt else
299 1.1.24.1 yamt pins->pin_caps = GPIO_PIN_INPUT|GPIO_PIN_OUTPUT;
300 1.1.24.1 yamt pins->pin_flags =
301 1.1.24.1 yamt (dir & mask) ? GPIO_PIN_OUTPUT : GPIO_PIN_INPUT;
302 1.1.24.1 yamt pins->pin_state =
303 1.1.24.1 yamt (value & mask) ? GPIO_PIN_HIGH : GPIO_PIN_LOW;
304 1.1.24.1 yamt }
305 1.1.24.1 yamt
306 1.1.24.1 yamt config_found_ia(self, "gpiobus", &gba, gpiobus_print);
307 1.1.24.1 yamt }
308 1.1.24.1 yamt #endif /* NGPIO > 0 */
309 1.1.24.1 yamt
310 1.1.24.1 yamt int
311 1.1.24.1 yamt gpio_match(device_t parent, cfdata_t cfdata, void *aux)
312 1.1.24.1 yamt {
313 1.1.24.1 yamt struct ahb_attach_args *ahba = aux;
314 1.1.24.1 yamt bus_space_handle_t memh;
315 1.1.24.1 yamt bus_size_t size;
316 1.1.24.1 yamt int error;
317 1.1.24.1 yamt
318 1.1.24.1 yamt if (ahba->ahba_addr != GPIO1_BASE
319 1.1.24.1 yamt && ahba->ahba_addr != GPIO2_BASE
320 1.1.24.1 yamt && ahba->ahba_addr != GPIO3_BASE)
321 1.1.24.1 yamt return 0;
322 1.1.24.1 yamt
323 1.1.24.1 yamt size = (ahba->ahba_size == AHBCF_SIZE_DEFAULT) ? GPIO_SIZE : ahba->ahba_size;
324 1.1.24.1 yamt
325 1.1.24.1 yamt error = bus_space_map(ahba->ahba_memt, ahba->ahba_addr, size, 0, &memh);
326 1.1.24.1 yamt if (error)
327 1.1.24.1 yamt return 0;
328 1.1.24.1 yamt
329 1.1.24.1 yamt bus_space_unmap(ahba->ahba_memt, memh, size);
330 1.1.24.1 yamt return 1;
331 1.1.24.1 yamt }
332 1.1.24.1 yamt
333 1.1.24.1 yamt void
334 1.1.24.1 yamt gpio_attach(device_t parent, device_t self, void *aux)
335 1.1.24.1 yamt {
336 1.1.24.1 yamt struct ahb_attach_args * const ahba = aux;
337 1.1.24.1 yamt struct gpio_softc * const gpio = (void *) self;
338 1.1.24.1 yamt int error;
339 1.1.24.1 yamt
340 1.1.24.1 yamt if (ahba->ahba_size == AHBCF_SIZE_DEFAULT)
341 1.1.24.1 yamt ahba->ahba_size = GPIO_SIZE;
342 1.1.24.1 yamt
343 1.1.24.1 yamt gpio->gpio_memt = ahba->ahba_memt;
344 1.1.24.1 yamt error = bus_space_map(ahba->ahba_memt, ahba->ahba_addr, ahba->ahba_size,
345 1.1.24.1 yamt 0, &gpio->gpio_memh);
346 1.1.24.1 yamt
347 1.1.24.1 yamt if (error) {
348 1.1.24.1 yamt aprint_error(": failed to map register %#lx@%#lx: %d\n",
349 1.1.24.1 yamt ahba->ahba_size, ahba->ahba_addr, error);
350 1.1.24.1 yamt return;
351 1.1.24.1 yamt }
352 1.1.24.1 yamt
353 1.1.24.1 yamt if (ahba->ahba_irqbase != AHBCF_IRQBASE_DEFAULT) {
354 1.1.24.1 yamt gpio->gpio_pic.pic_ops = &gpio_pic_ops;
355 1.1.24.1 yamt strlcpy(gpio->gpio_pic.pic_name, self->dv_xname,
356 1.1.24.1 yamt sizeof(gpio->gpio_pic.pic_name));
357 1.1.24.1 yamt gpio->gpio_pic.pic_maxsources = 32;
358 1.1.24.1 yamt pic_add(&gpio->gpio_pic, ahba->ahba_irqbase);
359 1.1.24.1 yamt aprint_normal(": interrupts %d..%d",
360 1.1.24.1 yamt ahba->ahba_irqbase, ahba->ahba_irqbase + 31);
361 1.1.24.1 yamt }
362 1.1.24.1 yamt aprint_normal("\n");
363 1.1.24.1 yamt #if NGPIO > 0
364 1.1.24.1 yamt config_interrupts(self, gpio_defer);
365 1.1.24.1 yamt #endif
366 1.1.24.1 yamt }
367