summaryrefslogtreecommitdiffstats
path: root/include/linux/irqchip
diff options
context:
space:
mode:
authorPaul Burton <paul.burton@imgtec.com>2017-08-13 00:36:26 -0400
committerRalf Baechle <ralf@linux-mips.org>2017-09-04 07:53:14 -0400
commit0d0cf58cd6814ed63deb67fc5f4c27ad725075b1 (patch)
treec72cbfdfefa8b9e3524298b6c74bd104908b14d8 /include/linux/irqchip
parent9da3c64589e4eae68631b1b5ed31c586be6ad923 (diff)
irqchip: mips-gic: Convert remaining local reg access to new accessors
Convert the remaining accesses to registers in the GIC VP-local & VP-other register blocks to use the new accessor functions provided by asm/mips-gic.h, resulting in code which is often shorter & easier to read. Signed-off-by: Paul Burton <paul.burton@imgtec.com> Acked-by: Marc Zyngier <marc.zyngier@arm.com> Cc: Jason Cooper <jason@lakedaemon.net> Cc: Thomas Gleixner <tglx@linutronix.de> Cc: linux-mips@linux-mips.org Patchwork: https://patchwork.linux-mips.org/patch/17036/ Signed-off-by: Ralf Baechle <ralf@linux-mips.org>
Diffstat (limited to 'include/linux/irqchip')
-rw-r--r--include/linux/irqchip/mips-gic.h44
1 files changed, 0 insertions, 44 deletions
diff --git a/include/linux/irqchip/mips-gic.h b/include/linux/irqchip/mips-gic.h
index 011698962a8d..b7a3ce1da9a7 100644
--- a/include/linux/irqchip/mips-gic.h
+++ b/include/linux/irqchip/mips-gic.h
@@ -13,58 +13,14 @@
13 13
14#define GIC_MAX_INTRS 256 14#define GIC_MAX_INTRS 256
15 15
16#define MSK(n) ((1 << (n)) - 1)
17
18/* Accessors */
19#define GIC_REG(segment, offset) (segment##_##SECTION_OFS + offset##_##OFS)
20
21/* GIC Address Space */ 16/* GIC Address Space */
22#define VPE_LOCAL_SECTION_OFS 0x8000
23#define VPE_LOCAL_SECTION_SIZE 0x4000
24#define VPE_OTHER_SECTION_OFS 0xc000
25#define VPE_OTHER_SECTION_SIZE 0x4000
26#define USM_VISIBLE_SECTION_OFS 0x10000 17#define USM_VISIBLE_SECTION_OFS 0x10000
27#define USM_VISIBLE_SECTION_SIZE 0x10000 18#define USM_VISIBLE_SECTION_SIZE 0x10000
28 19
29/* Register Map for Local Section */
30#define GIC_VPE_CTL_OFS 0x0000
31#define GIC_VPE_TIMER_MAP_OFS 0x0048
32#define GIC_VPE_OTHER_ADDR_OFS 0x0080
33#define GIC_VPE_WD_CONFIG0_OFS 0x0090
34#define GIC_VPE_WD_COUNT0_OFS 0x0094
35#define GIC_VPE_WD_INITIAL0_OFS 0x0098
36
37#define GIC_VPE_EIC_SHADOW_SET_BASE_OFS 0x0100
38#define GIC_VPE_EIC_SS(intr) (4 * (intr))
39
40#define GIC_VPE_EIC_VEC_BASE_OFS 0x0800
41#define GIC_VPE_EIC_VEC(intr) (4 * (intr))
42
43#define GIC_VPE_TENABLE_NMI_OFS 0x1000
44#define GIC_VPE_TENABLE_YQ_OFS 0x1004
45#define GIC_VPE_TENABLE_INT_31_0_OFS 0x1080
46#define GIC_VPE_TENABLE_INT_63_32_OFS 0x1084
47
48/* User Mode Visible Section Register Map */ 20/* User Mode Visible Section Register Map */
49#define GIC_UMV_SH_COUNTER_31_00_OFS 0x0000 21#define GIC_UMV_SH_COUNTER_31_00_OFS 0x0000
50#define GIC_UMV_SH_COUNTER_63_32_OFS 0x0004 22#define GIC_UMV_SH_COUNTER_63_32_OFS 0x0004
51 23
52/* Masks */
53#define GIC_MAP_SHF 0
54#define GIC_MAP_MSK (MSK(6) << GIC_MAP_SHF)
55
56/* GIC_VPE_CTL Masks */
57#define GIC_VPE_CTL_FDC_RTBL_SHF 4
58#define GIC_VPE_CTL_FDC_RTBL_MSK (MSK(1) << GIC_VPE_CTL_FDC_RTBL_SHF)
59#define GIC_VPE_CTL_SWINT_RTBL_SHF 3
60#define GIC_VPE_CTL_SWINT_RTBL_MSK (MSK(1) << GIC_VPE_CTL_SWINT_RTBL_SHF)
61#define GIC_VPE_CTL_PERFCNT_RTBL_SHF 2
62#define GIC_VPE_CTL_PERFCNT_RTBL_MSK (MSK(1) << GIC_VPE_CTL_PERFCNT_RTBL_SHF)
63#define GIC_VPE_CTL_TIMER_RTBL_SHF 1
64#define GIC_VPE_CTL_TIMER_RTBL_MSK (MSK(1) << GIC_VPE_CTL_TIMER_RTBL_SHF)
65#define GIC_VPE_CTL_EIC_MODE_SHF 0
66#define GIC_VPE_CTL_EIC_MODE_MSK (MSK(1) << GIC_VPE_CTL_EIC_MODE_SHF)
67
68/* GIC nomenclature for Core Interrupt Pins. */ 24/* GIC nomenclature for Core Interrupt Pins. */
69#define GIC_CPU_INT0 0 /* Core Interrupt 2 */ 25#define GIC_CPU_INT0 0 /* Core Interrupt 2 */
70#define GIC_CPU_INT1 1 /* . */ 26#define GIC_CPU_INT1 1 /* . */