entry-macro-iomd.S 5.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132
  1. /*
  2. * arch/arm/include/asm/hardware/entry-macro-iomd.S
  3. *
  4. * Low-level IRQ helper macros for IOC/IOMD based platforms
  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. */
  10. /* IOC / IOMD based hardware */
  11. #include <asm/hardware/iomd.h>
  12. .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
  13. ldrb \irqstat, [\base, #IOMD_IRQREQB] @ get high priority first
  14. ldr \tmp, =irq_prio_h
  15. teq \irqstat, #0
  16. #ifdef IOMD_BASE
  17. ldreqb \irqstat, [\base, #IOMD_DMAREQ] @ get dma
  18. addeq \tmp, \tmp, #256 @ irq_prio_h table size
  19. teqeq \irqstat, #0
  20. bne 2406f
  21. #endif
  22. ldreqb \irqstat, [\base, #IOMD_IRQREQA] @ get low priority
  23. addeq \tmp, \tmp, #256 @ irq_prio_d table size
  24. teqeq \irqstat, #0
  25. #ifdef IOMD_IRQREQC
  26. ldreqb \irqstat, [\base, #IOMD_IRQREQC]
  27. addeq \tmp, \tmp, #256 @ irq_prio_l table size
  28. teqeq \irqstat, #0
  29. #endif
  30. #ifdef IOMD_IRQREQD
  31. ldreqb \irqstat, [\base, #IOMD_IRQREQD]
  32. addeq \tmp, \tmp, #256 @ irq_prio_lc table size
  33. teqeq \irqstat, #0
  34. #endif
  35. 2406: ldrneb \irqnr, [\tmp, \irqstat] @ get IRQ number
  36. .endm
  37. /*
  38. * Interrupt table (incorporates priority). Please note that we
  39. * rely on the order of these tables (see above code).
  40. */
  41. .align 5
  42. irq_prio_h: .byte 0, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10
  43. .byte 12, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10
  44. .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
  45. .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
  46. .byte 14,14,14,14,10,10,10,10,11,11,11,11,10,10,10,10
  47. .byte 14,14,14,14,10,10,10,10,11,11,11,11,10,10,10,10
  48. .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
  49. .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
  50. .byte 15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
  51. .byte 15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
  52. .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
  53. .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
  54. .byte 15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
  55. .byte 15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
  56. .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
  57. .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
  58. #ifdef IOMD_BASE
  59. irq_prio_d: .byte 0,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
  60. .byte 20,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
  61. .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
  62. .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
  63. .byte 22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
  64. .byte 22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
  65. .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
  66. .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
  67. .byte 23,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
  68. .byte 23,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
  69. .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
  70. .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
  71. .byte 22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
  72. .byte 22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
  73. .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
  74. .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
  75. #endif
  76. irq_prio_l: .byte 0, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3
  77. .byte 4, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3
  78. .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
  79. .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
  80. .byte 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3
  81. .byte 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3
  82. .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
  83. .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
  84. .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
  85. .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
  86. .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
  87. .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
  88. .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
  89. .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
  90. .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
  91. .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
  92. #ifdef IOMD_IRQREQC
  93. irq_prio_lc: .byte 24,24,25,24,26,26,26,26,27,27,27,27,27,27,27,27
  94. .byte 28,24,25,24,26,26,26,26,27,27,27,27,27,27,27,27
  95. .byte 29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
  96. .byte 29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
  97. .byte 30,30,30,30,30,30,30,30,27,27,27,27,27,27,27,27
  98. .byte 30,30,30,30,30,30,30,30,27,27,27,27,27,27,27,27
  99. .byte 29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
  100. .byte 29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
  101. .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
  102. .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
  103. .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
  104. .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
  105. .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
  106. .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
  107. .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
  108. .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
  109. #endif
  110. #ifdef IOMD_IRQREQD
  111. irq_prio_ld: .byte 40,40,41,40,42,42,42,42,43,43,43,43,43,43,43,43
  112. .byte 44,40,41,40,42,42,42,42,43,43,43,43,43,43,43,43
  113. .byte 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
  114. .byte 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
  115. .byte 46,46,46,46,46,46,46,46,43,43,43,43,43,43,43,43
  116. .byte 46,46,46,46,46,46,46,46,43,43,43,43,43,43,43,43
  117. .byte 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
  118. .byte 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
  119. .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
  120. .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
  121. .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
  122. .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
  123. .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
  124. .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
  125. .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
  126. .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
  127. #endif