aboutsummaryrefslogtreecommitdiffstats
path: root/arch/arm/mach-shmobile
diff options
context:
space:
mode:
authorMagnus Damm <damm@opensource.se>2011-10-17 05:00:35 -0400
committerPaul Mundt <lethal@linux-sh.org>2011-11-04 12:03:55 -0400
commit91c088ae17c62f7741d9563e36935bc7a69a7e9e (patch)
treefb293b1e6dafaf0c0ba07d9faf7f3d9f05445029 /arch/arm/mach-shmobile
parent3087b905c4050afeb1847fb0fcf89b3e09f6ffee (diff)
ARM: mach-shmobile: Add support for PINT though INTC macros
Add a INTC_PINT() macro with various helper bits to allow SoCs like sh73a0 to suppor the PINT hardware using regular INTC tables. Signed-off-by: Magnus Damm <damm@opensource.se> Signed-off-by: Paul Mundt <lethal@linux-sh.org>
Diffstat (limited to 'arch/arm/mach-shmobile')
-rw-r--r--arch/arm/mach-shmobile/include/mach/intc.h51
1 files changed, 51 insertions, 0 deletions
diff --git a/arch/arm/mach-shmobile/include/mach/intc.h b/arch/arm/mach-shmobile/include/mach/intc.h
index 1cd8b36678ee..8b22258c8caa 100644
--- a/arch/arm/mach-shmobile/include/mach/intc.h
+++ b/arch/arm/mach-shmobile/include/mach/intc.h
@@ -192,4 +192,55 @@ static struct intc_desc p ## _desc __initdata = { \
192 p ## _sense_registers, p ## _ack_registers) \ 192 p ## _sense_registers, p ## _ack_registers) \
193} 193}
194 194
195#define INTC_PINT_E_EMPTY
196#define INTC_PINT_E_NONE 0, 0, 0, 0, 0, 0, 0, 0,
197#define INTC_PINT_E(p) \
198 PINT ## p ## 0, PINT ## p ## 1, PINT ## p ## 2, PINT ## p ## 3, \
199 PINT ## p ## 4, PINT ## p ## 5, PINT ## p ## 6, PINT ## p ## 7,
200
201#define INTC_PINT_V_NONE
202#define INTC_PINT_V(p, vect) \
203 vect(PINT ## p ## 0, 0), vect(PINT ## p ## 1, 1), \
204 vect(PINT ## p ## 2, 2), vect(PINT ## p ## 3, 3), \
205 vect(PINT ## p ## 4, 4), vect(PINT ## p ## 5, 5), \
206 vect(PINT ## p ## 6, 6), vect(PINT ## p ## 7, 7),
207
208#define INTC_PINT(p, mask_reg, sense_base, str, \
209 enums_1, enums_2, enums_3, enums_4, \
210 vect_1, vect_2, vect_3, vect_4, \
211 mask_a, mask_b, mask_c, mask_d, \
212 sense_a, sense_b, sense_c, sense_d) \
213 \
214enum { \
215 PINT ## p ## _UNUSED = 0, \
216 enums_1 enums_2 enums_3 enums_4 \
217}; \
218 \
219static struct intc_vect p ## _vectors[] __initdata = { \
220 vect_1 vect_2 vect_3 vect_4 \
221}; \
222 \
223static struct intc_mask_reg p ## _mask_registers[] __initdata = { \
224 { mask_reg, 0, 32, /* PINTER */ \
225 { mask_a mask_b mask_c mask_d } } \
226}; \
227 \
228static struct intc_sense_reg p ## _sense_registers[] __initdata = { \
229 { sense_base + 0x00, 16, 2, /* PINTCR */ \
230 { sense_a } }, \
231 { sense_base + 0x04, 16, 2, /* PINTCR */ \
232 { sense_b } }, \
233 { sense_base + 0x08, 16, 2, /* PINTCR */ \
234 { sense_c } }, \
235 { sense_base + 0x0c, 16, 2, /* PINTCR */ \
236 { sense_d } }, \
237}; \
238 \
239static struct intc_desc p ## _desc __initdata = { \
240 .name = str, \
241 .hw = INTC_HW_DESC(p ## _vectors, NULL, \
242 p ## _mask_registers, NULL, \
243 p ## _sense_registers, NULL), \
244}
245
195#endif /* __ASM_MACH_INTC_H */ 246#endif /* __ASM_MACH_INTC_H */