aboutsummaryrefslogtreecommitdiffstats
path: root/include/asm-arm/hardware/entry-macro-iomd.S
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
committerLinus Torvalds <torvalds@ppc970.osdl.org>2005-04-16 18:20:36 -0400
commit1da177e4c3f41524e886b7f1b8a0c1fc7321cac2 (patch)
tree0bba044c4ce775e45a88a51686b5d9f90697ea9d /include/asm-arm/hardware/entry-macro-iomd.S
Linux-2.6.12-rc2v2.6.12-rc2
Initial git repository build. I'm not bothering with the full history, even though we have it. We can create a separate "historical" git archive of that later if we want to, and in the meantime it's about 3.2GB when imported into git - space that would just make the early git days unnecessarily complicated, when we don't have a lot of good infrastructure for it. Let it rip!
Diffstat (limited to 'include/asm-arm/hardware/entry-macro-iomd.S')
-rw-r--r--include/asm-arm/hardware/entry-macro-iomd.S145
1 files changed, 145 insertions, 0 deletions
diff --git a/include/asm-arm/hardware/entry-macro-iomd.S b/include/asm-arm/hardware/entry-macro-iomd.S
new file mode 100644
index 000000000000..30c7b92c2416
--- /dev/null
+++ b/include/asm-arm/hardware/entry-macro-iomd.S
@@ -0,0 +1,145 @@
1/*
2 * arch/arm/commond/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
11/* IOC / IOMD based hardware */
12#include <asm/hardware/iomd.h>
13
14 .equ ioc_base_high, IOC_BASE & 0xff000000
15 .equ ioc_base_low, IOC_BASE & 0x00ff0000
16 .macro disable_fiq
17 mov r12, #ioc_base_high
18 .if ioc_base_low
19 orr r12, r12, #ioc_base_low
20 .endif
21 strb r12, [r12, #0x38] @ Disable FIQ register
22 .endm
23
24 .macro get_irqnr_and_base, irqnr, irqstat, base, tmp
25 mov r4, #ioc_base_high @ point at IOC
26 .if ioc_base_low
27 orr r4, r4, #ioc_base_low
28 .endif
29 ldrb \irqstat, [r4, #IOMD_IRQREQB] @ get high priority first
30 ldr \base, =irq_prio_h
31 teq \irqstat, #0
32#ifdef IOMD_BASE
33 ldreqb \irqstat, [r4, #IOMD_DMAREQ] @ get dma
34 addeq \base, \base, #256 @ irq_prio_h table size
35 teqeq \irqstat, #0
36 bne 2406f
37#endif
38 ldreqb \irqstat, [r4, #IOMD_IRQREQA] @ get low priority
39 addeq \base, \base, #256 @ irq_prio_d table size
40 teqeq \irqstat, #0
41#ifdef IOMD_IRQREQC
42 ldreqb \irqstat, [r4, #IOMD_IRQREQC]
43 addeq \base, \base, #256 @ irq_prio_l table size
44 teqeq \irqstat, #0
45#endif
46#ifdef IOMD_IRQREQD
47 ldreqb \irqstat, [r4, #IOMD_IRQREQD]
48 addeq \base, \base, #256 @ irq_prio_lc table size
49 teqeq \irqstat, #0
50#endif
512406: ldrneb \irqnr, [\base, \irqstat] @ get IRQ number
52 .endm
53
54/*
55 * Interrupt table (incorporates priority). Please note that we
56 * rely on the order of these tables (see above code).
57 */
58 .align 5
59irq_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
75#ifdef IOMD_BASE
76irq_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
92#endif
93irq_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
109#ifdef IOMD_IRQREQC
110irq_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
126#endif
127#ifdef IOMD_IRQREQD
128irq_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
144#endif
145