Linux Kernel  3.7.1
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Data Structures | Macros | Functions | Variables
gic.h File Reference

Go to the source code of this file.

Data Structures

struct  gic_pcpu_mask
 
struct  gic_pending_regs
 
struct  gic_intrmask_regs
 
struct  gic_intr_map
 
struct  gic_shared_intr_map
 

Macros

#define GIC_POL_POS   1
 
#define GIC_POL_NEG   0
 
#define GIC_TRIG_EDGE   1
 
#define GIC_TRIG_LEVEL   0
 
#define GIC_NUM_INTRS   (24 + NR_CPUS * 2)
 
#define MSK(n)   ((1 << (n)) - 1)
 
#define REG32(addr)   (*(volatile unsigned int *) (addr))
 
#define REG(base, offs)   REG32((unsigned long)(base) + offs##_##OFS)
 
#define REGP(base, phys)   REG32((unsigned long)(base) + (phys))
 
#define GIC_REG(segment, offset)   REG32(_gic_base + segment##_##SECTION_OFS + offset##_##OFS)
 
#define GIC_REG_ADDR(segment, offset)   REG32(_gic_base + segment##_##SECTION_OFS + offset)
 
#define GIC_ABS_REG(segment, offset)   (_gic_base + segment##_##SECTION_OFS + offset##_##OFS)
 
#define GIC_REG_ABS_ADDR(segment, offset)   (_gic_base + segment##_##SECTION_OFS + offset)
 
#define GICREAD(reg, data)   ((data) = (reg))
 
#define GICWRITE(reg, data)   ((reg) = (data))
 
#define GICBIS(reg, bits)   ((reg) |= (bits))
 
#define SHARED_SECTION_OFS   0x0000
 
#define SHARED_SECTION_SIZE   0x8000
 
#define VPE_LOCAL_SECTION_OFS   0x8000
 
#define VPE_LOCAL_SECTION_SIZE   0x4000
 
#define VPE_OTHER_SECTION_OFS   0xc000
 
#define VPE_OTHER_SECTION_SIZE   0x4000
 
#define USM_VISIBLE_SECTION_OFS   0x10000
 
#define USM_VISIBLE_SECTION_SIZE   0x10000
 
#define GIC_SH_CONFIG_OFS   0x0000
 
#define GIC_SH_COUNTER_31_00_OFS   0x0010
 
#define GIC_SH_COUNTER_63_32_OFS   0x0014
 
#define GIC_SH_REVISIONID_OFS   0x0020
 
#define GIC_SH_POL_31_0_OFS   0x0100
 
#define GIC_SH_POL_63_32_OFS   0x0104
 
#define GIC_SH_POL_95_64_OFS   0x0108
 
#define GIC_SH_POL_127_96_OFS   0x010c
 
#define GIC_SH_POL_159_128_OFS   0x0110
 
#define GIC_SH_POL_191_160_OFS   0x0114
 
#define GIC_SH_POL_223_192_OFS   0x0118
 
#define GIC_SH_POL_255_224_OFS   0x011c
 
#define GIC_SH_TRIG_31_0_OFS   0x0180
 
#define GIC_SH_TRIG_63_32_OFS   0x0184
 
#define GIC_SH_TRIG_95_64_OFS   0x0188
 
#define GIC_SH_TRIG_127_96_OFS   0x018c
 
#define GIC_SH_TRIG_159_128_OFS   0x0190
 
#define GIC_SH_TRIG_191_160_OFS   0x0194
 
#define GIC_SH_TRIG_223_192_OFS   0x0198
 
#define GIC_SH_TRIG_255_224_OFS   0x019c
 
#define GIC_SH_DUAL_31_0_OFS   0x0200
 
#define GIC_SH_DUAL_63_32_OFS   0x0204
 
#define GIC_SH_DUAL_95_64_OFS   0x0208
 
#define GIC_SH_DUAL_127_96_OFS   0x020c
 
#define GIC_SH_DUAL_159_128_OFS   0x0210
 
#define GIC_SH_DUAL_191_160_OFS   0x0214
 
#define GIC_SH_DUAL_223_192_OFS   0x0218
 
#define GIC_SH_DUAL_255_224_OFS   0x021c
 
#define GIC_SH_WEDGE_OFS   0x0280
 
#define GIC_SH_RMASK_31_0_OFS   0x0300
 
#define GIC_SH_RMASK_63_32_OFS   0x0304
 
#define GIC_SH_RMASK_95_64_OFS   0x0308
 
#define GIC_SH_RMASK_127_96_OFS   0x030c
 
#define GIC_SH_RMASK_159_128_OFS   0x0310
 
#define GIC_SH_RMASK_191_160_OFS   0x0314
 
#define GIC_SH_RMASK_223_192_OFS   0x0318
 
#define GIC_SH_RMASK_255_224_OFS   0x031c
 
#define GIC_SH_SMASK_31_0_OFS   0x0380
 
#define GIC_SH_SMASK_63_32_OFS   0x0384
 
#define GIC_SH_SMASK_95_64_OFS   0x0388
 
#define GIC_SH_SMASK_127_96_OFS   0x038c
 
#define GIC_SH_SMASK_159_128_OFS   0x0390
 
#define GIC_SH_SMASK_191_160_OFS   0x0394
 
#define GIC_SH_SMASK_223_192_OFS   0x0398
 
#define GIC_SH_SMASK_255_224_OFS   0x039c
 
#define GIC_SH_MASK_31_0_OFS   0x0400
 
#define GIC_SH_MASK_63_32_OFS   0x0404
 
#define GIC_SH_MASK_95_64_OFS   0x0408
 
#define GIC_SH_MASK_127_96_OFS   0x040c
 
#define GIC_SH_MASK_159_128_OFS   0x0410
 
#define GIC_SH_MASK_191_160_OFS   0x0414
 
#define GIC_SH_MASK_223_192_OFS   0x0418
 
#define GIC_SH_MASK_255_224_OFS   0x041c
 
#define GIC_SH_PEND_31_0_OFS   0x0480
 
#define GIC_SH_PEND_63_32_OFS   0x0484
 
#define GIC_SH_PEND_95_64_OFS   0x0488
 
#define GIC_SH_PEND_127_96_OFS   0x048c
 
#define GIC_SH_PEND_159_128_OFS   0x0490
 
#define GIC_SH_PEND_191_160_OFS   0x0494
 
#define GIC_SH_PEND_223_192_OFS   0x0498
 
#define GIC_SH_PEND_255_224_OFS   0x049c
 
#define GIC_SH_INTR_MAP_TO_PIN_BASE_OFS   0x0500
 
#define GIC_SH_MAP_TO_PIN(intr)   (GIC_SH_INTR_MAP_TO_PIN_BASE_OFS + (4 * intr))
 
#define GIC_SH_INTR_MAP_TO_VPE_BASE_OFS   0x2000
 
#define GIC_SH_MAP_TO_VPE_REG_OFF(intr, vpe)   (GIC_SH_INTR_MAP_TO_VPE_BASE_OFS + (32 * (intr)) + (((vpe) / 32) * 4))
 
#define GIC_SH_MAP_TO_VPE_REG_BIT(vpe)   (1 << ((vpe) % 32))
 
#define GIC_INTR_OFS(intr)   (((intr) / 32)*4)
 
#define GIC_INTR_BIT(intr)   ((intr) % 32)
 
#define GIC_SH_SET_POLARITY_OFS   0x0100
 
#define GIC_SET_POLARITY(intr, pol)
 
#define GIC_SH_SET_TRIGGER_OFS   0x0180
 
#define GIC_SET_TRIGGER(intr, trig)
 
#define GIC_SH_SMASK_OFS   0x0380
 
#define GIC_SET_INTR_MASK(intr)
 
#define GIC_SH_RMASK_OFS   0x0300
 
#define GIC_CLR_INTR_MASK(intr)
 
#define GIC_VPE_CTL_OFS   0x0000
 
#define GIC_VPE_PEND_OFS   0x0004
 
#define GIC_VPE_MASK_OFS   0x0008
 
#define GIC_VPE_RMASK_OFS   0x000c
 
#define GIC_VPE_SMASK_OFS   0x0010
 
#define GIC_VPE_WD_MAP_OFS   0x0040
 
#define GIC_VPE_COMPARE_MAP_OFS   0x0044
 
#define GIC_VPE_TIMER_MAP_OFS   0x0048
 
#define GIC_VPE_PERFCTR_MAP_OFS   0x0050
 
#define GIC_VPE_SWINT0_MAP_OFS   0x0054
 
#define GIC_VPE_SWINT1_MAP_OFS   0x0058
 
#define GIC_VPE_OTHER_ADDR_OFS   0x0080
 
#define GIC_VPE_WD_CONFIG0_OFS   0x0090
 
#define GIC_VPE_WD_COUNT0_OFS   0x0094
 
#define GIC_VPE_WD_INITIAL0_OFS   0x0098
 
#define GIC_VPE_COMPARE_LO_OFS   0x00a0
 
#define GIC_VPE_COMPARE_HI   0x00a4
 
#define GIC_VPE_EIC_SHADOW_SET_BASE   0x0100
 
#define GIC_VPE_EIC_SS(intr)   (GIC_VPE_EIC_SHADOW_SET_BASE + (4 * intr))
 
#define GIC_VPE_EIC_VEC_BASE   0x0800
 
#define GIC_VPE_EIC_VEC(intr)   (GIC_VPE_EIC_VEC_BASE + (4 * intr))
 
#define GIC_VPE_TENABLE_NMI_OFS   0x1000
 
#define GIC_VPE_TENABLE_YQ_OFS   0x1004
 
#define GIC_VPE_TENABLE_INT_31_0_OFS   0x1080
 
#define GIC_VPE_TENABLE_INT_63_32_OFS   0x1084
 
#define GIC_UMV_SH_COUNTER_31_00_OFS   0x0000
 
#define GIC_UMV_SH_COUNTER_63_32_OFS   0x0004
 
#define GIC_SH_CONFIG_COUNTSTOP_SHF   28
 
#define GIC_SH_CONFIG_COUNTSTOP_MSK   (MSK(1) << GIC_SH_CONFIG_COUNTSTOP_SHF)
 
#define GIC_SH_CONFIG_COUNTBITS_SHF   24
 
#define GIC_SH_CONFIG_COUNTBITS_MSK   (MSK(4) << GIC_SH_CONFIG_COUNTBITS_SHF)
 
#define GIC_SH_CONFIG_NUMINTRS_SHF   16
 
#define GIC_SH_CONFIG_NUMINTRS_MSK   (MSK(8) << GIC_SH_CONFIG_NUMINTRS_SHF)
 
#define GIC_SH_CONFIG_NUMVPES_SHF   0
 
#define GIC_SH_CONFIG_NUMVPES_MSK   (MSK(8) << GIC_SH_CONFIG_NUMVPES_SHF)
 
#define GIC_SH_WEDGE_SET(intr)   (intr | (0x1 << 31))
 
#define GIC_SH_WEDGE_CLR(intr)   (intr & ~(0x1 << 31))
 
#define GIC_MAP_TO_PIN_SHF   31
 
#define GIC_MAP_TO_PIN_MSK   (MSK(1) << GIC_MAP_TO_PIN_SHF)
 
#define GIC_MAP_TO_NMI_SHF   30
 
#define GIC_MAP_TO_NMI_MSK   (MSK(1) << GIC_MAP_TO_NMI_SHF)
 
#define GIC_MAP_TO_YQ_SHF   29
 
#define GIC_MAP_TO_YQ_MSK   (MSK(1) << GIC_MAP_TO_YQ_SHF)
 
#define GIC_MAP_SHF   0
 
#define GIC_MAP_MSK   (MSK(6) << GIC_MAP_SHF)
 
#define GIC_VPE_CTL_PERFCNT_RTBL_SHF   2
 
#define GIC_VPE_CTL_PERFCNT_RTBL_MSK   (MSK(1) << GIC_VPE_CTL_PERFCNT_RTBL_SHF)
 
#define GIC_VPE_CTL_TIMER_RTBL_SHF   1
 
#define GIC_VPE_CTL_TIMER_RTBL_MSK   (MSK(1) << GIC_VPE_CTL_TIMER_RTBL_SHF)
 
#define GIC_VPE_CTL_EIC_MODE_SHF   0
 
#define GIC_VPE_CTL_EIC_MODE_MSK   (MSK(1) << GIC_VPE_CTL_EIC_MODE_SHF)
 
#define GIC_VPE_PEND_WD_SHF   0
 
#define GIC_VPE_PEND_WD_MSK   (MSK(1) << GIC_VPE_PEND_WD_SHF)
 
#define GIC_VPE_PEND_CMP_SHF   1
 
#define GIC_VPE_PEND_CMP_MSK   (MSK(1) << GIC_VPE_PEND_CMP_SHF)
 
#define GIC_VPE_PEND_TIMER_SHF   2
 
#define GIC_VPE_PEND_TIMER_MSK   (MSK(1) << GIC_VPE_PEND_TIMER_SHF)
 
#define GIC_VPE_PEND_PERFCOUNT_SHF   3
 
#define GIC_VPE_PEND_PERFCOUNT_MSK   (MSK(1) << GIC_VPE_PEND_PERFCOUNT_SHF)
 
#define GIC_VPE_PEND_SWINT0_SHF   4
 
#define GIC_VPE_PEND_SWINT0_MSK   (MSK(1) << GIC_VPE_PEND_SWINT0_SHF)
 
#define GIC_VPE_PEND_SWINT1_SHF   5
 
#define GIC_VPE_PEND_SWINT1_MSK   (MSK(1) << GIC_VPE_PEND_SWINT1_SHF)
 
#define GIC_VPE_RMASK_WD_SHF   0
 
#define GIC_VPE_RMASK_WD_MSK   (MSK(1) << GIC_VPE_RMASK_WD_SHF)
 
#define GIC_VPE_RMASK_CMP_SHF   1
 
#define GIC_VPE_RMASK_CMP_MSK   (MSK(1) << GIC_VPE_RMASK_CMP_SHF)
 
#define GIC_VPE_RMASK_TIMER_SHF   2
 
#define GIC_VPE_RMASK_TIMER_MSK   (MSK(1) << GIC_VPE_RMASK_TIMER_SHF)
 
#define GIC_VPE_RMASK_PERFCNT_SHF   3
 
#define GIC_VPE_RMASK_PERFCNT_MSK   (MSK(1) << GIC_VPE_RMASK_PERFCNT_SHF)
 
#define GIC_VPE_RMASK_SWINT0_SHF   4
 
#define GIC_VPE_RMASK_SWINT0_MSK   (MSK(1) << GIC_VPE_RMASK_SWINT0_SHF)
 
#define GIC_VPE_RMASK_SWINT1_SHF   5
 
#define GIC_VPE_RMASK_SWINT1_MSK   (MSK(1) << GIC_VPE_RMASK_SWINT1_SHF)
 
#define GIC_VPE_SMASK_WD_SHF   0
 
#define GIC_VPE_SMASK_WD_MSK   (MSK(1) << GIC_VPE_SMASK_WD_SHF)
 
#define GIC_VPE_SMASK_CMP_SHF   1
 
#define GIC_VPE_SMASK_CMP_MSK   (MSK(1) << GIC_VPE_SMASK_CMP_SHF)
 
#define GIC_VPE_SMASK_TIMER_SHF   2
 
#define GIC_VPE_SMASK_TIMER_MSK   (MSK(1) << GIC_VPE_SMASK_TIMER_SHF)
 
#define GIC_VPE_SMASK_PERFCNT_SHF   3
 
#define GIC_VPE_SMASK_PERFCNT_MSK   (MSK(1) << GIC_VPE_SMASK_PERFCNT_SHF)
 
#define GIC_VPE_SMASK_SWINT0_SHF   4
 
#define GIC_VPE_SMASK_SWINT0_MSK   (MSK(1) << GIC_VPE_SMASK_SWINT0_SHF)
 
#define GIC_VPE_SMASK_SWINT1_SHF   5
 
#define GIC_VPE_SMASK_SWINT1_MSK   (MSK(1) << GIC_VPE_SMASK_SWINT1_SHF)
 
#define GIC_SH_MAP_TO_VPE_SMASK(intr, vpe)
 
#define GIC_UNUSED   0xdead /* Dummy data */
 
#define GIC_FLAG_IPI   0x01
 
#define GIC_FLAG_TRANSPARENT   0x02
 
#define GIC_MAX_SHARED_INTR   0x5
 
#define GIC_CPU_INT0   0 /* Core Interrupt 2 */
 
#define GIC_CPU_INT1   1 /* . */
 
#define GIC_CPU_INT2   2 /* . */
 
#define GIC_CPU_INT3   3 /* . */
 
#define GIC_CPU_INT4   4 /* . */
 
#define GIC_CPU_INT5   5 /* Core Interrupt 5 */
 
#define GIC_INT_TMR   (GIC_CPU_INT5)
 
#define GIC_INT_PERFCTR   (GIC_CPU_INT5)
 
#define GIC_CPU_TO_VEC_OFFSET   (2)
 
#define GIC_PIN_TO_VEC_OFFSET   (1)
 

Functions

void gic_init (unsigned long gic_base_addr, unsigned long gic_addrspace_size, struct gic_intr_map *intrmap, unsigned int intrmap_size, unsigned int irqbase)
 
void gic_clocksource_init (unsigned int)
 
unsigned int gic_get_int (void)
 
void gic_send_ipi (unsigned int intr)
 
unsigned int plat_ipi_call_int_xlate (unsigned int)
 
unsigned int plat_ipi_resched_int_xlate (unsigned int)
 
void gic_bind_eic_interrupt (int irq, int set)
 
unsigned int gic_get_timer_pending (void)
 
void gic_enable_interrupt (int irq_vec)
 
void gic_disable_interrupt (int irq_vec)
 
void gic_irq_ack (struct irq_data *d)
 
void gic_finish_irq (struct irq_data *d)
 
void gic_platform_init (int irqs, struct irq_chip *irq_controller)
 

Variables

unsigned long _gic_base
 
unsigned int gic_irq_base
 
unsigned int gic_irq_flags []
 
struct gic_shared_intr_map gic_shared_intr_map []
 

Macro Definition Documentation

#define GIC_ABS_REG (   segment,
  offset 
)    (_gic_base + segment##_##SECTION_OFS + offset##_##OFS)

Definition at line 35 of file gic.h.

#define GIC_CLR_INTR_MASK (   intr)
Value:

Definition at line 184 of file gic.h.

#define GIC_CPU_INT0   0 /* Core Interrupt 2 */

Definition at line 345 of file gic.h.

#define GIC_CPU_INT1   1 /* . */

Definition at line 346 of file gic.h.

#define GIC_CPU_INT2   2 /* . */

Definition at line 347 of file gic.h.

#define GIC_CPU_INT3   3 /* . */

Definition at line 348 of file gic.h.

#define GIC_CPU_INT4   4 /* . */

Definition at line 349 of file gic.h.

#define GIC_CPU_INT5   5 /* Core Interrupt 5 */

Definition at line 350 of file gic.h.

#define GIC_CPU_TO_VEC_OFFSET   (2)

Definition at line 357 of file gic.h.

#define GIC_FLAG_IPI   0x01

Definition at line 329 of file gic.h.

#define GIC_FLAG_TRANSPARENT   0x02

Definition at line 330 of file gic.h.

#define GIC_INT_PERFCTR   (GIC_CPU_INT5)

Definition at line 354 of file gic.h.

#define GIC_INT_TMR   (GIC_CPU_INT5)

Definition at line 353 of file gic.h.

#define GIC_INTR_BIT (   intr)    ((intr) % 32)

Definition at line 164 of file gic.h.

#define GIC_INTR_OFS (   intr)    (((intr) / 32)*4)

Definition at line 163 of file gic.h.

#define GIC_MAP_MSK   (MSK(6) << GIC_MAP_SHF)

Definition at line 247 of file gic.h.

#define GIC_MAP_SHF   0

Definition at line 246 of file gic.h.

#define GIC_MAP_TO_NMI_MSK   (MSK(1) << GIC_MAP_TO_NMI_SHF)

Definition at line 243 of file gic.h.

#define GIC_MAP_TO_NMI_SHF   30

Definition at line 242 of file gic.h.

#define GIC_MAP_TO_PIN_MSK   (MSK(1) << GIC_MAP_TO_PIN_SHF)

Definition at line 241 of file gic.h.

#define GIC_MAP_TO_PIN_SHF   31

Definition at line 240 of file gic.h.

#define GIC_MAP_TO_YQ_MSK   (MSK(1) << GIC_MAP_TO_YQ_SHF)

Definition at line 245 of file gic.h.

#define GIC_MAP_TO_YQ_SHF   29

Definition at line 244 of file gic.h.

#define GIC_MAX_SHARED_INTR   0x5

Definition at line 337 of file gic.h.

#define GIC_NUM_INTRS   (24 + NR_CPUS * 2)

Definition at line 22 of file gic.h.

#define GIC_PIN_TO_VEC_OFFSET   (1)

Definition at line 360 of file gic.h.

#define GIC_POL_NEG   0

Definition at line 18 of file gic.h.

#define GIC_POL_POS   1

Definition at line 17 of file gic.h.

#define GIC_REG (   segment,
  offset 
)    REG32(_gic_base + segment##_##SECTION_OFS + offset##_##OFS)

Definition at line 30 of file gic.h.

#define GIC_REG_ABS_ADDR (   segment,
  offset 
)    (_gic_base + segment##_##SECTION_OFS + offset)

Definition at line 37 of file gic.h.

#define GIC_REG_ADDR (   segment,
  offset 
)    REG32(_gic_base + segment##_##SECTION_OFS + offset)

Definition at line 32 of file gic.h.

#define GIC_SET_INTR_MASK (   intr)
Value:

Definition at line 180 of file gic.h.

#define GIC_SET_POLARITY (   intr,
  pol 
)
Value:

Definition at line 168 of file gic.h.

#define GIC_SET_TRIGGER (   intr,
  trig 
)
Value:

Definition at line 174 of file gic.h.

#define GIC_SH_CONFIG_COUNTBITS_MSK   (MSK(4) << GIC_SH_CONFIG_COUNTBITS_SHF)

Definition at line 229 of file gic.h.

#define GIC_SH_CONFIG_COUNTBITS_SHF   24

Definition at line 228 of file gic.h.

#define GIC_SH_CONFIG_COUNTSTOP_MSK   (MSK(1) << GIC_SH_CONFIG_COUNTSTOP_SHF)

Definition at line 226 of file gic.h.

#define GIC_SH_CONFIG_COUNTSTOP_SHF   28

Definition at line 225 of file gic.h.

#define GIC_SH_CONFIG_NUMINTRS_MSK   (MSK(8) << GIC_SH_CONFIG_NUMINTRS_SHF)

Definition at line 232 of file gic.h.

#define GIC_SH_CONFIG_NUMINTRS_SHF   16

Definition at line 231 of file gic.h.

#define GIC_SH_CONFIG_NUMVPES_MSK   (MSK(8) << GIC_SH_CONFIG_NUMVPES_SHF)

Definition at line 235 of file gic.h.

#define GIC_SH_CONFIG_NUMVPES_SHF   0

Definition at line 234 of file gic.h.

#define GIC_SH_CONFIG_OFS   0x0000

Definition at line 69 of file gic.h.

#define GIC_SH_COUNTER_31_00_OFS   0x0010

Definition at line 72 of file gic.h.

#define GIC_SH_COUNTER_63_32_OFS   0x0014

Definition at line 73 of file gic.h.

#define GIC_SH_DUAL_127_96_OFS   0x020c

Definition at line 100 of file gic.h.

#define GIC_SH_DUAL_159_128_OFS   0x0210

Definition at line 101 of file gic.h.

#define GIC_SH_DUAL_191_160_OFS   0x0214

Definition at line 102 of file gic.h.

#define GIC_SH_DUAL_223_192_OFS   0x0218

Definition at line 103 of file gic.h.

#define GIC_SH_DUAL_255_224_OFS   0x021c

Definition at line 104 of file gic.h.

#define GIC_SH_DUAL_31_0_OFS   0x0200

Definition at line 97 of file gic.h.

#define GIC_SH_DUAL_63_32_OFS   0x0204

Definition at line 98 of file gic.h.

#define GIC_SH_DUAL_95_64_OFS   0x0208

Definition at line 99 of file gic.h.

#define GIC_SH_INTR_MAP_TO_PIN_BASE_OFS   0x0500

Definition at line 149 of file gic.h.

#define GIC_SH_INTR_MAP_TO_VPE_BASE_OFS   0x2000

Definition at line 155 of file gic.h.

#define GIC_SH_MAP_TO_PIN (   intr)    (GIC_SH_INTR_MAP_TO_PIN_BASE_OFS + (4 * intr))

Definition at line 152 of file gic.h.

#define GIC_SH_MAP_TO_VPE_REG_BIT (   vpe)    (1 << ((vpe) % 32))

Definition at line 160 of file gic.h.

#define GIC_SH_MAP_TO_VPE_REG_OFF (   intr,
  vpe 
)    (GIC_SH_INTR_MAP_TO_VPE_BASE_OFS + (32 * (intr)) + (((vpe) / 32) * 4))

Definition at line 158 of file gic.h.

#define GIC_SH_MAP_TO_VPE_SMASK (   intr,
  vpe 
)
Value:

Definition at line 302 of file gic.h.

#define GIC_SH_MASK_127_96_OFS   0x040c

Definition at line 133 of file gic.h.

#define GIC_SH_MASK_159_128_OFS   0x0410

Definition at line 134 of file gic.h.

#define GIC_SH_MASK_191_160_OFS   0x0414

Definition at line 135 of file gic.h.

#define GIC_SH_MASK_223_192_OFS   0x0418

Definition at line 136 of file gic.h.

#define GIC_SH_MASK_255_224_OFS   0x041c

Definition at line 137 of file gic.h.

#define GIC_SH_MASK_31_0_OFS   0x0400

Definition at line 130 of file gic.h.

#define GIC_SH_MASK_63_32_OFS   0x0404

Definition at line 131 of file gic.h.

#define GIC_SH_MASK_95_64_OFS   0x0408

Definition at line 132 of file gic.h.

#define GIC_SH_PEND_127_96_OFS   0x048c

Definition at line 143 of file gic.h.

#define GIC_SH_PEND_159_128_OFS   0x0490

Definition at line 144 of file gic.h.

#define GIC_SH_PEND_191_160_OFS   0x0494

Definition at line 145 of file gic.h.

#define GIC_SH_PEND_223_192_OFS   0x0498

Definition at line 146 of file gic.h.

#define GIC_SH_PEND_255_224_OFS   0x049c

Definition at line 147 of file gic.h.

#define GIC_SH_PEND_31_0_OFS   0x0480

Definition at line 140 of file gic.h.

#define GIC_SH_PEND_63_32_OFS   0x0484

Definition at line 141 of file gic.h.

#define GIC_SH_PEND_95_64_OFS   0x0488

Definition at line 142 of file gic.h.

#define GIC_SH_POL_127_96_OFS   0x010c

Definition at line 80 of file gic.h.

#define GIC_SH_POL_159_128_OFS   0x0110

Definition at line 81 of file gic.h.

#define GIC_SH_POL_191_160_OFS   0x0114

Definition at line 82 of file gic.h.

#define GIC_SH_POL_223_192_OFS   0x0118

Definition at line 83 of file gic.h.

#define GIC_SH_POL_255_224_OFS   0x011c

Definition at line 84 of file gic.h.

#define GIC_SH_POL_31_0_OFS   0x0100

Definition at line 77 of file gic.h.

#define GIC_SH_POL_63_32_OFS   0x0104

Definition at line 78 of file gic.h.

#define GIC_SH_POL_95_64_OFS   0x0108

Definition at line 79 of file gic.h.

#define GIC_SH_REVISIONID_OFS   0x0020

Definition at line 74 of file gic.h.

#define GIC_SH_RMASK_127_96_OFS   0x030c

Definition at line 113 of file gic.h.

#define GIC_SH_RMASK_159_128_OFS   0x0310

Definition at line 114 of file gic.h.

#define GIC_SH_RMASK_191_160_OFS   0x0314

Definition at line 115 of file gic.h.

#define GIC_SH_RMASK_223_192_OFS   0x0318

Definition at line 116 of file gic.h.

#define GIC_SH_RMASK_255_224_OFS   0x031c

Definition at line 117 of file gic.h.

#define GIC_SH_RMASK_31_0_OFS   0x0300

Definition at line 110 of file gic.h.

#define GIC_SH_RMASK_63_32_OFS   0x0304

Definition at line 111 of file gic.h.

#define GIC_SH_RMASK_95_64_OFS   0x0308

Definition at line 112 of file gic.h.

#define GIC_SH_RMASK_OFS   0x0300

Definition at line 183 of file gic.h.

#define GIC_SH_SET_POLARITY_OFS   0x0100

Definition at line 167 of file gic.h.

#define GIC_SH_SET_TRIGGER_OFS   0x0180

Definition at line 173 of file gic.h.

#define GIC_SH_SMASK_127_96_OFS   0x038c

Definition at line 123 of file gic.h.

#define GIC_SH_SMASK_159_128_OFS   0x0390

Definition at line 124 of file gic.h.

#define GIC_SH_SMASK_191_160_OFS   0x0394

Definition at line 125 of file gic.h.

#define GIC_SH_SMASK_223_192_OFS   0x0398

Definition at line 126 of file gic.h.

#define GIC_SH_SMASK_255_224_OFS   0x039c

Definition at line 127 of file gic.h.

#define GIC_SH_SMASK_31_0_OFS   0x0380

Definition at line 120 of file gic.h.

#define GIC_SH_SMASK_63_32_OFS   0x0384

Definition at line 121 of file gic.h.

#define GIC_SH_SMASK_95_64_OFS   0x0388

Definition at line 122 of file gic.h.

#define GIC_SH_SMASK_OFS   0x0380

Definition at line 179 of file gic.h.

#define GIC_SH_TRIG_127_96_OFS   0x018c

Definition at line 90 of file gic.h.

#define GIC_SH_TRIG_159_128_OFS   0x0190

Definition at line 91 of file gic.h.

#define GIC_SH_TRIG_191_160_OFS   0x0194

Definition at line 92 of file gic.h.

#define GIC_SH_TRIG_223_192_OFS   0x0198

Definition at line 93 of file gic.h.

#define GIC_SH_TRIG_255_224_OFS   0x019c

Definition at line 94 of file gic.h.

#define GIC_SH_TRIG_31_0_OFS   0x0180

Definition at line 87 of file gic.h.

#define GIC_SH_TRIG_63_32_OFS   0x0184

Definition at line 88 of file gic.h.

#define GIC_SH_TRIG_95_64_OFS   0x0188

Definition at line 89 of file gic.h.

#define GIC_SH_WEDGE_CLR (   intr)    (intr & ~(0x1 << 31))

Definition at line 238 of file gic.h.

#define GIC_SH_WEDGE_OFS   0x0280

Definition at line 107 of file gic.h.

#define GIC_SH_WEDGE_SET (   intr)    (intr | (0x1 << 31))

Definition at line 237 of file gic.h.

#define GIC_TRIG_EDGE   1

Definition at line 19 of file gic.h.

#define GIC_TRIG_LEVEL   0

Definition at line 20 of file gic.h.

#define GIC_UMV_SH_COUNTER_31_00_OFS   0x0000

Definition at line 221 of file gic.h.

#define GIC_UMV_SH_COUNTER_63_32_OFS   0x0004

Definition at line 222 of file gic.h.

#define GIC_UNUSED   0xdead /* Dummy data */

Definition at line 324 of file gic.h.

#define GIC_VPE_COMPARE_HI   0x00a4

Definition at line 205 of file gic.h.

#define GIC_VPE_COMPARE_LO_OFS   0x00a0

Definition at line 204 of file gic.h.

#define GIC_VPE_COMPARE_MAP_OFS   0x0044

Definition at line 195 of file gic.h.

#define GIC_VPE_CTL_EIC_MODE_MSK   (MSK(1) << GIC_VPE_CTL_EIC_MODE_SHF)

Definition at line 255 of file gic.h.

#define GIC_VPE_CTL_EIC_MODE_SHF   0

Definition at line 254 of file gic.h.

#define GIC_VPE_CTL_OFS   0x0000

Definition at line 189 of file gic.h.

#define GIC_VPE_CTL_PERFCNT_RTBL_MSK   (MSK(1) << GIC_VPE_CTL_PERFCNT_RTBL_SHF)

Definition at line 251 of file gic.h.

#define GIC_VPE_CTL_PERFCNT_RTBL_SHF   2

Definition at line 250 of file gic.h.

#define GIC_VPE_CTL_TIMER_RTBL_MSK   (MSK(1) << GIC_VPE_CTL_TIMER_RTBL_SHF)

Definition at line 253 of file gic.h.

#define GIC_VPE_CTL_TIMER_RTBL_SHF   1

Definition at line 252 of file gic.h.

#define GIC_VPE_EIC_SHADOW_SET_BASE   0x0100

Definition at line 207 of file gic.h.

#define GIC_VPE_EIC_SS (   intr)    (GIC_VPE_EIC_SHADOW_SET_BASE + (4 * intr))

Definition at line 208 of file gic.h.

#define GIC_VPE_EIC_VEC (   intr)    (GIC_VPE_EIC_VEC_BASE + (4 * intr))

Definition at line 212 of file gic.h.

#define GIC_VPE_EIC_VEC_BASE   0x0800

Definition at line 211 of file gic.h.

#define GIC_VPE_MASK_OFS   0x0008

Definition at line 191 of file gic.h.

#define GIC_VPE_OTHER_ADDR_OFS   0x0080

Definition at line 200 of file gic.h.

#define GIC_VPE_PEND_CMP_MSK   (MSK(1) << GIC_VPE_PEND_CMP_SHF)

Definition at line 261 of file gic.h.

#define GIC_VPE_PEND_CMP_SHF   1

Definition at line 260 of file gic.h.

#define GIC_VPE_PEND_OFS   0x0004

Definition at line 190 of file gic.h.

#define GIC_VPE_PEND_PERFCOUNT_MSK   (MSK(1) << GIC_VPE_PEND_PERFCOUNT_SHF)

Definition at line 265 of file gic.h.

#define GIC_VPE_PEND_PERFCOUNT_SHF   3

Definition at line 264 of file gic.h.

#define GIC_VPE_PEND_SWINT0_MSK   (MSK(1) << GIC_VPE_PEND_SWINT0_SHF)

Definition at line 267 of file gic.h.

#define GIC_VPE_PEND_SWINT0_SHF   4

Definition at line 266 of file gic.h.

#define GIC_VPE_PEND_SWINT1_MSK   (MSK(1) << GIC_VPE_PEND_SWINT1_SHF)

Definition at line 269 of file gic.h.

#define GIC_VPE_PEND_SWINT1_SHF   5

Definition at line 268 of file gic.h.

#define GIC_VPE_PEND_TIMER_MSK   (MSK(1) << GIC_VPE_PEND_TIMER_SHF)

Definition at line 263 of file gic.h.

#define GIC_VPE_PEND_TIMER_SHF   2

Definition at line 262 of file gic.h.

#define GIC_VPE_PEND_WD_MSK   (MSK(1) << GIC_VPE_PEND_WD_SHF)

Definition at line 259 of file gic.h.

#define GIC_VPE_PEND_WD_SHF   0

Definition at line 258 of file gic.h.

#define GIC_VPE_PERFCTR_MAP_OFS   0x0050

Definition at line 197 of file gic.h.

#define GIC_VPE_RMASK_CMP_MSK   (MSK(1) << GIC_VPE_RMASK_CMP_SHF)

Definition at line 275 of file gic.h.

#define GIC_VPE_RMASK_CMP_SHF   1

Definition at line 274 of file gic.h.

#define GIC_VPE_RMASK_OFS   0x000c

Definition at line 192 of file gic.h.

#define GIC_VPE_RMASK_PERFCNT_MSK   (MSK(1) << GIC_VPE_RMASK_PERFCNT_SHF)

Definition at line 279 of file gic.h.

#define GIC_VPE_RMASK_PERFCNT_SHF   3

Definition at line 278 of file gic.h.

#define GIC_VPE_RMASK_SWINT0_MSK   (MSK(1) << GIC_VPE_RMASK_SWINT0_SHF)

Definition at line 281 of file gic.h.

#define GIC_VPE_RMASK_SWINT0_SHF   4

Definition at line 280 of file gic.h.

#define GIC_VPE_RMASK_SWINT1_MSK   (MSK(1) << GIC_VPE_RMASK_SWINT1_SHF)

Definition at line 283 of file gic.h.

#define GIC_VPE_RMASK_SWINT1_SHF   5

Definition at line 282 of file gic.h.

#define GIC_VPE_RMASK_TIMER_MSK   (MSK(1) << GIC_VPE_RMASK_TIMER_SHF)

Definition at line 277 of file gic.h.

#define GIC_VPE_RMASK_TIMER_SHF   2

Definition at line 276 of file gic.h.

#define GIC_VPE_RMASK_WD_MSK   (MSK(1) << GIC_VPE_RMASK_WD_SHF)

Definition at line 273 of file gic.h.

#define GIC_VPE_RMASK_WD_SHF   0

Definition at line 272 of file gic.h.

#define GIC_VPE_SMASK_CMP_MSK   (MSK(1) << GIC_VPE_SMASK_CMP_SHF)

Definition at line 289 of file gic.h.

#define GIC_VPE_SMASK_CMP_SHF   1

Definition at line 288 of file gic.h.

#define GIC_VPE_SMASK_OFS   0x0010

Definition at line 193 of file gic.h.

#define GIC_VPE_SMASK_PERFCNT_MSK   (MSK(1) << GIC_VPE_SMASK_PERFCNT_SHF)

Definition at line 293 of file gic.h.

#define GIC_VPE_SMASK_PERFCNT_SHF   3

Definition at line 292 of file gic.h.

#define GIC_VPE_SMASK_SWINT0_MSK   (MSK(1) << GIC_VPE_SMASK_SWINT0_SHF)

Definition at line 295 of file gic.h.

#define GIC_VPE_SMASK_SWINT0_SHF   4

Definition at line 294 of file gic.h.

#define GIC_VPE_SMASK_SWINT1_MSK   (MSK(1) << GIC_VPE_SMASK_SWINT1_SHF)

Definition at line 297 of file gic.h.

#define GIC_VPE_SMASK_SWINT1_SHF   5

Definition at line 296 of file gic.h.

#define GIC_VPE_SMASK_TIMER_MSK   (MSK(1) << GIC_VPE_SMASK_TIMER_SHF)

Definition at line 291 of file gic.h.

#define GIC_VPE_SMASK_TIMER_SHF   2

Definition at line 290 of file gic.h.

#define GIC_VPE_SMASK_WD_MSK   (MSK(1) << GIC_VPE_SMASK_WD_SHF)

Definition at line 287 of file gic.h.

#define GIC_VPE_SMASK_WD_SHF   0

Definition at line 286 of file gic.h.

#define GIC_VPE_SWINT0_MAP_OFS   0x0054

Definition at line 198 of file gic.h.

#define GIC_VPE_SWINT1_MAP_OFS   0x0058

Definition at line 199 of file gic.h.

#define GIC_VPE_TENABLE_INT_31_0_OFS   0x1080

Definition at line 217 of file gic.h.

#define GIC_VPE_TENABLE_INT_63_32_OFS   0x1084

Definition at line 218 of file gic.h.

#define GIC_VPE_TENABLE_NMI_OFS   0x1000

Definition at line 215 of file gic.h.

#define GIC_VPE_TENABLE_YQ_OFS   0x1004

Definition at line 216 of file gic.h.

#define GIC_VPE_TIMER_MAP_OFS   0x0048

Definition at line 196 of file gic.h.

#define GIC_VPE_WD_CONFIG0_OFS   0x0090

Definition at line 201 of file gic.h.

#define GIC_VPE_WD_COUNT0_OFS   0x0094

Definition at line 202 of file gic.h.

#define GIC_VPE_WD_INITIAL0_OFS   0x0098

Definition at line 203 of file gic.h.

#define GIC_VPE_WD_MAP_OFS   0x0040

Definition at line 194 of file gic.h.

#define GICBIS (   reg,
  bits 
)    ((reg) |= (bits))

Definition at line 53 of file gic.h.

#define GICREAD (   reg,
  data 
)    ((data) = (reg))

Definition at line 51 of file gic.h.

#define GICWRITE (   reg,
  data 
)    ((reg) = (data))

Definition at line 52 of file gic.h.

#define MSK (   n)    ((1 << (n)) - 1)

Definition at line 24 of file gic.h.

#define REG (   base,
  offs 
)    REG32((unsigned long)(base) + offs##_##OFS)

Definition at line 26 of file gic.h.

#define REG32 (   addr)    (*(volatile unsigned int *) (addr))

Definition at line 25 of file gic.h.

#define REGP (   base,
  phys 
)    REG32((unsigned long)(base) + (phys))

Definition at line 27 of file gic.h.

#define SHARED_SECTION_OFS   0x0000

Definition at line 58 of file gic.h.

#define SHARED_SECTION_SIZE   0x8000

Definition at line 59 of file gic.h.

#define USM_VISIBLE_SECTION_OFS   0x10000

Definition at line 64 of file gic.h.

#define USM_VISIBLE_SECTION_SIZE   0x10000

Definition at line 65 of file gic.h.

#define VPE_LOCAL_SECTION_OFS   0x8000

Definition at line 60 of file gic.h.

#define VPE_LOCAL_SECTION_SIZE   0x4000

Definition at line 61 of file gic.h.

#define VPE_OTHER_SECTION_OFS   0xc000

Definition at line 62 of file gic.h.

#define VPE_OTHER_SECTION_SIZE   0x4000

Definition at line 63 of file gic.h.

Function Documentation

void gic_bind_eic_interrupt ( int  irq,
int  set 
)

Definition at line 42 of file irq-gic.c.

void gic_clocksource_init ( unsigned  int)
void gic_disable_interrupt ( int  irq_vec)

Definition at line 759 of file malta-int.c.

void gic_enable_interrupt ( int  irq_vec)

Definition at line 754 of file malta-int.c.

void gic_finish_irq ( struct irq_data d)

Definition at line 774 of file malta-int.c.

unsigned int gic_get_int ( void  )

Definition at line 119 of file irq-gic.c.

unsigned int gic_get_timer_pending ( void  )

Definition at line 33 of file irq-gic.c.

void gic_init ( unsigned long  gic_base_addr,
unsigned long  gic_addrspace_size,
struct gic_intr_map intrmap,
unsigned int  intrmap_size,
unsigned int  irqbase 
)

Definition at line 296 of file irq-gic.c.

void gic_irq_ack ( struct irq_data d)

Definition at line 764 of file malta-int.c.

void gic_platform_init ( int  irqs,
struct irq_chip irq_controller 
)

Definition at line 780 of file malta-int.c.

void gic_send_ipi ( unsigned int  intr)

Definition at line 51 of file irq-gic.c.

unsigned int plat_ipi_call_int_xlate ( unsigned  int)

Definition at line 345 of file malta-int.c.

unsigned int plat_ipi_resched_int_xlate ( unsigned  int)

Definition at line 350 of file malta-int.c.

Variable Documentation

unsigned long _gic_base

Definition at line 22 of file irq-gic.c.

unsigned int gic_irq_base

Definition at line 23 of file irq-gic.c.

unsigned int gic_irq_flags[]

Definition at line 24 of file irq-gic.c.

Definition at line 27 of file irq-gic.c.