blob: e152641cdb0e3e57b0059e87e9f8d97588f48f3b [file] [log] [blame]
Tzachi Perelstein3085de62007-10-23 15:14:42 -04001/*
Lennert Buytenhek9dd0b192008-03-27 14:51:41 -04002 * arch/arm/mach-orion5x/irq.c
Tzachi Perelstein3085de62007-10-23 15:14:42 -04003 *
4 * Core IRQ functions for Marvell Orion System On Chip
5 *
6 * Maintainer: Tzachi Perelstein <tzachi@marvell.com>
7 *
8 * This file is licensed under the terms of the GNU General Public
Lennert Buytenhek159ffb32008-03-27 14:51:41 -04009 * License version 2. This program is licensed "as is" without any
Tzachi Perelstein3085de62007-10-23 15:14:42 -040010 * warranty of any kind, whether express or implied.
11 */
Russell King2f8163b2011-07-26 10:53:52 +010012#include <linux/gpio.h>
Tzachi Perelstein3085de62007-10-23 15:14:42 -040013#include <linux/kernel.h>
Tzachi Perelstein3085de62007-10-23 15:14:42 -040014#include <linux/irq.h>
Nicolas Pitrefdd8b072009-04-22 20:08:17 +010015#include <mach/bridge-regs.h>
Rob Herringce915742012-08-29 10:16:55 -050016#include <plat/orion-gpio.h>
Lennert Buytenhek6f088f12008-08-09 13:44:58 +020017#include <plat/irq.h>
Tzachi Perelstein3085de62007-10-23 15:14:42 -040018
Andrew Lunn278b45b2012-06-27 13:40:04 +020019static int __initdata gpio0_irqs[4] = {
20 IRQ_ORION5X_GPIO_0_7,
21 IRQ_ORION5X_GPIO_8_15,
22 IRQ_ORION5X_GPIO_16_23,
23 IRQ_ORION5X_GPIO_24_31,
24};
Tzachi Perelstein3085de62007-10-23 15:14:42 -040025
Lennert Buytenhek07332312008-10-20 01:51:03 +020026void __init orion5x_init_irq(void)
Tzachi Perelstein3085de62007-10-23 15:14:42 -040027{
Lennert Buytenhek07332312008-10-20 01:51:03 +020028 orion_irq_init(0, (void __iomem *)MAIN_IRQ_MASK);
Tzachi Perelstein3085de62007-10-23 15:14:42 -040029
30 /*
Lennert Buytenhek9eac6d02010-12-14 12:54:03 +010031 * Initialize gpiolib for GPIOs 0-31.
Tzachi Perelstein3085de62007-10-23 15:14:42 -040032 */
Andrew Lunn278b45b2012-06-27 13:40:04 +020033 orion_gpio_init(NULL, 0, 32, (void __iomem *)GPIO_VIRT_BASE, 0,
34 IRQ_ORION5X_GPIO_START, gpio0_irqs);
Tzachi Perelstein3085de62007-10-23 15:14:42 -040035}