SyterKit 0.4.0.x
SyterKit is a bare-metal framework
Loading...
Searching...
No Matches
reg-gic.h
Go to the documentation of this file.
1/* SPDX-License-Identifier: GPL-2.0+ */
2
3#ifndef __REG_GIC_H__
4#define __REG_GIC_H__
5
6#include <reg-ncat.h>
7
8#ifdef __cplusplus
9extern "C" {
10#endif// __cplusplus
11
12#define GIC_DIST_BASE (SUNXI_GIC_BASE + 0x1000)
13#define GIC_CPUIF_BASE (SUNXI_GIC_BASE + 0x2000)
14
15#define GIC_CPU_IF_CTRL (GIC_CPUIF_BASE + 0x000) // 0x8000
16#define GIC_INT_PRIO_MASK (GIC_CPUIF_BASE + 0x004) // 0x8004
17#define GIC_BINARY_POINT (GIC_CPUIF_BASE + 0x008) // 0x8008
18#define GIC_INT_ACK_REG (GIC_CPUIF_BASE + 0x00c) // 0x800c
19#define GIC_END_INT_REG (GIC_CPUIF_BASE + 0x010) // 0x8010
20#define GIC_RUNNING_PRIO (GIC_CPUIF_BASE + 0x014) // 0x8014
21#define GIC_HIGHEST_PENDINT (GIC_CPUIF_BASE + 0x018) // 0x8018
22#define GIC_DEACT_INT_REG (GIC_CPUIF_BASE + 0x1000) // 0x1000
23#define GIC_AIAR_REG (GIC_CPUIF_BASE + 0x020) // 0x8020
24#define GIC_AEOI_REG (GIC_CPUIF_BASE + 0x024) // 0x8024
25#define GIC_AHIGHEST_PENDINT (GIC_CPUIF_BASE + 0x028)// 0x8028
26#define GIC_IRQ_MOD_CFG(_n) (GIC_DIST_BASE + 0xc00 + 4 * (_n))
27
28#define GIC_DIST_CON (GIC_DIST_BASE + 0x0000)
29#define GIC_CON_TYPE (GIC_DIST_BASE + 0x0004)
30#define GIC_CON_IIDR (GIC_DIST_BASE + 0x0008)
31
32#define GIC_CON_IGRP(n) (GIC_DIST_BASE + 0x0080 + (n) *4)
33#define GIC_SET_EN(_n) (GIC_DIST_BASE + 0x100 + 4 * (_n))
34#define GIC_CLR_EN(_n) (GIC_DIST_BASE + 0x180 + 4 * (_n))
35#define GIC_PEND_SET(_n) (GIC_DIST_BASE + 0x200 + 4 * (_n))
36#define GIC_PEND_CLR(_n) (GIC_DIST_BASE + 0x280 + 4 * (_n))
37#define GIC_ACT_SET(_n) (GIC_DIST_BASE + 0x300 + 4 * (_n))
38#define GIC_ACT_CLR(_n) (GIC_DIST_BASE + 0x380 + 4 * (_n))
39#define GIC_SGI_PRIO(_n) (GIC_DIST_BASE + 0x400 + 4 * (_n))
40#define GIC_PPI_PRIO(_n) (GIC_DIST_BASE + 0x410 + 4 * (_n))
41#define GIC_SPI_PRIO(_n) (GIC_DIST_BASE + 0x420 + 4 * (_n))
42#define GIC_SPI_PROC_TARG(_n) (GIC_DIST_BASE + 0x820 + 4 * (_n))
43
44/* software generated interrupt */
45#define GIC_SRC_SGI(_n) (_n)
46/* private peripheral interrupt */
47#define GIC_SRC_PPI(_n) (16 + (_n))
48/* external peripheral interrupt */
49#define GIC_SRC_SPI(_n) (32 + (_n))
50
51#ifdef __cplusplus
52}
53#endif// __cplusplus
54
55#endif// __REG_GIC_H__