aboutsummaryrefslogtreecommitdiffstats
path: root/include/linux/irqchip
diff options
context:
space:
mode:
Diffstat (limited to 'include/linux/irqchip')
-rw-r--r--include/linux/irqchip/arm-gic-v3.h44
-rw-r--r--include/linux/irqchip/irq-omap-intc.h2
2 files changed, 44 insertions, 2 deletions
diff --git a/include/linux/irqchip/arm-gic-v3.h b/include/linux/irqchip/arm-gic-v3.h
index 1e8b0cf30792..800544bc7bfd 100644
--- a/include/linux/irqchip/arm-gic-v3.h
+++ b/include/linux/irqchip/arm-gic-v3.h
@@ -33,6 +33,7 @@
33#define GICD_SETSPI_SR 0x0050 33#define GICD_SETSPI_SR 0x0050
34#define GICD_CLRSPI_SR 0x0058 34#define GICD_CLRSPI_SR 0x0058
35#define GICD_SEIR 0x0068 35#define GICD_SEIR 0x0068
36#define GICD_IGROUPR 0x0080
36#define GICD_ISENABLER 0x0100 37#define GICD_ISENABLER 0x0100
37#define GICD_ICENABLER 0x0180 38#define GICD_ICENABLER 0x0180
38#define GICD_ISPENDR 0x0200 39#define GICD_ISPENDR 0x0200
@@ -41,14 +42,37 @@
41#define GICD_ICACTIVER 0x0380 42#define GICD_ICACTIVER 0x0380
42#define GICD_IPRIORITYR 0x0400 43#define GICD_IPRIORITYR 0x0400
43#define GICD_ICFGR 0x0C00 44#define GICD_ICFGR 0x0C00
45#define GICD_IGRPMODR 0x0D00
46#define GICD_NSACR 0x0E00
44#define GICD_IROUTER 0x6000 47#define GICD_IROUTER 0x6000
48#define GICD_IDREGS 0xFFD0
45#define GICD_PIDR2 0xFFE8 49#define GICD_PIDR2 0xFFE8
46 50
51/*
52 * Those registers are actually from GICv2, but the spec demands that they
53 * are implemented as RES0 if ARE is 1 (which we do in KVM's emulated GICv3).
54 */
55#define GICD_ITARGETSR 0x0800
56#define GICD_SGIR 0x0F00
57#define GICD_CPENDSGIR 0x0F10
58#define GICD_SPENDSGIR 0x0F20
59
47#define GICD_CTLR_RWP (1U << 31) 60#define GICD_CTLR_RWP (1U << 31)
61#define GICD_CTLR_DS (1U << 6)
48#define GICD_CTLR_ARE_NS (1U << 4) 62#define GICD_CTLR_ARE_NS (1U << 4)
49#define GICD_CTLR_ENABLE_G1A (1U << 1) 63#define GICD_CTLR_ENABLE_G1A (1U << 1)
50#define GICD_CTLR_ENABLE_G1 (1U << 0) 64#define GICD_CTLR_ENABLE_G1 (1U << 0)
51 65
66/*
67 * In systems with a single security state (what we emulate in KVM)
68 * the meaning of the interrupt group enable bits is slightly different
69 */
70#define GICD_CTLR_ENABLE_SS_G1 (1U << 1)
71#define GICD_CTLR_ENABLE_SS_G0 (1U << 0)
72
73#define GICD_TYPER_LPIS (1U << 17)
74#define GICD_TYPER_MBIS (1U << 16)
75
52#define GICD_TYPER_ID_BITS(typer) ((((typer) >> 19) & 0x1f) + 1) 76#define GICD_TYPER_ID_BITS(typer) ((((typer) >> 19) & 0x1f) + 1)
53#define GICD_TYPER_IRQS(typer) ((((typer) & 0x1f) + 1) * 32) 77#define GICD_TYPER_IRQS(typer) ((((typer) & 0x1f) + 1) * 32)
54#define GICD_TYPER_LPIS (1U << 17) 78#define GICD_TYPER_LPIS (1U << 17)
@@ -60,6 +84,8 @@
60#define GIC_PIDR2_ARCH_GICv3 0x30 84#define GIC_PIDR2_ARCH_GICv3 0x30
61#define GIC_PIDR2_ARCH_GICv4 0x40 85#define GIC_PIDR2_ARCH_GICv4 0x40
62 86
87#define GIC_V3_DIST_SIZE 0x10000
88
63/* 89/*
64 * Re-Distributor registers, offsets from RD_base 90 * Re-Distributor registers, offsets from RD_base
65 */ 91 */
@@ -78,6 +104,7 @@
78#define GICR_SYNCR 0x00C0 104#define GICR_SYNCR 0x00C0
79#define GICR_MOVLPIR 0x0100 105#define GICR_MOVLPIR 0x0100
80#define GICR_MOVALLR 0x0110 106#define GICR_MOVALLR 0x0110
107#define GICR_IDREGS GICD_IDREGS
81#define GICR_PIDR2 GICD_PIDR2 108#define GICR_PIDR2 GICD_PIDR2
82 109
83#define GICR_CTLR_ENABLE_LPIS (1UL << 0) 110#define GICR_CTLR_ENABLE_LPIS (1UL << 0)
@@ -104,6 +131,7 @@
104/* 131/*
105 * Re-Distributor registers, offsets from SGI_base 132 * Re-Distributor registers, offsets from SGI_base
106 */ 133 */
134#define GICR_IGROUPR0 GICD_IGROUPR
107#define GICR_ISENABLER0 GICD_ISENABLER 135#define GICR_ISENABLER0 GICD_ISENABLER
108#define GICR_ICENABLER0 GICD_ICENABLER 136#define GICR_ICENABLER0 GICD_ICENABLER
109#define GICR_ISPENDR0 GICD_ISPENDR 137#define GICR_ISPENDR0 GICD_ISPENDR
@@ -112,11 +140,15 @@
112#define GICR_ICACTIVER0 GICD_ICACTIVER 140#define GICR_ICACTIVER0 GICD_ICACTIVER
113#define GICR_IPRIORITYR0 GICD_IPRIORITYR 141#define GICR_IPRIORITYR0 GICD_IPRIORITYR
114#define GICR_ICFGR0 GICD_ICFGR 142#define GICR_ICFGR0 GICD_ICFGR
143#define GICR_IGRPMODR0 GICD_IGRPMODR
144#define GICR_NSACR GICD_NSACR
115 145
116#define GICR_TYPER_PLPIS (1U << 0) 146#define GICR_TYPER_PLPIS (1U << 0)
117#define GICR_TYPER_VLPIS (1U << 1) 147#define GICR_TYPER_VLPIS (1U << 1)
118#define GICR_TYPER_LAST (1U << 4) 148#define GICR_TYPER_LAST (1U << 4)
119 149
150#define GIC_V3_REDIST_SIZE 0x20000
151
120#define LPI_PROP_GROUP1 (1 << 1) 152#define LPI_PROP_GROUP1 (1 << 1)
121#define LPI_PROP_ENABLED (1 << 0) 153#define LPI_PROP_ENABLED (1 << 0)
122 154
@@ -248,6 +280,18 @@
248#define ICC_SRE_EL2_SRE (1 << 0) 280#define ICC_SRE_EL2_SRE (1 << 0)
249#define ICC_SRE_EL2_ENABLE (1 << 3) 281#define ICC_SRE_EL2_ENABLE (1 << 3)
250 282
283#define ICC_SGI1R_TARGET_LIST_SHIFT 0
284#define ICC_SGI1R_TARGET_LIST_MASK (0xffff << ICC_SGI1R_TARGET_LIST_SHIFT)
285#define ICC_SGI1R_AFFINITY_1_SHIFT 16
286#define ICC_SGI1R_AFFINITY_1_MASK (0xff << ICC_SGI1R_AFFINITY_1_SHIFT)
287#define ICC_SGI1R_SGI_ID_SHIFT 24
288#define ICC_SGI1R_SGI_ID_MASK (0xff << ICC_SGI1R_SGI_ID_SHIFT)
289#define ICC_SGI1R_AFFINITY_2_SHIFT 32
290#define ICC_SGI1R_AFFINITY_2_MASK (0xffULL << ICC_SGI1R_AFFINITY_1_SHIFT)
291#define ICC_SGI1R_IRQ_ROUTING_MODE_BIT 40
292#define ICC_SGI1R_AFFINITY_3_SHIFT 48
293#define ICC_SGI1R_AFFINITY_3_MASK (0xffULL << ICC_SGI1R_AFFINITY_1_SHIFT)
294
251/* 295/*
252 * System register definitions 296 * System register definitions
253 */ 297 */
diff --git a/include/linux/irqchip/irq-omap-intc.h b/include/linux/irqchip/irq-omap-intc.h
index e06b370cfc0d..2e3d1afeb674 100644
--- a/include/linux/irqchip/irq-omap-intc.h
+++ b/include/linux/irqchip/irq-omap-intc.h
@@ -18,9 +18,7 @@
18#ifndef __INCLUDE_LINUX_IRQCHIP_IRQ_OMAP_INTC_H 18#ifndef __INCLUDE_LINUX_IRQCHIP_IRQ_OMAP_INTC_H
19#define __INCLUDE_LINUX_IRQCHIP_IRQ_OMAP_INTC_H 19#define __INCLUDE_LINUX_IRQCHIP_IRQ_OMAP_INTC_H
20 20
21void omap2_init_irq(void);
22void omap3_init_irq(void); 21void omap3_init_irq(void);
23void ti81xx_init_irq(void);
24 22
25int omap_irq_pending(void); 23int omap_irq_pending(void);
26void omap_intc_save_context(void); 24void omap_intc_save_context(void);