]>
Commit | Line | Data |
---|---|---|
b2441318 | 1 | /* SPDX-License-Identifier: GPL-2.0 */ |
368dd5ac AT |
2 | #ifndef _ASM_PROC_INTCTL_REGS_H |
3 | #define _ASM_PROC_INTCTL_REGS_H | |
4 | ||
5 | #ifndef _ASM_INTCTL_REGS_H | |
6 | # error "please don't include this file directly" | |
7 | #endif | |
8 | ||
9 | /* intr acceptance group reg */ | |
10 | #define IAGR __SYSREG(0xd4000100, u16) | |
11 | ||
12 | /* group number register */ | |
13 | #define IAGR_GN 0x003fc | |
14 | ||
15 | #define __GET_XIRQ_TRIGGER(X, Z) (((Z) >> ((X) * 2)) & 3) | |
16 | ||
17 | #define __SET_XIRQ_TRIGGER(X, Y, Z) \ | |
18 | ({ \ | |
19 | typeof(Z) x = (Z); \ | |
20 | x &= ~(3 << ((X) * 2)); \ | |
21 | x |= ((Y) & 3) << ((X) * 2); \ | |
22 | (Z) = x; \ | |
23 | }) | |
24 | ||
25 | /* external pin intr spec reg */ | |
26 | #define EXTMD0 __SYSREG(0xd4000200, u32) | |
27 | #define GET_XIRQ_TRIGGER(X) __GET_XIRQ_TRIGGER(X, EXTMD0) | |
28 | #define SET_XIRQ_TRIGGER(X, Y) __SET_XIRQ_TRIGGER(X, Y, EXTMD0) | |
29 | ||
30 | #endif /* _ASM_PROC_INTCTL_REGS_H */ |