irq.c 855 B

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. * arch/arm/mach-orion5x/irq.c
  3. *
  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
  9. * License version 2. This program is licensed "as is" without any
  10. * warranty of any kind, whether express or implied.
  11. */
  12. #include <linux/gpio.h>
  13. #include <linux/kernel.h>
  14. #include <linux/irq.h>
  15. #include <mach/bridge-regs.h>
  16. #include <plat/irq.h>
  17. static int __initdata gpio0_irqs[4] = {
  18. IRQ_ORION5X_GPIO_0_7,
  19. IRQ_ORION5X_GPIO_8_15,
  20. IRQ_ORION5X_GPIO_16_23,
  21. IRQ_ORION5X_GPIO_24_31,
  22. };
  23. void __init orion5x_init_irq(void)
  24. {
  25. orion_irq_init(0, (void __iomem *)MAIN_IRQ_MASK);
  26. /*
  27. * Initialize gpiolib for GPIOs 0-31.
  28. */
  29. orion_gpio_init(NULL, 0, 32, (void __iomem *)GPIO_VIRT_BASE, 0,
  30. IRQ_ORION5X_GPIO_START, gpio0_irqs);
  31. }