Commit | Line | Data |
---|---|---|
794d15b2 SS |
1 | /* |
2 | * arch/arm/mach-mv78xx0/irq.c | |
3 | * | |
4 | * MV78xx0 IRQ handling. | |
5 | * | |
6 | * This file is licensed under the terms of the GNU General Public | |
7 | * License version 2. This program is licensed "as is" without any | |
8 | * warranty of any kind, whether express or implied. | |
9 | */ | |
2f8163ba | 10 | #include <linux/gpio.h> |
794d15b2 | 11 | #include <linux/kernel.h> |
b95a13d7 | 12 | #include <linux/irq.h> |
383b9961 | 13 | #include <linux/io.h> |
fdd8b079 | 14 | #include <mach/bridge-regs.h> |
ce91574c | 15 | #include <plat/orion-gpio.h> |
6f088f1d | 16 | #include <plat/irq.h> |
794d15b2 SS |
17 | #include "common.h" |
18 | ||
278b45b0 AL |
19 | static int __initdata gpio0_irqs[4] = { |
20 | IRQ_MV78XX0_GPIO_0_7, | |
21 | IRQ_MV78XX0_GPIO_8_15, | |
22 | IRQ_MV78XX0_GPIO_16_23, | |
23 | IRQ_MV78XX0_GPIO_24_31, | |
24 | }; | |
b95a13d7 | 25 | |
794d15b2 SS |
26 | void __init mv78xx0_init_irq(void) |
27 | { | |
383b9961 TP |
28 | orion_irq_init(0, IRQ_VIRT_BASE + IRQ_MASK_LOW_OFF); |
29 | orion_irq_init(32, IRQ_VIRT_BASE + IRQ_MASK_HIGH_OFF); | |
30 | orion_irq_init(64, IRQ_VIRT_BASE + IRQ_MASK_ERR_OFF); | |
b95a13d7 LB |
31 | |
32 | /* | |
9eac6d0a LB |
33 | * Initialize gpiolib for GPIOs 0-31. (The GPIO interrupt mask |
34 | * registers for core #1 are at an offset of 0x18 from those of | |
35 | * core #0.) | |
b95a13d7 | 36 | */ |
383b9961 | 37 | orion_gpio_init(NULL, 0, 32, GPIO_VIRT_BASE, |
9eac6d0a | 38 | mv78xx0_core_index() ? 0x18 : 0, |
278b45b0 | 39 | IRQ_MV78XX0_GPIO_START, gpio0_irqs); |
794d15b2 | 40 | } |