File indexing completed on 2025-05-11 08:23:43
0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021
0022
0023
0024
0025
0026
0027
0028
0029
0030
0031
0032
0033
0034
0035 #ifndef __GRLIB_H__
0036 #define __GRLIB_H__
0037
0038 #include <stdbool.h>
0039
0040 #ifdef __cplusplus
0041 extern "C" {
0042 #endif
0043
0044
0045
0046
0047
0048
0049
0050
0051
0052
0053 struct mctrl_regs {
0054 unsigned int mcfg1;
0055 unsigned int mcfg2;
0056 unsigned int mcfg3;
0057 };
0058
0059
0060 struct apbuart_regs {
0061 volatile unsigned int data;
0062 volatile unsigned int status;
0063 volatile unsigned int ctrl;
0064 volatile unsigned int scaler;
0065 };
0066
0067
0068 struct irqmp_timestamp_regs {
0069 volatile unsigned int counter;
0070 volatile unsigned int control;
0071 volatile unsigned int assertion;
0072 volatile unsigned int ack;
0073 };
0074
0075 static inline bool irqmp_has_timestamp(
0076 volatile struct irqmp_timestamp_regs *irqmp_ts
0077 )
0078 {
0079 return (irqmp_ts->control >> 27) > 0;
0080 }
0081
0082
0083 struct irqmp_regs {
0084 volatile unsigned int ilevel;
0085 volatile unsigned int ipend;
0086 volatile unsigned int iforce;
0087 volatile unsigned int iclear;
0088 volatile unsigned int mpstat;
0089 volatile unsigned int bcast;
0090 volatile unsigned int notused02;
0091 volatile unsigned int wdgctrl;
0092 volatile unsigned int ampctrl;
0093 volatile unsigned int icsel[2];
0094 volatile unsigned int notused13;
0095 volatile unsigned int notused20;
0096 volatile unsigned int notused21;
0097 volatile unsigned int notused22;
0098 volatile unsigned int notused23;
0099 volatile unsigned int mask[16];
0100 volatile unsigned int force[16];
0101
0102 volatile unsigned int intid[16];
0103 volatile struct irqmp_timestamp_regs timestamp[16];
0104 volatile unsigned int resetaddr[4];
0105 volatile unsigned int resv0[12];
0106 volatile unsigned int pboot;
0107 volatile unsigned int resv1[47];
0108 volatile unsigned int irqmap[8];
0109 volatile unsigned int resv2[824];
0110 };
0111
0112
0113 struct gptimer_timer_regs {
0114 volatile unsigned int value;
0115 volatile unsigned int reload;
0116 volatile unsigned int ctrl;
0117 volatile unsigned int notused;
0118 };
0119
0120 #define GPTIMER_TIMER_CTRL_EN 0x00000001U
0121 #define GPTIMER_TIMER_CTRL_RS 0x00000002U
0122 #define GPTIMER_TIMER_CTRL_LD 0x00000004U
0123 #define GPTIMER_TIMER_CTRL_IE 0x00000008U
0124 #define GPTIMER_TIMER_CTRL_IP 0x00000010U
0125 #define GPTIMER_TIMER_CTRL_CH 0x00000020U
0126 #define GPTIMER_TIMER_CTRL_DH 0x00000040U
0127
0128
0129 struct gptimer_regs {
0130 volatile unsigned int scaler_value;
0131 volatile unsigned int scaler_reload;
0132 volatile unsigned int cfg;
0133 volatile unsigned int notused;
0134 struct gptimer_timer_regs timer[7];
0135 };
0136
0137
0138 struct grgpio_regs {
0139 volatile unsigned int data;
0140 volatile unsigned int output;
0141 volatile unsigned int dir;
0142 volatile unsigned int imask;
0143 volatile unsigned int ipol;
0144 volatile unsigned int iedge;
0145 volatile unsigned int bypass;
0146 volatile unsigned int cap;
0147 volatile unsigned int irqmap[4];
0148 volatile unsigned int res_30;
0149 volatile unsigned int res_34;
0150 volatile unsigned int res_38;
0151 volatile unsigned int res_3C;
0152 volatile unsigned int iavail;
0153 volatile unsigned int iflag;
0154 volatile unsigned int res_48;
0155 volatile unsigned int pulse;
0156 volatile unsigned int res_50;
0157 volatile unsigned int output_or;
0158 volatile unsigned int dir_or;
0159 volatile unsigned int imask_or;
0160 volatile unsigned int res_60;
0161 volatile unsigned int output_and;
0162 volatile unsigned int dir_and;
0163 volatile unsigned int imask_and;
0164 volatile unsigned int res_70;
0165 volatile unsigned int output_xor;
0166 volatile unsigned int dir_xor;
0167 volatile unsigned int imask_xor;
0168 };
0169
0170
0171 struct l2c_regs {
0172 volatile unsigned int control;
0173 volatile unsigned int status;
0174 volatile unsigned int flush_mem_addr;
0175 volatile unsigned int flush_set_index;
0176 volatile unsigned int access_counter;
0177 volatile unsigned int hit_counter;
0178 volatile unsigned int bus_cycle_counter;
0179 volatile unsigned int bus_usage_counter;
0180 volatile unsigned int error_status_control;
0181 volatile unsigned int error_addr;
0182 volatile unsigned int tag_check_bit;
0183 volatile unsigned int data_check_bit;
0184 volatile unsigned int scrub_control_status;
0185 volatile unsigned int scrub_delay;
0186 volatile unsigned int error_injection;
0187 volatile unsigned int access_control;
0188 volatile unsigned int reserved_40[16];
0189 volatile unsigned int mtrr[32];
0190 volatile unsigned int reserved_100[131008];
0191 volatile unsigned int diag_iface_tag[16384];
0192 volatile unsigned int reserved_90000[376832];
0193 volatile unsigned int diag_iface_data[524288];
0194 };
0195
0196 #ifdef __cplusplus
0197 }
0198 #endif
0199
0200 #endif