irq.h 2.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. /*
  2. * Copyright (C) 2009-2010, Lars-Peter Clausen <lars@metafoo.de>
  3. * JZ4740 IRQ definitions
  4. *
  5. * This program is free software; you can redistribute it and/or modify it
  6. * under the terms of the GNU General Public License as published by the
  7. * Free Software Foundation; either version 2 of the License, or (at your
  8. * option) any later version.
  9. *
  10. * You should have received a copy of the GNU General Public License along
  11. * with this program; if not, write to the Free Software Foundation, Inc.,
  12. * 675 Mass Ave, Cambridge, MA 02139, USA.
  13. *
  14. */
  15. #ifndef __ASM_MACH_JZ4740_IRQ_H__
  16. #define __ASM_MACH_JZ4740_IRQ_H__
  17. #define MIPS_CPU_IRQ_BASE 0
  18. #define JZ4740_IRQ_BASE 8
  19. #ifdef CONFIG_MACH_JZ4740
  20. # define NR_INTC_IRQS 32
  21. #else
  22. # define NR_INTC_IRQS 64
  23. #endif
  24. /* 1st-level interrupts */
  25. #define JZ4740_IRQ(x) (JZ4740_IRQ_BASE + (x))
  26. #define JZ4740_IRQ_I2C JZ4740_IRQ(1)
  27. #define JZ4740_IRQ_UHC JZ4740_IRQ(3)
  28. #define JZ4740_IRQ_UART1 JZ4740_IRQ(8)
  29. #define JZ4740_IRQ_UART0 JZ4740_IRQ(9)
  30. #define JZ4740_IRQ_SADC JZ4740_IRQ(12)
  31. #define JZ4740_IRQ_MSC JZ4740_IRQ(14)
  32. #define JZ4740_IRQ_RTC JZ4740_IRQ(15)
  33. #define JZ4740_IRQ_SSI JZ4740_IRQ(16)
  34. #define JZ4740_IRQ_CIM JZ4740_IRQ(17)
  35. #define JZ4740_IRQ_AIC JZ4740_IRQ(18)
  36. #define JZ4740_IRQ_ETH JZ4740_IRQ(19)
  37. #define JZ4740_IRQ_DMAC JZ4740_IRQ(20)
  38. #define JZ4740_IRQ_TCU2 JZ4740_IRQ(21)
  39. #define JZ4740_IRQ_TCU1 JZ4740_IRQ(22)
  40. #define JZ4740_IRQ_TCU0 JZ4740_IRQ(23)
  41. #define JZ4740_IRQ_UDC JZ4740_IRQ(24)
  42. #define JZ4740_IRQ_GPIO3 JZ4740_IRQ(25)
  43. #define JZ4740_IRQ_GPIO2 JZ4740_IRQ(26)
  44. #define JZ4740_IRQ_GPIO1 JZ4740_IRQ(27)
  45. #define JZ4740_IRQ_GPIO0 JZ4740_IRQ(28)
  46. #define JZ4740_IRQ_IPU JZ4740_IRQ(29)
  47. #define JZ4740_IRQ_LCD JZ4740_IRQ(30)
  48. #define JZ4780_IRQ_TCU2 JZ4740_IRQ(25)
  49. /* 2nd-level interrupts */
  50. #define JZ4740_IRQ_DMA(x) (JZ4740_IRQ(NR_INTC_IRQS) + (x))
  51. #define JZ4740_IRQ_INTC_GPIO(x) (JZ4740_IRQ_GPIO0 - (x))
  52. #define JZ4740_IRQ_GPIO(x) (JZ4740_IRQ(NR_INTC_IRQS + 16) + (x))
  53. #define JZ4740_IRQ_ADC_BASE JZ4740_IRQ(NR_INTC_IRQS + 144)
  54. #define NR_IRQS (JZ4740_IRQ_ADC_BASE + 6)
  55. #endif