2 * arch/arm/commond/entry-macro-iomd.S
4 * Low-level IRQ helper macros for IOC/IOMD based platforms
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.
11 /* IOC / IOMD based hardware */
12 #include <asm/hardware/iomd.h>
14 .equ ioc_base_high, IOC_BASE & 0xff000000
15 .equ ioc_base_low, IOC_BASE & 0x00ff0000
17 mov r12, #ioc_base_high
19 orr r12, r12, #ioc_base_low
21 strb r12, [r12, #0x38] @ Disable FIQ register
24 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
25 mov r4, #ioc_base_high @ point at IOC
27 orr r4, r4, #ioc_base_low
29 ldrb \irqstat, [r4, #IOMD_IRQREQB] @ get high priority first
30 ldr \base, =irq_prio_h
33 ldreqb \irqstat, [r4, #IOMD_DMAREQ] @ get dma
34 addeq \base, \base, #256 @ irq_prio_h table size
38 ldreqb \irqstat, [r4, #IOMD_IRQREQA] @ get low priority
39 addeq \base, \base, #256 @ irq_prio_d table size
42 ldreqb \irqstat, [r4, #IOMD_IRQREQC]
43 addeq \base, \base, #256 @ irq_prio_l table size
47 ldreqb \irqstat, [r4, #IOMD_IRQREQD]
48 addeq \base, \base, #256 @ irq_prio_lc table size
51 2406: ldrneb \irqnr, [\base, \irqstat] @ get IRQ number
55 * Interrupt table (incorporates priority). Please note that we
56 * rely on the order of these tables (see above code).
59 irq_prio_h: .byte 0, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10
60 .byte 12, 8, 9, 8,10,10,10,10,11,11,11,11,10,10,10,10
61 .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
62 .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
63 .byte 14,14,14,14,10,10,10,10,11,11,11,11,10,10,10,10
64 .byte 14,14,14,14,10,10,10,10,11,11,11,11,10,10,10,10
65 .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
66 .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
67 .byte 15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
68 .byte 15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
69 .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
70 .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
71 .byte 15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
72 .byte 15,15,15,15,10,10,10,10,11,11,11,11,10,10,10,10
73 .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
74 .byte 13,13,13,13,10,10,10,10,11,11,11,11,10,10,10,10
76 irq_prio_d: .byte 0,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
77 .byte 20,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
78 .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
79 .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
80 .byte 22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
81 .byte 22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
82 .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
83 .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
84 .byte 23,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
85 .byte 23,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
86 .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
87 .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
88 .byte 22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
89 .byte 22,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
90 .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
91 .byte 21,16,17,16,18,16,17,16,19,16,17,16,18,16,17,16
93 irq_prio_l: .byte 0, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3
94 .byte 4, 0, 1, 0, 2, 2, 2, 2, 3, 3, 3, 3, 3, 3, 3, 3
95 .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
96 .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
97 .byte 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3
98 .byte 6, 6, 6, 6, 6, 6, 6, 6, 3, 3, 3, 3, 3, 3, 3, 3
99 .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
100 .byte 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5, 5
101 .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
102 .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
103 .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
104 .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
105 .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
106 .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
107 .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
108 .byte 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7, 7
110 irq_prio_lc: .byte 24,24,25,24,26,26,26,26,27,27,27,27,27,27,27,27
111 .byte 28,24,25,24,26,26,26,26,27,27,27,27,27,27,27,27
112 .byte 29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
113 .byte 29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
114 .byte 30,30,30,30,30,30,30,30,27,27,27,27,27,27,27,27
115 .byte 30,30,30,30,30,30,30,30,27,27,27,27,27,27,27,27
116 .byte 29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
117 .byte 29,29,29,29,29,29,29,29,29,29,29,29,29,29,29,29
118 .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
119 .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
120 .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
121 .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
122 .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
123 .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
124 .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
125 .byte 31,31,31,31,31,31,31,31,31,31,31,31,31,31,31,31
128 irq_prio_ld: .byte 40,40,41,40,42,42,42,42,43,43,43,43,43,43,43,43
129 .byte 44,40,41,40,42,42,42,42,43,43,43,43,43,43,43,43
130 .byte 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
131 .byte 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
132 .byte 46,46,46,46,46,46,46,46,43,43,43,43,43,43,43,43
133 .byte 46,46,46,46,46,46,46,46,43,43,43,43,43,43,43,43
134 .byte 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
135 .byte 45,45,45,45,45,45,45,45,45,45,45,45,45,45,45,45
136 .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
137 .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
138 .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
139 .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
140 .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
141 .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
142 .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47
143 .byte 47,47,47,47,47,47,47,47,47,47,47,47,47,47,47,47