View | Details | Raw Unified | Return to bug 29116
Collapse All | Expand All

(-)crystalhd~/bc_dts_defs.h (-214 / +281 lines)
Lines 26-37 Link Here
26
#ifndef _BC_DTS_DEFS_H_
26
#ifndef _BC_DTS_DEFS_H_
27
#define _BC_DTS_DEFS_H_
27
#define _BC_DTS_DEFS_H_
28
28
29
#include <linux/types.h>
30
31
/* BIT Mask */
29
/* BIT Mask */
32
#define BC_BIT(_x)		(1 << (_x))
30
#define BC_BIT(_x)		(1 << (_x))
33
31
34
enum BC_STATUS {
32
typedef enum _BC_STATUS {
35
	BC_STS_SUCCESS		= 0,
33
	BC_STS_SUCCESS		= 0,
36
	BC_STS_INV_ARG		= 1,
34
	BC_STS_INV_ARG		= 1,
37
	BC_STS_BUSY		= 2,
35
	BC_STS_BUSY		= 2,
Lines 58-73 enum BC_STATUS { Link Here
58
	BC_STS_CERT_VERIFY_ERROR = 23,
56
	BC_STS_CERT_VERIFY_ERROR = 23,
59
	BC_STS_DEC_EXIST_OPEN	= 24,
57
	BC_STS_DEC_EXIST_OPEN	= 24,
60
	BC_STS_PENDING		= 25,
58
	BC_STS_PENDING		= 25,
61
	BC_STS_CLK_NOCHG	= 26,
59
	BC_STS_PWR_MGMT		= 26,
62
60
63
	/* Must be the last one.*/
61
	/* Must be the last one.*/
64
	BC_STS_ERROR		= -1
62
	BC_STS_ERROR		= -1
65
};
63
} BC_STATUS;
64
65
typedef enum _BC_HW_STATE {
66
	BC_HW_RUNNING	= 0,
67
	BC_HW_SUSPEND	= 1,
68
	BC_HW_RESUME	= 2
69
} BC_HW_STATE;
66
70
67
/*------------------------------------------------------*
71
/*------------------------------------------------------*
68
 *    Registry Key Definitions				*
72
 *    Registry Key Definitions				*
69
 *------------------------------------------------------*/
73
 *------------------------------------------------------*/
70
#define BC_REG_KEY_MAIN_PATH	"Software\\Broadcom\\MediaPC\\70010"
74
#define BC_REG_KEY_MAIN_PATH	"Software\\Broadcom\\MediaPC\\CrystalHD"
71
#define BC_REG_KEY_FWPATH		"FirmwareFilePath"
75
#define BC_REG_KEY_FWPATH		"FirmwareFilePath"
72
#define BC_REG_KEY_SEC_OPT		"DbgOptions"
76
#define BC_REG_KEY_SEC_OPT		"DbgOptions"
73
77
Lines 81-97 enum BC_STATUS { Link Here
81
 *
85
 *
82
 */
86
 */
83
87
84
enum BC_SW_OPTIONS {
88
typedef enum _BC_SW_OPTIONS {
85
	BC_OPT_DOSER_OUT_ENCRYPT	= BC_BIT(3),
89
	BC_OPT_DOSER_OUT_ENCRYPT	= BC_BIT(3),
86
	BC_OPT_LINK_OUT_ENCRYPT		= BC_BIT(29),
90
	BC_OPT_LINK_OUT_ENCRYPT		= BC_BIT(29),
87
};
91
} BC_SW_OPTIONS;
88
92
89
struct BC_REG_CONFIG {
93
typedef struct _BC_REG_CONFIG{
90
	uint32_t		DbgOptions;
94
	uint32_t		DbgOptions;
91
};
95
} BC_REG_CONFIG;
92
96
93
#if defined(__KERNEL__) || defined(__LINUX_USER__)
97
/*#if defined(__KERNEL__) || defined(__LINUX_USER__) */
94
#else
98
#if defined(_WIN32) || defined(_WIN64)
95
/* Align data structures */
99
/* Align data structures */
96
#define ALIGN(x)	__declspec(align(x))
100
#define ALIGN(x)	__declspec(align(x))
97
#endif
101
#endif
Lines 108-114 struct BC_REG_CONFIG { Link Here
108
 */
112
 */
109
113
110
/* To allow multiple apps to open the device. */
114
/* To allow multiple apps to open the device. */
111
enum DtsDeviceOpenMode {
115
enum _DtsDeviceOpenMode {
112
	DTS_PLAYBACK_MODE = 0,
116
	DTS_PLAYBACK_MODE = 0,
113
	DTS_DIAG_MODE,
117
	DTS_DIAG_MODE,
114
	DTS_MONITOR_MODE,
118
	DTS_MONITOR_MODE,
Lines 116-122 enum DtsDeviceOpenMode { Link Here
116
};
120
};
117
121
118
/* To enable the filter to selectively enable/disable fixes or erratas */
122
/* To enable the filter to selectively enable/disable fixes or erratas */
119
enum DtsDeviceFixMode {
123
enum _DtsDeviceFixMode {
120
	DTS_LOAD_NEW_FW		= BC_BIT(8),
124
	DTS_LOAD_NEW_FW		= BC_BIT(8),
121
	DTS_LOAD_FILE_PLAY_FW	= BC_BIT(9),
125
	DTS_LOAD_FILE_PLAY_FW	= BC_BIT(9),
122
	DTS_DISK_FMT_BD		= BC_BIT(10),
126
	DTS_DISK_FMT_BD		= BC_BIT(10),
Lines 125-131 enum DtsDeviceFixMode { Link Here
125
	DTS_ADAPTIVE_OUTPUT_PER	= BC_BIT(17),
129
	DTS_ADAPTIVE_OUTPUT_PER	= BC_BIT(17),
126
	DTS_INTELLIMAP		= BC_BIT(18),
130
	DTS_INTELLIMAP		= BC_BIT(18),
127
	/* b[19]-b[21] : select clock frequency */
131
	/* b[19]-b[21] : select clock frequency */
128
	DTS_PLAYBACK_DROP_RPT_MODE = BC_BIT(22)
132
	DTS_PLAYBACK_DROP_RPT_MODE = BC_BIT(22),
133
	DTS_DIAG_TEST_MODE = BC_BIT(23),
134
	DTS_SINGLE_THREADED_MODE = BC_BIT(24),
135
	DTS_FILTER_MODE = BC_BIT(25),
136
	DTS_MFT_MODE = BC_BIT(26)
129
};
137
};
130
138
131
#define DTS_DFLT_RESOLUTION(x)	(x<<11)
139
#define DTS_DFLT_RESOLUTION(x)	(x<<11)
Lines 133-139 enum DtsDeviceFixMode { Link Here
133
#define DTS_DFLT_CLOCK(x) (x<<19)
141
#define DTS_DFLT_CLOCK(x) (x<<19)
134
142
135
/* F/W File Version corresponding to S/W Releases */
143
/* F/W File Version corresponding to S/W Releases */
136
enum FW_FILE_VER {
144
enum _FW_FILE_VER {
137
	/* S/W release: 02.04.02	F/W release 2.12.2.0 */
145
	/* S/W release: 02.04.02	F/W release 2.12.2.0 */
138
	BC_FW_VER_020402 = ((12<<16) | (2<<8) | (0))
146
	BC_FW_VER_020402 = ((12<<16) | (2<<8) | (0))
139
};
147
};
Lines 141-147 enum FW_FILE_VER { Link Here
141
/*------------------------------------------------------*
149
/*------------------------------------------------------*
142
 *    Stream Types for DtsOpenDecoder()			*
150
 *    Stream Types for DtsOpenDecoder()			*
143
 *------------------------------------------------------*/
151
 *------------------------------------------------------*/
144
enum DtsOpenDecStreamTypes {
152
enum _DtsOpenDecStreamTypes {
145
	BC_STREAM_TYPE_ES		= 0,
153
	BC_STREAM_TYPE_ES		= 0,
146
	BC_STREAM_TYPE_PES		= 1,
154
	BC_STREAM_TYPE_PES		= 1,
147
	BC_STREAM_TYPE_TS		= 2,
155
	BC_STREAM_TYPE_TS		= 2,
Lines 151-160 enum DtsOpenDecStreamTypes { Link Here
151
/*------------------------------------------------------*
159
/*------------------------------------------------------*
152
 *    Video Algorithms for DtsSetVideoParams()		*
160
 *    Video Algorithms for DtsSetVideoParams()		*
153
 *------------------------------------------------------*/
161
 *------------------------------------------------------*/
154
enum DtsSetVideoParamsAlgo {
162
enum _DtsSetVideoParamsAlgo {
155
	BC_VID_ALGO_H264		= 0,
163
	BC_VID_ALGO_H264		= 0,
156
	BC_VID_ALGO_MPEG2		= 1,
164
	BC_VID_ALGO_MPEG2		= 1,
157
	BC_VID_ALGO_VC1			= 4,
165
	BC_VID_ALGO_VC1			= 4,
166
	BC_VID_ALGO_DIVX		= 6,
158
	BC_VID_ALGO_VC1MP		= 7,
167
	BC_VID_ALGO_VC1MP		= 7,
159
};
168
};
160
169
Lines 163-169 enum DtsSetVideoParamsAlgo { Link Here
163
 *------------------------------------------------------*/
172
 *------------------------------------------------------*/
164
#define BC_MPEG_VALID_PANSCAN		(1)
173
#define BC_MPEG_VALID_PANSCAN		(1)
165
174
166
struct BC_PIB_EXT_MPEG {
175
typedef struct _BC_PIB_EXT_MPEG {
167
	uint32_t	valid;
176
	uint32_t	valid;
168
	/* Always valid,  defaults to picture size if no
177
	/* Always valid,  defaults to picture size if no
169
	 * sequence display extension in the stream. */
178
	 * sequence display extension in the stream. */
Lines 175-181 struct BC_PIB_EXT_MPEG { Link Here
175
	uint32_t	offset_count;
184
	uint32_t	offset_count;
176
	int32_t		horizontal_offset[3];
185
	int32_t		horizontal_offset[3];
177
	int32_t		vertical_offset[3];
186
	int32_t		vertical_offset[3];
178
};
187
188
} BC_PIB_EXT_MPEG;
179
189
180
/*------------------------------------------------------*
190
/*------------------------------------------------------*
181
 *    H.264 Extension to the PPB			*
191
 *    H.264 Extension to the PPB			*
Lines 185-191 struct BC_PIB_EXT_MPEG { Link Here
185
#define H264_VALID_SPS_CROP		(2)
195
#define H264_VALID_SPS_CROP		(2)
186
#define H264_VALID_VUI			(4)
196
#define H264_VALID_VUI			(4)
187
197
188
struct BC_PIB_EXT_H264 {
198
typedef struct _BC_PIB_EXT_H264 {
189
	/* 'valid' specifies which fields (or sets of
199
	/* 'valid' specifies which fields (or sets of
190
	 * fields) below are valid.  If the corresponding
200
	 * fields) below are valid.  If the corresponding
191
	 * bit in 'valid' is NOT set then that field(s)
201
	 * bit in 'valid' is NOT set then that field(s)
Lines 208-221 struct BC_PIB_EXT_H264 { Link Here
208
	/* H264_VALID_VUI */
218
	/* H264_VALID_VUI */
209
	uint32_t	chroma_top;
219
	uint32_t	chroma_top;
210
	uint32_t	chroma_bottom;
220
	uint32_t	chroma_bottom;
211
};
221
222
} BC_PIB_EXT_H264;
212
223
213
/*------------------------------------------------------*
224
/*------------------------------------------------------*
214
 *    VC1 Extension to the PPB				*
225
 *    VC1 Extension to the PPB				*
215
 *------------------------------------------------------*/
226
 *------------------------------------------------------*/
216
#define VC1_VALID_PANSCAN		(1)
227
#define VC1_VALID_PANSCAN		(1)
217
228
218
struct BC_PIB_EXT_VC1 {
229
typedef struct _BC_PIB_EXT_VC1 {
219
	uint32_t	valid;
230
	uint32_t	valid;
220
231
221
	/* Always valid, defaults to picture size if no
232
	/* Always valid, defaults to picture size if no
Lines 229-240 struct BC_PIB_EXT_VC1 { Link Here
229
	int32_t		ps_vert_offset[4];
240
	int32_t		ps_vert_offset[4];
230
	int32_t		ps_width[4];
241
	int32_t		ps_width[4];
231
	int32_t		ps_height[4];
242
	int32_t		ps_height[4];
232
};
243
244
} BC_PIB_EXT_VC1;
245
233
246
234
/*------------------------------------------------------*
247
/*------------------------------------------------------*
235
 *    Picture Information Block				*
248
 *    Picture Information Block				*
236
 *------------------------------------------------------*/
249
 *------------------------------------------------------*/
237
#if defined(__LINUX_USER__)
250
#if !defined(__KERNEL__)
238
/* Values for 'pulldown' field.  '0' means no pulldown information
251
/* Values for 'pulldown' field.  '0' means no pulldown information
239
 * was present for this picture. */
252
 * was present for this picture. */
240
enum {
253
enum {
Lines 262-267 enum { Link Here
262
	vdecFrameRate50,
275
	vdecFrameRate50,
263
	vdecFrameRate59_94,
276
	vdecFrameRate59_94,
264
	vdecFrameRate60,
277
	vdecFrameRate60,
278
	vdecFrameRate14_985,
279
	vdecFrameRate7_496,
265
};
280
};
266
281
267
/* Values for the 'aspect_ratio' field. */
282
/* Values for the 'aspect_ratio' field. */
Lines 298-376 enum { Link Here
298
	vdecColourPrimariesSMPTE240M,
313
	vdecColourPrimariesSMPTE240M,
299
	vdecColourPrimariesGenericFilm,
314
	vdecColourPrimariesGenericFilm,
300
};
315
};
301
/**
316
302
 * @vdecRESOLUTION_CUSTOM: custom
303
 * @vdecRESOLUTION_480i: 480i
304
 * @vdecRESOLUTION_1080i: 1080i (1920x1080, 60i)
305
 * @vdecRESOLUTION_NTSC: NTSC (720x483, 60i)
306
 * @vdecRESOLUTION_480p: 480p (720x480, 60p)
307
 * @vdecRESOLUTION_720p: 720p (1280x720, 60p)
308
 * @vdecRESOLUTION_PAL1: PAL_1 (720x576, 50i)
309
 * @vdecRESOLUTION_1080i25: 1080i25 (1920x1080, 50i)
310
 * @vdecRESOLUTION_720p50: 720p50 (1280x720, 50p)
311
 * @vdecRESOLUTION_576p: 576p (720x576, 50p)
312
 * @vdecRESOLUTION_1080i29_97: 1080i (1920x1080, 59.94i)
313
 * @vdecRESOLUTION_720p59_94: 720p (1280x720, 59.94p)
314
 * @vdecRESOLUTION_SD_DVD: SD DVD (720x483, 60i)
315
 * @vdecRESOLUTION_480p656: 480p (720x480, 60p),
316
 *	output bus width 8 bit, clock 74.25MHz
317
 * @vdecRESOLUTION_1080p23_976: 1080p23_976 (1920x1080, 23.976p)
318
 * @vdecRESOLUTION_720p23_976: 720p23_976 (1280x720p, 23.976p)
319
 * @vdecRESOLUTION_240p29_97: 240p (1440x240, 29.97p )
320
 * @vdecRESOLUTION_240p30: 240p (1440x240, 30p)
321
 * @vdecRESOLUTION_288p25: 288p (1440x288p, 25p)
322
 * @vdecRESOLUTION_1080p29_97: 1080p29_97 (1920x1080, 29.97p)
323
 * @vdecRESOLUTION_1080p30: 1080p30 (1920x1080, 30p)
324
 * @vdecRESOLUTION_1080p24: 1080p24 (1920x1080, 24p)
325
 * @vdecRESOLUTION_1080p25: 1080p25 (1920x1080, 25p)
326
 * @vdecRESOLUTION_720p24: 720p24 (1280x720, 25p)
327
 * @vdecRESOLUTION_720p29_97: 720p29.97 (1280x720, 29.97p)
328
 * @vdecRESOLUTION_480p23_976: 480p23.976 (720*480, 23.976)
329
 * @vdecRESOLUTION_480p29_97: 480p29.976 (720*480, 29.97p)
330
 * @vdecRESOLUTION_576p25: 576p25 (720*576, 25p)
331
 * @vdecRESOLUTION_480p0: 480p (720x480, 0p)
332
 * @vdecRESOLUTION_480i0: 480i (720x480, 0i)
333
 * @vdecRESOLUTION_576p0: 576p (720x576, 0p)
334
 * @vdecRESOLUTION_720p0: 720p (1280x720, 0p)
335
 * @vdecRESOLUTION_1080p0: 1080p (1920x1080, 0p)
336
 * @vdecRESOLUTION_1080i0: 1080i (1920x1080, 0i)
337
 */
338
enum {
317
enum {
339
	vdecRESOLUTION_CUSTOM	= 0x00000000,
318
	vdecRESOLUTION_CUSTOM	= 0x00000000, /* custom */
340
	vdecRESOLUTION_480i	= 0x00000001,
319
	vdecRESOLUTION_480i	= 0x00000001, /* 480i */
341
	vdecRESOLUTION_1080i	= 0x00000002,
320
	vdecRESOLUTION_1080i	= 0x00000002, /* 1080i (1920x1080, 60i) */
342
	vdecRESOLUTION_NTSC	= 0x00000003,
321
	vdecRESOLUTION_NTSC	= 0x00000003, /* NTSC (720x483, 60i) */
343
	vdecRESOLUTION_480p	= 0x00000004,
322
	vdecRESOLUTION_480p	= 0x00000004, /* 480p (720x480, 60p) */
344
	vdecRESOLUTION_720p	= 0x00000005,
323
	vdecRESOLUTION_720p	= 0x00000005, /* 720p (1280x720, 60p) */
345
	vdecRESOLUTION_PAL1	= 0x00000006,
324
	vdecRESOLUTION_PAL1	= 0x00000006, /* PAL_1 (720x576, 50i) */
346
	vdecRESOLUTION_1080i25	= 0x00000007,
325
	vdecRESOLUTION_1080i25	= 0x00000007, /* 1080i25 (1920x1080, 50i) */
347
	vdecRESOLUTION_720p50	= 0x00000008,
326
	vdecRESOLUTION_720p50	= 0x00000008, /* 720p50 (1280x720, 50p) */
348
	vdecRESOLUTION_576p	= 0x00000009,
327
	vdecRESOLUTION_576p	= 0x00000009, /* 576p (720x576, 50p) */
349
	vdecRESOLUTION_1080i29_97 = 0x0000000A,
328
	vdecRESOLUTION_1080i29_97 = 0x0000000A, /* 1080i (1920x1080, 59.94i) */
350
	vdecRESOLUTION_720p59_94  = 0x0000000B,
329
	vdecRESOLUTION_720p59_94  = 0x0000000B, /* 720p (1280x720, 59.94p) */
351
	vdecRESOLUTION_SD_DVD	= 0x0000000C,
330
	vdecRESOLUTION_SD_DVD	= 0x0000000C, /* SD DVD (720x483, 60i) */
352
	vdecRESOLUTION_480p656	= 0x0000000D,
331
	vdecRESOLUTION_480p656	= 0x0000000D, /* 480p (720x480, 60p), output bus width 8 bit, clock 74.25MHz */
353
	vdecRESOLUTION_1080p23_976 = 0x0000000E,
332
	vdecRESOLUTION_1080p23_976 = 0x0000000E, /* 1080p23_976 (1920x1080, 23.976p) */
354
	vdecRESOLUTION_720p23_976  = 0x0000000F,
333
	vdecRESOLUTION_720p23_976  = 0x0000000F, /* 720p23_976 (1280x720p, 23.976p) */
355
	vdecRESOLUTION_240p29_97   = 0x00000010,
334
	vdecRESOLUTION_240p29_97   = 0x00000010, /* 240p (1440x240, 29.97p ) */
356
	vdecRESOLUTION_240p30	= 0x00000011,
335
	vdecRESOLUTION_240p30	= 0x00000011, /* 240p (1440x240, 30p) */
357
	vdecRESOLUTION_288p25	= 0x00000012,
336
	vdecRESOLUTION_288p25	= 0x00000012, /* 288p (1440x288p, 25p) */
358
	vdecRESOLUTION_1080p29_97 = 0x00000013,
337
	vdecRESOLUTION_1080p29_97 = 0x00000013, /* 1080p29_97 (1920x1080, 29.97p) */
359
	vdecRESOLUTION_1080p30	= 0x00000014,
338
	vdecRESOLUTION_1080p30	= 0x00000014, /* 1080p30 (1920x1080, 30p) */
360
	vdecRESOLUTION_1080p24	= 0x00000015,
339
	vdecRESOLUTION_1080p24	= 0x00000015, /* 1080p24 (1920x1080, 24p) */
361
	vdecRESOLUTION_1080p25	= 0x00000016,
340
	vdecRESOLUTION_1080p25	= 0x00000016, /* 1080p25 (1920x1080, 25p) */
362
	vdecRESOLUTION_720p24	= 0x00000017,
341
	vdecRESOLUTION_720p24	= 0x00000017, /* 720p24 (1280x720, 25p) */
363
	vdecRESOLUTION_720p29_97  = 0x00000018,
342
	vdecRESOLUTION_720p29_97  = 0x00000018, /* 720p29.97 (1280x720, 29.97p) */
364
	vdecRESOLUTION_480p23_976 = 0x00000019,
343
	vdecRESOLUTION_480p23_976 = 0x00000019, /* 480p23.976 (720*480, 23.976) */
365
	vdecRESOLUTION_480p29_97  = 0x0000001A,
344
	vdecRESOLUTION_480p29_97  = 0x0000001A, /* 480p29.976 (720*480, 29.97p) */
366
	vdecRESOLUTION_576p25	= 0x0000001B,
345
	vdecRESOLUTION_576p25	= 0x0000001B, /* 576p25 (720*576, 25p) */
367
	/* For Zero Frame Rate */
346
	/* For Zero Frame Rate */
368
	vdecRESOLUTION_480p0	= 0x0000001C,
347
	vdecRESOLUTION_480p0	= 0x0000001C, /* 480p (720x480, 0p) */
369
	vdecRESOLUTION_480i0	= 0x0000001D,
348
	vdecRESOLUTION_480i0	= 0x0000001D, /* 480i (720x480, 0i) */
370
	vdecRESOLUTION_576p0	= 0x0000001E,
349
	vdecRESOLUTION_576p0	= 0x0000001E, /* 576p (720x576, 0p) */
371
	vdecRESOLUTION_720p0	= 0x0000001F,
350
	vdecRESOLUTION_720p0	= 0x0000001F, /* 720p (1280x720, 0p) */
372
	vdecRESOLUTION_1080p0	= 0x00000020,
351
	vdecRESOLUTION_1080p0	= 0x00000020, /* 1080p (1920x1080, 0p) */
373
	vdecRESOLUTION_1080i0	= 0x00000021,
352
	vdecRESOLUTION_1080i0	= 0x00000021, /* 1080i (1920x1080, 0i) */
374
};
353
};
375
354
376
/* Bit definitions for 'flags' field */
355
/* Bit definitions for 'flags' field */
Lines 390-419 enum { Link Here
390
369
391
#define VDEC_FLAG_PICTURE_META_DATA_PRESENT	(0x40000)
370
#define VDEC_FLAG_PICTURE_META_DATA_PRESENT	(0x40000)
392
371
393
#endif /* __LINUX_USER__ */
372
#endif /* __KERNEL__ */
394
373
395
enum _BC_OUTPUT_FORMAT {
374
typedef struct _BC_PIC_INFO_BLOCK {
396
	MODE420				= 0x0,
397
	MODE422_YUY2			= 0x1,
398
	MODE422_UYVY			= 0x2,
399
};
400
/**
401
 * struct BC_PIC_INFO_BLOCK
402
 * @timeStam;: Timestamp
403
 * @picture_number: Ordinal display number
404
 * @width:  pixels
405
 * @height:  pixels
406
 * @chroma_format:  0x420, 0x422 or 0x444
407
 * @n_drop;:  number of non-reference frames
408
 *	remaining to be dropped
409
 */
410
struct BC_PIC_INFO_BLOCK {
411
	/* Common fields. */
375
	/* Common fields. */
412
	uint64_t	timeStamp;
376
	uint64_t	timeStamp;	/* Timestamp */
413
	uint32_t	picture_number;
377
	uint32_t	picture_number;	/* Ordinal display number  */
414
	uint32_t	width;
378
	uint32_t	width;		/* pixels	    */
415
	uint32_t	height;
379
	uint32_t	height;		/* pixels	    */
416
	uint32_t	chroma_format;
380
	uint32_t	chroma_format;	/* 0x420, 0x422 or 0x444 */
417
	uint32_t	pulldown;
381
	uint32_t	pulldown;
418
	uint32_t	flags;
382
	uint32_t	flags;
419
	uint32_t	frame_rate;
383
	uint32_t	frame_rate;
Lines 423-508 struct BC_PIC_INFO_BLOCK { Link Here
423
	uint32_t	sess_num;
387
	uint32_t	sess_num;
424
	uint32_t	ycom;
388
	uint32_t	ycom;
425
	uint32_t	custom_aspect_ratio_width_height;
389
	uint32_t	custom_aspect_ratio_width_height;
426
	uint32_t	n_drop;	/* number of non-reference frames
390
	uint32_t	n_drop;	/* number of non-reference frames remaining to be dropped */
427
					remaining to be dropped */
428
391
429
	/* Protocol-specific extensions. */
392
	/* Protocol-specific extensions. */
430
	union {
393
	union {
431
		struct BC_PIB_EXT_H264	h264;
394
		BC_PIB_EXT_H264	h264;
432
		struct BC_PIB_EXT_MPEG	mpeg;
395
		BC_PIB_EXT_MPEG	mpeg;
433
		struct BC_PIB_EXT_VC1	 vc1;
396
		BC_PIB_EXT_VC1	 vc1;
434
	} other;
397
	} other;
435
398
436
};
399
} BC_PIC_INFO_BLOCK, *PBC_PIC_INFO_BLOCK;
437
400
438
/*------------------------------------------------------*
401
/*------------------------------------------------------*
439
 *    ProcOut Info					*
402
 *    ProcOut Info					*
440
 *------------------------------------------------------*/
403
 *------------------------------------------------------*/
441
404
/* Optional flags for ProcOut Interface.*/
442
/**
405
enum _POUT_OPTIONAL_IN_FLAGS_{
443
 * enum POUT_OPTIONAL_IN_FLAGS - Optional flags for ProcOut Interface.
444
 * @BC_POUT_FLAGS_YV12:  Copy Data in YV12 format
445
 * @BC_POUT_FLAGS_STRIDE:  Stride size is valid.
446
 * @BC_POUT_FLAGS_SIZE:  Take size information from Application
447
 * @BC_POUT_FLAGS_INTERLACED:  copy only half the bytes
448
 * @BC_POUT_FLAGS_INTERLEAVED:  interleaved frame
449
 * @:  * @BC_POUT_FLAGS_FMT_CHANGE:  Data is not VALID when this flag is set
450
 * @BC_POUT_FLAGS_PIB_VALID:  PIB Information valid
451
 * @BC_POUT_FLAGS_ENCRYPTED:  Data is encrypted.
452
 * @BC_POUT_FLAGS_FLD_BOT:  Bottom Field data
453
 */
454
enum POUT_OPTIONAL_IN_FLAGS_ {
455
	/* Flags from App to Device */
406
	/* Flags from App to Device */
456
	BC_POUT_FLAGS_YV12	  = 0x01,
407
	BC_POUT_FLAGS_YV12	  = 0x01,	/* Copy Data in YV12 format */
457
	BC_POUT_FLAGS_STRIDE	  = 0x02,
408
	BC_POUT_FLAGS_STRIDE	  = 0x02,	/* Stride size is valid. */
458
	BC_POUT_FLAGS_SIZE	  = 0x04,
409
	BC_POUT_FLAGS_SIZE	  = 0x04,	/* Take size information from Application */
459
	BC_POUT_FLAGS_INTERLACED  = 0x08,
410
	BC_POUT_FLAGS_INTERLACED  = 0x08,	/* copy only half the bytes */
460
	BC_POUT_FLAGS_INTERLEAVED = 0x10,
411
	BC_POUT_FLAGS_INTERLEAVED = 0x10,	/* interleaved frame */
412
	BC_POUT_FLAGS_STRIDE_UV	  = 0x20,	/* Stride size is valid (for UV buffers). */
413
	BC_POUT_FLAGS_MODE	  = 0x40,	/* Take output mode from Application, overrides YV12 flag if on */
461
414
462
	/* Flags from Device to APP */
415
	/* Flags from Device to APP */
463
	BC_POUT_FLAGS_FMT_CHANGE  = 0x10000,
416
	BC_POUT_FLAGS_FMT_CHANGE  = 0x10000,	/* Data is not VALID when this flag is set */
464
	BC_POUT_FLAGS_PIB_VALID	  = 0x20000,
417
	BC_POUT_FLAGS_PIB_VALID	  = 0x20000,	/* PIB Information valid */
465
	BC_POUT_FLAGS_ENCRYPTED	  = 0x40000,
418
	BC_POUT_FLAGS_ENCRYPTED	  = 0x40000,	/* Data is encrypted. */
466
	BC_POUT_FLAGS_FLD_BOT	  = 0x80000,
419
	BC_POUT_FLAGS_FLD_BOT	  = 0x80000,	/* Bottom Field data */
420
};
421
422
/*Decoder Capability */
423
enum DECODER_CAP_FLAGS
424
{
425
	BC_DEC_FLAGS_H264		= 0x01,
426
	BC_DEC_FLAGS_MPEG2		= 0x02,
427
	BC_DEC_FLAGS_VC1		= 0x04,
428
	BC_DEC_FLAGS_M4P2		= 0x08,	/*MPEG-4 Part 2: Divx, Xvid etc. */
467
};
429
};
468
430
469
typedef enum BC_STATUS(*dts_pout_callback)(void  *shnd, uint32_t width,
431
#if defined(__KERNEL__) || defined(__LINUX_USER__) || defined(__LINUX__)
470
			uint32_t height, uint32_t stride, void *pOut);
432
typedef BC_STATUS(*dts_pout_callback)(void  *shnd, uint32_t width, uint32_t height, uint32_t stride, void *pOut);
433
#else
434
typedef BC_STATUS(*dts_pout_callback)(void  *shnd, uint32_t width, uint32_t height, uint32_t stride, struct _BC_DTS_PROC_OUT *pOut);
435
#endif
471
436
472
/* Line 21 Closed Caption */
437
/* Line 21 Closed Caption */
473
/* User Data */
438
/* User Data */
474
#define MAX_UD_SIZE		1792	/* 1920 - 128 */
439
#define MAX_UD_SIZE		1792	/* 1920 - 128 */
475
440
476
/**
441
typedef struct _BC_DTS_PROC_OUT {
477
 * struct BC_DTS_PROC_OUT
442
	uint8_t		*Ybuff;			/* Caller Supplied buffer for Y data */
478
 * @Ybuff: Caller Supplied buffer for Y data
443
	uint32_t	YbuffSz;		/* Caller Supplied Y buffer size */
479
 * @YbuffSz: Caller Supplied Y buffer size
444
	uint32_t	YBuffDoneSz;		/* Transferred Y datasize */
480
 * @YBuffDoneSz: Transferred Y datasize
481
 * @*UVbuff: Caller Supplied buffer for UV data
482
 * @UVbuffSz: Caller Supplied UV buffer size
483
 * @UVBuffDoneSz: Transferred UV data size
484
 * @StrideSz: Caller supplied Stride Size
485
 * @PoutFlags: Call IN Flags
486
 * @discCnt: Picture discontinuity count
487
 * @PicInfo: Picture Information Block Data
488
 * @b422Mode: Picture output Mode
489
 * @bPibEnc: PIB encrypted
490
 */
491
struct BC_DTS_PROC_OUT {
492
	uint8_t		*Ybuff;
493
	uint32_t	YbuffSz;
494
	uint32_t	YBuffDoneSz;
495
445
496
	uint8_t		*UVbuff;
446
	uint8_t		*UVbuff;		/* Caller Supplied buffer for UV data */
497
	uint32_t	UVbuffSz;
447
	uint32_t	UVbuffSz;		/* Caller Supplied UV buffer size */
498
	uint32_t	UVBuffDoneSz;
448
	uint32_t	UVBuffDoneSz;		/* Transferred UV data size */
499
449
500
	uint32_t	StrideSz;
450
	uint32_t	StrideSz;		/* Caller supplied Stride Size */
501
	uint32_t	PoutFlags;
451
	uint32_t	PoutFlags;		/* Call IN Flags */
502
452
503
	uint32_t	discCnt;
453
	uint32_t	discCnt;		/* Picture discontinuity count */
504
454
505
	struct BC_PIC_INFO_BLOCK PicInfo;
455
	BC_PIC_INFO_BLOCK PicInfo;		/* Picture Information Block Data */
506
456
507
	/* Line 21 Closed Caption */
457
	/* Line 21 Closed Caption */
508
	/* User Data */
458
	/* User Data */
Lines 512-559 struct BC_DTS_PROC_OUT { Link Here
512
	void		*hnd;
462
	void		*hnd;
513
	dts_pout_callback AppCallBack;
463
	dts_pout_callback AppCallBack;
514
	uint8_t		DropFrames;
464
	uint8_t		DropFrames;
515
	uint8_t		b422Mode;
465
	uint8_t		b422Mode;		/* Picture output Mode */
516
	uint8_t		bPibEnc;
466
	uint8_t		bPibEnc;		/* PIB encrypted */
517
	uint8_t		bRevertScramble;
467
	uint8_t		bRevertScramble;
468
	uint32_t	StrideSzUV;		/* Caller supplied Stride Size */
518
469
519
};
470
} BC_DTS_PROC_OUT;
520
/**
471
521
 * struct BC_DTS_STATUS
472
typedef struct _BC_DTS_STATUS {
522
 * @ReadyListCount: Number of frames in ready list (reported by driver)
473
	uint8_t		ReadyListCount;	/* Number of frames in ready list (reported by driver) */
523
 * @PowerStateChange: Number of active state power
474
	uint8_t		FreeListCount;	/* Number of frame buffers free.  (reported by driver) */
524
 *	transitions (reported by driver)
475
	uint8_t		PowerStateChange; /* Number of active state power transitions (reported by driver) */
525
 * @FramesDropped:  Number of frames dropped.  (reported by DIL)
526
 * @FramesCaptured: Number of frames captured. (reported by DIL)
527
 * @FramesRepeated: Number of frames repeated. (reported by DIL)
528
 * @InputCount:	Times compressed video has been sent to the HW.
529
 *	i.e. Successful DtsProcInput() calls (reported by DIL)
530
 * @InputTotalSize: Amount of compressed video that has been sent to the HW.
531
 *	(reported by DIL)
532
 * @InputBusyCount: Times compressed video has attempted to be sent to the HW
533
 *	but the input FIFO was full. (reported by DIL)
534
 * @PIBMissCount: Amount of times a PIB is invalid. (reported by DIL)
535
 * @cpbEmptySize: supported only for H.264, specifically changed for
536
 *	Adobe. Report size of CPB buffer available. (reported by DIL)
537
 * @NextTimeStamp: TimeStamp of the next picture that will be returned
538
 *	by a call to ProcOutput. Added for Adobe. Reported
539
 *	back from the driver
540
 */
541
struct BC_DTS_STATUS {
542
	uint8_t		ReadyListCount;
543
	uint8_t		FreeListCount;
544
	uint8_t		PowerStateChange;
545
	uint8_t		reserved_[1];
476
	uint8_t		reserved_[1];
546
	uint32_t	FramesDropped;
477
547
	uint32_t	FramesCaptured;
478
	uint32_t	FramesDropped;	/* Number of frames dropped.  (reported by DIL) */
548
	uint32_t	FramesRepeated;
479
	uint32_t	FramesCaptured;	/* Number of frames captured. (reported by DIL) */
549
	uint32_t	InputCount;
480
	uint32_t	FramesRepeated;	/* Number of frames repeated. (reported by DIL) */
550
	uint64_t	InputTotalSize;
481
551
	uint32_t	InputBusyCount;
482
	uint32_t	InputCount;	/* Times compressed video has been sent to the HW.
552
	uint32_t	PIBMissCount;
483
					 * i.e. Successful DtsProcInput() calls (reported by DIL) */
553
	uint32_t	cpbEmptySize;
484
	uint64_t	InputTotalSize;	/* Amount of compressed video that has been sent to the HW.
554
	uint64_t	NextTimeStamp;
485
					 * (reported by DIL) */
555
	uint8_t		reserved__[16];
486
	uint32_t	InputBusyCount;	/* Times compressed video has attempted to be sent to the HW
556
};
487
					 * but the input FIFO was full. (reported by DIL) */
488
489
	uint32_t	PIBMissCount;	/* Amount of times a PIB is invalid. (reported by DIL) */
490
491
	uint32_t	cpbEmptySize;	/* supported only for H.264, specifically changed for
492
					 * SingleThreadedAppMode. Report size of CPB buffer available.
493
					 * Reported by DIL */
494
	uint64_t	NextTimeStamp;	/* TimeStamp of the next picture that will be returned
495
					 * by a call to ProcOutput. Added for SingleThreadedAppMode.
496
					 * Reported back from the driver */
497
	uint8_t		TxBufData;
498
499
	uint8_t		reserved__[3];
500
501
	uint32_t	picNumFlags; /* Picture number and flags of the next picture to be delivered from the driver */
502
503
	uint8_t		reserved___[8];
504
505
} BC_DTS_STATUS;
557
506
558
#define BC_SWAP32(_v)			\
507
#define BC_SWAP32(_v)			\
559
	((((_v) & 0xFF000000)>>24)|	\
508
	((((_v) & 0xFF000000)>>24)|	\
Lines 568-572 struct BC_DTS_STATUS { Link Here
568
#define WM_AGENT_TRAYICON_DECODER_RUN	10005
517
#define WM_AGENT_TRAYICON_DECODER_RUN	10005
569
#define WM_AGENT_TRAYICON_DECODER_PAUSE	10006
518
#define WM_AGENT_TRAYICON_DECODER_PAUSE	10006
570
519
520
#define MAX_COLOR_SPACES	3
521
522
typedef enum _BC_OUTPUT_FORMAT {
523
	MODE420			= 0x0,
524
	MODE422_YUY2		= 0x1,
525
	MODE422_UYVY		= 0x2,
526
	OUTPUT_MODE420		= 0x0,
527
	OUTPUT_MODE422_YUY2	= 0x1,
528
	OUTPUT_MODE422_UYVY	= 0x2,
529
	OUTPUT_MODE420_NV12	= 0x0,
530
	OUTPUT_MODE_INVALID	= 0xFF,
531
} BC_OUTPUT_FORMAT;
532
533
typedef struct _BC_COLOR_SPACES_ {
534
	BC_OUTPUT_FORMAT	OutFmt[MAX_COLOR_SPACES];
535
	uint16_t		Count;
536
} BC_COLOR_SPACES;
537
538
539
typedef enum _BC_CAPS_FLAGS_ {
540
	PES_CONV_SUPPORT	= 1,	/*Support PES Conversion*/
541
	MULTIPLE_DECODE_SUPPORT	= 2	/*Support multiple stream decode*/
542
} BC_CAPS_FLAGS;
543
544
typedef struct _BC_HW_CAPABILITY_ {
545
	BC_CAPS_FLAGS		flags;
546
	BC_COLOR_SPACES		ColorCaps;
547
	void*			Reserved1;	/* Expansion Of API */
548
549
	/*Decoder Capability */
550
	uint32_t		DecCaps;	/*DECODER_CAP_FLAGS */
551
} BC_HW_CAPS, *PBC_HW_CAPS;
552
553
typedef struct _BC_SCALING_PARAMS_ {
554
	uint32_t	sWidth;
555
	uint32_t	sHeight;
556
	uint32_t	DNR;
557
	uint32_t	Reserved1;	/*Expansion Of API*/
558
	uint8_t		*Reserved2;	/*Expansion OF API*/
559
	uint32_t	Reserved3;	/*Expansion Of API*/
560
	uint8_t		*Reserved4;	/*Expansion Of API*/
561
562
} BC_SCALING_PARAMS, *PBC_SCALING_PARAMS;
563
564
typedef enum _BC_MEDIA_SUBTYPE_ {
565
	BC_MSUBTYPE_INVALID = 0,
566
	BC_MSUBTYPE_MPEG1VIDEO,
567
	BC_MSUBTYPE_MPEG2VIDEO,
568
	BC_MSUBTYPE_H264,
569
	BC_MSUBTYPE_WVC1,
570
	BC_MSUBTYPE_WMV3,
571
	BC_MSUBTYPE_AVC1,
572
	BC_MSUBTYPE_WMVA,
573
	BC_MSUBTYPE_VC1,
574
	BC_MSUBTYPE_DIVX,
575
	BC_MSUBTYPE_DIVX311,
576
	BC_MSUBTYPE_OTHERS	/*Types to facilitate PES conversion*/
577
} BC_MEDIA_SUBTYPE;
578
579
typedef struct _BC_INPUT_FORMAT_ {
580
	int         FGTEnable;      /*Enable processing of FGT SEI*/
581
	int         MetaDataEnable; /*Enable retrieval of picture metadata to be sent to video pipeline.*/
582
	int         Progressive;    /*Instruct decoder to always try to send back progressive
583
				     frames. If input content is 1080p, the decoder will
584
				     ignore pull-down flags and always give 1080p output.
585
				     If 1080i content is processed, the decoder will return
586
				     1080i data. When this flag is not set, the decoder will
587
				     use pull-down information in the input stream to decide
588
				     the decoded data format.*/
589
	uint32_t    OptFlags;       /*In this field bits 0:3 are used pass default frame rate, bits 4:5 are for operation mode
590
				     (used to indicate Blu-ray mode to the decoder) and bit 6 is for the flag mpcOutPutMaxFRate
591
				     which when set tells the FW to output at the max rate for the resolution and ignore the
592
				     frame rate determined from the stream. Bit 7 is set to indicate that this is single threaded
593
				     mode and the driver will be peeked to get timestamps ahead of time*/
594
	BC_MEDIA_SUBTYPE mSubtype;  /* Video Media Type*/
595
	uint32_t    width;
596
	uint32_t    height;
597
	uint32_t    startCodeSz;    /*Start code size for H264 clips*/
598
	uint8_t     *pMetaData;     /*Metadata buffer that is used to pass sequence header*/
599
	uint32_t    metaDataSz;     /*Metadata size*/
600
	uint8_t     bEnableScaling;
601
	BC_SCALING_PARAMS ScalingParams;
602
} BC_INPUT_FORMAT;
603
604
typedef struct _BC_INFO_CRYSTAL_ {
605
	uint8_t device;
606
	union {
607
		struct {
608
			uint32_t dilRelease:8;
609
			uint32_t dilMajor:8;
610
			uint32_t dilMinor:16;
611
		};
612
		uint32_t version;
613
	} dilVersion;
614
615
	union {
616
		struct {
617
			uint32_t drvRelease:4;
618
			uint32_t drvMajor:8;
619
			uint32_t drvMinor:12;
620
			uint32_t drvBuild:8;
621
		};
622
		uint32_t version;
623
	} drvVersion;
624
625
	union {
626
		struct {
627
			uint32_t fwRelease:4;
628
			uint32_t fwMajor:8;
629
			uint32_t fwMinor:12;
630
			uint32_t fwBuild:8;
631
		};
632
		uint32_t version;
633
	} fwVersion;
634
635
	uint32_t Reserved1; /* For future expansion */
636
	uint32_t Reserved2; /* For future expansion */
637
} BC_INFO_CRYSTAL, *PBC_INFO_CRYSTAL;
571
638
572
#endif	/* _BC_DTS_DEFS_H_ */
639
#endif	/* _BC_DTS_DEFS_H_ */
(-)crystalhd~/bc_dts_glob_lnx.h (-99 / +130 lines)
Lines 28-34 Link Here
28
#ifndef _BC_DTS_GLOB_LNX_H_
28
#ifndef _BC_DTS_GLOB_LNX_H_
29
#define _BC_DTS_GLOB_LNX_H_
29
#define _BC_DTS_GLOB_LNX_H_
30
30
31
#ifdef __LINUX_USER__
31
#if !defined(__KERNEL__)
32
#include <stdio.h>
32
#include <stdio.h>
33
#include <stdlib.h>
33
#include <stdlib.h>
34
#include <unistd.h>
34
#include <unistd.h>
Lines 48-134 Link Here
48
48
49
#endif
49
#endif
50
50
51
#include "crystalhd.h"
51
#include "bc_dts_defs.h"
52
#include "bcm_70012_regs.h"	/* Link Register defs */
52
53
53
#define CRYSTALHD_API_NAME	"crystalhd"
54
#define CRYSTALHD_API_NAME	"crystalhd"
54
#define CRYSTALHD_API_DEV_NAME	"/dev/crystalhd"
55
#define CRYSTALHD_API_DEV_NAME	"/dev/crystalhd"
55
56
57
enum _BC_PCI_DEV_IDS{
58
	BC_PCI_DEVID_INVALID = 0,
59
	BC_PCI_DEVID_DOZER   = 0x1610,
60
	BC_PCI_DEVID_TANK    = 0x1620,
61
	BC_PCI_DEVID_LINK	 = 0x1612,
62
	BC_PCI_DEVID_LOCKE	 = 0x1613,
63
	BC_PCI_DEVID_DEMOBRD = 0x7411,
64
	BC_PCI_DEVID_MORPHEUS = 0x7412,
65
	BC_PCI_DEVID_FLEA	= 0x1615,
66
};
67
56
/*
68
/*
57
 * These are SW stack tunable parameters shared
69
 * These are SW stack tunable parameters shared
58
 * between the driver and the application.
70
 * between the driver and the application.
59
 */
71
 */
60
enum BC_DTS_GLOBALS {
72
enum _BC_DTS_GLOBALS {
61
	BC_MAX_FW_CMD_BUFF_SZ = 0x40, /* FW passthrough cmd/rsp buffer size */
73
	BC_MAX_FW_CMD_BUFF_SZ	= 0x40,		/* FW passthrough cmd/rsp buffer size */
62
	PCI_CFG_SIZE		= 256,		/* PCI config size buffer */
74
	PCI_CFG_SIZE		= 256,		/* PCI config size buffer */
63
	BC_IOCTL_DATA_POOL_SIZE	= 8,		/* BC_IOCTL_DATA Pool size */
75
	BC_IOCTL_DATA_POOL_SIZE	= 8,		/* BC_IOCTL_DATA Pool size */
64
	BC_LINK_MAX_OPENS	= 3,	/* Maximum simultaneous opens*/
76
	BC_LINK_MAX_OPENS	= 3,		/* Maximum simultaneous opens*/
65
	BC_LINK_MAX_SGLS	= 1024,	/* Maximum SG elements 4M/4K */
77
	BC_LINK_MAX_SGLS	= 1024,		/* Maximum SG elements 4M/4K */
66
	BC_TX_LIST_CNT		= 2,		/* Max Tx DMA Rings */
78
	BC_TX_LIST_CNT		= 2,		/* Max Tx DMA Rings */
67
	BC_RX_LIST_CNT		= 8,		/* Max Rx DMA Rings*/
79
	BC_RX_LIST_CNT		= 16,		/* Max Rx DMA Rings*/
68
	BC_PROC_OUTPUT_TIMEOUT	= 3000,		/* Milliseconds */
80
	BC_PROC_OUTPUT_TIMEOUT	= 2000,		/* Milliseconds */
69
	BC_INFIFO_THRESHOLD	= 0x10000,
81
	BC_INFIFO_THRESHOLD	= 0x10000,
70
};
82
};
71
83
72
struct BC_CMD_REG_ACC {
84
/* definitions for HW Pause */
85
/* NAREN FIXME temporarily disable HW PAUSE */
86
#define HW_PAUSE_THRESHOLD (BC_RX_LIST_CNT)
87
#define HW_RESUME_THRESHOLD (BC_RX_LIST_CNT/2)
88
89
typedef union _addr_64_ {
90
	struct {
91
		uint32_t	low_part;
92
		uint32_t	high_part;
93
	};
94
	uint64_t	full_addr;
95
} addr_64;
96
97
typedef struct _BC_CMD_REG_ACC {
73
	uint32_t		Offset;
98
	uint32_t		Offset;
74
	uint32_t		Value;
99
	uint32_t		Value;
75
};
100
} BC_CMD_REG_ACC;
76
101
77
struct BC_CMD_DEV_MEM {
102
typedef struct _BC_CMD_DEV_MEM {
78
	uint32_t		StartOff;
103
	uint32_t		StartOff;
79
	uint32_t		NumDwords;
104
	uint32_t		NumDwords;
80
	uint32_t		Rsrd;
105
	uint32_t		Rsrd;
81
};
106
} BC_CMD_DEV_MEM;
82
107
83
/* FW Passthrough command structure */
108
/* FW Passthrough command structure */
84
enum bc_fw_cmd_flags {
109
enum _bc_fw_cmd_flags {
85
	BC_FW_CMD_FLAGS_NONE	= 0,
110
	BC_FW_CMD_FLAGS_NONE	= 0,
86
	BC_FW_CMD_PIB_QS	= 0x01,
111
	BC_FW_CMD_PIB_QS	= 0x01,
87
};
112
};
88
113
89
struct BC_FW_CMD {
114
typedef struct _BC_FW_CMD {
90
	uint32_t		cmd[BC_MAX_FW_CMD_BUFF_SZ];
115
	uint32_t		cmd[BC_MAX_FW_CMD_BUFF_SZ];
91
	uint32_t		rsp[BC_MAX_FW_CMD_BUFF_SZ];
116
	uint32_t		rsp[BC_MAX_FW_CMD_BUFF_SZ];
92
	uint32_t		flags;
117
	uint32_t		flags;
93
	uint32_t		add_data;
118
	uint32_t		add_data;
94
};
119
} BC_FW_CMD, *PBC_FW_CMD;
95
120
96
struct BC_HW_TYPE {
121
typedef struct _BC_HW_TYPE {
97
	uint16_t		PciDevId;
122
	uint16_t		PciDevId;
98
	uint16_t		PciVenId;
123
	uint16_t		PciVenId;
99
	uint8_t			HwRev;
124
	uint8_t			HwRev;
100
	uint8_t			Align[3];
125
	uint8_t			Align[3];
101
};
126
} BC_HW_TYPE;
102
127
103
struct BC_PCI_CFG {
128
typedef struct _BC_PCI_CFG {
104
	uint32_t		Size;
129
	uint32_t		Size;
105
	uint32_t		Offset;
130
	uint32_t		Offset;
106
	uint8_t			pci_cfg_space[PCI_CFG_SIZE];
131
	uint8_t			pci_cfg_space[PCI_CFG_SIZE];
107
};
132
} BC_PCI_CFG;
108
133
109
struct BC_VERSION_INFO {
134
typedef struct _BC_VERSION_INFO_ {
110
	uint8_t			DriverMajor;
135
	uint8_t			DriverMajor;
111
	uint8_t			DriverMinor;
136
	uint8_t			DriverMinor;
112
	uint16_t		DriverRevision;
137
	uint16_t		DriverRevision;
113
};
138
} BC_VERSION_INFO;
114
139
115
struct BC_START_RX_CAP {
140
typedef struct _BC_START_RX_CAP_ {
116
	uint32_t		Rsrd;
141
	uint32_t		Rsrd;
117
	uint32_t		StartDeliveryThsh;
142
	uint32_t		StartDeliveryThsh;
118
	uint32_t		PauseThsh;
143
	uint32_t		PauseThsh;
119
	uint32_t		ResumeThsh;
144
	uint32_t		ResumeThsh;
120
};
145
} BC_START_RX_CAP;
121
146
122
struct BC_FLUSH_RX_CAP {
147
typedef struct _BC_FLUSH_RX_CAP_ {
123
	uint32_t		Rsrd;
148
	uint32_t		Rsrd;
124
	uint32_t		bDiscardOnly;
149
	uint32_t		bDiscardOnly;
125
};
150
} BC_FLUSH_RX_CAP;
126
151
127
struct BC_DTS_STATS {
152
typedef struct _BC_DTS_STATS {
128
	uint8_t			drvRLL;
153
	uint8_t			drvRLL;
129
	uint8_t			drvFLL;
154
	uint8_t			drvFLL;
130
	uint8_t			eosDetected;
155
	uint8_t			eosDetected;
131
	uint8_t			pwr_state_change;
156
	uint8_t			pwr_state_change; /* 0 is Default (running/stopped), 1 is going to suspend, 2 is going to resume */
132
157
133
	/* Stats from App */
158
	/* Stats from App */
134
	uint32_t		opFrameDropped;
159
	uint32_t		opFrameDropped;
Lines 151-170 struct BC_DTS_STATS { Link Here
151
	uint32_t		DrvPIBMisses;
176
	uint32_t		DrvPIBMisses;
152
	uint32_t		DrvPauseTime;
177
	uint32_t		DrvPauseTime;
153
	uint32_t		DrvRepeatedFrms;
178
	uint32_t		DrvRepeatedFrms;
154
	uint32_t		res1[13];
179
	/*
180
	 * BIT-31 MEANS READ Next PIB Info.
181
	 * Width will be in bit 0-16.
182
	 */
183
	uint64_t		DrvNextMDataPLD;
184
	uint32_t		DrvcpbEmptySize;
185
186
	float			Temperature;
187
	uint32_t		TempFromDriver;
188
	uint32_t		picNumFlags;
189
	uint32_t		res1[7];
155
190
156
};
191
} BC_DTS_STATS;
157
192
158
struct BC_PROC_INPUT {
193
typedef struct _BC_PROC_INPUT_ {
159
	uint8_t			*pDmaBuff;
194
	uint8_t			*pDmaBuff;
160
	uint32_t		BuffSz;
195
	uint32_t		BuffSz;
161
	uint8_t			Mapped;
196
	uint8_t			Mapped;
162
	uint8_t			Encrypted;
197
	uint8_t			Encrypted;
163
	uint8_t			Rsrd[2];
198
	uint8_t			Rsrd[2];
164
	uint32_t		DramOffset;	/* For debug use only */
199
	uint32_t		DramOffset;	/* For debug use only */
165
};
200
} BC_PROC_INPUT, *PBC_PROC_INPUT;
166
201
167
struct BC_DEC_YUV_BUFFS {
202
typedef struct _BC_DEC_YUV_BUFFS {
168
	uint32_t		b422Mode;
203
	uint32_t		b422Mode;
169
	uint8_t			*YuvBuff;
204
	uint8_t			*YuvBuff;
170
	uint32_t		YuvBuffSz;
205
	uint32_t		YuvBuffSz;
Lines 172-180 struct BC_DEC_YUV_BUFFS { Link Here
172
	uint32_t		YBuffDoneSz;
207
	uint32_t		YBuffDoneSz;
173
	uint32_t		UVBuffDoneSz;
208
	uint32_t		UVBuffDoneSz;
174
	uint32_t		RefCnt;
209
	uint32_t		RefCnt;
175
};
210
} BC_DEC_YUV_BUFFS;
176
211
177
enum DECOUT_COMPLETION_FLAGS {
212
enum _DECOUT_COMPLETION_FLAGS{
178
	COMP_FLAG_NO_INFO	= 0x00,
213
	COMP_FLAG_NO_INFO	= 0x00,
179
	COMP_FLAG_FMT_CHANGE	= 0x01,
214
	COMP_FLAG_FMT_CHANGE	= 0x01,
180
	COMP_FLAG_PIB_VALID	= 0x02,
215
	COMP_FLAG_PIB_VALID	= 0x02,
Lines 183-235 enum DECOUT_COMPLETION_FLAGS { Link Here
183
	COMP_FLAG_DATA_BOT	= 0x10,
218
	COMP_FLAG_DATA_BOT	= 0x10,
184
};
219
};
185
220
186
struct BC_DEC_OUT_BUFF {
221
typedef struct _BC_DEC_OUT_BUFF{
187
	struct BC_DEC_YUV_BUFFS	OutPutBuffs;
222
	BC_DEC_YUV_BUFFS	OutPutBuffs;
188
	struct BC_PIC_INFO_BLOCK PibInfo;
223
#if !defined(__KERNEL__)
224
	C011_PIB		PibInfo;
225
#else
226
	struct C011_PIB PibInfo;
227
#endif
189
	uint32_t		Flags;
228
	uint32_t		Flags;
190
	uint32_t		BadFrCnt;
229
	uint32_t		BadFrCnt;
191
};
230
} BC_DEC_OUT_BUFF;
192
231
193
struct BC_NOTIFY_MODE {
232
typedef struct _BC_NOTIFY_MODE {
194
	uint32_t		Mode;
233
	uint32_t		Mode;
195
	uint32_t		Rsvr[3];
234
	uint32_t		Rsvr[3];
196
};
235
} BC_NOTIFY_MODE;
197
236
198
struct BC_CLOCK {
237
typedef struct _BC_IOCTL_DATA {
199
	uint32_t		clk;
238
	BC_STATUS		RetSts;
200
	uint32_t		Rsvr[3];
201
};
202
203
struct BC_IOCTL_DATA {
204
	enum BC_STATUS		RetSts;
205
	uint32_t		IoctlDataSz;
239
	uint32_t		IoctlDataSz;
206
	uint32_t		Timeout;
240
	uint32_t		Timeout;
207
	union {
241
	union {
208
		struct BC_CMD_REG_ACC	regAcc;
242
		BC_CMD_REG_ACC		regAcc;
209
		struct BC_CMD_DEV_MEM	devMem;
243
		BC_CMD_DEV_MEM		devMem;
210
		struct BC_FW_CMD	fwCmd;
244
		BC_FW_CMD		fwCmd;
211
		struct BC_HW_TYPE	hwType;
245
		BC_HW_TYPE		hwType;
212
		struct BC_PCI_CFG	pciCfg;
246
		BC_PCI_CFG		pciCfg;
213
		struct BC_VERSION_INFO	VerInfo;
247
		BC_VERSION_INFO		VerInfo;
214
		struct BC_PROC_INPUT	ProcInput;
248
		BC_PROC_INPUT		ProcInput;
215
		struct BC_DEC_YUV_BUFFS	RxBuffs;
249
		BC_DEC_YUV_BUFFS	RxBuffs;
216
		struct BC_DEC_OUT_BUFF	DecOutData;
250
		BC_DEC_OUT_BUFF		DecOutData;
217
		struct BC_START_RX_CAP	RxCap;
251
		BC_START_RX_CAP		RxCap;
218
		struct BC_FLUSH_RX_CAP	FlushRxCap;
252
		BC_FLUSH_RX_CAP		FlushRxCap;
219
		struct BC_DTS_STATS	drvStat;
253
		BC_DTS_STATS		drvStat;
220
		struct BC_NOTIFY_MODE	NotifyMode;
254
		BC_NOTIFY_MODE		NotifyMode;
221
		struct BC_CLOCK		clockValue;
222
	} u;
255
	} u;
223
	struct _BC_IOCTL_DATA	*next;
256
	struct _BC_IOCTL_DATA	*next;
224
};
257
} BC_IOCTL_DATA;
225
258
226
enum BC_DRV_CMD {
259
typedef enum _BC_DRV_CMD{
227
	DRV_CMD_VERSION = 0,	/* Get SW version */
260
	DRV_CMD_VERSION = 0,	/* Get SW version */
228
	DRV_CMD_GET_HWTYPE,	/* Get HW version and type Dozer/Tank */
261
	DRV_CMD_GET_HWTYPE,	/* Get HW version and type Dozer/Tank */
229
	DRV_CMD_REG_RD,		/* Read Device Register */
262
	DRV_CMD_REG_RD,		/* Read Device Register */
230
	DRV_CMD_REG_WR,		/* Write Device Register */
263
	DRV_CMD_REG_WR,		/* Write Device Register */
231
	DRV_CMD_FPGA_RD,	/* Read FPGA Register */
264
	DRV_CMD_FPGA_RD,	/* Read FPGA Register */
232
	DRV_CMD_FPGA_WR,	/* Write FPGA Register */
265
	DRV_CMD_FPGA_WR,	/* Wrtie FPGA Reister */
233
	DRV_CMD_MEM_RD,		/* Read Device Memory */
266
	DRV_CMD_MEM_RD,		/* Read Device Memory */
234
	DRV_CMD_MEM_WR,		/* Write Device Memory */
267
	DRV_CMD_MEM_WR,		/* Write Device Memory */
235
	DRV_CMD_RD_PCI_CFG,	/* Read PCI Config Space */
268
	DRV_CMD_RD_PCI_CFG,	/* Read PCI Config Space */
Lines 240-300 enum BC_DRV_CMD { Link Here
240
	DRV_CMD_ADD_RXBUFFS,	/* Add Rx side buffers to driver pool */
273
	DRV_CMD_ADD_RXBUFFS,	/* Add Rx side buffers to driver pool */
241
	DRV_CMD_FETCH_RXBUFF,	/* Get Rx DMAed buffer */
274
	DRV_CMD_FETCH_RXBUFF,	/* Get Rx DMAed buffer */
242
	DRV_CMD_START_RX_CAP,	/* Start Rx Buffer Capture */
275
	DRV_CMD_START_RX_CAP,	/* Start Rx Buffer Capture */
243
	DRV_CMD_FLUSH_RX_CAP,	/* Stop the capture for now...
276
	DRV_CMD_FLUSH_RX_CAP,	/* Stop the capture for now...we will enhance this later*/
244
			we will enhance this later*/
245
	DRV_CMD_GET_DRV_STAT,	/* Get Driver Internal Statistics */
277
	DRV_CMD_GET_DRV_STAT,	/* Get Driver Internal Statistics */
246
	DRV_CMD_RST_DRV_STAT,	/* Reset Driver Internal Statistics */
278
	DRV_CMD_RST_DRV_STAT,	/* Reset Driver Internal Statistics */
247
	DRV_CMD_NOTIFY_MODE,	/* Notify the Mode to driver
279
	DRV_CMD_NOTIFY_MODE,	/* Notify the Mode to driver in which the application is Operating*/
248
			in which the application is Operating*/
280
	DRV_CMD_RELEASE,		/* Notify the driver to release user handle and application resources */
249
	DRV_CMD_CHANGE_CLOCK,	/* Change the core clock to either save power
250
			or improve performance */
251
281
252
	/* MUST be the last one.. */
282
	/* MUST be the last one.. */
253
	DRV_CMD_END,			/* End of the List.. */
283
	DRV_CMD_END,			/* End of the List.. */
254
};
284
} BC_DRV_CMD;
255
285
256
#define BC_IOC_BASE		'b'
286
#define BC_IOC_BASE		'b'
257
#define BC_IOC_VOID		_IOC_NONE
287
#define BC_IOC_VOID		_IOC_NONE
258
#define BC_IOC_IOWR(nr, type)	_IOWR(BC_IOC_BASE, nr, type)
288
#define BC_IOC_IOWR(nr, type)	_IOWR(BC_IOC_BASE, nr, type)
259
#define BC_IOCTL_MB		struct BC_IOCTL_DATA
289
#define BC_IOCTL_MB		BC_IOCTL_DATA
260
290
261
#define	BCM_IOC_GET_VERSION	BC_IOC_IOWR(DRV_CMD_VERSION, BC_IOCTL_MB)
291
#define	BCM_IOC_GET_VERSION		BC_IOC_IOWR(DRV_CMD_VERSION, BC_IOCTL_MB)
262
#define	BCM_IOC_GET_HWTYPE	BC_IOC_IOWR(DRV_CMD_GET_HWTYPE, BC_IOCTL_MB)
292
#define	BCM_IOC_GET_HWTYPE		BC_IOC_IOWR(DRV_CMD_GET_HWTYPE, BC_IOCTL_MB)
263
#define	BCM_IOC_REG_RD		BC_IOC_IOWR(DRV_CMD_REG_RD, BC_IOCTL_MB)
293
#define	BCM_IOC_REG_RD			BC_IOC_IOWR(DRV_CMD_REG_RD, BC_IOCTL_MB)
264
#define	BCM_IOC_REG_WR		BC_IOC_IOWR(DRV_CMD_REG_WR, BC_IOCTL_MB)
294
#define	BCM_IOC_REG_WR			BC_IOC_IOWR(DRV_CMD_REG_WR, BC_IOCTL_MB)
265
#define	BCM_IOC_MEM_RD		BC_IOC_IOWR(DRV_CMD_MEM_RD, BC_IOCTL_MB)
295
#define	BCM_IOC_MEM_RD			BC_IOC_IOWR(DRV_CMD_MEM_RD, BC_IOCTL_MB)
266
#define	BCM_IOC_MEM_WR		BC_IOC_IOWR(DRV_CMD_MEM_WR, BC_IOCTL_MB)
296
#define	BCM_IOC_MEM_WR			BC_IOC_IOWR(DRV_CMD_MEM_WR, BC_IOCTL_MB)
267
#define BCM_IOC_FPGA_RD		BC_IOC_IOWR(DRV_CMD_FPGA_RD, BC_IOCTL_MB)
297
#define BCM_IOC_FPGA_RD			BC_IOC_IOWR(DRV_CMD_FPGA_RD, BC_IOCTL_MB)
268
#define BCM_IOC_FPGA_WR		BC_IOC_IOWR(DRV_CMD_FPGA_WR, BC_IOCTL_MB)
298
#define BCM_IOC_FPGA_WR			BC_IOC_IOWR(DRV_CMD_FPGA_WR, BC_IOCTL_MB)
269
#define	BCM_IOC_RD_PCI_CFG	BC_IOC_IOWR(DRV_CMD_RD_PCI_CFG, BC_IOCTL_MB)
299
#define	BCM_IOC_RD_PCI_CFG		BC_IOC_IOWR(DRV_CMD_RD_PCI_CFG, BC_IOCTL_MB)
270
#define	BCM_IOC_WR_PCI_CFG	BC_IOC_IOWR(DRV_CMD_WR_PCI_CFG, BC_IOCTL_MB)
300
#define	BCM_IOC_WR_PCI_CFG		BC_IOC_IOWR(DRV_CMD_WR_PCI_CFG, BC_IOCTL_MB)
271
#define BCM_IOC_PROC_INPUT	BC_IOC_IOWR(DRV_CMD_PROC_INPUT, BC_IOCTL_MB)
301
#define BCM_IOC_PROC_INPUT		BC_IOC_IOWR(DRV_CMD_PROC_INPUT, BC_IOCTL_MB)
272
#define BCM_IOC_ADD_RXBUFFS	BC_IOC_IOWR(DRV_CMD_ADD_RXBUFFS, BC_IOCTL_MB)
302
#define BCM_IOC_ADD_RXBUFFS		BC_IOC_IOWR(DRV_CMD_ADD_RXBUFFS, BC_IOCTL_MB)
273
#define BCM_IOC_FETCH_RXBUFF	BC_IOC_IOWR(DRV_CMD_FETCH_RXBUFF, BC_IOCTL_MB)
303
#define BCM_IOC_FETCH_RXBUFF	BC_IOC_IOWR(DRV_CMD_FETCH_RXBUFF, BC_IOCTL_MB)
274
#define	BCM_IOC_FW_CMD		BC_IOC_IOWR(DRV_ISSUE_FW_CMD, BC_IOCTL_MB)
304
#define	BCM_IOC_FW_CMD			BC_IOC_IOWR(DRV_ISSUE_FW_CMD, BC_IOCTL_MB)
275
#define	BCM_IOC_START_RX_CAP	BC_IOC_IOWR(DRV_CMD_START_RX_CAP, BC_IOCTL_MB)
305
#define	BCM_IOC_START_RX_CAP	BC_IOC_IOWR(DRV_CMD_START_RX_CAP, BC_IOCTL_MB)
276
#define BCM_IOC_FLUSH_RX_CAP	BC_IOC_IOWR(DRV_CMD_FLUSH_RX_CAP, BC_IOCTL_MB)
306
#define BCM_IOC_FLUSH_RX_CAP	BC_IOC_IOWR(DRV_CMD_FLUSH_RX_CAP, BC_IOCTL_MB)
277
#define BCM_IOC_GET_DRV_STAT	BC_IOC_IOWR(DRV_CMD_GET_DRV_STAT, BC_IOCTL_MB)
307
#define BCM_IOC_GET_DRV_STAT	BC_IOC_IOWR(DRV_CMD_GET_DRV_STAT, BC_IOCTL_MB)
278
#define BCM_IOC_RST_DRV_STAT	BC_IOC_IOWR(DRV_CMD_RST_DRV_STAT, BC_IOCTL_MB)
308
#define BCM_IOC_RST_DRV_STAT	BC_IOC_IOWR(DRV_CMD_RST_DRV_STAT, BC_IOCTL_MB)
279
#define BCM_IOC_NOTIFY_MODE	BC_IOC_IOWR(DRV_CMD_NOTIFY_MODE, BC_IOCTL_MB)
309
#define BCM_IOC_NOTIFY_MODE		BC_IOC_IOWR(DRV_CMD_NOTIFY_MODE, BC_IOCTL_MB)
280
#define	BCM_IOC_FW_DOWNLOAD	BC_IOC_IOWR(DRV_CMD_FW_DOWNLOAD, BC_IOCTL_MB)
310
#define	BCM_IOC_FW_DOWNLOAD		BC_IOC_IOWR(DRV_CMD_FW_DOWNLOAD, BC_IOCTL_MB)
281
#define BCM_IOC_CHG_CLK		BC_IOC_IOWR(DRV_CMD_CHANGE_CLOCK, BC_IOCTL_MB)
311
#define BCM_IOC_RELEASE			BC_IOC_IOWR(DRV_CMD_RELEASE, BC_IOCTL_MB)
282
#define	BCM_IOC_END		BC_IOC_VOID
312
#define	BCM_IOC_END				BC_IOC_VOID
283
313
284
/* Wrapper for main IOCTL data */
314
/* Wrapper for main IOCTL data */
285
struct crystalhd_ioctl_data {
315
typedef struct _crystalhd_ioctl_data {
286
	struct BC_IOCTL_DATA	udata;		/* IOCTL from App..*/
316
	BC_IOCTL_DATA		udata;		/* IOCTL from App..*/
287
	uint32_t		u_id;		/* Driver specific user ID */
317
	uint32_t		u_id;		/* Driver specific user ID */
288
	uint32_t		cmd;		/* Cmd ID for driver's use. */
318
	uint32_t		cmd;		/* Cmd ID for driver's use. */
289
	void	 *add_cdata;	/* Additional command specific data..*/
319
	void			*add_cdata;	/* Additional command specific data..*/
290
	uint32_t add_cdata_sz;	/* Additional command specific data size */
320
	uint32_t		add_cdata_sz;	/* Additional command specific data size */
291
	struct crystalhd_ioctl_data *next;	/* List/Fifo management */
321
	struct _crystalhd_ioctl_data *next;	/* List/Fifo management */
322
} crystalhd_ioctl_data;
323
324
enum _crystalhd_kmod_ver{
325
	crystalhd_kmod_major	= 3,
326
	crystalhd_kmod_minor	= 10,
327
	crystalhd_kmod_rev		= 0,
292
};
328
};
293
329
294
enum crystalhd_kmod_ver {
295
	crystalhd_kmod_major	= 0,
296
	crystalhd_kmod_minor	= 9,
297
	crystalhd_kmod_rev	= 27,
298
};
299
330
300
#endif
331
#endif
(-)crystalhd~/bcm_70012_regs.h (-299 / +11840 lines)
Lines 203-208 Link Here
203
 ***************************************************************************/
203
 ***************************************************************************/
204
#define PCIE_TL_TL_CONTROL             0x00000400 /* TL_CONTROL Register */
204
#define PCIE_TL_TL_CONTROL             0x00000400 /* TL_CONTROL Register */
205
#define PCIE_TL_TRANSACTION_CONFIGURATION 0x00000404 /* TRANSACTION_CONFIGURATION Register */
205
#define PCIE_TL_TRANSACTION_CONFIGURATION 0x00000404 /* TRANSACTION_CONFIGURATION Register */
206
#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC 0x00000408 /* WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC Register */
207
#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2 0x0000040c /* WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2 Register */
208
#define PCIE_TL_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC 0x00000410 /* DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC Register */
209
#define PCIE_TL_DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2 0x00000414 /* DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2 Register */
210
#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC 0x00000418 /* DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC Register */
211
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC 0x0000041c /* DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC Register */
212
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC 0x00000420 /* READ_DMA_SPLIT_IDS_DIAGNOSTIC Register */
213
#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC 0x00000424 /* READ_DMA_SPLIT_LENGTH_DIAGNOSTIC Register */
214
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC 0x0000043c /* XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC Register */
215
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC 0x00000458 /* DMA_COMPLETION_MISC__DIAGNOSTIC Register */
216
#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC 0x0000045c /* SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC Register */
217
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC 0x00000460 /* SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC Register */
218
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC 0x00000464 /* SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC Register */
219
#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO 0x00000468 /* TL_BUS_NO_DEV__NO__FUNC__NO Register */
220
#define PCIE_TL_TL_DEBUG               0x0000046c /* TL_DEBUG Register */
206
221
207
222
208
/****************************************************************************
223
/****************************************************************************
Lines 210-215 Link Here
210
 ***************************************************************************/
225
 ***************************************************************************/
211
#define PCIE_DLL_DATA_LINK_CONTROL     0x00000500 /* DATA_LINK_CONTROL Register */
226
#define PCIE_DLL_DATA_LINK_CONTROL     0x00000500 /* DATA_LINK_CONTROL Register */
212
#define PCIE_DLL_DATA_LINK_STATUS      0x00000504 /* DATA_LINK_STATUS Register */
227
#define PCIE_DLL_DATA_LINK_STATUS      0x00000504 /* DATA_LINK_STATUS Register */
228
#define PCIE_DLL_DATA_LINK_ATTENTION   0x00000508 /* DATA_LINK_ATTENTION Register */
229
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK 0x0000050c /* DATA_LINK_ATTENTION_MASK Register */
230
#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG 0x00000510 /* NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG Register */
231
#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG 0x00000514 /* ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG Register */
232
#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG 0x00000518 /* PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG Register */
233
#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG 0x0000051c /* RECEIVE_SEQUENCE_NUMBER_DEBUG Register */
234
#define PCIE_DLL_DATA_LINK_REPLAY      0x00000520 /* DATA_LINK_REPLAY Register */
235
#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT 0x00000524 /* DATA_LINK_ACK_TIMEOUT Register */
236
#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD 0x00000528 /* POWER_MANAGEMENT_THRESHOLD Register */
237
#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG 0x0000052c /* RETRY_BUFFER_WRITE_POINTER_DEBUG Register */
238
#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG 0x00000530 /* RETRY_BUFFER_READ_POINTER_DEBUG Register */
239
#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG 0x00000534 /* RETRY_BUFFER_PURGED_POINTER_DEBUG Register */
240
#define PCIE_DLL_RETRY_BUFFER_READ_WRITE_DEBUG_PORT 0x00000538 /* RETRY_BUFFER_READ_WRITE_DEBUG_PORT Register */
241
#define PCIE_DLL_ERROR_COUNT_THRESHOLD 0x0000053c /* ERROR_COUNT_THRESHOLD Register */
242
#define PCIE_DLL_TL_ERROR_COUNTER      0x00000540 /* TL_ERROR_COUNTER Register */
243
#define PCIE_DLL_DLLP_ERROR_COUNTER    0x00000544 /* DLLP_ERROR_COUNTER Register */
244
#define PCIE_DLL_NAK_RECEIVED_COUNTER  0x00000548 /* NAK_RECEIVED_COUNTER Register */
245
#define PCIE_DLL_DATA_LINK_TEST        0x0000054c /* DATA_LINK_TEST Register */
246
#define PCIE_DLL_PACKET_BIST           0x00000550 /* PACKET_BIST Register */
247
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL 0x00000554 /* LINK_PCIE_1_1_CONTROL Register */
248
249
250
/****************************************************************************
251
 * BCM70012_TGT_TOP_PCIE_PHY
252
 ***************************************************************************/
253
#define PCIE_PHY_PHY_MODE              0x00000600 /* TYPE_PHY_MODE Register */
254
#define PCIE_PHY_PHY_LINK_STATUS       0x00000604 /* TYPE_PHY_LINK_STATUS Register */
255
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL 0x00000608 /* TYPE_PHY_LINK_LTSSM_CONTROL Register */
256
#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER 0x0000060c /* TYPE_PHY_LINK_TRAINING_LINK_NUMBER Register */
257
#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER 0x00000610 /* TYPE_PHY_LINK_TRAINING_LANE_NUMBER Register */
258
#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS 0x00000614 /* TYPE_PHY_LINK_TRAINING_N_FTS Register */
259
#define PCIE_PHY_PHY_ATTENTION         0x00000618 /* TYPE_PHY_ATTENTION Register */
260
#define PCIE_PHY_PHY_ATTENTION_MASK    0x0000061c /* TYPE_PHY_ATTENTION_MASK Register */
261
#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER 0x00000620 /* TYPE_PHY_RECEIVE_ERROR_COUNTER Register */
262
#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER 0x00000624 /* TYPE_PHY_RECEIVE_FRAMING_ERROR_COUNTER Register */
263
#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD 0x00000628 /* TYPE_PHY_RECEIVE_ERROR_THRESHOLD Register */
264
#define PCIE_PHY_PHY_TEST_CONTROL      0x0000062c /* TYPE_PHY_TEST_CONTROL Register */
265
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE 0x00000630 /* TYPE_PHY_SERDES_CONTROL_OVERRIDE Register */
266
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE 0x00000634 /* TYPE_PHY_TIMING_PARAMETER_OVERRIDE Register */
267
#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES 0x00000638 /* TYPE_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES Register */
268
#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES 0x0000063c /* TYPE_PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES Register */
213
269
214
270
215
/****************************************************************************
271
/****************************************************************************
Lines 225-230 Link Here
225
281
226
282
227
/****************************************************************************
283
/****************************************************************************
284
 * BCM70012_TGT_TOP_MDIO
285
 ***************************************************************************/
286
#define MDIO_CTRL0                     0x00000730 /* PCIE Serdes MDIO Control Register 0 */
287
#define MDIO_CTRL1                     0x00000734 /* PCIE Serdes MDIO Control Register 1 */
288
#define MDIO_CTRL2                     0x00000738 /* PCIE Serdes MDIO Control Register 2 */
289
290
291
/****************************************************************************
292
 * BCM70012_TGT_TOP_TGT_RGR_BRIDGE
293
 ***************************************************************************/
294
#define TGT_RGR_BRIDGE_REVISION        0x00000740 /* PCIE RGR Bridge Revision Register */
295
#define TGT_RGR_BRIDGE_CTRL            0x00000744 /* RGR Bridge Control Register */
296
#define TGT_RGR_BRIDGE_RBUS_TIMER      0x00000748 /* RGR Bridge RBUS Timer Register */
297
#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0 0x0000074c /* RGR Bridge Spare Software Reset 0 Register */
298
#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1 0x00000750 /* RGR Bridge Spare Software Reset 1 Register */
299
300
301
/****************************************************************************
302
 * BCM70012_I2C_TOP_I2C
303
 ***************************************************************************/
304
#define I2C_CHIP_ADDRESS               0x00000800 /* I2C Chip Address And Read/Write Control */
305
#define I2C_DATA_IN0                   0x00000804 /* I2C Write Data Byte 0 */
306
#define I2C_DATA_IN1                   0x00000808 /* I2C Write Data Byte 1 */
307
#define I2C_DATA_IN2                   0x0000080c /* I2C Write Data Byte 2 */
308
#define I2C_DATA_IN3                   0x00000810 /* I2C Write Data Byte 3 */
309
#define I2C_DATA_IN4                   0x00000814 /* I2C Write Data Byte 4 */
310
#define I2C_DATA_IN5                   0x00000818 /* I2C Write Data Byte 5 */
311
#define I2C_DATA_IN6                   0x0000081c /* I2C Write Data Byte 6 */
312
#define I2C_DATA_IN7                   0x00000820 /* I2C Write Data Byte 7 */
313
#define I2C_CNT_REG                    0x00000824 /* I2C Transfer Count Register */
314
#define I2C_CTL_REG                    0x00000828 /* I2C Control Register */
315
#define I2C_IIC_ENABLE                 0x0000082c /* I2C Read/Write Enable And Interrupt */
316
#define I2C_DATA_OUT0                  0x00000830 /* I2C Read Data Byte 0 */
317
#define I2C_DATA_OUT1                  0x00000834 /* I2C Read Data Byte 1 */
318
#define I2C_DATA_OUT2                  0x00000838 /* I2C Read Data Byte 2 */
319
#define I2C_DATA_OUT3                  0x0000083c /* I2C Read Data Byte 3 */
320
#define I2C_DATA_OUT4                  0x00000840 /* I2C Read Data Byte 4 */
321
#define I2C_DATA_OUT5                  0x00000844 /* I2C Read Data Byte 5 */
322
#define I2C_DATA_OUT6                  0x00000848 /* I2C Read Data Byte 6 */
323
#define I2C_DATA_OUT7                  0x0000084c /* I2C Read Data Byte 7 */
324
#define I2C_CTLHI_REG                  0x00000850 /* I2C Control Register */
325
#define I2C_SCL_PARAM                  0x00000854 /* I2C SCL Parameter Register */
326
327
328
/****************************************************************************
329
 * BCM70012_I2C_TOP_I2C_GR_BRIDGE
330
 ***************************************************************************/
331
#define I2C_GR_BRIDGE_REVISION         0x00000be0 /* GR Bridge Revision */
332
#define I2C_GR_BRIDGE_CTRL             0x00000be4 /* GR Bridge Control Register */
333
#define I2C_GR_BRIDGE_SPARE_SW_RESET_0 0x00000be8 /* GR Bridge Software Reset 0 Register */
334
#define I2C_GR_BRIDGE_SPARE_SW_RESET_1 0x00000bec /* GR Bridge Software Reset 1 Register */
335
336
337
/****************************************************************************
228
 * BCM70012_MISC_TOP_MISC1
338
 * BCM70012_MISC_TOP_MISC1
229
 ***************************************************************************/
339
 ***************************************************************************/
230
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0 0x00000c00 /* Tx DMA Descriptor List0 First Descriptor lower Address */
340
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0 0x00000c00 /* Tx DMA Descriptor List0 First Descriptor lower Address */
Lines 310-315 Link Here
310
#define GISB_ARBITER_SCRATCH           0x00000f04 /* GISB ARBITER Scratch Register */
420
#define GISB_ARBITER_SCRATCH           0x00000f04 /* GISB ARBITER Scratch Register */
311
#define GISB_ARBITER_REQ_MASK          0x00000f08 /* GISB ARBITER Master Request Mask Register */
421
#define GISB_ARBITER_REQ_MASK          0x00000f08 /* GISB ARBITER Master Request Mask Register */
312
#define GISB_ARBITER_TIMER             0x00000f0c /* GISB ARBITER Timer Value Register */
422
#define GISB_ARBITER_TIMER             0x00000f0c /* GISB ARBITER Timer Value Register */
423
#define GISB_ARBITER_BP_CTRL           0x00000f10 /* GISB ARBITER Breakpoint Control Register */
424
#define GISB_ARBITER_BP_CAP_CLR        0x00000f14 /* GISB ARBITER Breakpoint Capture Clear Register */
425
#define GISB_ARBITER_BP_START_ADDR_0   0x00000f18 /* GISB ARBITER Breakpoint Start Address 0 Register */
426
#define GISB_ARBITER_BP_END_ADDR_0     0x00000f1c /* GISB ARBITER Breakpoint End Address 0 Register */
427
#define GISB_ARBITER_BP_READ_0         0x00000f20 /* GISB ARBITER Breakpoint Master Read Control 0 Register */
428
#define GISB_ARBITER_BP_WRITE_0        0x00000f24 /* GISB ARBITER Breakpoint Master Write Control 0 Register */
429
#define GISB_ARBITER_BP_ENABLE_0       0x00000f28 /* GISB ARBITER Breakpoint Enable 0 Register */
430
#define GISB_ARBITER_BP_START_ADDR_1   0x00000f2c /* GISB ARBITER Breakpoint Start Address 1 Register */
431
#define GISB_ARBITER_BP_END_ADDR_1     0x00000f30 /* GISB ARBITER Breakpoint End Address 1 Register */
432
#define GISB_ARBITER_BP_READ_1         0x00000f34 /* GISB ARBITER Breakpoint Master Read Control 1 Register */
433
#define GISB_ARBITER_BP_WRITE_1        0x00000f38 /* GISB ARBITER Breakpoint Master Write Control 1 Register */
434
#define GISB_ARBITER_BP_ENABLE_1       0x00000f3c /* GISB ARBITER Breakpoint Enable 1 Register */
435
#define GISB_ARBITER_BP_START_ADDR_2   0x00000f40 /* GISB ARBITER Breakpoint Start Address 2 Register */
436
#define GISB_ARBITER_BP_END_ADDR_2     0x00000f44 /* GISB ARBITER Breakpoint End Address 2 Register */
437
#define GISB_ARBITER_BP_READ_2         0x00000f48 /* GISB ARBITER Breakpoint Master Read Control 2 Register */
438
#define GISB_ARBITER_BP_WRITE_2        0x00000f4c /* GISB ARBITER Breakpoint Master Write Control 2 Register */
439
#define GISB_ARBITER_BP_ENABLE_2       0x00000f50 /* GISB ARBITER Breakpoint Enable 2 Register */
440
#define GISB_ARBITER_BP_START_ADDR_3   0x00000f54 /* GISB ARBITER Breakpoint Start Address 3 Register */
441
#define GISB_ARBITER_BP_END_ADDR_3     0x00000f58 /* GISB ARBITER Breakpoint End Address 3 Register */
442
#define GISB_ARBITER_BP_READ_3         0x00000f5c /* GISB ARBITER Breakpoint Master Read Control 3 Register */
443
#define GISB_ARBITER_BP_WRITE_3        0x00000f60 /* GISB ARBITER Breakpoint Master Write Control 3 Register */
444
#define GISB_ARBITER_BP_ENABLE_3       0x00000f64 /* GISB ARBITER Breakpoint Enable 3 Register */
445
#define GISB_ARBITER_BP_START_ADDR_4   0x00000f68 /* GISB ARBITER Breakpoint Start Address 4 Register */
446
#define GISB_ARBITER_BP_END_ADDR_4     0x00000f6c /* GISB ARBITER Breakpoint End Address 4 Register */
447
#define GISB_ARBITER_BP_READ_4         0x00000f70 /* GISB ARBITER Breakpoint Master Read Control 4 Register */
448
#define GISB_ARBITER_BP_WRITE_4        0x00000f74 /* GISB ARBITER Breakpoint Master Write Control 4 Register */
449
#define GISB_ARBITER_BP_ENABLE_4       0x00000f78 /* GISB ARBITER Breakpoint Enable 4 Register */
450
#define GISB_ARBITER_BP_START_ADDR_5   0x00000f7c /* GISB ARBITER Breakpoint Start Address 5 Register */
451
#define GISB_ARBITER_BP_END_ADDR_5     0x00000f80 /* GISB ARBITER Breakpoint End Address 5 Register */
452
#define GISB_ARBITER_BP_READ_5         0x00000f84 /* GISB ARBITER Breakpoint Master Read Control 5 Register */
453
#define GISB_ARBITER_BP_WRITE_5        0x00000f88 /* GISB ARBITER Breakpoint Master Write Control 5 Register */
454
#define GISB_ARBITER_BP_ENABLE_5       0x00000f8c /* GISB ARBITER Breakpoint Enable 5 Register */
455
#define GISB_ARBITER_BP_START_ADDR_6   0x00000f90 /* GISB ARBITER Breakpoint Start Address 6 Register */
456
#define GISB_ARBITER_BP_END_ADDR_6     0x00000f94 /* GISB ARBITER Breakpoint End Address 6 Register */
457
#define GISB_ARBITER_BP_READ_6         0x00000f98 /* GISB ARBITER Breakpoint Master Read Control 6 Register */
458
#define GISB_ARBITER_BP_WRITE_6        0x00000f9c /* GISB ARBITER Breakpoint Master Write Control 6 Register */
459
#define GISB_ARBITER_BP_ENABLE_6       0x00000fa0 /* GISB ARBITER Breakpoint Enable 6 Register */
460
#define GISB_ARBITER_BP_START_ADDR_7   0x00000fa4 /* GISB ARBITER Breakpoint Start Address 7 Register */
461
#define GISB_ARBITER_BP_END_ADDR_7     0x00000fa8 /* GISB ARBITER Breakpoint End Address 7 Register */
462
#define GISB_ARBITER_BP_READ_7         0x00000fac /* GISB ARBITER Breakpoint Master Read Control 7 Register */
463
#define GISB_ARBITER_BP_WRITE_7        0x00000fb0 /* GISB ARBITER Breakpoint Master Write Control 7 Register */
464
#define GISB_ARBITER_BP_ENABLE_7       0x00000fb4 /* GISB ARBITER Breakpoint Enable 7 Register */
465
#define GISB_ARBITER_BP_CAP_ADDR       0x00000fb8 /* GISB ARBITER Breakpoint Capture Address Register */
466
#define GISB_ARBITER_BP_CAP_DATA       0x00000fbc /* GISB ARBITER Breakpoint Capture Data Register */
467
#define GISB_ARBITER_BP_CAP_STATUS     0x00000fc0 /* GISB ARBITER Breakpoint Capture Status Register */
468
#define GISB_ARBITER_BP_CAP_MASTER     0x00000fc4 /* GISB ARBITER Breakpoint Capture GISB MASTER Register */
469
#define GISB_ARBITER_ERR_CAP_CLR       0x00000fc8 /* GISB ARBITER Error Capture Clear Register */
470
#define GISB_ARBITER_ERR_CAP_ADDR      0x00000fcc /* GISB ARBITER Error Capture Address Register */
471
#define GISB_ARBITER_ERR_CAP_DATA      0x00000fd0 /* GISB ARBITER Error Capture Data Register */
472
#define GISB_ARBITER_ERR_CAP_STATUS    0x00000fd4 /* GISB ARBITER Error Capture Status Register */
473
#define GISB_ARBITER_ERR_CAP_MASTER    0x00000fd8 /* GISB ARBITER Error Capture GISB MASTER Register */
474
475
476
/****************************************************************************
477
 * BCM70012_MISC_TOP_MISC_GR_BRIDGE
478
 ***************************************************************************/
479
#define MISC_GR_BRIDGE_REVISION        0x00000fe0 /* GR Bridge Revision */
480
#define MISC_GR_BRIDGE_CTRL            0x00000fe4 /* GR Bridge Control Register */
481
#define MISC_GR_BRIDGE_SPARE_SW_RESET_0 0x00000fe8 /* GR Bridge Software Reset 0 Register */
482
#define MISC_GR_BRIDGE_SPARE_SW_RESET_1 0x00000fec /* GR Bridge Software Reset 1 Register */
483
484
485
/****************************************************************************
486
 * BCM70012_DBU_TOP_DBU
487
 ***************************************************************************/
488
#define DBU_DBU_CMD                    0x00001000 /* DBU (Debug UART) command register */
489
#define DBU_DBU_STATUS                 0x00001004 /* DBU (Debug UART) status register */
490
#define DBU_DBU_CONFIG                 0x00001008 /* DBU (Debug UART) configuration register */
491
#define DBU_DBU_TIMING                 0x0000100c /* DBU (Debug UART) timing register */
492
#define DBU_DBU_RXDATA                 0x00001010 /* DBU (Debug UART) recieve data register */
493
#define DBU_DBU_TXDATA                 0x00001014 /* DBU (Debug UART) transmit data register */
494
495
496
/****************************************************************************
497
 * BCM70012_DBU_TOP_DBU_RGR_BRIDGE
498
 ***************************************************************************/
499
#define DBU_RGR_BRIDGE_REVISION        0x000013e0 /* RGR Bridge Revision */
500
#define DBU_RGR_BRIDGE_CTRL            0x000013e4 /* RGR Bridge Control Register */
501
#define DBU_RGR_BRIDGE_RBUS_TIMER      0x000013e8 /* RGR Bridge RBUS Timer Register */
502
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0 0x000013ec /* RGR Bridge Software Reset 0 Register */
503
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1 0x000013f0 /* RGR Bridge Software Reset 1 Register */
313
504
314
505
315
/****************************************************************************
506
/****************************************************************************
Lines 342-347 Link Here
342
533
343
534
344
/****************************************************************************
535
/****************************************************************************
536
 * BCM70012_OTP_TOP_OTP_GR_BRIDGE
537
 ***************************************************************************/
538
#define OTP_GR_BRIDGE_REVISION         0x000017e0 /* GR Bridge Revision */
539
#define OTP_GR_BRIDGE_CTRL             0x000017e4 /* GR Bridge Control Register */
540
#define OTP_GR_BRIDGE_SPARE_SW_RESET_0 0x000017e8 /* GR Bridge Software Reset 0 Register */
541
#define OTP_GR_BRIDGE_SPARE_SW_RESET_1 0x000017ec /* GR Bridge Software Reset 1 Register */
542
543
544
/****************************************************************************
345
 * BCM70012_AES_TOP_AES
545
 * BCM70012_AES_TOP_AES
346
 ***************************************************************************/
546
 ***************************************************************************/
347
#define AES_CONFIG_INFO                0x00001800 /* AES Configuration Information Register */
547
#define AES_CONFIG_INFO                0x00001800 /* AES Configuration Information Register */
Lines 355-360 Link Here
355
555
356
556
357
/****************************************************************************
557
/****************************************************************************
558
 * BCM70012_AES_TOP_AES_RGR_BRIDGE
559
 ***************************************************************************/
560
#define AES_RGR_BRIDGE_REVISION        0x00001be0 /* RGR Bridge Revision */
561
#define AES_RGR_BRIDGE_CTRL            0x00001be4 /* RGR Bridge Control Register */
562
#define AES_RGR_BRIDGE_RBUS_TIMER      0x00001be8 /* RGR Bridge RBUS Timer Register */
563
#define AES_RGR_BRIDGE_SPARE_SW_RESET_0 0x00001bec /* RGR Bridge Software Reset 0 Register */
564
#define AES_RGR_BRIDGE_SPARE_SW_RESET_1 0x00001bf0 /* RGR Bridge Software Reset 1 Register */
565
566
567
/****************************************************************************
358
 * BCM70012_DCI_TOP_DCI
568
 * BCM70012_DCI_TOP_DCI
359
 ***************************************************************************/
569
 ***************************************************************************/
360
#define DCI_CMD                        0x00001c00 /* DCI Command Register */
570
#define DCI_CMD                        0x00001c00 /* DCI Command Register */
Lines 373-752 Link Here
373
583
374
584
375
/****************************************************************************
585
/****************************************************************************
376
 * BCM70012_TGT_TOP_INTR
586
 * BCM70012_DCI_TOP_DCI_RGR_BRIDGE
377
 ***************************************************************************/
587
 ***************************************************************************/
588
#define DCI_RGR_BRIDGE_REVISION        0x00001fe0 /* RGR Bridge Revision */
589
#define DCI_RGR_BRIDGE_CTRL            0x00001fe4 /* RGR Bridge Control Register */
590
#define DCI_RGR_BRIDGE_RBUS_TIMER      0x00001fe8 /* RGR Bridge RBUS Timer Register */
591
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0 0x00001fec /* RGR Bridge Software Reset 0 Register */
592
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1 0x00001ff0 /* RGR Bridge Software Reset 1 Register */
593
594
378
/****************************************************************************
595
/****************************************************************************
379
 * INTR :: INTR_STATUS
596
 * BCM70012_CCE_TOP_CCE_RGR_BRIDGE
380
 ***************************************************************************/
597
 ***************************************************************************/
381
/* INTR :: INTR_STATUS :: reserved0 [31:26] */
598
#define CCE_RGR_BRIDGE_REVISION        0x000023e0 /* RGR Bridge Revision */
382
#define INTR_INTR_STATUS_reserved0_MASK                            0xfc000000
599
#define CCE_RGR_BRIDGE_CTRL            0x000023e4 /* RGR Bridge Control Register */
383
#define INTR_INTR_STATUS_reserved0_ALIGN                           0
600
#define CCE_RGR_BRIDGE_RBUS_TIMER      0x000023e8 /* RGR Bridge RBUS Timer Register */
384
#define INTR_INTR_STATUS_reserved0_BITS                            6
601
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0 0x000023ec /* RGR Bridge Software Reset 0 Register */
385
#define INTR_INTR_STATUS_reserved0_SHIFT                           26
602
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1 0x000023f0 /* RGR Bridge Software Reset 1 Register */
386
603
387
/* INTR :: INTR_STATUS :: PCIE_TGT_CA_ATTN [25:25] */
388
#define INTR_INTR_STATUS_PCIE_TGT_CA_ATTN_MASK                     0x02000000
389
#define INTR_INTR_STATUS_PCIE_TGT_CA_ATTN_ALIGN                    0
390
#define INTR_INTR_STATUS_PCIE_TGT_CA_ATTN_BITS                     1
391
#define INTR_INTR_STATUS_PCIE_TGT_CA_ATTN_SHIFT                    25
392
604
393
/* INTR :: INTR_STATUS :: PCIE_TGT_UR_ATTN [24:24] */
605
/****************************************************************************
394
#define INTR_INTR_STATUS_PCIE_TGT_UR_ATTN_MASK                     0x01000000
606
 * BCM70012_TGT_TOP_PCIE_CFG
395
#define INTR_INTR_STATUS_PCIE_TGT_UR_ATTN_ALIGN                    0
607
 ***************************************************************************/
396
#define INTR_INTR_STATUS_PCIE_TGT_UR_ATTN_BITS                     1
608
/****************************************************************************
397
#define INTR_INTR_STATUS_PCIE_TGT_UR_ATTN_SHIFT                    24
609
 * PCIE_CFG :: DEVICE_VENDOR_ID
610
 ***************************************************************************/
611
/* PCIE_CFG :: DEVICE_VENDOR_ID :: DEVICE_ID [31:16] */
612
#define PCIE_CFG_DEVICE_VENDOR_ID_DEVICE_ID_MASK                   0xffff0000
613
#define PCIE_CFG_DEVICE_VENDOR_ID_DEVICE_ID_ALIGN                  0
614
#define PCIE_CFG_DEVICE_VENDOR_ID_DEVICE_ID_BITS                   16
615
#define PCIE_CFG_DEVICE_VENDOR_ID_DEVICE_ID_SHIFT                  16
616
617
/* PCIE_CFG :: DEVICE_VENDOR_ID :: VENDOR_ID [15:00] */
618
#define PCIE_CFG_DEVICE_VENDOR_ID_VENDOR_ID_MASK                   0x0000ffff
619
#define PCIE_CFG_DEVICE_VENDOR_ID_VENDOR_ID_ALIGN                  0
620
#define PCIE_CFG_DEVICE_VENDOR_ID_VENDOR_ID_BITS                   16
621
#define PCIE_CFG_DEVICE_VENDOR_ID_VENDOR_ID_SHIFT                  0
398
622
399
/* INTR :: INTR_STATUS :: reserved1 [23:14] */
400
#define INTR_INTR_STATUS_reserved1_MASK                            0x00ffc000
401
#define INTR_INTR_STATUS_reserved1_ALIGN                           0
402
#define INTR_INTR_STATUS_reserved1_BITS                            10
403
#define INTR_INTR_STATUS_reserved1_SHIFT                           14
404
623
405
/* INTR :: INTR_STATUS :: L1_UV_RX_DMA_ERR_INTR [13:13] */
624
/****************************************************************************
406
#define INTR_INTR_STATUS_L1_UV_RX_DMA_ERR_INTR_MASK                0x00002000
625
 * PCIE_CFG :: STATUS_COMMAND
407
#define INTR_INTR_STATUS_L1_UV_RX_DMA_ERR_INTR_ALIGN               0
626
 ***************************************************************************/
408
#define INTR_INTR_STATUS_L1_UV_RX_DMA_ERR_INTR_BITS                1
627
/* PCIE_CFG :: STATUS_COMMAND :: DETECTED_PARITY_ERROR [31:31] */
409
#define INTR_INTR_STATUS_L1_UV_RX_DMA_ERR_INTR_SHIFT               13
628
#define PCIE_CFG_STATUS_COMMAND_DETECTED_PARITY_ERROR_MASK         0x80000000
629
#define PCIE_CFG_STATUS_COMMAND_DETECTED_PARITY_ERROR_ALIGN        0
630
#define PCIE_CFG_STATUS_COMMAND_DETECTED_PARITY_ERROR_BITS         1
631
#define PCIE_CFG_STATUS_COMMAND_DETECTED_PARITY_ERROR_SHIFT        31
632
633
/* PCIE_CFG :: STATUS_COMMAND :: SIGNALED_SYSTEM_ERROR [30:30] */
634
#define PCIE_CFG_STATUS_COMMAND_SIGNALED_SYSTEM_ERROR_MASK         0x40000000
635
#define PCIE_CFG_STATUS_COMMAND_SIGNALED_SYSTEM_ERROR_ALIGN        0
636
#define PCIE_CFG_STATUS_COMMAND_SIGNALED_SYSTEM_ERROR_BITS         1
637
#define PCIE_CFG_STATUS_COMMAND_SIGNALED_SYSTEM_ERROR_SHIFT        30
638
639
/* PCIE_CFG :: STATUS_COMMAND :: RECEIVED_MASTER_ABORT [29:29] */
640
#define PCIE_CFG_STATUS_COMMAND_RECEIVED_MASTER_ABORT_MASK         0x20000000
641
#define PCIE_CFG_STATUS_COMMAND_RECEIVED_MASTER_ABORT_ALIGN        0
642
#define PCIE_CFG_STATUS_COMMAND_RECEIVED_MASTER_ABORT_BITS         1
643
#define PCIE_CFG_STATUS_COMMAND_RECEIVED_MASTER_ABORT_SHIFT        29
644
645
/* PCIE_CFG :: STATUS_COMMAND :: RECEIVED_TARGET_ABORT [28:28] */
646
#define PCIE_CFG_STATUS_COMMAND_RECEIVED_TARGET_ABORT_MASK         0x10000000
647
#define PCIE_CFG_STATUS_COMMAND_RECEIVED_TARGET_ABORT_ALIGN        0
648
#define PCIE_CFG_STATUS_COMMAND_RECEIVED_TARGET_ABORT_BITS         1
649
#define PCIE_CFG_STATUS_COMMAND_RECEIVED_TARGET_ABORT_SHIFT        28
650
651
/* PCIE_CFG :: STATUS_COMMAND :: SIGNALED_TARGET_ABORT [27:27] */
652
#define PCIE_CFG_STATUS_COMMAND_SIGNALED_TARGET_ABORT_MASK         0x08000000
653
#define PCIE_CFG_STATUS_COMMAND_SIGNALED_TARGET_ABORT_ALIGN        0
654
#define PCIE_CFG_STATUS_COMMAND_SIGNALED_TARGET_ABORT_BITS         1
655
#define PCIE_CFG_STATUS_COMMAND_SIGNALED_TARGET_ABORT_SHIFT        27
656
657
/* PCIE_CFG :: STATUS_COMMAND :: DEVSEL_TIMING [26:25] */
658
#define PCIE_CFG_STATUS_COMMAND_DEVSEL_TIMING_MASK                 0x06000000
659
#define PCIE_CFG_STATUS_COMMAND_DEVSEL_TIMING_ALIGN                0
660
#define PCIE_CFG_STATUS_COMMAND_DEVSEL_TIMING_BITS                 2
661
#define PCIE_CFG_STATUS_COMMAND_DEVSEL_TIMING_SHIFT                25
662
663
/* PCIE_CFG :: STATUS_COMMAND :: MASTER_DATA_PARITY_ERROR [24:24] */
664
#define PCIE_CFG_STATUS_COMMAND_MASTER_DATA_PARITY_ERROR_MASK      0x01000000
665
#define PCIE_CFG_STATUS_COMMAND_MASTER_DATA_PARITY_ERROR_ALIGN     0
666
#define PCIE_CFG_STATUS_COMMAND_MASTER_DATA_PARITY_ERROR_BITS      1
667
#define PCIE_CFG_STATUS_COMMAND_MASTER_DATA_PARITY_ERROR_SHIFT     24
668
669
/* PCIE_CFG :: STATUS_COMMAND :: FAST_BACK_TO_BACK_CAPABLE [23:23] */
670
#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_CAPABLE_MASK     0x00800000
671
#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_CAPABLE_ALIGN    0
672
#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_CAPABLE_BITS     1
673
#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_CAPABLE_SHIFT    23
674
675
/* PCIE_CFG :: STATUS_COMMAND :: RESERVED_0 [22:22] */
676
#define PCIE_CFG_STATUS_COMMAND_RESERVED_0_MASK                    0x00400000
677
#define PCIE_CFG_STATUS_COMMAND_RESERVED_0_ALIGN                   0
678
#define PCIE_CFG_STATUS_COMMAND_RESERVED_0_BITS                    1
679
#define PCIE_CFG_STATUS_COMMAND_RESERVED_0_SHIFT                   22
680
681
/* PCIE_CFG :: STATUS_COMMAND :: CAPABLE_66MHZ [21:21] */
682
#define PCIE_CFG_STATUS_COMMAND_CAPABLE_66MHZ_MASK                 0x00200000
683
#define PCIE_CFG_STATUS_COMMAND_CAPABLE_66MHZ_ALIGN                0
684
#define PCIE_CFG_STATUS_COMMAND_CAPABLE_66MHZ_BITS                 1
685
#define PCIE_CFG_STATUS_COMMAND_CAPABLE_66MHZ_SHIFT                21
686
687
/* PCIE_CFG :: STATUS_COMMAND :: CAPABILITIES_LIST [20:20] */
688
#define PCIE_CFG_STATUS_COMMAND_CAPABILITIES_LIST_MASK             0x00100000
689
#define PCIE_CFG_STATUS_COMMAND_CAPABILITIES_LIST_ALIGN            0
690
#define PCIE_CFG_STATUS_COMMAND_CAPABILITIES_LIST_BITS             1
691
#define PCIE_CFG_STATUS_COMMAND_CAPABILITIES_LIST_SHIFT            20
692
693
/* PCIE_CFG :: STATUS_COMMAND :: INTERRUPT_STATUS [19:19] */
694
#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_STATUS_MASK              0x00080000
695
#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_STATUS_ALIGN             0
696
#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_STATUS_BITS              1
697
#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_STATUS_SHIFT             19
698
699
/* PCIE_CFG :: STATUS_COMMAND :: RESERVED_1 [18:16] */
700
#define PCIE_CFG_STATUS_COMMAND_RESERVED_1_MASK                    0x00070000
701
#define PCIE_CFG_STATUS_COMMAND_RESERVED_1_ALIGN                   0
702
#define PCIE_CFG_STATUS_COMMAND_RESERVED_1_BITS                    3
703
#define PCIE_CFG_STATUS_COMMAND_RESERVED_1_SHIFT                   16
704
705
/* PCIE_CFG :: STATUS_COMMAND :: RESERVED_2 [15:11] */
706
#define PCIE_CFG_STATUS_COMMAND_RESERVED_2_MASK                    0x0000f800
707
#define PCIE_CFG_STATUS_COMMAND_RESERVED_2_ALIGN                   0
708
#define PCIE_CFG_STATUS_COMMAND_RESERVED_2_BITS                    5
709
#define PCIE_CFG_STATUS_COMMAND_RESERVED_2_SHIFT                   11
710
711
/* PCIE_CFG :: STATUS_COMMAND :: INTERRUPT_DISABLE [10:10] */
712
#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_DISABLE_MASK             0x00000400
713
#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_DISABLE_ALIGN            0
714
#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_DISABLE_BITS             1
715
#define PCIE_CFG_STATUS_COMMAND_INTERRUPT_DISABLE_SHIFT            10
716
717
/* PCIE_CFG :: STATUS_COMMAND :: FAST_BACK_TO_BACK_ENABLE [09:09] */
718
#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_ENABLE_MASK      0x00000200
719
#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_ENABLE_ALIGN     0
720
#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_ENABLE_BITS      1
721
#define PCIE_CFG_STATUS_COMMAND_FAST_BACK_TO_BACK_ENABLE_SHIFT     9
722
723
/* PCIE_CFG :: STATUS_COMMAND :: SYSTEM_ERROR_ENABLE [08:08] */
724
#define PCIE_CFG_STATUS_COMMAND_SYSTEM_ERROR_ENABLE_MASK           0x00000100
725
#define PCIE_CFG_STATUS_COMMAND_SYSTEM_ERROR_ENABLE_ALIGN          0
726
#define PCIE_CFG_STATUS_COMMAND_SYSTEM_ERROR_ENABLE_BITS           1
727
#define PCIE_CFG_STATUS_COMMAND_SYSTEM_ERROR_ENABLE_SHIFT          8
728
729
/* PCIE_CFG :: STATUS_COMMAND :: STEPPING_CONTROL [07:07] */
730
#define PCIE_CFG_STATUS_COMMAND_STEPPING_CONTROL_MASK              0x00000080
731
#define PCIE_CFG_STATUS_COMMAND_STEPPING_CONTROL_ALIGN             0
732
#define PCIE_CFG_STATUS_COMMAND_STEPPING_CONTROL_BITS              1
733
#define PCIE_CFG_STATUS_COMMAND_STEPPING_CONTROL_SHIFT             7
734
735
/* PCIE_CFG :: STATUS_COMMAND :: PARITY_ERROR_ENABLE [06:06] */
736
#define PCIE_CFG_STATUS_COMMAND_PARITY_ERROR_ENABLE_MASK           0x00000040
737
#define PCIE_CFG_STATUS_COMMAND_PARITY_ERROR_ENABLE_ALIGN          0
738
#define PCIE_CFG_STATUS_COMMAND_PARITY_ERROR_ENABLE_BITS           1
739
#define PCIE_CFG_STATUS_COMMAND_PARITY_ERROR_ENABLE_SHIFT          6
740
741
/* PCIE_CFG :: STATUS_COMMAND :: VGA_PALETTE_SNOOP [05:05] */
742
#define PCIE_CFG_STATUS_COMMAND_VGA_PALETTE_SNOOP_MASK             0x00000020
743
#define PCIE_CFG_STATUS_COMMAND_VGA_PALETTE_SNOOP_ALIGN            0
744
#define PCIE_CFG_STATUS_COMMAND_VGA_PALETTE_SNOOP_BITS             1
745
#define PCIE_CFG_STATUS_COMMAND_VGA_PALETTE_SNOOP_SHIFT            5
746
747
/* PCIE_CFG :: STATUS_COMMAND :: MEMORY_WRITE_AND_INVALIDATE [04:04] */
748
#define PCIE_CFG_STATUS_COMMAND_MEMORY_WRITE_AND_INVALIDATE_MASK   0x00000010
749
#define PCIE_CFG_STATUS_COMMAND_MEMORY_WRITE_AND_INVALIDATE_ALIGN  0
750
#define PCIE_CFG_STATUS_COMMAND_MEMORY_WRITE_AND_INVALIDATE_BITS   1
751
#define PCIE_CFG_STATUS_COMMAND_MEMORY_WRITE_AND_INVALIDATE_SHIFT  4
752
753
/* PCIE_CFG :: STATUS_COMMAND :: SPECIAL_CYCLES [03:03] */
754
#define PCIE_CFG_STATUS_COMMAND_SPECIAL_CYCLES_MASK                0x00000008
755
#define PCIE_CFG_STATUS_COMMAND_SPECIAL_CYCLES_ALIGN               0
756
#define PCIE_CFG_STATUS_COMMAND_SPECIAL_CYCLES_BITS                1
757
#define PCIE_CFG_STATUS_COMMAND_SPECIAL_CYCLES_SHIFT               3
758
759
/* PCIE_CFG :: STATUS_COMMAND :: BUS_MASTER [02:02] */
760
#define PCIE_CFG_STATUS_COMMAND_BUS_MASTER_MASK                    0x00000004
761
#define PCIE_CFG_STATUS_COMMAND_BUS_MASTER_ALIGN                   0
762
#define PCIE_CFG_STATUS_COMMAND_BUS_MASTER_BITS                    1
763
#define PCIE_CFG_STATUS_COMMAND_BUS_MASTER_SHIFT                   2
764
765
/* PCIE_CFG :: STATUS_COMMAND :: MEMORY_SPACE [01:01] */
766
#define PCIE_CFG_STATUS_COMMAND_MEMORY_SPACE_MASK                  0x00000002
767
#define PCIE_CFG_STATUS_COMMAND_MEMORY_SPACE_ALIGN                 0
768
#define PCIE_CFG_STATUS_COMMAND_MEMORY_SPACE_BITS                  1
769
#define PCIE_CFG_STATUS_COMMAND_MEMORY_SPACE_SHIFT                 1
770
771
/* PCIE_CFG :: STATUS_COMMAND :: I_O_SPACE [00:00] */
772
#define PCIE_CFG_STATUS_COMMAND_I_O_SPACE_MASK                     0x00000001
773
#define PCIE_CFG_STATUS_COMMAND_I_O_SPACE_ALIGN                    0
774
#define PCIE_CFG_STATUS_COMMAND_I_O_SPACE_BITS                     1
775
#define PCIE_CFG_STATUS_COMMAND_I_O_SPACE_SHIFT                    0
410
776
411
/* INTR :: INTR_STATUS :: L1_UV_RX_DMA_DONE_INTR [12:12] */
412
#define INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_MASK               0x00001000
413
#define INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_ALIGN              0
414
#define INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_BITS               1
415
#define INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_SHIFT              12
416
777
417
/* INTR :: INTR_STATUS :: L1_Y_RX_DMA_ERR_INTR [11:11] */
778
/****************************************************************************
418
#define INTR_INTR_STATUS_L1_Y_RX_DMA_ERR_INTR_MASK                 0x00000800
779
 * PCIE_CFG :: PCI_CLASSCODE_AND_REVISION_ID
419
#define INTR_INTR_STATUS_L1_Y_RX_DMA_ERR_INTR_ALIGN                0
780
 ***************************************************************************/
420
#define INTR_INTR_STATUS_L1_Y_RX_DMA_ERR_INTR_BITS                 1
781
/* PCIE_CFG :: PCI_CLASSCODE_AND_REVISION_ID :: PCI_CLASSCODE [31:08] */
421
#define INTR_INTR_STATUS_L1_Y_RX_DMA_ERR_INTR_SHIFT                11
782
#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_PCI_CLASSCODE_MASK  0xffffff00
783
#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_PCI_CLASSCODE_ALIGN 0
784
#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_PCI_CLASSCODE_BITS  24
785
#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_PCI_CLASSCODE_SHIFT 8
786
787
/* PCIE_CFG :: PCI_CLASSCODE_AND_REVISION_ID :: REVISION_ID [07:00] */
788
#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_REVISION_ID_MASK    0x000000ff
789
#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_REVISION_ID_ALIGN   0
790
#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_REVISION_ID_BITS    8
791
#define PCIE_CFG_PCI_CLASSCODE_AND_REVISION_ID_REVISION_ID_SHIFT   0
422
792
423
/* INTR :: INTR_STATUS :: L1_Y_RX_DMA_DONE_INTR [10:10] */
424
#define INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_MASK                0x00000400
425
#define INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_ALIGN               0
426
#define INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_BITS                1
427
#define INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_SHIFT               10
428
793
429
/* INTR :: INTR_STATUS :: L1_TX_DMA_ERR_INTR [09:09] */
794
/****************************************************************************
430
#define INTR_INTR_STATUS_L1_TX_DMA_ERR_INTR_MASK                   0x00000200
795
 * PCIE_CFG :: BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE
431
#define INTR_INTR_STATUS_L1_TX_DMA_ERR_INTR_ALIGN                  0
796
 ***************************************************************************/
432
#define INTR_INTR_STATUS_L1_TX_DMA_ERR_INTR_BITS                   1
797
/* PCIE_CFG :: BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE :: BIST [31:24] */
433
#define INTR_INTR_STATUS_L1_TX_DMA_ERR_INTR_SHIFT                  9
798
#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_BIST_MASK 0xff000000
799
#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_BIST_ALIGN 0
800
#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_BIST_BITS 8
801
#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_BIST_SHIFT 24
802
803
/* PCIE_CFG :: BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE :: HEADER_TYPE [23:16] */
804
#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_HEADER_TYPE_MASK 0x00ff0000
805
#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_HEADER_TYPE_ALIGN 0
806
#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_HEADER_TYPE_BITS 8
807
#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_HEADER_TYPE_SHIFT 16
808
809
/* PCIE_CFG :: BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE :: LATENCY_TIMER [15:08] */
810
#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_LATENCY_TIMER_MASK 0x0000ff00
811
#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_LATENCY_TIMER_ALIGN 0
812
#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_LATENCY_TIMER_BITS 8
813
#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_LATENCY_TIMER_SHIFT 8
814
815
/* PCIE_CFG :: BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE :: CACHE_LINE_SIZE [07:00] */
816
#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_CACHE_LINE_SIZE_MASK 0x000000ff
817
#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_CACHE_LINE_SIZE_ALIGN 0
818
#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_CACHE_LINE_SIZE_BITS 8
819
#define PCIE_CFG_BIST_HEADER_TYPE_LATENCY_TIMER_CACHE_LINE_SIZE_CACHE_LINE_SIZE_SHIFT 0
434
820
435
/* INTR :: INTR_STATUS :: L1_TX_DMA_DONE_INTR [08:08] */
436
#define INTR_INTR_STATUS_L1_TX_DMA_DONE_INTR_MASK                  0x00000100
437
#define INTR_INTR_STATUS_L1_TX_DMA_DONE_INTR_ALIGN                 0
438
#define INTR_INTR_STATUS_L1_TX_DMA_DONE_INTR_BITS                  1
439
#define INTR_INTR_STATUS_L1_TX_DMA_DONE_INTR_SHIFT                 8
440
821
441
/* INTR :: INTR_STATUS :: reserved2 [07:06] */
822
/****************************************************************************
442
#define INTR_INTR_STATUS_reserved2_MASK                            0x000000c0
823
 * PCIE_CFG :: BASE_ADDRESS_1
443
#define INTR_INTR_STATUS_reserved2_ALIGN                           0
824
 ***************************************************************************/
444
#define INTR_INTR_STATUS_reserved2_BITS                            2
825
/* PCIE_CFG :: BASE_ADDRESS_1 :: BASE_ADDRESS [31:16] */
445
#define INTR_INTR_STATUS_reserved2_SHIFT                           6
826
#define PCIE_CFG_BASE_ADDRESS_1_BASE_ADDRESS_MASK                  0xffff0000
827
#define PCIE_CFG_BASE_ADDRESS_1_BASE_ADDRESS_ALIGN                 0
828
#define PCIE_CFG_BASE_ADDRESS_1_BASE_ADDRESS_BITS                  16
829
#define PCIE_CFG_BASE_ADDRESS_1_BASE_ADDRESS_SHIFT                 16
830
831
/* PCIE_CFG :: BASE_ADDRESS_1 :: RESERVED_0 [15:04] */
832
#define PCIE_CFG_BASE_ADDRESS_1_RESERVED_0_MASK                    0x0000fff0
833
#define PCIE_CFG_BASE_ADDRESS_1_RESERVED_0_ALIGN                   0
834
#define PCIE_CFG_BASE_ADDRESS_1_RESERVED_0_BITS                    12
835
#define PCIE_CFG_BASE_ADDRESS_1_RESERVED_0_SHIFT                   4
836
837
/* PCIE_CFG :: BASE_ADDRESS_1 :: PREFETCHABLE [03:03] */
838
#define PCIE_CFG_BASE_ADDRESS_1_PREFETCHABLE_MASK                  0x00000008
839
#define PCIE_CFG_BASE_ADDRESS_1_PREFETCHABLE_ALIGN                 0
840
#define PCIE_CFG_BASE_ADDRESS_1_PREFETCHABLE_BITS                  1
841
#define PCIE_CFG_BASE_ADDRESS_1_PREFETCHABLE_SHIFT                 3
842
843
/* PCIE_CFG :: BASE_ADDRESS_1 :: TYPE [02:01] */
844
#define PCIE_CFG_BASE_ADDRESS_1_TYPE_MASK                          0x00000006
845
#define PCIE_CFG_BASE_ADDRESS_1_TYPE_ALIGN                         0
846
#define PCIE_CFG_BASE_ADDRESS_1_TYPE_BITS                          2
847
#define PCIE_CFG_BASE_ADDRESS_1_TYPE_SHIFT                         1
848
849
/* PCIE_CFG :: BASE_ADDRESS_1 :: MEMORY_SPACE_INDICATOR [00:00] */
850
#define PCIE_CFG_BASE_ADDRESS_1_MEMORY_SPACE_INDICATOR_MASK        0x00000001
851
#define PCIE_CFG_BASE_ADDRESS_1_MEMORY_SPACE_INDICATOR_ALIGN       0
852
#define PCIE_CFG_BASE_ADDRESS_1_MEMORY_SPACE_INDICATOR_BITS        1
853
#define PCIE_CFG_BASE_ADDRESS_1_MEMORY_SPACE_INDICATOR_SHIFT       0
446
854
447
/* INTR :: INTR_STATUS :: L0_UV_RX_DMA_ERR_INTR [05:05] */
448
#define INTR_INTR_STATUS_L0_UV_RX_DMA_ERR_INTR_MASK                0x00000020
449
#define INTR_INTR_STATUS_L0_UV_RX_DMA_ERR_INTR_ALIGN               0
450
#define INTR_INTR_STATUS_L0_UV_RX_DMA_ERR_INTR_BITS                1
451
#define INTR_INTR_STATUS_L0_UV_RX_DMA_ERR_INTR_SHIFT               5
452
855
453
/* INTR :: INTR_STATUS :: L0_UV_RX_DMA_DONE_INTR [04:04] */
856
/****************************************************************************
454
#define INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_MASK               0x00000010
857
 * PCIE_CFG :: BASE_ADDRESS_2
455
#define INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_ALIGN              0
858
 ***************************************************************************/
456
#define INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_BITS               1
859
/* PCIE_CFG :: BASE_ADDRESS_2 :: EXTENDED_BASE_ADDRESS [31:00] */
457
#define INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_SHIFT              4
860
#define PCIE_CFG_BASE_ADDRESS_2_EXTENDED_BASE_ADDRESS_MASK         0xffffffff
861
#define PCIE_CFG_BASE_ADDRESS_2_EXTENDED_BASE_ADDRESS_ALIGN        0
862
#define PCIE_CFG_BASE_ADDRESS_2_EXTENDED_BASE_ADDRESS_BITS         32
863
#define PCIE_CFG_BASE_ADDRESS_2_EXTENDED_BASE_ADDRESS_SHIFT        0
458
864
459
/* INTR :: INTR_STATUS :: L0_Y_RX_DMA_ERR_INTR [03:03] */
460
#define INTR_INTR_STATUS_L0_Y_RX_DMA_ERR_INTR_MASK                 0x00000008
461
#define INTR_INTR_STATUS_L0_Y_RX_DMA_ERR_INTR_ALIGN                0
462
#define INTR_INTR_STATUS_L0_Y_RX_DMA_ERR_INTR_BITS                 1
463
#define INTR_INTR_STATUS_L0_Y_RX_DMA_ERR_INTR_SHIFT                3
464
865
465
/* INTR :: INTR_STATUS :: L0_Y_RX_DMA_DONE_INTR [02:02] */
866
/****************************************************************************
466
#define INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_MASK                0x00000004
867
 * PCIE_CFG :: BASE_ADDRESS_3
467
#define INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_ALIGN               0
868
 ***************************************************************************/
468
#define INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_BITS                1
869
/* PCIE_CFG :: BASE_ADDRESS_3 :: BASE_ADDRESS_2 [31:22] */
469
#define INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_SHIFT               2
870
#define PCIE_CFG_BASE_ADDRESS_3_BASE_ADDRESS_2_MASK                0xffc00000
871
#define PCIE_CFG_BASE_ADDRESS_3_BASE_ADDRESS_2_ALIGN               0
872
#define PCIE_CFG_BASE_ADDRESS_3_BASE_ADDRESS_2_BITS                10
873
#define PCIE_CFG_BASE_ADDRESS_3_BASE_ADDRESS_2_SHIFT               22
874
875
/* PCIE_CFG :: BASE_ADDRESS_3 :: RESERVED_0 [21:04] */
876
#define PCIE_CFG_BASE_ADDRESS_3_RESERVED_0_MASK                    0x003ffff0
877
#define PCIE_CFG_BASE_ADDRESS_3_RESERVED_0_ALIGN                   0
878
#define PCIE_CFG_BASE_ADDRESS_3_RESERVED_0_BITS                    18
879
#define PCIE_CFG_BASE_ADDRESS_3_RESERVED_0_SHIFT                   4
880
881
/* PCIE_CFG :: BASE_ADDRESS_3 :: PREFETCHABLE [03:03] */
882
#define PCIE_CFG_BASE_ADDRESS_3_PREFETCHABLE_MASK                  0x00000008
883
#define PCIE_CFG_BASE_ADDRESS_3_PREFETCHABLE_ALIGN                 0
884
#define PCIE_CFG_BASE_ADDRESS_3_PREFETCHABLE_BITS                  1
885
#define PCIE_CFG_BASE_ADDRESS_3_PREFETCHABLE_SHIFT                 3
886
887
/* PCIE_CFG :: BASE_ADDRESS_3 :: TYPE [02:01] */
888
#define PCIE_CFG_BASE_ADDRESS_3_TYPE_MASK                          0x00000006
889
#define PCIE_CFG_BASE_ADDRESS_3_TYPE_ALIGN                         0
890
#define PCIE_CFG_BASE_ADDRESS_3_TYPE_BITS                          2
891
#define PCIE_CFG_BASE_ADDRESS_3_TYPE_SHIFT                         1
892
893
/* PCIE_CFG :: BASE_ADDRESS_3 :: MEMORY_SPACE_INDICATOR [00:00] */
894
#define PCIE_CFG_BASE_ADDRESS_3_MEMORY_SPACE_INDICATOR_MASK        0x00000001
895
#define PCIE_CFG_BASE_ADDRESS_3_MEMORY_SPACE_INDICATOR_ALIGN       0
896
#define PCIE_CFG_BASE_ADDRESS_3_MEMORY_SPACE_INDICATOR_BITS        1
897
#define PCIE_CFG_BASE_ADDRESS_3_MEMORY_SPACE_INDICATOR_SHIFT       0
470
898
471
/* INTR :: INTR_STATUS :: L0_TX_DMA_ERR_INTR [01:01] */
472
#define INTR_INTR_STATUS_L0_TX_DMA_ERR_INTR_MASK                   0x00000002
473
#define INTR_INTR_STATUS_L0_TX_DMA_ERR_INTR_ALIGN                  0
474
#define INTR_INTR_STATUS_L0_TX_DMA_ERR_INTR_BITS                   1
475
#define INTR_INTR_STATUS_L0_TX_DMA_ERR_INTR_SHIFT                  1
476
899
477
/* INTR :: INTR_STATUS :: L0_TX_DMA_DONE_INTR [00:00] */
900
/****************************************************************************
478
#define INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_MASK                  0x00000001
901
 * PCIE_CFG :: BASE_ADDRESS_4
479
#define INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_ALIGN                 0
902
 ***************************************************************************/
480
#define INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_BITS                  1
903
/* PCIE_CFG :: BASE_ADDRESS_4 :: EXTENDED_BASE_ADDRESS_2 [31:00] */
481
#define INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_SHIFT                 0
904
#define PCIE_CFG_BASE_ADDRESS_4_EXTENDED_BASE_ADDRESS_2_MASK       0xffffffff
905
#define PCIE_CFG_BASE_ADDRESS_4_EXTENDED_BASE_ADDRESS_2_ALIGN      0
906
#define PCIE_CFG_BASE_ADDRESS_4_EXTENDED_BASE_ADDRESS_2_BITS       32
907
#define PCIE_CFG_BASE_ADDRESS_4_EXTENDED_BASE_ADDRESS_2_SHIFT      0
482
908
483
909
484
/****************************************************************************
910
/****************************************************************************
485
 * MISC1 :: TX_SW_DESC_LIST_CTRL_STS
911
 * PCIE_CFG :: CARDBUS_CIS_POINTER
486
 ***************************************************************************/
912
 ***************************************************************************/
487
/* MISC1 :: TX_SW_DESC_LIST_CTRL_STS :: reserved0 [31:04] */
913
/* PCIE_CFG :: CARDBUS_CIS_POINTER :: CARDBUS_CIS_POINTER [31:00] */
488
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_reserved0_MASK              0xfffffff0
914
#define PCIE_CFG_CARDBUS_CIS_POINTER_CARDBUS_CIS_POINTER_MASK      0xffffffff
489
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_reserved0_ALIGN             0
915
#define PCIE_CFG_CARDBUS_CIS_POINTER_CARDBUS_CIS_POINTER_ALIGN     0
490
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_reserved0_BITS              28
916
#define PCIE_CFG_CARDBUS_CIS_POINTER_CARDBUS_CIS_POINTER_BITS      32
491
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_reserved0_SHIFT             4
917
#define PCIE_CFG_CARDBUS_CIS_POINTER_CARDBUS_CIS_POINTER_SHIFT     0
492
918
493
/* MISC1 :: TX_SW_DESC_LIST_CTRL_STS :: DMA_DATA_SERV_PTR [03:03] */
494
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_MASK      0x00000008
495
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_ALIGN     0
496
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_BITS      1
497
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_SHIFT     3
498
919
499
/* MISC1 :: TX_SW_DESC_LIST_CTRL_STS :: DESC_SERV_PTR [02:02] */
920
/****************************************************************************
500
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_MASK          0x00000004
921
 * PCIE_CFG :: SUBSYSTEM_DEVICE_VENDOR_ID
501
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_ALIGN         0
922
 ***************************************************************************/
502
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_BITS          1
923
/* PCIE_CFG :: SUBSYSTEM_DEVICE_VENDOR_ID :: SUBSYSTEM_DEVICE_ID [31:16] */
503
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_SHIFT         2
924
#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_DEVICE_ID_MASK 0xffff0000
925
#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_DEVICE_ID_ALIGN 0
926
#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_DEVICE_ID_BITS 16
927
#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_DEVICE_ID_SHIFT 16
928
929
/* PCIE_CFG :: SUBSYSTEM_DEVICE_VENDOR_ID :: SUBSYSTEM_VENDOR_ID [15:00] */
930
#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_VENDOR_ID_MASK 0x0000ffff
931
#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_VENDOR_ID_ALIGN 0
932
#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_VENDOR_ID_BITS 16
933
#define PCIE_CFG_SUBSYSTEM_DEVICE_VENDOR_ID_SUBSYSTEM_VENDOR_ID_SHIFT 0
504
934
505
/* MISC1 :: TX_SW_DESC_LIST_CTRL_STS :: TX_DMA_HALT_ON_ERROR [01:01] */
506
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_HALT_ON_ERROR_MASK   0x00000002
507
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_HALT_ON_ERROR_ALIGN  0
508
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_HALT_ON_ERROR_BITS   1
509
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_HALT_ON_ERROR_SHIFT  1
510
935
511
/* MISC1 :: TX_SW_DESC_LIST_CTRL_STS :: TX_DMA_RUN_STOP [00:00] */
936
/****************************************************************************
512
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_MASK        0x00000001
937
 * PCIE_CFG :: EXPANSION_ROM_BASE_ADDRESS
513
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_ALIGN       0
938
 ***************************************************************************/
514
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_BITS        1
939
/* PCIE_CFG :: EXPANSION_ROM_BASE_ADDRESS :: ROM_BASE_ADDRESS [31:16] */
515
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_SHIFT       0
940
#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_BASE_ADDRESS_MASK  0xffff0000
941
#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_BASE_ADDRESS_ALIGN 0
942
#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_BASE_ADDRESS_BITS  16
943
#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_BASE_ADDRESS_SHIFT 16
944
945
/* PCIE_CFG :: EXPANSION_ROM_BASE_ADDRESS :: ROM_SIZE_INDICATION [15:11] */
946
#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_SIZE_INDICATION_MASK 0x0000f800
947
#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_SIZE_INDICATION_ALIGN 0
948
#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_SIZE_INDICATION_BITS 5
949
#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_ROM_SIZE_INDICATION_SHIFT 11
950
951
/* PCIE_CFG :: EXPANSION_ROM_BASE_ADDRESS :: RESERVED_0 [10:01] */
952
#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_RESERVED_0_MASK        0x000007fe
953
#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_RESERVED_0_ALIGN       0
954
#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_RESERVED_0_BITS        10
955
#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_RESERVED_0_SHIFT       1
956
957
/* PCIE_CFG :: EXPANSION_ROM_BASE_ADDRESS :: EXPANSION_ROM_ENABLE [00:00] */
958
#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_EXPANSION_ROM_ENABLE_MASK 0x00000001
959
#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_EXPANSION_ROM_ENABLE_ALIGN 0
960
#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_EXPANSION_ROM_ENABLE_BITS 1
961
#define PCIE_CFG_EXPANSION_ROM_BASE_ADDRESS_EXPANSION_ROM_ENABLE_SHIFT 0
516
962
517
963
518
/****************************************************************************
964
/****************************************************************************
519
 * MISC1 :: TX_DMA_ERROR_STATUS
965
 * PCIE_CFG :: CAPABILITIES_POINTER
520
 ***************************************************************************/
966
 ***************************************************************************/
521
/* MISC1 :: TX_DMA_ERROR_STATUS :: reserved0 [31:10] */
967
/* PCIE_CFG :: CAPABILITIES_POINTER :: CAPABILITIES_POINTER [31:00] */
522
#define MISC1_TX_DMA_ERROR_STATUS_reserved0_MASK                   0xfffffc00
968
#define PCIE_CFG_CAPABILITIES_POINTER_CAPABILITIES_POINTER_MASK    0xffffffff
523
#define MISC1_TX_DMA_ERROR_STATUS_reserved0_ALIGN                  0
969
#define PCIE_CFG_CAPABILITIES_POINTER_CAPABILITIES_POINTER_ALIGN   0
524
#define MISC1_TX_DMA_ERROR_STATUS_reserved0_BITS                   22
970
#define PCIE_CFG_CAPABILITIES_POINTER_CAPABILITIES_POINTER_BITS    32
525
#define MISC1_TX_DMA_ERROR_STATUS_reserved0_SHIFT                  10
971
#define PCIE_CFG_CAPABILITIES_POINTER_CAPABILITIES_POINTER_SHIFT   0
526
972
527
/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L1_DESC_TX_ABORT_ERRORS [09:09] */
528
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DESC_TX_ABORT_ERRORS_MASK  0x00000200
529
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DESC_TX_ABORT_ERRORS_ALIGN 0
530
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DESC_TX_ABORT_ERRORS_BITS  1
531
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DESC_TX_ABORT_ERRORS_SHIFT 9
532
973
533
/* MISC1 :: TX_DMA_ERROR_STATUS :: reserved1 [08:08] */
974
/****************************************************************************
534
#define MISC1_TX_DMA_ERROR_STATUS_reserved1_MASK                   0x00000100
975
 * PCIE_CFG :: INTERRUPT
535
#define MISC1_TX_DMA_ERROR_STATUS_reserved1_ALIGN                  0
976
 ***************************************************************************/
536
#define MISC1_TX_DMA_ERROR_STATUS_reserved1_BITS                   1
977
/* PCIE_CFG :: INTERRUPT :: RESERVED_0 [31:16] */
537
#define MISC1_TX_DMA_ERROR_STATUS_reserved1_SHIFT                  8
978
#define PCIE_CFG_INTERRUPT_RESERVED_0_MASK                         0xffff0000
979
#define PCIE_CFG_INTERRUPT_RESERVED_0_ALIGN                        0
980
#define PCIE_CFG_INTERRUPT_RESERVED_0_BITS                         16
981
#define PCIE_CFG_INTERRUPT_RESERVED_0_SHIFT                        16
982
983
/* PCIE_CFG :: INTERRUPT :: INTERRUPT_PIN [15:08] */
984
#define PCIE_CFG_INTERRUPT_INTERRUPT_PIN_MASK                      0x0000ff00
985
#define PCIE_CFG_INTERRUPT_INTERRUPT_PIN_ALIGN                     0
986
#define PCIE_CFG_INTERRUPT_INTERRUPT_PIN_BITS                      8
987
#define PCIE_CFG_INTERRUPT_INTERRUPT_PIN_SHIFT                     8
988
989
/* PCIE_CFG :: INTERRUPT :: INTERRUPT_LINE [07:00] */
990
#define PCIE_CFG_INTERRUPT_INTERRUPT_LINE_MASK                     0x000000ff
991
#define PCIE_CFG_INTERRUPT_INTERRUPT_LINE_ALIGN                    0
992
#define PCIE_CFG_INTERRUPT_INTERRUPT_LINE_BITS                     8
993
#define PCIE_CFG_INTERRUPT_INTERRUPT_LINE_SHIFT                    0
538
994
539
/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L0_DESC_TX_ABORT_ERRORS [07:07] */
540
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DESC_TX_ABORT_ERRORS_MASK  0x00000080
541
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DESC_TX_ABORT_ERRORS_ALIGN 0
542
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DESC_TX_ABORT_ERRORS_BITS  1
543
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DESC_TX_ABORT_ERRORS_SHIFT 7
544
995
545
/* MISC1 :: TX_DMA_ERROR_STATUS :: reserved2 [06:06] */
996
/****************************************************************************
546
#define MISC1_TX_DMA_ERROR_STATUS_reserved2_MASK                   0x00000040
997
 * PCIE_CFG :: VPD_CAPABILITIES
547
#define MISC1_TX_DMA_ERROR_STATUS_reserved2_ALIGN                  0
998
 ***************************************************************************/
548
#define MISC1_TX_DMA_ERROR_STATUS_reserved2_BITS                   1
999
/* PCIE_CFG :: VPD_CAPABILITIES :: RESERVED_0 [31:00] */
549
#define MISC1_TX_DMA_ERROR_STATUS_reserved2_SHIFT                  6
1000
#define PCIE_CFG_VPD_CAPABILITIES_RESERVED_0_MASK                  0xffffffff
1001
#define PCIE_CFG_VPD_CAPABILITIES_RESERVED_0_ALIGN                 0
1002
#define PCIE_CFG_VPD_CAPABILITIES_RESERVED_0_BITS                  32
1003
#define PCIE_CFG_VPD_CAPABILITIES_RESERVED_0_SHIFT                 0
550
1004
551
/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L1_DMA_DATA_TX_ABORT_ERRORS [05:05] */
552
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DMA_DATA_TX_ABORT_ERRORS_MASK 0x00000020
553
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DMA_DATA_TX_ABORT_ERRORS_ALIGN 0
554
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DMA_DATA_TX_ABORT_ERRORS_BITS 1
555
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DMA_DATA_TX_ABORT_ERRORS_SHIFT 5
556
1005
557
/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L1_FIFO_FULL_ERRORS [04:04] */
1006
/****************************************************************************
558
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_MASK      0x00000010
1007
 * PCIE_CFG :: VPD_DATA
559
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_ALIGN     0
1008
 ***************************************************************************/
560
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_BITS      1
1009
/* PCIE_CFG :: VPD_DATA :: RESERVED_0 [31:00] */
561
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_SHIFT     4
1010
#define PCIE_CFG_VPD_DATA_RESERVED_0_MASK                          0xffffffff
1011
#define PCIE_CFG_VPD_DATA_RESERVED_0_ALIGN                         0
1012
#define PCIE_CFG_VPD_DATA_RESERVED_0_BITS                          32
1013
#define PCIE_CFG_VPD_DATA_RESERVED_0_SHIFT                         0
562
1014
563
/* MISC1 :: TX_DMA_ERROR_STATUS :: reserved3 [03:03] */
564
#define MISC1_TX_DMA_ERROR_STATUS_reserved3_MASK                   0x00000008
565
#define MISC1_TX_DMA_ERROR_STATUS_reserved3_ALIGN                  0
566
#define MISC1_TX_DMA_ERROR_STATUS_reserved3_BITS                   1
567
#define MISC1_TX_DMA_ERROR_STATUS_reserved3_SHIFT                  3
568
1015
569
/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L0_DMA_DATA_TX_ABORT_ERRORS [02:02] */
1016
/****************************************************************************
570
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DMA_DATA_TX_ABORT_ERRORS_MASK 0x00000004
1017
 * PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY
571
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DMA_DATA_TX_ABORT_ERRORS_ALIGN 0
1018
 ***************************************************************************/
572
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DMA_DATA_TX_ABORT_ERRORS_BITS 1
1019
/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: PME_SUPPORT [31:27] */
573
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DMA_DATA_TX_ABORT_ERRORS_SHIFT 2
1020
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_SUPPORT_MASK      0xf8000000
1021
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_SUPPORT_ALIGN     0
1022
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_SUPPORT_BITS      5
1023
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_SUPPORT_SHIFT     27
1024
1025
/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: D2_SUPPORT [26:26] */
1026
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D2_SUPPORT_MASK       0x04000000
1027
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D2_SUPPORT_ALIGN      0
1028
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D2_SUPPORT_BITS       1
1029
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D2_SUPPORT_SHIFT      26
1030
1031
/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: D1_SUPPORT [25:25] */
1032
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D1_SUPPORT_MASK       0x02000000
1033
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D1_SUPPORT_ALIGN      0
1034
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D1_SUPPORT_BITS       1
1035
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_D1_SUPPORT_SHIFT      25
1036
1037
/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: AUX_CURRENT [24:22] */
1038
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_AUX_CURRENT_MASK      0x01c00000
1039
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_AUX_CURRENT_ALIGN     0
1040
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_AUX_CURRENT_BITS      3
1041
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_AUX_CURRENT_SHIFT     22
1042
1043
/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: DSI [21:21] */
1044
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_DSI_MASK              0x00200000
1045
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_DSI_ALIGN             0
1046
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_DSI_BITS              1
1047
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_DSI_SHIFT             21
1048
1049
/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: RESERVED_0 [20:20] */
1050
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_RESERVED_0_MASK       0x00100000
1051
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_RESERVED_0_ALIGN      0
1052
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_RESERVED_0_BITS       1
1053
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_RESERVED_0_SHIFT      20
1054
1055
/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: PME_CLOCK [19:19] */
1056
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_CLOCK_MASK        0x00080000
1057
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_CLOCK_ALIGN       0
1058
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_CLOCK_BITS        1
1059
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_PME_CLOCK_SHIFT       19
1060
1061
/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: VERSION [18:16] */
1062
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_VERSION_MASK          0x00070000
1063
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_VERSION_ALIGN         0
1064
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_VERSION_BITS          3
1065
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_VERSION_SHIFT         16
1066
1067
/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: NEXT_POINTER [15:08] */
1068
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_NEXT_POINTER_MASK     0x0000ff00
1069
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_NEXT_POINTER_ALIGN    0
1070
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_NEXT_POINTER_BITS     8
1071
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_NEXT_POINTER_SHIFT    8
1072
1073
/* PCIE_CFG :: POWER_MANAGEMENT_CAPABILITY :: CAPABILITY_ID [07:00] */
1074
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_CAPABILITY_ID_MASK    0x000000ff
1075
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_CAPABILITY_ID_ALIGN   0
1076
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_CAPABILITY_ID_BITS    8
1077
#define PCIE_CFG_POWER_MANAGEMENT_CAPABILITY_CAPABILITY_ID_SHIFT   0
574
1078
575
/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L0_FIFO_FULL_ERRORS [01:01] */
576
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_MASK      0x00000002
577
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_ALIGN     0
578
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_BITS      1
579
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_SHIFT     1
580
1079
581
/* MISC1 :: TX_DMA_ERROR_STATUS :: reserved4 [00:00] */
1080
/****************************************************************************
582
#define MISC1_TX_DMA_ERROR_STATUS_reserved4_MASK                   0x00000001
1081
 * PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS
583
#define MISC1_TX_DMA_ERROR_STATUS_reserved4_ALIGN                  0
1082
 ***************************************************************************/
584
#define MISC1_TX_DMA_ERROR_STATUS_reserved4_BITS                   1
1083
/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: PM_DATA [31:24] */
585
#define MISC1_TX_DMA_ERROR_STATUS_reserved4_SHIFT                  0
1084
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PM_DATA_MASK      0xff000000
1085
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PM_DATA_ALIGN     0
1086
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PM_DATA_BITS      8
1087
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PM_DATA_SHIFT     24
1088
1089
/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: RESERVED_0 [23:16] */
1090
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_0_MASK   0x00ff0000
1091
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_0_ALIGN  0
1092
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_0_BITS   8
1093
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_0_SHIFT  16
1094
1095
/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: PME_STATUS [15:15] */
1096
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_STATUS_MASK   0x00008000
1097
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_STATUS_ALIGN  0
1098
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_STATUS_BITS   1
1099
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_STATUS_SHIFT  15
1100
1101
/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: DATA_SCALE [14:13] */
1102
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SCALE_MASK   0x00006000
1103
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SCALE_ALIGN  0
1104
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SCALE_BITS   2
1105
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SCALE_SHIFT  13
1106
1107
/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: DATA_SELECT [12:09] */
1108
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SELECT_MASK  0x00001e00
1109
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SELECT_ALIGN 0
1110
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SELECT_BITS  4
1111
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_DATA_SELECT_SHIFT 9
1112
1113
/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: PME_ENABLE [08:08] */
1114
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_ENABLE_MASK   0x00000100
1115
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_ENABLE_ALIGN  0
1116
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_ENABLE_BITS   1
1117
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_PME_ENABLE_SHIFT  8
1118
1119
/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: RESERVED_1 [07:04] */
1120
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_1_MASK   0x000000f0
1121
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_1_ALIGN  0
1122
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_1_BITS   4
1123
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_1_SHIFT  4
1124
1125
/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: NO_SOFT_RESET [03:03] */
1126
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_NO_SOFT_RESET_MASK 0x00000008
1127
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_NO_SOFT_RESET_ALIGN 0
1128
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_NO_SOFT_RESET_BITS 1
1129
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_NO_SOFT_RESET_SHIFT 3
1130
1131
/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: RESERVED_2 [02:02] */
1132
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_2_MASK   0x00000004
1133
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_2_ALIGN  0
1134
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_2_BITS   1
1135
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_RESERVED_2_SHIFT  2
1136
1137
/* PCIE_CFG :: POWER_MANAGEMENT_CONTROL_STATUS :: POWER_STATE [01:00] */
1138
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_POWER_STATE_MASK  0x00000003
1139
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_POWER_STATE_ALIGN 0
1140
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_POWER_STATE_BITS  2
1141
#define PCIE_CFG_POWER_MANAGEMENT_CONTROL_STATUS_POWER_STATE_SHIFT 0
586
1142
587
1143
588
/****************************************************************************
1144
/****************************************************************************
589
 * MISC1 :: Y_RX_ERROR_STATUS
1145
 * PCIE_CFG :: MSI_CAPABILITY_HEADER
590
 ***************************************************************************/
1146
 ***************************************************************************/
591
/* MISC1 :: Y_RX_ERROR_STATUS :: reserved0 [31:14] */
1147
/* PCIE_CFG :: MSI_CAPABILITY_HEADER :: MSI_CONTROL [31:24] */
592
#define MISC1_Y_RX_ERROR_STATUS_reserved0_MASK                     0xffffc000
1148
#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_CONTROL_MASK            0xff000000
593
#define MISC1_Y_RX_ERROR_STATUS_reserved0_ALIGN                    0
1149
#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_CONTROL_ALIGN           0
594
#define MISC1_Y_RX_ERROR_STATUS_reserved0_BITS                     18
1150
#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_CONTROL_BITS            8
595
#define MISC1_Y_RX_ERROR_STATUS_reserved0_SHIFT                    14
1151
#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_CONTROL_SHIFT           24
1152
1153
/* PCIE_CFG :: MSI_CAPABILITY_HEADER :: ADDRESS_CAPABLE_64_BIT [23:23] */
1154
#define PCIE_CFG_MSI_CAPABILITY_HEADER_ADDRESS_CAPABLE_64_BIT_MASK 0x00800000
1155
#define PCIE_CFG_MSI_CAPABILITY_HEADER_ADDRESS_CAPABLE_64_BIT_ALIGN 0
1156
#define PCIE_CFG_MSI_CAPABILITY_HEADER_ADDRESS_CAPABLE_64_BIT_BITS 1
1157
#define PCIE_CFG_MSI_CAPABILITY_HEADER_ADDRESS_CAPABLE_64_BIT_SHIFT 23
1158
1159
/* PCIE_CFG :: MSI_CAPABILITY_HEADER :: MULTIPLE_MESSAGE_ENABLE [22:20] */
1160
#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_ENABLE_MASK 0x00700000
1161
#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_ENABLE_ALIGN 0
1162
#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_ENABLE_BITS 3
1163
#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_ENABLE_SHIFT 20
1164
1165
/* PCIE_CFG :: MSI_CAPABILITY_HEADER :: MULTIPLE_MESSAGE_CAPABLE [19:17] */
1166
#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_CAPABLE_MASK 0x000e0000
1167
#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_CAPABLE_ALIGN 0
1168
#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_CAPABLE_BITS 3
1169
#define PCIE_CFG_MSI_CAPABILITY_HEADER_MULTIPLE_MESSAGE_CAPABLE_SHIFT 17
1170
1171
/* PCIE_CFG :: MSI_CAPABILITY_HEADER :: MSI_ENABLE [16:16] */
1172
#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_ENABLE_MASK             0x00010000
1173
#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_ENABLE_ALIGN            0
1174
#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_ENABLE_BITS             1
1175
#define PCIE_CFG_MSI_CAPABILITY_HEADER_MSI_ENABLE_SHIFT            16
1176
1177
/* PCIE_CFG :: MSI_CAPABILITY_HEADER :: NEXT_POINTER [15:08] */
1178
#define PCIE_CFG_MSI_CAPABILITY_HEADER_NEXT_POINTER_MASK           0x0000ff00
1179
#define PCIE_CFG_MSI_CAPABILITY_HEADER_NEXT_POINTER_ALIGN          0
1180
#define PCIE_CFG_MSI_CAPABILITY_HEADER_NEXT_POINTER_BITS           8
1181
#define PCIE_CFG_MSI_CAPABILITY_HEADER_NEXT_POINTER_SHIFT          8
1182
1183
/* PCIE_CFG :: MSI_CAPABILITY_HEADER :: CAPABILITY_ID [07:00] */
1184
#define PCIE_CFG_MSI_CAPABILITY_HEADER_CAPABILITY_ID_MASK          0x000000ff
1185
#define PCIE_CFG_MSI_CAPABILITY_HEADER_CAPABILITY_ID_ALIGN         0
1186
#define PCIE_CFG_MSI_CAPABILITY_HEADER_CAPABILITY_ID_BITS          8
1187
#define PCIE_CFG_MSI_CAPABILITY_HEADER_CAPABILITY_ID_SHIFT         0
596
1188
597
/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L1_UNDERRUN_ERROR [13:13] */
598
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK          0x00002000
599
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_ALIGN         0
600
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_BITS          1
601
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_SHIFT         13
602
1189
603
/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L1_OVERRUN_ERROR [12:12] */
1190
/****************************************************************************
604
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_MASK           0x00001000
1191
 * PCIE_CFG :: MSI_LOWER_ADDRESS
1192
 ***************************************************************************/
1193
/* PCIE_CFG :: MSI_LOWER_ADDRESS :: MSI_LOWER_ADDRESS [31:02] */
1194
#define PCIE_CFG_MSI_LOWER_ADDRESS_MSI_LOWER_ADDRESS_MASK          0xfffffffc
1195
#define PCIE_CFG_MSI_LOWER_ADDRESS_MSI_LOWER_ADDRESS_ALIGN         0
1196
#define PCIE_CFG_MSI_LOWER_ADDRESS_MSI_LOWER_ADDRESS_BITS          30
1197
#define PCIE_CFG_MSI_LOWER_ADDRESS_MSI_LOWER_ADDRESS_SHIFT         2
1198
1199
/* PCIE_CFG :: MSI_LOWER_ADDRESS :: RESERVED_0 [01:00] */
1200
#define PCIE_CFG_MSI_LOWER_ADDRESS_RESERVED_0_MASK                 0x00000003
1201
#define PCIE_CFG_MSI_LOWER_ADDRESS_RESERVED_0_ALIGN                0
1202
#define PCIE_CFG_MSI_LOWER_ADDRESS_RESERVED_0_BITS                 2
1203
#define PCIE_CFG_MSI_LOWER_ADDRESS_RESERVED_0_SHIFT                0
1204
1205
1206
/****************************************************************************
1207
 * PCIE_CFG :: MSI_UPPER_ADDRESS_REGISTER
1208
 ***************************************************************************/
1209
/* PCIE_CFG :: MSI_UPPER_ADDRESS_REGISTER :: MSI_UPPER_ADDRESS [31:00] */
1210
#define PCIE_CFG_MSI_UPPER_ADDRESS_REGISTER_MSI_UPPER_ADDRESS_MASK 0xffffffff
1211
#define PCIE_CFG_MSI_UPPER_ADDRESS_REGISTER_MSI_UPPER_ADDRESS_ALIGN 0
1212
#define PCIE_CFG_MSI_UPPER_ADDRESS_REGISTER_MSI_UPPER_ADDRESS_BITS 32
1213
#define PCIE_CFG_MSI_UPPER_ADDRESS_REGISTER_MSI_UPPER_ADDRESS_SHIFT 0
1214
1215
1216
/****************************************************************************
1217
 * PCIE_CFG :: MSI_DATA
1218
 ***************************************************************************/
1219
/* PCIE_CFG :: MSI_DATA :: RESERVED_0 [31:16] */
1220
#define PCIE_CFG_MSI_DATA_RESERVED_0_MASK                          0xffff0000
1221
#define PCIE_CFG_MSI_DATA_RESERVED_0_ALIGN                         0
1222
#define PCIE_CFG_MSI_DATA_RESERVED_0_BITS                          16
1223
#define PCIE_CFG_MSI_DATA_RESERVED_0_SHIFT                         16
1224
1225
/* PCIE_CFG :: MSI_DATA :: MSI_DATA [15:00] */
1226
#define PCIE_CFG_MSI_DATA_MSI_DATA_MASK                            0x0000ffff
1227
#define PCIE_CFG_MSI_DATA_MSI_DATA_ALIGN                           0
1228
#define PCIE_CFG_MSI_DATA_MSI_DATA_BITS                            16
1229
#define PCIE_CFG_MSI_DATA_MSI_DATA_SHIFT                           0
1230
1231
1232
/****************************************************************************
1233
 * PCIE_CFG :: BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER
1234
 ***************************************************************************/
1235
/* PCIE_CFG :: BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER :: RESERVED_0 [31:24] */
1236
#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_RESERVED_0_MASK 0xff000000
1237
#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_RESERVED_0_ALIGN 0
1238
#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_RESERVED_0_BITS 8
1239
#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_RESERVED_0_SHIFT 24
1240
1241
/* PCIE_CFG :: BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER :: VENDOR_SPECIFIC_CAPABILITY_LENGTH [23:16] */
1242
#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_VENDOR_SPECIFIC_CAPABILITY_LENGTH_MASK 0x00ff0000
1243
#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_VENDOR_SPECIFIC_CAPABILITY_LENGTH_ALIGN 0
1244
#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_VENDOR_SPECIFIC_CAPABILITY_LENGTH_BITS 8
1245
#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_VENDOR_SPECIFIC_CAPABILITY_LENGTH_SHIFT 16
1246
1247
/* PCIE_CFG :: BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER :: NEXT_POINTER [15:08] */
1248
#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_NEXT_POINTER_MASK 0x0000ff00
1249
#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_NEXT_POINTER_ALIGN 0
1250
#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_NEXT_POINTER_BITS 8
1251
#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_NEXT_POINTER_SHIFT 8
1252
1253
/* PCIE_CFG :: BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER :: CAPABILITY_ID [07:00] */
1254
#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_CAPABILITY_ID_MASK 0x000000ff
1255
#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_CAPABILITY_ID_ALIGN 0
1256
#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_CAPABILITY_ID_BITS 8
1257
#define PCIE_CFG_BROADCOM_VENDOR_SPECIFIC_CAPABILITY_HEADER_CAPABILITY_ID_SHIFT 0
1258
1259
1260
/****************************************************************************
1261
 * PCIE_CFG :: RESET_COUNTERS_INITIAL_VALUES
1262
 ***************************************************************************/
1263
/* PCIE_CFG :: RESET_COUNTERS_INITIAL_VALUES :: POR_RESET_COUNTER [31:28] */
1264
#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_POR_RESET_COUNTER_MASK 0xf0000000
1265
#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_POR_RESET_COUNTER_ALIGN 0
1266
#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_POR_RESET_COUNTER_BITS 4
1267
#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_POR_RESET_COUNTER_SHIFT 28
1268
1269
/* PCIE_CFG :: RESET_COUNTERS_INITIAL_VALUES :: HOT_RESET_COUNTER [27:24] */
1270
#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_HOT_RESET_COUNTER_MASK 0x0f000000
1271
#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_HOT_RESET_COUNTER_ALIGN 0
1272
#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_HOT_RESET_COUNTER_BITS 4
1273
#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_HOT_RESET_COUNTER_SHIFT 24
1274
1275
/* PCIE_CFG :: RESET_COUNTERS_INITIAL_VALUES :: GRC_RESET_COUNTER [23:16] */
1276
#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_GRC_RESET_COUNTER_MASK 0x00ff0000
1277
#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_GRC_RESET_COUNTER_ALIGN 0
1278
#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_GRC_RESET_COUNTER_BITS 8
1279
#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_GRC_RESET_COUNTER_SHIFT 16
1280
1281
/* PCIE_CFG :: RESET_COUNTERS_INITIAL_VALUES :: PERST_RESET_COUNTER [15:08] */
1282
#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_PERST_RESET_COUNTER_MASK 0x0000ff00
1283
#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_PERST_RESET_COUNTER_ALIGN 0
1284
#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_PERST_RESET_COUNTER_BITS 8
1285
#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_PERST_RESET_COUNTER_SHIFT 8
1286
1287
/* PCIE_CFG :: RESET_COUNTERS_INITIAL_VALUES :: LINKDOWN_RESET_COUNTER [07:00] */
1288
#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_LINKDOWN_RESET_COUNTER_MASK 0x000000ff
1289
#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_LINKDOWN_RESET_COUNTER_ALIGN 0
1290
#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_LINKDOWN_RESET_COUNTER_BITS 8
1291
#define PCIE_CFG_RESET_COUNTERS_INITIAL_VALUES_LINKDOWN_RESET_COUNTER_SHIFT 0
1292
1293
1294
/****************************************************************************
1295
 * PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL
1296
 ***************************************************************************/
1297
/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: PRODUCT_ID [31:24] */
1298
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_PRODUCT_ID_MASK        0xff000000
1299
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_PRODUCT_ID_ALIGN       0
1300
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_PRODUCT_ID_BITS        8
1301
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_PRODUCT_ID_SHIFT       24
1302
1303
/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ASIC_REVISION_ID [23:16] */
1304
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ASIC_REVISION_ID_MASK  0x00ff0000
1305
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ASIC_REVISION_ID_ALIGN 0
1306
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ASIC_REVISION_ID_BITS  8
1307
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ASIC_REVISION_ID_SHIFT 16
1308
1309
/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_TLP_MINOR_ERROR_TOLERANCE [15:15] */
1310
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TLP_MINOR_ERROR_TOLERANCE_MASK 0x00008000
1311
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TLP_MINOR_ERROR_TOLERANCE_ALIGN 0
1312
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TLP_MINOR_ERROR_TOLERANCE_BITS 1
1313
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TLP_MINOR_ERROR_TOLERANCE_SHIFT 15
1314
1315
/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: LOG_HEADER_OVERFLOW [14:14] */
1316
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_LOG_HEADER_OVERFLOW_MASK 0x00004000
1317
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_LOG_HEADER_OVERFLOW_ALIGN 0
1318
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_LOG_HEADER_OVERFLOW_BITS 1
1319
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_LOG_HEADER_OVERFLOW_SHIFT 14
1320
1321
/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: BOUNDARY_CHECK [13:13] */
1322
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BOUNDARY_CHECK_MASK    0x00002000
1323
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BOUNDARY_CHECK_ALIGN   0
1324
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BOUNDARY_CHECK_BITS    1
1325
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BOUNDARY_CHECK_SHIFT   13
1326
1327
/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: BYTE_ENABLE_RULE_CHECK [12:12] */
1328
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BYTE_ENABLE_RULE_CHECK_MASK 0x00001000
1329
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BYTE_ENABLE_RULE_CHECK_ALIGN 0
1330
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BYTE_ENABLE_RULE_CHECK_BITS 1
1331
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_BYTE_ENABLE_RULE_CHECK_SHIFT 12
1332
1333
/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: INTERRUPT_CHECK [11:11] */
1334
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_INTERRUPT_CHECK_MASK   0x00000800
1335
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_INTERRUPT_CHECK_ALIGN  0
1336
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_INTERRUPT_CHECK_BITS   1
1337
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_INTERRUPT_CHECK_SHIFT  11
1338
1339
/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: RCB_CHECK [10:10] */
1340
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_RCB_CHECK_MASK         0x00000400
1341
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_RCB_CHECK_ALIGN        0
1342
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_RCB_CHECK_BITS         1
1343
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_RCB_CHECK_SHIFT        10
1344
1345
/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_TAGGED_STATUS_MODE [09:09] */
1346
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TAGGED_STATUS_MODE_MASK 0x00000200
1347
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TAGGED_STATUS_MODE_ALIGN 0
1348
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TAGGED_STATUS_MODE_BITS 1
1349
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_TAGGED_STATUS_MODE_SHIFT 9
1350
1351
/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: MASK_INTERRUPT_MODE [08:08] */
1352
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_MODE_MASK 0x00000100
1353
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_MODE_ALIGN 0
1354
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_MODE_BITS 1
1355
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_MODE_SHIFT 8
1356
1357
/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_INDIRECT_ACCESS [07:07] */
1358
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_INDIRECT_ACCESS_MASK 0x00000080
1359
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_INDIRECT_ACCESS_ALIGN 0
1360
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_INDIRECT_ACCESS_BITS 1
1361
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_INDIRECT_ACCESS_SHIFT 7
1362
1363
/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_REGISTER_WORD_SWAP [06:06] */
1364
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_REGISTER_WORD_SWAP_MASK 0x00000040
1365
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_REGISTER_WORD_SWAP_ALIGN 0
1366
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_REGISTER_WORD_SWAP_BITS 1
1367
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_REGISTER_WORD_SWAP_SHIFT 6
1368
1369
/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_CLOCK_CONTROL_REGISTER_READ_WRITE_CAPABILITY [05:05] */
1370
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_CLOCK_CONTROL_REGISTER_READ_WRITE_CAPABILITY_MASK 0x00000020
1371
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_CLOCK_CONTROL_REGISTER_READ_WRITE_CAPABILITY_ALIGN 0
1372
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_CLOCK_CONTROL_REGISTER_READ_WRITE_CAPABILITY_BITS 1
1373
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_CLOCK_CONTROL_REGISTER_READ_WRITE_CAPABILITY_SHIFT 5
1374
1375
/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_PCI_STATE_REGISTER_READ_WRITE_CAPABILITY [04:04] */
1376
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_PCI_STATE_REGISTER_READ_WRITE_CAPABILITY_MASK 0x00000010
1377
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_PCI_STATE_REGISTER_READ_WRITE_CAPABILITY_ALIGN 0
1378
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_PCI_STATE_REGISTER_READ_WRITE_CAPABILITY_BITS 1
1379
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_PCI_STATE_REGISTER_READ_WRITE_CAPABILITY_SHIFT 4
1380
1381
/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_ENDIAN_WORD_SWAP [03:03] */
1382
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_WORD_SWAP_MASK 0x00000008
1383
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_WORD_SWAP_ALIGN 0
1384
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_WORD_SWAP_BITS 1
1385
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_WORD_SWAP_SHIFT 3
1386
1387
/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: ENABLE_ENDIAN_BYTE_SWAP [02:02] */
1388
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_BYTE_SWAP_MASK 0x00000004
1389
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_BYTE_SWAP_ALIGN 0
1390
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_BYTE_SWAP_BITS 1
1391
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_ENABLE_ENDIAN_BYTE_SWAP_SHIFT 2
1392
1393
/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: MASK_INTERRUPT [01:01] */
1394
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_MASK    0x00000002
1395
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_ALIGN   0
1396
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_BITS    1
1397
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_MASK_INTERRUPT_SHIFT   1
1398
1399
/* PCIE_CFG :: MISCELLANEOUS_HOST_CONTROL :: CLEAR_INTERRUPT [00:00] */
1400
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_CLEAR_INTERRUPT_MASK   0x00000001
1401
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_CLEAR_INTERRUPT_ALIGN  0
1402
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_CLEAR_INTERRUPT_BITS   1
1403
#define PCIE_CFG_MISCELLANEOUS_HOST_CONTROL_CLEAR_INTERRUPT_SHIFT  0
1404
1405
1406
/****************************************************************************
1407
 * PCIE_CFG :: SPARE
1408
 ***************************************************************************/
1409
/* PCIE_CFG :: SPARE :: UNUSED_0 [31:16] */
1410
#define PCIE_CFG_SPARE_UNUSED_0_MASK                               0xffff0000
1411
#define PCIE_CFG_SPARE_UNUSED_0_ALIGN                              0
1412
#define PCIE_CFG_SPARE_UNUSED_0_BITS                               16
1413
#define PCIE_CFG_SPARE_UNUSED_0_SHIFT                              16
1414
1415
/* PCIE_CFG :: SPARE :: RESERVED_0 [15:15] */
1416
#define PCIE_CFG_SPARE_RESERVED_0_MASK                             0x00008000
1417
#define PCIE_CFG_SPARE_RESERVED_0_ALIGN                            0
1418
#define PCIE_CFG_SPARE_RESERVED_0_BITS                             1
1419
#define PCIE_CFG_SPARE_RESERVED_0_SHIFT                            15
1420
1421
/* PCIE_CFG :: SPARE :: UNUSED_1 [14:02] */
1422
#define PCIE_CFG_SPARE_UNUSED_1_MASK                               0x00007ffc
1423
#define PCIE_CFG_SPARE_UNUSED_1_ALIGN                              0
1424
#define PCIE_CFG_SPARE_UNUSED_1_BITS                               13
1425
#define PCIE_CFG_SPARE_UNUSED_1_SHIFT                              2
1426
1427
/* PCIE_CFG :: SPARE :: BAR2_TARGET_WORD_SWAP [01:01] */
1428
#define PCIE_CFG_SPARE_BAR2_TARGET_WORD_SWAP_MASK                  0x00000002
1429
#define PCIE_CFG_SPARE_BAR2_TARGET_WORD_SWAP_ALIGN                 0
1430
#define PCIE_CFG_SPARE_BAR2_TARGET_WORD_SWAP_BITS                  1
1431
#define PCIE_CFG_SPARE_BAR2_TARGET_WORD_SWAP_SHIFT                 1
1432
1433
/* PCIE_CFG :: SPARE :: BAR2_TARGET_BYTE_SWAP [00:00] */
1434
#define PCIE_CFG_SPARE_BAR2_TARGET_BYTE_SWAP_MASK                  0x00000001
1435
#define PCIE_CFG_SPARE_BAR2_TARGET_BYTE_SWAP_ALIGN                 0
1436
#define PCIE_CFG_SPARE_BAR2_TARGET_BYTE_SWAP_BITS                  1
1437
#define PCIE_CFG_SPARE_BAR2_TARGET_BYTE_SWAP_SHIFT                 0
1438
1439
1440
/****************************************************************************
1441
 * PCIE_CFG :: PCI_STATE
1442
 ***************************************************************************/
1443
/* PCIE_CFG :: PCI_STATE :: RESERVED_0 [31:16] */
1444
#define PCIE_CFG_PCI_STATE_RESERVED_0_MASK                         0xffff0000
1445
#define PCIE_CFG_PCI_STATE_RESERVED_0_ALIGN                        0
1446
#define PCIE_CFG_PCI_STATE_RESERVED_0_BITS                         16
1447
#define PCIE_CFG_PCI_STATE_RESERVED_0_SHIFT                        16
1448
1449
/* PCIE_CFG :: PCI_STATE :: CONFIG_RETRY [15:15] */
1450
#define PCIE_CFG_PCI_STATE_CONFIG_RETRY_MASK                       0x00008000
1451
#define PCIE_CFG_PCI_STATE_CONFIG_RETRY_ALIGN                      0
1452
#define PCIE_CFG_PCI_STATE_CONFIG_RETRY_BITS                       1
1453
#define PCIE_CFG_PCI_STATE_CONFIG_RETRY_SHIFT                      15
1454
1455
/* PCIE_CFG :: PCI_STATE :: RESERVED_1 [14:12] */
1456
#define PCIE_CFG_PCI_STATE_RESERVED_1_MASK                         0x00007000
1457
#define PCIE_CFG_PCI_STATE_RESERVED_1_ALIGN                        0
1458
#define PCIE_CFG_PCI_STATE_RESERVED_1_BITS                         3
1459
#define PCIE_CFG_PCI_STATE_RESERVED_1_SHIFT                        12
1460
1461
/* PCIE_CFG :: PCI_STATE :: MAX_PCI_TARGET_RETRY [11:09] */
1462
#define PCIE_CFG_PCI_STATE_MAX_PCI_TARGET_RETRY_MASK               0x00000e00
1463
#define PCIE_CFG_PCI_STATE_MAX_PCI_TARGET_RETRY_ALIGN              0
1464
#define PCIE_CFG_PCI_STATE_MAX_PCI_TARGET_RETRY_BITS               3
1465
#define PCIE_CFG_PCI_STATE_MAX_PCI_TARGET_RETRY_SHIFT              9
1466
1467
/* PCIE_CFG :: PCI_STATE :: FLAT_VIEW [08:08] */
1468
#define PCIE_CFG_PCI_STATE_FLAT_VIEW_MASK                          0x00000100
1469
#define PCIE_CFG_PCI_STATE_FLAT_VIEW_ALIGN                         0
1470
#define PCIE_CFG_PCI_STATE_FLAT_VIEW_BITS                          1
1471
#define PCIE_CFG_PCI_STATE_FLAT_VIEW_SHIFT                         8
1472
1473
/* PCIE_CFG :: PCI_STATE :: VPD_AVAILABLE [07:07] */
1474
#define PCIE_CFG_PCI_STATE_VPD_AVAILABLE_MASK                      0x00000080
1475
#define PCIE_CFG_PCI_STATE_VPD_AVAILABLE_ALIGN                     0
1476
#define PCIE_CFG_PCI_STATE_VPD_AVAILABLE_BITS                      1
1477
#define PCIE_CFG_PCI_STATE_VPD_AVAILABLE_SHIFT                     7
1478
1479
/* PCIE_CFG :: PCI_STATE :: PCI_EXPANSION_ROM_RETRY [06:06] */
1480
#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_RETRY_MASK            0x00000040
1481
#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_RETRY_ALIGN           0
1482
#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_RETRY_BITS            1
1483
#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_RETRY_SHIFT           6
1484
1485
/* PCIE_CFG :: PCI_STATE :: PCI_EXPANSION_ROM_DESIRED [05:05] */
1486
#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_DESIRED_MASK          0x00000020
1487
#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_DESIRED_ALIGN         0
1488
#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_DESIRED_BITS          1
1489
#define PCIE_CFG_PCI_STATE_PCI_EXPANSION_ROM_DESIRED_SHIFT         5
1490
1491
/* PCIE_CFG :: PCI_STATE :: RESERVED_2 [04:00] */
1492
#define PCIE_CFG_PCI_STATE_RESERVED_2_MASK                         0x0000001f
1493
#define PCIE_CFG_PCI_STATE_RESERVED_2_ALIGN                        0
1494
#define PCIE_CFG_PCI_STATE_RESERVED_2_BITS                         5
1495
#define PCIE_CFG_PCI_STATE_RESERVED_2_SHIFT                        0
1496
1497
1498
/****************************************************************************
1499
 * PCIE_CFG :: CLOCK_CONTROL
1500
 ***************************************************************************/
1501
/* PCIE_CFG :: CLOCK_CONTROL :: PL_CLOCK_DISABLE [31:31] */
1502
#define PCIE_CFG_CLOCK_CONTROL_PL_CLOCK_DISABLE_MASK               0x80000000
1503
#define PCIE_CFG_CLOCK_CONTROL_PL_CLOCK_DISABLE_ALIGN              0
1504
#define PCIE_CFG_CLOCK_CONTROL_PL_CLOCK_DISABLE_BITS               1
1505
#define PCIE_CFG_CLOCK_CONTROL_PL_CLOCK_DISABLE_SHIFT              31
1506
1507
/* PCIE_CFG :: CLOCK_CONTROL :: DLL_CLOCK_DISABLE [30:30] */
1508
#define PCIE_CFG_CLOCK_CONTROL_DLL_CLOCK_DISABLE_MASK              0x40000000
1509
#define PCIE_CFG_CLOCK_CONTROL_DLL_CLOCK_DISABLE_ALIGN             0
1510
#define PCIE_CFG_CLOCK_CONTROL_DLL_CLOCK_DISABLE_BITS              1
1511
#define PCIE_CFG_CLOCK_CONTROL_DLL_CLOCK_DISABLE_SHIFT             30
1512
1513
/* PCIE_CFG :: CLOCK_CONTROL :: TL_CLOCK_DISABLE [29:29] */
1514
#define PCIE_CFG_CLOCK_CONTROL_TL_CLOCK_DISABLE_MASK               0x20000000
1515
#define PCIE_CFG_CLOCK_CONTROL_TL_CLOCK_DISABLE_ALIGN              0
1516
#define PCIE_CFG_CLOCK_CONTROL_TL_CLOCK_DISABLE_BITS               1
1517
#define PCIE_CFG_CLOCK_CONTROL_TL_CLOCK_DISABLE_SHIFT              29
1518
1519
/* PCIE_CFG :: CLOCK_CONTROL :: PCI_EXPRESS_CLOCK_TO_CORE_CLOCK [28:28] */
1520
#define PCIE_CFG_CLOCK_CONTROL_PCI_EXPRESS_CLOCK_TO_CORE_CLOCK_MASK 0x10000000
1521
#define PCIE_CFG_CLOCK_CONTROL_PCI_EXPRESS_CLOCK_TO_CORE_CLOCK_ALIGN 0
1522
#define PCIE_CFG_CLOCK_CONTROL_PCI_EXPRESS_CLOCK_TO_CORE_CLOCK_BITS 1
1523
#define PCIE_CFG_CLOCK_CONTROL_PCI_EXPRESS_CLOCK_TO_CORE_CLOCK_SHIFT 28
1524
1525
/* PCIE_CFG :: CLOCK_CONTROL :: UNUSED_0 [27:21] */
1526
#define PCIE_CFG_CLOCK_CONTROL_UNUSED_0_MASK                       0x0fe00000
1527
#define PCIE_CFG_CLOCK_CONTROL_UNUSED_0_ALIGN                      0
1528
#define PCIE_CFG_CLOCK_CONTROL_UNUSED_0_BITS                       7
1529
#define PCIE_CFG_CLOCK_CONTROL_UNUSED_0_SHIFT                      21
1530
1531
/* PCIE_CFG :: CLOCK_CONTROL :: SELECT_FINAL_ALT_CLOCK_SOURCE [20:20] */
1532
#define PCIE_CFG_CLOCK_CONTROL_SELECT_FINAL_ALT_CLOCK_SOURCE_MASK  0x00100000
1533
#define PCIE_CFG_CLOCK_CONTROL_SELECT_FINAL_ALT_CLOCK_SOURCE_ALIGN 0
1534
#define PCIE_CFG_CLOCK_CONTROL_SELECT_FINAL_ALT_CLOCK_SOURCE_BITS  1
1535
#define PCIE_CFG_CLOCK_CONTROL_SELECT_FINAL_ALT_CLOCK_SOURCE_SHIFT 20
1536
1537
/* PCIE_CFG :: CLOCK_CONTROL :: UNUSED_1 [19:13] */
1538
#define PCIE_CFG_CLOCK_CONTROL_UNUSED_1_MASK                       0x000fe000
1539
#define PCIE_CFG_CLOCK_CONTROL_UNUSED_1_ALIGN                      0
1540
#define PCIE_CFG_CLOCK_CONTROL_UNUSED_1_BITS                       7
1541
#define PCIE_CFG_CLOCK_CONTROL_UNUSED_1_SHIFT                      13
1542
1543
/* PCIE_CFG :: CLOCK_CONTROL :: SELECT_ALT_CLOCK [12:12] */
1544
#define PCIE_CFG_CLOCK_CONTROL_SELECT_ALT_CLOCK_MASK               0x00001000
1545
#define PCIE_CFG_CLOCK_CONTROL_SELECT_ALT_CLOCK_ALIGN              0
1546
#define PCIE_CFG_CLOCK_CONTROL_SELECT_ALT_CLOCK_BITS               1
1547
#define PCIE_CFG_CLOCK_CONTROL_SELECT_ALT_CLOCK_SHIFT              12
1548
1549
/* PCIE_CFG :: CLOCK_CONTROL :: UNUSED_2 [11:08] */
1550
#define PCIE_CFG_CLOCK_CONTROL_UNUSED_2_MASK                       0x00000f00
1551
#define PCIE_CFG_CLOCK_CONTROL_UNUSED_2_ALIGN                      0
1552
#define PCIE_CFG_CLOCK_CONTROL_UNUSED_2_BITS                       4
1553
#define PCIE_CFG_CLOCK_CONTROL_UNUSED_2_SHIFT                      8
1554
1555
/* PCIE_CFG :: CLOCK_CONTROL :: UNUSED_3 [07:00] */
1556
#define PCIE_CFG_CLOCK_CONTROL_UNUSED_3_MASK                       0x000000ff
1557
#define PCIE_CFG_CLOCK_CONTROL_UNUSED_3_ALIGN                      0
1558
#define PCIE_CFG_CLOCK_CONTROL_UNUSED_3_BITS                       8
1559
#define PCIE_CFG_CLOCK_CONTROL_UNUSED_3_SHIFT                      0
1560
1561
1562
/****************************************************************************
1563
 * PCIE_CFG :: REGISTER_BASE
1564
 ***************************************************************************/
1565
/* PCIE_CFG :: REGISTER_BASE :: RESERVED_0 [31:18] */
1566
#define PCIE_CFG_REGISTER_BASE_RESERVED_0_MASK                     0xfffc0000
1567
#define PCIE_CFG_REGISTER_BASE_RESERVED_0_ALIGN                    0
1568
#define PCIE_CFG_REGISTER_BASE_RESERVED_0_BITS                     14
1569
#define PCIE_CFG_REGISTER_BASE_RESERVED_0_SHIFT                    18
1570
1571
/* PCIE_CFG :: REGISTER_BASE :: REGISTER_BASE_REGISTER [17:02] */
1572
#define PCIE_CFG_REGISTER_BASE_REGISTER_BASE_REGISTER_MASK         0x0003fffc
1573
#define PCIE_CFG_REGISTER_BASE_REGISTER_BASE_REGISTER_ALIGN        0
1574
#define PCIE_CFG_REGISTER_BASE_REGISTER_BASE_REGISTER_BITS         16
1575
#define PCIE_CFG_REGISTER_BASE_REGISTER_BASE_REGISTER_SHIFT        2
1576
1577
/* PCIE_CFG :: REGISTER_BASE :: RESERVED_1 [01:00] */
1578
#define PCIE_CFG_REGISTER_BASE_RESERVED_1_MASK                     0x00000003
1579
#define PCIE_CFG_REGISTER_BASE_RESERVED_1_ALIGN                    0
1580
#define PCIE_CFG_REGISTER_BASE_RESERVED_1_BITS                     2
1581
#define PCIE_CFG_REGISTER_BASE_RESERVED_1_SHIFT                    0
1582
1583
1584
/****************************************************************************
1585
 * PCIE_CFG :: MEMORY_BASE
1586
 ***************************************************************************/
1587
/* PCIE_CFG :: MEMORY_BASE :: RESERVED_0 [31:24] */
1588
#define PCIE_CFG_MEMORY_BASE_RESERVED_0_MASK                       0xff000000
1589
#define PCIE_CFG_MEMORY_BASE_RESERVED_0_ALIGN                      0
1590
#define PCIE_CFG_MEMORY_BASE_RESERVED_0_BITS                       8
1591
#define PCIE_CFG_MEMORY_BASE_RESERVED_0_SHIFT                      24
1592
1593
/* PCIE_CFG :: MEMORY_BASE :: MEMORY_BASE_REGISTER [23:02] */
1594
#define PCIE_CFG_MEMORY_BASE_MEMORY_BASE_REGISTER_MASK             0x00fffffc
1595
#define PCIE_CFG_MEMORY_BASE_MEMORY_BASE_REGISTER_ALIGN            0
1596
#define PCIE_CFG_MEMORY_BASE_MEMORY_BASE_REGISTER_BITS             22
1597
#define PCIE_CFG_MEMORY_BASE_MEMORY_BASE_REGISTER_SHIFT            2
1598
1599
/* PCIE_CFG :: MEMORY_BASE :: RESERVED_1 [01:00] */
1600
#define PCIE_CFG_MEMORY_BASE_RESERVED_1_MASK                       0x00000003
1601
#define PCIE_CFG_MEMORY_BASE_RESERVED_1_ALIGN                      0
1602
#define PCIE_CFG_MEMORY_BASE_RESERVED_1_BITS                       2
1603
#define PCIE_CFG_MEMORY_BASE_RESERVED_1_SHIFT                      0
1604
1605
1606
/****************************************************************************
1607
 * PCIE_CFG :: REGISTER_DATA
1608
 ***************************************************************************/
1609
/* PCIE_CFG :: REGISTER_DATA :: REGISTER_DATA_REGISTER [31:00] */
1610
#define PCIE_CFG_REGISTER_DATA_REGISTER_DATA_REGISTER_MASK         0xffffffff
1611
#define PCIE_CFG_REGISTER_DATA_REGISTER_DATA_REGISTER_ALIGN        0
1612
#define PCIE_CFG_REGISTER_DATA_REGISTER_DATA_REGISTER_BITS         32
1613
#define PCIE_CFG_REGISTER_DATA_REGISTER_DATA_REGISTER_SHIFT        0
1614
1615
1616
/****************************************************************************
1617
 * PCIE_CFG :: MEMORY_DATA
1618
 ***************************************************************************/
1619
/* PCIE_CFG :: MEMORY_DATA :: MEMORY_DATA_REGISTER [31:00] */
1620
#define PCIE_CFG_MEMORY_DATA_MEMORY_DATA_REGISTER_MASK             0xffffffff
1621
#define PCIE_CFG_MEMORY_DATA_MEMORY_DATA_REGISTER_ALIGN            0
1622
#define PCIE_CFG_MEMORY_DATA_MEMORY_DATA_REGISTER_BITS             32
1623
#define PCIE_CFG_MEMORY_DATA_MEMORY_DATA_REGISTER_SHIFT            0
1624
1625
1626
/****************************************************************************
1627
 * PCIE_CFG :: EXPANSION_ROM_BAR_SIZE
1628
 ***************************************************************************/
1629
/* PCIE_CFG :: EXPANSION_ROM_BAR_SIZE :: RESERVED_0 [31:04] */
1630
#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_RESERVED_0_MASK            0xfffffff0
1631
#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_RESERVED_0_ALIGN           0
1632
#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_RESERVED_0_BITS            28
1633
#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_RESERVED_0_SHIFT           4
1634
1635
/* PCIE_CFG :: EXPANSION_ROM_BAR_SIZE :: BAR_SIZE [03:00] */
1636
#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_BAR_SIZE_MASK              0x0000000f
1637
#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_BAR_SIZE_ALIGN             0
1638
#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_BAR_SIZE_BITS              4
1639
#define PCIE_CFG_EXPANSION_ROM_BAR_SIZE_BAR_SIZE_SHIFT             0
1640
1641
1642
/****************************************************************************
1643
 * PCIE_CFG :: EXPANSION_ROM_ADDRESS
1644
 ***************************************************************************/
1645
/* PCIE_CFG :: EXPANSION_ROM_ADDRESS :: ROM_CTL_ADDR [31:00] */
1646
#define PCIE_CFG_EXPANSION_ROM_ADDRESS_ROM_CTL_ADDR_MASK           0xffffffff
1647
#define PCIE_CFG_EXPANSION_ROM_ADDRESS_ROM_CTL_ADDR_ALIGN          0
1648
#define PCIE_CFG_EXPANSION_ROM_ADDRESS_ROM_CTL_ADDR_BITS           32
1649
#define PCIE_CFG_EXPANSION_ROM_ADDRESS_ROM_CTL_ADDR_SHIFT          0
1650
1651
1652
/****************************************************************************
1653
 * PCIE_CFG :: EXPANSION_ROM_DATA
1654
 ***************************************************************************/
1655
/* PCIE_CFG :: EXPANSION_ROM_DATA :: ROM_DATA [31:00] */
1656
#define PCIE_CFG_EXPANSION_ROM_DATA_ROM_DATA_MASK                  0xffffffff
1657
#define PCIE_CFG_EXPANSION_ROM_DATA_ROM_DATA_ALIGN                 0
1658
#define PCIE_CFG_EXPANSION_ROM_DATA_ROM_DATA_BITS                  32
1659
#define PCIE_CFG_EXPANSION_ROM_DATA_ROM_DATA_SHIFT                 0
1660
1661
1662
/****************************************************************************
1663
 * PCIE_CFG :: VPD_INTERFACE
1664
 ***************************************************************************/
1665
/* PCIE_CFG :: VPD_INTERFACE :: RESERVED_0 [31:01] */
1666
#define PCIE_CFG_VPD_INTERFACE_RESERVED_0_MASK                     0xfffffffe
1667
#define PCIE_CFG_VPD_INTERFACE_RESERVED_0_ALIGN                    0
1668
#define PCIE_CFG_VPD_INTERFACE_RESERVED_0_BITS                     31
1669
#define PCIE_CFG_VPD_INTERFACE_RESERVED_0_SHIFT                    1
1670
1671
/* PCIE_CFG :: VPD_INTERFACE :: VPD_REQUEST [00:00] */
1672
#define PCIE_CFG_VPD_INTERFACE_VPD_REQUEST_MASK                    0x00000001
1673
#define PCIE_CFG_VPD_INTERFACE_VPD_REQUEST_ALIGN                   0
1674
#define PCIE_CFG_VPD_INTERFACE_VPD_REQUEST_BITS                    1
1675
#define PCIE_CFG_VPD_INTERFACE_VPD_REQUEST_SHIFT                   0
1676
1677
1678
/****************************************************************************
1679
 * PCIE_CFG :: UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER
1680
 ***************************************************************************/
1681
/* PCIE_CFG :: UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER :: UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX [31:00] */
1682
#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_MASK 0xffffffff
1683
#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_ALIGN 0
1684
#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_BITS 32
1685
#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_SHIFT 0
1686
1687
1688
/****************************************************************************
1689
 * PCIE_CFG :: UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER
1690
 ***************************************************************************/
1691
/* PCIE_CFG :: UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER :: UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX [31:00] */
1692
#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_MASK 0xffffffff
1693
#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_ALIGN 0
1694
#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_BITS 32
1695
#define PCIE_CFG_UNDI_RECEIVE_BD_STANDARD_PRODUCER_RING_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_RECEIVE_BD_STANDARD_RING_PRODUCER_INDEX_SHIFT 0
1696
1697
1698
/****************************************************************************
1699
 * PCIE_CFG :: UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER
1700
 ***************************************************************************/
1701
/* PCIE_CFG :: UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER :: UNDI_RECEIVE_RETURN_C_IDX [31:00] */
1702
#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER_UNDI_RECEIVE_RETURN_C_IDX_MASK 0xffffffff
1703
#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER_UNDI_RECEIVE_RETURN_C_IDX_ALIGN 0
1704
#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER_UNDI_RECEIVE_RETURN_C_IDX_BITS 32
1705
#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_UPPER_UNDI_RECEIVE_RETURN_C_IDX_SHIFT 0
1706
1707
1708
/****************************************************************************
1709
 * PCIE_CFG :: UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER
1710
 ***************************************************************************/
1711
/* PCIE_CFG :: UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER :: UNDI_RECEIVE_RETURN_C_IDX [31:00] */
1712
#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER_UNDI_RECEIVE_RETURN_C_IDX_MASK 0xffffffff
1713
#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER_UNDI_RECEIVE_RETURN_C_IDX_ALIGN 0
1714
#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER_UNDI_RECEIVE_RETURN_C_IDX_BITS 32
1715
#define PCIE_CFG_UNDI_RECEIVE_RETURN_RING_CONSUMER_INDEX_LOWER_UNDI_RECEIVE_RETURN_C_IDX_SHIFT 0
1716
1717
1718
/****************************************************************************
1719
 * PCIE_CFG :: UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER
1720
 ***************************************************************************/
1721
/* PCIE_CFG :: UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER :: UNDI_SEND_BD_NIC_P_IDX [31:00] */
1722
#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_SEND_BD_NIC_P_IDX_MASK 0xffffffff
1723
#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_SEND_BD_NIC_P_IDX_ALIGN 0
1724
#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_SEND_BD_NIC_P_IDX_BITS 32
1725
#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_UPPER_UNDI_SEND_BD_NIC_P_IDX_SHIFT 0
1726
1727
1728
/****************************************************************************
1729
 * PCIE_CFG :: UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER
1730
 ***************************************************************************/
1731
/* PCIE_CFG :: UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER :: UNDI_SEND_BD_NIC_P_IDX [31:00] */
1732
#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_SEND_BD_NIC_P_IDX_MASK 0xffffffff
1733
#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_SEND_BD_NIC_P_IDX_ALIGN 0
1734
#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_SEND_BD_NIC_P_IDX_BITS 32
1735
#define PCIE_CFG_UNDI_SEND_BD_PRODUCER_INDEX_MAILBOX_LOWER_UNDI_SEND_BD_NIC_P_IDX_SHIFT 0
1736
1737
1738
/****************************************************************************
1739
 * PCIE_CFG :: INT_MAILBOX_UPPER
1740
 ***************************************************************************/
1741
/* PCIE_CFG :: INT_MAILBOX_UPPER :: INDIRECT_INTERRUPT_MAIL_BOX [31:00] */
1742
#define PCIE_CFG_INT_MAILBOX_UPPER_INDIRECT_INTERRUPT_MAIL_BOX_MASK 0xffffffff
1743
#define PCIE_CFG_INT_MAILBOX_UPPER_INDIRECT_INTERRUPT_MAIL_BOX_ALIGN 0
1744
#define PCIE_CFG_INT_MAILBOX_UPPER_INDIRECT_INTERRUPT_MAIL_BOX_BITS 32
1745
#define PCIE_CFG_INT_MAILBOX_UPPER_INDIRECT_INTERRUPT_MAIL_BOX_SHIFT 0
1746
1747
1748
/****************************************************************************
1749
 * PCIE_CFG :: INT_MAILBOX_LOWER
1750
 ***************************************************************************/
1751
/* PCIE_CFG :: INT_MAILBOX_LOWER :: INDIRECT_INTERRUPT_MAIL_BOX [31:00] */
1752
#define PCIE_CFG_INT_MAILBOX_LOWER_INDIRECT_INTERRUPT_MAIL_BOX_MASK 0xffffffff
1753
#define PCIE_CFG_INT_MAILBOX_LOWER_INDIRECT_INTERRUPT_MAIL_BOX_ALIGN 0
1754
#define PCIE_CFG_INT_MAILBOX_LOWER_INDIRECT_INTERRUPT_MAIL_BOX_BITS 32
1755
#define PCIE_CFG_INT_MAILBOX_LOWER_INDIRECT_INTERRUPT_MAIL_BOX_SHIFT 0
1756
1757
1758
/****************************************************************************
1759
 * PCIE_CFG :: PRODUCT_ID_AND_ASIC_REVISION
1760
 ***************************************************************************/
1761
/* PCIE_CFG :: PRODUCT_ID_AND_ASIC_REVISION :: RESERVED_0 [31:28] */
1762
#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_RESERVED_0_MASK      0xf0000000
1763
#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_RESERVED_0_ALIGN     0
1764
#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_RESERVED_0_BITS      4
1765
#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_RESERVED_0_SHIFT     28
1766
1767
/* PCIE_CFG :: PRODUCT_ID_AND_ASIC_REVISION :: PRODUCT_ID [27:08] */
1768
#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_PRODUCT_ID_MASK      0x0fffff00
1769
#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_PRODUCT_ID_ALIGN     0
1770
#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_PRODUCT_ID_BITS      20
1771
#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_PRODUCT_ID_SHIFT     8
1772
1773
/* PCIE_CFG :: PRODUCT_ID_AND_ASIC_REVISION :: ASIC_REVISION_ID [07:00] */
1774
#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_ASIC_REVISION_ID_MASK 0x000000ff
1775
#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_ASIC_REVISION_ID_ALIGN 0
1776
#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_ASIC_REVISION_ID_BITS 8
1777
#define PCIE_CFG_PRODUCT_ID_AND_ASIC_REVISION_ASIC_REVISION_ID_SHIFT 0
1778
1779
1780
/****************************************************************************
1781
 * PCIE_CFG :: FUNCTION_EVENT
1782
 ***************************************************************************/
1783
/* PCIE_CFG :: FUNCTION_EVENT :: RESERVED_0 [31:16] */
1784
#define PCIE_CFG_FUNCTION_EVENT_RESERVED_0_MASK                    0xffff0000
1785
#define PCIE_CFG_FUNCTION_EVENT_RESERVED_0_ALIGN                   0
1786
#define PCIE_CFG_FUNCTION_EVENT_RESERVED_0_BITS                    16
1787
#define PCIE_CFG_FUNCTION_EVENT_RESERVED_0_SHIFT                   16
1788
1789
/* PCIE_CFG :: FUNCTION_EVENT :: INTA_EVENT [15:15] */
1790
#define PCIE_CFG_FUNCTION_EVENT_INTA_EVENT_MASK                    0x00008000
1791
#define PCIE_CFG_FUNCTION_EVENT_INTA_EVENT_ALIGN                   0
1792
#define PCIE_CFG_FUNCTION_EVENT_INTA_EVENT_BITS                    1
1793
#define PCIE_CFG_FUNCTION_EVENT_INTA_EVENT_SHIFT                   15
1794
1795
/* PCIE_CFG :: FUNCTION_EVENT :: RESERVED_1 [14:05] */
1796
#define PCIE_CFG_FUNCTION_EVENT_RESERVED_1_MASK                    0x00007fe0
1797
#define PCIE_CFG_FUNCTION_EVENT_RESERVED_1_ALIGN                   0
1798
#define PCIE_CFG_FUNCTION_EVENT_RESERVED_1_BITS                    10
1799
#define PCIE_CFG_FUNCTION_EVENT_RESERVED_1_SHIFT                   5
1800
1801
/* PCIE_CFG :: FUNCTION_EVENT :: GWAKE_EVENT [04:04] */
1802
#define PCIE_CFG_FUNCTION_EVENT_GWAKE_EVENT_MASK                   0x00000010
1803
#define PCIE_CFG_FUNCTION_EVENT_GWAKE_EVENT_ALIGN                  0
1804
#define PCIE_CFG_FUNCTION_EVENT_GWAKE_EVENT_BITS                   1
1805
#define PCIE_CFG_FUNCTION_EVENT_GWAKE_EVENT_SHIFT                  4
1806
1807
/* PCIE_CFG :: FUNCTION_EVENT :: RESERVED_2 [03:00] */
1808
#define PCIE_CFG_FUNCTION_EVENT_RESERVED_2_MASK                    0x0000000f
1809
#define PCIE_CFG_FUNCTION_EVENT_RESERVED_2_ALIGN                   0
1810
#define PCIE_CFG_FUNCTION_EVENT_RESERVED_2_BITS                    4
1811
#define PCIE_CFG_FUNCTION_EVENT_RESERVED_2_SHIFT                   0
1812
1813
1814
/****************************************************************************
1815
 * PCIE_CFG :: FUNCTION_EVENT_MASK
1816
 ***************************************************************************/
1817
/* PCIE_CFG :: FUNCTION_EVENT_MASK :: RESERVED_0 [31:16] */
1818
#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_0_MASK               0xffff0000
1819
#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_0_ALIGN              0
1820
#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_0_BITS               16
1821
#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_0_SHIFT              16
1822
1823
/* PCIE_CFG :: FUNCTION_EVENT_MASK :: INTA_MASK [15:15] */
1824
#define PCIE_CFG_FUNCTION_EVENT_MASK_INTA_MASK_MASK                0x00008000
1825
#define PCIE_CFG_FUNCTION_EVENT_MASK_INTA_MASK_ALIGN               0
1826
#define PCIE_CFG_FUNCTION_EVENT_MASK_INTA_MASK_BITS                1
1827
#define PCIE_CFG_FUNCTION_EVENT_MASK_INTA_MASK_SHIFT               15
1828
1829
/* PCIE_CFG :: FUNCTION_EVENT_MASK :: WAKE_UP_MASK [14:14] */
1830
#define PCIE_CFG_FUNCTION_EVENT_MASK_WAKE_UP_MASK_MASK             0x00004000
1831
#define PCIE_CFG_FUNCTION_EVENT_MASK_WAKE_UP_MASK_ALIGN            0
1832
#define PCIE_CFG_FUNCTION_EVENT_MASK_WAKE_UP_MASK_BITS             1
1833
#define PCIE_CFG_FUNCTION_EVENT_MASK_WAKE_UP_MASK_SHIFT            14
1834
1835
/* PCIE_CFG :: FUNCTION_EVENT_MASK :: RESERVED_1 [13:05] */
1836
#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_1_MASK               0x00003fe0
1837
#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_1_ALIGN              0
1838
#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_1_BITS               9
1839
#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_1_SHIFT              5
1840
1841
/* PCIE_CFG :: FUNCTION_EVENT_MASK :: GWAKE_MASK [04:04] */
1842
#define PCIE_CFG_FUNCTION_EVENT_MASK_GWAKE_MASK_MASK               0x00000010
1843
#define PCIE_CFG_FUNCTION_EVENT_MASK_GWAKE_MASK_ALIGN              0
1844
#define PCIE_CFG_FUNCTION_EVENT_MASK_GWAKE_MASK_BITS               1
1845
#define PCIE_CFG_FUNCTION_EVENT_MASK_GWAKE_MASK_SHIFT              4
1846
1847
/* PCIE_CFG :: FUNCTION_EVENT_MASK :: RESERVED_2 [03:00] */
1848
#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_2_MASK               0x0000000f
1849
#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_2_ALIGN              0
1850
#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_2_BITS               4
1851
#define PCIE_CFG_FUNCTION_EVENT_MASK_RESERVED_2_SHIFT              0
1852
1853
1854
/****************************************************************************
1855
 * PCIE_CFG :: FUNCTION_PRESENT
1856
 ***************************************************************************/
1857
/* PCIE_CFG :: FUNCTION_PRESENT :: RESERVED_0 [31:16] */
1858
#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_0_MASK                  0xffff0000
1859
#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_0_ALIGN                 0
1860
#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_0_BITS                  16
1861
#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_0_SHIFT                 16
1862
1863
/* PCIE_CFG :: FUNCTION_PRESENT :: INTA_STATUS [15:15] */
1864
#define PCIE_CFG_FUNCTION_PRESENT_INTA_STATUS_MASK                 0x00008000
1865
#define PCIE_CFG_FUNCTION_PRESENT_INTA_STATUS_ALIGN                0
1866
#define PCIE_CFG_FUNCTION_PRESENT_INTA_STATUS_BITS                 1
1867
#define PCIE_CFG_FUNCTION_PRESENT_INTA_STATUS_SHIFT                15
1868
1869
/* PCIE_CFG :: FUNCTION_PRESENT :: RESERVED_1 [14:05] */
1870
#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_1_MASK                  0x00007fe0
1871
#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_1_ALIGN                 0
1872
#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_1_BITS                  10
1873
#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_1_SHIFT                 5
1874
1875
/* PCIE_CFG :: FUNCTION_PRESENT :: PME_STATUS [04:04] */
1876
#define PCIE_CFG_FUNCTION_PRESENT_PME_STATUS_MASK                  0x00000010
1877
#define PCIE_CFG_FUNCTION_PRESENT_PME_STATUS_ALIGN                 0
1878
#define PCIE_CFG_FUNCTION_PRESENT_PME_STATUS_BITS                  1
1879
#define PCIE_CFG_FUNCTION_PRESENT_PME_STATUS_SHIFT                 4
1880
1881
/* PCIE_CFG :: FUNCTION_PRESENT :: RESERVED_2 [03:00] */
1882
#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_2_MASK                  0x0000000f
1883
#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_2_ALIGN                 0
1884
#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_2_BITS                  4
1885
#define PCIE_CFG_FUNCTION_PRESENT_RESERVED_2_SHIFT                 0
1886
1887
1888
/****************************************************************************
1889
 * PCIE_CFG :: PCIE_CAPABILITIES
1890
 ***************************************************************************/
1891
/* PCIE_CFG :: PCIE_CAPABILITIES :: RESERVED_0 [31:30] */
1892
#define PCIE_CFG_PCIE_CAPABILITIES_RESERVED_0_MASK                 0xc0000000
1893
#define PCIE_CFG_PCIE_CAPABILITIES_RESERVED_0_ALIGN                0
1894
#define PCIE_CFG_PCIE_CAPABILITIES_RESERVED_0_BITS                 2
1895
#define PCIE_CFG_PCIE_CAPABILITIES_RESERVED_0_SHIFT                30
1896
1897
/* PCIE_CFG :: PCIE_CAPABILITIES :: INTERRUPT_MESSAGE_NUMBER [29:25] */
1898
#define PCIE_CFG_PCIE_CAPABILITIES_INTERRUPT_MESSAGE_NUMBER_MASK   0x3e000000
1899
#define PCIE_CFG_PCIE_CAPABILITIES_INTERRUPT_MESSAGE_NUMBER_ALIGN  0
1900
#define PCIE_CFG_PCIE_CAPABILITIES_INTERRUPT_MESSAGE_NUMBER_BITS   5
1901
#define PCIE_CFG_PCIE_CAPABILITIES_INTERRUPT_MESSAGE_NUMBER_SHIFT  25
1902
1903
/* PCIE_CFG :: PCIE_CAPABILITIES :: SLOT_IMPLEMENTED [24:24] */
1904
#define PCIE_CFG_PCIE_CAPABILITIES_SLOT_IMPLEMENTED_MASK           0x01000000
1905
#define PCIE_CFG_PCIE_CAPABILITIES_SLOT_IMPLEMENTED_ALIGN          0
1906
#define PCIE_CFG_PCIE_CAPABILITIES_SLOT_IMPLEMENTED_BITS           1
1907
#define PCIE_CFG_PCIE_CAPABILITIES_SLOT_IMPLEMENTED_SHIFT          24
1908
1909
/* PCIE_CFG :: PCIE_CAPABILITIES :: DEVICE_PORT_TYPE [23:20] */
1910
#define PCIE_CFG_PCIE_CAPABILITIES_DEVICE_PORT_TYPE_MASK           0x00f00000
1911
#define PCIE_CFG_PCIE_CAPABILITIES_DEVICE_PORT_TYPE_ALIGN          0
1912
#define PCIE_CFG_PCIE_CAPABILITIES_DEVICE_PORT_TYPE_BITS           4
1913
#define PCIE_CFG_PCIE_CAPABILITIES_DEVICE_PORT_TYPE_SHIFT          20
1914
1915
/* PCIE_CFG :: PCIE_CAPABILITIES :: CAPABILITY_VERSION [19:16] */
1916
#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_VERSION_MASK         0x000f0000
1917
#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_VERSION_ALIGN        0
1918
#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_VERSION_BITS         4
1919
#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_VERSION_SHIFT        16
1920
1921
/* PCIE_CFG :: PCIE_CAPABILITIES :: NEXT_POINTER [15:08] */
1922
#define PCIE_CFG_PCIE_CAPABILITIES_NEXT_POINTER_MASK               0x0000ff00
1923
#define PCIE_CFG_PCIE_CAPABILITIES_NEXT_POINTER_ALIGN              0
1924
#define PCIE_CFG_PCIE_CAPABILITIES_NEXT_POINTER_BITS               8
1925
#define PCIE_CFG_PCIE_CAPABILITIES_NEXT_POINTER_SHIFT              8
1926
1927
/* PCIE_CFG :: PCIE_CAPABILITIES :: CAPABILITY_ID [07:00] */
1928
#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_ID_MASK              0x000000ff
1929
#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_ID_ALIGN             0
1930
#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_ID_BITS              8
1931
#define PCIE_CFG_PCIE_CAPABILITIES_CAPABILITY_ID_SHIFT             0
1932
1933
1934
/****************************************************************************
1935
 * PCIE_CFG :: DEVICE_CAPABILITIES
1936
 ***************************************************************************/
1937
/* PCIE_CFG :: DEVICE_CAPABILITIES :: RESERVED_0 [31:28] */
1938
#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_0_MASK               0xf0000000
1939
#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_0_ALIGN              0
1940
#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_0_BITS               4
1941
#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_0_SHIFT              28
1942
1943
/* PCIE_CFG :: DEVICE_CAPABILITIES :: CAPTURED_SLOT_POWER_LIMIT_SCALE [27:26] */
1944
#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_SCALE_MASK 0x0c000000
1945
#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_SCALE_ALIGN 0
1946
#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_SCALE_BITS 2
1947
#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_SCALE_SHIFT 26
1948
1949
/* PCIE_CFG :: DEVICE_CAPABILITIES :: CAPTURED_SLOT_POWER_LIMIT_VALUE [25:18] */
1950
#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_VALUE_MASK 0x03fc0000
1951
#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_VALUE_ALIGN 0
1952
#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_VALUE_BITS 8
1953
#define PCIE_CFG_DEVICE_CAPABILITIES_CAPTURED_SLOT_POWER_LIMIT_VALUE_SHIFT 18
1954
1955
/* PCIE_CFG :: DEVICE_CAPABILITIES :: RESERVED_1 [17:16] */
1956
#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_1_MASK               0x00030000
1957
#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_1_ALIGN              0
1958
#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_1_BITS               2
1959
#define PCIE_CFG_DEVICE_CAPABILITIES_RESERVED_1_SHIFT              16
1960
1961
/* PCIE_CFG :: DEVICE_CAPABILITIES :: ROLE_BASED_ERROR_SUPPORT [15:15] */
1962
#define PCIE_CFG_DEVICE_CAPABILITIES_ROLE_BASED_ERROR_SUPPORT_MASK 0x00008000
1963
#define PCIE_CFG_DEVICE_CAPABILITIES_ROLE_BASED_ERROR_SUPPORT_ALIGN 0
1964
#define PCIE_CFG_DEVICE_CAPABILITIES_ROLE_BASED_ERROR_SUPPORT_BITS 1
1965
#define PCIE_CFG_DEVICE_CAPABILITIES_ROLE_BASED_ERROR_SUPPORT_SHIFT 15
1966
1967
/* PCIE_CFG :: DEVICE_CAPABILITIES :: POWER_INDICATOR_PRESENT [14:14] */
1968
#define PCIE_CFG_DEVICE_CAPABILITIES_POWER_INDICATOR_PRESENT_MASK  0x00004000
1969
#define PCIE_CFG_DEVICE_CAPABILITIES_POWER_INDICATOR_PRESENT_ALIGN 0
1970
#define PCIE_CFG_DEVICE_CAPABILITIES_POWER_INDICATOR_PRESENT_BITS  1
1971
#define PCIE_CFG_DEVICE_CAPABILITIES_POWER_INDICATOR_PRESENT_SHIFT 14
1972
1973
/* PCIE_CFG :: DEVICE_CAPABILITIES :: ATTENTION_INDICATOR_PRESENT [13:13] */
1974
#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_INDICATOR_PRESENT_MASK 0x00002000
1975
#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_INDICATOR_PRESENT_ALIGN 0
1976
#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_INDICATOR_PRESENT_BITS 1
1977
#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_INDICATOR_PRESENT_SHIFT 13
1978
1979
/* PCIE_CFG :: DEVICE_CAPABILITIES :: ATTENTION_BUTTON_PRESENT [12:12] */
1980
#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_BUTTON_PRESENT_MASK 0x00001000
1981
#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_BUTTON_PRESENT_ALIGN 0
1982
#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_BUTTON_PRESENT_BITS 1
1983
#define PCIE_CFG_DEVICE_CAPABILITIES_ATTENTION_BUTTON_PRESENT_SHIFT 12
1984
1985
/* PCIE_CFG :: DEVICE_CAPABILITIES :: ENDPOINT_L1_ACCEPTABLE_LATENCY [11:09] */
1986
#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L1_ACCEPTABLE_LATENCY_MASK 0x00000e00
1987
#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L1_ACCEPTABLE_LATENCY_ALIGN 0
1988
#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L1_ACCEPTABLE_LATENCY_BITS 3
1989
#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L1_ACCEPTABLE_LATENCY_SHIFT 9
1990
1991
/* PCIE_CFG :: DEVICE_CAPABILITIES :: ENDPOINT_L0S_ACCEPTABLE_LATENCY [08:06] */
1992
#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L0S_ACCEPTABLE_LATENCY_MASK 0x000001c0
1993
#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L0S_ACCEPTABLE_LATENCY_ALIGN 0
1994
#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L0S_ACCEPTABLE_LATENCY_BITS 3
1995
#define PCIE_CFG_DEVICE_CAPABILITIES_ENDPOINT_L0S_ACCEPTABLE_LATENCY_SHIFT 6
1996
1997
/* PCIE_CFG :: DEVICE_CAPABILITIES :: EXTENDED_TAG_FIELD_SUPPORTED [05:05] */
1998
#define PCIE_CFG_DEVICE_CAPABILITIES_EXTENDED_TAG_FIELD_SUPPORTED_MASK 0x00000020
1999
#define PCIE_CFG_DEVICE_CAPABILITIES_EXTENDED_TAG_FIELD_SUPPORTED_ALIGN 0
2000
#define PCIE_CFG_DEVICE_CAPABILITIES_EXTENDED_TAG_FIELD_SUPPORTED_BITS 1
2001
#define PCIE_CFG_DEVICE_CAPABILITIES_EXTENDED_TAG_FIELD_SUPPORTED_SHIFT 5
2002
2003
/* PCIE_CFG :: DEVICE_CAPABILITIES :: PHANTOM_FUNCTIONS_SUPPORTED [04:03] */
2004
#define PCIE_CFG_DEVICE_CAPABILITIES_PHANTOM_FUNCTIONS_SUPPORTED_MASK 0x00000018
2005
#define PCIE_CFG_DEVICE_CAPABILITIES_PHANTOM_FUNCTIONS_SUPPORTED_ALIGN 0
2006
#define PCIE_CFG_DEVICE_CAPABILITIES_PHANTOM_FUNCTIONS_SUPPORTED_BITS 2
2007
#define PCIE_CFG_DEVICE_CAPABILITIES_PHANTOM_FUNCTIONS_SUPPORTED_SHIFT 3
2008
2009
/* PCIE_CFG :: DEVICE_CAPABILITIES :: MAX_PAYLOAD_SIZE_SUPPORTED [02:00] */
2010
#define PCIE_CFG_DEVICE_CAPABILITIES_MAX_PAYLOAD_SIZE_SUPPORTED_MASK 0x00000007
2011
#define PCIE_CFG_DEVICE_CAPABILITIES_MAX_PAYLOAD_SIZE_SUPPORTED_ALIGN 0
2012
#define PCIE_CFG_DEVICE_CAPABILITIES_MAX_PAYLOAD_SIZE_SUPPORTED_BITS 3
2013
#define PCIE_CFG_DEVICE_CAPABILITIES_MAX_PAYLOAD_SIZE_SUPPORTED_SHIFT 0
2014
2015
2016
/****************************************************************************
2017
 * PCIE_CFG :: DEVICE_STATUS_CONTROL
2018
 ***************************************************************************/
2019
/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: RESERVED_0 [31:22] */
2020
#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_0_MASK             0xffc00000
2021
#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_0_ALIGN            0
2022
#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_0_BITS             10
2023
#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_0_SHIFT            22
2024
2025
/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: TRANSACTION_PENDING [21:21] */
2026
#define PCIE_CFG_DEVICE_STATUS_CONTROL_TRANSACTION_PENDING_MASK    0x00200000
2027
#define PCIE_CFG_DEVICE_STATUS_CONTROL_TRANSACTION_PENDING_ALIGN   0
2028
#define PCIE_CFG_DEVICE_STATUS_CONTROL_TRANSACTION_PENDING_BITS    1
2029
#define PCIE_CFG_DEVICE_STATUS_CONTROL_TRANSACTION_PENDING_SHIFT   21
2030
2031
/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: AUX_POWER_DETECTED [20:20] */
2032
#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_DETECTED_MASK     0x00100000
2033
#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_DETECTED_ALIGN    0
2034
#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_DETECTED_BITS     1
2035
#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_DETECTED_SHIFT    20
2036
2037
/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: UNSUPPORTED_REQUEST_DETECTED [19:19] */
2038
#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_DETECTED_MASK 0x00080000
2039
#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_DETECTED_ALIGN 0
2040
#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_DETECTED_BITS 1
2041
#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_DETECTED_SHIFT 19
2042
2043
/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: FATAL_ERROR_DETECTED [18:18] */
2044
#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_DETECTED_MASK   0x00040000
2045
#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_DETECTED_ALIGN  0
2046
#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_DETECTED_BITS   1
2047
#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_DETECTED_SHIFT  18
2048
2049
/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: NON_FATAL_ERROR_DETECTED [17:17] */
2050
#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_DETECTED_MASK 0x00020000
2051
#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_DETECTED_ALIGN 0
2052
#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_DETECTED_BITS 1
2053
#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_DETECTED_SHIFT 17
2054
2055
/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: CORRECTABLE_ERROR_DETECTED [16:16] */
2056
#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_DETECTED_MASK 0x00010000
2057
#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_DETECTED_ALIGN 0
2058
#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_DETECTED_BITS 1
2059
#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_DETECTED_SHIFT 16
2060
2061
/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: RESERVED_1 [15:15] */
2062
#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_1_MASK             0x00008000
2063
#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_1_ALIGN            0
2064
#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_1_BITS             1
2065
#define PCIE_CFG_DEVICE_STATUS_CONTROL_RESERVED_1_SHIFT            15
2066
2067
/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: MAX_READ_REQUEST_SIZE [14:12] */
2068
#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_READ_REQUEST_SIZE_MASK  0x00007000
2069
#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_READ_REQUEST_SIZE_ALIGN 0
2070
#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_READ_REQUEST_SIZE_BITS  3
2071
#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_READ_REQUEST_SIZE_SHIFT 12
2072
2073
/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: ENABLE_NO_SNOOP [11:11] */
2074
#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLE_NO_SNOOP_MASK        0x00000800
2075
#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLE_NO_SNOOP_ALIGN       0
2076
#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLE_NO_SNOOP_BITS        1
2077
#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLE_NO_SNOOP_SHIFT       11
2078
2079
/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: AUX_POWER_PM_ENABLE [10:10] */
2080
#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_PM_ENABLE_MASK    0x00000400
2081
#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_PM_ENABLE_ALIGN   0
2082
#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_PM_ENABLE_BITS    1
2083
#define PCIE_CFG_DEVICE_STATUS_CONTROL_AUX_POWER_PM_ENABLE_SHIFT   10
2084
2085
/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: PHANTOM_FUNCTIONS_ENABLE [09:09] */
2086
#define PCIE_CFG_DEVICE_STATUS_CONTROL_PHANTOM_FUNCTIONS_ENABLE_MASK 0x00000200
2087
#define PCIE_CFG_DEVICE_STATUS_CONTROL_PHANTOM_FUNCTIONS_ENABLE_ALIGN 0
2088
#define PCIE_CFG_DEVICE_STATUS_CONTROL_PHANTOM_FUNCTIONS_ENABLE_BITS 1
2089
#define PCIE_CFG_DEVICE_STATUS_CONTROL_PHANTOM_FUNCTIONS_ENABLE_SHIFT 9
2090
2091
/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: EXTENDED_TAG_FIELD_ENABLE [08:08] */
2092
#define PCIE_CFG_DEVICE_STATUS_CONTROL_EXTENDED_TAG_FIELD_ENABLE_MASK 0x00000100
2093
#define PCIE_CFG_DEVICE_STATUS_CONTROL_EXTENDED_TAG_FIELD_ENABLE_ALIGN 0
2094
#define PCIE_CFG_DEVICE_STATUS_CONTROL_EXTENDED_TAG_FIELD_ENABLE_BITS 1
2095
#define PCIE_CFG_DEVICE_STATUS_CONTROL_EXTENDED_TAG_FIELD_ENABLE_SHIFT 8
2096
2097
/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: MAX_PAYLOAD_SIZE [07:05] */
2098
#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_PAYLOAD_SIZE_MASK       0x000000e0
2099
#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_PAYLOAD_SIZE_ALIGN      0
2100
#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_PAYLOAD_SIZE_BITS       3
2101
#define PCIE_CFG_DEVICE_STATUS_CONTROL_MAX_PAYLOAD_SIZE_SHIFT      5
2102
2103
/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: ENABLED_RELAXED_ORDERING [04:04] */
2104
#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLED_RELAXED_ORDERING_MASK 0x00000010
2105
#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLED_RELAXED_ORDERING_ALIGN 0
2106
#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLED_RELAXED_ORDERING_BITS 1
2107
#define PCIE_CFG_DEVICE_STATUS_CONTROL_ENABLED_RELAXED_ORDERING_SHIFT 4
2108
2109
/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: UNSUPPORTED_REQUEST_REPORTING_ENABLE [03:03] */
2110
#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_REPORTING_ENABLE_MASK 0x00000008
2111
#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_REPORTING_ENABLE_ALIGN 0
2112
#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_REPORTING_ENABLE_BITS 1
2113
#define PCIE_CFG_DEVICE_STATUS_CONTROL_UNSUPPORTED_REQUEST_REPORTING_ENABLE_SHIFT 3
2114
2115
/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: FATAL_ERROR_REPORTING_ENABLED [02:02] */
2116
#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_REPORTING_ENABLED_MASK 0x00000004
2117
#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_REPORTING_ENABLED_ALIGN 0
2118
#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_REPORTING_ENABLED_BITS 1
2119
#define PCIE_CFG_DEVICE_STATUS_CONTROL_FATAL_ERROR_REPORTING_ENABLED_SHIFT 2
2120
2121
/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: NON_FATAL_ERROR_REPORTING_ENABLED [01:01] */
2122
#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_REPORTING_ENABLED_MASK 0x00000002
2123
#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_REPORTING_ENABLED_ALIGN 0
2124
#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_REPORTING_ENABLED_BITS 1
2125
#define PCIE_CFG_DEVICE_STATUS_CONTROL_NON_FATAL_ERROR_REPORTING_ENABLED_SHIFT 1
2126
2127
/* PCIE_CFG :: DEVICE_STATUS_CONTROL :: CORRECTABLE_ERROR_REPORTING_ENABLED [00:00] */
2128
#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_REPORTING_ENABLED_MASK 0x00000001
2129
#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_REPORTING_ENABLED_ALIGN 0
2130
#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_REPORTING_ENABLED_BITS 1
2131
#define PCIE_CFG_DEVICE_STATUS_CONTROL_CORRECTABLE_ERROR_REPORTING_ENABLED_SHIFT 0
2132
2133
2134
/****************************************************************************
2135
 * PCIE_CFG :: LINK_CAPABILITY
2136
 ***************************************************************************/
2137
/* PCIE_CFG :: LINK_CAPABILITY :: PORT_NUMBER [31:24] */
2138
#define PCIE_CFG_LINK_CAPABILITY_PORT_NUMBER_MASK                  0xff000000
2139
#define PCIE_CFG_LINK_CAPABILITY_PORT_NUMBER_ALIGN                 0
2140
#define PCIE_CFG_LINK_CAPABILITY_PORT_NUMBER_BITS                  8
2141
#define PCIE_CFG_LINK_CAPABILITY_PORT_NUMBER_SHIFT                 24
2142
2143
/* PCIE_CFG :: LINK_CAPABILITY :: RESERVED_0 [23:19] */
2144
#define PCIE_CFG_LINK_CAPABILITY_RESERVED_0_MASK                   0x00f80000
2145
#define PCIE_CFG_LINK_CAPABILITY_RESERVED_0_ALIGN                  0
2146
#define PCIE_CFG_LINK_CAPABILITY_RESERVED_0_BITS                   5
2147
#define PCIE_CFG_LINK_CAPABILITY_RESERVED_0_SHIFT                  19
2148
2149
/* PCIE_CFG :: LINK_CAPABILITY :: CLOCK_POWER_MANAGEMENT [18:18] */
2150
#define PCIE_CFG_LINK_CAPABILITY_CLOCK_POWER_MANAGEMENT_MASK       0x00040000
2151
#define PCIE_CFG_LINK_CAPABILITY_CLOCK_POWER_MANAGEMENT_ALIGN      0
2152
#define PCIE_CFG_LINK_CAPABILITY_CLOCK_POWER_MANAGEMENT_BITS       1
2153
#define PCIE_CFG_LINK_CAPABILITY_CLOCK_POWER_MANAGEMENT_SHIFT      18
2154
2155
/* PCIE_CFG :: LINK_CAPABILITY :: L1_EXIT_LATENCY [17:15] */
2156
#define PCIE_CFG_LINK_CAPABILITY_L1_EXIT_LATENCY_MASK              0x00038000
2157
#define PCIE_CFG_LINK_CAPABILITY_L1_EXIT_LATENCY_ALIGN             0
2158
#define PCIE_CFG_LINK_CAPABILITY_L1_EXIT_LATENCY_BITS              3
2159
#define PCIE_CFG_LINK_CAPABILITY_L1_EXIT_LATENCY_SHIFT             15
2160
2161
/* PCIE_CFG :: LINK_CAPABILITY :: L0S_EXIT_LATENCY [14:12] */
2162
#define PCIE_CFG_LINK_CAPABILITY_L0S_EXIT_LATENCY_MASK             0x00007000
2163
#define PCIE_CFG_LINK_CAPABILITY_L0S_EXIT_LATENCY_ALIGN            0
2164
#define PCIE_CFG_LINK_CAPABILITY_L0S_EXIT_LATENCY_BITS             3
2165
#define PCIE_CFG_LINK_CAPABILITY_L0S_EXIT_LATENCY_SHIFT            12
2166
2167
/* PCIE_CFG :: LINK_CAPABILITY :: ACTIVE_STATE_POWER_MANAGEMENT_SUPPORT [11:10] */
2168
#define PCIE_CFG_LINK_CAPABILITY_ACTIVE_STATE_POWER_MANAGEMENT_SUPPORT_MASK 0x00000c00
2169
#define PCIE_CFG_LINK_CAPABILITY_ACTIVE_STATE_POWER_MANAGEMENT_SUPPORT_ALIGN 0
2170
#define PCIE_CFG_LINK_CAPABILITY_ACTIVE_STATE_POWER_MANAGEMENT_SUPPORT_BITS 2
2171
#define PCIE_CFG_LINK_CAPABILITY_ACTIVE_STATE_POWER_MANAGEMENT_SUPPORT_SHIFT 10
2172
2173
/* PCIE_CFG :: LINK_CAPABILITY :: MAXIMUM_LINK_WIDTH [09:04] */
2174
#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_WIDTH_MASK           0x000003f0
2175
#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_WIDTH_ALIGN          0
2176
#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_WIDTH_BITS           6
2177
#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_WIDTH_SHIFT          4
2178
2179
/* PCIE_CFG :: LINK_CAPABILITY :: MAXIMUM_LINK_SPEED [03:00] */
2180
#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_SPEED_MASK           0x0000000f
2181
#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_SPEED_ALIGN          0
2182
#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_SPEED_BITS           4
2183
#define PCIE_CFG_LINK_CAPABILITY_MAXIMUM_LINK_SPEED_SHIFT          0
2184
2185
2186
/****************************************************************************
2187
 * PCIE_CFG :: LINK_STATUS_CONTROL
2188
 ***************************************************************************/
2189
/* PCIE_CFG :: LINK_STATUS_CONTROL :: RESERVED_0 [31:29] */
2190
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_0_MASK               0xe0000000
2191
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_0_ALIGN              0
2192
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_0_BITS               3
2193
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_0_SHIFT              29
2194
2195
/* PCIE_CFG :: LINK_STATUS_CONTROL :: SLOT_CLOCK_CONFIGURATION [28:28] */
2196
#define PCIE_CFG_LINK_STATUS_CONTROL_SLOT_CLOCK_CONFIGURATION_MASK 0x10000000
2197
#define PCIE_CFG_LINK_STATUS_CONTROL_SLOT_CLOCK_CONFIGURATION_ALIGN 0
2198
#define PCIE_CFG_LINK_STATUS_CONTROL_SLOT_CLOCK_CONFIGURATION_BITS 1
2199
#define PCIE_CFG_LINK_STATUS_CONTROL_SLOT_CLOCK_CONFIGURATION_SHIFT 28
2200
2201
/* PCIE_CFG :: LINK_STATUS_CONTROL :: RESERVED_1 [27:26] */
2202
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_1_MASK               0x0c000000
2203
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_1_ALIGN              0
2204
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_1_BITS               2
2205
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_1_SHIFT              26
2206
2207
/* PCIE_CFG :: LINK_STATUS_CONTROL :: NEGOTIATED_LINK_WIDTH [25:20] */
2208
#define PCIE_CFG_LINK_STATUS_CONTROL_NEGOTIATED_LINK_WIDTH_MASK    0x03f00000
2209
#define PCIE_CFG_LINK_STATUS_CONTROL_NEGOTIATED_LINK_WIDTH_ALIGN   0
2210
#define PCIE_CFG_LINK_STATUS_CONTROL_NEGOTIATED_LINK_WIDTH_BITS    6
2211
#define PCIE_CFG_LINK_STATUS_CONTROL_NEGOTIATED_LINK_WIDTH_SHIFT   20
2212
2213
/* PCIE_CFG :: LINK_STATUS_CONTROL :: LINK_SPEED [19:16] */
2214
#define PCIE_CFG_LINK_STATUS_CONTROL_LINK_SPEED_MASK               0x000f0000
2215
#define PCIE_CFG_LINK_STATUS_CONTROL_LINK_SPEED_ALIGN              0
2216
#define PCIE_CFG_LINK_STATUS_CONTROL_LINK_SPEED_BITS               4
2217
#define PCIE_CFG_LINK_STATUS_CONTROL_LINK_SPEED_SHIFT              16
2218
2219
/* PCIE_CFG :: LINK_STATUS_CONTROL :: RESERVED_2 [15:09] */
2220
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_2_MASK               0x0000fe00
2221
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_2_ALIGN              0
2222
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_2_BITS               7
2223
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_2_SHIFT              9
2224
2225
/* PCIE_CFG :: LINK_STATUS_CONTROL :: CLOCK_REQUEST_ENABLE [08:08] */
2226
#define PCIE_CFG_LINK_STATUS_CONTROL_CLOCK_REQUEST_ENABLE_MASK     0x00000100
2227
#define PCIE_CFG_LINK_STATUS_CONTROL_CLOCK_REQUEST_ENABLE_ALIGN    0
2228
#define PCIE_CFG_LINK_STATUS_CONTROL_CLOCK_REQUEST_ENABLE_BITS     1
2229
#define PCIE_CFG_LINK_STATUS_CONTROL_CLOCK_REQUEST_ENABLE_SHIFT    8
2230
2231
/* PCIE_CFG :: LINK_STATUS_CONTROL :: EXTENDED_SYNCH [07:07] */
2232
#define PCIE_CFG_LINK_STATUS_CONTROL_EXTENDED_SYNCH_MASK           0x00000080
2233
#define PCIE_CFG_LINK_STATUS_CONTROL_EXTENDED_SYNCH_ALIGN          0
2234
#define PCIE_CFG_LINK_STATUS_CONTROL_EXTENDED_SYNCH_BITS           1
2235
#define PCIE_CFG_LINK_STATUS_CONTROL_EXTENDED_SYNCH_SHIFT          7
2236
2237
/* PCIE_CFG :: LINK_STATUS_CONTROL :: COMMON_CLOCK_CONFIGURATION [06:06] */
2238
#define PCIE_CFG_LINK_STATUS_CONTROL_COMMON_CLOCK_CONFIGURATION_MASK 0x00000040
2239
#define PCIE_CFG_LINK_STATUS_CONTROL_COMMON_CLOCK_CONFIGURATION_ALIGN 0
2240
#define PCIE_CFG_LINK_STATUS_CONTROL_COMMON_CLOCK_CONFIGURATION_BITS 1
2241
#define PCIE_CFG_LINK_STATUS_CONTROL_COMMON_CLOCK_CONFIGURATION_SHIFT 6
2242
2243
/* PCIE_CFG :: LINK_STATUS_CONTROL :: RESERVED_3 [05:05] */
2244
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_3_MASK               0x00000020
2245
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_3_ALIGN              0
2246
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_3_BITS               1
2247
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_3_SHIFT              5
2248
2249
/* PCIE_CFG :: LINK_STATUS_CONTROL :: RESERVED_4 [04:04] */
2250
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_4_MASK               0x00000010
2251
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_4_ALIGN              0
2252
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_4_BITS               1
2253
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_4_SHIFT              4
2254
2255
/* PCIE_CFG :: LINK_STATUS_CONTROL :: READ_COMPLETION_BOUNDARY [03:03] */
2256
#define PCIE_CFG_LINK_STATUS_CONTROL_READ_COMPLETION_BOUNDARY_MASK 0x00000008
2257
#define PCIE_CFG_LINK_STATUS_CONTROL_READ_COMPLETION_BOUNDARY_ALIGN 0
2258
#define PCIE_CFG_LINK_STATUS_CONTROL_READ_COMPLETION_BOUNDARY_BITS 1
2259
#define PCIE_CFG_LINK_STATUS_CONTROL_READ_COMPLETION_BOUNDARY_SHIFT 3
2260
2261
/* PCIE_CFG :: LINK_STATUS_CONTROL :: RESERVED_5 [02:02] */
2262
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_5_MASK               0x00000004
2263
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_5_ALIGN              0
2264
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_5_BITS               1
2265
#define PCIE_CFG_LINK_STATUS_CONTROL_RESERVED_5_SHIFT              2
2266
2267
/* PCIE_CFG :: LINK_STATUS_CONTROL :: ACTIVE_STATE_POWER_MANAGEMENT_CONTROL [01:00] */
2268
#define PCIE_CFG_LINK_STATUS_CONTROL_ACTIVE_STATE_POWER_MANAGEMENT_CONTROL_MASK 0x00000003
2269
#define PCIE_CFG_LINK_STATUS_CONTROL_ACTIVE_STATE_POWER_MANAGEMENT_CONTROL_ALIGN 0
2270
#define PCIE_CFG_LINK_STATUS_CONTROL_ACTIVE_STATE_POWER_MANAGEMENT_CONTROL_BITS 2
2271
#define PCIE_CFG_LINK_STATUS_CONTROL_ACTIVE_STATE_POWER_MANAGEMENT_CONTROL_SHIFT 0
2272
2273
2274
/****************************************************************************
2275
 * PCIE_CFG :: DEVICE_CAPABILITIES_2
2276
 ***************************************************************************/
2277
/* PCIE_CFG :: DEVICE_CAPABILITIES_2 :: RESERVED_0 [31:05] */
2278
#define PCIE_CFG_DEVICE_CAPABILITIES_2_RESERVED_0_MASK             0xffffffe0
2279
#define PCIE_CFG_DEVICE_CAPABILITIES_2_RESERVED_0_ALIGN            0
2280
#define PCIE_CFG_DEVICE_CAPABILITIES_2_RESERVED_0_BITS             27
2281
#define PCIE_CFG_DEVICE_CAPABILITIES_2_RESERVED_0_SHIFT            5
2282
2283
/* PCIE_CFG :: DEVICE_CAPABILITIES_2 :: CPL_DISABLE_SUPPORTED [04:04] */
2284
#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_DISABLE_SUPPORTED_MASK  0x00000010
2285
#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_DISABLE_SUPPORTED_ALIGN 0
2286
#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_DISABLE_SUPPORTED_BITS  1
2287
#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_DISABLE_SUPPORTED_SHIFT 4
2288
2289
/* PCIE_CFG :: DEVICE_CAPABILITIES_2 :: CPL_TIMEOUT_RANGE_SUPPORTED [03:00] */
2290
#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_TIMEOUT_RANGE_SUPPORTED_MASK 0x0000000f
2291
#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_TIMEOUT_RANGE_SUPPORTED_ALIGN 0
2292
#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_TIMEOUT_RANGE_SUPPORTED_BITS 4
2293
#define PCIE_CFG_DEVICE_CAPABILITIES_2_CPL_TIMEOUT_RANGE_SUPPORTED_SHIFT 0
2294
2295
2296
/****************************************************************************
2297
 * PCIE_CFG :: DEVICE_STATUS_CONTROL_2
2298
 ***************************************************************************/
2299
/* PCIE_CFG :: DEVICE_STATUS_CONTROL_2 :: RESERVED_0 [31:05] */
2300
#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_RESERVED_0_MASK           0xffffffe0
2301
#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_RESERVED_0_ALIGN          0
2302
#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_RESERVED_0_BITS           27
2303
#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_RESERVED_0_SHIFT          5
2304
2305
/* PCIE_CFG :: DEVICE_STATUS_CONTROL_2 :: CPL_TIMEOUT_DISABLE [04:04] */
2306
#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_DISABLE_MASK  0x00000010
2307
#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_DISABLE_ALIGN 0
2308
#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_DISABLE_BITS  1
2309
#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_DISABLE_SHIFT 4
2310
2311
/* PCIE_CFG :: DEVICE_STATUS_CONTROL_2 :: CPL_TIMEOUT_VALUE [03:00] */
2312
#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_VALUE_MASK    0x0000000f
2313
#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_VALUE_ALIGN   0
2314
#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_VALUE_BITS    4
2315
#define PCIE_CFG_DEVICE_STATUS_CONTROL_2_CPL_TIMEOUT_VALUE_SHIFT   0
2316
2317
2318
/****************************************************************************
2319
 * PCIE_CFG :: LINK_CAPABILITIES_2
2320
 ***************************************************************************/
2321
/* PCIE_CFG :: LINK_CAPABILITIES_2 :: RESERVED_0 [31:00] */
2322
#define PCIE_CFG_LINK_CAPABILITIES_2_RESERVED_0_MASK               0xffffffff
2323
#define PCIE_CFG_LINK_CAPABILITIES_2_RESERVED_0_ALIGN              0
2324
#define PCIE_CFG_LINK_CAPABILITIES_2_RESERVED_0_BITS               32
2325
#define PCIE_CFG_LINK_CAPABILITIES_2_RESERVED_0_SHIFT              0
2326
2327
2328
/****************************************************************************
2329
 * PCIE_CFG :: LINK_STATUS_CONTROL_2
2330
 ***************************************************************************/
2331
/* PCIE_CFG :: LINK_STATUS_CONTROL_2 :: RESERVED_0 [31:00] */
2332
#define PCIE_CFG_LINK_STATUS_CONTROL_2_RESERVED_0_MASK             0xffffffff
2333
#define PCIE_CFG_LINK_STATUS_CONTROL_2_RESERVED_0_ALIGN            0
2334
#define PCIE_CFG_LINK_STATUS_CONTROL_2_RESERVED_0_BITS             32
2335
#define PCIE_CFG_LINK_STATUS_CONTROL_2_RESERVED_0_SHIFT            0
2336
2337
2338
/****************************************************************************
2339
 * PCIE_CFG :: ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER
2340
 ***************************************************************************/
2341
/* PCIE_CFG :: ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER :: NEXT_CAPABILITY_OFFSET [31:20] */
2342
#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_MASK 0xfff00000
2343
#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_ALIGN 0
2344
#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_BITS 12
2345
#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_SHIFT 20
2346
2347
/* PCIE_CFG :: ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER :: CAPABILITY_VERSION [19:16] */
2348
#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_MASK 0x000f0000
2349
#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_ALIGN 0
2350
#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_BITS 4
2351
#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_SHIFT 16
2352
2353
/* PCIE_CFG :: ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER :: PCIE_EXTENDED_CAPABILITY_ID [15:00] */
2354
#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_MASK 0x0000ffff
2355
#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_ALIGN 0
2356
#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_BITS 16
2357
#define PCIE_CFG_ADVANCED_ERROR_REPORTING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_SHIFT 0
2358
2359
2360
/****************************************************************************
2361
 * PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS
2362
 ***************************************************************************/
2363
/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: RESERVED_0 [31:21] */
2364
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_0_MASK        0xffe00000
2365
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_0_ALIGN       0
2366
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_0_BITS        11
2367
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_0_SHIFT       21
2368
2369
/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: UNSUPPORTED_REQUEST_ERROR_STATUS [20:20] */
2370
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNSUPPORTED_REQUEST_ERROR_STATUS_MASK 0x00100000
2371
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNSUPPORTED_REQUEST_ERROR_STATUS_ALIGN 0
2372
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNSUPPORTED_REQUEST_ERROR_STATUS_BITS 1
2373
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNSUPPORTED_REQUEST_ERROR_STATUS_SHIFT 20
2374
2375
/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: ECRC_ERROR_STATUS [19:19] */
2376
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_ECRC_ERROR_STATUS_MASK 0x00080000
2377
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_ECRC_ERROR_STATUS_ALIGN 0
2378
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_ECRC_ERROR_STATUS_BITS 1
2379
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_ECRC_ERROR_STATUS_SHIFT 19
2380
2381
/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: MALFORMED_TLP_STATUS [18:18] */
2382
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_MALFORMED_TLP_STATUS_MASK 0x00040000
2383
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_MALFORMED_TLP_STATUS_ALIGN 0
2384
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_MALFORMED_TLP_STATUS_BITS 1
2385
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_MALFORMED_TLP_STATUS_SHIFT 18
2386
2387
/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: RECEIVER_OVERFLOW_STATUS [17:17] */
2388
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RECEIVER_OVERFLOW_STATUS_MASK 0x00020000
2389
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RECEIVER_OVERFLOW_STATUS_ALIGN 0
2390
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RECEIVER_OVERFLOW_STATUS_BITS 1
2391
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RECEIVER_OVERFLOW_STATUS_SHIFT 17
2392
2393
/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: UNEXPECTED_COMPLETION_STATUS [16:16] */
2394
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNEXPECTED_COMPLETION_STATUS_MASK 0x00010000
2395
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNEXPECTED_COMPLETION_STATUS_ALIGN 0
2396
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNEXPECTED_COMPLETION_STATUS_BITS 1
2397
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_UNEXPECTED_COMPLETION_STATUS_SHIFT 16
2398
2399
/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: COMPLETER_ABORT_STATUS [15:15] */
2400
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETER_ABORT_STATUS_MASK 0x00008000
2401
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETER_ABORT_STATUS_ALIGN 0
2402
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETER_ABORT_STATUS_BITS 1
2403
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETER_ABORT_STATUS_SHIFT 15
2404
2405
/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: COMPLETION_TIMEOUT_STATUS [14:14] */
2406
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETION_TIMEOUT_STATUS_MASK 0x00004000
2407
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETION_TIMEOUT_STATUS_ALIGN 0
2408
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETION_TIMEOUT_STATUS_BITS 1
2409
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_COMPLETION_TIMEOUT_STATUS_SHIFT 14
2410
2411
/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: FLOW_CONTROL_PROTOCOL_ERROR_STATUS [13:13] */
2412
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_STATUS_MASK 0x00002000
2413
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_STATUS_ALIGN 0
2414
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_STATUS_BITS 1
2415
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_STATUS_SHIFT 13
2416
2417
/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: POISONED_TLP_STATUS [12:12] */
2418
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_POISONED_TLP_STATUS_MASK 0x00001000
2419
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_POISONED_TLP_STATUS_ALIGN 0
2420
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_POISONED_TLP_STATUS_BITS 1
2421
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_POISONED_TLP_STATUS_SHIFT 12
2422
2423
/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: RESERVED_1 [11:05] */
2424
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_1_MASK        0x00000fe0
2425
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_1_ALIGN       0
2426
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_1_BITS        7
2427
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_1_SHIFT       5
2428
2429
/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: DATA_LINK_PROTOCOL_ERROR_STATUS [04:04] */
2430
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_DATA_LINK_PROTOCOL_ERROR_STATUS_MASK 0x00000010
2431
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_DATA_LINK_PROTOCOL_ERROR_STATUS_ALIGN 0
2432
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_DATA_LINK_PROTOCOL_ERROR_STATUS_BITS 1
2433
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_DATA_LINK_PROTOCOL_ERROR_STATUS_SHIFT 4
2434
2435
/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: RESERVED_2 [03:01] */
2436
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_2_MASK        0x0000000e
2437
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_2_ALIGN       0
2438
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_2_BITS        3
2439
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_RESERVED_2_SHIFT       1
2440
2441
/* PCIE_CFG :: UNCORRECTABLE_ERROR_STATUS :: TRAINING_ERROR_STATUS [00:00] */
2442
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_TRAINING_ERROR_STATUS_MASK 0x00000001
2443
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_TRAINING_ERROR_STATUS_ALIGN 0
2444
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_TRAINING_ERROR_STATUS_BITS 1
2445
#define PCIE_CFG_UNCORRECTABLE_ERROR_STATUS_TRAINING_ERROR_STATUS_SHIFT 0
2446
2447
2448
/****************************************************************************
2449
 * PCIE_CFG :: UNCORRECTABLE_ERROR_MASK
2450
 ***************************************************************************/
2451
/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: RESERVED_0 [31:21] */
2452
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_0_MASK          0xffe00000
2453
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_0_ALIGN         0
2454
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_0_BITS          11
2455
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_0_SHIFT         21
2456
2457
/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: UNSUPPORTED_REQUEST_ERROR_MASK [20:20] */
2458
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNSUPPORTED_REQUEST_ERROR_MASK_MASK 0x00100000
2459
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNSUPPORTED_REQUEST_ERROR_MASK_ALIGN 0
2460
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNSUPPORTED_REQUEST_ERROR_MASK_BITS 1
2461
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNSUPPORTED_REQUEST_ERROR_MASK_SHIFT 20
2462
2463
/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: ECRC_ERROR_MASK [19:19] */
2464
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_ECRC_ERROR_MASK_MASK     0x00080000
2465
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_ECRC_ERROR_MASK_ALIGN    0
2466
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_ECRC_ERROR_MASK_BITS     1
2467
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_ECRC_ERROR_MASK_SHIFT    19
2468
2469
/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: MALFORMED_TLP_MASK [18:18] */
2470
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_MALFORMED_TLP_MASK_MASK  0x00040000
2471
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_MALFORMED_TLP_MASK_ALIGN 0
2472
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_MALFORMED_TLP_MASK_BITS  1
2473
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_MALFORMED_TLP_MASK_SHIFT 18
2474
2475
/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: RECEIVER_OVERFLOW_MASK [17:17] */
2476
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RECEIVER_OVERFLOW_MASK_MASK 0x00020000
2477
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RECEIVER_OVERFLOW_MASK_ALIGN 0
2478
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RECEIVER_OVERFLOW_MASK_BITS 1
2479
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RECEIVER_OVERFLOW_MASK_SHIFT 17
2480
2481
/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: UNEXPECTED_COMPLETION_MASK [16:16] */
2482
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNEXPECTED_COMPLETION_MASK_MASK 0x00010000
2483
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNEXPECTED_COMPLETION_MASK_ALIGN 0
2484
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNEXPECTED_COMPLETION_MASK_BITS 1
2485
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_UNEXPECTED_COMPLETION_MASK_SHIFT 16
2486
2487
/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: COMPLETER_ABORT_MASK [15:15] */
2488
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETER_ABORT_MASK_MASK 0x00008000
2489
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETER_ABORT_MASK_ALIGN 0
2490
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETER_ABORT_MASK_BITS 1
2491
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETER_ABORT_MASK_SHIFT 15
2492
2493
/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: COMPLETION_TIMEOUT_MASK [14:14] */
2494
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETION_TIMEOUT_MASK_MASK 0x00004000
2495
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETION_TIMEOUT_MASK_ALIGN 0
2496
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETION_TIMEOUT_MASK_BITS 1
2497
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_COMPLETION_TIMEOUT_MASK_SHIFT 14
2498
2499
/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: FLOW_CONTROL_PROTOCOL_ERROR_MASK [13:13] */
2500
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_FLOW_CONTROL_PROTOCOL_ERROR_MASK_MASK 0x00002000
2501
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_FLOW_CONTROL_PROTOCOL_ERROR_MASK_ALIGN 0
2502
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_FLOW_CONTROL_PROTOCOL_ERROR_MASK_BITS 1
2503
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_FLOW_CONTROL_PROTOCOL_ERROR_MASK_SHIFT 13
2504
2505
/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: POISONED_TLP_MASK [12:12] */
2506
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_POISONED_TLP_MASK_MASK   0x00001000
2507
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_POISONED_TLP_MASK_ALIGN  0
2508
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_POISONED_TLP_MASK_BITS   1
2509
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_POISONED_TLP_MASK_SHIFT  12
2510
2511
/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: RESERVED_1 [11:05] */
2512
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_1_MASK          0x00000fe0
2513
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_1_ALIGN         0
2514
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_1_BITS          7
2515
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_1_SHIFT         5
2516
2517
/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: DATA_LINK_PROTOCOL_ERROR_MASK [04:04] */
2518
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_DATA_LINK_PROTOCOL_ERROR_MASK_MASK 0x00000010
2519
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_DATA_LINK_PROTOCOL_ERROR_MASK_ALIGN 0
2520
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_DATA_LINK_PROTOCOL_ERROR_MASK_BITS 1
2521
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_DATA_LINK_PROTOCOL_ERROR_MASK_SHIFT 4
2522
2523
/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: RESERVED_2 [03:01] */
2524
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_2_MASK          0x0000000e
2525
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_2_ALIGN         0
2526
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_2_BITS          3
2527
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_RESERVED_2_SHIFT         1
2528
2529
/* PCIE_CFG :: UNCORRECTABLE_ERROR_MASK :: TRAINING_ERROR_MASK [00:00] */
2530
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_TRAINING_ERROR_MASK_MASK 0x00000001
2531
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_TRAINING_ERROR_MASK_ALIGN 0
2532
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_TRAINING_ERROR_MASK_BITS 1
2533
#define PCIE_CFG_UNCORRECTABLE_ERROR_MASK_TRAINING_ERROR_MASK_SHIFT 0
2534
2535
2536
/****************************************************************************
2537
 * PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY
2538
 ***************************************************************************/
2539
/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: RESERVED_0 [31:21] */
2540
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_0_MASK      0xffe00000
2541
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_0_ALIGN     0
2542
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_0_BITS      11
2543
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_0_SHIFT     21
2544
2545
/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: UNSUPPORTED_REQUEST_ERROR_SEVERITY [20:20] */
2546
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNSUPPORTED_REQUEST_ERROR_SEVERITY_MASK 0x00100000
2547
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNSUPPORTED_REQUEST_ERROR_SEVERITY_ALIGN 0
2548
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNSUPPORTED_REQUEST_ERROR_SEVERITY_BITS 1
2549
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNSUPPORTED_REQUEST_ERROR_SEVERITY_SHIFT 20
2550
2551
/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: ECRC_ERROR_SEVERITY [19:19] */
2552
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_ECRC_ERROR_SEVERITY_MASK 0x00080000
2553
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_ECRC_ERROR_SEVERITY_ALIGN 0
2554
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_ECRC_ERROR_SEVERITY_BITS 1
2555
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_ECRC_ERROR_SEVERITY_SHIFT 19
2556
2557
/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: MALFORMED_TLP_SEVERITY [18:18] */
2558
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_MALFORMED_TLP_SEVERITY_MASK 0x00040000
2559
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_MALFORMED_TLP_SEVERITY_ALIGN 0
2560
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_MALFORMED_TLP_SEVERITY_BITS 1
2561
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_MALFORMED_TLP_SEVERITY_SHIFT 18
2562
2563
/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: RECEIVER_OVERFLOW_ERROR_SEVERITY [17:17] */
2564
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RECEIVER_OVERFLOW_ERROR_SEVERITY_MASK 0x00020000
2565
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RECEIVER_OVERFLOW_ERROR_SEVERITY_ALIGN 0
2566
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RECEIVER_OVERFLOW_ERROR_SEVERITY_BITS 1
2567
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RECEIVER_OVERFLOW_ERROR_SEVERITY_SHIFT 17
2568
2569
/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: UNEXPECTED_COMPLETION_ERROR_SEVERITY [16:16] */
2570
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNEXPECTED_COMPLETION_ERROR_SEVERITY_MASK 0x00010000
2571
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNEXPECTED_COMPLETION_ERROR_SEVERITY_ALIGN 0
2572
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNEXPECTED_COMPLETION_ERROR_SEVERITY_BITS 1
2573
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_UNEXPECTED_COMPLETION_ERROR_SEVERITY_SHIFT 16
2574
2575
/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: COMPLETER_ABORT_ERROR_SEVERITY [15:15] */
2576
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETER_ABORT_ERROR_SEVERITY_MASK 0x00008000
2577
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETER_ABORT_ERROR_SEVERITY_ALIGN 0
2578
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETER_ABORT_ERROR_SEVERITY_BITS 1
2579
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETER_ABORT_ERROR_SEVERITY_SHIFT 15
2580
2581
/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: COMPLETION_TIMEOUT_ERROR_SEVERITY [14:14] */
2582
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETION_TIMEOUT_ERROR_SEVERITY_MASK 0x00004000
2583
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETION_TIMEOUT_ERROR_SEVERITY_ALIGN 0
2584
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETION_TIMEOUT_ERROR_SEVERITY_BITS 1
2585
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_COMPLETION_TIMEOUT_ERROR_SEVERITY_SHIFT 14
2586
2587
/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: FLOW_CONTROL_PROTOCOL_ERROR_SEVERITY [13:13] */
2588
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_FLOW_CONTROL_PROTOCOL_ERROR_SEVERITY_MASK 0x00002000
2589
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_FLOW_CONTROL_PROTOCOL_ERROR_SEVERITY_ALIGN 0
2590
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_FLOW_CONTROL_PROTOCOL_ERROR_SEVERITY_BITS 1
2591
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_FLOW_CONTROL_PROTOCOL_ERROR_SEVERITY_SHIFT 13
2592
2593
/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: POISONED_TLP_SEVERITY [12:12] */
2594
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_POISONED_TLP_SEVERITY_MASK 0x00001000
2595
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_POISONED_TLP_SEVERITY_ALIGN 0
2596
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_POISONED_TLP_SEVERITY_BITS 1
2597
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_POISONED_TLP_SEVERITY_SHIFT 12
2598
2599
/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: RESERVED_1 [11:05] */
2600
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_1_MASK      0x00000fe0
2601
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_1_ALIGN     0
2602
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_1_BITS      7
2603
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_1_SHIFT     5
2604
2605
/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: DATA_LINK_PROTOCOL_ERROR_SEVERITY [04:04] */
2606
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_DATA_LINK_PROTOCOL_ERROR_SEVERITY_MASK 0x00000010
2607
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_DATA_LINK_PROTOCOL_ERROR_SEVERITY_ALIGN 0
2608
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_DATA_LINK_PROTOCOL_ERROR_SEVERITY_BITS 1
2609
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_DATA_LINK_PROTOCOL_ERROR_SEVERITY_SHIFT 4
2610
2611
/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: RESERVED_2 [03:01] */
2612
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_2_MASK      0x0000000e
2613
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_2_ALIGN     0
2614
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_2_BITS      3
2615
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_RESERVED_2_SHIFT     1
2616
2617
/* PCIE_CFG :: UNCORRECTABLE_ERROR_SEVERITY :: TRAINING_ERROR_SEVERITY [00:00] */
2618
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_TRAINING_ERROR_SEVERITY_MASK 0x00000001
2619
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_TRAINING_ERROR_SEVERITY_ALIGN 0
2620
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_TRAINING_ERROR_SEVERITY_BITS 1
2621
#define PCIE_CFG_UNCORRECTABLE_ERROR_SEVERITY_TRAINING_ERROR_SEVERITY_SHIFT 0
2622
2623
2624
/****************************************************************************
2625
 * PCIE_CFG :: CORRECTABLE_ERROR_STATUS
2626
 ***************************************************************************/
2627
/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: RESERVED_0 [31:14] */
2628
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_0_MASK          0xffffc000
2629
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_0_ALIGN         0
2630
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_0_BITS          18
2631
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_0_SHIFT         14
2632
2633
/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: ADVISORY_NON_FATAL_ERROR_STATUS [13:13] */
2634
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_ADVISORY_NON_FATAL_ERROR_STATUS_MASK 0x00002000
2635
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_ADVISORY_NON_FATAL_ERROR_STATUS_ALIGN 0
2636
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_ADVISORY_NON_FATAL_ERROR_STATUS_BITS 1
2637
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_ADVISORY_NON_FATAL_ERROR_STATUS_SHIFT 13
2638
2639
/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: REPLAY_TIMER_TIMEOUT_STATUS [12:12] */
2640
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_TIMER_TIMEOUT_STATUS_MASK 0x00001000
2641
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_TIMER_TIMEOUT_STATUS_ALIGN 0
2642
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_TIMER_TIMEOUT_STATUS_BITS 1
2643
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_TIMER_TIMEOUT_STATUS_SHIFT 12
2644
2645
/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: RESERVED_1 [11:09] */
2646
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_1_MASK          0x00000e00
2647
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_1_ALIGN         0
2648
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_1_BITS          3
2649
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_1_SHIFT         9
2650
2651
/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: REPLAY_NUM_ROLLOVER_STATUS [08:08] */
2652
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_NUM_ROLLOVER_STATUS_MASK 0x00000100
2653
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_NUM_ROLLOVER_STATUS_ALIGN 0
2654
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_NUM_ROLLOVER_STATUS_BITS 1
2655
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_REPLAY_NUM_ROLLOVER_STATUS_SHIFT 8
2656
2657
/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: BAD_DLLP_STATUS [07:07] */
2658
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_DLLP_STATUS_MASK     0x00000080
2659
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_DLLP_STATUS_ALIGN    0
2660
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_DLLP_STATUS_BITS     1
2661
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_DLLP_STATUS_SHIFT    7
2662
2663
/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: BAD_TLP_STATUS [06:06] */
2664
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_TLP_STATUS_MASK      0x00000040
2665
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_TLP_STATUS_ALIGN     0
2666
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_TLP_STATUS_BITS      1
2667
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_BAD_TLP_STATUS_SHIFT     6
2668
2669
/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: RESERVED_2 [05:01] */
2670
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_2_MASK          0x0000003e
2671
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_2_ALIGN         0
2672
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_2_BITS          5
2673
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RESERVED_2_SHIFT         1
2674
2675
/* PCIE_CFG :: CORRECTABLE_ERROR_STATUS :: RECEIVER_ERROR_STATUS [00:00] */
2676
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RECEIVER_ERROR_STATUS_MASK 0x00000001
2677
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RECEIVER_ERROR_STATUS_ALIGN 0
2678
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RECEIVER_ERROR_STATUS_BITS 1
2679
#define PCIE_CFG_CORRECTABLE_ERROR_STATUS_RECEIVER_ERROR_STATUS_SHIFT 0
2680
2681
2682
/****************************************************************************
2683
 * PCIE_CFG :: CORRECTABLE_ERROR_MASK
2684
 ***************************************************************************/
2685
/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: RESERVED_0 [31:14] */
2686
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_0_MASK            0xffffc000
2687
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_0_ALIGN           0
2688
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_0_BITS            18
2689
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_0_SHIFT           14
2690
2691
/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: ADVISORY_NON_FATAL_ERROR_MASK [13:13] */
2692
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_ADVISORY_NON_FATAL_ERROR_MASK_MASK 0x00002000
2693
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_ADVISORY_NON_FATAL_ERROR_MASK_ALIGN 0
2694
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_ADVISORY_NON_FATAL_ERROR_MASK_BITS 1
2695
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_ADVISORY_NON_FATAL_ERROR_MASK_SHIFT 13
2696
2697
/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: REPLAY_TIMER_TIMEOUT_MASK [12:12] */
2698
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_TIMER_TIMEOUT_MASK_MASK 0x00001000
2699
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_TIMER_TIMEOUT_MASK_ALIGN 0
2700
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_TIMER_TIMEOUT_MASK_BITS 1
2701
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_TIMER_TIMEOUT_MASK_SHIFT 12
2702
2703
/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: RESERVED_1 [11:09] */
2704
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_1_MASK            0x00000e00
2705
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_1_ALIGN           0
2706
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_1_BITS            3
2707
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_1_SHIFT           9
2708
2709
/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: REPLAY_NUM_ROLLOVER_MASK [08:08] */
2710
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_NUM_ROLLOVER_MASK_MASK 0x00000100
2711
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_NUM_ROLLOVER_MASK_ALIGN 0
2712
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_NUM_ROLLOVER_MASK_BITS 1
2713
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_REPLAY_NUM_ROLLOVER_MASK_SHIFT 8
2714
2715
/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: BAD_DLLP_MASK [07:07] */
2716
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_DLLP_MASK_MASK         0x00000080
2717
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_DLLP_MASK_ALIGN        0
2718
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_DLLP_MASK_BITS         1
2719
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_DLLP_MASK_SHIFT        7
2720
2721
/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: BAD_TLP_MASK [06:06] */
2722
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_TLP_MASK_MASK          0x00000040
2723
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_TLP_MASK_ALIGN         0
2724
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_TLP_MASK_BITS          1
2725
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_BAD_TLP_MASK_SHIFT         6
2726
2727
/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: RESERVED_2 [05:01] */
2728
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_2_MASK            0x0000003e
2729
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_2_ALIGN           0
2730
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_2_BITS            5
2731
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RESERVED_2_SHIFT           1
2732
2733
/* PCIE_CFG :: CORRECTABLE_ERROR_MASK :: RECEIVER_ERROR_MASK [00:00] */
2734
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RECEIVER_ERROR_MASK_MASK   0x00000001
2735
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RECEIVER_ERROR_MASK_ALIGN  0
2736
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RECEIVER_ERROR_MASK_BITS   1
2737
#define PCIE_CFG_CORRECTABLE_ERROR_MASK_RECEIVER_ERROR_MASK_SHIFT  0
2738
2739
2740
/****************************************************************************
2741
 * PCIE_CFG :: ADVANCED_ERROR_CAPABILITIES_AND_CONTROL
2742
 ***************************************************************************/
2743
/* PCIE_CFG :: ADVANCED_ERROR_CAPABILITIES_AND_CONTROL :: RESERVED_0 [31:09] */
2744
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_RESERVED_0_MASK 0xfffffe00
2745
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_RESERVED_0_ALIGN 0
2746
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_RESERVED_0_BITS 23
2747
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_RESERVED_0_SHIFT 9
2748
2749
/* PCIE_CFG :: ADVANCED_ERROR_CAPABILITIES_AND_CONTROL :: ECRC_CHECK_ENABLE [08:08] */
2750
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_ENABLE_MASK 0x00000100
2751
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_ENABLE_ALIGN 0
2752
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_ENABLE_BITS 1
2753
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_ENABLE_SHIFT 8
2754
2755
/* PCIE_CFG :: ADVANCED_ERROR_CAPABILITIES_AND_CONTROL :: ECRC_CHECK_CAPABLE [07:07] */
2756
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_CAPABLE_MASK 0x00000080
2757
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_CAPABLE_ALIGN 0
2758
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_CAPABLE_BITS 1
2759
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_CHECK_CAPABLE_SHIFT 7
2760
2761
/* PCIE_CFG :: ADVANCED_ERROR_CAPABILITIES_AND_CONTROL :: ECRC_GENERATION_ENABLE [06:06] */
2762
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_ENABLE_MASK 0x00000040
2763
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_ENABLE_ALIGN 0
2764
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_ENABLE_BITS 1
2765
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_ENABLE_SHIFT 6
2766
2767
/* PCIE_CFG :: ADVANCED_ERROR_CAPABILITIES_AND_CONTROL :: ECRC_GENERATION_CAPABLE [05:05] */
2768
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_CAPABLE_MASK 0x00000020
2769
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_CAPABLE_ALIGN 0
2770
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_CAPABLE_BITS 1
2771
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_ECRC_GENERATION_CAPABLE_SHIFT 5
2772
2773
/* PCIE_CFG :: ADVANCED_ERROR_CAPABILITIES_AND_CONTROL :: FIRST_ERROR_POINTER [04:00] */
2774
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_FIRST_ERROR_POINTER_MASK 0x0000001f
2775
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_FIRST_ERROR_POINTER_ALIGN 0
2776
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_FIRST_ERROR_POINTER_BITS 5
2777
#define PCIE_CFG_ADVANCED_ERROR_CAPABILITIES_AND_CONTROL_FIRST_ERROR_POINTER_SHIFT 0
2778
2779
2780
/****************************************************************************
2781
 * PCIE_CFG :: HEADER_LOG_1
2782
 ***************************************************************************/
2783
/* PCIE_CFG :: HEADER_LOG_1 :: HEADER_BYTE_0 [31:24] */
2784
#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_0_MASK                   0xff000000
2785
#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_0_ALIGN                  0
2786
#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_0_BITS                   8
2787
#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_0_SHIFT                  24
2788
2789
/* PCIE_CFG :: HEADER_LOG_1 :: HEADER_BYTE_1 [23:16] */
2790
#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_1_MASK                   0x00ff0000
2791
#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_1_ALIGN                  0
2792
#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_1_BITS                   8
2793
#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_1_SHIFT                  16
2794
2795
/* PCIE_CFG :: HEADER_LOG_1 :: HEADER_BYTE_2 [15:08] */
2796
#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_2_MASK                   0x0000ff00
2797
#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_2_ALIGN                  0
2798
#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_2_BITS                   8
2799
#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_2_SHIFT                  8
2800
2801
/* PCIE_CFG :: HEADER_LOG_1 :: HEADER_BYTE_3 [07:00] */
2802
#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_3_MASK                   0x000000ff
2803
#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_3_ALIGN                  0
2804
#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_3_BITS                   8
2805
#define PCIE_CFG_HEADER_LOG_1_HEADER_BYTE_3_SHIFT                  0
2806
2807
2808
/****************************************************************************
2809
 * PCIE_CFG :: HEADER_LOG_2
2810
 ***************************************************************************/
2811
/* PCIE_CFG :: HEADER_LOG_2 :: HEADER_BYTE_4 [31:24] */
2812
#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_4_MASK                   0xff000000
2813
#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_4_ALIGN                  0
2814
#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_4_BITS                   8
2815
#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_4_SHIFT                  24
2816
2817
/* PCIE_CFG :: HEADER_LOG_2 :: HEADER_BYTE_5 [23:16] */
2818
#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_5_MASK                   0x00ff0000
2819
#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_5_ALIGN                  0
2820
#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_5_BITS                   8
2821
#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_5_SHIFT                  16
2822
2823
/* PCIE_CFG :: HEADER_LOG_2 :: HEADER_BYTE_6 [15:08] */
2824
#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_6_MASK                   0x0000ff00
2825
#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_6_ALIGN                  0
2826
#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_6_BITS                   8
2827
#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_6_SHIFT                  8
2828
2829
/* PCIE_CFG :: HEADER_LOG_2 :: HEADER_BYTE_7 [07:00] */
2830
#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_7_MASK                   0x000000ff
2831
#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_7_ALIGN                  0
2832
#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_7_BITS                   8
2833
#define PCIE_CFG_HEADER_LOG_2_HEADER_BYTE_7_SHIFT                  0
2834
2835
2836
/****************************************************************************
2837
 * PCIE_CFG :: HEADER_LOG_3
2838
 ***************************************************************************/
2839
/* PCIE_CFG :: HEADER_LOG_3 :: HEADER_BYTE_8 [31:24] */
2840
#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_8_MASK                   0xff000000
2841
#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_8_ALIGN                  0
2842
#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_8_BITS                   8
2843
#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_8_SHIFT                  24
2844
2845
/* PCIE_CFG :: HEADER_LOG_3 :: HEADER_BYTE_9 [23:16] */
2846
#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_9_MASK                   0x00ff0000
2847
#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_9_ALIGN                  0
2848
#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_9_BITS                   8
2849
#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_9_SHIFT                  16
2850
2851
/* PCIE_CFG :: HEADER_LOG_3 :: HEADER_BYTE_10 [15:08] */
2852
#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_10_MASK                  0x0000ff00
2853
#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_10_ALIGN                 0
2854
#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_10_BITS                  8
2855
#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_10_SHIFT                 8
2856
2857
/* PCIE_CFG :: HEADER_LOG_3 :: HEADER_BYTE_11 [07:00] */
2858
#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_11_MASK                  0x000000ff
2859
#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_11_ALIGN                 0
2860
#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_11_BITS                  8
2861
#define PCIE_CFG_HEADER_LOG_3_HEADER_BYTE_11_SHIFT                 0
2862
2863
2864
/****************************************************************************
2865
 * PCIE_CFG :: HEADER_LOG_4
2866
 ***************************************************************************/
2867
/* PCIE_CFG :: HEADER_LOG_4 :: HEADER_BYTE_12 [31:24] */
2868
#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_12_MASK                  0xff000000
2869
#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_12_ALIGN                 0
2870
#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_12_BITS                  8
2871
#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_12_SHIFT                 24
2872
2873
/* PCIE_CFG :: HEADER_LOG_4 :: HEADER_BYTE_13 [23:16] */
2874
#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_13_MASK                  0x00ff0000
2875
#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_13_ALIGN                 0
2876
#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_13_BITS                  8
2877
#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_13_SHIFT                 16
2878
2879
/* PCIE_CFG :: HEADER_LOG_4 :: HEADER_BYTE_14 [15:08] */
2880
#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_14_MASK                  0x0000ff00
2881
#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_14_ALIGN                 0
2882
#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_14_BITS                  8
2883
#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_14_SHIFT                 8
2884
2885
/* PCIE_CFG :: HEADER_LOG_4 :: HEADER_BYTE_15 [07:00] */
2886
#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_15_MASK                  0x000000ff
2887
#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_15_ALIGN                 0
2888
#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_15_BITS                  8
2889
#define PCIE_CFG_HEADER_LOG_4_HEADER_BYTE_15_SHIFT                 0
2890
2891
2892
/****************************************************************************
2893
 * PCIE_CFG :: VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER
2894
 ***************************************************************************/
2895
/* PCIE_CFG :: VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER :: NEXT_CAPABILITY_OFFSET [31:20] */
2896
#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_MASK 0xfff00000
2897
#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_ALIGN 0
2898
#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_BITS 12
2899
#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_SHIFT 20
2900
2901
/* PCIE_CFG :: VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER :: CAPABILITY_VERSION [19:16] */
2902
#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_MASK 0x000f0000
2903
#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_ALIGN 0
2904
#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_BITS 4
2905
#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_SHIFT 16
2906
2907
/* PCIE_CFG :: VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER :: PCIE_EXTENDED_CAPABILITY_ID [15:00] */
2908
#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_MASK 0x0000ffff
2909
#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_ALIGN 0
2910
#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_BITS 16
2911
#define PCIE_CFG_VIRTUAL_CHANNEL_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_SHIFT 0
2912
2913
2914
/****************************************************************************
2915
 * PCIE_CFG :: PORT_VC_CAPABILITY
2916
 ***************************************************************************/
2917
/* PCIE_CFG :: PORT_VC_CAPABILITY :: RESERVED_0 [31:12] */
2918
#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_0_MASK                0xfffff000
2919
#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_0_ALIGN               0
2920
#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_0_BITS                20
2921
#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_0_SHIFT               12
2922
2923
/* PCIE_CFG :: PORT_VC_CAPABILITY :: PORT_ARBITRATION_TABLE_ENTRY_SIZE [11:10] */
2924
#define PCIE_CFG_PORT_VC_CAPABILITY_PORT_ARBITRATION_TABLE_ENTRY_SIZE_MASK 0x00000c00
2925
#define PCIE_CFG_PORT_VC_CAPABILITY_PORT_ARBITRATION_TABLE_ENTRY_SIZE_ALIGN 0
2926
#define PCIE_CFG_PORT_VC_CAPABILITY_PORT_ARBITRATION_TABLE_ENTRY_SIZE_BITS 2
2927
#define PCIE_CFG_PORT_VC_CAPABILITY_PORT_ARBITRATION_TABLE_ENTRY_SIZE_SHIFT 10
2928
2929
/* PCIE_CFG :: PORT_VC_CAPABILITY :: REFERENCE_CLOCK [09:08] */
2930
#define PCIE_CFG_PORT_VC_CAPABILITY_REFERENCE_CLOCK_MASK           0x00000300
2931
#define PCIE_CFG_PORT_VC_CAPABILITY_REFERENCE_CLOCK_ALIGN          0
2932
#define PCIE_CFG_PORT_VC_CAPABILITY_REFERENCE_CLOCK_BITS           2
2933
#define PCIE_CFG_PORT_VC_CAPABILITY_REFERENCE_CLOCK_SHIFT          8
2934
2935
/* PCIE_CFG :: PORT_VC_CAPABILITY :: RESERVED_1 [07:07] */
2936
#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_1_MASK                0x00000080
2937
#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_1_ALIGN               0
2938
#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_1_BITS                1
2939
#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_1_SHIFT               7
2940
2941
/* PCIE_CFG :: PORT_VC_CAPABILITY :: LOW_PRIORITY_EXTENDED_VC_COUNT [06:04] */
2942
#define PCIE_CFG_PORT_VC_CAPABILITY_LOW_PRIORITY_EXTENDED_VC_COUNT_MASK 0x00000070
2943
#define PCIE_CFG_PORT_VC_CAPABILITY_LOW_PRIORITY_EXTENDED_VC_COUNT_ALIGN 0
2944
#define PCIE_CFG_PORT_VC_CAPABILITY_LOW_PRIORITY_EXTENDED_VC_COUNT_BITS 3
2945
#define PCIE_CFG_PORT_VC_CAPABILITY_LOW_PRIORITY_EXTENDED_VC_COUNT_SHIFT 4
2946
2947
/* PCIE_CFG :: PORT_VC_CAPABILITY :: RESERVED_2 [03:03] */
2948
#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_2_MASK                0x00000008
2949
#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_2_ALIGN               0
2950
#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_2_BITS                1
2951
#define PCIE_CFG_PORT_VC_CAPABILITY_RESERVED_2_SHIFT               3
2952
2953
/* PCIE_CFG :: PORT_VC_CAPABILITY :: EXTENDED_VC_COUNT [02:00] */
2954
#define PCIE_CFG_PORT_VC_CAPABILITY_EXTENDED_VC_COUNT_MASK         0x00000007
2955
#define PCIE_CFG_PORT_VC_CAPABILITY_EXTENDED_VC_COUNT_ALIGN        0
2956
#define PCIE_CFG_PORT_VC_CAPABILITY_EXTENDED_VC_COUNT_BITS         3
2957
#define PCIE_CFG_PORT_VC_CAPABILITY_EXTENDED_VC_COUNT_SHIFT        0
2958
2959
2960
/****************************************************************************
2961
 * PCIE_CFG :: PORT_VC_CAPABILITY_2
2962
 ***************************************************************************/
2963
/* PCIE_CFG :: PORT_VC_CAPABILITY_2 :: VC_ARBITRATION_TABLE_OFFSET [31:24] */
2964
#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_TABLE_OFFSET_MASK 0xff000000
2965
#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_TABLE_OFFSET_ALIGN 0
2966
#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_TABLE_OFFSET_BITS 8
2967
#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_TABLE_OFFSET_SHIFT 24
2968
2969
/* PCIE_CFG :: PORT_VC_CAPABILITY_2 :: RESERVED_0 [23:08] */
2970
#define PCIE_CFG_PORT_VC_CAPABILITY_2_RESERVED_0_MASK              0x00ffff00
2971
#define PCIE_CFG_PORT_VC_CAPABILITY_2_RESERVED_0_ALIGN             0
2972
#define PCIE_CFG_PORT_VC_CAPABILITY_2_RESERVED_0_BITS              16
2973
#define PCIE_CFG_PORT_VC_CAPABILITY_2_RESERVED_0_SHIFT             8
2974
2975
/* PCIE_CFG :: PORT_VC_CAPABILITY_2 :: VC_ARBITRATION_CAPABILITY [07:00] */
2976
#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_CAPABILITY_MASK 0x000000ff
2977
#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_CAPABILITY_ALIGN 0
2978
#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_CAPABILITY_BITS 8
2979
#define PCIE_CFG_PORT_VC_CAPABILITY_2_VC_ARBITRATION_CAPABILITY_SHIFT 0
2980
2981
2982
/****************************************************************************
2983
 * PCIE_CFG :: PORT_VC_STATUS_CONTROL
2984
 ***************************************************************************/
2985
/* PCIE_CFG :: PORT_VC_STATUS_CONTROL :: RESERVED_0 [31:17] */
2986
#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_0_MASK            0xfffe0000
2987
#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_0_ALIGN           0
2988
#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_0_BITS            15
2989
#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_0_SHIFT           17
2990
2991
/* PCIE_CFG :: PORT_VC_STATUS_CONTROL :: VC_ARBITRATION_TABLE_STATUS [16:16] */
2992
#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_TABLE_STATUS_MASK 0x00010000
2993
#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_TABLE_STATUS_ALIGN 0
2994
#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_TABLE_STATUS_BITS 1
2995
#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_TABLE_STATUS_SHIFT 16
2996
2997
/* PCIE_CFG :: PORT_VC_STATUS_CONTROL :: RESERVED_1 [15:04] */
2998
#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_1_MASK            0x0000fff0
2999
#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_1_ALIGN           0
3000
#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_1_BITS            12
3001
#define PCIE_CFG_PORT_VC_STATUS_CONTROL_RESERVED_1_SHIFT           4
3002
3003
/* PCIE_CFG :: PORT_VC_STATUS_CONTROL :: VC_ARBITRATION_SELECT [03:01] */
3004
#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_SELECT_MASK 0x0000000e
3005
#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_SELECT_ALIGN 0
3006
#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_SELECT_BITS 3
3007
#define PCIE_CFG_PORT_VC_STATUS_CONTROL_VC_ARBITRATION_SELECT_SHIFT 1
3008
3009
/* PCIE_CFG :: PORT_VC_STATUS_CONTROL :: LOAD_VC_ARBITRATION_TABLE [00:00] */
3010
#define PCIE_CFG_PORT_VC_STATUS_CONTROL_LOAD_VC_ARBITRATION_TABLE_MASK 0x00000001
3011
#define PCIE_CFG_PORT_VC_STATUS_CONTROL_LOAD_VC_ARBITRATION_TABLE_ALIGN 0
3012
#define PCIE_CFG_PORT_VC_STATUS_CONTROL_LOAD_VC_ARBITRATION_TABLE_BITS 1
3013
#define PCIE_CFG_PORT_VC_STATUS_CONTROL_LOAD_VC_ARBITRATION_TABLE_SHIFT 0
3014
3015
3016
/****************************************************************************
3017
 * PCIE_CFG :: VC_RESOURCE_CAPABILITY
3018
 ***************************************************************************/
3019
/* PCIE_CFG :: VC_RESOURCE_CAPABILITY :: PORT_ARBITRATION_TABLE_OFFSET [31:24] */
3020
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_TABLE_OFFSET_MASK 0xff000000
3021
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_TABLE_OFFSET_ALIGN 0
3022
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_TABLE_OFFSET_BITS 8
3023
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_TABLE_OFFSET_SHIFT 24
3024
3025
/* PCIE_CFG :: VC_RESOURCE_CAPABILITY :: RESERVED_0 [23:23] */
3026
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_0_MASK            0x00800000
3027
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_0_ALIGN           0
3028
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_0_BITS            1
3029
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_0_SHIFT           23
3030
3031
/* PCIE_CFG :: VC_RESOURCE_CAPABILITY :: MAXIMUM_TIME_SLOTS [22:16] */
3032
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_MAXIMUM_TIME_SLOTS_MASK    0x007f0000
3033
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_MAXIMUM_TIME_SLOTS_ALIGN   0
3034
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_MAXIMUM_TIME_SLOTS_BITS    7
3035
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_MAXIMUM_TIME_SLOTS_SHIFT   16
3036
3037
/* PCIE_CFG :: VC_RESOURCE_CAPABILITY :: REJECT_SNOOP_TRANSACTIONS [15:15] */
3038
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_REJECT_SNOOP_TRANSACTIONS_MASK 0x00008000
3039
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_REJECT_SNOOP_TRANSACTIONS_ALIGN 0
3040
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_REJECT_SNOOP_TRANSACTIONS_BITS 1
3041
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_REJECT_SNOOP_TRANSACTIONS_SHIFT 15
3042
3043
/* PCIE_CFG :: VC_RESOURCE_CAPABILITY :: ADVANCED_PACKET_SWITCHING [14:14] */
3044
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_ADVANCED_PACKET_SWITCHING_MASK 0x00004000
3045
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_ADVANCED_PACKET_SWITCHING_ALIGN 0
3046
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_ADVANCED_PACKET_SWITCHING_BITS 1
3047
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_ADVANCED_PACKET_SWITCHING_SHIFT 14
3048
3049
/* PCIE_CFG :: VC_RESOURCE_CAPABILITY :: RESERVED_1 [13:08] */
3050
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_1_MASK            0x00003f00
3051
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_1_ALIGN           0
3052
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_1_BITS            6
3053
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_RESERVED_1_SHIFT           8
3054
3055
/* PCIE_CFG :: VC_RESOURCE_CAPABILITY :: PORT_ARBITRATION_CAPABILITY [07:00] */
3056
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_CAPABILITY_MASK 0x000000ff
3057
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_CAPABILITY_ALIGN 0
3058
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_CAPABILITY_BITS 8
3059
#define PCIE_CFG_VC_RESOURCE_CAPABILITY_PORT_ARBITRATION_CAPABILITY_SHIFT 0
3060
3061
3062
/****************************************************************************
3063
 * PCIE_CFG :: VC_RESOURCE_CONTROL
3064
 ***************************************************************************/
3065
/* PCIE_CFG :: VC_RESOURCE_CONTROL :: VC_ENABLE [31:31] */
3066
#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ENABLE_MASK                0x80000000
3067
#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ENABLE_ALIGN               0
3068
#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ENABLE_BITS                1
3069
#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ENABLE_SHIFT               31
3070
3071
/* PCIE_CFG :: VC_RESOURCE_CONTROL :: RESERVED_0 [30:27] */
3072
#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_0_MASK               0x78000000
3073
#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_0_ALIGN              0
3074
#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_0_BITS               4
3075
#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_0_SHIFT              27
3076
3077
/* PCIE_CFG :: VC_RESOURCE_CONTROL :: VC_ID [26:24] */
3078
#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ID_MASK                    0x07000000
3079
#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ID_ALIGN                   0
3080
#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ID_BITS                    3
3081
#define PCIE_CFG_VC_RESOURCE_CONTROL_VC_ID_SHIFT                   24
3082
3083
/* PCIE_CFG :: VC_RESOURCE_CONTROL :: RESERVED_1 [23:20] */
3084
#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_1_MASK               0x00f00000
3085
#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_1_ALIGN              0
3086
#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_1_BITS               4
3087
#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_1_SHIFT              20
3088
3089
/* PCIE_CFG :: VC_RESOURCE_CONTROL :: PORT_ARBITRATION_SELECT [19:17] */
3090
#define PCIE_CFG_VC_RESOURCE_CONTROL_PORT_ARBITRATION_SELECT_MASK  0x000e0000
3091
#define PCIE_CFG_VC_RESOURCE_CONTROL_PORT_ARBITRATION_SELECT_ALIGN 0
3092
#define PCIE_CFG_VC_RESOURCE_CONTROL_PORT_ARBITRATION_SELECT_BITS  3
3093
#define PCIE_CFG_VC_RESOURCE_CONTROL_PORT_ARBITRATION_SELECT_SHIFT 17
3094
3095
/* PCIE_CFG :: VC_RESOURCE_CONTROL :: LOAD_PORT_ARBITRATION_TABLE [16:16] */
3096
#define PCIE_CFG_VC_RESOURCE_CONTROL_LOAD_PORT_ARBITRATION_TABLE_MASK 0x00010000
3097
#define PCIE_CFG_VC_RESOURCE_CONTROL_LOAD_PORT_ARBITRATION_TABLE_ALIGN 0
3098
#define PCIE_CFG_VC_RESOURCE_CONTROL_LOAD_PORT_ARBITRATION_TABLE_BITS 1
3099
#define PCIE_CFG_VC_RESOURCE_CONTROL_LOAD_PORT_ARBITRATION_TABLE_SHIFT 16
3100
3101
/* PCIE_CFG :: VC_RESOURCE_CONTROL :: RESERVED_2 [15:08] */
3102
#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_2_MASK               0x0000ff00
3103
#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_2_ALIGN              0
3104
#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_2_BITS               8
3105
#define PCIE_CFG_VC_RESOURCE_CONTROL_RESERVED_2_SHIFT              8
3106
3107
/* PCIE_CFG :: VC_RESOURCE_CONTROL :: TC_VC_MAP [07:00] */
3108
#define PCIE_CFG_VC_RESOURCE_CONTROL_TC_VC_MAP_MASK                0x000000ff
3109
#define PCIE_CFG_VC_RESOURCE_CONTROL_TC_VC_MAP_ALIGN               0
3110
#define PCIE_CFG_VC_RESOURCE_CONTROL_TC_VC_MAP_BITS                8
3111
#define PCIE_CFG_VC_RESOURCE_CONTROL_TC_VC_MAP_SHIFT               0
3112
3113
3114
/****************************************************************************
3115
 * PCIE_CFG :: VC_RESOURCE_STATUS
3116
 ***************************************************************************/
3117
/* PCIE_CFG :: VC_RESOURCE_STATUS :: RESERVED_0 [31:18] */
3118
#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_0_MASK                0xfffc0000
3119
#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_0_ALIGN               0
3120
#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_0_BITS                14
3121
#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_0_SHIFT               18
3122
3123
/* PCIE_CFG :: VC_RESOURCE_STATUS :: VC_NEGOTIATION_PENDING [17:17] */
3124
#define PCIE_CFG_VC_RESOURCE_STATUS_VC_NEGOTIATION_PENDING_MASK    0x00020000
3125
#define PCIE_CFG_VC_RESOURCE_STATUS_VC_NEGOTIATION_PENDING_ALIGN   0
3126
#define PCIE_CFG_VC_RESOURCE_STATUS_VC_NEGOTIATION_PENDING_BITS    1
3127
#define PCIE_CFG_VC_RESOURCE_STATUS_VC_NEGOTIATION_PENDING_SHIFT   17
3128
3129
/* PCIE_CFG :: VC_RESOURCE_STATUS :: PORT_ARBITRATION_TABLE_STATUS [16:16] */
3130
#define PCIE_CFG_VC_RESOURCE_STATUS_PORT_ARBITRATION_TABLE_STATUS_MASK 0x00010000
3131
#define PCIE_CFG_VC_RESOURCE_STATUS_PORT_ARBITRATION_TABLE_STATUS_ALIGN 0
3132
#define PCIE_CFG_VC_RESOURCE_STATUS_PORT_ARBITRATION_TABLE_STATUS_BITS 1
3133
#define PCIE_CFG_VC_RESOURCE_STATUS_PORT_ARBITRATION_TABLE_STATUS_SHIFT 16
3134
3135
/* PCIE_CFG :: VC_RESOURCE_STATUS :: RESERVED_1 [15:00] */
3136
#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_1_MASK                0x0000ffff
3137
#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_1_ALIGN               0
3138
#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_1_BITS                16
3139
#define PCIE_CFG_VC_RESOURCE_STATUS_RESERVED_1_SHIFT               0
3140
3141
3142
/****************************************************************************
3143
 * PCIE_CFG :: DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER
3144
 ***************************************************************************/
3145
/* PCIE_CFG :: DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER :: NEXT_CAPABILITY_OFFSET [31:20] */
3146
#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_MASK 0xfff00000
3147
#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_ALIGN 0
3148
#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_BITS 12
3149
#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_SHIFT 20
3150
3151
/* PCIE_CFG :: DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER :: CAPABILITY_VERSION [19:16] */
3152
#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_MASK 0x000f0000
3153
#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_ALIGN 0
3154
#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_BITS 4
3155
#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_SHIFT 16
3156
3157
/* PCIE_CFG :: DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER :: PCIE_EXTENDED_CAPABILITY_ID [15:00] */
3158
#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_MASK 0x0000ffff
3159
#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_ALIGN 0
3160
#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_BITS 16
3161
#define PCIE_CFG_DEVICE_SERIAL_NO_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_SHIFT 0
3162
3163
3164
/****************************************************************************
3165
 * PCIE_CFG :: DEVICE_SERIAL_NO_LOWER_DW
3166
 ***************************************************************************/
3167
/* PCIE_CFG :: DEVICE_SERIAL_NO_LOWER_DW :: SERIAL_NO_LOWER [31:00] */
3168
#define PCIE_CFG_DEVICE_SERIAL_NO_LOWER_DW_SERIAL_NO_LOWER_MASK    0xffffffff
3169
#define PCIE_CFG_DEVICE_SERIAL_NO_LOWER_DW_SERIAL_NO_LOWER_ALIGN   0
3170
#define PCIE_CFG_DEVICE_SERIAL_NO_LOWER_DW_SERIAL_NO_LOWER_BITS    32
3171
#define PCIE_CFG_DEVICE_SERIAL_NO_LOWER_DW_SERIAL_NO_LOWER_SHIFT   0
3172
3173
3174
/****************************************************************************
3175
 * PCIE_CFG :: DEVICE_SERIAL_NO_UPPER_DW
3176
 ***************************************************************************/
3177
/* PCIE_CFG :: DEVICE_SERIAL_NO_UPPER_DW :: SERIAL_NO_UPPER [31:00] */
3178
#define PCIE_CFG_DEVICE_SERIAL_NO_UPPER_DW_SERIAL_NO_UPPER_MASK    0xffffffff
3179
#define PCIE_CFG_DEVICE_SERIAL_NO_UPPER_DW_SERIAL_NO_UPPER_ALIGN   0
3180
#define PCIE_CFG_DEVICE_SERIAL_NO_UPPER_DW_SERIAL_NO_UPPER_BITS    32
3181
#define PCIE_CFG_DEVICE_SERIAL_NO_UPPER_DW_SERIAL_NO_UPPER_SHIFT   0
3182
3183
3184
/****************************************************************************
3185
 * PCIE_CFG :: POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER
3186
 ***************************************************************************/
3187
/* PCIE_CFG :: POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER :: NEXT_CAPABILITY_OFFSET [31:20] */
3188
#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_MASK 0xfff00000
3189
#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_ALIGN 0
3190
#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_BITS 12
3191
#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_NEXT_CAPABILITY_OFFSET_SHIFT 20
3192
3193
/* PCIE_CFG :: POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER :: CAPABILITY_VERSION [19:16] */
3194
#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_MASK 0x000f0000
3195
#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_ALIGN 0
3196
#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_BITS 4
3197
#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_CAPABILITY_VERSION_SHIFT 16
3198
3199
/* PCIE_CFG :: POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER :: PCIE_EXTENDED_CAPABILITY_ID [15:00] */
3200
#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_MASK 0x0000ffff
3201
#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_ALIGN 0
3202
#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_BITS 16
3203
#define PCIE_CFG_POWER_BUDGETING_ENHANCED_CAPABILITY_HEADER_PCIE_EXTENDED_CAPABILITY_ID_SHIFT 0
3204
3205
3206
/****************************************************************************
3207
 * PCIE_CFG :: POWER_BUDGETING_DATA_SELECT
3208
 ***************************************************************************/
3209
/* PCIE_CFG :: POWER_BUDGETING_DATA_SELECT :: RESERVED_0 [31:08] */
3210
#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_RESERVED_0_MASK       0xffffff00
3211
#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_RESERVED_0_ALIGN      0
3212
#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_RESERVED_0_BITS       24
3213
#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_RESERVED_0_SHIFT      8
3214
3215
/* PCIE_CFG :: POWER_BUDGETING_DATA_SELECT :: DATA_SELECT [07:00] */
3216
#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_DATA_SELECT_MASK      0x000000ff
3217
#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_DATA_SELECT_ALIGN     0
3218
#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_DATA_SELECT_BITS      8
3219
#define PCIE_CFG_POWER_BUDGETING_DATA_SELECT_DATA_SELECT_SHIFT     0
3220
3221
3222
/****************************************************************************
3223
 * PCIE_CFG :: POWER_BUDGETING_DATA
3224
 ***************************************************************************/
3225
/* PCIE_CFG :: POWER_BUDGETING_DATA :: RESERVED_0 [31:21] */
3226
#define PCIE_CFG_POWER_BUDGETING_DATA_RESERVED_0_MASK              0xffe00000
3227
#define PCIE_CFG_POWER_BUDGETING_DATA_RESERVED_0_ALIGN             0
3228
#define PCIE_CFG_POWER_BUDGETING_DATA_RESERVED_0_BITS              11
3229
#define PCIE_CFG_POWER_BUDGETING_DATA_RESERVED_0_SHIFT             21
3230
3231
/* PCIE_CFG :: POWER_BUDGETING_DATA :: POWER_RAIL [20:18] */
3232
#define PCIE_CFG_POWER_BUDGETING_DATA_POWER_RAIL_MASK              0x001c0000
3233
#define PCIE_CFG_POWER_BUDGETING_DATA_POWER_RAIL_ALIGN             0
3234
#define PCIE_CFG_POWER_BUDGETING_DATA_POWER_RAIL_BITS              3
3235
#define PCIE_CFG_POWER_BUDGETING_DATA_POWER_RAIL_SHIFT             18
3236
3237
/* PCIE_CFG :: POWER_BUDGETING_DATA :: TYPE [17:15] */
3238
#define PCIE_CFG_POWER_BUDGETING_DATA_TYPE_MASK                    0x00038000
3239
#define PCIE_CFG_POWER_BUDGETING_DATA_TYPE_ALIGN                   0
3240
#define PCIE_CFG_POWER_BUDGETING_DATA_TYPE_BITS                    3
3241
#define PCIE_CFG_POWER_BUDGETING_DATA_TYPE_SHIFT                   15
3242
3243
/* PCIE_CFG :: POWER_BUDGETING_DATA :: PM_STATE [14:13] */
3244
#define PCIE_CFG_POWER_BUDGETING_DATA_PM_STATE_MASK                0x00006000
3245
#define PCIE_CFG_POWER_BUDGETING_DATA_PM_STATE_ALIGN               0
3246
#define PCIE_CFG_POWER_BUDGETING_DATA_PM_STATE_BITS                2
3247
#define PCIE_CFG_POWER_BUDGETING_DATA_PM_STATE_SHIFT               13
3248
3249
/* PCIE_CFG :: POWER_BUDGETING_DATA :: PM_SUB_STATE [12:10] */
3250
#define PCIE_CFG_POWER_BUDGETING_DATA_PM_SUB_STATE_MASK            0x00001c00
3251
#define PCIE_CFG_POWER_BUDGETING_DATA_PM_SUB_STATE_ALIGN           0
3252
#define PCIE_CFG_POWER_BUDGETING_DATA_PM_SUB_STATE_BITS            3
3253
#define PCIE_CFG_POWER_BUDGETING_DATA_PM_SUB_STATE_SHIFT           10
3254
3255
/* PCIE_CFG :: POWER_BUDGETING_DATA :: DATA_SCALE [09:08] */
3256
#define PCIE_CFG_POWER_BUDGETING_DATA_DATA_SCALE_MASK              0x00000300
3257
#define PCIE_CFG_POWER_BUDGETING_DATA_DATA_SCALE_ALIGN             0
3258
#define PCIE_CFG_POWER_BUDGETING_DATA_DATA_SCALE_BITS              2
3259
#define PCIE_CFG_POWER_BUDGETING_DATA_DATA_SCALE_SHIFT             8
3260
3261
/* PCIE_CFG :: POWER_BUDGETING_DATA :: BASE_POWER [07:00] */
3262
#define PCIE_CFG_POWER_BUDGETING_DATA_BASE_POWER_MASK              0x000000ff
3263
#define PCIE_CFG_POWER_BUDGETING_DATA_BASE_POWER_ALIGN             0
3264
#define PCIE_CFG_POWER_BUDGETING_DATA_BASE_POWER_BITS              8
3265
#define PCIE_CFG_POWER_BUDGETING_DATA_BASE_POWER_SHIFT             0
3266
3267
3268
/****************************************************************************
3269
 * PCIE_CFG :: POWER_BUDGETING_CAPABILITY
3270
 ***************************************************************************/
3271
/* PCIE_CFG :: POWER_BUDGETING_CAPABILITY :: RESERVED_0 [31:01] */
3272
#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_RESERVED_0_MASK        0xfffffffe
3273
#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_RESERVED_0_ALIGN       0
3274
#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_RESERVED_0_BITS        31
3275
#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_RESERVED_0_SHIFT       1
3276
3277
/* PCIE_CFG :: POWER_BUDGETING_CAPABILITY :: LOM_CONFIGURATION [00:00] */
3278
#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_LOM_CONFIGURATION_MASK 0x00000001
3279
#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_LOM_CONFIGURATION_ALIGN 0
3280
#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_LOM_CONFIGURATION_BITS 1
3281
#define PCIE_CFG_POWER_BUDGETING_CAPABILITY_LOM_CONFIGURATION_SHIFT 0
3282
3283
3284
/****************************************************************************
3285
 * PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1
3286
 ***************************************************************************/
3287
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: POWER_RAIL_2 [31:29] */
3288
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_2_MASK    0xe0000000
3289
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_2_ALIGN   0
3290
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_2_BITS    3
3291
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_2_SHIFT   29
3292
3293
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: TYPE_2 [28:26] */
3294
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_2_MASK          0x1c000000
3295
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_2_ALIGN         0
3296
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_2_BITS          3
3297
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_2_SHIFT         26
3298
3299
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: PM_STATE_2 [25:24] */
3300
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_2_MASK      0x03000000
3301
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_2_ALIGN     0
3302
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_2_BITS      2
3303
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_2_SHIFT     24
3304
3305
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: BASE_POWER_2 [23:16] */
3306
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_2_MASK    0x00ff0000
3307
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_2_ALIGN   0
3308
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_2_BITS    8
3309
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_2_SHIFT   16
3310
3311
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: POWER_RAIL_1 [15:13] */
3312
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_1_MASK    0x0000e000
3313
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_1_ALIGN   0
3314
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_1_BITS    3
3315
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_POWER_RAIL_1_SHIFT   13
3316
3317
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: TYPE_1 [12:10] */
3318
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_1_MASK          0x00001c00
3319
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_1_ALIGN         0
3320
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_1_BITS          3
3321
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_TYPE_1_SHIFT         10
3322
3323
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: PM_STATE_1 [09:08] */
3324
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_1_MASK      0x00000300
3325
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_1_ALIGN     0
3326
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_1_BITS      2
3327
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_PM_STATE_1_SHIFT     8
3328
3329
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_2_1 :: BASE_POWER_1 [07:00] */
3330
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_1_MASK    0x000000ff
3331
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_1_ALIGN   0
3332
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_1_BITS    8
3333
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_2_1_BASE_POWER_1_SHIFT   0
3334
3335
3336
/****************************************************************************
3337
 * PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3
3338
 ***************************************************************************/
3339
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: POWER_RAIL_4 [31:29] */
3340
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_4_MASK    0xe0000000
3341
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_4_ALIGN   0
3342
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_4_BITS    3
3343
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_4_SHIFT   29
3344
3345
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: TYPE_4 [28:26] */
3346
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_4_MASK          0x1c000000
3347
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_4_ALIGN         0
3348
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_4_BITS          3
3349
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_4_SHIFT         26
3350
3351
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: PM_STATE_4 [25:24] */
3352
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_4_MASK      0x03000000
3353
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_4_ALIGN     0
3354
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_4_BITS      2
3355
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_4_SHIFT     24
3356
3357
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: BASE_POWER_4 [23:16] */
3358
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_4_MASK    0x00ff0000
3359
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_4_ALIGN   0
3360
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_4_BITS    8
3361
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_4_SHIFT   16
3362
3363
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: POWER_RAIL_3 [15:13] */
3364
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_3_MASK    0x0000e000
3365
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_3_ALIGN   0
3366
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_3_BITS    3
3367
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_POWER_RAIL_3_SHIFT   13
3368
3369
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: TYPE_3 [12:10] */
3370
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_3_MASK          0x00001c00
3371
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_3_ALIGN         0
3372
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_3_BITS          3
3373
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_TYPE_3_SHIFT         10
3374
3375
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: PM_STATE_3 [09:08] */
3376
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_3_MASK      0x00000300
3377
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_3_ALIGN     0
3378
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_3_BITS      2
3379
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_PM_STATE_3_SHIFT     8
3380
3381
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_4_3 :: BASE_POWER_3 [07:00] */
3382
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_3_MASK    0x000000ff
3383
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_3_ALIGN   0
3384
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_3_BITS    8
3385
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_4_3_BASE_POWER_3_SHIFT   0
3386
3387
3388
/****************************************************************************
3389
 * PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5
3390
 ***************************************************************************/
3391
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: POWER_RAIL_6 [31:29] */
3392
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_6_MASK    0xe0000000
3393
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_6_ALIGN   0
3394
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_6_BITS    3
3395
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_6_SHIFT   29
3396
3397
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: TYPE_6 [28:26] */
3398
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_6_MASK          0x1c000000
3399
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_6_ALIGN         0
3400
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_6_BITS          3
3401
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_6_SHIFT         26
3402
3403
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: PM_STATE_6 [25:24] */
3404
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_6_MASK      0x03000000
3405
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_6_ALIGN     0
3406
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_6_BITS      2
3407
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_6_SHIFT     24
3408
3409
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: BASE_POWER_6 [23:16] */
3410
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_6_MASK    0x00ff0000
3411
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_6_ALIGN   0
3412
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_6_BITS    8
3413
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_6_SHIFT   16
3414
3415
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: POWER_RAIL_5 [15:13] */
3416
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_5_MASK    0x0000e000
3417
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_5_ALIGN   0
3418
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_5_BITS    3
3419
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_POWER_RAIL_5_SHIFT   13
3420
3421
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: TYPE_5 [12:10] */
3422
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_5_MASK          0x00001c00
3423
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_5_ALIGN         0
3424
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_5_BITS          3
3425
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_TYPE_5_SHIFT         10
3426
3427
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: PM_STATE_5 [09:08] */
3428
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_5_MASK      0x00000300
3429
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_5_ALIGN     0
3430
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_5_BITS      2
3431
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_PM_STATE_5_SHIFT     8
3432
3433
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_6_5 :: BASE_POWER_5 [07:00] */
3434
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_5_MASK    0x000000ff
3435
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_5_ALIGN   0
3436
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_5_BITS    8
3437
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_6_5_BASE_POWER_5_SHIFT   0
3438
3439
3440
/****************************************************************************
3441
 * PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7
3442
 ***************************************************************************/
3443
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: POWER_RAIL_8 [31:29] */
3444
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_8_MASK    0xe0000000
3445
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_8_ALIGN   0
3446
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_8_BITS    3
3447
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_8_SHIFT   29
3448
3449
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: TYPE_8 [28:26] */
3450
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_8_MASK          0x1c000000
3451
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_8_ALIGN         0
3452
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_8_BITS          3
3453
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_8_SHIFT         26
3454
3455
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: PM_STATE_8 [25:24] */
3456
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_8_MASK      0x03000000
3457
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_8_ALIGN     0
3458
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_8_BITS      2
3459
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_8_SHIFT     24
3460
3461
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: BASE_POWER_8 [23:16] */
3462
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_8_MASK    0x00ff0000
3463
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_8_ALIGN   0
3464
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_8_BITS    8
3465
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_8_SHIFT   16
3466
3467
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: POWER_RAIL_7 [15:13] */
3468
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_7_MASK    0x0000e000
3469
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_7_ALIGN   0
3470
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_7_BITS    3
3471
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_POWER_RAIL_7_SHIFT   13
3472
3473
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: TYPE_7 [12:10] */
3474
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_7_MASK          0x00001c00
3475
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_7_ALIGN         0
3476
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_7_BITS          3
3477
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_TYPE_7_SHIFT         10
3478
3479
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: PM_STATE_7 [09:08] */
3480
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_7_MASK      0x00000300
3481
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_7_ALIGN     0
3482
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_7_BITS      2
3483
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_PM_STATE_7_SHIFT     8
3484
3485
/* PCIE_CFG :: FIRMWARE_POWER_BUDGETING_8_7 :: BASE_POWER_7 [07:00] */
3486
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_7_MASK    0x000000ff
3487
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_7_ALIGN   0
3488
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_7_BITS    8
3489
#define PCIE_CFG_FIRMWARE_POWER_BUDGETING_8_7_BASE_POWER_7_SHIFT   0
3490
3491
3492
/****************************************************************************
3493
 * PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING
3494
 ***************************************************************************/
3495
/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: UNUSED_0 [31:07] */
3496
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNUSED_0_MASK 0xffffff80
3497
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNUSED_0_ALIGN 0
3498
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNUSED_0_BITS 25
3499
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNUSED_0_SHIFT 7
3500
3501
/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: D3HOT_MEMORY_READ_ADVISORY_NON_FATAL [06:06] */
3502
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_D3HOT_MEMORY_READ_ADVISORY_NON_FATAL_MASK 0x00000040
3503
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_D3HOT_MEMORY_READ_ADVISORY_NON_FATAL_ALIGN 0
3504
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_D3HOT_MEMORY_READ_ADVISORY_NON_FATAL_BITS 1
3505
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_D3HOT_MEMORY_READ_ADVISORY_NON_FATAL_SHIFT 6
3506
3507
/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: RETRY_POISON_ENABLE [05:05] */
3508
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_RETRY_POISON_ENABLE_MASK 0x00000020
3509
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_RETRY_POISON_ENABLE_ALIGN 0
3510
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_RETRY_POISON_ENABLE_BITS 1
3511
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_RETRY_POISON_ENABLE_SHIFT 5
3512
3513
/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: POISON_ADVISORY_NON_FATAL_ENABLE [04:04] */
3514
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_POISON_ADVISORY_NON_FATAL_ENABLE_MASK 0x00000010
3515
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_POISON_ADVISORY_NON_FATAL_ENABLE_ALIGN 0
3516
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_POISON_ADVISORY_NON_FATAL_ENABLE_BITS 1
3517
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_POISON_ADVISORY_NON_FATAL_ENABLE_SHIFT 4
3518
3519
/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: UNEXPECTED_ADVISORY_NON_FATAL_ENABLE [03:03] */
3520
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNEXPECTED_ADVISORY_NON_FATAL_ENABLE_MASK 0x00000008
3521
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNEXPECTED_ADVISORY_NON_FATAL_ENABLE_ALIGN 0
3522
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNEXPECTED_ADVISORY_NON_FATAL_ENABLE_BITS 1
3523
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_UNEXPECTED_ADVISORY_NON_FATAL_ENABLE_SHIFT 3
3524
3525
/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: NON_POSTED_CFG_ADVISORY_NON_FATAL_ENABLE [02:02] */
3526
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NON_POSTED_CFG_ADVISORY_NON_FATAL_ENABLE_MASK 0x00000004
3527
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NON_POSTED_CFG_ADVISORY_NON_FATAL_ENABLE_ALIGN 0
3528
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NON_POSTED_CFG_ADVISORY_NON_FATAL_ENABLE_BITS 1
3529
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NON_POSTED_CFG_ADVISORY_NON_FATAL_ENABLE_SHIFT 2
3530
3531
/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: NP_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE [01:01] */
3532
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NP_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_MASK 0x00000002
3533
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NP_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_ALIGN 0
3534
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NP_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_BITS 1
3535
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_NP_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_SHIFT 1
3536
3537
/* PCIE_CFG :: PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING :: COMPLETION_ABORT_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE [00:00] */
3538
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_COMPLETION_ABORT_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_MASK 0x00000001
3539
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_COMPLETION_ABORT_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_ALIGN 0
3540
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_COMPLETION_ABORT_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_BITS 1
3541
#define PCIE_CFG_PCIE_1_1_ADVISORY_NON_FATAL_ERROR_MASKING_COMPLETION_ABORT_MEMORY_READ_ADVISORY_NON_FATAL_ENABLE_SHIFT 0
3542
3543
3544
/****************************************************************************
3545
 * BCM70012_TGT_TOP_PCIE_TL
3546
 ***************************************************************************/
3547
/****************************************************************************
3548
 * PCIE_TL :: TL_CONTROL
3549
 ***************************************************************************/
3550
/* PCIE_TL :: TL_CONTROL :: RESERVED_0 [31:31] */
3551
#define PCIE_TL_TL_CONTROL_RESERVED_0_MASK                         0x80000000
3552
#define PCIE_TL_TL_CONTROL_RESERVED_0_ALIGN                        0
3553
#define PCIE_TL_TL_CONTROL_RESERVED_0_BITS                         1
3554
#define PCIE_TL_TL_CONTROL_RESERVED_0_SHIFT                        31
3555
3556
/* PCIE_TL :: TL_CONTROL :: CQ14298_FIX_ENA_N [30:30] */
3557
#define PCIE_TL_TL_CONTROL_CQ14298_FIX_ENA_N_MASK                  0x40000000
3558
#define PCIE_TL_TL_CONTROL_CQ14298_FIX_ENA_N_ALIGN                 0
3559
#define PCIE_TL_TL_CONTROL_CQ14298_FIX_ENA_N_BITS                  1
3560
#define PCIE_TL_TL_CONTROL_CQ14298_FIX_ENA_N_SHIFT                 30
3561
3562
/* PCIE_TL :: TL_CONTROL :: RESERVED_1 [29:29] */
3563
#define PCIE_TL_TL_CONTROL_RESERVED_1_MASK                         0x20000000
3564
#define PCIE_TL_TL_CONTROL_RESERVED_1_ALIGN                        0
3565
#define PCIE_TL_TL_CONTROL_RESERVED_1_BITS                         1
3566
#define PCIE_TL_TL_CONTROL_RESERVED_1_SHIFT                        29
3567
3568
/* PCIE_TL :: TL_CONTROL :: INTA_WAKEUP_LINK_CLKREQ_DA [28:28] */
3569
#define PCIE_TL_TL_CONTROL_INTA_WAKEUP_LINK_CLKREQ_DA_MASK         0x10000000
3570
#define PCIE_TL_TL_CONTROL_INTA_WAKEUP_LINK_CLKREQ_DA_ALIGN        0
3571
#define PCIE_TL_TL_CONTROL_INTA_WAKEUP_LINK_CLKREQ_DA_BITS         1
3572
#define PCIE_TL_TL_CONTROL_INTA_WAKEUP_LINK_CLKREQ_DA_SHIFT        28
3573
3574
/* PCIE_TL :: TL_CONTROL :: RESERVED_2 [27:27] */
3575
#define PCIE_TL_TL_CONTROL_RESERVED_2_MASK                         0x08000000
3576
#define PCIE_TL_TL_CONTROL_RESERVED_2_ALIGN                        0
3577
#define PCIE_TL_TL_CONTROL_RESERVED_2_BITS                         1
3578
#define PCIE_TL_TL_CONTROL_RESERVED_2_SHIFT                        27
3579
3580
/* PCIE_TL :: TL_CONTROL :: CQ9583_TYPE_1_VENDOR_DEFINED_MESSAGE_FIX [26:26] */
3581
#define PCIE_TL_TL_CONTROL_CQ9583_TYPE_1_VENDOR_DEFINED_MESSAGE_FIX_MASK 0x04000000
3582
#define PCIE_TL_TL_CONTROL_CQ9583_TYPE_1_VENDOR_DEFINED_MESSAGE_FIX_ALIGN 0
3583
#define PCIE_TL_TL_CONTROL_CQ9583_TYPE_1_VENDOR_DEFINED_MESSAGE_FIX_BITS 1
3584
#define PCIE_TL_TL_CONTROL_CQ9583_TYPE_1_VENDOR_DEFINED_MESSAGE_FIX_SHIFT 26
3585
3586
/* PCIE_TL :: TL_CONTROL :: RESERVED_3 [25:25] */
3587
#define PCIE_TL_TL_CONTROL_RESERVED_3_MASK                         0x02000000
3588
#define PCIE_TL_TL_CONTROL_RESERVED_3_ALIGN                        0
3589
#define PCIE_TL_TL_CONTROL_RESERVED_3_BITS                         1
3590
#define PCIE_TL_TL_CONTROL_RESERVED_3_SHIFT                        25
3591
3592
/* PCIE_TL :: TL_CONTROL :: RESERVED_4 [24:24] */
3593
#define PCIE_TL_TL_CONTROL_RESERVED_4_MASK                         0x01000000
3594
#define PCIE_TL_TL_CONTROL_RESERVED_4_ALIGN                        0
3595
#define PCIE_TL_TL_CONTROL_RESERVED_4_BITS                         1
3596
#define PCIE_TL_TL_CONTROL_RESERVED_4_SHIFT                        24
3597
3598
/* PCIE_TL :: TL_CONTROL :: RESERVED_5 [23:23] */
3599
#define PCIE_TL_TL_CONTROL_RESERVED_5_MASK                         0x00800000
3600
#define PCIE_TL_TL_CONTROL_RESERVED_5_ALIGN                        0
3601
#define PCIE_TL_TL_CONTROL_RESERVED_5_BITS                         1
3602
#define PCIE_TL_TL_CONTROL_RESERVED_5_SHIFT                        23
3603
3604
/* PCIE_TL :: TL_CONTROL :: CRC_SWAP [22:22] */
3605
#define PCIE_TL_TL_CONTROL_CRC_SWAP_MASK                           0x00400000
3606
#define PCIE_TL_TL_CONTROL_CRC_SWAP_ALIGN                          0
3607
#define PCIE_TL_TL_CONTROL_CRC_SWAP_BITS                           1
3608
#define PCIE_TL_TL_CONTROL_CRC_SWAP_SHIFT                          22
3609
3610
/* PCIE_TL :: TL_CONTROL :: SLV_CMP_DIS_CA_ERROR [21:21] */
3611
#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_CA_ERROR_MASK               0x00200000
3612
#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_CA_ERROR_ALIGN              0
3613
#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_CA_ERROR_BITS               1
3614
#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_CA_ERROR_SHIFT              21
3615
3616
/* PCIE_TL :: TL_CONTROL :: SLV_CMP_DIS_UR_ERROR [20:20] */
3617
#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_UR_ERROR_MASK               0x00100000
3618
#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_UR_ERROR_ALIGN              0
3619
#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_UR_ERROR_BITS               1
3620
#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_UR_ERROR_SHIFT              20
3621
3622
/* PCIE_TL :: TL_CONTROL :: SLV_CMP_DIS_RSV_ERROR [19:19] */
3623
#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_RSV_ERROR_MASK              0x00080000
3624
#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_RSV_ERROR_ALIGN             0
3625
#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_RSV_ERROR_BITS              1
3626
#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_RSV_ERROR_SHIFT             19
3627
3628
/* PCIE_TL :: TL_CONTROL :: RESERVED_6 [18:18] */
3629
#define PCIE_TL_TL_CONTROL_RESERVED_6_MASK                         0x00040000
3630
#define PCIE_TL_TL_CONTROL_RESERVED_6_ALIGN                        0
3631
#define PCIE_TL_TL_CONTROL_RESERVED_6_BITS                         1
3632
#define PCIE_TL_TL_CONTROL_RESERVED_6_SHIFT                        18
3633
3634
/* PCIE_TL :: TL_CONTROL :: SLV_CMP_DIS_EP_ERROR [17:17] */
3635
#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_EP_ERROR_MASK               0x00020000
3636
#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_EP_ERROR_ALIGN              0
3637
#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_EP_ERROR_BITS               1
3638
#define PCIE_TL_TL_CONTROL_SLV_CMP_DIS_EP_ERROR_SHIFT              17
3639
3640
/* PCIE_TL :: TL_CONTROL :: ENABLE_BYTECOUNT_CHECK [16:16] */
3641
#define PCIE_TL_TL_CONTROL_ENABLE_BYTECOUNT_CHECK_MASK             0x00010000
3642
#define PCIE_TL_TL_CONTROL_ENABLE_BYTECOUNT_CHECK_ALIGN            0
3643
#define PCIE_TL_TL_CONTROL_ENABLE_BYTECOUNT_CHECK_BITS             1
3644
#define PCIE_TL_TL_CONTROL_ENABLE_BYTECOUNT_CHECK_SHIFT            16
3645
3646
/* PCIE_TL :: TL_CONTROL :: NOT_USED [15:14] */
3647
#define PCIE_TL_TL_CONTROL_NOT_USED_MASK                           0x0000c000
3648
#define PCIE_TL_TL_CONTROL_NOT_USED_ALIGN                          0
3649
#define PCIE_TL_TL_CONTROL_NOT_USED_BITS                           2
3650
#define PCIE_TL_TL_CONTROL_NOT_USED_SHIFT                          14
3651
3652
/* PCIE_TL :: TL_CONTROL :: TRAFFIC_CLASS_DR [13:11] */
3653
#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DR_MASK                   0x00003800
3654
#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DR_ALIGN                  0
3655
#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DR_BITS                   3
3656
#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DR_SHIFT                  11
3657
3658
/* PCIE_TL :: TL_CONTROL :: TRAFFIC_CLASS_DW [10:08] */
3659
#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DW_MASK                   0x00000700
3660
#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DW_ALIGN                  0
3661
#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DW_BITS                   3
3662
#define PCIE_TL_TL_CONTROL_TRAFFIC_CLASS_DW_SHIFT                  8
3663
3664
/* PCIE_TL :: TL_CONTROL :: NOT_USED_0 [07:06] */
3665
#define PCIE_TL_TL_CONTROL_NOT_USED_0_MASK                         0x000000c0
3666
#define PCIE_TL_TL_CONTROL_NOT_USED_0_ALIGN                        0
3667
#define PCIE_TL_TL_CONTROL_NOT_USED_0_BITS                         2
3668
#define PCIE_TL_TL_CONTROL_NOT_USED_0_SHIFT                        6
3669
3670
/* PCIE_TL :: TL_CONTROL :: NOT_USED_1 [05:00] */
3671
#define PCIE_TL_TL_CONTROL_NOT_USED_1_MASK                         0x0000003f
3672
#define PCIE_TL_TL_CONTROL_NOT_USED_1_ALIGN                        0
3673
#define PCIE_TL_TL_CONTROL_NOT_USED_1_BITS                         6
3674
#define PCIE_TL_TL_CONTROL_NOT_USED_1_SHIFT                        0
3675
3676
3677
/****************************************************************************
3678
 * PCIE_TL :: TRANSACTION_CONFIGURATION
3679
 ***************************************************************************/
3680
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_RETRY_BUFFER_TIMING_MOD [31:31] */
3681
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_RETRY_BUFFER_TIMING_MOD_MASK 0x80000000
3682
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_RETRY_BUFFER_TIMING_MOD_ALIGN 0
3683
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_RETRY_BUFFER_TIMING_MOD_BITS 1
3684
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_RETRY_BUFFER_TIMING_MOD_SHIFT 31
3685
3686
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: RESERVED_0 [30:30] */
3687
#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_0_MASK          0x40000000
3688
#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_0_ALIGN         0
3689
#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_0_BITS          1
3690
#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_0_SHIFT         30
3691
3692
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: MSI_SINGLE_SHOT_ENABLE [29:29] */
3693
#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_SINGLE_SHOT_ENABLE_MASK 0x20000000
3694
#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_SINGLE_SHOT_ENABLE_ALIGN 0
3695
#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_SINGLE_SHOT_ENABLE_BITS 1
3696
#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_SINGLE_SHOT_ENABLE_SHIFT 29
3697
3698
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: RESERVED_1 [28:28] */
3699
#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_1_MASK          0x10000000
3700
#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_1_ALIGN         0
3701
#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_1_BITS          1
3702
#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_1_SHIFT         28
3703
3704
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: SELECT_CORE_CLOCK_OVERRIDE [27:27] */
3705
#define PCIE_TL_TRANSACTION_CONFIGURATION_SELECT_CORE_CLOCK_OVERRIDE_MASK 0x08000000
3706
#define PCIE_TL_TRANSACTION_CONFIGURATION_SELECT_CORE_CLOCK_OVERRIDE_ALIGN 0
3707
#define PCIE_TL_TRANSACTION_CONFIGURATION_SELECT_CORE_CLOCK_OVERRIDE_BITS 1
3708
#define PCIE_TL_TRANSACTION_CONFIGURATION_SELECT_CORE_CLOCK_OVERRIDE_SHIFT 27
3709
3710
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: CQ9139_FIX_ENABLE [26:26] */
3711
#define PCIE_TL_TRANSACTION_CONFIGURATION_CQ9139_FIX_ENABLE_MASK   0x04000000
3712
#define PCIE_TL_TRANSACTION_CONFIGURATION_CQ9139_FIX_ENABLE_ALIGN  0
3713
#define PCIE_TL_TRANSACTION_CONFIGURATION_CQ9139_FIX_ENABLE_BITS   1
3714
#define PCIE_TL_TRANSACTION_CONFIGURATION_CQ9139_FIX_ENABLE_SHIFT  26
3715
3716
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_CMPT_PWR_CHECK [25:25] */
3717
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CMPT_PWR_CHECK_MASK 0x02000000
3718
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CMPT_PWR_CHECK_ALIGN 0
3719
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CMPT_PWR_CHECK_BITS 1
3720
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CMPT_PWR_CHECK_SHIFT 25
3721
3722
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_CQ12696_FIX [24:24] */
3723
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12696_FIX_MASK  0x01000000
3724
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12696_FIX_ALIGN 0
3725
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12696_FIX_BITS  1
3726
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12696_FIX_SHIFT 24
3727
3728
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: DEVICE_SERIAL_NO_OVERRIDE [23:23] */
3729
#define PCIE_TL_TRANSACTION_CONFIGURATION_DEVICE_SERIAL_NO_OVERRIDE_MASK 0x00800000
3730
#define PCIE_TL_TRANSACTION_CONFIGURATION_DEVICE_SERIAL_NO_OVERRIDE_ALIGN 0
3731
#define PCIE_TL_TRANSACTION_CONFIGURATION_DEVICE_SERIAL_NO_OVERRIDE_BITS 1
3732
#define PCIE_TL_TRANSACTION_CONFIGURATION_DEVICE_SERIAL_NO_OVERRIDE_SHIFT 23
3733
3734
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_CQ12455_FIX [22:22] */
3735
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12455_FIX_MASK  0x00400000
3736
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12455_FIX_ALIGN 0
3737
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12455_FIX_BITS  1
3738
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_CQ12455_FIX_SHIFT 22
3739
3740
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_TC_VC_FILTERING_CHECK [21:21] */
3741
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_TC_VC_FILTERING_CHECK_MASK 0x00200000
3742
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_TC_VC_FILTERING_CHECK_ALIGN 0
3743
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_TC_VC_FILTERING_CHECK_BITS 1
3744
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_TC_VC_FILTERING_CHECK_SHIFT 21
3745
3746
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: DONT_GEN_HOT_PLUG_MSG [20:20] */
3747
#define PCIE_TL_TRANSACTION_CONFIGURATION_DONT_GEN_HOT_PLUG_MSG_MASK 0x00100000
3748
#define PCIE_TL_TRANSACTION_CONFIGURATION_DONT_GEN_HOT_PLUG_MSG_ALIGN 0
3749
#define PCIE_TL_TRANSACTION_CONFIGURATION_DONT_GEN_HOT_PLUG_MSG_BITS 1
3750
#define PCIE_TL_TRANSACTION_CONFIGURATION_DONT_GEN_HOT_PLUG_MSG_SHIFT 20
3751
3752
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: IGNORE_HOTPLUG_MSG [19:19] */
3753
#define PCIE_TL_TRANSACTION_CONFIGURATION_IGNORE_HOTPLUG_MSG_MASK  0x00080000
3754
#define PCIE_TL_TRANSACTION_CONFIGURATION_IGNORE_HOTPLUG_MSG_ALIGN 0
3755
#define PCIE_TL_TRANSACTION_CONFIGURATION_IGNORE_HOTPLUG_MSG_BITS  1
3756
#define PCIE_TL_TRANSACTION_CONFIGURATION_IGNORE_HOTPLUG_MSG_SHIFT 19
3757
3758
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: MSI_MULTMSG_CAPABLE [18:16] */
3759
#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_MULTMSG_CAPABLE_MASK 0x00070000
3760
#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_MULTMSG_CAPABLE_ALIGN 0
3761
#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_MULTMSG_CAPABLE_BITS 3
3762
#define PCIE_TL_TRANSACTION_CONFIGURATION_MSI_MULTMSG_CAPABLE_SHIFT 16
3763
3764
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: DATA_SELECT_LIMIT [15:12] */
3765
#define PCIE_TL_TRANSACTION_CONFIGURATION_DATA_SELECT_LIMIT_MASK   0x0000f000
3766
#define PCIE_TL_TRANSACTION_CONFIGURATION_DATA_SELECT_LIMIT_ALIGN  0
3767
#define PCIE_TL_TRANSACTION_CONFIGURATION_DATA_SELECT_LIMIT_BITS   4
3768
#define PCIE_TL_TRANSACTION_CONFIGURATION_DATA_SELECT_LIMIT_SHIFT  12
3769
3770
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_PCIE_1_1_PL [11:11] */
3771
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_PL_MASK  0x00000800
3772
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_PL_ALIGN 0
3773
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_PL_BITS  1
3774
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_PL_SHIFT 11
3775
3776
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_PCIE_1_1_DL [10:10] */
3777
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_DL_MASK  0x00000400
3778
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_DL_ALIGN 0
3779
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_DL_BITS  1
3780
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_DL_SHIFT 10
3781
3782
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_PCIE_1_1_TL [09:09] */
3783
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_TL_MASK  0x00000200
3784
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_TL_ALIGN 0
3785
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_TL_BITS  1
3786
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_PCIE_1_1_TL_SHIFT 9
3787
3788
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: RESERVED_2 [08:07] */
3789
#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_2_MASK          0x00000180
3790
#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_2_ALIGN         0
3791
#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_2_BITS          2
3792
#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_2_SHIFT         7
3793
3794
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: PCIE_POWER_BUDGET_CAP_ENABLE [06:06] */
3795
#define PCIE_TL_TRANSACTION_CONFIGURATION_PCIE_POWER_BUDGET_CAP_ENABLE_MASK 0x00000040
3796
#define PCIE_TL_TRANSACTION_CONFIGURATION_PCIE_POWER_BUDGET_CAP_ENABLE_ALIGN 0
3797
#define PCIE_TL_TRANSACTION_CONFIGURATION_PCIE_POWER_BUDGET_CAP_ENABLE_BITS 1
3798
#define PCIE_TL_TRANSACTION_CONFIGURATION_PCIE_POWER_BUDGET_CAP_ENABLE_SHIFT 6
3799
3800
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: LOM_CONFIGURATION [05:05] */
3801
#define PCIE_TL_TRANSACTION_CONFIGURATION_LOM_CONFIGURATION_MASK   0x00000020
3802
#define PCIE_TL_TRANSACTION_CONFIGURATION_LOM_CONFIGURATION_ALIGN  0
3803
#define PCIE_TL_TRANSACTION_CONFIGURATION_LOM_CONFIGURATION_BITS   1
3804
#define PCIE_TL_TRANSACTION_CONFIGURATION_LOM_CONFIGURATION_SHIFT  5
3805
3806
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: CONCATE_SELECT [04:04] */
3807
#define PCIE_TL_TRANSACTION_CONFIGURATION_CONCATE_SELECT_MASK      0x00000010
3808
#define PCIE_TL_TRANSACTION_CONFIGURATION_CONCATE_SELECT_ALIGN     0
3809
#define PCIE_TL_TRANSACTION_CONFIGURATION_CONCATE_SELECT_BITS      1
3810
#define PCIE_TL_TRANSACTION_CONFIGURATION_CONCATE_SELECT_SHIFT     4
3811
3812
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: RESERVED_3 [03:03] */
3813
#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_3_MASK          0x00000008
3814
#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_3_ALIGN         0
3815
#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_3_BITS          1
3816
#define PCIE_TL_TRANSACTION_CONFIGURATION_RESERVED_3_SHIFT         3
3817
3818
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_9468_FIX [02:02] */
3819
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9468_FIX_MASK     0x00000004
3820
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9468_FIX_ALIGN    0
3821
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9468_FIX_BITS     1
3822
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9468_FIX_SHIFT    2
3823
3824
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: POWER_STATE_WRITE_MEM_ENABLE [01:01] */
3825
#define PCIE_TL_TRANSACTION_CONFIGURATION_POWER_STATE_WRITE_MEM_ENABLE_MASK 0x00000002
3826
#define PCIE_TL_TRANSACTION_CONFIGURATION_POWER_STATE_WRITE_MEM_ENABLE_ALIGN 0
3827
#define PCIE_TL_TRANSACTION_CONFIGURATION_POWER_STATE_WRITE_MEM_ENABLE_BITS 1
3828
#define PCIE_TL_TRANSACTION_CONFIGURATION_POWER_STATE_WRITE_MEM_ENABLE_SHIFT 1
3829
3830
/* PCIE_TL :: TRANSACTION_CONFIGURATION :: ENABLE_9709_ENABLE [00:00] */
3831
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9709_ENABLE_MASK  0x00000001
3832
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9709_ENABLE_ALIGN 0
3833
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9709_ENABLE_BITS  1
3834
#define PCIE_TL_TRANSACTION_CONFIGURATION_ENABLE_9709_ENABLE_SHIFT 0
3835
3836
3837
/****************************************************************************
3838
 * PCIE_TL :: WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC
3839
 ***************************************************************************/
3840
/* PCIE_TL :: WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC :: RESERVED_0 [31:00] */
3841
#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_RESERVED_0_MASK 0xffffffff
3842
#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_RESERVED_0_ALIGN 0
3843
#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_RESERVED_0_BITS 32
3844
#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_RESERVED_0_SHIFT 0
3845
3846
3847
/****************************************************************************
3848
 * PCIE_TL :: WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2
3849
 ***************************************************************************/
3850
/* PCIE_TL :: WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2 :: RESERVED_0 [31:00] */
3851
#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2_RESERVED_0_MASK 0xffffffff
3852
#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2_RESERVED_0_ALIGN 0
3853
#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2_RESERVED_0_BITS 32
3854
#define PCIE_TL_WRITE_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_2_RESERVED_0_SHIFT 0
3855
3856
3857
/****************************************************************************
3858
 * PCIE_TL :: DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC
3859
 ***************************************************************************/
3860
/* PCIE_TL :: DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC :: REG_MADDR_UPR [31:00] */
3861
#define PCIE_TL_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_REG_MADDR_UPR_MASK 0xffffffff
3862
#define PCIE_TL_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_REG_MADDR_UPR_ALIGN 0
3863
#define PCIE_TL_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_REG_MADDR_UPR_BITS 32
3864
#define PCIE_TL_DMA_REQUEST_UPPER_ADDRESS_DIAGNOSTIC_REG_MADDR_UPR_SHIFT 0
3865
3866
3867
/****************************************************************************
3868
 * PCIE_TL :: DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2
3869
 ***************************************************************************/
3870
/* PCIE_TL :: DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2 :: REG_MADDR_LWR [31:00] */
3871
#define PCIE_TL_DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2_REG_MADDR_LWR_MASK 0xffffffff
3872
#define PCIE_TL_DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2_REG_MADDR_LWR_ALIGN 0
3873
#define PCIE_TL_DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2_REG_MADDR_LWR_BITS 32
3874
#define PCIE_TL_DMA_REQUEST_LOWER_ADDRESS_DIAGNOSTIC_2_REG_MADDR_LWR_SHIFT 0
3875
3876
3877
/****************************************************************************
3878
 * PCIE_TL :: DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC
3879
 ***************************************************************************/
3880
/* PCIE_TL :: DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC :: REG_MLEN_BE [31:24] */
3881
#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_REG_MLEN_BE_MASK 0xff000000
3882
#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_REG_MLEN_BE_ALIGN 0
3883
#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_REG_MLEN_BE_BITS 8
3884
#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_REG_MLEN_BE_SHIFT 24
3885
3886
/* PCIE_TL :: DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC :: DMA_REQUEST_FIRST_DW_BYTE_ENABLES [23:20] */
3887
#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_FIRST_DW_BYTE_ENABLES_MASK 0x00f00000
3888
#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_FIRST_DW_BYTE_ENABLES_ALIGN 0
3889
#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_FIRST_DW_BYTE_ENABLES_BITS 4
3890
#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_FIRST_DW_BYTE_ENABLES_SHIFT 20
3891
3892
/* PCIE_TL :: DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC :: DMA_REQUEST_LAST_DW_BYTE_ENABLES [19:16] */
3893
#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_LAST_DW_BYTE_ENABLES_MASK 0x000f0000
3894
#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_LAST_DW_BYTE_ENABLES_ALIGN 0
3895
#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_LAST_DW_BYTE_ENABLES_BITS 4
3896
#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_LAST_DW_BYTE_ENABLES_SHIFT 16
3897
3898
/* PCIE_TL :: DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC :: RESERVED_0 [15:11] */
3899
#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_RESERVED_0_MASK 0x0000f800
3900
#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_RESERVED_0_ALIGN 0
3901
#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_RESERVED_0_BITS 5
3902
#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_RESERVED_0_SHIFT 11
3903
3904
/* PCIE_TL :: DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC :: DMA_REQUEST_DW_LENGTH [10:00] */
3905
#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_DW_LENGTH_MASK 0x000007ff
3906
#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_DW_LENGTH_ALIGN 0
3907
#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_DW_LENGTH_BITS 11
3908
#define PCIE_TL_DMA_REQUEST_LENGTH_BYTE_ENABLE_DIAGNOSTIC_DMA_REQUEST_DW_LENGTH_SHIFT 0
3909
3910
3911
/****************************************************************************
3912
 * PCIE_TL :: DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC
3913
 ***************************************************************************/
3914
/* PCIE_TL :: DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC :: REG_MTAG_ATTR [31:19] */
3915
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_REG_MTAG_ATTR_MASK 0xfff80000
3916
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_REG_MTAG_ATTR_ALIGN 0
3917
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_REG_MTAG_ATTR_BITS 13
3918
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_REG_MTAG_ATTR_SHIFT 19
3919
3920
/* PCIE_TL :: DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC :: DMA_REQUEST_FUNCTION [18:16] */
3921
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_FUNCTION_MASK 0x00070000
3922
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_FUNCTION_ALIGN 0
3923
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_FUNCTION_BITS 3
3924
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_FUNCTION_SHIFT 16
3925
3926
/* PCIE_TL :: DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC :: RESERVED_0 [15:13] */
3927
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_0_MASK 0x0000e000
3928
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_0_ALIGN 0
3929
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_0_BITS 3
3930
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_0_SHIFT 13
3931
3932
/* PCIE_TL :: DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC :: DMA_REQUEST_ATTRIBUTES [12:08] */
3933
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_ATTRIBUTES_MASK 0x00001f00
3934
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_ATTRIBUTES_ALIGN 0
3935
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_ATTRIBUTES_BITS 5
3936
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_ATTRIBUTES_SHIFT 8
3937
3938
/* PCIE_TL :: DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC :: RESERVED_1 [07:05] */
3939
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_1_MASK 0x000000e0
3940
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_1_ALIGN 0
3941
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_1_BITS 3
3942
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_RESERVED_1_SHIFT 5
3943
3944
/* PCIE_TL :: DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC :: DMA_REQUEST_TAG [04:00] */
3945
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_TAG_MASK 0x0000001f
3946
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_TAG_ALIGN 0
3947
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_TAG_BITS 5
3948
#define PCIE_TL_DMA_REQUEST_TAG_ATTRIBUTE_FUNCTION_DIAGNOSTIC_DMA_REQUEST_TAG_SHIFT 0
3949
3950
3951
/****************************************************************************
3952
 * PCIE_TL :: READ_DMA_SPLIT_IDS_DIAGNOSTIC
3953
 ***************************************************************************/
3954
/* PCIE_TL :: READ_DMA_SPLIT_IDS_DIAGNOSTIC :: REG_SPLIT_ID [31:16] */
3955
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_REG_SPLIT_ID_MASK    0xffff0000
3956
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_REG_SPLIT_ID_ALIGN   0
3957
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_REG_SPLIT_ID_BITS    16
3958
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_REG_SPLIT_ID_SHIFT   16
3959
3960
/* PCIE_TL :: READ_DMA_SPLIT_IDS_DIAGNOSTIC :: RESERVED_0 [15:13] */
3961
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_0_MASK      0x0000e000
3962
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_0_ALIGN     0
3963
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_0_BITS      3
3964
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_0_SHIFT     13
3965
3966
/* PCIE_TL :: READ_DMA_SPLIT_IDS_DIAGNOSTIC :: READ_DMA_SPLIT_ATTRIBUTES [12:11] */
3967
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_ATTRIBUTES_MASK 0x00001800
3968
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_ATTRIBUTES_ALIGN 0
3969
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_ATTRIBUTES_BITS 2
3970
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_ATTRIBUTES_SHIFT 11
3971
3972
/* PCIE_TL :: READ_DMA_SPLIT_IDS_DIAGNOSTIC :: READ_DMA_SPLIT_TC [10:08] */
3973
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TC_MASK 0x00000700
3974
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TC_ALIGN 0
3975
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TC_BITS 3
3976
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TC_SHIFT 8
3977
3978
/* PCIE_TL :: READ_DMA_SPLIT_IDS_DIAGNOSTIC :: RESERVED_1 [07:05] */
3979
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_1_MASK      0x000000e0
3980
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_1_ALIGN     0
3981
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_1_BITS      3
3982
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_RESERVED_1_SHIFT     5
3983
3984
/* PCIE_TL :: READ_DMA_SPLIT_IDS_DIAGNOSTIC :: READ_DMA_SPLIT_TAG [04:00] */
3985
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TAG_MASK 0x0000001f
3986
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TAG_ALIGN 0
3987
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TAG_BITS 5
3988
#define PCIE_TL_READ_DMA_SPLIT_IDS_DIAGNOSTIC_READ_DMA_SPLIT_TAG_SHIFT 0
3989
3990
3991
/****************************************************************************
3992
 * PCIE_TL :: READ_DMA_SPLIT_LENGTH_DIAGNOSTIC
3993
 ***************************************************************************/
3994
/* PCIE_TL :: READ_DMA_SPLIT_LENGTH_DIAGNOSTIC :: REG_SPLIT_LEN [31:13] */
3995
#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_REG_SPLIT_LEN_MASK 0xffffe000
3996
#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_REG_SPLIT_LEN_ALIGN 0
3997
#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_REG_SPLIT_LEN_BITS 19
3998
#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_REG_SPLIT_LEN_SHIFT 13
3999
4000
/* PCIE_TL :: READ_DMA_SPLIT_LENGTH_DIAGNOSTIC :: READ_DMA_SPLIT_INITIAL_BYTE_COUNT [12:00] */
4001
#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_READ_DMA_SPLIT_INITIAL_BYTE_COUNT_MASK 0x00001fff
4002
#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_READ_DMA_SPLIT_INITIAL_BYTE_COUNT_ALIGN 0
4003
#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_READ_DMA_SPLIT_INITIAL_BYTE_COUNT_BITS 13
4004
#define PCIE_TL_READ_DMA_SPLIT_LENGTH_DIAGNOSTIC_READ_DMA_SPLIT_INITIAL_BYTE_COUNT_SHIFT 0
4005
4006
4007
/****************************************************************************
4008
 * PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC
4009
 ***************************************************************************/
4010
/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: REG_SM_R0_R3 [31:31] */
4011
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_REG_SM_R0_R3_MASK 0x80000000
4012
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_REG_SM_R0_R3_ALIGN 0
4013
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_REG_SM_R0_R3_BITS 1
4014
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_REG_SM_R0_R3_SHIFT 31
4015
4016
/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: TLP_TRANSMITTER_DATA_STATE_MACHINE [30:28] */
4017
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_DATA_STATE_MACHINE_MASK 0x70000000
4018
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_DATA_STATE_MACHINE_ALIGN 0
4019
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_DATA_STATE_MACHINE_BITS 3
4020
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_DATA_STATE_MACHINE_SHIFT 28
4021
4022
/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: TLP_TRANSMITTER_ARBITRATION_STATE_MACHINE [27:23] */
4023
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_ARBITRATION_STATE_MACHINE_MASK 0x0f800000
4024
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_ARBITRATION_STATE_MACHINE_ALIGN 0
4025
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_ARBITRATION_STATE_MACHINE_BITS 5
4026
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TLP_TRANSMITTER_ARBITRATION_STATE_MACHINE_SHIFT 23
4027
4028
/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: RESERVED_0 [22:07] */
4029
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_RESERVED_0_MASK 0x007fff80
4030
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_RESERVED_0_ALIGN 0
4031
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_RESERVED_0_BITS 16
4032
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_RESERVED_0_SHIFT 7
4033
4034
/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: READ_DMA_RAW_REQUEST [06:06] */
4035
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_RAW_REQUEST_MASK 0x00000040
4036
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_RAW_REQUEST_ALIGN 0
4037
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_RAW_REQUEST_BITS 1
4038
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_RAW_REQUEST_SHIFT 6
4039
4040
/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: WRITE_DMA_RAW_REQUEST [05:05] */
4041
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_RAW_REQUEST_MASK 0x00000020
4042
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_RAW_REQUEST_ALIGN 0
4043
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_RAW_REQUEST_BITS 1
4044
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_RAW_REQUEST_SHIFT 5
4045
4046
/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: INTERRUPT_MSG_GATED_REQUEST [04:04] */
4047
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_INTERRUPT_MSG_GATED_REQUEST_MASK 0x00000010
4048
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_INTERRUPT_MSG_GATED_REQUEST_ALIGN 0
4049
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_INTERRUPT_MSG_GATED_REQUEST_BITS 1
4050
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_INTERRUPT_MSG_GATED_REQUEST_SHIFT 4
4051
4052
/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: MSI_DMA_GATED_REQUEST [03:03] */
4053
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_MSI_DMA_GATED_REQUEST_MASK 0x00000008
4054
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_MSI_DMA_GATED_REQUEST_ALIGN 0
4055
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_MSI_DMA_GATED_REQUEST_BITS 1
4056
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_MSI_DMA_GATED_REQUEST_SHIFT 3
4057
4058
/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: TARGET_COMPLETION_OR_MSG_GATED_REQUEST [02:02] */
4059
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TARGET_COMPLETION_OR_MSG_GATED_REQUEST_MASK 0x00000004
4060
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TARGET_COMPLETION_OR_MSG_GATED_REQUEST_ALIGN 0
4061
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TARGET_COMPLETION_OR_MSG_GATED_REQUEST_BITS 1
4062
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_TARGET_COMPLETION_OR_MSG_GATED_REQUEST_SHIFT 2
4063
4064
/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: READ_DMA_GATED_REQUEST [01:01] */
4065
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_GATED_REQUEST_MASK 0x00000002
4066
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_GATED_REQUEST_ALIGN 0
4067
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_GATED_REQUEST_BITS 1
4068
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_READ_DMA_GATED_REQUEST_SHIFT 1
4069
4070
/* PCIE_TL :: XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC :: WRITE_DMA_GATED_REQUEST [00:00] */
4071
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_GATED_REQUEST_MASK 0x00000001
4072
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_GATED_REQUEST_ALIGN 0
4073
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_GATED_REQUEST_BITS 1
4074
#define PCIE_TL_XMT_STATE_MACHINES_AND_REQUEST_DIAGNOSTIC_WRITE_DMA_GATED_REQUEST_SHIFT 0
4075
4076
4077
/****************************************************************************
4078
 * PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC
4079
 ***************************************************************************/
4080
/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: REG_DMA_CMPT_MISC2 [31:29] */
4081
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_REG_DMA_CMPT_MISC2_MASK 0xe0000000
4082
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_REG_DMA_CMPT_MISC2_ALIGN 0
4083
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_REG_DMA_CMPT_MISC2_BITS 3
4084
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_REG_DMA_CMPT_MISC2_SHIFT 29
4085
4086
/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: SPLIT_BYTE_LENGTH_REMAINING [28:16] */
4087
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_BYTE_LENGTH_REMAINING_MASK 0x1fff0000
4088
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_BYTE_LENGTH_REMAINING_ALIGN 0
4089
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_BYTE_LENGTH_REMAINING_BITS 13
4090
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_BYTE_LENGTH_REMAINING_SHIFT 16
4091
4092
/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: NOT_USED [15:15] */
4093
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_NOT_USED_MASK      0x00008000
4094
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_NOT_USED_ALIGN     0
4095
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_NOT_USED_BITS      1
4096
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_NOT_USED_SHIFT     15
4097
4098
/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: LAST_COMPLETION_TLP_INDICATOR_SPLITCTL_GENERATED [14:14] */
4099
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_SPLITCTL_GENERATED_MASK 0x00004000
4100
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_SPLITCTL_GENERATED_ALIGN 0
4101
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_SPLITCTL_GENERATED_BITS 1
4102
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_SPLITCTL_GENERATED_SHIFT 14
4103
4104
/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: LAST_COMPLETION_TLP_INDICATOR_DMA_CMPT_GENERATED [13:13] */
4105
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_DMA_CMPT_GENERATED_MASK 0x00002000
4106
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_DMA_CMPT_GENERATED_ALIGN 0
4107
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_DMA_CMPT_GENERATED_BITS 1
4108
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_LAST_COMPLETION_TLP_INDICATOR_DMA_CMPT_GENERATED_SHIFT 13
4109
4110
/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: DW_LENGTH_REMAINING_IN_CURRENT_COMPLETION_TLP_IS_GREATER_THAN_1 [12:12] */
4111
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_DW_LENGTH_REMAINING_IN_CURRENT_COMPLETION_TLP_IS_GREATER_THAN_1_MASK 0x00001000
4112
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_DW_LENGTH_REMAINING_IN_CURRENT_COMPLETION_TLP_IS_GREATER_THAN_1_ALIGN 0
4113
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_DW_LENGTH_REMAINING_IN_CURRENT_COMPLETION_TLP_IS_GREATER_THAN_1_BITS 1
4114
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_DW_LENGTH_REMAINING_IN_CURRENT_COMPLETION_TLP_IS_GREATER_THAN_1_SHIFT 12
4115
4116
/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: SPLIT_TRANSACTION_ACTIVE_SPLIT_PENDING_BLOCK_REQUEST [11:11] */
4117
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_TRANSACTION_ACTIVE_SPLIT_PENDING_BLOCK_REQUEST_MASK 0x00000800
4118
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_TRANSACTION_ACTIVE_SPLIT_PENDING_BLOCK_REQUEST_ALIGN 0
4119
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_TRANSACTION_ACTIVE_SPLIT_PENDING_BLOCK_REQUEST_BITS 1
4120
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_TRANSACTION_ACTIVE_SPLIT_PENDING_BLOCK_REQUEST_SHIFT 11
4121
4122
/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: COMPLETION_TLP_MATCHES_REQUEST_WITHOUT_BC_LADDR_CHECKS [10:10] */
4123
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_WITHOUT_BC_LADDR_CHECKS_MASK 0x00000400
4124
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_WITHOUT_BC_LADDR_CHECKS_ALIGN 0
4125
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_WITHOUT_BC_LADDR_CHECKS_BITS 1
4126
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_WITHOUT_BC_LADDR_CHECKS_SHIFT 10
4127
4128
/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: COMPLETION_TLP_MATCHES_REQUEST_FULLY [09:09] */
4129
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_FULLY_MASK 0x00000200
4130
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_FULLY_ALIGN 0
4131
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_FULLY_BITS 1
4132
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TLP_MATCHES_REQUEST_FULLY_SHIFT 9
4133
4134
/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: SPLIT_DW_DATA_VALID_ADDRESS_ACK [08:08] */
4135
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_DW_DATA_VALID_ADDRESS_ACK_MASK 0x00000100
4136
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_DW_DATA_VALID_ADDRESS_ACK_ALIGN 0
4137
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_DW_DATA_VALID_ADDRESS_ACK_BITS 1
4138
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_SPLIT_DW_DATA_VALID_ADDRESS_ACK_SHIFT 8
4139
4140
/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: COMPLETION_TOO_MUCH_DATA_ERROR_COUNTER [07:04] */
4141
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TOO_MUCH_DATA_ERROR_COUNTER_MASK 0x000000f0
4142
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TOO_MUCH_DATA_ERROR_COUNTER_ALIGN 0
4143
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TOO_MUCH_DATA_ERROR_COUNTER_BITS 4
4144
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_COMPLETION_TOO_MUCH_DATA_ERROR_COUNTER_SHIFT 4
4145
4146
/* PCIE_TL :: DMA_COMPLETION_MISC__DIAGNOSTIC :: FRAME_DEAD_TIME_ERROR_COUNTER [03:00] */
4147
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_FRAME_DEAD_TIME_ERROR_COUNTER_MASK 0x0000000f
4148
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_FRAME_DEAD_TIME_ERROR_COUNTER_ALIGN 0
4149
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_FRAME_DEAD_TIME_ERROR_COUNTER_BITS 4
4150
#define PCIE_TL_DMA_COMPLETION_MISC__DIAGNOSTIC_FRAME_DEAD_TIME_ERROR_COUNTER_SHIFT 0
4151
4152
4153
/****************************************************************************
4154
 * PCIE_TL :: SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC
4155
 ***************************************************************************/
4156
/* PCIE_TL :: SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC :: REG_SPLITCTL_MISC0 [31:29] */
4157
#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_REG_SPLITCTL_MISC0_MASK 0xe0000000
4158
#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_REG_SPLITCTL_MISC0_ALIGN 0
4159
#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_REG_SPLITCTL_MISC0_BITS 3
4160
#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_REG_SPLITCTL_MISC0_SHIFT 29
4161
4162
/* PCIE_TL :: SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC :: LOOKUP_RESULT_FOR_EXPECTED_BYTE_COUNT_REMAINING [28:16] */
4163
#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_BYTE_COUNT_REMAINING_MASK 0x1fff0000
4164
#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_BYTE_COUNT_REMAINING_ALIGN 0
4165
#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_BYTE_COUNT_REMAINING_BITS 13
4166
#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_BYTE_COUNT_REMAINING_SHIFT 16
4167
4168
/* PCIE_TL :: SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC :: LOOKUP_RESULT_FOR_EXPECTED_REQUESTER_ID [15:00] */
4169
#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_REQUESTER_ID_MASK 0x0000ffff
4170
#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_REQUESTER_ID_ALIGN 0
4171
#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_REQUESTER_ID_BITS 16
4172
#define PCIE_TL_SPLIT_CONTROLLER_MISC_0_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_REQUESTER_ID_SHIFT 0
4173
4174
4175
/****************************************************************************
4176
 * PCIE_TL :: SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC
4177
 ***************************************************************************/
4178
/* PCIE_TL :: SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC :: REG_SPLITCTL_MISC1 [31:16] */
4179
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_REG_SPLITCTL_MISC1_MASK 0xffff0000
4180
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_REG_SPLITCTL_MISC1_ALIGN 0
4181
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_REG_SPLITCTL_MISC1_BITS 16
4182
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_REG_SPLITCTL_MISC1_SHIFT 16
4183
4184
/* PCIE_TL :: SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC :: RESERVED_0 [15:15] */
4185
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_0_MASK 0x00008000
4186
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_0_ALIGN 0
4187
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_0_BITS 1
4188
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_0_SHIFT 15
4189
4190
/* PCIE_TL :: SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC :: LOOKUP_RESULT_FOR_EXPECTED_LOWER_ADDRESS [14:08] */
4191
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_LOWER_ADDRESS_MASK 0x00007f00
4192
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_LOWER_ADDRESS_ALIGN 0
4193
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_LOWER_ADDRESS_BITS 7
4194
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_LOWER_ADDRESS_SHIFT 8
4195
4196
/* PCIE_TL :: SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC :: RESERVED_1 [07:07] */
4197
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_1_MASK 0x00000080
4198
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_1_ALIGN 0
4199
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_1_BITS 1
4200
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_RESERVED_1_SHIFT 7
4201
4202
/* PCIE_TL :: SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC :: LOOKUP_RESULT_FOR_EXPECTED_ATTRIBUTE [06:05] */
4203
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_ATTRIBUTE_MASK 0x00000060
4204
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_ATTRIBUTE_ALIGN 0
4205
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_ATTRIBUTE_BITS 2
4206
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_RESULT_FOR_EXPECTED_ATTRIBUTE_SHIFT 5
4207
4208
/* PCIE_TL :: SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC :: LOOKUP_TAG [04:00] */
4209
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_TAG_MASK 0x0000001f
4210
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_TAG_ALIGN 0
4211
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_TAG_BITS 5
4212
#define PCIE_TL_SPLIT_CONTROLLER_MISC_1_DIAGNOSTIC_LOOKUP_TAG_SHIFT 0
4213
4214
4215
/****************************************************************************
4216
 * PCIE_TL :: SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC
4217
 ***************************************************************************/
4218
/* PCIE_TL :: SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC :: REG_SPLITCTL_MISC2 [31:31] */
4219
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_REG_SPLITCTL_MISC2_MASK 0x80000000
4220
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_REG_SPLITCTL_MISC2_ALIGN 0
4221
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_REG_SPLITCTL_MISC2_BITS 1
4222
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_REG_SPLITCTL_MISC2_SHIFT 31
4223
4224
/* PCIE_TL :: SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC :: COMPLETION_TLP_MATCHES_EXPECTED_LOWER_ADDRESS [30:30] */
4225
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_EXPECTED_LOWER_ADDRESS_MASK 0x40000000
4226
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_EXPECTED_LOWER_ADDRESS_ALIGN 0
4227
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_EXPECTED_LOWER_ADDRESS_BITS 1
4228
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_EXPECTED_LOWER_ADDRESS_SHIFT 30
4229
4230
/* PCIE_TL :: SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC :: COMPLETION_TLP_MATCHES_VALID_TAG [29:29] */
4231
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_VALID_TAG_MASK 0x20000000
4232
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_VALID_TAG_ALIGN 0
4233
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_VALID_TAG_BITS 1
4234
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_COMPLETION_TLP_MATCHES_VALID_TAG_SHIFT 29
4235
4236
/* PCIE_TL :: SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC :: UPDATED_BYTE_COUNT [28:16] */
4237
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_UPDATED_BYTE_COUNT_MASK 0x1fff0000
4238
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_UPDATED_BYTE_COUNT_ALIGN 0
4239
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_UPDATED_BYTE_COUNT_BITS 13
4240
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_UPDATED_BYTE_COUNT_SHIFT 16
4241
4242
/* PCIE_TL :: SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC :: RESERVED_0 [15:08] */
4243
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_RESERVED_0_MASK 0x0000ff00
4244
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_RESERVED_0_ALIGN 0
4245
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_RESERVED_0_BITS 8
4246
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_RESERVED_0_SHIFT 8
4247
4248
/* PCIE_TL :: SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC :: SPLIT_TABLE_VALID_ARRAY [07:00] */
4249
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_SPLIT_TABLE_VALID_ARRAY_MASK 0x000000ff
4250
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_SPLIT_TABLE_VALID_ARRAY_ALIGN 0
4251
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_SPLIT_TABLE_VALID_ARRAY_BITS 8
4252
#define PCIE_TL_SPLIT_CONTROLLER_MISC_2_DIAGNOSTIC_SPLIT_TABLE_VALID_ARRAY_SHIFT 0
4253
4254
4255
/****************************************************************************
4256
 * PCIE_TL :: TL_BUS_NO_DEV__NO__FUNC__NO
4257
 ***************************************************************************/
4258
/* PCIE_TL :: TL_BUS_NO_DEV__NO__FUNC__NO :: RESERVED_0 [31:17] */
4259
#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_RESERVED_0_MASK        0xfffe0000
4260
#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_RESERVED_0_ALIGN       0
4261
#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_RESERVED_0_BITS        15
4262
#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_RESERVED_0_SHIFT       17
4263
4264
/* PCIE_TL :: TL_BUS_NO_DEV__NO__FUNC__NO :: CONFIG_WRITE_INDICATER [16:16] */
4265
#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_CONFIG_WRITE_INDICATER_MASK 0x00010000
4266
#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_CONFIG_WRITE_INDICATER_ALIGN 0
4267
#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_CONFIG_WRITE_INDICATER_BITS 1
4268
#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_CONFIG_WRITE_INDICATER_SHIFT 16
4269
4270
/* PCIE_TL :: TL_BUS_NO_DEV__NO__FUNC__NO :: BUS_NUMBER [15:08] */
4271
#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_BUS_NUMBER_MASK        0x0000ff00
4272
#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_BUS_NUMBER_ALIGN       0
4273
#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_BUS_NUMBER_BITS        8
4274
#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_BUS_NUMBER_SHIFT       8
4275
4276
/* PCIE_TL :: TL_BUS_NO_DEV__NO__FUNC__NO :: DEVICE_NUMBER [07:03] */
4277
#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_DEVICE_NUMBER_MASK     0x000000f8
4278
#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_DEVICE_NUMBER_ALIGN    0
4279
#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_DEVICE_NUMBER_BITS     5
4280
#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_DEVICE_NUMBER_SHIFT    3
4281
4282
/* PCIE_TL :: TL_BUS_NO_DEV__NO__FUNC__NO :: FUNCTION_NUMBER [02:00] */
4283
#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_FUNCTION_NUMBER_MASK   0x00000007
4284
#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_FUNCTION_NUMBER_ALIGN  0
4285
#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_FUNCTION_NUMBER_BITS   3
4286
#define PCIE_TL_TL_BUS_NO_DEV__NO__FUNC__NO_FUNCTION_NUMBER_SHIFT  0
4287
4288
4289
/****************************************************************************
4290
 * PCIE_TL :: TL_DEBUG
4291
 ***************************************************************************/
4292
/* PCIE_TL :: TL_DEBUG :: A4_DEVICE_INDICATION_BIT [31:31] */
4293
#define PCIE_TL_TL_DEBUG_A4_DEVICE_INDICATION_BIT_MASK             0x80000000
4294
#define PCIE_TL_TL_DEBUG_A4_DEVICE_INDICATION_BIT_ALIGN            0
4295
#define PCIE_TL_TL_DEBUG_A4_DEVICE_INDICATION_BIT_BITS             1
4296
#define PCIE_TL_TL_DEBUG_A4_DEVICE_INDICATION_BIT_SHIFT            31
4297
4298
/* PCIE_TL :: TL_DEBUG :: B1_DEVICE_INDICATION_BIT [30:30] */
4299
#define PCIE_TL_TL_DEBUG_B1_DEVICE_INDICATION_BIT_MASK             0x40000000
4300
#define PCIE_TL_TL_DEBUG_B1_DEVICE_INDICATION_BIT_ALIGN            0
4301
#define PCIE_TL_TL_DEBUG_B1_DEVICE_INDICATION_BIT_BITS             1
4302
#define PCIE_TL_TL_DEBUG_B1_DEVICE_INDICATION_BIT_SHIFT            30
4303
4304
/* PCIE_TL :: TL_DEBUG :: RESERVED_0 [29:00] */
4305
#define PCIE_TL_TL_DEBUG_RESERVED_0_MASK                           0x3fffffff
4306
#define PCIE_TL_TL_DEBUG_RESERVED_0_ALIGN                          0
4307
#define PCIE_TL_TL_DEBUG_RESERVED_0_BITS                           30
4308
#define PCIE_TL_TL_DEBUG_RESERVED_0_SHIFT                          0
4309
4310
4311
/****************************************************************************
4312
 * BCM70012_TGT_TOP_PCIE_DLL
4313
 ***************************************************************************/
4314
/****************************************************************************
4315
 * PCIE_DLL :: DATA_LINK_CONTROL
4316
 ***************************************************************************/
4317
/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_0 [31:30] */
4318
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_0_MASK                 0xc0000000
4319
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_0_ALIGN                0
4320
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_0_BITS                 2
4321
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_0_SHIFT                30
4322
4323
/* PCIE_DLL :: DATA_LINK_CONTROL :: CQ28001_FIX_ENABLE [29:29] */
4324
#define PCIE_DLL_DATA_LINK_CONTROL_CQ28001_FIX_ENABLE_MASK         0x20000000
4325
#define PCIE_DLL_DATA_LINK_CONTROL_CQ28001_FIX_ENABLE_ALIGN        0
4326
#define PCIE_DLL_DATA_LINK_CONTROL_CQ28001_FIX_ENABLE_BITS         1
4327
#define PCIE_DLL_DATA_LINK_CONTROL_CQ28001_FIX_ENABLE_SHIFT        29
4328
4329
/* PCIE_DLL :: DATA_LINK_CONTROL :: CQ27820_FIX_ENABLE [28:28] */
4330
#define PCIE_DLL_DATA_LINK_CONTROL_CQ27820_FIX_ENABLE_MASK         0x10000000
4331
#define PCIE_DLL_DATA_LINK_CONTROL_CQ27820_FIX_ENABLE_ALIGN        0
4332
#define PCIE_DLL_DATA_LINK_CONTROL_CQ27820_FIX_ENABLE_BITS         1
4333
#define PCIE_DLL_DATA_LINK_CONTROL_CQ27820_FIX_ENABLE_SHIFT        28
4334
4335
/* PCIE_DLL :: DATA_LINK_CONTROL :: ASPM_L1_ENABLE [27:27] */
4336
#define PCIE_DLL_DATA_LINK_CONTROL_ASPM_L1_ENABLE_MASK             0x08000000
4337
#define PCIE_DLL_DATA_LINK_CONTROL_ASPM_L1_ENABLE_ALIGN            0
4338
#define PCIE_DLL_DATA_LINK_CONTROL_ASPM_L1_ENABLE_BITS             1
4339
#define PCIE_DLL_DATA_LINK_CONTROL_ASPM_L1_ENABLE_SHIFT            27
4340
4341
/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_1 [26:25] */
4342
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_1_MASK                 0x06000000
4343
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_1_ALIGN                0
4344
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_1_BITS                 2
4345
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_1_SHIFT                25
4346
4347
/* PCIE_DLL :: DATA_LINK_CONTROL :: CQ11211 [24:24] */
4348
#define PCIE_DLL_DATA_LINK_CONTROL_CQ11211_MASK                    0x01000000
4349
#define PCIE_DLL_DATA_LINK_CONTROL_CQ11211_ALIGN                   0
4350
#define PCIE_DLL_DATA_LINK_CONTROL_CQ11211_BITS                    1
4351
#define PCIE_DLL_DATA_LINK_CONTROL_CQ11211_SHIFT                   24
4352
4353
/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_2 [23:23] */
4354
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_2_MASK                 0x00800000
4355
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_2_ALIGN                0
4356
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_2_BITS                 1
4357
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_2_SHIFT                23
4358
4359
/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_3 [22:22] */
4360
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_3_MASK                 0x00400000
4361
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_3_ALIGN                0
4362
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_3_BITS                 1
4363
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_3_SHIFT                22
4364
4365
/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_4 [21:21] */
4366
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_4_MASK                 0x00200000
4367
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_4_ALIGN                0
4368
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_4_BITS                 1
4369
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_4_SHIFT                21
4370
4371
/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_5 [20:20] */
4372
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_5_MASK                 0x00100000
4373
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_5_ALIGN                0
4374
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_5_BITS                 1
4375
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_5_SHIFT                20
4376
4377
/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_6 [19:19] */
4378
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_6_MASK                 0x00080000
4379
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_6_ALIGN                0
4380
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_6_BITS                 1
4381
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_6_SHIFT                19
4382
4383
/* PCIE_DLL :: DATA_LINK_CONTROL :: PLL_REFSEL_SWITCH_CONTROL_CQ11011 [18:18] */
4384
#define PCIE_DLL_DATA_LINK_CONTROL_PLL_REFSEL_SWITCH_CONTROL_CQ11011_MASK 0x00040000
4385
#define PCIE_DLL_DATA_LINK_CONTROL_PLL_REFSEL_SWITCH_CONTROL_CQ11011_ALIGN 0
4386
#define PCIE_DLL_DATA_LINK_CONTROL_PLL_REFSEL_SWITCH_CONTROL_CQ11011_BITS 1
4387
#define PCIE_DLL_DATA_LINK_CONTROL_PLL_REFSEL_SWITCH_CONTROL_CQ11011_SHIFT 18
4388
4389
/* PCIE_DLL :: DATA_LINK_CONTROL :: RESERVED_7 [17:17] */
4390
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_7_MASK                 0x00020000
4391
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_7_ALIGN                0
4392
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_7_BITS                 1
4393
#define PCIE_DLL_DATA_LINK_CONTROL_RESERVED_7_SHIFT                17
4394
4395
/* PCIE_DLL :: DATA_LINK_CONTROL :: POWER_MANAGEMENT_CONTROL [16:16] */
4396
#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_MASK   0x00010000
4397
#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_ALIGN  0
4398
#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_BITS   1
4399
#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_SHIFT  16
4400
4401
/* PCIE_DLL :: DATA_LINK_CONTROL :: POWER_DOWN_SERDES_TRANSMITTER [15:15] */
4402
#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_TRANSMITTER_MASK 0x00008000
4403
#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_TRANSMITTER_ALIGN 0
4404
#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_TRANSMITTER_BITS 1
4405
#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_TRANSMITTER_SHIFT 15
4406
4407
/* PCIE_DLL :: DATA_LINK_CONTROL :: POWER_DOWN_SERDES_PLL [14:14] */
4408
#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_PLL_MASK      0x00004000
4409
#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_PLL_ALIGN     0
4410
#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_PLL_BITS      1
4411
#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_PLL_SHIFT     14
4412
4413
/* PCIE_DLL :: DATA_LINK_CONTROL :: POWER_DOWN_SERDES_RECEIVER [13:13] */
4414
#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_RECEIVER_MASK 0x00002000
4415
#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_RECEIVER_ALIGN 0
4416
#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_RECEIVER_BITS 1
4417
#define PCIE_DLL_DATA_LINK_CONTROL_POWER_DOWN_SERDES_RECEIVER_SHIFT 13
4418
4419
/* PCIE_DLL :: DATA_LINK_CONTROL :: ENABLE_BEACON [12:12] */
4420
#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_BEACON_MASK              0x00001000
4421
#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_BEACON_ALIGN             0
4422
#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_BEACON_BITS              1
4423
#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_BEACON_SHIFT             12
4424
4425
/* PCIE_DLL :: DATA_LINK_CONTROL :: AUTOMATIC_TIMER_THRESHOLD_ENABLE [11:11] */
4426
#define PCIE_DLL_DATA_LINK_CONTROL_AUTOMATIC_TIMER_THRESHOLD_ENABLE_MASK 0x00000800
4427
#define PCIE_DLL_DATA_LINK_CONTROL_AUTOMATIC_TIMER_THRESHOLD_ENABLE_ALIGN 0
4428
#define PCIE_DLL_DATA_LINK_CONTROL_AUTOMATIC_TIMER_THRESHOLD_ENABLE_BITS 1
4429
#define PCIE_DLL_DATA_LINK_CONTROL_AUTOMATIC_TIMER_THRESHOLD_ENABLE_SHIFT 11
4430
4431
/* PCIE_DLL :: DATA_LINK_CONTROL :: ENABLE_DLLP_TIMEOUT_MECHANISM [10:10] */
4432
#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_DLLP_TIMEOUT_MECHANISM_MASK 0x00000400
4433
#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_DLLP_TIMEOUT_MECHANISM_ALIGN 0
4434
#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_DLLP_TIMEOUT_MECHANISM_BITS 1
4435
#define PCIE_DLL_DATA_LINK_CONTROL_ENABLE_DLLP_TIMEOUT_MECHANISM_SHIFT 10
4436
4437
/* PCIE_DLL :: DATA_LINK_CONTROL :: CHECK_RECEIVE_FLOW_CONTROL_CREDITS [09:09] */
4438
#define PCIE_DLL_DATA_LINK_CONTROL_CHECK_RECEIVE_FLOW_CONTROL_CREDITS_MASK 0x00000200
4439
#define PCIE_DLL_DATA_LINK_CONTROL_CHECK_RECEIVE_FLOW_CONTROL_CREDITS_ALIGN 0
4440
#define PCIE_DLL_DATA_LINK_CONTROL_CHECK_RECEIVE_FLOW_CONTROL_CREDITS_BITS 1
4441
#define PCIE_DLL_DATA_LINK_CONTROL_CHECK_RECEIVE_FLOW_CONTROL_CREDITS_SHIFT 9
4442
4443
/* PCIE_DLL :: DATA_LINK_CONTROL :: LINK_ENABLE [08:08] */
4444
#define PCIE_DLL_DATA_LINK_CONTROL_LINK_ENABLE_MASK                0x00000100
4445
#define PCIE_DLL_DATA_LINK_CONTROL_LINK_ENABLE_ALIGN               0
4446
#define PCIE_DLL_DATA_LINK_CONTROL_LINK_ENABLE_BITS                1
4447
#define PCIE_DLL_DATA_LINK_CONTROL_LINK_ENABLE_SHIFT               8
4448
4449
/* PCIE_DLL :: DATA_LINK_CONTROL :: POWER_MANAGEMENT_CONTROL_2 [07:00] */
4450
#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_2_MASK 0x000000ff
4451
#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_2_ALIGN 0
4452
#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_2_BITS 8
4453
#define PCIE_DLL_DATA_LINK_CONTROL_POWER_MANAGEMENT_CONTROL_2_SHIFT 0
4454
4455
4456
/****************************************************************************
4457
 * PCIE_DLL :: DATA_LINK_STATUS
4458
 ***************************************************************************/
4459
/* PCIE_DLL :: DATA_LINK_STATUS :: RESERVED_0 [31:26] */
4460
#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_0_MASK                  0xfc000000
4461
#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_0_ALIGN                 0
4462
#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_0_BITS                  6
4463
#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_0_SHIFT                 26
4464
4465
/* PCIE_DLL :: DATA_LINK_STATUS :: PHY_LINK_STATE [25:23] */
4466
#define PCIE_DLL_DATA_LINK_STATUS_PHY_LINK_STATE_MASK              0x03800000
4467
#define PCIE_DLL_DATA_LINK_STATUS_PHY_LINK_STATE_ALIGN             0
4468
#define PCIE_DLL_DATA_LINK_STATUS_PHY_LINK_STATE_BITS              3
4469
#define PCIE_DLL_DATA_LINK_STATUS_PHY_LINK_STATE_SHIFT             23
4470
4471
/* PCIE_DLL :: DATA_LINK_STATUS :: POWER_MANAGEMENT_STATE [22:19] */
4472
#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_STATE_MASK      0x00780000
4473
#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_STATE_ALIGN     0
4474
#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_STATE_BITS      4
4475
#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_STATE_SHIFT     19
4476
4477
/* PCIE_DLL :: DATA_LINK_STATUS :: POWER_MANAGEMENT_SUB_STATE [18:17] */
4478
#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_SUB_STATE_MASK  0x00060000
4479
#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_SUB_STATE_ALIGN 0
4480
#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_SUB_STATE_BITS  2
4481
#define PCIE_DLL_DATA_LINK_STATUS_POWER_MANAGEMENT_SUB_STATE_SHIFT 17
4482
4483
/* PCIE_DLL :: DATA_LINK_STATUS :: DATA_LINK_UP [16:16] */
4484
#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_UP_MASK                0x00010000
4485
#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_UP_ALIGN               0
4486
#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_UP_BITS                1
4487
#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_UP_SHIFT               16
4488
4489
/* PCIE_DLL :: DATA_LINK_STATUS :: RESERVED_1 [15:11] */
4490
#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_1_MASK                  0x0000f800
4491
#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_1_ALIGN                 0
4492
#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_1_BITS                  5
4493
#define PCIE_DLL_DATA_LINK_STATUS_RESERVED_1_SHIFT                 11
4494
4495
/* PCIE_DLL :: DATA_LINK_STATUS :: PME_TURN_OFF_STATUS_IN_D0 [10:10] */
4496
#define PCIE_DLL_DATA_LINK_STATUS_PME_TURN_OFF_STATUS_IN_D0_MASK   0x00000400
4497
#define PCIE_DLL_DATA_LINK_STATUS_PME_TURN_OFF_STATUS_IN_D0_ALIGN  0
4498
#define PCIE_DLL_DATA_LINK_STATUS_PME_TURN_OFF_STATUS_IN_D0_BITS   1
4499
#define PCIE_DLL_DATA_LINK_STATUS_PME_TURN_OFF_STATUS_IN_D0_SHIFT  10
4500
4501
/* PCIE_DLL :: DATA_LINK_STATUS :: FLOW_CONTROL_UPDATE_TIMEOUT [09:09] */
4502
#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_UPDATE_TIMEOUT_MASK 0x00000200
4503
#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_UPDATE_TIMEOUT_ALIGN 0
4504
#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_UPDATE_TIMEOUT_BITS 1
4505
#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_UPDATE_TIMEOUT_SHIFT 9
4506
4507
/* PCIE_DLL :: DATA_LINK_STATUS :: FLOW_CONTROL_RECEIVE_OVERFLOW [08:08] */
4508
#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_RECEIVE_OVERFLOW_MASK 0x00000100
4509
#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_RECEIVE_OVERFLOW_ALIGN 0
4510
#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_RECEIVE_OVERFLOW_BITS 1
4511
#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_RECEIVE_OVERFLOW_SHIFT 8
4512
4513
/* PCIE_DLL :: DATA_LINK_STATUS :: FLOW_CONTROL_PROTOCOL_ERROR [07:07] */
4514
#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_MASK 0x00000080
4515
#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_ALIGN 0
4516
#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_BITS 1
4517
#define PCIE_DLL_DATA_LINK_STATUS_FLOW_CONTROL_PROTOCOL_ERROR_SHIFT 7
4518
4519
/* PCIE_DLL :: DATA_LINK_STATUS :: DATA_LINK_PROTOCOL_ERROR [06:06] */
4520
#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_PROTOCOL_ERROR_MASK    0x00000040
4521
#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_PROTOCOL_ERROR_ALIGN   0
4522
#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_PROTOCOL_ERROR_BITS    1
4523
#define PCIE_DLL_DATA_LINK_STATUS_DATA_LINK_PROTOCOL_ERROR_SHIFT   6
4524
4525
/* PCIE_DLL :: DATA_LINK_STATUS :: REPLAY_ROLLOVER [05:05] */
4526
#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_ROLLOVER_MASK             0x00000020
4527
#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_ROLLOVER_ALIGN            0
4528
#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_ROLLOVER_BITS             1
4529
#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_ROLLOVER_SHIFT            5
4530
4531
/* PCIE_DLL :: DATA_LINK_STATUS :: REPLAY_TIMEOUT [04:04] */
4532
#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_TIMEOUT_MASK              0x00000010
4533
#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_TIMEOUT_ALIGN             0
4534
#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_TIMEOUT_BITS              1
4535
#define PCIE_DLL_DATA_LINK_STATUS_REPLAY_TIMEOUT_SHIFT             4
4536
4537
/* PCIE_DLL :: DATA_LINK_STATUS :: NAK_RECEIVED [03:03] */
4538
#define PCIE_DLL_DATA_LINK_STATUS_NAK_RECEIVED_MASK                0x00000008
4539
#define PCIE_DLL_DATA_LINK_STATUS_NAK_RECEIVED_ALIGN               0
4540
#define PCIE_DLL_DATA_LINK_STATUS_NAK_RECEIVED_BITS                1
4541
#define PCIE_DLL_DATA_LINK_STATUS_NAK_RECEIVED_SHIFT               3
4542
4543
/* PCIE_DLL :: DATA_LINK_STATUS :: DLLP_ERROR [02:02] */
4544
#define PCIE_DLL_DATA_LINK_STATUS_DLLP_ERROR_MASK                  0x00000004
4545
#define PCIE_DLL_DATA_LINK_STATUS_DLLP_ERROR_ALIGN                 0
4546
#define PCIE_DLL_DATA_LINK_STATUS_DLLP_ERROR_BITS                  1
4547
#define PCIE_DLL_DATA_LINK_STATUS_DLLP_ERROR_SHIFT                 2
4548
4549
/* PCIE_DLL :: DATA_LINK_STATUS :: BAD_TLP_SEQUENCE_NUMBER [01:01] */
4550
#define PCIE_DLL_DATA_LINK_STATUS_BAD_TLP_SEQUENCE_NUMBER_MASK     0x00000002
4551
#define PCIE_DLL_DATA_LINK_STATUS_BAD_TLP_SEQUENCE_NUMBER_ALIGN    0
4552
#define PCIE_DLL_DATA_LINK_STATUS_BAD_TLP_SEQUENCE_NUMBER_BITS     1
4553
#define PCIE_DLL_DATA_LINK_STATUS_BAD_TLP_SEQUENCE_NUMBER_SHIFT    1
4554
4555
/* PCIE_DLL :: DATA_LINK_STATUS :: TLP_ERROR [00:00] */
4556
#define PCIE_DLL_DATA_LINK_STATUS_TLP_ERROR_MASK                   0x00000001
4557
#define PCIE_DLL_DATA_LINK_STATUS_TLP_ERROR_ALIGN                  0
4558
#define PCIE_DLL_DATA_LINK_STATUS_TLP_ERROR_BITS                   1
4559
#define PCIE_DLL_DATA_LINK_STATUS_TLP_ERROR_SHIFT                  0
4560
4561
4562
/****************************************************************************
4563
 * PCIE_DLL :: DATA_LINK_ATTENTION
4564
 ***************************************************************************/
4565
/* PCIE_DLL :: DATA_LINK_ATTENTION :: RESERVED_0 [31:06] */
4566
#define PCIE_DLL_DATA_LINK_ATTENTION_RESERVED_0_MASK               0xffffffc0
4567
#define PCIE_DLL_DATA_LINK_ATTENTION_RESERVED_0_ALIGN              0
4568
#define PCIE_DLL_DATA_LINK_ATTENTION_RESERVED_0_BITS               26
4569
#define PCIE_DLL_DATA_LINK_ATTENTION_RESERVED_0_SHIFT              6
4570
4571
/* PCIE_DLL :: DATA_LINK_ATTENTION :: DATA_LINK_LAYER_PACKET_TEST_INDICATOR [05:05] */
4572
#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_PACKET_TEST_INDICATOR_MASK 0x00000020
4573
#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_PACKET_TEST_INDICATOR_ALIGN 0
4574
#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_PACKET_TEST_INDICATOR_BITS 1
4575
#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_PACKET_TEST_INDICATOR_SHIFT 5
4576
4577
/* PCIE_DLL :: DATA_LINK_ATTENTION :: DATA_LINK_LAYER_ERROR_ATTENTION_INDICATOR [04:04] */
4578
#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_ERROR_ATTENTION_INDICATOR_MASK 0x00000010
4579
#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_ERROR_ATTENTION_INDICATOR_ALIGN 0
4580
#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_ERROR_ATTENTION_INDICATOR_BITS 1
4581
#define PCIE_DLL_DATA_LINK_ATTENTION_DATA_LINK_LAYER_ERROR_ATTENTION_INDICATOR_SHIFT 4
4582
4583
/* PCIE_DLL :: DATA_LINK_ATTENTION :: NAK_RECEIVED_COUNTER_ATTENTION_INDICATOR [03:03] */
4584
#define PCIE_DLL_DATA_LINK_ATTENTION_NAK_RECEIVED_COUNTER_ATTENTION_INDICATOR_MASK 0x00000008
4585
#define PCIE_DLL_DATA_LINK_ATTENTION_NAK_RECEIVED_COUNTER_ATTENTION_INDICATOR_ALIGN 0
4586
#define PCIE_DLL_DATA_LINK_ATTENTION_NAK_RECEIVED_COUNTER_ATTENTION_INDICATOR_BITS 1
4587
#define PCIE_DLL_DATA_LINK_ATTENTION_NAK_RECEIVED_COUNTER_ATTENTION_INDICATOR_SHIFT 3
4588
4589
/* PCIE_DLL :: DATA_LINK_ATTENTION :: DLLP_ERROR_COUNTER_ATTENTION_INDICATOR [02:02] */
4590
#define PCIE_DLL_DATA_LINK_ATTENTION_DLLP_ERROR_COUNTER_ATTENTION_INDICATOR_MASK 0x00000004
4591
#define PCIE_DLL_DATA_LINK_ATTENTION_DLLP_ERROR_COUNTER_ATTENTION_INDICATOR_ALIGN 0
4592
#define PCIE_DLL_DATA_LINK_ATTENTION_DLLP_ERROR_COUNTER_ATTENTION_INDICATOR_BITS 1
4593
#define PCIE_DLL_DATA_LINK_ATTENTION_DLLP_ERROR_COUNTER_ATTENTION_INDICATOR_SHIFT 2
4594
4595
/* PCIE_DLL :: DATA_LINK_ATTENTION :: TLP_BAD_SEQUENCE_COUNTER_ATTENTION_INDICATOR [01:01] */
4596
#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_INDICATOR_MASK 0x00000002
4597
#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_INDICATOR_ALIGN 0
4598
#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_INDICATOR_BITS 1
4599
#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_INDICATOR_SHIFT 1
4600
4601
/* PCIE_DLL :: DATA_LINK_ATTENTION :: TLP_ERROR_COUNTER_ATTENTION_INDICATOR [00:00] */
4602
#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_ERROR_COUNTER_ATTENTION_INDICATOR_MASK 0x00000001
4603
#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_ERROR_COUNTER_ATTENTION_INDICATOR_ALIGN 0
4604
#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_ERROR_COUNTER_ATTENTION_INDICATOR_BITS 1
4605
#define PCIE_DLL_DATA_LINK_ATTENTION_TLP_ERROR_COUNTER_ATTENTION_INDICATOR_SHIFT 0
4606
4607
4608
/****************************************************************************
4609
 * PCIE_DLL :: DATA_LINK_ATTENTION_MASK
4610
 ***************************************************************************/
4611
/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: RESERVED_0 [31:08] */
4612
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_RESERVED_0_MASK          0xffffff00
4613
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_RESERVED_0_ALIGN         0
4614
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_RESERVED_0_BITS          24
4615
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_RESERVED_0_SHIFT         8
4616
4617
/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: UNUSED_0 [07:06] */
4618
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_UNUSED_0_MASK            0x000000c0
4619
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_UNUSED_0_ALIGN           0
4620
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_UNUSED_0_BITS            2
4621
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_UNUSED_0_SHIFT           6
4622
4623
/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: DATA_LINK_LAYER_PACKET_TEST_ATTENTION_MASK [05:05] */
4624
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_PACKET_TEST_ATTENTION_MASK_MASK 0x00000020
4625
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_PACKET_TEST_ATTENTION_MASK_ALIGN 0
4626
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_PACKET_TEST_ATTENTION_MASK_BITS 1
4627
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_PACKET_TEST_ATTENTION_MASK_SHIFT 5
4628
4629
/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: DATA_LINK_LAYER_ERROR_ATTENTION_MASK [04:04] */
4630
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_ERROR_ATTENTION_MASK_MASK 0x00000010
4631
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_ERROR_ATTENTION_MASK_ALIGN 0
4632
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_ERROR_ATTENTION_MASK_BITS 1
4633
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DATA_LINK_LAYER_ERROR_ATTENTION_MASK_SHIFT 4
4634
4635
/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: NAK_RECEIVED_COUNTER_ATTENTION_MASK [03:03] */
4636
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_NAK_RECEIVED_COUNTER_ATTENTION_MASK_MASK 0x00000008
4637
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_NAK_RECEIVED_COUNTER_ATTENTION_MASK_ALIGN 0
4638
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_NAK_RECEIVED_COUNTER_ATTENTION_MASK_BITS 1
4639
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_NAK_RECEIVED_COUNTER_ATTENTION_MASK_SHIFT 3
4640
4641
/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: DLLP_ERROR_COUNTER_ATTENTION_MASK [02:02] */
4642
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DLLP_ERROR_COUNTER_ATTENTION_MASK_MASK 0x00000004
4643
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DLLP_ERROR_COUNTER_ATTENTION_MASK_ALIGN 0
4644
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DLLP_ERROR_COUNTER_ATTENTION_MASK_BITS 1
4645
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_DLLP_ERROR_COUNTER_ATTENTION_MASK_SHIFT 2
4646
4647
/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: TLP_BAD_SEQUENCE_COUNTER_ATTENTION_MASK [01:01] */
4648
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_MASK_MASK 0x00000002
4649
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_MASK_ALIGN 0
4650
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_MASK_BITS 1
4651
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_BAD_SEQUENCE_COUNTER_ATTENTION_MASK_SHIFT 1
4652
4653
/* PCIE_DLL :: DATA_LINK_ATTENTION_MASK :: TLP_ERROR_COUNTER_ATTENTION_MASK [00:00] */
4654
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_ERROR_COUNTER_ATTENTION_MASK_MASK 0x00000001
4655
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_ERROR_COUNTER_ATTENTION_MASK_ALIGN 0
4656
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_ERROR_COUNTER_ATTENTION_MASK_BITS 1
4657
#define PCIE_DLL_DATA_LINK_ATTENTION_MASK_TLP_ERROR_COUNTER_ATTENTION_MASK_SHIFT 0
4658
4659
4660
/****************************************************************************
4661
 * PCIE_DLL :: NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG
4662
 ***************************************************************************/
4663
/* PCIE_DLL :: NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG :: RESERVED_0 [31:12] */
4664
#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_MASK 0xfffff000
4665
#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_ALIGN 0
4666
#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_BITS 20
4667
#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_SHIFT 12
4668
4669
/* PCIE_DLL :: NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG :: NEXT_TRANSMIT_SEQUENCE_NUMBER [11:00] */
4670
#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_NEXT_TRANSMIT_SEQUENCE_NUMBER_MASK 0x00000fff
4671
#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_NEXT_TRANSMIT_SEQUENCE_NUMBER_ALIGN 0
4672
#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_NEXT_TRANSMIT_SEQUENCE_NUMBER_BITS 12
4673
#define PCIE_DLL_NEXT_TRANSMIT_SEQUENCE_NUMBER_DEBUG_NEXT_TRANSMIT_SEQUENCE_NUMBER_SHIFT 0
4674
4675
4676
/****************************************************************************
4677
 * PCIE_DLL :: ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG
4678
 ***************************************************************************/
4679
/* PCIE_DLL :: ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG :: RESERVED_0 [31:12] */
4680
#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_MASK 0xfffff000
4681
#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_ALIGN 0
4682
#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_BITS 20
4683
#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_SHIFT 12
4684
4685
/* PCIE_DLL :: ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG :: ACK_ED_TRANSMIT_SEQUENCE_NUMBER [11:00] */
4686
#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_MASK 0x00000fff
4687
#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_ALIGN 0
4688
#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_BITS 12
4689
#define PCIE_DLL_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_ACK_ED_TRANSMIT_SEQUENCE_NUMBER_SHIFT 0
4690
4691
4692
/****************************************************************************
4693
 * PCIE_DLL :: PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG
4694
 ***************************************************************************/
4695
/* PCIE_DLL :: PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG :: RESERVED_0 [31:12] */
4696
#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_MASK 0xfffff000
4697
#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_ALIGN 0
4698
#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_BITS 20
4699
#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_RESERVED_0_SHIFT 12
4700
4701
/* PCIE_DLL :: PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG :: PURGED_TRANSMIT_SEQUENCE_NUMBER [11:00] */
4702
#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_PURGED_TRANSMIT_SEQUENCE_NUMBER_MASK 0x00000fff
4703
#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_PURGED_TRANSMIT_SEQUENCE_NUMBER_ALIGN 0
4704
#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_PURGED_TRANSMIT_SEQUENCE_NUMBER_BITS 12
4705
#define PCIE_DLL_PURGED_TRANSMIT_SEQUENCE_NUMBER_DEBUG_PURGED_TRANSMIT_SEQUENCE_NUMBER_SHIFT 0
4706
4707
4708
/****************************************************************************
4709
 * PCIE_DLL :: RECEIVE_SEQUENCE_NUMBER_DEBUG
4710
 ***************************************************************************/
4711
/* PCIE_DLL :: RECEIVE_SEQUENCE_NUMBER_DEBUG :: RESERVED_0 [31:12] */
4712
#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RESERVED_0_MASK     0xfffff000
4713
#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RESERVED_0_ALIGN    0
4714
#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RESERVED_0_BITS     20
4715
#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RESERVED_0_SHIFT    12
4716
4717
/* PCIE_DLL :: RECEIVE_SEQUENCE_NUMBER_DEBUG :: RECEIVE_SEQUENCE_NUMBER [11:00] */
4718
#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RECEIVE_SEQUENCE_NUMBER_MASK 0x00000fff
4719
#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RECEIVE_SEQUENCE_NUMBER_ALIGN 0
4720
#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RECEIVE_SEQUENCE_NUMBER_BITS 12
4721
#define PCIE_DLL_RECEIVE_SEQUENCE_NUMBER_DEBUG_RECEIVE_SEQUENCE_NUMBER_SHIFT 0
4722
4723
4724
/****************************************************************************
4725
 * PCIE_DLL :: DATA_LINK_REPLAY
4726
 ***************************************************************************/
4727
/* PCIE_DLL :: DATA_LINK_REPLAY :: RESERVED_0 [31:23] */
4728
#define PCIE_DLL_DATA_LINK_REPLAY_RESERVED_0_MASK                  0xff800000
4729
#define PCIE_DLL_DATA_LINK_REPLAY_RESERVED_0_ALIGN                 0
4730
#define PCIE_DLL_DATA_LINK_REPLAY_RESERVED_0_BITS                  9
4731
#define PCIE_DLL_DATA_LINK_REPLAY_RESERVED_0_SHIFT                 23
4732
4733
/* PCIE_DLL :: DATA_LINK_REPLAY :: REPLAY_TIMEOUT_VALUE [22:10] */
4734
#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_TIMEOUT_VALUE_MASK        0x007ffc00
4735
#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_TIMEOUT_VALUE_ALIGN       0
4736
#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_TIMEOUT_VALUE_BITS        13
4737
#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_TIMEOUT_VALUE_SHIFT       10
4738
4739
/* PCIE_DLL :: DATA_LINK_REPLAY :: REPLAY_BUFFER_SIZE [09:00] */
4740
#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_BUFFER_SIZE_MASK          0x000003ff
4741
#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_BUFFER_SIZE_ALIGN         0
4742
#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_BUFFER_SIZE_BITS          10
4743
#define PCIE_DLL_DATA_LINK_REPLAY_REPLAY_BUFFER_SIZE_SHIFT         0
4744
4745
4746
/****************************************************************************
4747
 * PCIE_DLL :: DATA_LINK_ACK_TIMEOUT
4748
 ***************************************************************************/
4749
/* PCIE_DLL :: DATA_LINK_ACK_TIMEOUT :: RESERVED_0 [31:11] */
4750
#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_RESERVED_0_MASK             0xfffff800
4751
#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_RESERVED_0_ALIGN            0
4752
#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_RESERVED_0_BITS             21
4753
#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_RESERVED_0_SHIFT            11
4754
4755
/* PCIE_DLL :: DATA_LINK_ACK_TIMEOUT :: ACK_LATENCY_TIMEOUT_VALUE [10:00] */
4756
#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_ACK_LATENCY_TIMEOUT_VALUE_MASK 0x000007ff
4757
#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_ACK_LATENCY_TIMEOUT_VALUE_ALIGN 0
4758
#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_ACK_LATENCY_TIMEOUT_VALUE_BITS 11
4759
#define PCIE_DLL_DATA_LINK_ACK_TIMEOUT_ACK_LATENCY_TIMEOUT_VALUE_SHIFT 0
4760
4761
4762
/****************************************************************************
4763
 * PCIE_DLL :: POWER_MANAGEMENT_THRESHOLD
4764
 ***************************************************************************/
4765
/* PCIE_DLL :: POWER_MANAGEMENT_THRESHOLD :: RESERVED_0 [31:24] */
4766
#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_RESERVED_0_MASK        0xff000000
4767
#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_RESERVED_0_ALIGN       0
4768
#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_RESERVED_0_BITS        8
4769
#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_RESERVED_0_SHIFT       24
4770
4771
/* PCIE_DLL :: POWER_MANAGEMENT_THRESHOLD :: L0_STAY_TIME [23:20] */
4772
#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0_STAY_TIME_MASK      0x00f00000
4773
#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0_STAY_TIME_ALIGN     0
4774
#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0_STAY_TIME_BITS      4
4775
#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0_STAY_TIME_SHIFT     20
4776
4777
/* PCIE_DLL :: POWER_MANAGEMENT_THRESHOLD :: L1_STAY_TIME [19:16] */
4778
#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_STAY_TIME_MASK      0x000f0000
4779
#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_STAY_TIME_ALIGN     0
4780
#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_STAY_TIME_BITS      4
4781
#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_STAY_TIME_SHIFT     16
4782
4783
/* PCIE_DLL :: POWER_MANAGEMENT_THRESHOLD :: L1_THRESHOLD [15:08] */
4784
#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_THRESHOLD_MASK      0x0000ff00
4785
#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_THRESHOLD_ALIGN     0
4786
#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_THRESHOLD_BITS      8
4787
#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L1_THRESHOLD_SHIFT     8
4788
4789
/* PCIE_DLL :: POWER_MANAGEMENT_THRESHOLD :: L0S_THRESHOLD [07:00] */
4790
#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0S_THRESHOLD_MASK     0x000000ff
4791
#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0S_THRESHOLD_ALIGN    0
4792
#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0S_THRESHOLD_BITS     8
4793
#define PCIE_DLL_POWER_MANAGEMENT_THRESHOLD_L0S_THRESHOLD_SHIFT    0
4794
4795
4796
/****************************************************************************
4797
 * PCIE_DLL :: RETRY_BUFFER_WRITE_POINTER_DEBUG
4798
 ***************************************************************************/
4799
/* PCIE_DLL :: RETRY_BUFFER_WRITE_POINTER_DEBUG :: RESERVED_0 [31:11] */
4800
#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RESERVED_0_MASK  0xfffff800
4801
#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RESERVED_0_ALIGN 0
4802
#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RESERVED_0_BITS  21
4803
#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RESERVED_0_SHIFT 11
4804
4805
/* PCIE_DLL :: RETRY_BUFFER_WRITE_POINTER_DEBUG :: RETRY_BUFFER_WRITE_POINTER [10:00] */
4806
#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RETRY_BUFFER_WRITE_POINTER_MASK 0x000007ff
4807
#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RETRY_BUFFER_WRITE_POINTER_ALIGN 0
4808
#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RETRY_BUFFER_WRITE_POINTER_BITS 11
4809
#define PCIE_DLL_RETRY_BUFFER_WRITE_POINTER_DEBUG_RETRY_BUFFER_WRITE_POINTER_SHIFT 0
4810
4811
4812
/****************************************************************************
4813
 * PCIE_DLL :: RETRY_BUFFER_READ_POINTER_DEBUG
4814
 ***************************************************************************/
4815
/* PCIE_DLL :: RETRY_BUFFER_READ_POINTER_DEBUG :: RESERVED_0 [31:11] */
4816
#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RESERVED_0_MASK   0xfffff800
4817
#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RESERVED_0_ALIGN  0
4818
#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RESERVED_0_BITS   21
4819
#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RESERVED_0_SHIFT  11
4820
4821
/* PCIE_DLL :: RETRY_BUFFER_READ_POINTER_DEBUG :: RETRY_BUFFER_READ_POINTER [10:00] */
4822
#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RETRY_BUFFER_READ_POINTER_MASK 0x000007ff
4823
#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RETRY_BUFFER_READ_POINTER_ALIGN 0
4824
#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RETRY_BUFFER_READ_POINTER_BITS 11
4825
#define PCIE_DLL_RETRY_BUFFER_READ_POINTER_DEBUG_RETRY_BUFFER_READ_POINTER_SHIFT 0
4826
4827
4828
/****************************************************************************
4829
 * PCIE_DLL :: RETRY_BUFFER_PURGED_POINTER_DEBUG
4830
 ***************************************************************************/
4831
/* PCIE_DLL :: RETRY_BUFFER_PURGED_POINTER_DEBUG :: RESERVED_0 [31:11] */
4832
#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RESERVED_0_MASK 0xfffff800
4833
#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RESERVED_0_ALIGN 0
4834
#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RESERVED_0_BITS 21
4835
#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RESERVED_0_SHIFT 11
4836
4837
/* PCIE_DLL :: RETRY_BUFFER_PURGED_POINTER_DEBUG :: RETRY_BUFFER_PURGED_POINTER [10:00] */
4838
#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RETRY_BUFFER_PURGED_POINTER_MASK 0x000007ff
4839
#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RETRY_BUFFER_PURGED_POINTER_ALIGN 0
4840
#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RETRY_BUFFER_PURGED_POINTER_BITS 11
4841
#define PCIE_DLL_RETRY_BUFFER_PURGED_POINTER_DEBUG_RETRY_BUFFER_PURGED_POINTER_SHIFT 0
4842
4843
4844
/****************************************************************************
4845
 * PCIE_DLL :: RETRY_BUFFER_READ_WRITE_DEBUG_PORT
4846
 ***************************************************************************/
4847
/* PCIE_DLL :: RETRY_BUFFER_READ_WRITE_DEBUG_PORT :: RETRY_BUFFER_DATA [31:00] */
4848
#define PCIE_DLL_RETRY_BUFFER_READ_WRITE_DEBUG_PORT_RETRY_BUFFER_DATA_MASK 0xffffffff
4849
#define PCIE_DLL_RETRY_BUFFER_READ_WRITE_DEBUG_PORT_RETRY_BUFFER_DATA_ALIGN 0
4850
#define PCIE_DLL_RETRY_BUFFER_READ_WRITE_DEBUG_PORT_RETRY_BUFFER_DATA_BITS 32
4851
#define PCIE_DLL_RETRY_BUFFER_READ_WRITE_DEBUG_PORT_RETRY_BUFFER_DATA_SHIFT 0
4852
4853
4854
/****************************************************************************
4855
 * PCIE_DLL :: ERROR_COUNT_THRESHOLD
4856
 ***************************************************************************/
4857
/* PCIE_DLL :: ERROR_COUNT_THRESHOLD :: RESERVED_0 [31:15] */
4858
#define PCIE_DLL_ERROR_COUNT_THRESHOLD_RESERVED_0_MASK             0xffff8000
4859
#define PCIE_DLL_ERROR_COUNT_THRESHOLD_RESERVED_0_ALIGN            0
4860
#define PCIE_DLL_ERROR_COUNT_THRESHOLD_RESERVED_0_BITS             17
4861
#define PCIE_DLL_ERROR_COUNT_THRESHOLD_RESERVED_0_SHIFT            15
4862
4863
/* PCIE_DLL :: ERROR_COUNT_THRESHOLD :: BAD_SEQUENCE_NUMBER_COUNT_THRESHOLD [14:12] */
4864
#define PCIE_DLL_ERROR_COUNT_THRESHOLD_BAD_SEQUENCE_NUMBER_COUNT_THRESHOLD_MASK 0x00007000
4865
#define PCIE_DLL_ERROR_COUNT_THRESHOLD_BAD_SEQUENCE_NUMBER_COUNT_THRESHOLD_ALIGN 0
4866
#define PCIE_DLL_ERROR_COUNT_THRESHOLD_BAD_SEQUENCE_NUMBER_COUNT_THRESHOLD_BITS 3
4867
#define PCIE_DLL_ERROR_COUNT_THRESHOLD_BAD_SEQUENCE_NUMBER_COUNT_THRESHOLD_SHIFT 12
4868
4869
/* PCIE_DLL :: ERROR_COUNT_THRESHOLD :: NAK_RECEIVED_COUNT_THRESHOLD [11:08] */
4870
#define PCIE_DLL_ERROR_COUNT_THRESHOLD_NAK_RECEIVED_COUNT_THRESHOLD_MASK 0x00000f00
4871
#define PCIE_DLL_ERROR_COUNT_THRESHOLD_NAK_RECEIVED_COUNT_THRESHOLD_ALIGN 0
4872
#define PCIE_DLL_ERROR_COUNT_THRESHOLD_NAK_RECEIVED_COUNT_THRESHOLD_BITS 4
4873
#define PCIE_DLL_ERROR_COUNT_THRESHOLD_NAK_RECEIVED_COUNT_THRESHOLD_SHIFT 8
4874
4875
/* PCIE_DLL :: ERROR_COUNT_THRESHOLD :: DLLP_ERROR_COUNT_THRESHOLD [07:04] */
4876
#define PCIE_DLL_ERROR_COUNT_THRESHOLD_DLLP_ERROR_COUNT_THRESHOLD_MASK 0x000000f0
4877
#define PCIE_DLL_ERROR_COUNT_THRESHOLD_DLLP_ERROR_COUNT_THRESHOLD_ALIGN 0
4878
#define PCIE_DLL_ERROR_COUNT_THRESHOLD_DLLP_ERROR_COUNT_THRESHOLD_BITS 4
4879
#define PCIE_DLL_ERROR_COUNT_THRESHOLD_DLLP_ERROR_COUNT_THRESHOLD_SHIFT 4
4880
4881
/* PCIE_DLL :: ERROR_COUNT_THRESHOLD :: TLP_ERROR_COUNT_THRESHOLD [03:00] */
4882
#define PCIE_DLL_ERROR_COUNT_THRESHOLD_TLP_ERROR_COUNT_THRESHOLD_MASK 0x0000000f
4883
#define PCIE_DLL_ERROR_COUNT_THRESHOLD_TLP_ERROR_COUNT_THRESHOLD_ALIGN 0
4884
#define PCIE_DLL_ERROR_COUNT_THRESHOLD_TLP_ERROR_COUNT_THRESHOLD_BITS 4
4885
#define PCIE_DLL_ERROR_COUNT_THRESHOLD_TLP_ERROR_COUNT_THRESHOLD_SHIFT 0
4886
4887
4888
/****************************************************************************
4889
 * PCIE_DLL :: TL_ERROR_COUNTER
4890
 ***************************************************************************/
4891
/* PCIE_DLL :: TL_ERROR_COUNTER :: RESERVED_0 [31:24] */
4892
#define PCIE_DLL_TL_ERROR_COUNTER_RESERVED_0_MASK                  0xff000000
4893
#define PCIE_DLL_TL_ERROR_COUNTER_RESERVED_0_ALIGN                 0
4894
#define PCIE_DLL_TL_ERROR_COUNTER_RESERVED_0_BITS                  8
4895
#define PCIE_DLL_TL_ERROR_COUNTER_RESERVED_0_SHIFT                 24
4896
4897
/* PCIE_DLL :: TL_ERROR_COUNTER :: TLP_BAD_SEQUENCE_NUMBER_COUNTER [23:16] */
4898
#define PCIE_DLL_TL_ERROR_COUNTER_TLP_BAD_SEQUENCE_NUMBER_COUNTER_MASK 0x00ff0000
4899
#define PCIE_DLL_TL_ERROR_COUNTER_TLP_BAD_SEQUENCE_NUMBER_COUNTER_ALIGN 0
4900
#define PCIE_DLL_TL_ERROR_COUNTER_TLP_BAD_SEQUENCE_NUMBER_COUNTER_BITS 8
4901
#define PCIE_DLL_TL_ERROR_COUNTER_TLP_BAD_SEQUENCE_NUMBER_COUNTER_SHIFT 16
4902
4903
/* PCIE_DLL :: TL_ERROR_COUNTER :: TLP_ERROR_COUNTER [15:00] */
4904
#define PCIE_DLL_TL_ERROR_COUNTER_TLP_ERROR_COUNTER_MASK           0x0000ffff
4905
#define PCIE_DLL_TL_ERROR_COUNTER_TLP_ERROR_COUNTER_ALIGN          0
4906
#define PCIE_DLL_TL_ERROR_COUNTER_TLP_ERROR_COUNTER_BITS           16
4907
#define PCIE_DLL_TL_ERROR_COUNTER_TLP_ERROR_COUNTER_SHIFT          0
4908
4909
4910
/****************************************************************************
4911
 * PCIE_DLL :: DLLP_ERROR_COUNTER
4912
 ***************************************************************************/
4913
/* PCIE_DLL :: DLLP_ERROR_COUNTER :: RESERVED_0 [31:16] */
4914
#define PCIE_DLL_DLLP_ERROR_COUNTER_RESERVED_0_MASK                0xffff0000
4915
#define PCIE_DLL_DLLP_ERROR_COUNTER_RESERVED_0_ALIGN               0
4916
#define PCIE_DLL_DLLP_ERROR_COUNTER_RESERVED_0_BITS                16
4917
#define PCIE_DLL_DLLP_ERROR_COUNTER_RESERVED_0_SHIFT               16
4918
4919
/* PCIE_DLL :: DLLP_ERROR_COUNTER :: DLLP_ERROR_COUNTER [15:00] */
4920
#define PCIE_DLL_DLLP_ERROR_COUNTER_DLLP_ERROR_COUNTER_MASK        0x0000ffff
4921
#define PCIE_DLL_DLLP_ERROR_COUNTER_DLLP_ERROR_COUNTER_ALIGN       0
4922
#define PCIE_DLL_DLLP_ERROR_COUNTER_DLLP_ERROR_COUNTER_BITS        16
4923
#define PCIE_DLL_DLLP_ERROR_COUNTER_DLLP_ERROR_COUNTER_SHIFT       0
4924
4925
4926
/****************************************************************************
4927
 * PCIE_DLL :: NAK_RECEIVED_COUNTER
4928
 ***************************************************************************/
4929
/* PCIE_DLL :: NAK_RECEIVED_COUNTER :: RESERVED_0 [31:16] */
4930
#define PCIE_DLL_NAK_RECEIVED_COUNTER_RESERVED_0_MASK              0xffff0000
4931
#define PCIE_DLL_NAK_RECEIVED_COUNTER_RESERVED_0_ALIGN             0
4932
#define PCIE_DLL_NAK_RECEIVED_COUNTER_RESERVED_0_BITS              16
4933
#define PCIE_DLL_NAK_RECEIVED_COUNTER_RESERVED_0_SHIFT             16
4934
4935
/* PCIE_DLL :: NAK_RECEIVED_COUNTER :: NAK_RECEIVED_COUNTER [15:00] */
4936
#define PCIE_DLL_NAK_RECEIVED_COUNTER_NAK_RECEIVED_COUNTER_MASK    0x0000ffff
4937
#define PCIE_DLL_NAK_RECEIVED_COUNTER_NAK_RECEIVED_COUNTER_ALIGN   0
4938
#define PCIE_DLL_NAK_RECEIVED_COUNTER_NAK_RECEIVED_COUNTER_BITS    16
4939
#define PCIE_DLL_NAK_RECEIVED_COUNTER_NAK_RECEIVED_COUNTER_SHIFT   0
4940
4941
4942
/****************************************************************************
4943
 * PCIE_DLL :: DATA_LINK_TEST
4944
 ***************************************************************************/
4945
/* PCIE_DLL :: DATA_LINK_TEST :: RESERVED_0 [31:16] */
4946
#define PCIE_DLL_DATA_LINK_TEST_RESERVED_0_MASK                    0xffff0000
4947
#define PCIE_DLL_DATA_LINK_TEST_RESERVED_0_ALIGN                   0
4948
#define PCIE_DLL_DATA_LINK_TEST_RESERVED_0_BITS                    16
4949
#define PCIE_DLL_DATA_LINK_TEST_RESERVED_0_SHIFT                   16
4950
4951
/* PCIE_DLL :: DATA_LINK_TEST :: STORE_RECEIVE_TLPS [15:15] */
4952
#define PCIE_DLL_DATA_LINK_TEST_STORE_RECEIVE_TLPS_MASK            0x00008000
4953
#define PCIE_DLL_DATA_LINK_TEST_STORE_RECEIVE_TLPS_ALIGN           0
4954
#define PCIE_DLL_DATA_LINK_TEST_STORE_RECEIVE_TLPS_BITS            1
4955
#define PCIE_DLL_DATA_LINK_TEST_STORE_RECEIVE_TLPS_SHIFT           15
4956
4957
/* PCIE_DLL :: DATA_LINK_TEST :: DISABLE_TLPS [14:14] */
4958
#define PCIE_DLL_DATA_LINK_TEST_DISABLE_TLPS_MASK                  0x00004000
4959
#define PCIE_DLL_DATA_LINK_TEST_DISABLE_TLPS_ALIGN                 0
4960
#define PCIE_DLL_DATA_LINK_TEST_DISABLE_TLPS_BITS                  1
4961
#define PCIE_DLL_DATA_LINK_TEST_DISABLE_TLPS_SHIFT                 14
4962
4963
/* PCIE_DLL :: DATA_LINK_TEST :: DISABLE_DLLPS [13:13] */
4964
#define PCIE_DLL_DATA_LINK_TEST_DISABLE_DLLPS_MASK                 0x00002000
4965
#define PCIE_DLL_DATA_LINK_TEST_DISABLE_DLLPS_ALIGN                0
4966
#define PCIE_DLL_DATA_LINK_TEST_DISABLE_DLLPS_BITS                 1
4967
#define PCIE_DLL_DATA_LINK_TEST_DISABLE_DLLPS_SHIFT                13
4968
4969
/* PCIE_DLL :: DATA_LINK_TEST :: FORCE_PHY_LINK_UP [12:12] */
4970
#define PCIE_DLL_DATA_LINK_TEST_FORCE_PHY_LINK_UP_MASK             0x00001000
4971
#define PCIE_DLL_DATA_LINK_TEST_FORCE_PHY_LINK_UP_ALIGN            0
4972
#define PCIE_DLL_DATA_LINK_TEST_FORCE_PHY_LINK_UP_BITS             1
4973
#define PCIE_DLL_DATA_LINK_TEST_FORCE_PHY_LINK_UP_SHIFT            12
4974
4975
/* PCIE_DLL :: DATA_LINK_TEST :: BYPASS_FLOW_CONTROL [11:11] */
4976
#define PCIE_DLL_DATA_LINK_TEST_BYPASS_FLOW_CONTROL_MASK           0x00000800
4977
#define PCIE_DLL_DATA_LINK_TEST_BYPASS_FLOW_CONTROL_ALIGN          0
4978
#define PCIE_DLL_DATA_LINK_TEST_BYPASS_FLOW_CONTROL_BITS           1
4979
#define PCIE_DLL_DATA_LINK_TEST_BYPASS_FLOW_CONTROL_SHIFT          11
4980
4981
/* PCIE_DLL :: DATA_LINK_TEST :: ENABLE_RAM_CORE_CLOCK_MARGIN_TEST_MODE [10:10] */
4982
#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_CORE_CLOCK_MARGIN_TEST_MODE_MASK 0x00000400
4983
#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_CORE_CLOCK_MARGIN_TEST_MODE_ALIGN 0
4984
#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_CORE_CLOCK_MARGIN_TEST_MODE_BITS 1
4985
#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_CORE_CLOCK_MARGIN_TEST_MODE_SHIFT 10
4986
4987
/* PCIE_DLL :: DATA_LINK_TEST :: ENABLE_RAM_OVERSTRESS_TEST_MODE [09:09] */
4988
#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_OVERSTRESS_TEST_MODE_MASK 0x00000200
4989
#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_OVERSTRESS_TEST_MODE_ALIGN 0
4990
#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_OVERSTRESS_TEST_MODE_BITS 1
4991
#define PCIE_DLL_DATA_LINK_TEST_ENABLE_RAM_OVERSTRESS_TEST_MODE_SHIFT 9
4992
4993
/* PCIE_DLL :: DATA_LINK_TEST :: SPEED_UP_SLOW_CLOCK [08:08] */
4994
#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_SLOW_CLOCK_MASK           0x00000100
4995
#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_SLOW_CLOCK_ALIGN          0
4996
#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_SLOW_CLOCK_BITS           1
4997
#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_SLOW_CLOCK_SHIFT          8
4998
4999
/* PCIE_DLL :: DATA_LINK_TEST :: SPEED_UP_COMPLETION_TIMER [07:07] */
5000
#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_COMPLETION_TIMER_MASK     0x00000080
5001
#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_COMPLETION_TIMER_ALIGN    0
5002
#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_COMPLETION_TIMER_BITS     1
5003
#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_COMPLETION_TIMER_SHIFT    7
5004
5005
/* PCIE_DLL :: DATA_LINK_TEST :: SPEED_UP_REPLAY_TIMER [06:06] */
5006
#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_REPLAY_TIMER_MASK         0x00000040
5007
#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_REPLAY_TIMER_ALIGN        0
5008
#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_REPLAY_TIMER_BITS         1
5009
#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_REPLAY_TIMER_SHIFT        6
5010
5011
/* PCIE_DLL :: DATA_LINK_TEST :: SPEED_UP_ACK_LATENCY_TIMER [05:05] */
5012
#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_ACK_LATENCY_TIMER_MASK    0x00000020
5013
#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_ACK_LATENCY_TIMER_ALIGN   0
5014
#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_ACK_LATENCY_TIMER_BITS    1
5015
#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_ACK_LATENCY_TIMER_SHIFT   5
5016
5017
/* PCIE_DLL :: DATA_LINK_TEST :: SPEED_UP_PME_SERVICE_TIMER [04:04] */
5018
#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_PME_SERVICE_TIMER_MASK    0x00000010
5019
#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_PME_SERVICE_TIMER_ALIGN   0
5020
#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_PME_SERVICE_TIMER_BITS    1
5021
#define PCIE_DLL_DATA_LINK_TEST_SPEED_UP_PME_SERVICE_TIMER_SHIFT   4
5022
5023
/* PCIE_DLL :: DATA_LINK_TEST :: FORCE_PURGE [03:03] */
5024
#define PCIE_DLL_DATA_LINK_TEST_FORCE_PURGE_MASK                   0x00000008
5025
#define PCIE_DLL_DATA_LINK_TEST_FORCE_PURGE_ALIGN                  0
5026
#define PCIE_DLL_DATA_LINK_TEST_FORCE_PURGE_BITS                   1
5027
#define PCIE_DLL_DATA_LINK_TEST_FORCE_PURGE_SHIFT                  3
5028
5029
/* PCIE_DLL :: DATA_LINK_TEST :: FORCE_RETRY [02:02] */
5030
#define PCIE_DLL_DATA_LINK_TEST_FORCE_RETRY_MASK                   0x00000004
5031
#define PCIE_DLL_DATA_LINK_TEST_FORCE_RETRY_ALIGN                  0
5032
#define PCIE_DLL_DATA_LINK_TEST_FORCE_RETRY_BITS                   1
5033
#define PCIE_DLL_DATA_LINK_TEST_FORCE_RETRY_SHIFT                  2
5034
5035
/* PCIE_DLL :: DATA_LINK_TEST :: INVERT_CRC [01:01] */
5036
#define PCIE_DLL_DATA_LINK_TEST_INVERT_CRC_MASK                    0x00000002
5037
#define PCIE_DLL_DATA_LINK_TEST_INVERT_CRC_ALIGN                   0
5038
#define PCIE_DLL_DATA_LINK_TEST_INVERT_CRC_BITS                    1
5039
#define PCIE_DLL_DATA_LINK_TEST_INVERT_CRC_SHIFT                   1
5040
5041
/* PCIE_DLL :: DATA_LINK_TEST :: SEND_BAD_CRC_BIT [00:00] */
5042
#define PCIE_DLL_DATA_LINK_TEST_SEND_BAD_CRC_BIT_MASK              0x00000001
5043
#define PCIE_DLL_DATA_LINK_TEST_SEND_BAD_CRC_BIT_ALIGN             0
5044
#define PCIE_DLL_DATA_LINK_TEST_SEND_BAD_CRC_BIT_BITS              1
5045
#define PCIE_DLL_DATA_LINK_TEST_SEND_BAD_CRC_BIT_SHIFT             0
5046
5047
5048
/****************************************************************************
5049
 * PCIE_DLL :: PACKET_BIST
5050
 ***************************************************************************/
5051
/* PCIE_DLL :: PACKET_BIST :: RESERVED_0 [31:24] */
5052
#define PCIE_DLL_PACKET_BIST_RESERVED_0_MASK                       0xff000000
5053
#define PCIE_DLL_PACKET_BIST_RESERVED_0_ALIGN                      0
5054
#define PCIE_DLL_PACKET_BIST_RESERVED_0_BITS                       8
5055
#define PCIE_DLL_PACKET_BIST_RESERVED_0_SHIFT                      24
5056
5057
/* PCIE_DLL :: PACKET_BIST :: PACKET_CHECKER_LOCKED [23:23] */
5058
#define PCIE_DLL_PACKET_BIST_PACKET_CHECKER_LOCKED_MASK            0x00800000
5059
#define PCIE_DLL_PACKET_BIST_PACKET_CHECKER_LOCKED_ALIGN           0
5060
#define PCIE_DLL_PACKET_BIST_PACKET_CHECKER_LOCKED_BITS            1
5061
#define PCIE_DLL_PACKET_BIST_PACKET_CHECKER_LOCKED_SHIFT           23
5062
5063
/* PCIE_DLL :: PACKET_BIST :: RECEIVE_MISMATCH [22:22] */
5064
#define PCIE_DLL_PACKET_BIST_RECEIVE_MISMATCH_MASK                 0x00400000
5065
#define PCIE_DLL_PACKET_BIST_RECEIVE_MISMATCH_ALIGN                0
5066
#define PCIE_DLL_PACKET_BIST_RECEIVE_MISMATCH_BITS                 1
5067
#define PCIE_DLL_PACKET_BIST_RECEIVE_MISMATCH_SHIFT                22
5068
5069
/* PCIE_DLL :: PACKET_BIST :: ENABLE_RANDOM_TLP_LENGTH [21:21] */
5070
#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_TLP_LENGTH_MASK         0x00200000
5071
#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_TLP_LENGTH_ALIGN        0
5072
#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_TLP_LENGTH_BITS         1
5073
#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_TLP_LENGTH_SHIFT        21
5074
5075
/* PCIE_DLL :: PACKET_BIST :: TLP_LENGTH [20:10] */
5076
#define PCIE_DLL_PACKET_BIST_TLP_LENGTH_MASK                       0x001ffc00
5077
#define PCIE_DLL_PACKET_BIST_TLP_LENGTH_ALIGN                      0
5078
#define PCIE_DLL_PACKET_BIST_TLP_LENGTH_BITS                       11
5079
#define PCIE_DLL_PACKET_BIST_TLP_LENGTH_SHIFT                      10
5080
5081
/* PCIE_DLL :: PACKET_BIST :: ENABLE_RANDOM_IPG_LENGTH [09:09] */
5082
#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_IPG_LENGTH_MASK         0x00000200
5083
#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_IPG_LENGTH_ALIGN        0
5084
#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_IPG_LENGTH_BITS         1
5085
#define PCIE_DLL_PACKET_BIST_ENABLE_RANDOM_IPG_LENGTH_SHIFT        9
5086
5087
/* PCIE_DLL :: PACKET_BIST :: IPG_LENGTH [08:02] */
5088
#define PCIE_DLL_PACKET_BIST_IPG_LENGTH_MASK                       0x000001fc
5089
#define PCIE_DLL_PACKET_BIST_IPG_LENGTH_ALIGN                      0
5090
#define PCIE_DLL_PACKET_BIST_IPG_LENGTH_BITS                       7
5091
#define PCIE_DLL_PACKET_BIST_IPG_LENGTH_SHIFT                      2
5092
5093
/* PCIE_DLL :: PACKET_BIST :: TRANSMIT_START [01:01] */
5094
#define PCIE_DLL_PACKET_BIST_TRANSMIT_START_MASK                   0x00000002
5095
#define PCIE_DLL_PACKET_BIST_TRANSMIT_START_ALIGN                  0
5096
#define PCIE_DLL_PACKET_BIST_TRANSMIT_START_BITS                   1
5097
#define PCIE_DLL_PACKET_BIST_TRANSMIT_START_SHIFT                  1
5098
5099
/* PCIE_DLL :: PACKET_BIST :: ENABLE_PACKET_GENERATOR_TEST_MODE [00:00] */
5100
#define PCIE_DLL_PACKET_BIST_ENABLE_PACKET_GENERATOR_TEST_MODE_MASK 0x00000001
5101
#define PCIE_DLL_PACKET_BIST_ENABLE_PACKET_GENERATOR_TEST_MODE_ALIGN 0
5102
#define PCIE_DLL_PACKET_BIST_ENABLE_PACKET_GENERATOR_TEST_MODE_BITS 1
5103
#define PCIE_DLL_PACKET_BIST_ENABLE_PACKET_GENERATOR_TEST_MODE_SHIFT 0
5104
5105
5106
/****************************************************************************
5107
 * PCIE_DLL :: LINK_PCIE_1_1_CONTROL
5108
 ***************************************************************************/
5109
/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: RTBF_CT_2_0 [31:29] */
5110
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_CT_2_0_MASK            0xe0000000
5111
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_CT_2_0_ALIGN           0
5112
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_CT_2_0_BITS            3
5113
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_CT_2_0_SHIFT           29
5114
5115
/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: RTBF_SAM_1_0 [28:27] */
5116
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_SAM_1_0_MASK           0x18000000
5117
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_SAM_1_0_ALIGN          0
5118
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_SAM_1_0_BITS           2
5119
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_RTBF_SAM_1_0_SHIFT          27
5120
5121
/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: UNUSED_0 [26:10] */
5122
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_UNUSED_0_MASK               0x07fffc00
5123
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_UNUSED_0_ALIGN              0
5124
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_UNUSED_0_BITS               17
5125
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_UNUSED_0_SHIFT              10
5126
5127
/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: SELOCALXTAL [09:09] */
5128
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_SELOCALXTAL_MASK            0x00000200
5129
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_SELOCALXTAL_ALIGN           0
5130
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_SELOCALXTAL_BITS            1
5131
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_SELOCALXTAL_SHIFT           9
5132
5133
/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: L2_PLL_POWERDOWN_DISABLE [08:08] */
5134
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_PLL_POWERDOWN_DISABLE_MASK 0x00000100
5135
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_PLL_POWERDOWN_DISABLE_ALIGN 0
5136
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_PLL_POWERDOWN_DISABLE_BITS 1
5137
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_PLL_POWERDOWN_DISABLE_SHIFT 8
5138
5139
/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: L1_PLL_POWERDOWN_DISABLE [07:07] */
5140
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_POWERDOWN_DISABLE_MASK 0x00000080
5141
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_POWERDOWN_DISABLE_ALIGN 0
5142
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_POWERDOWN_DISABLE_BITS 1
5143
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_POWERDOWN_DISABLE_SHIFT 7
5144
5145
/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: L2_D3PM_CLKREQ_DISABLE [06:06] */
5146
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_D3PM_CLKREQ_DISABLE_MASK 0x00000040
5147
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_D3PM_CLKREQ_DISABLE_ALIGN 0
5148
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_D3PM_CLKREQ_DISABLE_BITS 1
5149
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L2_D3PM_CLKREQ_DISABLE_SHIFT 6
5150
5151
/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: L1_D3PM_CLKREQ_DISABLE [05:05] */
5152
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_D3PM_CLKREQ_DISABLE_MASK 0x00000020
5153
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_D3PM_CLKREQ_DISABLE_ALIGN 0
5154
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_D3PM_CLKREQ_DISABLE_BITS 1
5155
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_D3PM_CLKREQ_DISABLE_SHIFT 5
5156
5157
/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: L1_ASPM_CLKREQ_DISABLE [04:04] */
5158
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_ASPM_CLKREQ_DISABLE_MASK 0x00000010
5159
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_ASPM_CLKREQ_DISABLE_ALIGN 0
5160
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_ASPM_CLKREQ_DISABLE_BITS 1
5161
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_ASPM_CLKREQ_DISABLE_SHIFT 4
5162
5163
/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: L1_PLL_PD_W_O_CLKREQ [03:03] */
5164
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_PD_W_O_CLKREQ_MASK   0x00000008
5165
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_PD_W_O_CLKREQ_ALIGN  0
5166
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_PD_W_O_CLKREQ_BITS   1
5167
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_L1_PLL_PD_W_O_CLKREQ_SHIFT  3
5168
5169
/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: DASPM10USTIMER [02:02] */
5170
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DASPM10USTIMER_MASK         0x00000004
5171
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DASPM10USTIMER_ALIGN        0
5172
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DASPM10USTIMER_BITS         1
5173
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DASPM10USTIMER_SHIFT        2
5174
5175
/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: DFFU_EL1 [01:01] */
5176
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFFU_EL1_MASK               0x00000002
5177
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFFU_EL1_ALIGN              0
5178
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFFU_EL1_BITS               1
5179
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFFU_EL1_SHIFT              1
5180
5181
/* PCIE_DLL :: LINK_PCIE_1_1_CONTROL :: DFLOWCTLUPDATE1_1 [00:00] */
5182
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFLOWCTLUPDATE1_1_MASK      0x00000001
5183
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFLOWCTLUPDATE1_1_ALIGN     0
5184
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFLOWCTLUPDATE1_1_BITS      1
5185
#define PCIE_DLL_LINK_PCIE_1_1_CONTROL_DFLOWCTLUPDATE1_1_SHIFT     0
5186
5187
5188
/****************************************************************************
5189
 * BCM70012_TGT_TOP_PCIE_PHY
5190
 ***************************************************************************/
5191
/****************************************************************************
5192
 * PCIE_PHY :: PHY_MODE
5193
 ***************************************************************************/
5194
/* PCIE_PHY :: PHY_MODE :: RESERVED_0 [31:04] */
5195
#define PCIE_PHY_PHY_MODE_RESERVED_0_MASK                          0xfffffff0
5196
#define PCIE_PHY_PHY_MODE_RESERVED_0_ALIGN                         0
5197
#define PCIE_PHY_PHY_MODE_RESERVED_0_BITS                          28
5198
#define PCIE_PHY_PHY_MODE_RESERVED_0_SHIFT                         4
5199
5200
/* PCIE_PHY :: PHY_MODE :: UPSTREAM_DEV [03:03] */
5201
#define PCIE_PHY_PHY_MODE_UPSTREAM_DEV_MASK                        0x00000008
5202
#define PCIE_PHY_PHY_MODE_UPSTREAM_DEV_ALIGN                       0
5203
#define PCIE_PHY_PHY_MODE_UPSTREAM_DEV_BITS                        1
5204
#define PCIE_PHY_PHY_MODE_UPSTREAM_DEV_SHIFT                       3
5205
5206
/* PCIE_PHY :: PHY_MODE :: SERDES_SA_MODE [02:02] */
5207
#define PCIE_PHY_PHY_MODE_SERDES_SA_MODE_MASK                      0x00000004
5208
#define PCIE_PHY_PHY_MODE_SERDES_SA_MODE_ALIGN                     0
5209
#define PCIE_PHY_PHY_MODE_SERDES_SA_MODE_BITS                      1
5210
#define PCIE_PHY_PHY_MODE_SERDES_SA_MODE_SHIFT                     2
5211
5212
/* PCIE_PHY :: PHY_MODE :: LINK_DISABLE [01:01] */
5213
#define PCIE_PHY_PHY_MODE_LINK_DISABLE_MASK                        0x00000002
5214
#define PCIE_PHY_PHY_MODE_LINK_DISABLE_ALIGN                       0
5215
#define PCIE_PHY_PHY_MODE_LINK_DISABLE_BITS                        1
5216
#define PCIE_PHY_PHY_MODE_LINK_DISABLE_SHIFT                       1
5217
5218
/* PCIE_PHY :: PHY_MODE :: SOFT_RESET [00:00] */
5219
#define PCIE_PHY_PHY_MODE_SOFT_RESET_MASK                          0x00000001
5220
#define PCIE_PHY_PHY_MODE_SOFT_RESET_ALIGN                         0
5221
#define PCIE_PHY_PHY_MODE_SOFT_RESET_BITS                          1
5222
#define PCIE_PHY_PHY_MODE_SOFT_RESET_SHIFT                         0
5223
5224
5225
/****************************************************************************
5226
 * PCIE_PHY :: PHY_LINK_STATUS
5227
 ***************************************************************************/
5228
/* PCIE_PHY :: PHY_LINK_STATUS :: RESERVED_0 [31:10] */
5229
#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_0_MASK                   0xfffffc00
5230
#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_0_ALIGN                  0
5231
#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_0_BITS                   22
5232
#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_0_SHIFT                  10
5233
5234
/* PCIE_PHY :: PHY_LINK_STATUS :: BUFFER_OVERRUN [09:09] */
5235
#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_OVERRUN_MASK               0x00000200
5236
#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_OVERRUN_ALIGN              0
5237
#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_OVERRUN_BITS               1
5238
#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_OVERRUN_SHIFT              9
5239
5240
/* PCIE_PHY :: PHY_LINK_STATUS :: BUFFER_UNDERRUN [08:08] */
5241
#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_UNDERRUN_MASK              0x00000100
5242
#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_UNDERRUN_ALIGN             0
5243
#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_UNDERRUN_BITS              1
5244
#define PCIE_PHY_PHY_LINK_STATUS_BUFFER_UNDERRUN_SHIFT             8
5245
5246
/* PCIE_PHY :: PHY_LINK_STATUS :: LINK_PARTNER_REQUEST_LOOPBACK [07:07] */
5247
#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_REQUEST_LOOPBACK_MASK 0x00000080
5248
#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_REQUEST_LOOPBACK_ALIGN 0
5249
#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_REQUEST_LOOPBACK_BITS 1
5250
#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_REQUEST_LOOPBACK_SHIFT 7
5251
5252
/* PCIE_PHY :: PHY_LINK_STATUS :: LINK_PARTNER_DISABLE_SCRAMBLER [06:06] */
5253
#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_DISABLE_SCRAMBLER_MASK 0x00000040
5254
#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_DISABLE_SCRAMBLER_ALIGN 0
5255
#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_DISABLE_SCRAMBLER_BITS 1
5256
#define PCIE_PHY_PHY_LINK_STATUS_LINK_PARTNER_DISABLE_SCRAMBLER_SHIFT 6
5257
5258
/* PCIE_PHY :: PHY_LINK_STATUS :: EXTENDED_SYNCH [05:05] */
5259
#define PCIE_PHY_PHY_LINK_STATUS_EXTENDED_SYNCH_MASK               0x00000020
5260
#define PCIE_PHY_PHY_LINK_STATUS_EXTENDED_SYNCH_ALIGN              0
5261
#define PCIE_PHY_PHY_LINK_STATUS_EXTENDED_SYNCH_BITS               1
5262
#define PCIE_PHY_PHY_LINK_STATUS_EXTENDED_SYNCH_SHIFT              5
5263
5264
/* PCIE_PHY :: PHY_LINK_STATUS :: POLARITY_INVERTED [04:04] */
5265
#define PCIE_PHY_PHY_LINK_STATUS_POLARITY_INVERTED_MASK            0x00000010
5266
#define PCIE_PHY_PHY_LINK_STATUS_POLARITY_INVERTED_ALIGN           0
5267
#define PCIE_PHY_PHY_LINK_STATUS_POLARITY_INVERTED_BITS            1
5268
#define PCIE_PHY_PHY_LINK_STATUS_POLARITY_INVERTED_SHIFT           4
5269
5270
/* PCIE_PHY :: PHY_LINK_STATUS :: LINK_UP [03:03] */
5271
#define PCIE_PHY_PHY_LINK_STATUS_LINK_UP_MASK                      0x00000008
5272
#define PCIE_PHY_PHY_LINK_STATUS_LINK_UP_ALIGN                     0
5273
#define PCIE_PHY_PHY_LINK_STATUS_LINK_UP_BITS                      1
5274
#define PCIE_PHY_PHY_LINK_STATUS_LINK_UP_SHIFT                     3
5275
5276
/* PCIE_PHY :: PHY_LINK_STATUS :: LINK_TRAINING [02:02] */
5277
#define PCIE_PHY_PHY_LINK_STATUS_LINK_TRAINING_MASK                0x00000004
5278
#define PCIE_PHY_PHY_LINK_STATUS_LINK_TRAINING_ALIGN               0
5279
#define PCIE_PHY_PHY_LINK_STATUS_LINK_TRAINING_BITS                1
5280
#define PCIE_PHY_PHY_LINK_STATUS_LINK_TRAINING_SHIFT               2
5281
5282
/* PCIE_PHY :: PHY_LINK_STATUS :: RECEIVE_DATA_VALID [01:01] */
5283
#define PCIE_PHY_PHY_LINK_STATUS_RECEIVE_DATA_VALID_MASK           0x00000002
5284
#define PCIE_PHY_PHY_LINK_STATUS_RECEIVE_DATA_VALID_ALIGN          0
5285
#define PCIE_PHY_PHY_LINK_STATUS_RECEIVE_DATA_VALID_BITS           1
5286
#define PCIE_PHY_PHY_LINK_STATUS_RECEIVE_DATA_VALID_SHIFT          1
5287
5288
/* PCIE_PHY :: PHY_LINK_STATUS :: RESERVED_1 [00:00] */
5289
#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_1_MASK                   0x00000001
5290
#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_1_ALIGN                  0
5291
#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_1_BITS                   1
5292
#define PCIE_PHY_PHY_LINK_STATUS_RESERVED_1_SHIFT                  0
5293
5294
5295
/****************************************************************************
5296
 * PCIE_PHY :: PHY_LINK_LTSSM_CONTROL
5297
 ***************************************************************************/
5298
/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: RESERVED_0 [31:08] */
5299
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESERVED_0_MASK            0xffffff00
5300
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESERVED_0_ALIGN           0
5301
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESERVED_0_BITS            24
5302
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESERVED_0_SHIFT           8
5303
5304
/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: DISABLESCRAMBLE [07:07] */
5305
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESCRAMBLE_MASK       0x00000080
5306
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESCRAMBLE_ALIGN      0
5307
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESCRAMBLE_BITS       1
5308
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESCRAMBLE_SHIFT      7
5309
5310
/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: DETECTSTATE [06:06] */
5311
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DETECTSTATE_MASK           0x00000040
5312
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DETECTSTATE_ALIGN          0
5313
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DETECTSTATE_BITS           1
5314
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DETECTSTATE_SHIFT          6
5315
5316
/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: POLLINGSTATE [05:05] */
5317
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_POLLINGSTATE_MASK          0x00000020
5318
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_POLLINGSTATE_ALIGN         0
5319
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_POLLINGSTATE_BITS          1
5320
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_POLLINGSTATE_SHIFT         5
5321
5322
/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: CONFIGSTATE [04:04] */
5323
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_CONFIGSTATE_MASK           0x00000010
5324
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_CONFIGSTATE_ALIGN          0
5325
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_CONFIGSTATE_BITS           1
5326
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_CONFIGSTATE_SHIFT          4
5327
5328
/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: RECOVSTATE [03:03] */
5329
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RECOVSTATE_MASK            0x00000008
5330
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RECOVSTATE_ALIGN           0
5331
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RECOVSTATE_BITS            1
5332
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RECOVSTATE_SHIFT           3
5333
5334
/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: EXTLBSTATE [02:02] */
5335
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_EXTLBSTATE_MASK            0x00000004
5336
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_EXTLBSTATE_ALIGN           0
5337
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_EXTLBSTATE_BITS            1
5338
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_EXTLBSTATE_SHIFT           2
5339
5340
/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: RESETSTATE [01:01] */
5341
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESETSTATE_MASK            0x00000002
5342
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESETSTATE_ALIGN           0
5343
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESETSTATE_BITS            1
5344
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_RESETSTATE_SHIFT           1
5345
5346
/* PCIE_PHY :: PHY_LINK_LTSSM_CONTROL :: DISABLESTATE [00:00] */
5347
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESTATE_MASK          0x00000001
5348
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESTATE_ALIGN         0
5349
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESTATE_BITS          1
5350
#define PCIE_PHY_PHY_LINK_LTSSM_CONTROL_DISABLESTATE_SHIFT         0
5351
5352
5353
/****************************************************************************
5354
 * PCIE_PHY :: PHY_LINK_TRAINING_LINK_NUMBER
5355
 ***************************************************************************/
5356
/* PCIE_PHY :: PHY_LINK_TRAINING_LINK_NUMBER :: RESERVED_0 [31:08] */
5357
#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_RESERVED_0_MASK     0xffffff00
5358
#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_RESERVED_0_ALIGN    0
5359
#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_RESERVED_0_BITS     24
5360
#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_RESERVED_0_SHIFT    8
5361
5362
/* PCIE_PHY :: PHY_LINK_TRAINING_LINK_NUMBER :: LANE_NUMBER [07:00] */
5363
#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_LANE_NUMBER_MASK    0x000000ff
5364
#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_LANE_NUMBER_ALIGN   0
5365
#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_LANE_NUMBER_BITS    8
5366
#define PCIE_PHY_PHY_LINK_TRAINING_LINK_NUMBER_LANE_NUMBER_SHIFT   0
5367
5368
5369
/****************************************************************************
5370
 * PCIE_PHY :: PHY_LINK_TRAINING_LANE_NUMBER
5371
 ***************************************************************************/
5372
/* PCIE_PHY :: PHY_LINK_TRAINING_LANE_NUMBER :: RESERVED_0 [31:08] */
5373
#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_RESERVED_0_MASK     0xffffff00
5374
#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_RESERVED_0_ALIGN    0
5375
#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_RESERVED_0_BITS     24
5376
#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_RESERVED_0_SHIFT    8
5377
5378
/* PCIE_PHY :: PHY_LINK_TRAINING_LANE_NUMBER :: LANE_NUMBER [07:00] */
5379
#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_LANE_NUMBER_MASK    0x000000ff
5380
#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_LANE_NUMBER_ALIGN   0
5381
#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_LANE_NUMBER_BITS    8
5382
#define PCIE_PHY_PHY_LINK_TRAINING_LANE_NUMBER_LANE_NUMBER_SHIFT   0
5383
5384
5385
/****************************************************************************
5386
 * PCIE_PHY :: PHY_LINK_TRAINING_N_FTS
5387
 ***************************************************************************/
5388
/* PCIE_PHY :: PHY_LINK_TRAINING_N_FTS :: RESERVED_0 [31:25] */
5389
#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RESERVED_0_MASK           0xfe000000
5390
#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RESERVED_0_ALIGN          0
5391
#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RESERVED_0_BITS           7
5392
#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RESERVED_0_SHIFT          25
5393
5394
/* PCIE_PHY :: PHY_LINK_TRAINING_N_FTS :: TRANSMITTER_N_FTS_OVERRIDE [24:24] */
5395
#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_MASK 0x01000000
5396
#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_ALIGN 0
5397
#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_BITS 1
5398
#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_SHIFT 24
5399
5400
/* PCIE_PHY :: PHY_LINK_TRAINING_N_FTS :: TRANSMITTER_N_FTS_OVERRIDE_VALUE [23:16] */
5401
#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_VALUE_MASK 0x00ff0000
5402
#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_VALUE_ALIGN 0
5403
#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_VALUE_BITS 8
5404
#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_OVERRIDE_VALUE_SHIFT 16
5405
5406
/* PCIE_PHY :: PHY_LINK_TRAINING_N_FTS :: TRANSMITTER_N_FTS [15:08] */
5407
#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_MASK    0x0000ff00
5408
#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_ALIGN   0
5409
#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_BITS    8
5410
#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_TRANSMITTER_N_FTS_SHIFT   8
5411
5412
/* PCIE_PHY :: PHY_LINK_TRAINING_N_FTS :: RECEIVER_N_FTS [07:00] */
5413
#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RECEIVER_N_FTS_MASK       0x000000ff
5414
#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RECEIVER_N_FTS_ALIGN      0
5415
#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RECEIVER_N_FTS_BITS       8
5416
#define PCIE_PHY_PHY_LINK_TRAINING_N_FTS_RECEIVER_N_FTS_SHIFT      0
5417
5418
5419
/****************************************************************************
5420
 * PCIE_PHY :: PHY_ATTENTION
5421
 ***************************************************************************/
5422
/* PCIE_PHY :: PHY_ATTENTION :: RESERVED_0 [31:08] */
5423
#define PCIE_PHY_PHY_ATTENTION_RESERVED_0_MASK                     0xffffff00
5424
#define PCIE_PHY_PHY_ATTENTION_RESERVED_0_ALIGN                    0
5425
#define PCIE_PHY_PHY_ATTENTION_RESERVED_0_BITS                     24
5426
#define PCIE_PHY_PHY_ATTENTION_RESERVED_0_SHIFT                    8
5427
5428
/* PCIE_PHY :: PHY_ATTENTION :: HOT_RESET [07:07] */
5429
#define PCIE_PHY_PHY_ATTENTION_HOT_RESET_MASK                      0x00000080
5430
#define PCIE_PHY_PHY_ATTENTION_HOT_RESET_ALIGN                     0
5431
#define PCIE_PHY_PHY_ATTENTION_HOT_RESET_BITS                      1
5432
#define PCIE_PHY_PHY_ATTENTION_HOT_RESET_SHIFT                     7
5433
5434
/* PCIE_PHY :: PHY_ATTENTION :: LINK_DOWN [06:06] */
5435
#define PCIE_PHY_PHY_ATTENTION_LINK_DOWN_MASK                      0x00000040
5436
#define PCIE_PHY_PHY_ATTENTION_LINK_DOWN_ALIGN                     0
5437
#define PCIE_PHY_PHY_ATTENTION_LINK_DOWN_BITS                      1
5438
#define PCIE_PHY_PHY_ATTENTION_LINK_DOWN_SHIFT                     6
5439
5440
/* PCIE_PHY :: PHY_ATTENTION :: TRAINING_ERROR [05:05] */
5441
#define PCIE_PHY_PHY_ATTENTION_TRAINING_ERROR_MASK                 0x00000020
5442
#define PCIE_PHY_PHY_ATTENTION_TRAINING_ERROR_ALIGN                0
5443
#define PCIE_PHY_PHY_ATTENTION_TRAINING_ERROR_BITS                 1
5444
#define PCIE_PHY_PHY_ATTENTION_TRAINING_ERROR_SHIFT                5
5445
5446
/* PCIE_PHY :: PHY_ATTENTION :: BUFFER_OVERRUN [04:04] */
5447
#define PCIE_PHY_PHY_ATTENTION_BUFFER_OVERRUN_MASK                 0x00000010
5448
#define PCIE_PHY_PHY_ATTENTION_BUFFER_OVERRUN_ALIGN                0
5449
#define PCIE_PHY_PHY_ATTENTION_BUFFER_OVERRUN_BITS                 1
5450
#define PCIE_PHY_PHY_ATTENTION_BUFFER_OVERRUN_SHIFT                4
5451
5452
/* PCIE_PHY :: PHY_ATTENTION :: BUFFER_UNDERRUN [03:03] */
5453
#define PCIE_PHY_PHY_ATTENTION_BUFFER_UNDERRUN_MASK                0x00000008
5454
#define PCIE_PHY_PHY_ATTENTION_BUFFER_UNDERRUN_ALIGN               0
5455
#define PCIE_PHY_PHY_ATTENTION_BUFFER_UNDERRUN_BITS                1
5456
#define PCIE_PHY_PHY_ATTENTION_BUFFER_UNDERRUN_SHIFT               3
5457
5458
/* PCIE_PHY :: PHY_ATTENTION :: RECEIVE_FRAMING_ERROR [02:02] */
5459
#define PCIE_PHY_PHY_ATTENTION_RECEIVE_FRAMING_ERROR_MASK          0x00000004
5460
#define PCIE_PHY_PHY_ATTENTION_RECEIVE_FRAMING_ERROR_ALIGN         0
5461
#define PCIE_PHY_PHY_ATTENTION_RECEIVE_FRAMING_ERROR_BITS          1
5462
#define PCIE_PHY_PHY_ATTENTION_RECEIVE_FRAMING_ERROR_SHIFT         2
5463
5464
/* PCIE_PHY :: PHY_ATTENTION :: RECEIVE_DISPARITY_ERROR [01:01] */
5465
#define PCIE_PHY_PHY_ATTENTION_RECEIVE_DISPARITY_ERROR_MASK        0x00000002
5466
#define PCIE_PHY_PHY_ATTENTION_RECEIVE_DISPARITY_ERROR_ALIGN       0
5467
#define PCIE_PHY_PHY_ATTENTION_RECEIVE_DISPARITY_ERROR_BITS        1
5468
#define PCIE_PHY_PHY_ATTENTION_RECEIVE_DISPARITY_ERROR_SHIFT       1
5469
5470
/* PCIE_PHY :: PHY_ATTENTION :: RECEIVE_CODE_ERROR [00:00] */
5471
#define PCIE_PHY_PHY_ATTENTION_RECEIVE_CODE_ERROR_MASK             0x00000001
5472
#define PCIE_PHY_PHY_ATTENTION_RECEIVE_CODE_ERROR_ALIGN            0
5473
#define PCIE_PHY_PHY_ATTENTION_RECEIVE_CODE_ERROR_BITS             1
5474
#define PCIE_PHY_PHY_ATTENTION_RECEIVE_CODE_ERROR_SHIFT            0
5475
5476
5477
/****************************************************************************
5478
 * PCIE_PHY :: PHY_ATTENTION_MASK
5479
 ***************************************************************************/
5480
/* PCIE_PHY :: PHY_ATTENTION_MASK :: RESERVED_0 [31:08] */
5481
#define PCIE_PHY_PHY_ATTENTION_MASK_RESERVED_0_MASK                0xffffff00
5482
#define PCIE_PHY_PHY_ATTENTION_MASK_RESERVED_0_ALIGN               0
5483
#define PCIE_PHY_PHY_ATTENTION_MASK_RESERVED_0_BITS                24
5484
#define PCIE_PHY_PHY_ATTENTION_MASK_RESERVED_0_SHIFT               8
5485
5486
/* PCIE_PHY :: PHY_ATTENTION_MASK :: HOT_RESET_MASK [07:07] */
5487
#define PCIE_PHY_PHY_ATTENTION_MASK_HOT_RESET_MASK_MASK            0x00000080
5488
#define PCIE_PHY_PHY_ATTENTION_MASK_HOT_RESET_MASK_ALIGN           0
5489
#define PCIE_PHY_PHY_ATTENTION_MASK_HOT_RESET_MASK_BITS            1
5490
#define PCIE_PHY_PHY_ATTENTION_MASK_HOT_RESET_MASK_SHIFT           7
5491
5492
/* PCIE_PHY :: PHY_ATTENTION_MASK :: LINK_DOWN_MASK [06:06] */
5493
#define PCIE_PHY_PHY_ATTENTION_MASK_LINK_DOWN_MASK_MASK            0x00000040
5494
#define PCIE_PHY_PHY_ATTENTION_MASK_LINK_DOWN_MASK_ALIGN           0
5495
#define PCIE_PHY_PHY_ATTENTION_MASK_LINK_DOWN_MASK_BITS            1
5496
#define PCIE_PHY_PHY_ATTENTION_MASK_LINK_DOWN_MASK_SHIFT           6
5497
5498
/* PCIE_PHY :: PHY_ATTENTION_MASK :: TRAINING_ERROR_MASK [05:05] */
5499
#define PCIE_PHY_PHY_ATTENTION_MASK_TRAINING_ERROR_MASK_MASK       0x00000020
5500
#define PCIE_PHY_PHY_ATTENTION_MASK_TRAINING_ERROR_MASK_ALIGN      0
5501
#define PCIE_PHY_PHY_ATTENTION_MASK_TRAINING_ERROR_MASK_BITS       1
5502
#define PCIE_PHY_PHY_ATTENTION_MASK_TRAINING_ERROR_MASK_SHIFT      5
5503
5504
/* PCIE_PHY :: PHY_ATTENTION_MASK :: BUFFER_OVERRUN_MASK [04:04] */
5505
#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_OVERRUN_MASK_MASK       0x00000010
5506
#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_OVERRUN_MASK_ALIGN      0
5507
#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_OVERRUN_MASK_BITS       1
5508
#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_OVERRUN_MASK_SHIFT      4
5509
5510
/* PCIE_PHY :: PHY_ATTENTION_MASK :: BUFFER_UNDERRUN_MASK [03:03] */
5511
#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_UNDERRUN_MASK_MASK      0x00000008
5512
#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_UNDERRUN_MASK_ALIGN     0
5513
#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_UNDERRUN_MASK_BITS      1
5514
#define PCIE_PHY_PHY_ATTENTION_MASK_BUFFER_UNDERRUN_MASK_SHIFT     3
5515
5516
/* PCIE_PHY :: PHY_ATTENTION_MASK :: RECEIVE_FRAME_ERROR_MASK [02:02] */
5517
#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_FRAME_ERROR_MASK_MASK  0x00000004
5518
#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_FRAME_ERROR_MASK_ALIGN 0
5519
#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_FRAME_ERROR_MASK_BITS  1
5520
#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_FRAME_ERROR_MASK_SHIFT 2
5521
5522
/* PCIE_PHY :: PHY_ATTENTION_MASK :: RECEIVE_DISPARITY_ERROR_MASK [01:01] */
5523
#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_DISPARITY_ERROR_MASK_MASK 0x00000002
5524
#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_DISPARITY_ERROR_MASK_ALIGN 0
5525
#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_DISPARITY_ERROR_MASK_BITS 1
5526
#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_DISPARITY_ERROR_MASK_SHIFT 1
5527
5528
/* PCIE_PHY :: PHY_ATTENTION_MASK :: RECEIVE_CODE_ERROR_MASK [00:00] */
5529
#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_CODE_ERROR_MASK_MASK   0x00000001
5530
#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_CODE_ERROR_MASK_ALIGN  0
5531
#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_CODE_ERROR_MASK_BITS   1
5532
#define PCIE_PHY_PHY_ATTENTION_MASK_RECEIVE_CODE_ERROR_MASK_SHIFT  0
5533
5534
5535
/****************************************************************************
5536
 * PCIE_PHY :: PHY_RECEIVE_ERROR_COUNTER
5537
 ***************************************************************************/
5538
/* PCIE_PHY :: PHY_RECEIVE_ERROR_COUNTER :: DISPARITY_ERROR_COUNT [31:16] */
5539
#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_DISPARITY_ERROR_COUNT_MASK 0xffff0000
5540
#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_DISPARITY_ERROR_COUNT_ALIGN 0
5541
#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_DISPARITY_ERROR_COUNT_BITS 16
5542
#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_DISPARITY_ERROR_COUNT_SHIFT 16
5543
5544
/* PCIE_PHY :: PHY_RECEIVE_ERROR_COUNTER :: CODE_ERROR_COUNT [15:00] */
5545
#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_CODE_ERROR_COUNT_MASK   0x0000ffff
5546
#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_CODE_ERROR_COUNT_ALIGN  0
5547
#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_CODE_ERROR_COUNT_BITS   16
5548
#define PCIE_PHY_PHY_RECEIVE_ERROR_COUNTER_CODE_ERROR_COUNT_SHIFT  0
5549
5550
5551
/****************************************************************************
5552
 * PCIE_PHY :: PHY_RECEIVE_FRAMING_ERROR_COUNTER
5553
 ***************************************************************************/
5554
/* PCIE_PHY :: PHY_RECEIVE_FRAMING_ERROR_COUNTER :: RESERVED_0 [31:16] */
5555
#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_RESERVED_0_MASK 0xffff0000
5556
#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_RESERVED_0_ALIGN 0
5557
#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_RESERVED_0_BITS 16
5558
#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_RESERVED_0_SHIFT 16
5559
5560
/* PCIE_PHY :: PHY_RECEIVE_FRAMING_ERROR_COUNTER :: FRAMING_ERROR_COUNT [15:00] */
5561
#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_FRAMING_ERROR_COUNT_MASK 0x0000ffff
5562
#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_FRAMING_ERROR_COUNT_ALIGN 0
5563
#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_FRAMING_ERROR_COUNT_BITS 16
5564
#define PCIE_PHY_PHY_RECEIVE_FRAMING_ERROR_COUNTER_FRAMING_ERROR_COUNT_SHIFT 0
5565
5566
5567
/****************************************************************************
5568
 * PCIE_PHY :: PHY_RECEIVE_ERROR_THRESHOLD
5569
 ***************************************************************************/
5570
/* PCIE_PHY :: PHY_RECEIVE_ERROR_THRESHOLD :: RESERVED_0 [31:12] */
5571
#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_RESERVED_0_MASK       0xfffff000
5572
#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_RESERVED_0_ALIGN      0
5573
#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_RESERVED_0_BITS       20
5574
#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_RESERVED_0_SHIFT      12
5575
5576
/* PCIE_PHY :: PHY_RECEIVE_ERROR_THRESHOLD :: FRAME_ERROR_THRESHOLD [11:08] */
5577
#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_FRAME_ERROR_THRESHOLD_MASK 0x00000f00
5578
#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_FRAME_ERROR_THRESHOLD_ALIGN 0
5579
#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_FRAME_ERROR_THRESHOLD_BITS 4
5580
#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_FRAME_ERROR_THRESHOLD_SHIFT 8
5581
5582
/* PCIE_PHY :: PHY_RECEIVE_ERROR_THRESHOLD :: DISPARITY_ERROR_THRESHOLD [07:04] */
5583
#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_DISPARITY_ERROR_THRESHOLD_MASK 0x000000f0
5584
#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_DISPARITY_ERROR_THRESHOLD_ALIGN 0
5585
#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_DISPARITY_ERROR_THRESHOLD_BITS 4
5586
#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_DISPARITY_ERROR_THRESHOLD_SHIFT 4
5587
5588
/* PCIE_PHY :: PHY_RECEIVE_ERROR_THRESHOLD :: CODE_ERROR_THRESHOLD [03:00] */
5589
#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_CODE_ERROR_THRESHOLD_MASK 0x0000000f
5590
#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_CODE_ERROR_THRESHOLD_ALIGN 0
5591
#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_CODE_ERROR_THRESHOLD_BITS 4
5592
#define PCIE_PHY_PHY_RECEIVE_ERROR_THRESHOLD_CODE_ERROR_THRESHOLD_SHIFT 0
5593
5594
5595
/****************************************************************************
5596
 * PCIE_PHY :: PHY_TEST_CONTROL
5597
 ***************************************************************************/
5598
/* PCIE_PHY :: PHY_TEST_CONTROL :: UNUSED_0 [31:31] */
5599
#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_0_MASK                    0x80000000
5600
#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_0_ALIGN                   0
5601
#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_0_BITS                    1
5602
#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_0_SHIFT                   31
5603
5604
/* PCIE_PHY :: PHY_TEST_CONTROL :: DELAY_HOTRESET_ENABLE [30:30] */
5605
#define PCIE_PHY_PHY_TEST_CONTROL_DELAY_HOTRESET_ENABLE_MASK       0x40000000
5606
#define PCIE_PHY_PHY_TEST_CONTROL_DELAY_HOTRESET_ENABLE_ALIGN      0
5607
#define PCIE_PHY_PHY_TEST_CONTROL_DELAY_HOTRESET_ENABLE_BITS       1
5608
#define PCIE_PHY_PHY_TEST_CONTROL_DELAY_HOTRESET_ENABLE_SHIFT      30
5609
5610
/* PCIE_PHY :: PHY_TEST_CONTROL :: CQ27039_TSX_MAJORITY_CHECK [29:29] */
5611
#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_TSX_MAJORITY_CHECK_MASK  0x20000000
5612
#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_TSX_MAJORITY_CHECK_ALIGN 0
5613
#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_TSX_MAJORITY_CHECK_BITS  1
5614
#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_TSX_MAJORITY_CHECK_SHIFT 29
5615
5616
/* PCIE_PHY :: PHY_TEST_CONTROL :: CQ27039_MASK_OFF_BOGUS [28:28] */
5617
#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_MASK_OFF_BOGUS_MASK      0x10000000
5618
#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_MASK_OFF_BOGUS_ALIGN     0
5619
#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_MASK_OFF_BOGUS_BITS      1
5620
#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_MASK_OFF_BOGUS_SHIFT     28
5621
5622
/* PCIE_PHY :: PHY_TEST_CONTROL :: CQ27039_POLARITY_CHECK [27:27] */
5623
#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_POLARITY_CHECK_MASK      0x08000000
5624
#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_POLARITY_CHECK_ALIGN     0
5625
#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_POLARITY_CHECK_BITS      1
5626
#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_POLARITY_CHECK_SHIFT     27
5627
5628
/* PCIE_PHY :: PHY_TEST_CONTROL :: CQ27039_STICKY_POLARITY_CHECK [26:26] */
5629
#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_STICKY_POLARITY_CHECK_MASK 0x04000000
5630
#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_STICKY_POLARITY_CHECK_ALIGN 0
5631
#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_STICKY_POLARITY_CHECK_BITS 1
5632
#define PCIE_PHY_PHY_TEST_CONTROL_CQ27039_STICKY_POLARITY_CHECK_SHIFT 26
5633
5634
/* PCIE_PHY :: PHY_TEST_CONTROL :: UNUSED_1 [25:23] */
5635
#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_1_MASK                    0x03800000
5636
#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_1_ALIGN                   0
5637
#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_1_BITS                    3
5638
#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_1_SHIFT                   23
5639
5640
/* PCIE_PHY :: PHY_TEST_CONTROL :: TWO_OS_RULE_RELAXING [22:22] */
5641
#define PCIE_PHY_PHY_TEST_CONTROL_TWO_OS_RULE_RELAXING_MASK        0x00400000
5642
#define PCIE_PHY_PHY_TEST_CONTROL_TWO_OS_RULE_RELAXING_ALIGN       0
5643
#define PCIE_PHY_PHY_TEST_CONTROL_TWO_OS_RULE_RELAXING_BITS        1
5644
#define PCIE_PHY_PHY_TEST_CONTROL_TWO_OS_RULE_RELAXING_SHIFT       22
5645
5646
/* PCIE_PHY :: PHY_TEST_CONTROL :: DISABLE_HOT_RESET [21:21] */
5647
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_HOT_RESET_MASK           0x00200000
5648
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_HOT_RESET_ALIGN          0
5649
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_HOT_RESET_BITS           1
5650
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_HOT_RESET_SHIFT          21
5651
5652
/* PCIE_PHY :: PHY_TEST_CONTROL :: DISABLE_LINK_DOWN_RESET [20:20] */
5653
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_LINK_DOWN_RESET_MASK     0x00100000
5654
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_LINK_DOWN_RESET_ALIGN    0
5655
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_LINK_DOWN_RESET_BITS     1
5656
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_LINK_DOWN_RESET_SHIFT    20
5657
5658
/* PCIE_PHY :: PHY_TEST_CONTROL :: DISABLE_EIDLE_SET_TRANSMITTING_AT_TIME_OUT_TO_DETECT_STATE [19:19] */
5659
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_EIDLE_SET_TRANSMITTING_AT_TIME_OUT_TO_DETECT_STATE_MASK 0x00080000
5660
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_EIDLE_SET_TRANSMITTING_AT_TIME_OUT_TO_DETECT_STATE_ALIGN 0
5661
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_EIDLE_SET_TRANSMITTING_AT_TIME_OUT_TO_DETECT_STATE_BITS 1
5662
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_EIDLE_SET_TRANSMITTING_AT_TIME_OUT_TO_DETECT_STATE_SHIFT 19
5663
5664
/* PCIE_PHY :: PHY_TEST_CONTROL :: DISABLE_ERROR_EXIT [18:18] */
5665
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_EXIT_MASK          0x00040000
5666
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_EXIT_ALIGN         0
5667
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_EXIT_BITS          1
5668
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_EXIT_SHIFT         18
5669
5670
/* PCIE_PHY :: PHY_TEST_CONTROL :: DISABLE_ERROR_MASK [17:17] */
5671
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_MASK_MASK          0x00020000
5672
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_MASK_ALIGN         0
5673
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_MASK_BITS          1
5674
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_MASK_SHIFT         17
5675
5676
/* PCIE_PHY :: PHY_TEST_CONTROL :: DISABLE_ERROR_RECOVERY [16:16] */
5677
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_RECOVERY_MASK      0x00010000
5678
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_RECOVERY_ALIGN     0
5679
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_RECOVERY_BITS      1
5680
#define PCIE_PHY_PHY_TEST_CONTROL_DISABLE_ERROR_RECOVERY_SHIFT     16
5681
5682
/* PCIE_PHY :: PHY_TEST_CONTROL :: RESERVED_0 [15:08] */
5683
#define PCIE_PHY_PHY_TEST_CONTROL_RESERVED_0_MASK                  0x0000ff00
5684
#define PCIE_PHY_PHY_TEST_CONTROL_RESERVED_0_ALIGN                 0
5685
#define PCIE_PHY_PHY_TEST_CONTROL_RESERVED_0_BITS                  8
5686
#define PCIE_PHY_PHY_TEST_CONTROL_RESERVED_0_SHIFT                 8
5687
5688
/* PCIE_PHY :: PHY_TEST_CONTROL :: UNUSED_2 [07:04] */
5689
#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_2_MASK                    0x000000f0
5690
#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_2_ALIGN                   0
5691
#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_2_BITS                    4
5692
#define PCIE_PHY_PHY_TEST_CONTROL_UNUSED_2_SHIFT                   4
5693
5694
/* PCIE_PHY :: PHY_TEST_CONTROL :: CQ22100_FIX_DISABLE [03:03] */
5695
#define PCIE_PHY_PHY_TEST_CONTROL_CQ22100_FIX_DISABLE_MASK         0x00000008
5696
#define PCIE_PHY_PHY_TEST_CONTROL_CQ22100_FIX_DISABLE_ALIGN        0
5697
#define PCIE_PHY_PHY_TEST_CONTROL_CQ22100_FIX_DISABLE_BITS         1
5698
#define PCIE_PHY_PHY_TEST_CONTROL_CQ22100_FIX_DISABLE_SHIFT        3
5699
5700
/* PCIE_PHY :: PHY_TEST_CONTROL :: TRAINING_BYPASS [02:02] */
5701
#define PCIE_PHY_PHY_TEST_CONTROL_TRAINING_BYPASS_MASK             0x00000004
5702
#define PCIE_PHY_PHY_TEST_CONTROL_TRAINING_BYPASS_ALIGN            0
5703
#define PCIE_PHY_PHY_TEST_CONTROL_TRAINING_BYPASS_BITS             1
5704
#define PCIE_PHY_PHY_TEST_CONTROL_TRAINING_BYPASS_SHIFT            2
5705
5706
/* PCIE_PHY :: PHY_TEST_CONTROL :: EXTERNAL_LOOPBACK [01:01] */
5707
#define PCIE_PHY_PHY_TEST_CONTROL_EXTERNAL_LOOPBACK_MASK           0x00000002
5708
#define PCIE_PHY_PHY_TEST_CONTROL_EXTERNAL_LOOPBACK_ALIGN          0
5709
#define PCIE_PHY_PHY_TEST_CONTROL_EXTERNAL_LOOPBACK_BITS           1
5710
#define PCIE_PHY_PHY_TEST_CONTROL_EXTERNAL_LOOPBACK_SHIFT          1
5711
5712
/* PCIE_PHY :: PHY_TEST_CONTROL :: INTERNAL_LOOPBACK [00:00] */
5713
#define PCIE_PHY_PHY_TEST_CONTROL_INTERNAL_LOOPBACK_MASK           0x00000001
5714
#define PCIE_PHY_PHY_TEST_CONTROL_INTERNAL_LOOPBACK_ALIGN          0
5715
#define PCIE_PHY_PHY_TEST_CONTROL_INTERNAL_LOOPBACK_BITS           1
5716
#define PCIE_PHY_PHY_TEST_CONTROL_INTERNAL_LOOPBACK_SHIFT          0
5717
5718
5719
/****************************************************************************
5720
 * PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE
5721
 ***************************************************************************/
5722
/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: RESERVED_0 [31:18] */
5723
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RESERVED_0_MASK       0xfffc0000
5724
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RESERVED_0_ALIGN      0
5725
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RESERVED_0_BITS       14
5726
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RESERVED_0_SHIFT      18
5727
5728
/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: OBSVELECIDLEVALUE [17:17] */
5729
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEVALUE_MASK 0x00020000
5730
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEVALUE_ALIGN 0
5731
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEVALUE_BITS 1
5732
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEVALUE_SHIFT 17
5733
5734
/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: OBSVELECIDLEOVERRIDE [16:16] */
5735
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEOVERRIDE_MASK 0x00010000
5736
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEOVERRIDE_ALIGN 0
5737
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEOVERRIDE_BITS 1
5738
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_OBSVELECIDLEOVERRIDE_SHIFT 16
5739
5740
/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: PLLISUPVALUE [15:15] */
5741
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPVALUE_MASK     0x00008000
5742
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPVALUE_ALIGN    0
5743
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPVALUE_BITS     1
5744
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPVALUE_SHIFT    15
5745
5746
/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: PLLISUPOVERRIDE [14:14] */
5747
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPOVERRIDE_MASK  0x00004000
5748
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPOVERRIDE_ALIGN 0
5749
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPOVERRIDE_BITS  1
5750
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_PLLISUPOVERRIDE_SHIFT 14
5751
5752
/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: RCVRDETVALUE [13:13] */
5753
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETVALUE_MASK     0x00002000
5754
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETVALUE_ALIGN    0
5755
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETVALUE_BITS     1
5756
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETVALUE_SHIFT    13
5757
5758
/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: RCVRDETOVERRIDE [12:12] */
5759
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETOVERRIDE_MASK  0x00001000
5760
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETOVERRIDE_ALIGN 0
5761
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETOVERRIDE_BITS  1
5762
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETOVERRIDE_SHIFT 12
5763
5764
/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: RCVRDETTIMECONTROL [11:10] */
5765
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETTIMECONTROL_MASK 0x00000c00
5766
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETTIMECONTROL_ALIGN 0
5767
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETTIMECONTROL_BITS 2
5768
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETTIMECONTROL_SHIFT 10
5769
5770
/* PCIE_PHY :: PHY_SERDES_CONTROL_OVERRIDE :: RCVRDETECTIONTIME [09:00] */
5771
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETECTIONTIME_MASK 0x000003ff
5772
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETECTIONTIME_ALIGN 0
5773
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETECTIONTIME_BITS 10
5774
#define PCIE_PHY_PHY_SERDES_CONTROL_OVERRIDE_RCVRDETECTIONTIME_SHIFT 0
5775
5776
5777
/****************************************************************************
5778
 * PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE
5779
 ***************************************************************************/
5780
/* PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE :: TS1NUMOVERRIDE [31:31] */
5781
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TS1NUMOVERRIDE_MASK 0x80000000
5782
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TS1NUMOVERRIDE_ALIGN 0
5783
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TS1NUMOVERRIDE_BITS 1
5784
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TS1NUMOVERRIDE_SHIFT 31
5785
5786
/* PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE :: TXIDLEMINOVERRIDE [30:30] */
5787
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINOVERRIDE_MASK 0x40000000
5788
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINOVERRIDE_ALIGN 0
5789
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINOVERRIDE_BITS 1
5790
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINOVERRIDE_SHIFT 30
5791
5792
/* PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE :: TXIDLE2IDLEOVERRIDE [29:29] */
5793
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLE2IDLEOVERRIDE_MASK 0x20000000
5794
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLE2IDLEOVERRIDE_ALIGN 0
5795
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLE2IDLEOVERRIDE_BITS 1
5796
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLE2IDLEOVERRIDE_SHIFT 29
5797
5798
/* PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE :: UNUSED_0 [28:28] */
5799
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_UNUSED_0_MASK       0x10000000
5800
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_UNUSED_0_ALIGN      0
5801
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_UNUSED_0_BITS       1
5802
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_UNUSED_0_SHIFT      28
5803
5804
/* PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE :: N_TS1INPOLLINGACTIVE [27:16] */
5805
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_N_TS1INPOLLINGACTIVE_MASK 0x0fff0000
5806
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_N_TS1INPOLLINGACTIVE_ALIGN 0
5807
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_N_TS1INPOLLINGACTIVE_BITS 12
5808
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_N_TS1INPOLLINGACTIVE_SHIFT 16
5809
5810
/* PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE :: TXIDLEMINTIME [15:08] */
5811
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINTIME_MASK  0x0000ff00
5812
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINTIME_ALIGN 0
5813
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINTIME_BITS  8
5814
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLEMINTIME_SHIFT 8
5815
5816
/* PCIE_PHY :: PHY_TIMING_PARAMETER_OVERRIDE :: TXIDLESETTOIDLETIME [07:00] */
5817
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLESETTOIDLETIME_MASK 0x000000ff
5818
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLESETTOIDLETIME_ALIGN 0
5819
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLESETTOIDLETIME_BITS 8
5820
#define PCIE_PHY_PHY_TIMING_PARAMETER_OVERRIDE_TXIDLESETTOIDLETIME_SHIFT 0
5821
5822
5823
/****************************************************************************
5824
 * PCIE_PHY :: PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES
5825
 ***************************************************************************/
5826
/* PCIE_PHY :: PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES :: RESERVED_0 [31:10] */
5827
#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RESERVED_0_MASK 0xfffffc00
5828
#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RESERVED_0_ALIGN 0
5829
#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RESERVED_0_BITS 22
5830
#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RESERVED_0_SHIFT 10
5831
5832
/* PCIE_PHY :: PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES :: TRANSMIT_STATE_MACHINE_STATE [09:04] */
5833
#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_TRANSMIT_STATE_MACHINE_STATE_MASK 0x000003f0
5834
#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_TRANSMIT_STATE_MACHINE_STATE_ALIGN 0
5835
#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_TRANSMIT_STATE_MACHINE_STATE_BITS 6
5836
#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_TRANSMIT_STATE_MACHINE_STATE_SHIFT 4
5837
5838
/* PCIE_PHY :: PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES :: RECEIVE_STATE_MACHINE_STATE [03:00] */
5839
#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RECEIVE_STATE_MACHINE_STATE_MASK 0x0000000f
5840
#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RECEIVE_STATE_MACHINE_STATE_ALIGN 0
5841
#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RECEIVE_STATE_MACHINE_STATE_BITS 4
5842
#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC1_TX_RX_SM_STATES_RECEIVE_STATE_MACHINE_STATE_SHIFT 0
5843
5844
5845
/****************************************************************************
5846
 * PCIE_PHY :: PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES
5847
 ***************************************************************************/
5848
/* PCIE_PHY :: PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES :: LTSSM_STATE_MACHINE_STATE [31:00] */
5849
#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES_LTSSM_STATE_MACHINE_STATE_MASK 0xffffffff
5850
#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES_LTSSM_STATE_MACHINE_STATE_ALIGN 0
5851
#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES_LTSSM_STATE_MACHINE_STATE_BITS 32
5852
#define PCIE_PHY_PHY_HARDWARE_DIAGNOSTIC2_LTSSM_STATES_LTSSM_STATE_MACHINE_STATE_SHIFT 0
5853
5854
5855
/****************************************************************************
5856
 * BCM70012_TGT_TOP_INTR
5857
 ***************************************************************************/
5858
/****************************************************************************
5859
 * INTR :: INTR_STATUS
5860
 ***************************************************************************/
5861
/* INTR :: INTR_STATUS :: reserved0 [31:26] */
5862
#define INTR_INTR_STATUS_reserved0_MASK                            0xfc000000
5863
#define INTR_INTR_STATUS_reserved0_ALIGN                           0
5864
#define INTR_INTR_STATUS_reserved0_BITS                            6
5865
#define INTR_INTR_STATUS_reserved0_SHIFT                           26
5866
5867
/* INTR :: INTR_STATUS :: PCIE_TGT_CA_ATTN [25:25] */
5868
#define INTR_INTR_STATUS_PCIE_TGT_CA_ATTN_MASK                     0x02000000
5869
#define INTR_INTR_STATUS_PCIE_TGT_CA_ATTN_ALIGN                    0
5870
#define INTR_INTR_STATUS_PCIE_TGT_CA_ATTN_BITS                     1
5871
#define INTR_INTR_STATUS_PCIE_TGT_CA_ATTN_SHIFT                    25
5872
5873
/* INTR :: INTR_STATUS :: PCIE_TGT_UR_ATTN [24:24] */
5874
#define INTR_INTR_STATUS_PCIE_TGT_UR_ATTN_MASK                     0x01000000
5875
#define INTR_INTR_STATUS_PCIE_TGT_UR_ATTN_ALIGN                    0
5876
#define INTR_INTR_STATUS_PCIE_TGT_UR_ATTN_BITS                     1
5877
#define INTR_INTR_STATUS_PCIE_TGT_UR_ATTN_SHIFT                    24
5878
5879
/* INTR :: INTR_STATUS :: reserved1 [23:14] */
5880
#define INTR_INTR_STATUS_reserved1_MASK                            0x00ffc000
5881
#define INTR_INTR_STATUS_reserved1_ALIGN                           0
5882
#define INTR_INTR_STATUS_reserved1_BITS                            10
5883
#define INTR_INTR_STATUS_reserved1_SHIFT                           14
5884
5885
/* INTR :: INTR_STATUS :: L1_UV_RX_DMA_ERR_INTR [13:13] */
5886
#define INTR_INTR_STATUS_L1_UV_RX_DMA_ERR_INTR_MASK                0x00002000
5887
#define INTR_INTR_STATUS_L1_UV_RX_DMA_ERR_INTR_ALIGN               0
5888
#define INTR_INTR_STATUS_L1_UV_RX_DMA_ERR_INTR_BITS                1
5889
#define INTR_INTR_STATUS_L1_UV_RX_DMA_ERR_INTR_SHIFT               13
5890
5891
/* INTR :: INTR_STATUS :: L1_UV_RX_DMA_DONE_INTR [12:12] */
5892
#define INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_MASK               0x00001000
5893
#define INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_ALIGN              0
5894
#define INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_BITS               1
5895
#define INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_SHIFT              12
5896
5897
/* INTR :: INTR_STATUS :: L1_Y_RX_DMA_ERR_INTR [11:11] */
5898
#define INTR_INTR_STATUS_L1_Y_RX_DMA_ERR_INTR_MASK                 0x00000800
5899
#define INTR_INTR_STATUS_L1_Y_RX_DMA_ERR_INTR_ALIGN                0
5900
#define INTR_INTR_STATUS_L1_Y_RX_DMA_ERR_INTR_BITS                 1
5901
#define INTR_INTR_STATUS_L1_Y_RX_DMA_ERR_INTR_SHIFT                11
5902
5903
/* INTR :: INTR_STATUS :: L1_Y_RX_DMA_DONE_INTR [10:10] */
5904
#define INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_MASK                0x00000400
5905
#define INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_ALIGN               0
5906
#define INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_BITS                1
5907
#define INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_SHIFT               10
5908
5909
/* INTR :: INTR_STATUS :: L1_TX_DMA_ERR_INTR [09:09] */
5910
#define INTR_INTR_STATUS_L1_TX_DMA_ERR_INTR_MASK                   0x00000200
5911
#define INTR_INTR_STATUS_L1_TX_DMA_ERR_INTR_ALIGN                  0
5912
#define INTR_INTR_STATUS_L1_TX_DMA_ERR_INTR_BITS                   1
5913
#define INTR_INTR_STATUS_L1_TX_DMA_ERR_INTR_SHIFT                  9
5914
5915
/* INTR :: INTR_STATUS :: L1_TX_DMA_DONE_INTR [08:08] */
5916
#define INTR_INTR_STATUS_L1_TX_DMA_DONE_INTR_MASK                  0x00000100
5917
#define INTR_INTR_STATUS_L1_TX_DMA_DONE_INTR_ALIGN                 0
5918
#define INTR_INTR_STATUS_L1_TX_DMA_DONE_INTR_BITS                  1
5919
#define INTR_INTR_STATUS_L1_TX_DMA_DONE_INTR_SHIFT                 8
5920
5921
/* INTR :: INTR_STATUS :: reserved2 [07:06] */
5922
#define INTR_INTR_STATUS_reserved2_MASK                            0x000000c0
5923
#define INTR_INTR_STATUS_reserved2_ALIGN                           0
5924
#define INTR_INTR_STATUS_reserved2_BITS                            2
5925
#define INTR_INTR_STATUS_reserved2_SHIFT                           6
5926
5927
/* INTR :: INTR_STATUS :: L0_UV_RX_DMA_ERR_INTR [05:05] */
5928
#define INTR_INTR_STATUS_L0_UV_RX_DMA_ERR_INTR_MASK                0x00000020
5929
#define INTR_INTR_STATUS_L0_UV_RX_DMA_ERR_INTR_ALIGN               0
5930
#define INTR_INTR_STATUS_L0_UV_RX_DMA_ERR_INTR_BITS                1
5931
#define INTR_INTR_STATUS_L0_UV_RX_DMA_ERR_INTR_SHIFT               5
5932
5933
/* INTR :: INTR_STATUS :: L0_UV_RX_DMA_DONE_INTR [04:04] */
5934
#define INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_MASK               0x00000010
5935
#define INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_ALIGN              0
5936
#define INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_BITS               1
5937
#define INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_SHIFT              4
5938
5939
/* INTR :: INTR_STATUS :: L0_Y_RX_DMA_ERR_INTR [03:03] */
5940
#define INTR_INTR_STATUS_L0_Y_RX_DMA_ERR_INTR_MASK                 0x00000008
5941
#define INTR_INTR_STATUS_L0_Y_RX_DMA_ERR_INTR_ALIGN                0
5942
#define INTR_INTR_STATUS_L0_Y_RX_DMA_ERR_INTR_BITS                 1
5943
#define INTR_INTR_STATUS_L0_Y_RX_DMA_ERR_INTR_SHIFT                3
5944
5945
/* INTR :: INTR_STATUS :: L0_Y_RX_DMA_DONE_INTR [02:02] */
5946
#define INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_MASK                0x00000004
5947
#define INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_ALIGN               0
5948
#define INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_BITS                1
5949
#define INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_SHIFT               2
5950
5951
/* INTR :: INTR_STATUS :: L0_TX_DMA_ERR_INTR [01:01] */
5952
#define INTR_INTR_STATUS_L0_TX_DMA_ERR_INTR_MASK                   0x00000002
5953
#define INTR_INTR_STATUS_L0_TX_DMA_ERR_INTR_ALIGN                  0
5954
#define INTR_INTR_STATUS_L0_TX_DMA_ERR_INTR_BITS                   1
5955
#define INTR_INTR_STATUS_L0_TX_DMA_ERR_INTR_SHIFT                  1
5956
5957
/* INTR :: INTR_STATUS :: L0_TX_DMA_DONE_INTR [00:00] */
5958
#define INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_MASK                  0x00000001
5959
#define INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_ALIGN                 0
5960
#define INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_BITS                  1
5961
#define INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_SHIFT                 0
5962
5963
5964
/****************************************************************************
5965
 * INTR :: INTR_SET
5966
 ***************************************************************************/
5967
/* INTR :: INTR_SET :: reserved0 [31:26] */
5968
#define INTR_INTR_SET_reserved0_MASK                               0xfc000000
5969
#define INTR_INTR_SET_reserved0_ALIGN                              0
5970
#define INTR_INTR_SET_reserved0_BITS                               6
5971
#define INTR_INTR_SET_reserved0_SHIFT                              26
5972
5973
/* INTR :: INTR_SET :: PCIE_TGT_CA_ATTN [25:25] */
5974
#define INTR_INTR_SET_PCIE_TGT_CA_ATTN_MASK                        0x02000000
5975
#define INTR_INTR_SET_PCIE_TGT_CA_ATTN_ALIGN                       0
5976
#define INTR_INTR_SET_PCIE_TGT_CA_ATTN_BITS                        1
5977
#define INTR_INTR_SET_PCIE_TGT_CA_ATTN_SHIFT                       25
5978
5979
/* INTR :: INTR_SET :: PCIE_TGT_UR_ATTN [24:24] */
5980
#define INTR_INTR_SET_PCIE_TGT_UR_ATTN_MASK                        0x01000000
5981
#define INTR_INTR_SET_PCIE_TGT_UR_ATTN_ALIGN                       0
5982
#define INTR_INTR_SET_PCIE_TGT_UR_ATTN_BITS                        1
5983
#define INTR_INTR_SET_PCIE_TGT_UR_ATTN_SHIFT                       24
5984
5985
/* INTR :: INTR_SET :: reserved1 [23:14] */
5986
#define INTR_INTR_SET_reserved1_MASK                               0x00ffc000
5987
#define INTR_INTR_SET_reserved1_ALIGN                              0
5988
#define INTR_INTR_SET_reserved1_BITS                               10
5989
#define INTR_INTR_SET_reserved1_SHIFT                              14
5990
5991
/* INTR :: INTR_SET :: UV_RX_DMA_L1_ERR_INTR [13:13] */
5992
#define INTR_INTR_SET_UV_RX_DMA_L1_ERR_INTR_MASK                   0x00002000
5993
#define INTR_INTR_SET_UV_RX_DMA_L1_ERR_INTR_ALIGN                  0
5994
#define INTR_INTR_SET_UV_RX_DMA_L1_ERR_INTR_BITS                   1
5995
#define INTR_INTR_SET_UV_RX_DMA_L1_ERR_INTR_SHIFT                  13
5996
5997
/* INTR :: INTR_SET :: UV_RX_DMA_L1_DONE_INTR [12:12] */
5998
#define INTR_INTR_SET_UV_RX_DMA_L1_DONE_INTR_MASK                  0x00001000
5999
#define INTR_INTR_SET_UV_RX_DMA_L1_DONE_INTR_ALIGN                 0
6000
#define INTR_INTR_SET_UV_RX_DMA_L1_DONE_INTR_BITS                  1
6001
#define INTR_INTR_SET_UV_RX_DMA_L1_DONE_INTR_SHIFT                 12
6002
6003
/* INTR :: INTR_SET :: Y_RX_DMA_L1_ERR_INTR [11:11] */
6004
#define INTR_INTR_SET_Y_RX_DMA_L1_ERR_INTR_MASK                    0x00000800
6005
#define INTR_INTR_SET_Y_RX_DMA_L1_ERR_INTR_ALIGN                   0
6006
#define INTR_INTR_SET_Y_RX_DMA_L1_ERR_INTR_BITS                    1
6007
#define INTR_INTR_SET_Y_RX_DMA_L1_ERR_INTR_SHIFT                   11
6008
6009
/* INTR :: INTR_SET :: Y_RX_DMA_L1_DONE_INTR [10:10] */
6010
#define INTR_INTR_SET_Y_RX_DMA_L1_DONE_INTR_MASK                   0x00000400
6011
#define INTR_INTR_SET_Y_RX_DMA_L1_DONE_INTR_ALIGN                  0
6012
#define INTR_INTR_SET_Y_RX_DMA_L1_DONE_INTR_BITS                   1
6013
#define INTR_INTR_SET_Y_RX_DMA_L1_DONE_INTR_SHIFT                  10
6014
6015
/* INTR :: INTR_SET :: TX_DMA_L1_ERR_INTR [09:09] */
6016
#define INTR_INTR_SET_TX_DMA_L1_ERR_INTR_MASK                      0x00000200
6017
#define INTR_INTR_SET_TX_DMA_L1_ERR_INTR_ALIGN                     0
6018
#define INTR_INTR_SET_TX_DMA_L1_ERR_INTR_BITS                      1
6019
#define INTR_INTR_SET_TX_DMA_L1_ERR_INTR_SHIFT                     9
6020
6021
/* INTR :: INTR_SET :: TX_DMA_L1_DONE_INTR [08:08] */
6022
#define INTR_INTR_SET_TX_DMA_L1_DONE_INTR_MASK                     0x00000100
6023
#define INTR_INTR_SET_TX_DMA_L1_DONE_INTR_ALIGN                    0
6024
#define INTR_INTR_SET_TX_DMA_L1_DONE_INTR_BITS                     1
6025
#define INTR_INTR_SET_TX_DMA_L1_DONE_INTR_SHIFT                    8
6026
6027
/* INTR :: INTR_SET :: reserved2 [07:06] */
6028
#define INTR_INTR_SET_reserved2_MASK                               0x000000c0
6029
#define INTR_INTR_SET_reserved2_ALIGN                              0
6030
#define INTR_INTR_SET_reserved2_BITS                               2
6031
#define INTR_INTR_SET_reserved2_SHIFT                              6
6032
6033
/* INTR :: INTR_SET :: UV_RX_DMA_L0_ERR_INTR [05:05] */
6034
#define INTR_INTR_SET_UV_RX_DMA_L0_ERR_INTR_MASK                   0x00000020
6035
#define INTR_INTR_SET_UV_RX_DMA_L0_ERR_INTR_ALIGN                  0
6036
#define INTR_INTR_SET_UV_RX_DMA_L0_ERR_INTR_BITS                   1
6037
#define INTR_INTR_SET_UV_RX_DMA_L0_ERR_INTR_SHIFT                  5
6038
6039
/* INTR :: INTR_SET :: UV_RX_DMA_L0_DONE_INTR [04:04] */
6040
#define INTR_INTR_SET_UV_RX_DMA_L0_DONE_INTR_MASK                  0x00000010
6041
#define INTR_INTR_SET_UV_RX_DMA_L0_DONE_INTR_ALIGN                 0
6042
#define INTR_INTR_SET_UV_RX_DMA_L0_DONE_INTR_BITS                  1
6043
#define INTR_INTR_SET_UV_RX_DMA_L0_DONE_INTR_SHIFT                 4
6044
6045
/* INTR :: INTR_SET :: Y_RX_DMA_L0_ERR_INTR [03:03] */
6046
#define INTR_INTR_SET_Y_RX_DMA_L0_ERR_INTR_MASK                    0x00000008
6047
#define INTR_INTR_SET_Y_RX_DMA_L0_ERR_INTR_ALIGN                   0
6048
#define INTR_INTR_SET_Y_RX_DMA_L0_ERR_INTR_BITS                    1
6049
#define INTR_INTR_SET_Y_RX_DMA_L0_ERR_INTR_SHIFT                   3
6050
6051
/* INTR :: INTR_SET :: Y_RX_DMA_L0_DONE_INTR [02:02] */
6052
#define INTR_INTR_SET_Y_RX_DMA_L0_DONE_INTR_MASK                   0x00000004
6053
#define INTR_INTR_SET_Y_RX_DMA_L0_DONE_INTR_ALIGN                  0
6054
#define INTR_INTR_SET_Y_RX_DMA_L0_DONE_INTR_BITS                   1
6055
#define INTR_INTR_SET_Y_RX_DMA_L0_DONE_INTR_SHIFT                  2
6056
6057
/* INTR :: INTR_SET :: TX_DMA_L0_ERR_INTR [01:01] */
6058
#define INTR_INTR_SET_TX_DMA_L0_ERR_INTR_MASK                      0x00000002
6059
#define INTR_INTR_SET_TX_DMA_L0_ERR_INTR_ALIGN                     0
6060
#define INTR_INTR_SET_TX_DMA_L0_ERR_INTR_BITS                      1
6061
#define INTR_INTR_SET_TX_DMA_L0_ERR_INTR_SHIFT                     1
6062
6063
/* INTR :: INTR_SET :: TX_DMA_L0_DONE_INTR [00:00] */
6064
#define INTR_INTR_SET_TX_DMA_L0_DONE_INTR_MASK                     0x00000001
6065
#define INTR_INTR_SET_TX_DMA_L0_DONE_INTR_ALIGN                    0
6066
#define INTR_INTR_SET_TX_DMA_L0_DONE_INTR_BITS                     1
6067
#define INTR_INTR_SET_TX_DMA_L0_DONE_INTR_SHIFT                    0
6068
6069
6070
/****************************************************************************
6071
 * INTR :: INTR_CLR_REG
6072
 ***************************************************************************/
6073
/* INTR :: INTR_CLR_REG :: reserved0 [31:26] */
6074
#define INTR_INTR_CLR_REG_reserved0_MASK                           0xfc000000
6075
#define INTR_INTR_CLR_REG_reserved0_ALIGN                          0
6076
#define INTR_INTR_CLR_REG_reserved0_BITS                           6
6077
#define INTR_INTR_CLR_REG_reserved0_SHIFT                          26
6078
6079
/* INTR :: INTR_CLR_REG :: PCIE_TGT_CA_ATTN [25:25] */
6080
#define INTR_INTR_CLR_REG_PCIE_TGT_CA_ATTN_MASK                    0x02000000
6081
#define INTR_INTR_CLR_REG_PCIE_TGT_CA_ATTN_ALIGN                   0
6082
#define INTR_INTR_CLR_REG_PCIE_TGT_CA_ATTN_BITS                    1
6083
#define INTR_INTR_CLR_REG_PCIE_TGT_CA_ATTN_SHIFT                   25
6084
6085
/* INTR :: INTR_CLR_REG :: PCIE_TGT_UR_ATTN [24:24] */
6086
#define INTR_INTR_CLR_REG_PCIE_TGT_UR_ATTN_MASK                    0x01000000
6087
#define INTR_INTR_CLR_REG_PCIE_TGT_UR_ATTN_ALIGN                   0
6088
#define INTR_INTR_CLR_REG_PCIE_TGT_UR_ATTN_BITS                    1
6089
#define INTR_INTR_CLR_REG_PCIE_TGT_UR_ATTN_SHIFT                   24
6090
6091
/* INTR :: INTR_CLR_REG :: reserved1 [23:14] */
6092
#define INTR_INTR_CLR_REG_reserved1_MASK                           0x00ffc000
6093
#define INTR_INTR_CLR_REG_reserved1_ALIGN                          0
6094
#define INTR_INTR_CLR_REG_reserved1_BITS                           10
6095
#define INTR_INTR_CLR_REG_reserved1_SHIFT                          14
6096
6097
/* INTR :: INTR_CLR_REG :: L1_UV_RX_DMA_ERR_INTR_CLR [13:13] */
6098
#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_ERR_INTR_CLR_MASK           0x00002000
6099
#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_ERR_INTR_CLR_ALIGN          0
6100
#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_ERR_INTR_CLR_BITS           1
6101
#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_ERR_INTR_CLR_SHIFT          13
6102
6103
/* INTR :: INTR_CLR_REG :: L1_UV_RX_DMA_DONE_INTR_CLR [12:12] */
6104
#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_DONE_INTR_CLR_MASK          0x00001000
6105
#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_DONE_INTR_CLR_ALIGN         0
6106
#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_DONE_INTR_CLR_BITS          1
6107
#define INTR_INTR_CLR_REG_L1_UV_RX_DMA_DONE_INTR_CLR_SHIFT         12
6108
6109
/* INTR :: INTR_CLR_REG :: L1_Y_RX_DMA_ERR_INTR_CLR [11:11] */
6110
#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_ERR_INTR_CLR_MASK            0x00000800
6111
#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_ERR_INTR_CLR_ALIGN           0
6112
#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_ERR_INTR_CLR_BITS            1
6113
#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_ERR_INTR_CLR_SHIFT           11
6114
6115
/* INTR :: INTR_CLR_REG :: L1_Y_RX_DMA_DONE_INTR_CLR [10:10] */
6116
#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_DONE_INTR_CLR_MASK           0x00000400
6117
#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_DONE_INTR_CLR_ALIGN          0
6118
#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_DONE_INTR_CLR_BITS           1
6119
#define INTR_INTR_CLR_REG_L1_Y_RX_DMA_DONE_INTR_CLR_SHIFT          10
6120
6121
/* INTR :: INTR_CLR_REG :: L1_TX_DMA_ERR_INTR_CLR [09:09] */
6122
#define INTR_INTR_CLR_REG_L1_TX_DMA_ERR_INTR_CLR_MASK              0x00000200
6123
#define INTR_INTR_CLR_REG_L1_TX_DMA_ERR_INTR_CLR_ALIGN             0
6124
#define INTR_INTR_CLR_REG_L1_TX_DMA_ERR_INTR_CLR_BITS              1
6125
#define INTR_INTR_CLR_REG_L1_TX_DMA_ERR_INTR_CLR_SHIFT             9
6126
6127
/* INTR :: INTR_CLR_REG :: L1_TX_DMA_DONE_INTR_CLR [08:08] */
6128
#define INTR_INTR_CLR_REG_L1_TX_DMA_DONE_INTR_CLR_MASK             0x00000100
6129
#define INTR_INTR_CLR_REG_L1_TX_DMA_DONE_INTR_CLR_ALIGN            0
6130
#define INTR_INTR_CLR_REG_L1_TX_DMA_DONE_INTR_CLR_BITS             1
6131
#define INTR_INTR_CLR_REG_L1_TX_DMA_DONE_INTR_CLR_SHIFT            8
6132
6133
/* INTR :: INTR_CLR_REG :: reserved2 [07:06] */
6134
#define INTR_INTR_CLR_REG_reserved2_MASK                           0x000000c0
6135
#define INTR_INTR_CLR_REG_reserved2_ALIGN                          0
6136
#define INTR_INTR_CLR_REG_reserved2_BITS                           2
6137
#define INTR_INTR_CLR_REG_reserved2_SHIFT                          6
6138
6139
/* INTR :: INTR_CLR_REG :: L0_UV_RX_DMA_ERR_INTR_CLR [05:05] */
6140
#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_ERR_INTR_CLR_MASK           0x00000020
6141
#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_ERR_INTR_CLR_ALIGN          0
6142
#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_ERR_INTR_CLR_BITS           1
6143
#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_ERR_INTR_CLR_SHIFT          5
6144
6145
/* INTR :: INTR_CLR_REG :: L0_UV_RX_DMA_DONE_INTR_CLR [04:04] */
6146
#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_DONE_INTR_CLR_MASK          0x00000010
6147
#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_DONE_INTR_CLR_ALIGN         0
6148
#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_DONE_INTR_CLR_BITS          1
6149
#define INTR_INTR_CLR_REG_L0_UV_RX_DMA_DONE_INTR_CLR_SHIFT         4
6150
6151
/* INTR :: INTR_CLR_REG :: L0_Y_RX_DMA_ERR_INTR_CLR [03:03] */
6152
#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_ERR_INTR_CLR_MASK            0x00000008
6153
#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_ERR_INTR_CLR_ALIGN           0
6154
#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_ERR_INTR_CLR_BITS            1
6155
#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_ERR_INTR_CLR_SHIFT           3
6156
6157
/* INTR :: INTR_CLR_REG :: L0_Y_RX_DMA_DONE_INTR_CLR [02:02] */
6158
#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_DONE_INTR_CLR_MASK           0x00000004
6159
#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_DONE_INTR_CLR_ALIGN          0
6160
#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_DONE_INTR_CLR_BITS           1
6161
#define INTR_INTR_CLR_REG_L0_Y_RX_DMA_DONE_INTR_CLR_SHIFT          2
6162
6163
/* INTR :: INTR_CLR_REG :: L0_TX_DMA_ERR_INTR_CLR [01:01] */
6164
#define INTR_INTR_CLR_REG_L0_TX_DMA_ERR_INTR_CLR_MASK              0x00000002
6165
#define INTR_INTR_CLR_REG_L0_TX_DMA_ERR_INTR_CLR_ALIGN             0
6166
#define INTR_INTR_CLR_REG_L0_TX_DMA_ERR_INTR_CLR_BITS              1
6167
#define INTR_INTR_CLR_REG_L0_TX_DMA_ERR_INTR_CLR_SHIFT             1
6168
6169
/* INTR :: INTR_CLR_REG :: L0_TX_DMA_DONE_INTR_CLR [00:00] */
6170
#define INTR_INTR_CLR_REG_L0_TX_DMA_DONE_INTR_CLR_MASK             0x00000001
6171
#define INTR_INTR_CLR_REG_L0_TX_DMA_DONE_INTR_CLR_ALIGN            0
6172
#define INTR_INTR_CLR_REG_L0_TX_DMA_DONE_INTR_CLR_BITS             1
6173
#define INTR_INTR_CLR_REG_L0_TX_DMA_DONE_INTR_CLR_SHIFT            0
6174
6175
6176
/****************************************************************************
6177
 * INTR :: INTR_MSK_STS_REG
6178
 ***************************************************************************/
6179
/* INTR :: INTR_MSK_STS_REG :: reserved0 [31:26] */
6180
#define INTR_INTR_MSK_STS_REG_reserved0_MASK                       0xfc000000
6181
#define INTR_INTR_MSK_STS_REG_reserved0_ALIGN                      0
6182
#define INTR_INTR_MSK_STS_REG_reserved0_BITS                       6
6183
#define INTR_INTR_MSK_STS_REG_reserved0_SHIFT                      26
6184
6185
/* INTR :: INTR_MSK_STS_REG :: PCIE_TGT_CA_ATTN [25:25] */
6186
#define INTR_INTR_MSK_STS_REG_PCIE_TGT_CA_ATTN_MASK                0x02000000
6187
#define INTR_INTR_MSK_STS_REG_PCIE_TGT_CA_ATTN_ALIGN               0
6188
#define INTR_INTR_MSK_STS_REG_PCIE_TGT_CA_ATTN_BITS                1
6189
#define INTR_INTR_MSK_STS_REG_PCIE_TGT_CA_ATTN_SHIFT               25
6190
6191
/* INTR :: INTR_MSK_STS_REG :: PCIE_TGT_UR_ATTN [24:24] */
6192
#define INTR_INTR_MSK_STS_REG_PCIE_TGT_UR_ATTN_MASK                0x01000000
6193
#define INTR_INTR_MSK_STS_REG_PCIE_TGT_UR_ATTN_ALIGN               0
6194
#define INTR_INTR_MSK_STS_REG_PCIE_TGT_UR_ATTN_BITS                1
6195
#define INTR_INTR_MSK_STS_REG_PCIE_TGT_UR_ATTN_SHIFT               24
6196
6197
/* INTR :: INTR_MSK_STS_REG :: reserved1 [23:14] */
6198
#define INTR_INTR_MSK_STS_REG_reserved1_MASK                       0x00ffc000
6199
#define INTR_INTR_MSK_STS_REG_reserved1_ALIGN                      0
6200
#define INTR_INTR_MSK_STS_REG_reserved1_BITS                       10
6201
#define INTR_INTR_MSK_STS_REG_reserved1_SHIFT                      14
6202
6203
/* INTR :: INTR_MSK_STS_REG :: L1_UV_RX_DMA_ERR_INTR_MSK [13:13] */
6204
#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_ERR_INTR_MSK_MASK       0x00002000
6205
#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_ERR_INTR_MSK_ALIGN      0
6206
#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_ERR_INTR_MSK_BITS       1
6207
#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_ERR_INTR_MSK_SHIFT      13
6208
6209
/* INTR :: INTR_MSK_STS_REG :: L1_UV_RX_DMA_DONE_INTR_MSK [12:12] */
6210
#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_DONE_INTR_MSK_MASK      0x00001000
6211
#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_DONE_INTR_MSK_ALIGN     0
6212
#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_DONE_INTR_MSK_BITS      1
6213
#define INTR_INTR_MSK_STS_REG_L1_UV_RX_DMA_DONE_INTR_MSK_SHIFT     12
6214
6215
/* INTR :: INTR_MSK_STS_REG :: LIST1_Y_RX_DMA_ERR_INTR_MSK [11:11] */
6216
#define INTR_INTR_MSK_STS_REG_LIST1_Y_RX_DMA_ERR_INTR_MSK_MASK     0x00000800
6217
#define INTR_INTR_MSK_STS_REG_LIST1_Y_RX_DMA_ERR_INTR_MSK_ALIGN    0
6218
#define INTR_INTR_MSK_STS_REG_LIST1_Y_RX_DMA_ERR_INTR_MSK_BITS     1
6219
#define INTR_INTR_MSK_STS_REG_LIST1_Y_RX_DMA_ERR_INTR_MSK_SHIFT    11
6220
6221
/* INTR :: INTR_MSK_STS_REG :: L1_Y_RX_DMA_DONE_INTR_MSK [10:10] */
6222
#define INTR_INTR_MSK_STS_REG_L1_Y_RX_DMA_DONE_INTR_MSK_MASK       0x00000400
6223
#define INTR_INTR_MSK_STS_REG_L1_Y_RX_DMA_DONE_INTR_MSK_ALIGN      0
6224
#define INTR_INTR_MSK_STS_REG_L1_Y_RX_DMA_DONE_INTR_MSK_BITS       1
6225
#define INTR_INTR_MSK_STS_REG_L1_Y_RX_DMA_DONE_INTR_MSK_SHIFT      10
6226
6227
/* INTR :: INTR_MSK_STS_REG :: L1_TX_DMA_ERR_INTR_MSK [09:09] */
6228
#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_ERR_INTR_MSK_MASK          0x00000200
6229
#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_ERR_INTR_MSK_ALIGN         0
6230
#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_ERR_INTR_MSK_BITS          1
6231
#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_ERR_INTR_MSK_SHIFT         9
6232
6233
/* INTR :: INTR_MSK_STS_REG :: L1_TX_DMA_DONE_INTR_MSK [08:08] */
6234
#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_DONE_INTR_MSK_MASK         0x00000100
6235
#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_DONE_INTR_MSK_ALIGN        0
6236
#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_DONE_INTR_MSK_BITS         1
6237
#define INTR_INTR_MSK_STS_REG_L1_TX_DMA_DONE_INTR_MSK_SHIFT        8
6238
6239
/* INTR :: INTR_MSK_STS_REG :: reserved2 [07:06] */
6240
#define INTR_INTR_MSK_STS_REG_reserved2_MASK                       0x000000c0
6241
#define INTR_INTR_MSK_STS_REG_reserved2_ALIGN                      0
6242
#define INTR_INTR_MSK_STS_REG_reserved2_BITS                       2
6243
#define INTR_INTR_MSK_STS_REG_reserved2_SHIFT                      6
6244
6245
/* INTR :: INTR_MSK_STS_REG :: L0_UV_RX_DMA_ERR_INTR_MSK [05:05] */
6246
#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_ERR_INTR_MSK_MASK       0x00000020
6247
#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_ERR_INTR_MSK_ALIGN      0
6248
#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_ERR_INTR_MSK_BITS       1
6249
#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_ERR_INTR_MSK_SHIFT      5
6250
6251
/* INTR :: INTR_MSK_STS_REG :: L0_UV_RX_DMA_DONE_INTR_MSK [04:04] */
6252
#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_DONE_INTR_MSK_MASK      0x00000010
6253
#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_DONE_INTR_MSK_ALIGN     0
6254
#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_DONE_INTR_MSK_BITS      1
6255
#define INTR_INTR_MSK_STS_REG_L0_UV_RX_DMA_DONE_INTR_MSK_SHIFT     4
6256
6257
/* INTR :: INTR_MSK_STS_REG :: LIST0_Y_RX_DMA_ERR_INTR_MSK [03:03] */
6258
#define INTR_INTR_MSK_STS_REG_LIST0_Y_RX_DMA_ERR_INTR_MSK_MASK     0x00000008
6259
#define INTR_INTR_MSK_STS_REG_LIST0_Y_RX_DMA_ERR_INTR_MSK_ALIGN    0
6260
#define INTR_INTR_MSK_STS_REG_LIST0_Y_RX_DMA_ERR_INTR_MSK_BITS     1
6261
#define INTR_INTR_MSK_STS_REG_LIST0_Y_RX_DMA_ERR_INTR_MSK_SHIFT    3
6262
6263
/* INTR :: INTR_MSK_STS_REG :: L0_Y_RX_DMA_DONE_INTR_MSK [02:02] */
6264
#define INTR_INTR_MSK_STS_REG_L0_Y_RX_DMA_DONE_INTR_MSK_MASK       0x00000004
6265
#define INTR_INTR_MSK_STS_REG_L0_Y_RX_DMA_DONE_INTR_MSK_ALIGN      0
6266
#define INTR_INTR_MSK_STS_REG_L0_Y_RX_DMA_DONE_INTR_MSK_BITS       1
6267
#define INTR_INTR_MSK_STS_REG_L0_Y_RX_DMA_DONE_INTR_MSK_SHIFT      2
6268
6269
/* INTR :: INTR_MSK_STS_REG :: L0_TX_DMA_ERR_INTR_MSK [01:01] */
6270
#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_ERR_INTR_MSK_MASK          0x00000002
6271
#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_ERR_INTR_MSK_ALIGN         0
6272
#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_ERR_INTR_MSK_BITS          1
6273
#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_ERR_INTR_MSK_SHIFT         1
6274
6275
/* INTR :: INTR_MSK_STS_REG :: L0_TX_DMA_DONE_INTR_MSK [00:00] */
6276
#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_DONE_INTR_MSK_MASK         0x00000001
6277
#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_DONE_INTR_MSK_ALIGN        0
6278
#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_DONE_INTR_MSK_BITS         1
6279
#define INTR_INTR_MSK_STS_REG_L0_TX_DMA_DONE_INTR_MSK_SHIFT        0
6280
6281
6282
/****************************************************************************
6283
 * INTR :: INTR_MSK_SET_REG
6284
 ***************************************************************************/
6285
/* INTR :: INTR_MSK_SET_REG :: reserved0 [31:26] */
6286
#define INTR_INTR_MSK_SET_REG_reserved0_MASK                       0xfc000000
6287
#define INTR_INTR_MSK_SET_REG_reserved0_ALIGN                      0
6288
#define INTR_INTR_MSK_SET_REG_reserved0_BITS                       6
6289
#define INTR_INTR_MSK_SET_REG_reserved0_SHIFT                      26
6290
6291
/* INTR :: INTR_MSK_SET_REG :: PCIE_TGT_CA_ATTN [25:25] */
6292
#define INTR_INTR_MSK_SET_REG_PCIE_TGT_CA_ATTN_MASK                0x02000000
6293
#define INTR_INTR_MSK_SET_REG_PCIE_TGT_CA_ATTN_ALIGN               0
6294
#define INTR_INTR_MSK_SET_REG_PCIE_TGT_CA_ATTN_BITS                1
6295
#define INTR_INTR_MSK_SET_REG_PCIE_TGT_CA_ATTN_SHIFT               25
6296
6297
/* INTR :: INTR_MSK_SET_REG :: PCIE_TGT_UR_ATTN [24:24] */
6298
#define INTR_INTR_MSK_SET_REG_PCIE_TGT_UR_ATTN_MASK                0x01000000
6299
#define INTR_INTR_MSK_SET_REG_PCIE_TGT_UR_ATTN_ALIGN               0
6300
#define INTR_INTR_MSK_SET_REG_PCIE_TGT_UR_ATTN_BITS                1
6301
#define INTR_INTR_MSK_SET_REG_PCIE_TGT_UR_ATTN_SHIFT               24
6302
6303
/* INTR :: INTR_MSK_SET_REG :: reserved1 [23:14] */
6304
#define INTR_INTR_MSK_SET_REG_reserved1_MASK                       0x00ffc000
6305
#define INTR_INTR_MSK_SET_REG_reserved1_ALIGN                      0
6306
#define INTR_INTR_MSK_SET_REG_reserved1_BITS                       10
6307
#define INTR_INTR_MSK_SET_REG_reserved1_SHIFT                      14
6308
6309
/* INTR :: INTR_MSK_SET_REG :: L1_UV_RX_DMA_ERR_INTR_MSK_SET [13:13] */
6310
#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_ERR_INTR_MSK_SET_MASK   0x00002000
6311
#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_ERR_INTR_MSK_SET_ALIGN  0
6312
#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_ERR_INTR_MSK_SET_BITS   1
6313
#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_ERR_INTR_MSK_SET_SHIFT  13
6314
6315
/* INTR :: INTR_MSK_SET_REG :: L1_UV_RX_DMA_DONE_INTR_MSK_SET [12:12] */
6316
#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_DONE_INTR_MSK_SET_MASK  0x00001000
6317
#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_DONE_INTR_MSK_SET_ALIGN 0
6318
#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_DONE_INTR_MSK_SET_BITS  1
6319
#define INTR_INTR_MSK_SET_REG_L1_UV_RX_DMA_DONE_INTR_MSK_SET_SHIFT 12
6320
6321
/* INTR :: INTR_MSK_SET_REG :: L1_Y_RX_DMA_ERR_INTR_MSK_SET [11:11] */
6322
#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_ERR_INTR_MSK_SET_MASK    0x00000800
6323
#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_ERR_INTR_MSK_SET_ALIGN   0
6324
#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_ERR_INTR_MSK_SET_BITS    1
6325
#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_ERR_INTR_MSK_SET_SHIFT   11
6326
6327
/* INTR :: INTR_MSK_SET_REG :: L1_Y_RX_DMA_DONE_INTR_MSK_SET [10:10] */
6328
#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_DONE_INTR_MSK_SET_MASK   0x00000400
6329
#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_DONE_INTR_MSK_SET_ALIGN  0
6330
#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_DONE_INTR_MSK_SET_BITS   1
6331
#define INTR_INTR_MSK_SET_REG_L1_Y_RX_DMA_DONE_INTR_MSK_SET_SHIFT  10
6332
6333
/* INTR :: INTR_MSK_SET_REG :: L1_TX_DMA_ERR_INTR_MSK_SET [09:09] */
6334
#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_ERR_INTR_MSK_SET_MASK      0x00000200
6335
#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_ERR_INTR_MSK_SET_ALIGN     0
6336
#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_ERR_INTR_MSK_SET_BITS      1
6337
#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_ERR_INTR_MSK_SET_SHIFT     9
6338
6339
/* INTR :: INTR_MSK_SET_REG :: L1_TX_DMA_DONE_INTR_MSK_SET [08:08] */
6340
#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_DONE_INTR_MSK_SET_MASK     0x00000100
6341
#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_DONE_INTR_MSK_SET_ALIGN    0
6342
#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_DONE_INTR_MSK_SET_BITS     1
6343
#define INTR_INTR_MSK_SET_REG_L1_TX_DMA_DONE_INTR_MSK_SET_SHIFT    8
6344
6345
/* INTR :: INTR_MSK_SET_REG :: reserved2 [07:06] */
6346
#define INTR_INTR_MSK_SET_REG_reserved2_MASK                       0x000000c0
6347
#define INTR_INTR_MSK_SET_REG_reserved2_ALIGN                      0
6348
#define INTR_INTR_MSK_SET_REG_reserved2_BITS                       2
6349
#define INTR_INTR_MSK_SET_REG_reserved2_SHIFT                      6
6350
6351
/* INTR :: INTR_MSK_SET_REG :: L0_UV_RX_DMA_ERR_INTR_MSK_SET [05:05] */
6352
#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_ERR_INTR_MSK_SET_MASK   0x00000020
6353
#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_ERR_INTR_MSK_SET_ALIGN  0
6354
#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_ERR_INTR_MSK_SET_BITS   1
6355
#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_ERR_INTR_MSK_SET_SHIFT  5
6356
6357
/* INTR :: INTR_MSK_SET_REG :: L0_UV_RX_DMA_DONE_INTR_MSK_SET [04:04] */
6358
#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_DONE_INTR_MSK_SET_MASK  0x00000010
6359
#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_DONE_INTR_MSK_SET_ALIGN 0
6360
#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_DONE_INTR_MSK_SET_BITS  1
6361
#define INTR_INTR_MSK_SET_REG_L0_UV_RX_DMA_DONE_INTR_MSK_SET_SHIFT 4
6362
6363
/* INTR :: INTR_MSK_SET_REG :: L0_Y_RX_DMA_ERR_INTR_MSK_SET [03:03] */
6364
#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_ERR_INTR_MSK_SET_MASK    0x00000008
6365
#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_ERR_INTR_MSK_SET_ALIGN   0
6366
#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_ERR_INTR_MSK_SET_BITS    1
6367
#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_ERR_INTR_MSK_SET_SHIFT   3
6368
6369
/* INTR :: INTR_MSK_SET_REG :: L0_Y_RX_DMA_DONE_INTR_MSK_SET [02:02] */
6370
#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_DONE_INTR_MSK_SET_MASK   0x00000004
6371
#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_DONE_INTR_MSK_SET_ALIGN  0
6372
#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_DONE_INTR_MSK_SET_BITS   1
6373
#define INTR_INTR_MSK_SET_REG_L0_Y_RX_DMA_DONE_INTR_MSK_SET_SHIFT  2
6374
6375
/* INTR :: INTR_MSK_SET_REG :: L0_TX_DMA_ERR_INTR_MSK_SET [01:01] */
6376
#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_ERR_INTR_MSK_SET_MASK      0x00000002
6377
#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_ERR_INTR_MSK_SET_ALIGN     0
6378
#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_ERR_INTR_MSK_SET_BITS      1
6379
#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_ERR_INTR_MSK_SET_SHIFT     1
6380
6381
/* INTR :: INTR_MSK_SET_REG :: L0_TX_DMA_DONE_INTR_MSK_SET [00:00] */
6382
#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_DONE_INTR_MSK_SET_MASK     0x00000001
6383
#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_DONE_INTR_MSK_SET_ALIGN    0
6384
#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_DONE_INTR_MSK_SET_BITS     1
6385
#define INTR_INTR_MSK_SET_REG_L0_TX_DMA_DONE_INTR_MSK_SET_SHIFT    0
6386
6387
6388
/****************************************************************************
6389
 * INTR :: INTR_MSK_CLR_REG
6390
 ***************************************************************************/
6391
/* INTR :: INTR_MSK_CLR_REG :: reserved0 [31:26] */
6392
#define INTR_INTR_MSK_CLR_REG_reserved0_MASK                       0xfc000000
6393
#define INTR_INTR_MSK_CLR_REG_reserved0_ALIGN                      0
6394
#define INTR_INTR_MSK_CLR_REG_reserved0_BITS                       6
6395
#define INTR_INTR_MSK_CLR_REG_reserved0_SHIFT                      26
6396
6397
/* INTR :: INTR_MSK_CLR_REG :: PCIE_TGT_CA_ATTN [25:25] */
6398
#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_CA_ATTN_MASK                0x02000000
6399
#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_CA_ATTN_ALIGN               0
6400
#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_CA_ATTN_BITS                1
6401
#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_CA_ATTN_SHIFT               25
6402
6403
/* INTR :: INTR_MSK_CLR_REG :: PCIE_TGT_UR_ATTN [24:24] */
6404
#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_UR_ATTN_MASK                0x01000000
6405
#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_UR_ATTN_ALIGN               0
6406
#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_UR_ATTN_BITS                1
6407
#define INTR_INTR_MSK_CLR_REG_PCIE_TGT_UR_ATTN_SHIFT               24
6408
6409
/* INTR :: INTR_MSK_CLR_REG :: reserved1 [23:14] */
6410
#define INTR_INTR_MSK_CLR_REG_reserved1_MASK                       0x00ffc000
6411
#define INTR_INTR_MSK_CLR_REG_reserved1_ALIGN                      0
6412
#define INTR_INTR_MSK_CLR_REG_reserved1_BITS                       10
6413
#define INTR_INTR_MSK_CLR_REG_reserved1_SHIFT                      14
6414
6415
/* INTR :: INTR_MSK_CLR_REG :: L1_UV_RX_DMA_ERR_INTR_MSK_CLR [13:13] */
6416
#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_ERR_INTR_MSK_CLR_MASK   0x00002000
6417
#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_ERR_INTR_MSK_CLR_ALIGN  0
6418
#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_ERR_INTR_MSK_CLR_BITS   1
6419
#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_ERR_INTR_MSK_CLR_SHIFT  13
6420
6421
/* INTR :: INTR_MSK_CLR_REG :: L1_UV_RX_DMA_DONE_INTR_MSK_CLR [12:12] */
6422
#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_DONE_INTR_MSK_CLR_MASK  0x00001000
6423
#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_DONE_INTR_MSK_CLR_ALIGN 0
6424
#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_DONE_INTR_MSK_CLR_BITS  1
6425
#define INTR_INTR_MSK_CLR_REG_L1_UV_RX_DMA_DONE_INTR_MSK_CLR_SHIFT 12
6426
6427
/* INTR :: INTR_MSK_CLR_REG :: L1_Y_RX_DMA_ERR_INTR_MSK_CLR [11:11] */
6428
#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_ERR_INTR_MSK_CLR_MASK    0x00000800
6429
#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_ERR_INTR_MSK_CLR_ALIGN   0
6430
#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_ERR_INTR_MSK_CLR_BITS    1
6431
#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_ERR_INTR_MSK_CLR_SHIFT   11
6432
6433
/* INTR :: INTR_MSK_CLR_REG :: L1_Y_RX_DMA_DONE_INTR_MSK_CLR [10:10] */
6434
#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_DONE_INTR_MSK_CLR_MASK   0x00000400
6435
#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_DONE_INTR_MSK_CLR_ALIGN  0
6436
#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_DONE_INTR_MSK_CLR_BITS   1
6437
#define INTR_INTR_MSK_CLR_REG_L1_Y_RX_DMA_DONE_INTR_MSK_CLR_SHIFT  10
6438
6439
/* INTR :: INTR_MSK_CLR_REG :: L1_TX_DMA_ERR_INTR_MSK_CLR [09:09] */
6440
#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_ERR_INTR_MSK_CLR_MASK      0x00000200
6441
#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_ERR_INTR_MSK_CLR_ALIGN     0
6442
#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_ERR_INTR_MSK_CLR_BITS      1
6443
#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_ERR_INTR_MSK_CLR_SHIFT     9
6444
6445
/* INTR :: INTR_MSK_CLR_REG :: L1_TX_DMA_DONE_INTR_MSK_CLR [08:08] */
6446
#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_DONE_INTR_MSK_CLR_MASK     0x00000100
6447
#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_DONE_INTR_MSK_CLR_ALIGN    0
6448
#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_DONE_INTR_MSK_CLR_BITS     1
6449
#define INTR_INTR_MSK_CLR_REG_L1_TX_DMA_DONE_INTR_MSK_CLR_SHIFT    8
6450
6451
/* INTR :: INTR_MSK_CLR_REG :: reserved2 [07:06] */
6452
#define INTR_INTR_MSK_CLR_REG_reserved2_MASK                       0x000000c0
6453
#define INTR_INTR_MSK_CLR_REG_reserved2_ALIGN                      0
6454
#define INTR_INTR_MSK_CLR_REG_reserved2_BITS                       2
6455
#define INTR_INTR_MSK_CLR_REG_reserved2_SHIFT                      6
6456
6457
/* INTR :: INTR_MSK_CLR_REG :: L0_UV_RX_DMA_ERR_INTR_MSK_CLR [05:05] */
6458
#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_ERR_INTR_MSK_CLR_MASK   0x00000020
6459
#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_ERR_INTR_MSK_CLR_ALIGN  0
6460
#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_ERR_INTR_MSK_CLR_BITS   1
6461
#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_ERR_INTR_MSK_CLR_SHIFT  5
6462
6463
/* INTR :: INTR_MSK_CLR_REG :: L0_UV_RX_DMA_DONE_INTR_MSK_CLR [04:04] */
6464
#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_DONE_INTR_MSK_CLR_MASK  0x00000010
6465
#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_DONE_INTR_MSK_CLR_ALIGN 0
6466
#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_DONE_INTR_MSK_CLR_BITS  1
6467
#define INTR_INTR_MSK_CLR_REG_L0_UV_RX_DMA_DONE_INTR_MSK_CLR_SHIFT 4
6468
6469
/* INTR :: INTR_MSK_CLR_REG :: L0_Y_RX_DMA_ERR_INTR_MSK_CLR [03:03] */
6470
#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_ERR_INTR_MSK_CLR_MASK    0x00000008
6471
#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_ERR_INTR_MSK_CLR_ALIGN   0
6472
#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_ERR_INTR_MSK_CLR_BITS    1
6473
#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_ERR_INTR_MSK_CLR_SHIFT   3
6474
6475
/* INTR :: INTR_MSK_CLR_REG :: L0_Y_RX_DMA_DONE_INTR_MSK_CLR [02:02] */
6476
#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_DONE_INTR_MSK_CLR_MASK   0x00000004
6477
#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_DONE_INTR_MSK_CLR_ALIGN  0
6478
#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_DONE_INTR_MSK_CLR_BITS   1
6479
#define INTR_INTR_MSK_CLR_REG_L0_Y_RX_DMA_DONE_INTR_MSK_CLR_SHIFT  2
6480
6481
/* INTR :: INTR_MSK_CLR_REG :: L0_TX_DMA_ERR_INTR_MSK_CLR [01:01] */
6482
#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_ERR_INTR_MSK_CLR_MASK      0x00000002
6483
#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_ERR_INTR_MSK_CLR_ALIGN     0
6484
#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_ERR_INTR_MSK_CLR_BITS      1
6485
#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_ERR_INTR_MSK_CLR_SHIFT     1
6486
6487
/* INTR :: INTR_MSK_CLR_REG :: L0_TX_DMA_DONE_INTR_MSK_CLR [00:00] */
6488
#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_DONE_INTR_MSK_CLR_MASK     0x00000001
6489
#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_DONE_INTR_MSK_CLR_ALIGN    0
6490
#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_DONE_INTR_MSK_CLR_BITS     1
6491
#define INTR_INTR_MSK_CLR_REG_L0_TX_DMA_DONE_INTR_MSK_CLR_SHIFT    0
6492
6493
6494
/****************************************************************************
6495
 * INTR :: EOI_CTRL
6496
 ***************************************************************************/
6497
/* INTR :: EOI_CTRL :: reserved0 [31:01] */
6498
#define INTR_EOI_CTRL_reserved0_MASK                               0xfffffffe
6499
#define INTR_EOI_CTRL_reserved0_ALIGN                              0
6500
#define INTR_EOI_CTRL_reserved0_BITS                               31
6501
#define INTR_EOI_CTRL_reserved0_SHIFT                              1
6502
6503
/* INTR :: EOI_CTRL :: EOI [00:00] */
6504
#define INTR_EOI_CTRL_EOI_MASK                                     0x00000001
6505
#define INTR_EOI_CTRL_EOI_ALIGN                                    0
6506
#define INTR_EOI_CTRL_EOI_BITS                                     1
6507
#define INTR_EOI_CTRL_EOI_SHIFT                                    0
6508
6509
6510
/****************************************************************************
6511
 * BCM70012_TGT_TOP_MDIO
6512
 ***************************************************************************/
6513
/****************************************************************************
6514
 * MDIO :: CTRL0
6515
 ***************************************************************************/
6516
/* MDIO :: CTRL0 :: reserved0 [31:22] */
6517
#define MDIO_CTRL0_reserved0_MASK                                  0xffc00000
6518
#define MDIO_CTRL0_reserved0_ALIGN                                 0
6519
#define MDIO_CTRL0_reserved0_BITS                                  10
6520
#define MDIO_CTRL0_reserved0_SHIFT                                 22
6521
6522
/* MDIO :: CTRL0 :: WRITE_READ_COMMAND [21:21] */
6523
#define MDIO_CTRL0_WRITE_READ_COMMAND_MASK                         0x00200000
6524
#define MDIO_CTRL0_WRITE_READ_COMMAND_ALIGN                        0
6525
#define MDIO_CTRL0_WRITE_READ_COMMAND_BITS                         1
6526
#define MDIO_CTRL0_WRITE_READ_COMMAND_SHIFT                        21
6527
6528
/* MDIO :: CTRL0 :: PHYAD [20:16] */
6529
#define MDIO_CTRL0_PHYAD_MASK                                      0x001f0000
6530
#define MDIO_CTRL0_PHYAD_ALIGN                                     0
6531
#define MDIO_CTRL0_PHYAD_BITS                                      5
6532
#define MDIO_CTRL0_PHYAD_SHIFT                                     16
6533
6534
/* MDIO :: CTRL0 :: reserved1 [15:05] */
6535
#define MDIO_CTRL0_reserved1_MASK                                  0x0000ffe0
6536
#define MDIO_CTRL0_reserved1_ALIGN                                 0
6537
#define MDIO_CTRL0_reserved1_BITS                                  11
6538
#define MDIO_CTRL0_reserved1_SHIFT                                 5
6539
6540
/* MDIO :: CTRL0 :: REGAD [04:00] */
6541
#define MDIO_CTRL0_REGAD_MASK                                      0x0000001f
6542
#define MDIO_CTRL0_REGAD_ALIGN                                     0
6543
#define MDIO_CTRL0_REGAD_BITS                                      5
6544
#define MDIO_CTRL0_REGAD_SHIFT                                     0
6545
6546
6547
/****************************************************************************
6548
 * MDIO :: CTRL1
6549
 ***************************************************************************/
6550
/* MDIO :: CTRL1 :: WR_STATUS [31:31] */
6551
#define MDIO_CTRL1_WR_STATUS_MASK                                  0x80000000
6552
#define MDIO_CTRL1_WR_STATUS_ALIGN                                 0
6553
#define MDIO_CTRL1_WR_STATUS_BITS                                  1
6554
#define MDIO_CTRL1_WR_STATUS_SHIFT                                 31
6555
6556
/* MDIO :: CTRL1 :: reserved0 [30:16] */
6557
#define MDIO_CTRL1_reserved0_MASK                                  0x7fff0000
6558
#define MDIO_CTRL1_reserved0_ALIGN                                 0
6559
#define MDIO_CTRL1_reserved0_BITS                                  15
6560
#define MDIO_CTRL1_reserved0_SHIFT                                 16
6561
6562
/* MDIO :: CTRL1 :: Write_Data [15:00] */
6563
#define MDIO_CTRL1_Write_Data_MASK                                 0x0000ffff
6564
#define MDIO_CTRL1_Write_Data_ALIGN                                0
6565
#define MDIO_CTRL1_Write_Data_BITS                                 16
6566
#define MDIO_CTRL1_Write_Data_SHIFT                                0
6567
6568
6569
/****************************************************************************
6570
 * MDIO :: CTRL2
6571
 ***************************************************************************/
6572
/* MDIO :: CTRL2 :: RD_STATUS [31:31] */
6573
#define MDIO_CTRL2_RD_STATUS_MASK                                  0x80000000
6574
#define MDIO_CTRL2_RD_STATUS_ALIGN                                 0
6575
#define MDIO_CTRL2_RD_STATUS_BITS                                  1
6576
#define MDIO_CTRL2_RD_STATUS_SHIFT                                 31
6577
6578
/* MDIO :: CTRL2 :: reserved0 [30:16] */
6579
#define MDIO_CTRL2_reserved0_MASK                                  0x7fff0000
6580
#define MDIO_CTRL2_reserved0_ALIGN                                 0
6581
#define MDIO_CTRL2_reserved0_BITS                                  15
6582
#define MDIO_CTRL2_reserved0_SHIFT                                 16
6583
6584
/* MDIO :: CTRL2 :: Read_Data [15:00] */
6585
#define MDIO_CTRL2_Read_Data_MASK                                  0x0000ffff
6586
#define MDIO_CTRL2_Read_Data_ALIGN                                 0
6587
#define MDIO_CTRL2_Read_Data_BITS                                  16
6588
#define MDIO_CTRL2_Read_Data_SHIFT                                 0
6589
6590
6591
/****************************************************************************
6592
 * BCM70012_TGT_TOP_TGT_RGR_BRIDGE
6593
 ***************************************************************************/
6594
/****************************************************************************
6595
 * TGT_RGR_BRIDGE :: REVISION
6596
 ***************************************************************************/
6597
/* TGT_RGR_BRIDGE :: REVISION :: reserved0 [31:16] */
6598
#define TGT_RGR_BRIDGE_REVISION_reserved0_MASK                     0xffff0000
6599
#define TGT_RGR_BRIDGE_REVISION_reserved0_ALIGN                    0
6600
#define TGT_RGR_BRIDGE_REVISION_reserved0_BITS                     16
6601
#define TGT_RGR_BRIDGE_REVISION_reserved0_SHIFT                    16
6602
6603
/* TGT_RGR_BRIDGE :: REVISION :: MAJOR [15:08] */
6604
#define TGT_RGR_BRIDGE_REVISION_MAJOR_MASK                         0x0000ff00
6605
#define TGT_RGR_BRIDGE_REVISION_MAJOR_ALIGN                        0
6606
#define TGT_RGR_BRIDGE_REVISION_MAJOR_BITS                         8
6607
#define TGT_RGR_BRIDGE_REVISION_MAJOR_SHIFT                        8
6608
6609
/* TGT_RGR_BRIDGE :: REVISION :: MINOR [07:00] */
6610
#define TGT_RGR_BRIDGE_REVISION_MINOR_MASK                         0x000000ff
6611
#define TGT_RGR_BRIDGE_REVISION_MINOR_ALIGN                        0
6612
#define TGT_RGR_BRIDGE_REVISION_MINOR_BITS                         8
6613
#define TGT_RGR_BRIDGE_REVISION_MINOR_SHIFT                        0
6614
6615
6616
/****************************************************************************
6617
 * TGT_RGR_BRIDGE :: CTRL
6618
 ***************************************************************************/
6619
/* TGT_RGR_BRIDGE :: CTRL :: reserved0 [31:02] */
6620
#define TGT_RGR_BRIDGE_CTRL_reserved0_MASK                         0xfffffffc
6621
#define TGT_RGR_BRIDGE_CTRL_reserved0_ALIGN                        0
6622
#define TGT_RGR_BRIDGE_CTRL_reserved0_BITS                         30
6623
#define TGT_RGR_BRIDGE_CTRL_reserved0_SHIFT                        2
6624
6625
/* TGT_RGR_BRIDGE :: CTRL :: RBUS_ERROR_INTR [01:01] */
6626
#define TGT_RGR_BRIDGE_CTRL_RBUS_ERROR_INTR_MASK                   0x00000002
6627
#define TGT_RGR_BRIDGE_CTRL_RBUS_ERROR_INTR_ALIGN                  0
6628
#define TGT_RGR_BRIDGE_CTRL_RBUS_ERROR_INTR_BITS                   1
6629
#define TGT_RGR_BRIDGE_CTRL_RBUS_ERROR_INTR_SHIFT                  1
6630
6631
/* TGT_RGR_BRIDGE :: CTRL :: GISB_ERROR_INTR [00:00] */
6632
#define TGT_RGR_BRIDGE_CTRL_GISB_ERROR_INTR_MASK                   0x00000001
6633
#define TGT_RGR_BRIDGE_CTRL_GISB_ERROR_INTR_ALIGN                  0
6634
#define TGT_RGR_BRIDGE_CTRL_GISB_ERROR_INTR_BITS                   1
6635
#define TGT_RGR_BRIDGE_CTRL_GISB_ERROR_INTR_SHIFT                  0
6636
6637
6638
/****************************************************************************
6639
 * TGT_RGR_BRIDGE :: RBUS_TIMER
6640
 ***************************************************************************/
6641
/* TGT_RGR_BRIDGE :: RBUS_TIMER :: reserved0 [31:16] */
6642
#define TGT_RGR_BRIDGE_RBUS_TIMER_reserved0_MASK                   0xffff0000
6643
#define TGT_RGR_BRIDGE_RBUS_TIMER_reserved0_ALIGN                  0
6644
#define TGT_RGR_BRIDGE_RBUS_TIMER_reserved0_BITS                   16
6645
#define TGT_RGR_BRIDGE_RBUS_TIMER_reserved0_SHIFT                  16
6646
6647
/* TGT_RGR_BRIDGE :: RBUS_TIMER :: RBUS_TO_RBUS_TRANS_TIMER_CNT [15:00] */
6648
#define TGT_RGR_BRIDGE_RBUS_TIMER_RBUS_TO_RBUS_TRANS_TIMER_CNT_MASK 0x0000ffff
6649
#define TGT_RGR_BRIDGE_RBUS_TIMER_RBUS_TO_RBUS_TRANS_TIMER_CNT_ALIGN 0
6650
#define TGT_RGR_BRIDGE_RBUS_TIMER_RBUS_TO_RBUS_TRANS_TIMER_CNT_BITS 16
6651
#define TGT_RGR_BRIDGE_RBUS_TIMER_RBUS_TO_RBUS_TRANS_TIMER_CNT_SHIFT 0
6652
6653
6654
/****************************************************************************
6655
 * TGT_RGR_BRIDGE :: SPARE_SW_RESET_0
6656
 ***************************************************************************/
6657
/* TGT_RGR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */
6658
#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK             0xfffffffe
6659
#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN            0
6660
#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS             31
6661
#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT            1
6662
6663
/* TGT_RGR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */
6664
#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK        0x00000001
6665
#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN       0
6666
#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS        1
6667
#define TGT_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT       0
6668
6669
6670
/****************************************************************************
6671
 * TGT_RGR_BRIDGE :: SPARE_SW_RESET_1
6672
 ***************************************************************************/
6673
/* TGT_RGR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */
6674
#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK             0xfffffffe
6675
#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN            0
6676
#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS             31
6677
#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT            1
6678
6679
/* TGT_RGR_BRIDGE :: SPARE_SW_RESET_1 :: SPARE_SW_RESET [00:00] */
6680
#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_MASK        0x00000001
6681
#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ALIGN       0
6682
#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_BITS        1
6683
#define TGT_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_SHIFT       0
6684
6685
6686
/****************************************************************************
6687
 * BCM70012_I2C_TOP_I2C
6688
 ***************************************************************************/
6689
/****************************************************************************
6690
 * I2C :: CHIP_ADDRESS
6691
 ***************************************************************************/
6692
/* I2C :: CHIP_ADDRESS :: reserved0 [31:08] */
6693
#define I2C_CHIP_ADDRESS_reserved0_MASK                            0xffffff00
6694
#define I2C_CHIP_ADDRESS_reserved0_ALIGN                           0
6695
#define I2C_CHIP_ADDRESS_reserved0_BITS                            24
6696
#define I2C_CHIP_ADDRESS_reserved0_SHIFT                           8
6697
6698
/* I2C :: CHIP_ADDRESS :: CHIP_ADDRESS [07:01] */
6699
#define I2C_CHIP_ADDRESS_CHIP_ADDRESS_MASK                         0x000000fe
6700
#define I2C_CHIP_ADDRESS_CHIP_ADDRESS_ALIGN                        0
6701
#define I2C_CHIP_ADDRESS_CHIP_ADDRESS_BITS                         7
6702
#define I2C_CHIP_ADDRESS_CHIP_ADDRESS_SHIFT                        1
6703
6704
/* I2C :: CHIP_ADDRESS :: RESERVED [00:00] */
6705
#define I2C_CHIP_ADDRESS_RESERVED_MASK                             0x00000001
6706
#define I2C_CHIP_ADDRESS_RESERVED_ALIGN                            0
6707
#define I2C_CHIP_ADDRESS_RESERVED_BITS                             1
6708
#define I2C_CHIP_ADDRESS_RESERVED_SHIFT                            0
6709
6710
6711
/****************************************************************************
6712
 * I2C :: DATA_IN0
6713
 ***************************************************************************/
6714
/* I2C :: DATA_IN0 :: reserved0 [31:08] */
6715
#define I2C_DATA_IN0_reserved0_MASK                                0xffffff00
6716
#define I2C_DATA_IN0_reserved0_ALIGN                               0
6717
#define I2C_DATA_IN0_reserved0_BITS                                24
6718
#define I2C_DATA_IN0_reserved0_SHIFT                               8
6719
6720
/* I2C :: DATA_IN0 :: DATA_IN0 [07:00] */
6721
#define I2C_DATA_IN0_DATA_IN0_MASK                                 0x000000ff
6722
#define I2C_DATA_IN0_DATA_IN0_ALIGN                                0
6723
#define I2C_DATA_IN0_DATA_IN0_BITS                                 8
6724
#define I2C_DATA_IN0_DATA_IN0_SHIFT                                0
6725
6726
6727
/****************************************************************************
6728
 * I2C :: DATA_IN1
6729
 ***************************************************************************/
6730
/* I2C :: DATA_IN1 :: reserved0 [31:08] */
6731
#define I2C_DATA_IN1_reserved0_MASK                                0xffffff00
6732
#define I2C_DATA_IN1_reserved0_ALIGN                               0
6733
#define I2C_DATA_IN1_reserved0_BITS                                24
6734
#define I2C_DATA_IN1_reserved0_SHIFT                               8
6735
6736
/* I2C :: DATA_IN1 :: DATA_IN1 [07:00] */
6737
#define I2C_DATA_IN1_DATA_IN1_MASK                                 0x000000ff
6738
#define I2C_DATA_IN1_DATA_IN1_ALIGN                                0
6739
#define I2C_DATA_IN1_DATA_IN1_BITS                                 8
6740
#define I2C_DATA_IN1_DATA_IN1_SHIFT                                0
6741
6742
6743
/****************************************************************************
6744
 * I2C :: DATA_IN2
6745
 ***************************************************************************/
6746
/* I2C :: DATA_IN2 :: reserved0 [31:08] */
6747
#define I2C_DATA_IN2_reserved0_MASK                                0xffffff00
6748
#define I2C_DATA_IN2_reserved0_ALIGN                               0
6749
#define I2C_DATA_IN2_reserved0_BITS                                24
6750
#define I2C_DATA_IN2_reserved0_SHIFT                               8
6751
6752
/* I2C :: DATA_IN2 :: DATA_IN2 [07:00] */
6753
#define I2C_DATA_IN2_DATA_IN2_MASK                                 0x000000ff
6754
#define I2C_DATA_IN2_DATA_IN2_ALIGN                                0
6755
#define I2C_DATA_IN2_DATA_IN2_BITS                                 8
6756
#define I2C_DATA_IN2_DATA_IN2_SHIFT                                0
6757
6758
6759
/****************************************************************************
6760
 * I2C :: DATA_IN3
6761
 ***************************************************************************/
6762
/* I2C :: DATA_IN3 :: reserved0 [31:08] */
6763
#define I2C_DATA_IN3_reserved0_MASK                                0xffffff00
6764
#define I2C_DATA_IN3_reserved0_ALIGN                               0
6765
#define I2C_DATA_IN3_reserved0_BITS                                24
6766
#define I2C_DATA_IN3_reserved0_SHIFT                               8
6767
6768
/* I2C :: DATA_IN3 :: DATA_IN3 [07:00] */
6769
#define I2C_DATA_IN3_DATA_IN3_MASK                                 0x000000ff
6770
#define I2C_DATA_IN3_DATA_IN3_ALIGN                                0
6771
#define I2C_DATA_IN3_DATA_IN3_BITS                                 8
6772
#define I2C_DATA_IN3_DATA_IN3_SHIFT                                0
6773
6774
6775
/****************************************************************************
6776
 * I2C :: DATA_IN4
6777
 ***************************************************************************/
6778
/* I2C :: DATA_IN4 :: reserved0 [31:08] */
6779
#define I2C_DATA_IN4_reserved0_MASK                                0xffffff00
6780
#define I2C_DATA_IN4_reserved0_ALIGN                               0
6781
#define I2C_DATA_IN4_reserved0_BITS                                24
6782
#define I2C_DATA_IN4_reserved0_SHIFT                               8
6783
6784
/* I2C :: DATA_IN4 :: DATA_IN4 [07:00] */
6785
#define I2C_DATA_IN4_DATA_IN4_MASK                                 0x000000ff
6786
#define I2C_DATA_IN4_DATA_IN4_ALIGN                                0
6787
#define I2C_DATA_IN4_DATA_IN4_BITS                                 8
6788
#define I2C_DATA_IN4_DATA_IN4_SHIFT                                0
6789
6790
6791
/****************************************************************************
6792
 * I2C :: DATA_IN5
6793
 ***************************************************************************/
6794
/* I2C :: DATA_IN5 :: reserved0 [31:08] */
6795
#define I2C_DATA_IN5_reserved0_MASK                                0xffffff00
6796
#define I2C_DATA_IN5_reserved0_ALIGN                               0
6797
#define I2C_DATA_IN5_reserved0_BITS                                24
6798
#define I2C_DATA_IN5_reserved0_SHIFT                               8
6799
6800
/* I2C :: DATA_IN5 :: DATA_IN5 [07:00] */
6801
#define I2C_DATA_IN5_DATA_IN5_MASK                                 0x000000ff
6802
#define I2C_DATA_IN5_DATA_IN5_ALIGN                                0
6803
#define I2C_DATA_IN5_DATA_IN5_BITS                                 8
6804
#define I2C_DATA_IN5_DATA_IN5_SHIFT                                0
6805
6806
6807
/****************************************************************************
6808
 * I2C :: DATA_IN6
6809
 ***************************************************************************/
6810
/* I2C :: DATA_IN6 :: reserved0 [31:08] */
6811
#define I2C_DATA_IN6_reserved0_MASK                                0xffffff00
6812
#define I2C_DATA_IN6_reserved0_ALIGN                               0
6813
#define I2C_DATA_IN6_reserved0_BITS                                24
6814
#define I2C_DATA_IN6_reserved0_SHIFT                               8
6815
6816
/* I2C :: DATA_IN6 :: DATA_IN6 [07:00] */
6817
#define I2C_DATA_IN6_DATA_IN6_MASK                                 0x000000ff
6818
#define I2C_DATA_IN6_DATA_IN6_ALIGN                                0
6819
#define I2C_DATA_IN6_DATA_IN6_BITS                                 8
6820
#define I2C_DATA_IN6_DATA_IN6_SHIFT                                0
6821
6822
6823
/****************************************************************************
6824
 * I2C :: DATA_IN7
6825
 ***************************************************************************/
6826
/* I2C :: DATA_IN7 :: reserved0 [31:08] */
6827
#define I2C_DATA_IN7_reserved0_MASK                                0xffffff00
6828
#define I2C_DATA_IN7_reserved0_ALIGN                               0
6829
#define I2C_DATA_IN7_reserved0_BITS                                24
6830
#define I2C_DATA_IN7_reserved0_SHIFT                               8
6831
6832
/* I2C :: DATA_IN7 :: DATA_IN7 [07:00] */
6833
#define I2C_DATA_IN7_DATA_IN7_MASK                                 0x000000ff
6834
#define I2C_DATA_IN7_DATA_IN7_ALIGN                                0
6835
#define I2C_DATA_IN7_DATA_IN7_BITS                                 8
6836
#define I2C_DATA_IN7_DATA_IN7_SHIFT                                0
6837
6838
6839
/****************************************************************************
6840
 * I2C :: CNT_REG
6841
 ***************************************************************************/
6842
/* I2C :: CNT_REG :: reserved0 [31:08] */
6843
#define I2C_CNT_REG_reserved0_MASK                                 0xffffff00
6844
#define I2C_CNT_REG_reserved0_ALIGN                                0
6845
#define I2C_CNT_REG_reserved0_BITS                                 24
6846
#define I2C_CNT_REG_reserved0_SHIFT                                8
6847
6848
/* I2C :: CNT_REG :: CNT_REG2 [07:04] */
6849
#define I2C_CNT_REG_CNT_REG2_MASK                                  0x000000f0
6850
#define I2C_CNT_REG_CNT_REG2_ALIGN                                 0
6851
#define I2C_CNT_REG_CNT_REG2_BITS                                  4
6852
#define I2C_CNT_REG_CNT_REG2_SHIFT                                 4
6853
6854
/* I2C :: CNT_REG :: CNT_REG1 [03:00] */
6855
#define I2C_CNT_REG_CNT_REG1_MASK                                  0x0000000f
6856
#define I2C_CNT_REG_CNT_REG1_ALIGN                                 0
6857
#define I2C_CNT_REG_CNT_REG1_BITS                                  4
6858
#define I2C_CNT_REG_CNT_REG1_SHIFT                                 0
6859
6860
6861
/****************************************************************************
6862
 * I2C :: CTL_REG
6863
 ***************************************************************************/
6864
/* I2C :: CTL_REG :: reserved0 [31:08] */
6865
#define I2C_CTL_REG_reserved0_MASK                                 0xffffff00
6866
#define I2C_CTL_REG_reserved0_ALIGN                                0
6867
#define I2C_CTL_REG_reserved0_BITS                                 24
6868
#define I2C_CTL_REG_reserved0_SHIFT                                8
6869
6870
/* I2C :: CTL_REG :: DIV_CLK [07:07] */
6871
#define I2C_CTL_REG_DIV_CLK_MASK                                   0x00000080
6872
#define I2C_CTL_REG_DIV_CLK_ALIGN                                  0
6873
#define I2C_CTL_REG_DIV_CLK_BITS                                   1
6874
#define I2C_CTL_REG_DIV_CLK_SHIFT                                  7
6875
6876
/* I2C :: CTL_REG :: INT_EN [06:06] */
6877
#define I2C_CTL_REG_INT_EN_MASK                                    0x00000040
6878
#define I2C_CTL_REG_INT_EN_ALIGN                                   0
6879
#define I2C_CTL_REG_INT_EN_BITS                                    1
6880
#define I2C_CTL_REG_INT_EN_SHIFT                                   6
6881
6882
/* I2C :: CTL_REG :: SCL_SEL [05:04] */
6883
#define I2C_CTL_REG_SCL_SEL_MASK                                   0x00000030
6884
#define I2C_CTL_REG_SCL_SEL_ALIGN                                  0
6885
#define I2C_CTL_REG_SCL_SEL_BITS                                   2
6886
#define I2C_CTL_REG_SCL_SEL_SHIFT                                  4
6887
6888
/* I2C :: CTL_REG :: DELAY_DIS [03:03] */
6889
#define I2C_CTL_REG_DELAY_DIS_MASK                                 0x00000008
6890
#define I2C_CTL_REG_DELAY_DIS_ALIGN                                0
6891
#define I2C_CTL_REG_DELAY_DIS_BITS                                 1
6892
#define I2C_CTL_REG_DELAY_DIS_SHIFT                                3
6893
6894
/* I2C :: CTL_REG :: DEGLITCH_DIS [02:02] */
6895
#define I2C_CTL_REG_DEGLITCH_DIS_MASK                              0x00000004
6896
#define I2C_CTL_REG_DEGLITCH_DIS_ALIGN                             0
6897
#define I2C_CTL_REG_DEGLITCH_DIS_BITS                              1
6898
#define I2C_CTL_REG_DEGLITCH_DIS_SHIFT                             2
6899
6900
/* I2C :: CTL_REG :: DTF [01:00] */
6901
#define I2C_CTL_REG_DTF_MASK                                       0x00000003
6902
#define I2C_CTL_REG_DTF_ALIGN                                      0
6903
#define I2C_CTL_REG_DTF_BITS                                       2
6904
#define I2C_CTL_REG_DTF_SHIFT                                      0
6905
6906
6907
/****************************************************************************
6908
 * I2C :: IIC_ENABLE
6909
 ***************************************************************************/
6910
/* I2C :: IIC_ENABLE :: reserved0 [31:07] */
6911
#define I2C_IIC_ENABLE_reserved0_MASK                              0xffffff80
6912
#define I2C_IIC_ENABLE_reserved0_ALIGN                             0
6913
#define I2C_IIC_ENABLE_reserved0_BITS                              25
6914
#define I2C_IIC_ENABLE_reserved0_SHIFT                             7
6915
6916
/* I2C :: IIC_ENABLE :: RESTART [06:06] */
6917
#define I2C_IIC_ENABLE_RESTART_MASK                                0x00000040
6918
#define I2C_IIC_ENABLE_RESTART_ALIGN                               0
6919
#define I2C_IIC_ENABLE_RESTART_BITS                                1
6920
#define I2C_IIC_ENABLE_RESTART_SHIFT                               6
6921
6922
/* I2C :: IIC_ENABLE :: NO_START [05:05] */
6923
#define I2C_IIC_ENABLE_NO_START_MASK                               0x00000020
6924
#define I2C_IIC_ENABLE_NO_START_ALIGN                              0
6925
#define I2C_IIC_ENABLE_NO_START_BITS                               1
6926
#define I2C_IIC_ENABLE_NO_START_SHIFT                              5
6927
6928
/* I2C :: IIC_ENABLE :: NO_STOP [04:04] */
6929
#define I2C_IIC_ENABLE_NO_STOP_MASK                                0x00000010
6930
#define I2C_IIC_ENABLE_NO_STOP_ALIGN                               0
6931
#define I2C_IIC_ENABLE_NO_STOP_BITS                                1
6932
#define I2C_IIC_ENABLE_NO_STOP_SHIFT                               4
6933
6934
/* I2C :: IIC_ENABLE :: reserved1 [03:03] */
6935
#define I2C_IIC_ENABLE_reserved1_MASK                              0x00000008
6936
#define I2C_IIC_ENABLE_reserved1_ALIGN                             0
6937
#define I2C_IIC_ENABLE_reserved1_BITS                              1
6938
#define I2C_IIC_ENABLE_reserved1_SHIFT                             3
6939
6940
/* I2C :: IIC_ENABLE :: NO_ACK [02:02] */
6941
#define I2C_IIC_ENABLE_NO_ACK_MASK                                 0x00000004
6942
#define I2C_IIC_ENABLE_NO_ACK_ALIGN                                0
6943
#define I2C_IIC_ENABLE_NO_ACK_BITS                                 1
6944
#define I2C_IIC_ENABLE_NO_ACK_SHIFT                                2
6945
6946
/* I2C :: IIC_ENABLE :: INTRP [01:01] */
6947
#define I2C_IIC_ENABLE_INTRP_MASK                                  0x00000002
6948
#define I2C_IIC_ENABLE_INTRP_ALIGN                                 0
6949
#define I2C_IIC_ENABLE_INTRP_BITS                                  1
6950
#define I2C_IIC_ENABLE_INTRP_SHIFT                                 1
6951
6952
/* I2C :: IIC_ENABLE :: ENABLE [00:00] */
6953
#define I2C_IIC_ENABLE_ENABLE_MASK                                 0x00000001
6954
#define I2C_IIC_ENABLE_ENABLE_ALIGN                                0
6955
#define I2C_IIC_ENABLE_ENABLE_BITS                                 1
6956
#define I2C_IIC_ENABLE_ENABLE_SHIFT                                0
6957
6958
6959
/****************************************************************************
6960
 * I2C :: DATA_OUT0
6961
 ***************************************************************************/
6962
/* I2C :: DATA_OUT0 :: reserved0 [31:08] */
6963
#define I2C_DATA_OUT0_reserved0_MASK                               0xffffff00
6964
#define I2C_DATA_OUT0_reserved0_ALIGN                              0
6965
#define I2C_DATA_OUT0_reserved0_BITS                               24
6966
#define I2C_DATA_OUT0_reserved0_SHIFT                              8
6967
6968
/* I2C :: DATA_OUT0 :: DATA_OUT0 [07:00] */
6969
#define I2C_DATA_OUT0_DATA_OUT0_MASK                               0x000000ff
6970
#define I2C_DATA_OUT0_DATA_OUT0_ALIGN                              0
6971
#define I2C_DATA_OUT0_DATA_OUT0_BITS                               8
6972
#define I2C_DATA_OUT0_DATA_OUT0_SHIFT                              0
6973
6974
6975
/****************************************************************************
6976
 * I2C :: DATA_OUT1
6977
 ***************************************************************************/
6978
/* I2C :: DATA_OUT1 :: reserved0 [31:08] */
6979
#define I2C_DATA_OUT1_reserved0_MASK                               0xffffff00
6980
#define I2C_DATA_OUT1_reserved0_ALIGN                              0
6981
#define I2C_DATA_OUT1_reserved0_BITS                               24
6982
#define I2C_DATA_OUT1_reserved0_SHIFT                              8
6983
6984
/* I2C :: DATA_OUT1 :: DATA_OUT1 [07:00] */
6985
#define I2C_DATA_OUT1_DATA_OUT1_MASK                               0x000000ff
6986
#define I2C_DATA_OUT1_DATA_OUT1_ALIGN                              0
6987
#define I2C_DATA_OUT1_DATA_OUT1_BITS                               8
6988
#define I2C_DATA_OUT1_DATA_OUT1_SHIFT                              0
6989
6990
6991
/****************************************************************************
6992
 * I2C :: DATA_OUT2
6993
 ***************************************************************************/
6994
/* I2C :: DATA_OUT2 :: reserved0 [31:08] */
6995
#define I2C_DATA_OUT2_reserved0_MASK                               0xffffff00
6996
#define I2C_DATA_OUT2_reserved0_ALIGN                              0
6997
#define I2C_DATA_OUT2_reserved0_BITS                               24
6998
#define I2C_DATA_OUT2_reserved0_SHIFT                              8
6999
7000
/* I2C :: DATA_OUT2 :: DATA_OUT2 [07:00] */
7001
#define I2C_DATA_OUT2_DATA_OUT2_MASK                               0x000000ff
7002
#define I2C_DATA_OUT2_DATA_OUT2_ALIGN                              0
7003
#define I2C_DATA_OUT2_DATA_OUT2_BITS                               8
7004
#define I2C_DATA_OUT2_DATA_OUT2_SHIFT                              0
7005
7006
7007
/****************************************************************************
7008
 * I2C :: DATA_OUT3
7009
 ***************************************************************************/
7010
/* I2C :: DATA_OUT3 :: reserved0 [31:08] */
7011
#define I2C_DATA_OUT3_reserved0_MASK                               0xffffff00
7012
#define I2C_DATA_OUT3_reserved0_ALIGN                              0
7013
#define I2C_DATA_OUT3_reserved0_BITS                               24
7014
#define I2C_DATA_OUT3_reserved0_SHIFT                              8
7015
7016
/* I2C :: DATA_OUT3 :: DATA_OUT3 [07:00] */
7017
#define I2C_DATA_OUT3_DATA_OUT3_MASK                               0x000000ff
7018
#define I2C_DATA_OUT3_DATA_OUT3_ALIGN                              0
7019
#define I2C_DATA_OUT3_DATA_OUT3_BITS                               8
7020
#define I2C_DATA_OUT3_DATA_OUT3_SHIFT                              0
7021
7022
7023
/****************************************************************************
7024
 * I2C :: DATA_OUT4
7025
 ***************************************************************************/
7026
/* I2C :: DATA_OUT4 :: reserved0 [31:08] */
7027
#define I2C_DATA_OUT4_reserved0_MASK                               0xffffff00
7028
#define I2C_DATA_OUT4_reserved0_ALIGN                              0
7029
#define I2C_DATA_OUT4_reserved0_BITS                               24
7030
#define I2C_DATA_OUT4_reserved0_SHIFT                              8
7031
7032
/* I2C :: DATA_OUT4 :: DATA_OUT4 [07:00] */
7033
#define I2C_DATA_OUT4_DATA_OUT4_MASK                               0x000000ff
7034
#define I2C_DATA_OUT4_DATA_OUT4_ALIGN                              0
7035
#define I2C_DATA_OUT4_DATA_OUT4_BITS                               8
7036
#define I2C_DATA_OUT4_DATA_OUT4_SHIFT                              0
7037
7038
7039
/****************************************************************************
7040
 * I2C :: DATA_OUT5
7041
 ***************************************************************************/
7042
/* I2C :: DATA_OUT5 :: reserved0 [31:08] */
7043
#define I2C_DATA_OUT5_reserved0_MASK                               0xffffff00
7044
#define I2C_DATA_OUT5_reserved0_ALIGN                              0
7045
#define I2C_DATA_OUT5_reserved0_BITS                               24
7046
#define I2C_DATA_OUT5_reserved0_SHIFT                              8
7047
7048
/* I2C :: DATA_OUT5 :: DATA_OUT5 [07:00] */
7049
#define I2C_DATA_OUT5_DATA_OUT5_MASK                               0x000000ff
7050
#define I2C_DATA_OUT5_DATA_OUT5_ALIGN                              0
7051
#define I2C_DATA_OUT5_DATA_OUT5_BITS                               8
7052
#define I2C_DATA_OUT5_DATA_OUT5_SHIFT                              0
7053
7054
7055
/****************************************************************************
7056
 * I2C :: DATA_OUT6
7057
 ***************************************************************************/
7058
/* I2C :: DATA_OUT6 :: reserved0 [31:08] */
7059
#define I2C_DATA_OUT6_reserved0_MASK                               0xffffff00
7060
#define I2C_DATA_OUT6_reserved0_ALIGN                              0
7061
#define I2C_DATA_OUT6_reserved0_BITS                               24
7062
#define I2C_DATA_OUT6_reserved0_SHIFT                              8
7063
7064
/* I2C :: DATA_OUT6 :: DATA_OUT6 [07:00] */
7065
#define I2C_DATA_OUT6_DATA_OUT6_MASK                               0x000000ff
7066
#define I2C_DATA_OUT6_DATA_OUT6_ALIGN                              0
7067
#define I2C_DATA_OUT6_DATA_OUT6_BITS                               8
7068
#define I2C_DATA_OUT6_DATA_OUT6_SHIFT                              0
7069
7070
7071
/****************************************************************************
7072
 * I2C :: DATA_OUT7
7073
 ***************************************************************************/
7074
/* I2C :: DATA_OUT7 :: reserved0 [31:08] */
7075
#define I2C_DATA_OUT7_reserved0_MASK                               0xffffff00
7076
#define I2C_DATA_OUT7_reserved0_ALIGN                              0
7077
#define I2C_DATA_OUT7_reserved0_BITS                               24
7078
#define I2C_DATA_OUT7_reserved0_SHIFT                              8
7079
7080
/* I2C :: DATA_OUT7 :: DATA_OUT7 [07:00] */
7081
#define I2C_DATA_OUT7_DATA_OUT7_MASK                               0x000000ff
7082
#define I2C_DATA_OUT7_DATA_OUT7_ALIGN                              0
7083
#define I2C_DATA_OUT7_DATA_OUT7_BITS                               8
7084
#define I2C_DATA_OUT7_DATA_OUT7_SHIFT                              0
7085
7086
7087
/****************************************************************************
7088
 * I2C :: CTLHI_REG
7089
 ***************************************************************************/
7090
/* I2C :: CTLHI_REG :: reserved0 [31:02] */
7091
#define I2C_CTLHI_REG_reserved0_MASK                               0xfffffffc
7092
#define I2C_CTLHI_REG_reserved0_ALIGN                              0
7093
#define I2C_CTLHI_REG_reserved0_BITS                               30
7094
#define I2C_CTLHI_REG_reserved0_SHIFT                              2
7095
7096
/* I2C :: CTLHI_REG :: IGNORE_ACK [01:01] */
7097
#define I2C_CTLHI_REG_IGNORE_ACK_MASK                              0x00000002
7098
#define I2C_CTLHI_REG_IGNORE_ACK_ALIGN                             0
7099
#define I2C_CTLHI_REG_IGNORE_ACK_BITS                              1
7100
#define I2C_CTLHI_REG_IGNORE_ACK_SHIFT                             1
7101
7102
/* I2C :: CTLHI_REG :: WAIT_DIS [00:00] */
7103
#define I2C_CTLHI_REG_WAIT_DIS_MASK                                0x00000001
7104
#define I2C_CTLHI_REG_WAIT_DIS_ALIGN                               0
7105
#define I2C_CTLHI_REG_WAIT_DIS_BITS                                1
7106
#define I2C_CTLHI_REG_WAIT_DIS_SHIFT                               0
7107
7108
7109
/****************************************************************************
7110
 * I2C :: SCL_PARAM
7111
 ***************************************************************************/
7112
/* I2C :: SCL_PARAM :: reserved0 [31:00] */
7113
#define I2C_SCL_PARAM_reserved0_MASK                               0xffffffff
7114
#define I2C_SCL_PARAM_reserved0_ALIGN                              0
7115
#define I2C_SCL_PARAM_reserved0_BITS                               32
7116
#define I2C_SCL_PARAM_reserved0_SHIFT                              0
7117
7118
7119
/****************************************************************************
7120
 * BCM70012_I2C_TOP_I2C_GR_BRIDGE
7121
 ***************************************************************************/
7122
/****************************************************************************
7123
 * I2C_GR_BRIDGE :: REVISION
7124
 ***************************************************************************/
7125
/* I2C_GR_BRIDGE :: REVISION :: reserved0 [31:16] */
7126
#define I2C_GR_BRIDGE_REVISION_reserved0_MASK                      0xffff0000
7127
#define I2C_GR_BRIDGE_REVISION_reserved0_ALIGN                     0
7128
#define I2C_GR_BRIDGE_REVISION_reserved0_BITS                      16
7129
#define I2C_GR_BRIDGE_REVISION_reserved0_SHIFT                     16
7130
7131
/* I2C_GR_BRIDGE :: REVISION :: MAJOR [15:08] */
7132
#define I2C_GR_BRIDGE_REVISION_MAJOR_MASK                          0x0000ff00
7133
#define I2C_GR_BRIDGE_REVISION_MAJOR_ALIGN                         0
7134
#define I2C_GR_BRIDGE_REVISION_MAJOR_BITS                          8
7135
#define I2C_GR_BRIDGE_REVISION_MAJOR_SHIFT                         8
7136
7137
/* I2C_GR_BRIDGE :: REVISION :: MINOR [07:00] */
7138
#define I2C_GR_BRIDGE_REVISION_MINOR_MASK                          0x000000ff
7139
#define I2C_GR_BRIDGE_REVISION_MINOR_ALIGN                         0
7140
#define I2C_GR_BRIDGE_REVISION_MINOR_BITS                          8
7141
#define I2C_GR_BRIDGE_REVISION_MINOR_SHIFT                         0
7142
7143
7144
/****************************************************************************
7145
 * I2C_GR_BRIDGE :: CTRL
7146
 ***************************************************************************/
7147
/* I2C_GR_BRIDGE :: CTRL :: reserved0 [31:01] */
7148
#define I2C_GR_BRIDGE_CTRL_reserved0_MASK                          0xfffffffe
7149
#define I2C_GR_BRIDGE_CTRL_reserved0_ALIGN                         0
7150
#define I2C_GR_BRIDGE_CTRL_reserved0_BITS                          31
7151
#define I2C_GR_BRIDGE_CTRL_reserved0_SHIFT                         1
7152
7153
/* I2C_GR_BRIDGE :: CTRL :: gisb_error_intr [00:00] */
7154
#define I2C_GR_BRIDGE_CTRL_gisb_error_intr_MASK                    0x00000001
7155
#define I2C_GR_BRIDGE_CTRL_gisb_error_intr_ALIGN                   0
7156
#define I2C_GR_BRIDGE_CTRL_gisb_error_intr_BITS                    1
7157
#define I2C_GR_BRIDGE_CTRL_gisb_error_intr_SHIFT                   0
7158
#define I2C_GR_BRIDGE_CTRL_gisb_error_intr_INTR_DISABLE            0
7159
#define I2C_GR_BRIDGE_CTRL_gisb_error_intr_INTR_ENABLE             1
7160
7161
7162
/****************************************************************************
7163
 * I2C_GR_BRIDGE :: SPARE_SW_RESET_0
7164
 ***************************************************************************/
7165
/* I2C_GR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */
7166
#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK              0xfffffffe
7167
#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN             0
7168
#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS              31
7169
#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT             1
7170
7171
/* I2C_GR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */
7172
#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK         0x00000001
7173
#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN        0
7174
#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS         1
7175
#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT        0
7176
#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_DEASSERT     0
7177
#define I2C_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ASSERT       1
7178
7179
7180
/****************************************************************************
7181
 * I2C_GR_BRIDGE :: SPARE_SW_RESET_1
7182
 ***************************************************************************/
7183
/* I2C_GR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */
7184
#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK              0xfffffffe
7185
#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN             0
7186
#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS              31
7187
#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT             1
7188
7189
/* I2C_GR_BRIDGE :: SPARE_SW_RESET_1 :: SPARE_SW_RESET [00:00] */
7190
#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_MASK         0x00000001
7191
#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ALIGN        0
7192
#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_BITS         1
7193
#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_SHIFT        0
7194
#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_DEASSERT     0
7195
#define I2C_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ASSERT       1
7196
7197
7198
/****************************************************************************
7199
 * BCM70012_MISC_TOP_MISC1
7200
 ***************************************************************************/
7201
/****************************************************************************
7202
 * MISC1 :: TX_FIRST_DESC_L_ADDR_LIST0
7203
 ***************************************************************************/
7204
/* MISC1 :: TX_FIRST_DESC_L_ADDR_LIST0 :: DESC_ADDR [31:05] */
7205
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_MASK            0xffffffe0
7206
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_ALIGN           0
7207
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_BITS            27
7208
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_SHIFT           5
7209
7210
/* MISC1 :: TX_FIRST_DESC_L_ADDR_LIST0 :: reserved0 [04:01] */
7211
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_reserved0_MASK            0x0000001e
7212
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_reserved0_ALIGN           0
7213
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_reserved0_BITS            4
7214
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_reserved0_SHIFT           1
7215
7216
/* MISC1 :: TX_FIRST_DESC_L_ADDR_LIST0 :: TX_DESC_LIST0_VALID [00:00] */
7217
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_TX_DESC_LIST0_VALID_MASK  0x00000001
7218
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_TX_DESC_LIST0_VALID_ALIGN 0
7219
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_TX_DESC_LIST0_VALID_BITS  1
7220
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST0_TX_DESC_LIST0_VALID_SHIFT 0
7221
7222
7223
/****************************************************************************
7224
 * MISC1 :: TX_FIRST_DESC_U_ADDR_LIST0
7225
 ***************************************************************************/
7226
/* MISC1 :: TX_FIRST_DESC_U_ADDR_LIST0 :: DESC_ADDR [31:00] */
7227
#define MISC1_TX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_MASK            0xffffffff
7228
#define MISC1_TX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_ALIGN           0
7229
#define MISC1_TX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_BITS            32
7230
#define MISC1_TX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_SHIFT           0
7231
7232
7233
/****************************************************************************
7234
 * MISC1 :: TX_FIRST_DESC_L_ADDR_LIST1
7235
 ***************************************************************************/
7236
/* MISC1 :: TX_FIRST_DESC_L_ADDR_LIST1 :: DESC_ADDR [31:05] */
7237
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_MASK            0xffffffe0
7238
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_ALIGN           0
7239
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_BITS            27
7240
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_SHIFT           5
7241
7242
/* MISC1 :: TX_FIRST_DESC_L_ADDR_LIST1 :: reserved0 [04:01] */
7243
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_reserved0_MASK            0x0000001e
7244
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_reserved0_ALIGN           0
7245
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_reserved0_BITS            4
7246
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_reserved0_SHIFT           1
7247
7248
/* MISC1 :: TX_FIRST_DESC_L_ADDR_LIST1 :: TX_DESC_LIST1_VALID [00:00] */
7249
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_TX_DESC_LIST1_VALID_MASK  0x00000001
7250
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_TX_DESC_LIST1_VALID_ALIGN 0
7251
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_TX_DESC_LIST1_VALID_BITS  1
7252
#define MISC1_TX_FIRST_DESC_L_ADDR_LIST1_TX_DESC_LIST1_VALID_SHIFT 0
7253
7254
7255
/****************************************************************************
7256
 * MISC1 :: TX_FIRST_DESC_U_ADDR_LIST1
7257
 ***************************************************************************/
7258
/* MISC1 :: TX_FIRST_DESC_U_ADDR_LIST1 :: DESC_ADDR [31:00] */
7259
#define MISC1_TX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_MASK            0xffffffff
7260
#define MISC1_TX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_ALIGN           0
7261
#define MISC1_TX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_BITS            32
7262
#define MISC1_TX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_SHIFT           0
7263
7264
7265
/****************************************************************************
7266
 * MISC1 :: TX_SW_DESC_LIST_CTRL_STS
7267
 ***************************************************************************/
7268
/* MISC1 :: TX_SW_DESC_LIST_CTRL_STS :: reserved0 [31:04] */
7269
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_reserved0_MASK              0xfffffff0
7270
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_reserved0_ALIGN             0
7271
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_reserved0_BITS              28
7272
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_reserved0_SHIFT             4
7273
7274
/* MISC1 :: TX_SW_DESC_LIST_CTRL_STS :: DMA_DATA_SERV_PTR [03:03] */
7275
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_MASK      0x00000008
7276
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_ALIGN     0
7277
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_BITS      1
7278
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_SHIFT     3
7279
7280
/* MISC1 :: TX_SW_DESC_LIST_CTRL_STS :: DESC_SERV_PTR [02:02] */
7281
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_MASK          0x00000004
7282
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_ALIGN         0
7283
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_BITS          1
7284
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_SHIFT         2
7285
7286
/* MISC1 :: TX_SW_DESC_LIST_CTRL_STS :: TX_DMA_HALT_ON_ERROR [01:01] */
7287
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_HALT_ON_ERROR_MASK   0x00000002
7288
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_HALT_ON_ERROR_ALIGN  0
7289
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_HALT_ON_ERROR_BITS   1
7290
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_HALT_ON_ERROR_SHIFT  1
7291
7292
/* MISC1 :: TX_SW_DESC_LIST_CTRL_STS :: TX_DMA_RUN_STOP [00:00] */
7293
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_MASK        0x00000001
7294
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_ALIGN       0
7295
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_BITS        1
7296
#define MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_SHIFT       0
7297
7298
7299
/****************************************************************************
7300
 * MISC1 :: TX_DMA_ERROR_STATUS
7301
 ***************************************************************************/
7302
/* MISC1 :: TX_DMA_ERROR_STATUS :: reserved0 [31:10] */
7303
#define MISC1_TX_DMA_ERROR_STATUS_reserved0_MASK                   0xfffffc00
7304
#define MISC1_TX_DMA_ERROR_STATUS_reserved0_ALIGN                  0
7305
#define MISC1_TX_DMA_ERROR_STATUS_reserved0_BITS                   22
7306
#define MISC1_TX_DMA_ERROR_STATUS_reserved0_SHIFT                  10
7307
7308
/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L1_DESC_TX_ABORT_ERRORS [09:09] */
7309
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DESC_TX_ABORT_ERRORS_MASK  0x00000200
7310
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DESC_TX_ABORT_ERRORS_ALIGN 0
7311
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DESC_TX_ABORT_ERRORS_BITS  1
7312
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DESC_TX_ABORT_ERRORS_SHIFT 9
7313
7314
/* MISC1 :: TX_DMA_ERROR_STATUS :: reserved1 [08:08] */
7315
#define MISC1_TX_DMA_ERROR_STATUS_reserved1_MASK                   0x00000100
7316
#define MISC1_TX_DMA_ERROR_STATUS_reserved1_ALIGN                  0
7317
#define MISC1_TX_DMA_ERROR_STATUS_reserved1_BITS                   1
7318
#define MISC1_TX_DMA_ERROR_STATUS_reserved1_SHIFT                  8
7319
7320
/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L0_DESC_TX_ABORT_ERRORS [07:07] */
7321
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DESC_TX_ABORT_ERRORS_MASK  0x00000080
7322
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DESC_TX_ABORT_ERRORS_ALIGN 0
7323
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DESC_TX_ABORT_ERRORS_BITS  1
7324
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DESC_TX_ABORT_ERRORS_SHIFT 7
7325
7326
/* MISC1 :: TX_DMA_ERROR_STATUS :: reserved2 [06:06] */
7327
#define MISC1_TX_DMA_ERROR_STATUS_reserved2_MASK                   0x00000040
7328
#define MISC1_TX_DMA_ERROR_STATUS_reserved2_ALIGN                  0
7329
#define MISC1_TX_DMA_ERROR_STATUS_reserved2_BITS                   1
7330
#define MISC1_TX_DMA_ERROR_STATUS_reserved2_SHIFT                  6
7331
7332
/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L1_DMA_DATA_TX_ABORT_ERRORS [05:05] */
7333
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DMA_DATA_TX_ABORT_ERRORS_MASK 0x00000020
7334
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DMA_DATA_TX_ABORT_ERRORS_ALIGN 0
7335
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DMA_DATA_TX_ABORT_ERRORS_BITS 1
7336
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_DMA_DATA_TX_ABORT_ERRORS_SHIFT 5
7337
7338
/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L1_FIFO_FULL_ERRORS [04:04] */
7339
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_MASK      0x00000010
7340
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_ALIGN     0
7341
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_BITS      1
7342
#define MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_SHIFT     4
7343
7344
/* MISC1 :: TX_DMA_ERROR_STATUS :: reserved3 [03:03] */
7345
#define MISC1_TX_DMA_ERROR_STATUS_reserved3_MASK                   0x00000008
7346
#define MISC1_TX_DMA_ERROR_STATUS_reserved3_ALIGN                  0
7347
#define MISC1_TX_DMA_ERROR_STATUS_reserved3_BITS                   1
7348
#define MISC1_TX_DMA_ERROR_STATUS_reserved3_SHIFT                  3
7349
7350
/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L0_DMA_DATA_TX_ABORT_ERRORS [02:02] */
7351
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DMA_DATA_TX_ABORT_ERRORS_MASK 0x00000004
7352
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DMA_DATA_TX_ABORT_ERRORS_ALIGN 0
7353
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DMA_DATA_TX_ABORT_ERRORS_BITS 1
7354
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_DMA_DATA_TX_ABORT_ERRORS_SHIFT 2
7355
7356
/* MISC1 :: TX_DMA_ERROR_STATUS :: TX_L0_FIFO_FULL_ERRORS [01:01] */
7357
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_MASK      0x00000002
7358
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_ALIGN     0
7359
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_BITS      1
7360
#define MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_SHIFT     1
7361
7362
/* MISC1 :: TX_DMA_ERROR_STATUS :: reserved4 [00:00] */
7363
#define MISC1_TX_DMA_ERROR_STATUS_reserved4_MASK                   0x00000001
7364
#define MISC1_TX_DMA_ERROR_STATUS_reserved4_ALIGN                  0
7365
#define MISC1_TX_DMA_ERROR_STATUS_reserved4_BITS                   1
7366
#define MISC1_TX_DMA_ERROR_STATUS_reserved4_SHIFT                  0
7367
7368
7369
/****************************************************************************
7370
 * MISC1 :: TX_DMA_LIST0_CUR_DESC_L_ADDR
7371
 ***************************************************************************/
7372
/* MISC1 :: TX_DMA_LIST0_CUR_DESC_L_ADDR :: TX_DMA_L0_CUR_DESC_L_ADDR [31:05] */
7373
#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_TX_DMA_L0_CUR_DESC_L_ADDR_MASK 0xffffffe0
7374
#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_TX_DMA_L0_CUR_DESC_L_ADDR_ALIGN 0
7375
#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_TX_DMA_L0_CUR_DESC_L_ADDR_BITS 27
7376
#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_TX_DMA_L0_CUR_DESC_L_ADDR_SHIFT 5
7377
7378
/* MISC1 :: TX_DMA_LIST0_CUR_DESC_L_ADDR :: reserved0 [04:00] */
7379
#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_reserved0_MASK          0x0000001f
7380
#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_reserved0_ALIGN         0
7381
#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_reserved0_BITS          5
7382
#define MISC1_TX_DMA_LIST0_CUR_DESC_L_ADDR_reserved0_SHIFT         0
7383
7384
7385
/****************************************************************************
7386
 * MISC1 :: TX_DMA_LIST0_CUR_DESC_U_ADDR
7387
 ***************************************************************************/
7388
/* MISC1 :: TX_DMA_LIST0_CUR_DESC_U_ADDR :: TX_DMA_L0_CUR_DESC_U_ADDR [31:00] */
7389
#define MISC1_TX_DMA_LIST0_CUR_DESC_U_ADDR_TX_DMA_L0_CUR_DESC_U_ADDR_MASK 0xffffffff
7390
#define MISC1_TX_DMA_LIST0_CUR_DESC_U_ADDR_TX_DMA_L0_CUR_DESC_U_ADDR_ALIGN 0
7391
#define MISC1_TX_DMA_LIST0_CUR_DESC_U_ADDR_TX_DMA_L0_CUR_DESC_U_ADDR_BITS 32
7392
#define MISC1_TX_DMA_LIST0_CUR_DESC_U_ADDR_TX_DMA_L0_CUR_DESC_U_ADDR_SHIFT 0
7393
7394
7395
/****************************************************************************
7396
 * MISC1 :: TX_DMA_LIST0_CUR_BYTE_CNT_REM
7397
 ***************************************************************************/
7398
/* MISC1 :: TX_DMA_LIST0_CUR_BYTE_CNT_REM :: reserved0 [31:24] */
7399
#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved0_MASK         0xff000000
7400
#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved0_ALIGN        0
7401
#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved0_BITS         8
7402
#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved0_SHIFT        24
7403
7404
/* MISC1 :: TX_DMA_LIST0_CUR_BYTE_CNT_REM :: TX_DMA_L0_CUR_BYTE_CNT_REM [23:02] */
7405
#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_TX_DMA_L0_CUR_BYTE_CNT_REM_MASK 0x00fffffc
7406
#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_TX_DMA_L0_CUR_BYTE_CNT_REM_ALIGN 0
7407
#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_TX_DMA_L0_CUR_BYTE_CNT_REM_BITS 22
7408
#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_TX_DMA_L0_CUR_BYTE_CNT_REM_SHIFT 2
7409
7410
/* MISC1 :: TX_DMA_LIST0_CUR_BYTE_CNT_REM :: reserved1 [01:00] */
7411
#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved1_MASK         0x00000003
7412
#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved1_ALIGN        0
7413
#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved1_BITS         2
7414
#define MISC1_TX_DMA_LIST0_CUR_BYTE_CNT_REM_reserved1_SHIFT        0
7415
7416
7417
/****************************************************************************
7418
 * MISC1 :: TX_DMA_LIST1_CUR_DESC_L_ADDR
7419
 ***************************************************************************/
7420
/* MISC1 :: TX_DMA_LIST1_CUR_DESC_L_ADDR :: TX_DMA_L1_CUR_DESC_L_ADDR [31:05] */
7421
#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_TX_DMA_L1_CUR_DESC_L_ADDR_MASK 0xffffffe0
7422
#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_TX_DMA_L1_CUR_DESC_L_ADDR_ALIGN 0
7423
#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_TX_DMA_L1_CUR_DESC_L_ADDR_BITS 27
7424
#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_TX_DMA_L1_CUR_DESC_L_ADDR_SHIFT 5
7425
7426
/* MISC1 :: TX_DMA_LIST1_CUR_DESC_L_ADDR :: reserved0 [04:00] */
7427
#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_reserved0_MASK          0x0000001f
7428
#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_reserved0_ALIGN         0
7429
#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_reserved0_BITS          5
7430
#define MISC1_TX_DMA_LIST1_CUR_DESC_L_ADDR_reserved0_SHIFT         0
7431
7432
7433
/****************************************************************************
7434
 * MISC1 :: TX_DMA_LIST1_CUR_DESC_U_ADDR
7435
 ***************************************************************************/
7436
/* MISC1 :: TX_DMA_LIST1_CUR_DESC_U_ADDR :: TX_DMA_L1_CUR_DESC_U_ADDR [31:00] */
7437
#define MISC1_TX_DMA_LIST1_CUR_DESC_U_ADDR_TX_DMA_L1_CUR_DESC_U_ADDR_MASK 0xffffffff
7438
#define MISC1_TX_DMA_LIST1_CUR_DESC_U_ADDR_TX_DMA_L1_CUR_DESC_U_ADDR_ALIGN 0
7439
#define MISC1_TX_DMA_LIST1_CUR_DESC_U_ADDR_TX_DMA_L1_CUR_DESC_U_ADDR_BITS 32
7440
#define MISC1_TX_DMA_LIST1_CUR_DESC_U_ADDR_TX_DMA_L1_CUR_DESC_U_ADDR_SHIFT 0
7441
7442
7443
/****************************************************************************
7444
 * MISC1 :: TX_DMA_LIST1_CUR_BYTE_CNT_REM
7445
 ***************************************************************************/
7446
/* MISC1 :: TX_DMA_LIST1_CUR_BYTE_CNT_REM :: reserved0 [31:24] */
7447
#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved0_MASK         0xff000000
7448
#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved0_ALIGN        0
7449
#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved0_BITS         8
7450
#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved0_SHIFT        24
7451
7452
/* MISC1 :: TX_DMA_LIST1_CUR_BYTE_CNT_REM :: TX_DMA_L1_CUR_BYTE_CNT_REM [23:02] */
7453
#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_TX_DMA_L1_CUR_BYTE_CNT_REM_MASK 0x00fffffc
7454
#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_TX_DMA_L1_CUR_BYTE_CNT_REM_ALIGN 0
7455
#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_TX_DMA_L1_CUR_BYTE_CNT_REM_BITS 22
7456
#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_TX_DMA_L1_CUR_BYTE_CNT_REM_SHIFT 2
7457
7458
/* MISC1 :: TX_DMA_LIST1_CUR_BYTE_CNT_REM :: reserved1 [01:00] */
7459
#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved1_MASK         0x00000003
7460
#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved1_ALIGN        0
7461
#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved1_BITS         2
7462
#define MISC1_TX_DMA_LIST1_CUR_BYTE_CNT_REM_reserved1_SHIFT        0
7463
7464
7465
/****************************************************************************
7466
 * MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST0
7467
 ***************************************************************************/
7468
/* MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST0 :: DESC_ADDR [31:05] */
7469
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_MASK          0xffffffe0
7470
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_ALIGN         0
7471
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_BITS          27
7472
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_SHIFT         5
7473
7474
/* MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST0 :: reserved0 [04:01] */
7475
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_MASK          0x0000001e
7476
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_ALIGN         0
7477
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_BITS          4
7478
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_SHIFT         1
7479
7480
/* MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST0 :: RX_DESC_LIST0_VALID [00:00] */
7481
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_MASK 0x00000001
7482
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_ALIGN 0
7483
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_BITS 1
7484
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_SHIFT 0
7485
7486
7487
/****************************************************************************
7488
 * MISC1 :: Y_RX_FIRST_DESC_U_ADDR_LIST0
7489
 ***************************************************************************/
7490
/* MISC1 :: Y_RX_FIRST_DESC_U_ADDR_LIST0 :: DESC_ADDR [31:00] */
7491
#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_MASK          0xffffffff
7492
#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_ALIGN         0
7493
#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_BITS          32
7494
#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_SHIFT         0
7495
7496
7497
/****************************************************************************
7498
 * MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST1
7499
 ***************************************************************************/
7500
/* MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST1 :: DESC_ADDR [31:05] */
7501
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_MASK          0xffffffe0
7502
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_ALIGN         0
7503
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_BITS          27
7504
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_SHIFT         5
7505
7506
/* MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST1 :: reserved0 [04:01] */
7507
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_MASK          0x0000001e
7508
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_ALIGN         0
7509
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_BITS          4
7510
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_SHIFT         1
7511
7512
/* MISC1 :: Y_RX_FIRST_DESC_L_ADDR_LIST1 :: RX_DESC_LIST1_VALID [00:00] */
7513
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_MASK 0x00000001
7514
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_ALIGN 0
7515
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_BITS 1
7516
#define MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_SHIFT 0
7517
7518
7519
/****************************************************************************
7520
 * MISC1 :: Y_RX_FIRST_DESC_U_ADDR_LIST1
7521
 ***************************************************************************/
7522
/* MISC1 :: Y_RX_FIRST_DESC_U_ADDR_LIST1 :: DESC_ADDR [31:00] */
7523
#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_MASK          0xffffffff
7524
#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_ALIGN         0
7525
#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_BITS          32
7526
#define MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_SHIFT         0
7527
7528
7529
/****************************************************************************
7530
 * MISC1 :: Y_RX_SW_DESC_LIST_CTRL_STS
7531
 ***************************************************************************/
7532
/* MISC1 :: Y_RX_SW_DESC_LIST_CTRL_STS :: reserved0 [31:04] */
7533
#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_reserved0_MASK            0xfffffff0
7534
#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_reserved0_ALIGN           0
7535
#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_reserved0_BITS            28
7536
#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_reserved0_SHIFT           4
7537
7538
/* MISC1 :: Y_RX_SW_DESC_LIST_CTRL_STS :: DMA_DATA_SERV_PTR [03:03] */
7539
#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_MASK    0x00000008
7540
#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_ALIGN   0
7541
#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_BITS    1
7542
#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_SHIFT   3
7543
7544
/* MISC1 :: Y_RX_SW_DESC_LIST_CTRL_STS :: DESC_SERV_PTR [02:02] */
7545
#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_MASK        0x00000004
7546
#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_ALIGN       0
7547
#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_BITS        1
7548
#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_SHIFT       2
7549
7550
/* MISC1 :: Y_RX_SW_DESC_LIST_CTRL_STS :: RX_HALT_ON_ERROR [01:01] */
7551
#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_MASK     0x00000002
7552
#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_ALIGN    0
7553
#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_BITS     1
7554
#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_SHIFT    1
7555
7556
/* MISC1 :: Y_RX_SW_DESC_LIST_CTRL_STS :: RX_RUN_STOP [00:00] */
7557
#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_MASK          0x00000001
7558
#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_ALIGN         0
7559
#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_BITS          1
7560
#define MISC1_Y_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_SHIFT         0
7561
7562
7563
/****************************************************************************
7564
 * MISC1 :: Y_RX_ERROR_STATUS
7565
 ***************************************************************************/
7566
/* MISC1 :: Y_RX_ERROR_STATUS :: reserved0 [31:14] */
7567
#define MISC1_Y_RX_ERROR_STATUS_reserved0_MASK                     0xffffc000
7568
#define MISC1_Y_RX_ERROR_STATUS_reserved0_ALIGN                    0
7569
#define MISC1_Y_RX_ERROR_STATUS_reserved0_BITS                     18
7570
#define MISC1_Y_RX_ERROR_STATUS_reserved0_SHIFT                    14
7571
7572
/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L1_UNDERRUN_ERROR [13:13] */
7573
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK          0x00002000
7574
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_ALIGN         0
7575
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_BITS          1
7576
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_SHIFT         13
7577
7578
/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L1_OVERRUN_ERROR [12:12] */
7579
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_MASK           0x00001000
605
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_ALIGN          0
7580
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_ALIGN          0
606
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_BITS           1
7581
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_BITS           1
607
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_SHIFT          12
7582
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_SHIFT          12
608
7583
609
/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L0_UNDERRUN_ERROR [11:11] */
7584
/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L0_UNDERRUN_ERROR [11:11] */
610
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK          0x00000800
7585
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK          0x00000800
611
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_ALIGN         0
7586
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_ALIGN         0
612
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_BITS          1
7587
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_BITS          1
613
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_SHIFT         11
7588
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_SHIFT         11
7589
7590
/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L0_OVERRUN_ERROR [10:10] */
7591
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_MASK           0x00000400
7592
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_ALIGN          0
7593
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_BITS           1
7594
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_SHIFT          10
7595
7596
/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L1_DESC_TX_ABORT_ERRORS [09:09] */
7597
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_MASK    0x00000200
7598
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_ALIGN   0
7599
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_BITS    1
7600
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_SHIFT   9
7601
7602
/* MISC1 :: Y_RX_ERROR_STATUS :: reserved1 [08:08] */
7603
#define MISC1_Y_RX_ERROR_STATUS_reserved1_MASK                     0x00000100
7604
#define MISC1_Y_RX_ERROR_STATUS_reserved1_ALIGN                    0
7605
#define MISC1_Y_RX_ERROR_STATUS_reserved1_BITS                     1
7606
#define MISC1_Y_RX_ERROR_STATUS_reserved1_SHIFT                    8
7607
7608
/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L0_DESC_TX_ABORT_ERRORS [07:07] */
7609
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_MASK    0x00000080
7610
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_ALIGN   0
7611
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_BITS    1
7612
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_SHIFT   7
7613
7614
/* MISC1 :: Y_RX_ERROR_STATUS :: reserved2 [06:05] */
7615
#define MISC1_Y_RX_ERROR_STATUS_reserved2_MASK                     0x00000060
7616
#define MISC1_Y_RX_ERROR_STATUS_reserved2_ALIGN                    0
7617
#define MISC1_Y_RX_ERROR_STATUS_reserved2_BITS                     2
7618
#define MISC1_Y_RX_ERROR_STATUS_reserved2_SHIFT                    5
7619
7620
/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L1_FIFO_FULL_ERRORS [04:04] */
7621
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK        0x00000010
7622
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_ALIGN       0
7623
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_BITS        1
7624
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_SHIFT       4
7625
7626
/* MISC1 :: Y_RX_ERROR_STATUS :: reserved3 [03:02] */
7627
#define MISC1_Y_RX_ERROR_STATUS_reserved3_MASK                     0x0000000c
7628
#define MISC1_Y_RX_ERROR_STATUS_reserved3_ALIGN                    0
7629
#define MISC1_Y_RX_ERROR_STATUS_reserved3_BITS                     2
7630
#define MISC1_Y_RX_ERROR_STATUS_reserved3_SHIFT                    2
7631
7632
/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L0_FIFO_FULL_ERRORS [01:01] */
7633
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK        0x00000002
7634
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_ALIGN       0
7635
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_BITS        1
7636
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_SHIFT       1
7637
7638
/* MISC1 :: Y_RX_ERROR_STATUS :: reserved4 [00:00] */
7639
#define MISC1_Y_RX_ERROR_STATUS_reserved4_MASK                     0x00000001
7640
#define MISC1_Y_RX_ERROR_STATUS_reserved4_ALIGN                    0
7641
#define MISC1_Y_RX_ERROR_STATUS_reserved4_BITS                     1
7642
#define MISC1_Y_RX_ERROR_STATUS_reserved4_SHIFT                    0
7643
7644
7645
/****************************************************************************
7646
 * MISC1 :: Y_RX_LIST0_CUR_DESC_L_ADDR
7647
 ***************************************************************************/
7648
/* MISC1 :: Y_RX_LIST0_CUR_DESC_L_ADDR :: RX_L0_CUR_DESC_L_ADDR [31:05] */
7649
#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_MASK 0xffffffe0
7650
#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_ALIGN 0
7651
#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_BITS 27
7652
#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_SHIFT 5
7653
7654
/* MISC1 :: Y_RX_LIST0_CUR_DESC_L_ADDR :: reserved0 [04:00] */
7655
#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_reserved0_MASK            0x0000001f
7656
#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_reserved0_ALIGN           0
7657
#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_reserved0_BITS            5
7658
#define MISC1_Y_RX_LIST0_CUR_DESC_L_ADDR_reserved0_SHIFT           0
7659
7660
7661
/****************************************************************************
7662
 * MISC1 :: Y_RX_LIST0_CUR_DESC_U_ADDR
7663
 ***************************************************************************/
7664
/* MISC1 :: Y_RX_LIST0_CUR_DESC_U_ADDR :: RX_L0_CUR_DESC_U_ADDR [31:00] */
7665
#define MISC1_Y_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_MASK 0xffffffff
7666
#define MISC1_Y_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_ALIGN 0
7667
#define MISC1_Y_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_BITS 32
7668
#define MISC1_Y_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_SHIFT 0
7669
7670
7671
/****************************************************************************
7672
 * MISC1 :: Y_RX_LIST0_CUR_BYTE_CNT
7673
 ***************************************************************************/
7674
/* MISC1 :: Y_RX_LIST0_CUR_BYTE_CNT :: RX_L0_CUR_BYTE_CNT [31:00] */
7675
#define MISC1_Y_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_MASK      0xffffffff
7676
#define MISC1_Y_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_ALIGN     0
7677
#define MISC1_Y_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_BITS      32
7678
#define MISC1_Y_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_SHIFT     0
7679
7680
7681
/****************************************************************************
7682
 * MISC1 :: Y_RX_LIST1_CUR_DESC_L_ADDR
7683
 ***************************************************************************/
7684
/* MISC1 :: Y_RX_LIST1_CUR_DESC_L_ADDR :: RX_L1_CUR_DESC_L_ADDR [31:05] */
7685
#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_MASK 0xffffffe0
7686
#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_ALIGN 0
7687
#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_BITS 27
7688
#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_SHIFT 5
7689
7690
/* MISC1 :: Y_RX_LIST1_CUR_DESC_L_ADDR :: reserved0 [04:00] */
7691
#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_reserved0_MASK            0x0000001f
7692
#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_reserved0_ALIGN           0
7693
#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_reserved0_BITS            5
7694
#define MISC1_Y_RX_LIST1_CUR_DESC_L_ADDR_reserved0_SHIFT           0
7695
7696
7697
/****************************************************************************
7698
 * MISC1 :: Y_RX_LIST1_CUR_DESC_U_ADDR
7699
 ***************************************************************************/
7700
/* MISC1 :: Y_RX_LIST1_CUR_DESC_U_ADDR :: RX_L1_CUR_DESC_U_ADDR [31:00] */
7701
#define MISC1_Y_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_MASK 0xffffffff
7702
#define MISC1_Y_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_ALIGN 0
7703
#define MISC1_Y_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_BITS 32
7704
#define MISC1_Y_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_SHIFT 0
7705
7706
7707
/****************************************************************************
7708
 * MISC1 :: Y_RX_LIST1_CUR_BYTE_CNT
7709
 ***************************************************************************/
7710
/* MISC1 :: Y_RX_LIST1_CUR_BYTE_CNT :: RX_L1_CUR_BYTE_CNT [31:00] */
7711
#define MISC1_Y_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_MASK      0xffffffff
7712
#define MISC1_Y_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_ALIGN     0
7713
#define MISC1_Y_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_BITS      32
7714
#define MISC1_Y_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_SHIFT     0
7715
7716
7717
/****************************************************************************
7718
 * MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST0
7719
 ***************************************************************************/
7720
/* MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST0 :: DESC_ADDR [31:05] */
7721
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_MASK         0xffffffe0
7722
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_ALIGN        0
7723
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_BITS         27
7724
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_DESC_ADDR_SHIFT        5
7725
7726
/* MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST0 :: reserved0 [04:01] */
7727
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_MASK         0x0000001e
7728
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_ALIGN        0
7729
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_BITS         4
7730
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_reserved0_SHIFT        1
7731
7732
/* MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST0 :: RX_DESC_LIST0_VALID [00:00] */
7733
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_MASK 0x00000001
7734
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_ALIGN 0
7735
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_BITS 1
7736
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0_RX_DESC_LIST0_VALID_SHIFT 0
7737
7738
7739
/****************************************************************************
7740
 * MISC1 :: UV_RX_FIRST_DESC_U_ADDR_LIST0
7741
 ***************************************************************************/
7742
/* MISC1 :: UV_RX_FIRST_DESC_U_ADDR_LIST0 :: DESC_ADDR [31:00] */
7743
#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_MASK         0xffffffff
7744
#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_ALIGN        0
7745
#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_BITS         32
7746
#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST0_DESC_ADDR_SHIFT        0
7747
7748
7749
/****************************************************************************
7750
 * MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST1
7751
 ***************************************************************************/
7752
/* MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST1 :: DESC_ADDR [31:05] */
7753
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_MASK         0xffffffe0
7754
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_ALIGN        0
7755
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_BITS         27
7756
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_DESC_ADDR_SHIFT        5
7757
7758
/* MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST1 :: reserved0 [04:01] */
7759
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_MASK         0x0000001e
7760
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_ALIGN        0
7761
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_BITS         4
7762
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_reserved0_SHIFT        1
7763
7764
/* MISC1 :: UV_RX_FIRST_DESC_L_ADDR_LIST1 :: RX_DESC_LIST1_VALID [00:00] */
7765
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_MASK 0x00000001
7766
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_ALIGN 0
7767
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_BITS 1
7768
#define MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1_RX_DESC_LIST1_VALID_SHIFT 0
7769
7770
7771
/****************************************************************************
7772
 * MISC1 :: UV_RX_FIRST_DESC_U_ADDR_LIST1
7773
 ***************************************************************************/
7774
/* MISC1 :: UV_RX_FIRST_DESC_U_ADDR_LIST1 :: DESC_ADDR [31:00] */
7775
#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_MASK         0xffffffff
7776
#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_ALIGN        0
7777
#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_BITS         32
7778
#define MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST1_DESC_ADDR_SHIFT        0
7779
7780
7781
/****************************************************************************
7782
 * MISC1 :: UV_RX_SW_DESC_LIST_CTRL_STS
7783
 ***************************************************************************/
7784
/* MISC1 :: UV_RX_SW_DESC_LIST_CTRL_STS :: reserved0 [31:04] */
7785
#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_reserved0_MASK           0xfffffff0
7786
#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_reserved0_ALIGN          0
7787
#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_reserved0_BITS           28
7788
#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_reserved0_SHIFT          4
7789
7790
/* MISC1 :: UV_RX_SW_DESC_LIST_CTRL_STS :: DMA_DATA_SERV_PTR [03:03] */
7791
#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_MASK   0x00000008
7792
#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_ALIGN  0
7793
#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_BITS   1
7794
#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DMA_DATA_SERV_PTR_SHIFT  3
7795
7796
/* MISC1 :: UV_RX_SW_DESC_LIST_CTRL_STS :: DESC_SERV_PTR [02:02] */
7797
#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_MASK       0x00000004
7798
#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_ALIGN      0
7799
#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_BITS       1
7800
#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_DESC_SERV_PTR_SHIFT      2
7801
7802
/* MISC1 :: UV_RX_SW_DESC_LIST_CTRL_STS :: RX_HALT_ON_ERROR [01:01] */
7803
#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_MASK    0x00000002
7804
#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_ALIGN   0
7805
#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_BITS    1
7806
#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_HALT_ON_ERROR_SHIFT   1
7807
7808
/* MISC1 :: UV_RX_SW_DESC_LIST_CTRL_STS :: RX_RUN_STOP [00:00] */
7809
#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_MASK         0x00000001
7810
#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_ALIGN        0
7811
#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_BITS         1
7812
#define MISC1_UV_RX_SW_DESC_LIST_CTRL_STS_RX_RUN_STOP_SHIFT        0
7813
7814
7815
/****************************************************************************
7816
 * MISC1 :: UV_RX_ERROR_STATUS
7817
 ***************************************************************************/
7818
/* MISC1 :: UV_RX_ERROR_STATUS :: reserved0 [31:14] */
7819
#define MISC1_UV_RX_ERROR_STATUS_reserved0_MASK                    0xffffc000
7820
#define MISC1_UV_RX_ERROR_STATUS_reserved0_ALIGN                   0
7821
#define MISC1_UV_RX_ERROR_STATUS_reserved0_BITS                    18
7822
#define MISC1_UV_RX_ERROR_STATUS_reserved0_SHIFT                   14
7823
7824
/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L1_UNDERRUN_ERROR [13:13] */
7825
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK         0x00002000
7826
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_ALIGN        0
7827
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_BITS         1
7828
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_SHIFT        13
7829
7830
/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L1_OVERRUN_ERROR [12:12] */
7831
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_MASK          0x00001000
7832
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_ALIGN         0
7833
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_BITS          1
7834
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_SHIFT         12
7835
7836
/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L0_UNDERRUN_ERROR [11:11] */
7837
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK         0x00000800
7838
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_ALIGN        0
7839
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_BITS         1
7840
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_SHIFT        11
7841
7842
/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L0_OVERRUN_ERROR [10:10] */
7843
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_MASK          0x00000400
7844
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_ALIGN         0
7845
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_BITS          1
7846
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_SHIFT         10
7847
7848
/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L1_DESC_TX_ABORT_ERRORS [09:09] */
7849
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_MASK   0x00000200
7850
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_ALIGN  0
7851
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_BITS   1
7852
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_SHIFT  9
7853
7854
/* MISC1 :: UV_RX_ERROR_STATUS :: reserved1 [08:08] */
7855
#define MISC1_UV_RX_ERROR_STATUS_reserved1_MASK                    0x00000100
7856
#define MISC1_UV_RX_ERROR_STATUS_reserved1_ALIGN                   0
7857
#define MISC1_UV_RX_ERROR_STATUS_reserved1_BITS                    1
7858
#define MISC1_UV_RX_ERROR_STATUS_reserved1_SHIFT                   8
7859
7860
/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L0_DESC_TX_ABORT_ERRORS [07:07] */
7861
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_MASK   0x00000080
7862
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_ALIGN  0
7863
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_BITS   1
7864
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_SHIFT  7
7865
7866
/* MISC1 :: UV_RX_ERROR_STATUS :: reserved2 [06:05] */
7867
#define MISC1_UV_RX_ERROR_STATUS_reserved2_MASK                    0x00000060
7868
#define MISC1_UV_RX_ERROR_STATUS_reserved2_ALIGN                   0
7869
#define MISC1_UV_RX_ERROR_STATUS_reserved2_BITS                    2
7870
#define MISC1_UV_RX_ERROR_STATUS_reserved2_SHIFT                   5
7871
7872
/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L1_FIFO_FULL_ERRORS [04:04] */
7873
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK       0x00000010
7874
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_ALIGN      0
7875
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_BITS       1
7876
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_SHIFT      4
7877
7878
/* MISC1 :: UV_RX_ERROR_STATUS :: reserved3 [03:02] */
7879
#define MISC1_UV_RX_ERROR_STATUS_reserved3_MASK                    0x0000000c
7880
#define MISC1_UV_RX_ERROR_STATUS_reserved3_ALIGN                   0
7881
#define MISC1_UV_RX_ERROR_STATUS_reserved3_BITS                    2
7882
#define MISC1_UV_RX_ERROR_STATUS_reserved3_SHIFT                   2
7883
7884
/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L0_FIFO_FULL_ERRORS [01:01] */
7885
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK       0x00000002
7886
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_ALIGN      0
7887
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_BITS       1
7888
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_SHIFT      1
7889
7890
/* MISC1 :: UV_RX_ERROR_STATUS :: reserved4 [00:00] */
7891
#define MISC1_UV_RX_ERROR_STATUS_reserved4_MASK                    0x00000001
7892
#define MISC1_UV_RX_ERROR_STATUS_reserved4_ALIGN                   0
7893
#define MISC1_UV_RX_ERROR_STATUS_reserved4_BITS                    1
7894
#define MISC1_UV_RX_ERROR_STATUS_reserved4_SHIFT                   0
7895
7896
7897
/****************************************************************************
7898
 * MISC1 :: UV_RX_LIST0_CUR_DESC_L_ADDR
7899
 ***************************************************************************/
7900
/* MISC1 :: UV_RX_LIST0_CUR_DESC_L_ADDR :: RX_L0_CUR_DESC_L_ADDR [31:05] */
7901
#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_MASK 0xffffffe0
7902
#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_ALIGN 0
7903
#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_BITS 27
7904
#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_RX_L0_CUR_DESC_L_ADDR_SHIFT 5
7905
7906
/* MISC1 :: UV_RX_LIST0_CUR_DESC_L_ADDR :: reserved0 [04:00] */
7907
#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_reserved0_MASK           0x0000001f
7908
#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_reserved0_ALIGN          0
7909
#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_reserved0_BITS           5
7910
#define MISC1_UV_RX_LIST0_CUR_DESC_L_ADDR_reserved0_SHIFT          0
7911
7912
7913
/****************************************************************************
7914
 * MISC1 :: UV_RX_LIST0_CUR_DESC_U_ADDR
7915
 ***************************************************************************/
7916
/* MISC1 :: UV_RX_LIST0_CUR_DESC_U_ADDR :: RX_L0_CUR_DESC_U_ADDR [31:00] */
7917
#define MISC1_UV_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_MASK 0xffffffff
7918
#define MISC1_UV_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_ALIGN 0
7919
#define MISC1_UV_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_BITS 32
7920
#define MISC1_UV_RX_LIST0_CUR_DESC_U_ADDR_RX_L0_CUR_DESC_U_ADDR_SHIFT 0
7921
7922
7923
/****************************************************************************
7924
 * MISC1 :: UV_RX_LIST0_CUR_BYTE_CNT
7925
 ***************************************************************************/
7926
/* MISC1 :: UV_RX_LIST0_CUR_BYTE_CNT :: RX_L0_CUR_BYTE_CNT [31:00] */
7927
#define MISC1_UV_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_MASK     0xffffffff
7928
#define MISC1_UV_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_ALIGN    0
7929
#define MISC1_UV_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_BITS     32
7930
#define MISC1_UV_RX_LIST0_CUR_BYTE_CNT_RX_L0_CUR_BYTE_CNT_SHIFT    0
7931
7932
7933
/****************************************************************************
7934
 * MISC1 :: UV_RX_LIST1_CUR_DESC_L_ADDR
7935
 ***************************************************************************/
7936
/* MISC1 :: UV_RX_LIST1_CUR_DESC_L_ADDR :: RX_L1_CUR_DESC_L_ADDR [31:05] */
7937
#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_MASK 0xffffffe0
7938
#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_ALIGN 0
7939
#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_BITS 27
7940
#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_RX_L1_CUR_DESC_L_ADDR_SHIFT 5
7941
7942
/* MISC1 :: UV_RX_LIST1_CUR_DESC_L_ADDR :: reserved0 [04:00] */
7943
#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_reserved0_MASK           0x0000001f
7944
#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_reserved0_ALIGN          0
7945
#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_reserved0_BITS           5
7946
#define MISC1_UV_RX_LIST1_CUR_DESC_L_ADDR_reserved0_SHIFT          0
7947
7948
7949
/****************************************************************************
7950
 * MISC1 :: UV_RX_LIST1_CUR_DESC_U_ADDR
7951
 ***************************************************************************/
7952
/* MISC1 :: UV_RX_LIST1_CUR_DESC_U_ADDR :: RX_L1_CUR_DESC_U_ADDR [31:00] */
7953
#define MISC1_UV_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_MASK 0xffffffff
7954
#define MISC1_UV_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_ALIGN 0
7955
#define MISC1_UV_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_BITS 32
7956
#define MISC1_UV_RX_LIST1_CUR_DESC_U_ADDR_RX_L1_CUR_DESC_U_ADDR_SHIFT 0
7957
7958
7959
/****************************************************************************
7960
 * MISC1 :: UV_RX_LIST1_CUR_BYTE_CNT
7961
 ***************************************************************************/
7962
/* MISC1 :: UV_RX_LIST1_CUR_BYTE_CNT :: RX_L1_CUR_BYTE_CNT [31:00] */
7963
#define MISC1_UV_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_MASK     0xffffffff
7964
#define MISC1_UV_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_ALIGN    0
7965
#define MISC1_UV_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_BITS     32
7966
#define MISC1_UV_RX_LIST1_CUR_BYTE_CNT_RX_L1_CUR_BYTE_CNT_SHIFT    0
7967
7968
7969
/****************************************************************************
7970
 * MISC1 :: DMA_DEBUG_OPTIONS_REG
7971
 ***************************************************************************/
7972
/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: DMA_DEBUG_TX_DMA_SOFT_RST [31:31] */
7973
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_SOFT_RST_MASK 0x80000000
7974
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_SOFT_RST_ALIGN 0
7975
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_SOFT_RST_BITS 1
7976
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_SOFT_RST_SHIFT 31
7977
7978
/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: DMA_DEBUG_RX_DMA_SOFT_RST [30:30] */
7979
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_SOFT_RST_MASK 0x40000000
7980
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_SOFT_RST_ALIGN 0
7981
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_SOFT_RST_BITS 1
7982
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_SOFT_RST_SHIFT 30
7983
7984
/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: DMA_DEBUG_TX_DMA_RD_Q_SOFT_RST [29:29] */
7985
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_RD_Q_SOFT_RST_MASK 0x20000000
7986
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_RD_Q_SOFT_RST_ALIGN 0
7987
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_RD_Q_SOFT_RST_BITS 1
7988
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_TX_DMA_RD_Q_SOFT_RST_SHIFT 29
7989
7990
/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: DMA_DEBUG_RX_DMA_WR_Q_SOFT_RST [28:28] */
7991
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_WR_Q_SOFT_RST_MASK 0x10000000
7992
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_WR_Q_SOFT_RST_ALIGN 0
7993
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_WR_Q_SOFT_RST_BITS 1
7994
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_RX_DMA_WR_Q_SOFT_RST_SHIFT 28
7995
7996
/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: RSVD_DMA_DEBUG_0 [27:05] */
7997
#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_0_MASK          0x0fffffe0
7998
#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_0_ALIGN         0
7999
#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_0_BITS          23
8000
#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_0_SHIFT         5
8001
8002
/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: DMA_DEBUG_EN_RX_DMA_XFER_CNT [04:04] */
8003
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_EN_RX_DMA_XFER_CNT_MASK 0x00000010
8004
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_EN_RX_DMA_XFER_CNT_ALIGN 0
8005
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_EN_RX_DMA_XFER_CNT_BITS 1
8006
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_EN_RX_DMA_XFER_CNT_SHIFT 4
8007
8008
/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: RSVD_DMA_DEBUG_1 [03:03] */
8009
#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_1_MASK          0x00000008
8010
#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_1_ALIGN         0
8011
#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_1_BITS          1
8012
#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_1_SHIFT         3
8013
8014
/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: DMA_DEBUG_SINGLE_RD_Q [02:02] */
8015
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_RD_Q_MASK     0x00000004
8016
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_RD_Q_ALIGN    0
8017
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_RD_Q_BITS     1
8018
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_RD_Q_SHIFT    2
8019
8020
/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: DMA_DEBUG_SINGLE_WR_Q [01:01] */
8021
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_WR_Q_MASK     0x00000002
8022
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_WR_Q_ALIGN    0
8023
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_WR_Q_BITS     1
8024
#define MISC1_DMA_DEBUG_OPTIONS_REG_DMA_DEBUG_SINGLE_WR_Q_SHIFT    1
8025
8026
/* MISC1 :: DMA_DEBUG_OPTIONS_REG :: RSVD_DMA_DEBUG_2 [00:00] */
8027
#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_2_MASK          0x00000001
8028
#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_2_ALIGN         0
8029
#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_2_BITS          1
8030
#define MISC1_DMA_DEBUG_OPTIONS_REG_RSVD_DMA_DEBUG_2_SHIFT         0
8031
8032
8033
/****************************************************************************
8034
 * MISC1 :: READ_CHANNEL_ERROR_STATUS
8035
 ***************************************************************************/
8036
/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_7 [31:28] */
8037
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_7_MASK     0xf0000000
8038
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_7_ALIGN    0
8039
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_7_BITS     4
8040
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_7_SHIFT    28
8041
8042
/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_6 [27:24] */
8043
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_6_MASK     0x0f000000
8044
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_6_ALIGN    0
8045
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_6_BITS     4
8046
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_6_SHIFT    24
8047
8048
/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_5 [23:20] */
8049
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_5_MASK     0x00f00000
8050
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_5_ALIGN    0
8051
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_5_BITS     4
8052
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_5_SHIFT    20
8053
8054
/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_4 [19:16] */
8055
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_4_MASK     0x000f0000
8056
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_4_ALIGN    0
8057
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_4_BITS     4
8058
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_4_SHIFT    16
8059
8060
/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_3 [15:12] */
8061
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_3_MASK     0x0000f000
8062
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_3_ALIGN    0
8063
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_3_BITS     4
8064
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_3_SHIFT    12
8065
8066
/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_2 [11:08] */
8067
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_2_MASK     0x00000f00
8068
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_2_ALIGN    0
8069
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_2_BITS     4
8070
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_2_SHIFT    8
8071
8072
/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_1 [07:04] */
8073
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_1_MASK     0x000000f0
8074
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_1_ALIGN    0
8075
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_1_BITS     4
8076
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_1_SHIFT    4
8077
8078
/* MISC1 :: READ_CHANNEL_ERROR_STATUS :: TX_ERR_STS_CHAN_0 [03:00] */
8079
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_0_MASK     0x0000000f
8080
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_0_ALIGN    0
8081
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_0_BITS     4
8082
#define MISC1_READ_CHANNEL_ERROR_STATUS_TX_ERR_STS_CHAN_0_SHIFT    0
8083
8084
8085
/****************************************************************************
8086
 * MISC1 :: PCIE_DMA_CTRL
8087
 ***************************************************************************/
8088
/* MISC1 :: PCIE_DMA_CTRL :: reserved0 [31:18] */
8089
#define MISC1_PCIE_DMA_CTRL_reserved0_MASK                         0xfffc0000
8090
#define MISC1_PCIE_DMA_CTRL_reserved0_ALIGN                        0
8091
#define MISC1_PCIE_DMA_CTRL_reserved0_BITS                         14
8092
#define MISC1_PCIE_DMA_CTRL_reserved0_SHIFT                        18
8093
8094
/* MISC1 :: PCIE_DMA_CTRL :: DESC_ENDIAN_MODE [17:16] */
8095
#define MISC1_PCIE_DMA_CTRL_DESC_ENDIAN_MODE_MASK                  0x00030000
8096
#define MISC1_PCIE_DMA_CTRL_DESC_ENDIAN_MODE_ALIGN                 0
8097
#define MISC1_PCIE_DMA_CTRL_DESC_ENDIAN_MODE_BITS                  2
8098
#define MISC1_PCIE_DMA_CTRL_DESC_ENDIAN_MODE_SHIFT                 16
8099
8100
/* MISC1 :: PCIE_DMA_CTRL :: reserved1 [15:10] */
8101
#define MISC1_PCIE_DMA_CTRL_reserved1_MASK                         0x0000fc00
8102
#define MISC1_PCIE_DMA_CTRL_reserved1_ALIGN                        0
8103
#define MISC1_PCIE_DMA_CTRL_reserved1_BITS                         6
8104
#define MISC1_PCIE_DMA_CTRL_reserved1_SHIFT                        10
8105
8106
/* MISC1 :: PCIE_DMA_CTRL :: EN_WEIGHTED_RR [09:09] */
8107
#define MISC1_PCIE_DMA_CTRL_EN_WEIGHTED_RR_MASK                    0x00000200
8108
#define MISC1_PCIE_DMA_CTRL_EN_WEIGHTED_RR_ALIGN                   0
8109
#define MISC1_PCIE_DMA_CTRL_EN_WEIGHTED_RR_BITS                    1
8110
#define MISC1_PCIE_DMA_CTRL_EN_WEIGHTED_RR_SHIFT                   9
8111
8112
/* MISC1 :: PCIE_DMA_CTRL :: EN_ROUND_ROBIN [08:08] */
8113
#define MISC1_PCIE_DMA_CTRL_EN_ROUND_ROBIN_MASK                    0x00000100
8114
#define MISC1_PCIE_DMA_CTRL_EN_ROUND_ROBIN_ALIGN                   0
8115
#define MISC1_PCIE_DMA_CTRL_EN_ROUND_ROBIN_BITS                    1
8116
#define MISC1_PCIE_DMA_CTRL_EN_ROUND_ROBIN_SHIFT                   8
8117
8118
/* MISC1 :: PCIE_DMA_CTRL :: reserved2 [07:05] */
8119
#define MISC1_PCIE_DMA_CTRL_reserved2_MASK                         0x000000e0
8120
#define MISC1_PCIE_DMA_CTRL_reserved2_ALIGN                        0
8121
#define MISC1_PCIE_DMA_CTRL_reserved2_BITS                         3
8122
#define MISC1_PCIE_DMA_CTRL_reserved2_SHIFT                        5
8123
8124
/* MISC1 :: PCIE_DMA_CTRL :: RELAXED_ORDERING [04:04] */
8125
#define MISC1_PCIE_DMA_CTRL_RELAXED_ORDERING_MASK                  0x00000010
8126
#define MISC1_PCIE_DMA_CTRL_RELAXED_ORDERING_ALIGN                 0
8127
#define MISC1_PCIE_DMA_CTRL_RELAXED_ORDERING_BITS                  1
8128
#define MISC1_PCIE_DMA_CTRL_RELAXED_ORDERING_SHIFT                 4
8129
8130
/* MISC1 :: PCIE_DMA_CTRL :: NO_SNOOP [03:03] */
8131
#define MISC1_PCIE_DMA_CTRL_NO_SNOOP_MASK                          0x00000008
8132
#define MISC1_PCIE_DMA_CTRL_NO_SNOOP_ALIGN                         0
8133
#define MISC1_PCIE_DMA_CTRL_NO_SNOOP_BITS                          1
8134
#define MISC1_PCIE_DMA_CTRL_NO_SNOOP_SHIFT                         3
8135
8136
/* MISC1 :: PCIE_DMA_CTRL :: TRAFFIC_CLASS [02:00] */
8137
#define MISC1_PCIE_DMA_CTRL_TRAFFIC_CLASS_MASK                     0x00000007
8138
#define MISC1_PCIE_DMA_CTRL_TRAFFIC_CLASS_ALIGN                    0
8139
#define MISC1_PCIE_DMA_CTRL_TRAFFIC_CLASS_BITS                     3
8140
#define MISC1_PCIE_DMA_CTRL_TRAFFIC_CLASS_SHIFT                    0
8141
8142
8143
/****************************************************************************
8144
 * BCM70012_MISC_TOP_MISC2
8145
 ***************************************************************************/
8146
/****************************************************************************
8147
 * MISC2 :: GLOBAL_CTRL
8148
 ***************************************************************************/
8149
/* MISC2 :: GLOBAL_CTRL :: reserved0 [31:21] */
8150
#define MISC2_GLOBAL_CTRL_reserved0_MASK                           0xffe00000
8151
#define MISC2_GLOBAL_CTRL_reserved0_ALIGN                          0
8152
#define MISC2_GLOBAL_CTRL_reserved0_BITS                           11
8153
#define MISC2_GLOBAL_CTRL_reserved0_SHIFT                          21
8154
8155
/* MISC2 :: GLOBAL_CTRL :: EN_WRITE_ALL [20:20] */
8156
#define MISC2_GLOBAL_CTRL_EN_WRITE_ALL_MASK                        0x00100000
8157
#define MISC2_GLOBAL_CTRL_EN_WRITE_ALL_ALIGN                       0
8158
#define MISC2_GLOBAL_CTRL_EN_WRITE_ALL_BITS                        1
8159
#define MISC2_GLOBAL_CTRL_EN_WRITE_ALL_SHIFT                       20
8160
8161
/* MISC2 :: GLOBAL_CTRL :: reserved1 [19:17] */
8162
#define MISC2_GLOBAL_CTRL_reserved1_MASK                           0x000e0000
8163
#define MISC2_GLOBAL_CTRL_reserved1_ALIGN                          0
8164
#define MISC2_GLOBAL_CTRL_reserved1_BITS                           3
8165
#define MISC2_GLOBAL_CTRL_reserved1_SHIFT                          17
8166
8167
/* MISC2 :: GLOBAL_CTRL :: EN_SINGLE_DMA [16:16] */
8168
#define MISC2_GLOBAL_CTRL_EN_SINGLE_DMA_MASK                       0x00010000
8169
#define MISC2_GLOBAL_CTRL_EN_SINGLE_DMA_ALIGN                      0
8170
#define MISC2_GLOBAL_CTRL_EN_SINGLE_DMA_BITS                       1
8171
#define MISC2_GLOBAL_CTRL_EN_SINGLE_DMA_SHIFT                      16
8172
8173
/* MISC2 :: GLOBAL_CTRL :: reserved2 [15:11] */
8174
#define MISC2_GLOBAL_CTRL_reserved2_MASK                           0x0000f800
8175
#define MISC2_GLOBAL_CTRL_reserved2_ALIGN                          0
8176
#define MISC2_GLOBAL_CTRL_reserved2_BITS                           5
8177
#define MISC2_GLOBAL_CTRL_reserved2_SHIFT                          11
8178
8179
/* MISC2 :: GLOBAL_CTRL :: Y_UV_FIFO_LEN_SEL [10:10] */
8180
#define MISC2_GLOBAL_CTRL_Y_UV_FIFO_LEN_SEL_MASK                   0x00000400
8181
#define MISC2_GLOBAL_CTRL_Y_UV_FIFO_LEN_SEL_ALIGN                  0
8182
#define MISC2_GLOBAL_CTRL_Y_UV_FIFO_LEN_SEL_BITS                   1
8183
#define MISC2_GLOBAL_CTRL_Y_UV_FIFO_LEN_SEL_SHIFT                  10
8184
8185
/* MISC2 :: GLOBAL_CTRL :: ODD_DE_EOFRST_DIS [09:09] */
8186
#define MISC2_GLOBAL_CTRL_ODD_DE_EOFRST_DIS_MASK                   0x00000200
8187
#define MISC2_GLOBAL_CTRL_ODD_DE_EOFRST_DIS_ALIGN                  0
8188
#define MISC2_GLOBAL_CTRL_ODD_DE_EOFRST_DIS_BITS                   1
8189
#define MISC2_GLOBAL_CTRL_ODD_DE_EOFRST_DIS_SHIFT                  9
8190
8191
/* MISC2 :: GLOBAL_CTRL :: DIS_BIT_STUFFING [08:08] */
8192
#define MISC2_GLOBAL_CTRL_DIS_BIT_STUFFING_MASK                    0x00000100
8193
#define MISC2_GLOBAL_CTRL_DIS_BIT_STUFFING_ALIGN                   0
8194
#define MISC2_GLOBAL_CTRL_DIS_BIT_STUFFING_BITS                    1
8195
#define MISC2_GLOBAL_CTRL_DIS_BIT_STUFFING_SHIFT                   8
8196
8197
/* MISC2 :: GLOBAL_CTRL :: reserved3 [07:05] */
8198
#define MISC2_GLOBAL_CTRL_reserved3_MASK                           0x000000e0
8199
#define MISC2_GLOBAL_CTRL_reserved3_ALIGN                          0
8200
#define MISC2_GLOBAL_CTRL_reserved3_BITS                           3
8201
#define MISC2_GLOBAL_CTRL_reserved3_SHIFT                          5
8202
8203
/* MISC2 :: GLOBAL_CTRL :: EN_PROG_MODE [04:04] */
8204
#define MISC2_GLOBAL_CTRL_EN_PROG_MODE_MASK                        0x00000010
8205
#define MISC2_GLOBAL_CTRL_EN_PROG_MODE_ALIGN                       0
8206
#define MISC2_GLOBAL_CTRL_EN_PROG_MODE_BITS                        1
8207
#define MISC2_GLOBAL_CTRL_EN_PROG_MODE_SHIFT                       4
8208
8209
/* MISC2 :: GLOBAL_CTRL :: reserved4 [03:01] */
8210
#define MISC2_GLOBAL_CTRL_reserved4_MASK                           0x0000000e
8211
#define MISC2_GLOBAL_CTRL_reserved4_ALIGN                          0
8212
#define MISC2_GLOBAL_CTRL_reserved4_BITS                           3
8213
#define MISC2_GLOBAL_CTRL_reserved4_SHIFT                          1
8214
8215
/* MISC2 :: GLOBAL_CTRL :: EN_188B [00:00] */
8216
#define MISC2_GLOBAL_CTRL_EN_188B_MASK                             0x00000001
8217
#define MISC2_GLOBAL_CTRL_EN_188B_ALIGN                            0
8218
#define MISC2_GLOBAL_CTRL_EN_188B_BITS                             1
8219
#define MISC2_GLOBAL_CTRL_EN_188B_SHIFT                            0
8220
8221
8222
/****************************************************************************
8223
 * MISC2 :: INTERNAL_STATUS
8224
 ***************************************************************************/
8225
/* MISC2 :: INTERNAL_STATUS :: reserved0 [31:12] */
8226
#define MISC2_INTERNAL_STATUS_reserved0_MASK                       0xfffff000
8227
#define MISC2_INTERNAL_STATUS_reserved0_ALIGN                      0
8228
#define MISC2_INTERNAL_STATUS_reserved0_BITS                       20
8229
#define MISC2_INTERNAL_STATUS_reserved0_SHIFT                      12
8230
8231
/* MISC2 :: INTERNAL_STATUS :: UV_BYTE_COUNT_FIFO_FULL [11:11] */
8232
#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_FULL_MASK         0x00000800
8233
#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_FULL_ALIGN        0
8234
#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_FULL_BITS         1
8235
#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_FULL_SHIFT        11
8236
8237
/* MISC2 :: INTERNAL_STATUS :: UV_DATA_FIFO_FULL [10:10] */
8238
#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_FULL_MASK               0x00000400
8239
#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_FULL_ALIGN              0
8240
#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_FULL_BITS               1
8241
#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_FULL_SHIFT              10
8242
8243
/* MISC2 :: INTERNAL_STATUS :: Y_BYTE_COUNT_FIFO_FULL [09:09] */
8244
#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_FULL_MASK          0x00000200
8245
#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_FULL_ALIGN         0
8246
#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_FULL_BITS          1
8247
#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_FULL_SHIFT         9
8248
8249
/* MISC2 :: INTERNAL_STATUS :: Y_DATA_FIFO_FULL [08:08] */
8250
#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_FULL_MASK                0x00000100
8251
#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_FULL_ALIGN               0
8252
#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_FULL_BITS                1
8253
#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_FULL_SHIFT               8
8254
8255
/* MISC2 :: INTERNAL_STATUS :: UV_BYTE_COUNT_FIFO_EMPTY [07:07] */
8256
#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_EMPTY_MASK        0x00000080
8257
#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_EMPTY_ALIGN       0
8258
#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_EMPTY_BITS        1
8259
#define MISC2_INTERNAL_STATUS_UV_BYTE_COUNT_FIFO_EMPTY_SHIFT       7
8260
8261
/* MISC2 :: INTERNAL_STATUS :: UV_DATA_FIFO_EMPTY [06:06] */
8262
#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_EMPTY_MASK              0x00000040
8263
#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_EMPTY_ALIGN             0
8264
#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_EMPTY_BITS              1
8265
#define MISC2_INTERNAL_STATUS_UV_DATA_FIFO_EMPTY_SHIFT             6
8266
8267
/* MISC2 :: INTERNAL_STATUS :: Y_BYTE_COUNT_FIFO_EMPTY [05:05] */
8268
#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_EMPTY_MASK         0x00000020
8269
#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_EMPTY_ALIGN        0
8270
#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_EMPTY_BITS         1
8271
#define MISC2_INTERNAL_STATUS_Y_BYTE_COUNT_FIFO_EMPTY_SHIFT        5
8272
8273
/* MISC2 :: INTERNAL_STATUS :: Y_DATA_FIFO_EMPTY [04:04] */
8274
#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_EMPTY_MASK               0x00000010
8275
#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_EMPTY_ALIGN              0
8276
#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_EMPTY_BITS               1
8277
#define MISC2_INTERNAL_STATUS_Y_DATA_FIFO_EMPTY_SHIFT              4
8278
8279
/* MISC2 :: INTERNAL_STATUS :: reserved1 [03:00] */
8280
#define MISC2_INTERNAL_STATUS_reserved1_MASK                       0x0000000f
8281
#define MISC2_INTERNAL_STATUS_reserved1_ALIGN                      0
8282
#define MISC2_INTERNAL_STATUS_reserved1_BITS                       4
8283
#define MISC2_INTERNAL_STATUS_reserved1_SHIFT                      0
8284
8285
8286
/****************************************************************************
8287
 * MISC2 :: INTERNAL_STATUS_MUX_CTRL
8288
 ***************************************************************************/
8289
/* MISC2 :: INTERNAL_STATUS_MUX_CTRL :: reserved0 [31:16] */
8290
#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved0_MASK              0xffff0000
8291
#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved0_ALIGN             0
8292
#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved0_BITS              16
8293
#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved0_SHIFT             16
8294
8295
/* MISC2 :: INTERNAL_STATUS_MUX_CTRL :: CLK_OUT_ALT_SRC [15:15] */
8296
#define MISC2_INTERNAL_STATUS_MUX_CTRL_CLK_OUT_ALT_SRC_MASK        0x00008000
8297
#define MISC2_INTERNAL_STATUS_MUX_CTRL_CLK_OUT_ALT_SRC_ALIGN       0
8298
#define MISC2_INTERNAL_STATUS_MUX_CTRL_CLK_OUT_ALT_SRC_BITS        1
8299
#define MISC2_INTERNAL_STATUS_MUX_CTRL_CLK_OUT_ALT_SRC_SHIFT       15
8300
8301
/* MISC2 :: INTERNAL_STATUS_MUX_CTRL :: DEBUG_CLK_SEL [14:12] */
8302
#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CLK_SEL_MASK          0x00007000
8303
#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CLK_SEL_ALIGN         0
8304
#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CLK_SEL_BITS          3
8305
#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CLK_SEL_SHIFT         12
8306
8307
/* MISC2 :: INTERNAL_STATUS_MUX_CTRL :: reserved1 [11:09] */
8308
#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved1_MASK              0x00000e00
8309
#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved1_ALIGN             0
8310
#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved1_BITS              3
8311
#define MISC2_INTERNAL_STATUS_MUX_CTRL_reserved1_SHIFT             9
8312
8313
/* MISC2 :: INTERNAL_STATUS_MUX_CTRL :: DEBUG_TOP_CORE_SEL [08:08] */
8314
#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_TOP_CORE_SEL_MASK     0x00000100
8315
#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_TOP_CORE_SEL_ALIGN    0
8316
#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_TOP_CORE_SEL_BITS     1
8317
#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_TOP_CORE_SEL_SHIFT    8
8318
8319
/* MISC2 :: INTERNAL_STATUS_MUX_CTRL :: DEBUG_CORE_BLK_SEL [07:04] */
8320
#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CORE_BLK_SEL_MASK     0x000000f0
8321
#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CORE_BLK_SEL_ALIGN    0
8322
#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CORE_BLK_SEL_BITS     4
8323
#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_CORE_BLK_SEL_SHIFT    4
8324
8325
/* MISC2 :: INTERNAL_STATUS_MUX_CTRL :: DEBUG_VECTOR_SEL [03:00] */
8326
#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_VECTOR_SEL_MASK       0x0000000f
8327
#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_VECTOR_SEL_ALIGN      0
8328
#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_VECTOR_SEL_BITS       4
8329
#define MISC2_INTERNAL_STATUS_MUX_CTRL_DEBUG_VECTOR_SEL_SHIFT      0
8330
8331
8332
/****************************************************************************
8333
 * MISC2 :: DEBUG_FIFO_LENGTH
8334
 ***************************************************************************/
8335
/* MISC2 :: DEBUG_FIFO_LENGTH :: reserved0 [31:21] */
8336
#define MISC2_DEBUG_FIFO_LENGTH_reserved0_MASK                     0xffe00000
8337
#define MISC2_DEBUG_FIFO_LENGTH_reserved0_ALIGN                    0
8338
#define MISC2_DEBUG_FIFO_LENGTH_reserved0_BITS                     11
8339
#define MISC2_DEBUG_FIFO_LENGTH_reserved0_SHIFT                    21
8340
8341
/* MISC2 :: DEBUG_FIFO_LENGTH :: FIFO_LENGTH [20:00] */
8342
#define MISC2_DEBUG_FIFO_LENGTH_FIFO_LENGTH_MASK                   0x001fffff
8343
#define MISC2_DEBUG_FIFO_LENGTH_FIFO_LENGTH_ALIGN                  0
8344
#define MISC2_DEBUG_FIFO_LENGTH_FIFO_LENGTH_BITS                   21
8345
#define MISC2_DEBUG_FIFO_LENGTH_FIFO_LENGTH_SHIFT                  0
8346
8347
8348
/****************************************************************************
8349
 * BCM70012_MISC_TOP_MISC3
8350
 ***************************************************************************/
8351
/****************************************************************************
8352
 * MISC3 :: RESET_CTRL
8353
 ***************************************************************************/
8354
/* MISC3 :: RESET_CTRL :: reserved0 [31:09] */
8355
#define MISC3_RESET_CTRL_reserved0_MASK                            0xfffffe00
8356
#define MISC3_RESET_CTRL_reserved0_ALIGN                           0
8357
#define MISC3_RESET_CTRL_reserved0_BITS                            23
8358
#define MISC3_RESET_CTRL_reserved0_SHIFT                           9
8359
8360
/* MISC3 :: RESET_CTRL :: PLL_RESET [08:08] */
8361
#define MISC3_RESET_CTRL_PLL_RESET_MASK                            0x00000100
8362
#define MISC3_RESET_CTRL_PLL_RESET_ALIGN                           0
8363
#define MISC3_RESET_CTRL_PLL_RESET_BITS                            1
8364
#define MISC3_RESET_CTRL_PLL_RESET_SHIFT                           8
8365
8366
/* MISC3 :: RESET_CTRL :: reserved1 [07:02] */
8367
#define MISC3_RESET_CTRL_reserved1_MASK                            0x000000fc
8368
#define MISC3_RESET_CTRL_reserved1_ALIGN                           0
8369
#define MISC3_RESET_CTRL_reserved1_BITS                            6
8370
#define MISC3_RESET_CTRL_reserved1_SHIFT                           2
8371
8372
/* MISC3 :: RESET_CTRL :: POR_RESET [01:01] */
8373
#define MISC3_RESET_CTRL_POR_RESET_MASK                            0x00000002
8374
#define MISC3_RESET_CTRL_POR_RESET_ALIGN                           0
8375
#define MISC3_RESET_CTRL_POR_RESET_BITS                            1
8376
#define MISC3_RESET_CTRL_POR_RESET_SHIFT                           1
8377
8378
/* MISC3 :: RESET_CTRL :: CORE_RESET [00:00] */
8379
#define MISC3_RESET_CTRL_CORE_RESET_MASK                           0x00000001
8380
#define MISC3_RESET_CTRL_CORE_RESET_ALIGN                          0
8381
#define MISC3_RESET_CTRL_CORE_RESET_BITS                           1
8382
#define MISC3_RESET_CTRL_CORE_RESET_SHIFT                          0
8383
8384
8385
/****************************************************************************
8386
 * MISC3 :: BIST_CTRL
8387
 ***************************************************************************/
8388
/* MISC3 :: BIST_CTRL :: MBIST_OVERRIDE [31:31] */
8389
#define MISC3_BIST_CTRL_MBIST_OVERRIDE_MASK                        0x80000000
8390
#define MISC3_BIST_CTRL_MBIST_OVERRIDE_ALIGN                       0
8391
#define MISC3_BIST_CTRL_MBIST_OVERRIDE_BITS                        1
8392
#define MISC3_BIST_CTRL_MBIST_OVERRIDE_SHIFT                       31
8393
8394
/* MISC3 :: BIST_CTRL :: reserved0 [30:15] */
8395
#define MISC3_BIST_CTRL_reserved0_MASK                             0x7fff8000
8396
#define MISC3_BIST_CTRL_reserved0_ALIGN                            0
8397
#define MISC3_BIST_CTRL_reserved0_BITS                             16
8398
#define MISC3_BIST_CTRL_reserved0_SHIFT                            15
8399
8400
/* MISC3 :: BIST_CTRL :: MBIST_EN_2 [14:14] */
8401
#define MISC3_BIST_CTRL_MBIST_EN_2_MASK                            0x00004000
8402
#define MISC3_BIST_CTRL_MBIST_EN_2_ALIGN                           0
8403
#define MISC3_BIST_CTRL_MBIST_EN_2_BITS                            1
8404
#define MISC3_BIST_CTRL_MBIST_EN_2_SHIFT                           14
8405
8406
/* MISC3 :: BIST_CTRL :: MBIST_EN_1 [13:13] */
8407
#define MISC3_BIST_CTRL_MBIST_EN_1_MASK                            0x00002000
8408
#define MISC3_BIST_CTRL_MBIST_EN_1_ALIGN                           0
8409
#define MISC3_BIST_CTRL_MBIST_EN_1_BITS                            1
8410
#define MISC3_BIST_CTRL_MBIST_EN_1_SHIFT                           13
8411
8412
/* MISC3 :: BIST_CTRL :: MBIST_EN_0 [12:12] */
8413
#define MISC3_BIST_CTRL_MBIST_EN_0_MASK                            0x00001000
8414
#define MISC3_BIST_CTRL_MBIST_EN_0_ALIGN                           0
8415
#define MISC3_BIST_CTRL_MBIST_EN_0_BITS                            1
8416
#define MISC3_BIST_CTRL_MBIST_EN_0_SHIFT                           12
8417
8418
/* MISC3 :: BIST_CTRL :: reserved1 [11:06] */
8419
#define MISC3_BIST_CTRL_reserved1_MASK                             0x00000fc0
8420
#define MISC3_BIST_CTRL_reserved1_ALIGN                            0
8421
#define MISC3_BIST_CTRL_reserved1_BITS                             6
8422
#define MISC3_BIST_CTRL_reserved1_SHIFT                            6
8423
8424
/* MISC3 :: BIST_CTRL :: MBIST_SETUP [05:04] */
8425
#define MISC3_BIST_CTRL_MBIST_SETUP_MASK                           0x00000030
8426
#define MISC3_BIST_CTRL_MBIST_SETUP_ALIGN                          0
8427
#define MISC3_BIST_CTRL_MBIST_SETUP_BITS                           2
8428
#define MISC3_BIST_CTRL_MBIST_SETUP_SHIFT                          4
8429
8430
/* MISC3 :: BIST_CTRL :: reserved2 [03:01] */
8431
#define MISC3_BIST_CTRL_reserved2_MASK                             0x0000000e
8432
#define MISC3_BIST_CTRL_reserved2_ALIGN                            0
8433
#define MISC3_BIST_CTRL_reserved2_BITS                             3
8434
#define MISC3_BIST_CTRL_reserved2_SHIFT                            1
8435
8436
/* MISC3 :: BIST_CTRL :: MBIST_ASYNC_RESET [00:00] */
8437
#define MISC3_BIST_CTRL_MBIST_ASYNC_RESET_MASK                     0x00000001
8438
#define MISC3_BIST_CTRL_MBIST_ASYNC_RESET_ALIGN                    0
8439
#define MISC3_BIST_CTRL_MBIST_ASYNC_RESET_BITS                     1
8440
#define MISC3_BIST_CTRL_MBIST_ASYNC_RESET_SHIFT                    0
8441
8442
8443
/****************************************************************************
8444
 * MISC3 :: BIST_STATUS
8445
 ***************************************************************************/
8446
/* MISC3 :: BIST_STATUS :: reserved0 [31:31] */
8447
#define MISC3_BIST_STATUS_reserved0_MASK                           0x80000000
8448
#define MISC3_BIST_STATUS_reserved0_ALIGN                          0
8449
#define MISC3_BIST_STATUS_reserved0_BITS                           1
8450
#define MISC3_BIST_STATUS_reserved0_SHIFT                          31
8451
8452
/* MISC3 :: BIST_STATUS :: MBIST_GO_2 [30:30] */
8453
#define MISC3_BIST_STATUS_MBIST_GO_2_MASK                          0x40000000
8454
#define MISC3_BIST_STATUS_MBIST_GO_2_ALIGN                         0
8455
#define MISC3_BIST_STATUS_MBIST_GO_2_BITS                          1
8456
#define MISC3_BIST_STATUS_MBIST_GO_2_SHIFT                         30
8457
8458
/* MISC3 :: BIST_STATUS :: MBIST_GO_1 [29:29] */
8459
#define MISC3_BIST_STATUS_MBIST_GO_1_MASK                          0x20000000
8460
#define MISC3_BIST_STATUS_MBIST_GO_1_ALIGN                         0
8461
#define MISC3_BIST_STATUS_MBIST_GO_1_BITS                          1
8462
#define MISC3_BIST_STATUS_MBIST_GO_1_SHIFT                         29
8463
8464
/* MISC3 :: BIST_STATUS :: MBIST_GO_0 [28:28] */
8465
#define MISC3_BIST_STATUS_MBIST_GO_0_MASK                          0x10000000
8466
#define MISC3_BIST_STATUS_MBIST_GO_0_ALIGN                         0
8467
#define MISC3_BIST_STATUS_MBIST_GO_0_BITS                          1
8468
#define MISC3_BIST_STATUS_MBIST_GO_0_SHIFT                         28
8469
8470
/* MISC3 :: BIST_STATUS :: reserved1 [27:27] */
8471
#define MISC3_BIST_STATUS_reserved1_MASK                           0x08000000
8472
#define MISC3_BIST_STATUS_reserved1_ALIGN                          0
8473
#define MISC3_BIST_STATUS_reserved1_BITS                           1
8474
#define MISC3_BIST_STATUS_reserved1_SHIFT                          27
8475
8476
/* MISC3 :: BIST_STATUS :: MBIST_DONE_2 [26:26] */
8477
#define MISC3_BIST_STATUS_MBIST_DONE_2_MASK                        0x04000000
8478
#define MISC3_BIST_STATUS_MBIST_DONE_2_ALIGN                       0
8479
#define MISC3_BIST_STATUS_MBIST_DONE_2_BITS                        1
8480
#define MISC3_BIST_STATUS_MBIST_DONE_2_SHIFT                       26
8481
8482
/* MISC3 :: BIST_STATUS :: MBIST_DONE_1 [25:25] */
8483
#define MISC3_BIST_STATUS_MBIST_DONE_1_MASK                        0x02000000
8484
#define MISC3_BIST_STATUS_MBIST_DONE_1_ALIGN                       0
8485
#define MISC3_BIST_STATUS_MBIST_DONE_1_BITS                        1
8486
#define MISC3_BIST_STATUS_MBIST_DONE_1_SHIFT                       25
8487
8488
/* MISC3 :: BIST_STATUS :: MBIST_DONE_0 [24:24] */
8489
#define MISC3_BIST_STATUS_MBIST_DONE_0_MASK                        0x01000000
8490
#define MISC3_BIST_STATUS_MBIST_DONE_0_ALIGN                       0
8491
#define MISC3_BIST_STATUS_MBIST_DONE_0_BITS                        1
8492
#define MISC3_BIST_STATUS_MBIST_DONE_0_SHIFT                       24
8493
8494
/* MISC3 :: BIST_STATUS :: reserved2 [23:06] */
8495
#define MISC3_BIST_STATUS_reserved2_MASK                           0x00ffffc0
8496
#define MISC3_BIST_STATUS_reserved2_ALIGN                          0
8497
#define MISC3_BIST_STATUS_reserved2_BITS                           18
8498
#define MISC3_BIST_STATUS_reserved2_SHIFT                          6
8499
8500
/* MISC3 :: BIST_STATUS :: MBIST_MBIST_MEMORY_GO_2 [05:04] */
8501
#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_2_MASK             0x00000030
8502
#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_2_ALIGN            0
8503
#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_2_BITS             2
8504
#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_2_SHIFT            4
8505
8506
/* MISC3 :: BIST_STATUS :: MBIST_MBIST_MEMORY_GO_1 [03:02] */
8507
#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_1_MASK             0x0000000c
8508
#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_1_ALIGN            0
8509
#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_1_BITS             2
8510
#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_1_SHIFT            2
8511
8512
/* MISC3 :: BIST_STATUS :: MBIST_MBIST_MEMORY_GO_0 [01:00] */
8513
#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_0_MASK             0x00000003
8514
#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_0_ALIGN            0
8515
#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_0_BITS             2
8516
#define MISC3_BIST_STATUS_MBIST_MBIST_MEMORY_GO_0_SHIFT            0
8517
8518
8519
/****************************************************************************
8520
 * MISC3 :: RX_CHECKSUM
8521
 ***************************************************************************/
8522
/* MISC3 :: RX_CHECKSUM :: RX_CHECKSUM [31:00] */
8523
#define MISC3_RX_CHECKSUM_RX_CHECKSUM_MASK                         0xffffffff
8524
#define MISC3_RX_CHECKSUM_RX_CHECKSUM_ALIGN                        0
8525
#define MISC3_RX_CHECKSUM_RX_CHECKSUM_BITS                         32
8526
#define MISC3_RX_CHECKSUM_RX_CHECKSUM_SHIFT                        0
8527
8528
8529
/****************************************************************************
8530
 * MISC3 :: TX_CHECKSUM
8531
 ***************************************************************************/
8532
/* MISC3 :: TX_CHECKSUM :: TX_CHECKSUM [31:00] */
8533
#define MISC3_TX_CHECKSUM_TX_CHECKSUM_MASK                         0xffffffff
8534
#define MISC3_TX_CHECKSUM_TX_CHECKSUM_ALIGN                        0
8535
#define MISC3_TX_CHECKSUM_TX_CHECKSUM_BITS                         32
8536
#define MISC3_TX_CHECKSUM_TX_CHECKSUM_SHIFT                        0
8537
8538
8539
/****************************************************************************
8540
 * MISC3 :: ECO_CTRL_CORE
8541
 ***************************************************************************/
8542
/* MISC3 :: ECO_CTRL_CORE :: reserved0 [31:16] */
8543
#define MISC3_ECO_CTRL_CORE_reserved0_MASK                         0xffff0000
8544
#define MISC3_ECO_CTRL_CORE_reserved0_ALIGN                        0
8545
#define MISC3_ECO_CTRL_CORE_reserved0_BITS                         16
8546
#define MISC3_ECO_CTRL_CORE_reserved0_SHIFT                        16
8547
8548
/* MISC3 :: ECO_CTRL_CORE :: ECO_CORE_RST_N [15:00] */
8549
#define MISC3_ECO_CTRL_CORE_ECO_CORE_RST_N_MASK                    0x0000ffff
8550
#define MISC3_ECO_CTRL_CORE_ECO_CORE_RST_N_ALIGN                   0
8551
#define MISC3_ECO_CTRL_CORE_ECO_CORE_RST_N_BITS                    16
8552
#define MISC3_ECO_CTRL_CORE_ECO_CORE_RST_N_SHIFT                   0
8553
8554
8555
/****************************************************************************
8556
 * MISC3 :: CSI_TEST_CTRL
8557
 ***************************************************************************/
8558
/* MISC3 :: CSI_TEST_CTRL :: ENABLE_CSI_TEST [31:31] */
8559
#define MISC3_CSI_TEST_CTRL_ENABLE_CSI_TEST_MASK                   0x80000000
8560
#define MISC3_CSI_TEST_CTRL_ENABLE_CSI_TEST_ALIGN                  0
8561
#define MISC3_CSI_TEST_CTRL_ENABLE_CSI_TEST_BITS                   1
8562
#define MISC3_CSI_TEST_CTRL_ENABLE_CSI_TEST_SHIFT                  31
8563
8564
/* MISC3 :: CSI_TEST_CTRL :: reserved0 [30:24] */
8565
#define MISC3_CSI_TEST_CTRL_reserved0_MASK                         0x7f000000
8566
#define MISC3_CSI_TEST_CTRL_reserved0_ALIGN                        0
8567
#define MISC3_CSI_TEST_CTRL_reserved0_BITS                         7
8568
#define MISC3_CSI_TEST_CTRL_reserved0_SHIFT                        24
8569
8570
/* MISC3 :: CSI_TEST_CTRL :: CSI_CLOCK_ENABLE [23:16] */
8571
#define MISC3_CSI_TEST_CTRL_CSI_CLOCK_ENABLE_MASK                  0x00ff0000
8572
#define MISC3_CSI_TEST_CTRL_CSI_CLOCK_ENABLE_ALIGN                 0
8573
#define MISC3_CSI_TEST_CTRL_CSI_CLOCK_ENABLE_BITS                  8
8574
#define MISC3_CSI_TEST_CTRL_CSI_CLOCK_ENABLE_SHIFT                 16
8575
8576
/* MISC3 :: CSI_TEST_CTRL :: CSI_SYNC [15:08] */
8577
#define MISC3_CSI_TEST_CTRL_CSI_SYNC_MASK                          0x0000ff00
8578
#define MISC3_CSI_TEST_CTRL_CSI_SYNC_ALIGN                         0
8579
#define MISC3_CSI_TEST_CTRL_CSI_SYNC_BITS                          8
8580
#define MISC3_CSI_TEST_CTRL_CSI_SYNC_SHIFT                         8
8581
8582
/* MISC3 :: CSI_TEST_CTRL :: CSI_DATA [07:00] */
8583
#define MISC3_CSI_TEST_CTRL_CSI_DATA_MASK                          0x000000ff
8584
#define MISC3_CSI_TEST_CTRL_CSI_DATA_ALIGN                         0
8585
#define MISC3_CSI_TEST_CTRL_CSI_DATA_BITS                          8
8586
#define MISC3_CSI_TEST_CTRL_CSI_DATA_SHIFT                         0
8587
8588
8589
/****************************************************************************
8590
 * MISC3 :: HD_DVI_TEST_CTRL
8591
 ***************************************************************************/
8592
/* MISC3 :: HD_DVI_TEST_CTRL :: reserved0 [31:25] */
8593
#define MISC3_HD_DVI_TEST_CTRL_reserved0_MASK                      0xfe000000
8594
#define MISC3_HD_DVI_TEST_CTRL_reserved0_ALIGN                     0
8595
#define MISC3_HD_DVI_TEST_CTRL_reserved0_BITS                      7
8596
#define MISC3_HD_DVI_TEST_CTRL_reserved0_SHIFT                     25
8597
8598
/* MISC3 :: HD_DVI_TEST_CTRL :: POS_VIDO_VBLANK_N [24:24] */
8599
#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_VBLANK_N_MASK              0x01000000
8600
#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_VBLANK_N_ALIGN             0
8601
#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_VBLANK_N_BITS              1
8602
#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_VBLANK_N_SHIFT             24
8603
8604
/* MISC3 :: HD_DVI_TEST_CTRL :: NEG_VIDO_DVI_DATA [23:12] */
8605
#define MISC3_HD_DVI_TEST_CTRL_NEG_VIDO_DVI_DATA_MASK              0x00fff000
8606
#define MISC3_HD_DVI_TEST_CTRL_NEG_VIDO_DVI_DATA_ALIGN             0
8607
#define MISC3_HD_DVI_TEST_CTRL_NEG_VIDO_DVI_DATA_BITS              12
8608
#define MISC3_HD_DVI_TEST_CTRL_NEG_VIDO_DVI_DATA_SHIFT             12
8609
8610
/* MISC3 :: HD_DVI_TEST_CTRL :: POS_VIDO_DVI_DATA [11:00] */
8611
#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_DVI_DATA_MASK              0x00000fff
8612
#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_DVI_DATA_ALIGN             0
8613
#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_DVI_DATA_BITS              12
8614
#define MISC3_HD_DVI_TEST_CTRL_POS_VIDO_DVI_DATA_SHIFT             0
8615
8616
8617
/****************************************************************************
8618
 * BCM70012_MISC_TOP_MISC_PERST
8619
 ***************************************************************************/
8620
/****************************************************************************
8621
 * MISC_PERST :: ECO_CTRL_PERST
8622
 ***************************************************************************/
8623
/* MISC_PERST :: ECO_CTRL_PERST :: reserved0 [31:16] */
8624
#define MISC_PERST_ECO_CTRL_PERST_reserved0_MASK                   0xffff0000
8625
#define MISC_PERST_ECO_CTRL_PERST_reserved0_ALIGN                  0
8626
#define MISC_PERST_ECO_CTRL_PERST_reserved0_BITS                   16
8627
#define MISC_PERST_ECO_CTRL_PERST_reserved0_SHIFT                  16
8628
8629
/* MISC_PERST :: ECO_CTRL_PERST :: ECO_PERST_N [15:00] */
8630
#define MISC_PERST_ECO_CTRL_PERST_ECO_PERST_N_MASK                 0x0000ffff
8631
#define MISC_PERST_ECO_CTRL_PERST_ECO_PERST_N_ALIGN                0
8632
#define MISC_PERST_ECO_CTRL_PERST_ECO_PERST_N_BITS                 16
8633
#define MISC_PERST_ECO_CTRL_PERST_ECO_PERST_N_SHIFT                0
8634
8635
8636
/****************************************************************************
8637
 * MISC_PERST :: DECODER_CTRL
8638
 ***************************************************************************/
8639
/* MISC_PERST :: DECODER_CTRL :: reserved0 [31:05] */
8640
#define MISC_PERST_DECODER_CTRL_reserved0_MASK                     0xffffffe0
8641
#define MISC_PERST_DECODER_CTRL_reserved0_ALIGN                    0
8642
#define MISC_PERST_DECODER_CTRL_reserved0_BITS                     27
8643
#define MISC_PERST_DECODER_CTRL_reserved0_SHIFT                    5
8644
8645
/* MISC_PERST :: DECODER_CTRL :: STOP_BCM7412_CLK [04:04] */
8646
#define MISC_PERST_DECODER_CTRL_STOP_BCM7412_CLK_MASK              0x00000010
8647
#define MISC_PERST_DECODER_CTRL_STOP_BCM7412_CLK_ALIGN             0
8648
#define MISC_PERST_DECODER_CTRL_STOP_BCM7412_CLK_BITS              1
8649
#define MISC_PERST_DECODER_CTRL_STOP_BCM7412_CLK_SHIFT             4
8650
8651
/* MISC_PERST :: DECODER_CTRL :: reserved1 [03:01] */
8652
#define MISC_PERST_DECODER_CTRL_reserved1_MASK                     0x0000000e
8653
#define MISC_PERST_DECODER_CTRL_reserved1_ALIGN                    0
8654
#define MISC_PERST_DECODER_CTRL_reserved1_BITS                     3
8655
#define MISC_PERST_DECODER_CTRL_reserved1_SHIFT                    1
8656
8657
/* MISC_PERST :: DECODER_CTRL :: BCM7412_RESET [00:00] */
8658
#define MISC_PERST_DECODER_CTRL_BCM7412_RESET_MASK                 0x00000001
8659
#define MISC_PERST_DECODER_CTRL_BCM7412_RESET_ALIGN                0
8660
#define MISC_PERST_DECODER_CTRL_BCM7412_RESET_BITS                 1
8661
#define MISC_PERST_DECODER_CTRL_BCM7412_RESET_SHIFT                0
8662
8663
8664
/****************************************************************************
8665
 * MISC_PERST :: CCE_STATUS
8666
 ***************************************************************************/
8667
/* MISC_PERST :: CCE_STATUS :: CCE_DONE [31:31] */
8668
#define MISC_PERST_CCE_STATUS_CCE_DONE_MASK                        0x80000000
8669
#define MISC_PERST_CCE_STATUS_CCE_DONE_ALIGN                       0
8670
#define MISC_PERST_CCE_STATUS_CCE_DONE_BITS                        1
8671
#define MISC_PERST_CCE_STATUS_CCE_DONE_SHIFT                       31
8672
8673
/* MISC_PERST :: CCE_STATUS :: reserved0 [30:03] */
8674
#define MISC_PERST_CCE_STATUS_reserved0_MASK                       0x7ffffff8
8675
#define MISC_PERST_CCE_STATUS_reserved0_ALIGN                      0
8676
#define MISC_PERST_CCE_STATUS_reserved0_BITS                       28
8677
#define MISC_PERST_CCE_STATUS_reserved0_SHIFT                      3
8678
8679
/* MISC_PERST :: CCE_STATUS :: CCE_BAD_GISB_ACCESS [02:02] */
8680
#define MISC_PERST_CCE_STATUS_CCE_BAD_GISB_ACCESS_MASK             0x00000004
8681
#define MISC_PERST_CCE_STATUS_CCE_BAD_GISB_ACCESS_ALIGN            0
8682
#define MISC_PERST_CCE_STATUS_CCE_BAD_GISB_ACCESS_BITS             1
8683
#define MISC_PERST_CCE_STATUS_CCE_BAD_GISB_ACCESS_SHIFT            2
8684
8685
/* MISC_PERST :: CCE_STATUS :: CCE_BAD_I2C_ACCESS [01:01] */
8686
#define MISC_PERST_CCE_STATUS_CCE_BAD_I2C_ACCESS_MASK              0x00000002
8687
#define MISC_PERST_CCE_STATUS_CCE_BAD_I2C_ACCESS_ALIGN             0
8688
#define MISC_PERST_CCE_STATUS_CCE_BAD_I2C_ACCESS_BITS              1
8689
#define MISC_PERST_CCE_STATUS_CCE_BAD_I2C_ACCESS_SHIFT             1
8690
8691
/* MISC_PERST :: CCE_STATUS :: CCE_BAD_SECTION_ID [00:00] */
8692
#define MISC_PERST_CCE_STATUS_CCE_BAD_SECTION_ID_MASK              0x00000001
8693
#define MISC_PERST_CCE_STATUS_CCE_BAD_SECTION_ID_ALIGN             0
8694
#define MISC_PERST_CCE_STATUS_CCE_BAD_SECTION_ID_BITS              1
8695
#define MISC_PERST_CCE_STATUS_CCE_BAD_SECTION_ID_SHIFT             0
8696
8697
8698
/****************************************************************************
8699
 * MISC_PERST :: PCIE_DEBUG
8700
 ***************************************************************************/
8701
/* MISC_PERST :: PCIE_DEBUG :: SERDES_TERM_CNT [31:16] */
8702
#define MISC_PERST_PCIE_DEBUG_SERDES_TERM_CNT_MASK                 0xffff0000
8703
#define MISC_PERST_PCIE_DEBUG_SERDES_TERM_CNT_ALIGN                0
8704
#define MISC_PERST_PCIE_DEBUG_SERDES_TERM_CNT_BITS                 16
8705
#define MISC_PERST_PCIE_DEBUG_SERDES_TERM_CNT_SHIFT                16
8706
8707
/* MISC_PERST :: PCIE_DEBUG :: reserved0 [15:11] */
8708
#define MISC_PERST_PCIE_DEBUG_reserved0_MASK                       0x0000f800
8709
#define MISC_PERST_PCIE_DEBUG_reserved0_ALIGN                      0
8710
#define MISC_PERST_PCIE_DEBUG_reserved0_BITS                       5
8711
#define MISC_PERST_PCIE_DEBUG_reserved0_SHIFT                      11
8712
8713
/* MISC_PERST :: PCIE_DEBUG :: PLL_VCO_RESCUE [10:10] */
8714
#define MISC_PERST_PCIE_DEBUG_PLL_VCO_RESCUE_MASK                  0x00000400
8715
#define MISC_PERST_PCIE_DEBUG_PLL_VCO_RESCUE_ALIGN                 0
8716
#define MISC_PERST_PCIE_DEBUG_PLL_VCO_RESCUE_BITS                  1
8717
#define MISC_PERST_PCIE_DEBUG_PLL_VCO_RESCUE_SHIFT                 10
8718
8719
/* MISC_PERST :: PCIE_DEBUG :: PLL_PDN_OVERRIDE [09:09] */
8720
#define MISC_PERST_PCIE_DEBUG_PLL_PDN_OVERRIDE_MASK                0x00000200
8721
#define MISC_PERST_PCIE_DEBUG_PLL_PDN_OVERRIDE_ALIGN               0
8722
#define MISC_PERST_PCIE_DEBUG_PLL_PDN_OVERRIDE_BITS                1
8723
#define MISC_PERST_PCIE_DEBUG_PLL_PDN_OVERRIDE_SHIFT               9
8724
8725
/* MISC_PERST :: PCIE_DEBUG :: CORE_CLOCK_OVR [08:08] */
8726
#define MISC_PERST_PCIE_DEBUG_CORE_CLOCK_OVR_MASK                  0x00000100
8727
#define MISC_PERST_PCIE_DEBUG_CORE_CLOCK_OVR_ALIGN                 0
8728
#define MISC_PERST_PCIE_DEBUG_CORE_CLOCK_OVR_BITS                  1
8729
#define MISC_PERST_PCIE_DEBUG_CORE_CLOCK_OVR_SHIFT                 8
8730
8731
/* MISC_PERST :: PCIE_DEBUG :: reserved1 [07:04] */
8732
#define MISC_PERST_PCIE_DEBUG_reserved1_MASK                       0x000000f0
8733
#define MISC_PERST_PCIE_DEBUG_reserved1_ALIGN                      0
8734
#define MISC_PERST_PCIE_DEBUG_reserved1_BITS                       4
8735
#define MISC_PERST_PCIE_DEBUG_reserved1_SHIFT                      4
8736
8737
/* MISC_PERST :: PCIE_DEBUG :: PCIE_TMUX_SEL [03:00] */
8738
#define MISC_PERST_PCIE_DEBUG_PCIE_TMUX_SEL_MASK                   0x0000000f
8739
#define MISC_PERST_PCIE_DEBUG_PCIE_TMUX_SEL_ALIGN                  0
8740
#define MISC_PERST_PCIE_DEBUG_PCIE_TMUX_SEL_BITS                   4
8741
#define MISC_PERST_PCIE_DEBUG_PCIE_TMUX_SEL_SHIFT                  0
8742
8743
8744
/****************************************************************************
8745
 * MISC_PERST :: PCIE_DEBUG_STATUS
8746
 ***************************************************************************/
8747
/* MISC_PERST :: PCIE_DEBUG_STATUS :: reserved0 [31:06] */
8748
#define MISC_PERST_PCIE_DEBUG_STATUS_reserved0_MASK                0xffffffc0
8749
#define MISC_PERST_PCIE_DEBUG_STATUS_reserved0_ALIGN               0
8750
#define MISC_PERST_PCIE_DEBUG_STATUS_reserved0_BITS                26
8751
#define MISC_PERST_PCIE_DEBUG_STATUS_reserved0_SHIFT               6
8752
8753
/* MISC_PERST :: PCIE_DEBUG_STATUS :: DATALINKATTN [05:05] */
8754
#define MISC_PERST_PCIE_DEBUG_STATUS_DATALINKATTN_MASK             0x00000020
8755
#define MISC_PERST_PCIE_DEBUG_STATUS_DATALINKATTN_ALIGN            0
8756
#define MISC_PERST_PCIE_DEBUG_STATUS_DATALINKATTN_BITS             1
8757
#define MISC_PERST_PCIE_DEBUG_STATUS_DATALINKATTN_SHIFT            5
8758
8759
/* MISC_PERST :: PCIE_DEBUG_STATUS :: PHYLINKATTN [04:04] */
8760
#define MISC_PERST_PCIE_DEBUG_STATUS_PHYLINKATTN_MASK              0x00000010
8761
#define MISC_PERST_PCIE_DEBUG_STATUS_PHYLINKATTN_ALIGN             0
8762
#define MISC_PERST_PCIE_DEBUG_STATUS_PHYLINKATTN_BITS              1
8763
#define MISC_PERST_PCIE_DEBUG_STATUS_PHYLINKATTN_SHIFT             4
8764
8765
/* MISC_PERST :: PCIE_DEBUG_STATUS :: reserved1 [03:02] */
8766
#define MISC_PERST_PCIE_DEBUG_STATUS_reserved1_MASK                0x0000000c
8767
#define MISC_PERST_PCIE_DEBUG_STATUS_reserved1_ALIGN               0
8768
#define MISC_PERST_PCIE_DEBUG_STATUS_reserved1_BITS                2
8769
#define MISC_PERST_PCIE_DEBUG_STATUS_reserved1_SHIFT               2
8770
8771
/* MISC_PERST :: PCIE_DEBUG_STATUS :: DATA_LINKUP [01:01] */
8772
#define MISC_PERST_PCIE_DEBUG_STATUS_DATA_LINKUP_MASK              0x00000002
8773
#define MISC_PERST_PCIE_DEBUG_STATUS_DATA_LINKUP_ALIGN             0
8774
#define MISC_PERST_PCIE_DEBUG_STATUS_DATA_LINKUP_BITS              1
8775
#define MISC_PERST_PCIE_DEBUG_STATUS_DATA_LINKUP_SHIFT             1
8776
8777
/* MISC_PERST :: PCIE_DEBUG_STATUS :: PHY_LINKUP [00:00] */
8778
#define MISC_PERST_PCIE_DEBUG_STATUS_PHY_LINKUP_MASK               0x00000001
8779
#define MISC_PERST_PCIE_DEBUG_STATUS_PHY_LINKUP_ALIGN              0
8780
#define MISC_PERST_PCIE_DEBUG_STATUS_PHY_LINKUP_BITS               1
8781
#define MISC_PERST_PCIE_DEBUG_STATUS_PHY_LINKUP_SHIFT              0
8782
8783
8784
/****************************************************************************
8785
 * MISC_PERST :: VREG_CTRL
8786
 ***************************************************************************/
8787
/* MISC_PERST :: VREG_CTRL :: reserved0 [31:08] */
8788
#define MISC_PERST_VREG_CTRL_reserved0_MASK                        0xffffff00
8789
#define MISC_PERST_VREG_CTRL_reserved0_ALIGN                       0
8790
#define MISC_PERST_VREG_CTRL_reserved0_BITS                        24
8791
#define MISC_PERST_VREG_CTRL_reserved0_SHIFT                       8
8792
8793
/* MISC_PERST :: VREG_CTRL :: VREG1P2_SEL [07:04] */
8794
#define MISC_PERST_VREG_CTRL_VREG1P2_SEL_MASK                      0x000000f0
8795
#define MISC_PERST_VREG_CTRL_VREG1P2_SEL_ALIGN                     0
8796
#define MISC_PERST_VREG_CTRL_VREG1P2_SEL_BITS                      4
8797
#define MISC_PERST_VREG_CTRL_VREG1P2_SEL_SHIFT                     4
8798
8799
/* MISC_PERST :: VREG_CTRL :: VREG2P5_SEL [03:00] */
8800
#define MISC_PERST_VREG_CTRL_VREG2P5_SEL_MASK                      0x0000000f
8801
#define MISC_PERST_VREG_CTRL_VREG2P5_SEL_ALIGN                     0
8802
#define MISC_PERST_VREG_CTRL_VREG2P5_SEL_BITS                      4
8803
#define MISC_PERST_VREG_CTRL_VREG2P5_SEL_SHIFT                     0
8804
8805
8806
/****************************************************************************
8807
 * MISC_PERST :: MEM_CTRL
8808
 ***************************************************************************/
8809
/* MISC_PERST :: MEM_CTRL :: reserved0 [31:04] */
8810
#define MISC_PERST_MEM_CTRL_reserved0_MASK                         0xfffffff0
8811
#define MISC_PERST_MEM_CTRL_reserved0_ALIGN                        0
8812
#define MISC_PERST_MEM_CTRL_reserved0_BITS                         28
8813
#define MISC_PERST_MEM_CTRL_reserved0_SHIFT                        4
8814
8815
/* MISC_PERST :: MEM_CTRL :: Y_RM [03:03] */
8816
#define MISC_PERST_MEM_CTRL_Y_RM_MASK                              0x00000008
8817
#define MISC_PERST_MEM_CTRL_Y_RM_ALIGN                             0
8818
#define MISC_PERST_MEM_CTRL_Y_RM_BITS                              1
8819
#define MISC_PERST_MEM_CTRL_Y_RM_SHIFT                             3
8820
8821
/* MISC_PERST :: MEM_CTRL :: Y_CCM [02:02] */
8822
#define MISC_PERST_MEM_CTRL_Y_CCM_MASK                             0x00000004
8823
#define MISC_PERST_MEM_CTRL_Y_CCM_ALIGN                            0
8824
#define MISC_PERST_MEM_CTRL_Y_CCM_BITS                             1
8825
#define MISC_PERST_MEM_CTRL_Y_CCM_SHIFT                            2
8826
8827
/* MISC_PERST :: MEM_CTRL :: UV_RM [01:01] */
8828
#define MISC_PERST_MEM_CTRL_UV_RM_MASK                             0x00000002
8829
#define MISC_PERST_MEM_CTRL_UV_RM_ALIGN                            0
8830
#define MISC_PERST_MEM_CTRL_UV_RM_BITS                             1
8831
#define MISC_PERST_MEM_CTRL_UV_RM_SHIFT                            1
8832
8833
/* MISC_PERST :: MEM_CTRL :: UV_CCM [00:00] */
8834
#define MISC_PERST_MEM_CTRL_UV_CCM_MASK                            0x00000001
8835
#define MISC_PERST_MEM_CTRL_UV_CCM_ALIGN                           0
8836
#define MISC_PERST_MEM_CTRL_UV_CCM_BITS                            1
8837
#define MISC_PERST_MEM_CTRL_UV_CCM_SHIFT                           0
8838
8839
8840
/****************************************************************************
8841
 * MISC_PERST :: CLOCK_CTRL
8842
 ***************************************************************************/
8843
/* MISC_PERST :: CLOCK_CTRL :: reserved0 [31:20] */
8844
#define MISC_PERST_CLOCK_CTRL_reserved0_MASK                       0xfff00000
8845
#define MISC_PERST_CLOCK_CTRL_reserved0_ALIGN                      0
8846
#define MISC_PERST_CLOCK_CTRL_reserved0_BITS                       12
8847
#define MISC_PERST_CLOCK_CTRL_reserved0_SHIFT                      20
8848
8849
/* MISC_PERST :: CLOCK_CTRL :: PLL_DIV [19:16] */
8850
#define MISC_PERST_CLOCK_CTRL_PLL_DIV_MASK                         0x000f0000
8851
#define MISC_PERST_CLOCK_CTRL_PLL_DIV_ALIGN                        0
8852
#define MISC_PERST_CLOCK_CTRL_PLL_DIV_BITS                         4
8853
#define MISC_PERST_CLOCK_CTRL_PLL_DIV_SHIFT                        16
8854
8855
/* MISC_PERST :: CLOCK_CTRL :: PLL_MULT [15:08] */
8856
#define MISC_PERST_CLOCK_CTRL_PLL_MULT_MASK                        0x0000ff00
8857
#define MISC_PERST_CLOCK_CTRL_PLL_MULT_ALIGN                       0
8858
#define MISC_PERST_CLOCK_CTRL_PLL_MULT_BITS                        8
8859
#define MISC_PERST_CLOCK_CTRL_PLL_MULT_SHIFT                       8
8860
8861
/* MISC_PERST :: CLOCK_CTRL :: reserved1 [07:03] */
8862
#define MISC_PERST_CLOCK_CTRL_reserved1_MASK                       0x000000f8
8863
#define MISC_PERST_CLOCK_CTRL_reserved1_ALIGN                      0
8864
#define MISC_PERST_CLOCK_CTRL_reserved1_BITS                       5
8865
#define MISC_PERST_CLOCK_CTRL_reserved1_SHIFT                      3
8866
8867
/* MISC_PERST :: CLOCK_CTRL :: PLL_PWRDOWN [02:02] */
8868
#define MISC_PERST_CLOCK_CTRL_PLL_PWRDOWN_MASK                     0x00000004
8869
#define MISC_PERST_CLOCK_CTRL_PLL_PWRDOWN_ALIGN                    0
8870
#define MISC_PERST_CLOCK_CTRL_PLL_PWRDOWN_BITS                     1
8871
#define MISC_PERST_CLOCK_CTRL_PLL_PWRDOWN_SHIFT                    2
8872
8873
/* MISC_PERST :: CLOCK_CTRL :: STOP_CORE_CLK [01:01] */
8874
#define MISC_PERST_CLOCK_CTRL_STOP_CORE_CLK_MASK                   0x00000002
8875
#define MISC_PERST_CLOCK_CTRL_STOP_CORE_CLK_ALIGN                  0
8876
#define MISC_PERST_CLOCK_CTRL_STOP_CORE_CLK_BITS                   1
8877
#define MISC_PERST_CLOCK_CTRL_STOP_CORE_CLK_SHIFT                  1
8878
8879
/* MISC_PERST :: CLOCK_CTRL :: SEL_ALT_CLK [00:00] */
8880
#define MISC_PERST_CLOCK_CTRL_SEL_ALT_CLK_MASK                     0x00000001
8881
#define MISC_PERST_CLOCK_CTRL_SEL_ALT_CLK_ALIGN                    0
8882
#define MISC_PERST_CLOCK_CTRL_SEL_ALT_CLK_BITS                     1
8883
#define MISC_PERST_CLOCK_CTRL_SEL_ALT_CLK_SHIFT                    0
8884
8885
8886
/****************************************************************************
8887
 * BCM70012_MISC_TOP_GISB_ARBITER
8888
 ***************************************************************************/
8889
/****************************************************************************
8890
 * GISB_ARBITER :: REVISION
8891
 ***************************************************************************/
8892
/* GISB_ARBITER :: REVISION :: reserved0 [31:16] */
8893
#define GISB_ARBITER_REVISION_reserved0_MASK                       0xffff0000
8894
#define GISB_ARBITER_REVISION_reserved0_ALIGN                      0
8895
#define GISB_ARBITER_REVISION_reserved0_BITS                       16
8896
#define GISB_ARBITER_REVISION_reserved0_SHIFT                      16
8897
8898
/* GISB_ARBITER :: REVISION :: MAJOR [15:08] */
8899
#define GISB_ARBITER_REVISION_MAJOR_MASK                           0x0000ff00
8900
#define GISB_ARBITER_REVISION_MAJOR_ALIGN                          0
8901
#define GISB_ARBITER_REVISION_MAJOR_BITS                           8
8902
#define GISB_ARBITER_REVISION_MAJOR_SHIFT                          8
8903
8904
/* GISB_ARBITER :: REVISION :: MINOR [07:00] */
8905
#define GISB_ARBITER_REVISION_MINOR_MASK                           0x000000ff
8906
#define GISB_ARBITER_REVISION_MINOR_ALIGN                          0
8907
#define GISB_ARBITER_REVISION_MINOR_BITS                           8
8908
#define GISB_ARBITER_REVISION_MINOR_SHIFT                          0
8909
8910
8911
/****************************************************************************
8912
 * GISB_ARBITER :: SCRATCH
8913
 ***************************************************************************/
8914
/* GISB_ARBITER :: SCRATCH :: scratch_bit [31:00] */
8915
#define GISB_ARBITER_SCRATCH_scratch_bit_MASK                      0xffffffff
8916
#define GISB_ARBITER_SCRATCH_scratch_bit_ALIGN                     0
8917
#define GISB_ARBITER_SCRATCH_scratch_bit_BITS                      32
8918
#define GISB_ARBITER_SCRATCH_scratch_bit_SHIFT                     0
8919
8920
8921
/****************************************************************************
8922
 * GISB_ARBITER :: REQ_MASK
8923
 ***************************************************************************/
8924
/* GISB_ARBITER :: REQ_MASK :: reserved0 [31:06] */
8925
#define GISB_ARBITER_REQ_MASK_reserved0_MASK                       0xffffffc0
8926
#define GISB_ARBITER_REQ_MASK_reserved0_ALIGN                      0
8927
#define GISB_ARBITER_REQ_MASK_reserved0_BITS                       26
8928
#define GISB_ARBITER_REQ_MASK_reserved0_SHIFT                      6
8929
8930
/* GISB_ARBITER :: REQ_MASK :: bsp [05:05] */
8931
#define GISB_ARBITER_REQ_MASK_bsp_MASK                             0x00000020
8932
#define GISB_ARBITER_REQ_MASK_bsp_ALIGN                            0
8933
#define GISB_ARBITER_REQ_MASK_bsp_BITS                             1
8934
#define GISB_ARBITER_REQ_MASK_bsp_SHIFT                            5
8935
#define GISB_ARBITER_REQ_MASK_bsp_UNMASK                           0
8936
8937
/* GISB_ARBITER :: REQ_MASK :: tgt [04:04] */
8938
#define GISB_ARBITER_REQ_MASK_tgt_MASK                             0x00000010
8939
#define GISB_ARBITER_REQ_MASK_tgt_ALIGN                            0
8940
#define GISB_ARBITER_REQ_MASK_tgt_BITS                             1
8941
#define GISB_ARBITER_REQ_MASK_tgt_SHIFT                            4
8942
#define GISB_ARBITER_REQ_MASK_tgt_UNMASK                           0
8943
8944
/* GISB_ARBITER :: REQ_MASK :: aes [03:03] */
8945
#define GISB_ARBITER_REQ_MASK_aes_MASK                             0x00000008
8946
#define GISB_ARBITER_REQ_MASK_aes_ALIGN                            0
8947
#define GISB_ARBITER_REQ_MASK_aes_BITS                             1
8948
#define GISB_ARBITER_REQ_MASK_aes_SHIFT                            3
8949
#define GISB_ARBITER_REQ_MASK_aes_UNMASK                           0
8950
8951
/* GISB_ARBITER :: REQ_MASK :: dci [02:02] */
8952
#define GISB_ARBITER_REQ_MASK_dci_MASK                             0x00000004
8953
#define GISB_ARBITER_REQ_MASK_dci_ALIGN                            0
8954
#define GISB_ARBITER_REQ_MASK_dci_BITS                             1
8955
#define GISB_ARBITER_REQ_MASK_dci_SHIFT                            2
8956
#define GISB_ARBITER_REQ_MASK_dci_UNMASK                           0
8957
8958
/* GISB_ARBITER :: REQ_MASK :: cce [01:01] */
8959
#define GISB_ARBITER_REQ_MASK_cce_MASK                             0x00000002
8960
#define GISB_ARBITER_REQ_MASK_cce_ALIGN                            0
8961
#define GISB_ARBITER_REQ_MASK_cce_BITS                             1
8962
#define GISB_ARBITER_REQ_MASK_cce_SHIFT                            1
8963
#define GISB_ARBITER_REQ_MASK_cce_UNMASK                           0
8964
8965
/* GISB_ARBITER :: REQ_MASK :: dbu [00:00] */
8966
#define GISB_ARBITER_REQ_MASK_dbu_MASK                             0x00000001
8967
#define GISB_ARBITER_REQ_MASK_dbu_ALIGN                            0
8968
#define GISB_ARBITER_REQ_MASK_dbu_BITS                             1
8969
#define GISB_ARBITER_REQ_MASK_dbu_SHIFT                            0
8970
#define GISB_ARBITER_REQ_MASK_dbu_UNMASK                           0
8971
8972
8973
/****************************************************************************
8974
 * GISB_ARBITER :: TIMER
8975
 ***************************************************************************/
8976
/* GISB_ARBITER :: TIMER :: hi_count [31:16] */
8977
#define GISB_ARBITER_TIMER_hi_count_MASK                           0xffff0000
8978
#define GISB_ARBITER_TIMER_hi_count_ALIGN                          0
8979
#define GISB_ARBITER_TIMER_hi_count_BITS                           16
8980
#define GISB_ARBITER_TIMER_hi_count_SHIFT                          16
8981
8982
/* GISB_ARBITER :: TIMER :: lo_count [15:00] */
8983
#define GISB_ARBITER_TIMER_lo_count_MASK                           0x0000ffff
8984
#define GISB_ARBITER_TIMER_lo_count_ALIGN                          0
8985
#define GISB_ARBITER_TIMER_lo_count_BITS                           16
8986
#define GISB_ARBITER_TIMER_lo_count_SHIFT                          0
8987
8988
8989
/****************************************************************************
8990
 * GISB_ARBITER :: BP_CTRL
8991
 ***************************************************************************/
8992
/* GISB_ARBITER :: BP_CTRL :: reserved0 [31:02] */
8993
#define GISB_ARBITER_BP_CTRL_reserved0_MASK                        0xfffffffc
8994
#define GISB_ARBITER_BP_CTRL_reserved0_ALIGN                       0
8995
#define GISB_ARBITER_BP_CTRL_reserved0_BITS                        30
8996
#define GISB_ARBITER_BP_CTRL_reserved0_SHIFT                       2
8997
8998
/* GISB_ARBITER :: BP_CTRL :: breakpoint_tea [01:01] */
8999
#define GISB_ARBITER_BP_CTRL_breakpoint_tea_MASK                   0x00000002
9000
#define GISB_ARBITER_BP_CTRL_breakpoint_tea_ALIGN                  0
9001
#define GISB_ARBITER_BP_CTRL_breakpoint_tea_BITS                   1
9002
#define GISB_ARBITER_BP_CTRL_breakpoint_tea_SHIFT                  1
9003
#define GISB_ARBITER_BP_CTRL_breakpoint_tea_DISABLE                0
9004
#define GISB_ARBITER_BP_CTRL_breakpoint_tea_ENABLE                 1
9005
9006
/* GISB_ARBITER :: BP_CTRL :: repeat_capture [00:00] */
9007
#define GISB_ARBITER_BP_CTRL_repeat_capture_MASK                   0x00000001
9008
#define GISB_ARBITER_BP_CTRL_repeat_capture_ALIGN                  0
9009
#define GISB_ARBITER_BP_CTRL_repeat_capture_BITS                   1
9010
#define GISB_ARBITER_BP_CTRL_repeat_capture_SHIFT                  0
9011
#define GISB_ARBITER_BP_CTRL_repeat_capture_DISABLE                0
9012
#define GISB_ARBITER_BP_CTRL_repeat_capture_ENABLE                 1
9013
9014
9015
/****************************************************************************
9016
 * GISB_ARBITER :: BP_CAP_CLR
9017
 ***************************************************************************/
9018
/* GISB_ARBITER :: BP_CAP_CLR :: reserved0 [31:01] */
9019
#define GISB_ARBITER_BP_CAP_CLR_reserved0_MASK                     0xfffffffe
9020
#define GISB_ARBITER_BP_CAP_CLR_reserved0_ALIGN                    0
9021
#define GISB_ARBITER_BP_CAP_CLR_reserved0_BITS                     31
9022
#define GISB_ARBITER_BP_CAP_CLR_reserved0_SHIFT                    1
9023
9024
/* GISB_ARBITER :: BP_CAP_CLR :: clear [00:00] */
9025
#define GISB_ARBITER_BP_CAP_CLR_clear_MASK                         0x00000001
9026
#define GISB_ARBITER_BP_CAP_CLR_clear_ALIGN                        0
9027
#define GISB_ARBITER_BP_CAP_CLR_clear_BITS                         1
9028
#define GISB_ARBITER_BP_CAP_CLR_clear_SHIFT                        0
9029
9030
9031
/****************************************************************************
9032
 * GISB_ARBITER :: BP_START_ADDR_0
9033
 ***************************************************************************/
9034
/* GISB_ARBITER :: BP_START_ADDR_0 :: start [31:00] */
9035
#define GISB_ARBITER_BP_START_ADDR_0_start_MASK                    0xffffffff
9036
#define GISB_ARBITER_BP_START_ADDR_0_start_ALIGN                   0
9037
#define GISB_ARBITER_BP_START_ADDR_0_start_BITS                    32
9038
#define GISB_ARBITER_BP_START_ADDR_0_start_SHIFT                   0
9039
9040
9041
/****************************************************************************
9042
 * GISB_ARBITER :: BP_END_ADDR_0
9043
 ***************************************************************************/
9044
/* GISB_ARBITER :: BP_END_ADDR_0 :: end [31:00] */
9045
#define GISB_ARBITER_BP_END_ADDR_0_end_MASK                        0xffffffff
9046
#define GISB_ARBITER_BP_END_ADDR_0_end_ALIGN                       0
9047
#define GISB_ARBITER_BP_END_ADDR_0_end_BITS                        32
9048
#define GISB_ARBITER_BP_END_ADDR_0_end_SHIFT                       0
9049
9050
9051
/****************************************************************************
9052
 * GISB_ARBITER :: BP_READ_0
9053
 ***************************************************************************/
9054
/* GISB_ARBITER :: BP_READ_0 :: reserved0 [31:06] */
9055
#define GISB_ARBITER_BP_READ_0_reserved0_MASK                      0xffffffc0
9056
#define GISB_ARBITER_BP_READ_0_reserved0_ALIGN                     0
9057
#define GISB_ARBITER_BP_READ_0_reserved0_BITS                      26
9058
#define GISB_ARBITER_BP_READ_0_reserved0_SHIFT                     6
9059
9060
/* GISB_ARBITER :: BP_READ_0 :: bsp [05:05] */
9061
#define GISB_ARBITER_BP_READ_0_bsp_MASK                            0x00000020
9062
#define GISB_ARBITER_BP_READ_0_bsp_ALIGN                           0
9063
#define GISB_ARBITER_BP_READ_0_bsp_BITS                            1
9064
#define GISB_ARBITER_BP_READ_0_bsp_SHIFT                           5
9065
#define GISB_ARBITER_BP_READ_0_bsp_DISABLE                         0
9066
#define GISB_ARBITER_BP_READ_0_bsp_ENABLE                          1
9067
9068
/* GISB_ARBITER :: BP_READ_0 :: aes [04:04] */
9069
#define GISB_ARBITER_BP_READ_0_aes_MASK                            0x00000010
9070
#define GISB_ARBITER_BP_READ_0_aes_ALIGN                           0
9071
#define GISB_ARBITER_BP_READ_0_aes_BITS                            1
9072
#define GISB_ARBITER_BP_READ_0_aes_SHIFT                           4
9073
#define GISB_ARBITER_BP_READ_0_aes_DISABLE                         0
9074
#define GISB_ARBITER_BP_READ_0_aes_ENABLE                          1
9075
9076
/* GISB_ARBITER :: BP_READ_0 :: fve [03:03] */
9077
#define GISB_ARBITER_BP_READ_0_fve_MASK                            0x00000008
9078
#define GISB_ARBITER_BP_READ_0_fve_ALIGN                           0
9079
#define GISB_ARBITER_BP_READ_0_fve_BITS                            1
9080
#define GISB_ARBITER_BP_READ_0_fve_SHIFT                           3
9081
#define GISB_ARBITER_BP_READ_0_fve_DISABLE                         0
9082
#define GISB_ARBITER_BP_READ_0_fve_ENABLE                          1
9083
9084
/* GISB_ARBITER :: BP_READ_0 :: tgt [02:02] */
9085
#define GISB_ARBITER_BP_READ_0_tgt_MASK                            0x00000004
9086
#define GISB_ARBITER_BP_READ_0_tgt_ALIGN                           0
9087
#define GISB_ARBITER_BP_READ_0_tgt_BITS                            1
9088
#define GISB_ARBITER_BP_READ_0_tgt_SHIFT                           2
9089
#define GISB_ARBITER_BP_READ_0_tgt_DISABLE                         0
9090
#define GISB_ARBITER_BP_READ_0_tgt_ENABLE                          1
9091
9092
/* GISB_ARBITER :: BP_READ_0 :: dbu [01:01] */
9093
#define GISB_ARBITER_BP_READ_0_dbu_MASK                            0x00000002
9094
#define GISB_ARBITER_BP_READ_0_dbu_ALIGN                           0
9095
#define GISB_ARBITER_BP_READ_0_dbu_BITS                            1
9096
#define GISB_ARBITER_BP_READ_0_dbu_SHIFT                           1
9097
#define GISB_ARBITER_BP_READ_0_dbu_DISABLE                         0
9098
#define GISB_ARBITER_BP_READ_0_dbu_ENABLE                          1
9099
9100
/* GISB_ARBITER :: BP_READ_0 :: cce [00:00] */
9101
#define GISB_ARBITER_BP_READ_0_cce_MASK                            0x00000001
9102
#define GISB_ARBITER_BP_READ_0_cce_ALIGN                           0
9103
#define GISB_ARBITER_BP_READ_0_cce_BITS                            1
9104
#define GISB_ARBITER_BP_READ_0_cce_SHIFT                           0
9105
#define GISB_ARBITER_BP_READ_0_cce_DISABLE                         0
9106
#define GISB_ARBITER_BP_READ_0_cce_ENABLE                          1
9107
9108
9109
/****************************************************************************
9110
 * GISB_ARBITER :: BP_WRITE_0
9111
 ***************************************************************************/
9112
/* GISB_ARBITER :: BP_WRITE_0 :: reserved0 [31:06] */
9113
#define GISB_ARBITER_BP_WRITE_0_reserved0_MASK                     0xffffffc0
9114
#define GISB_ARBITER_BP_WRITE_0_reserved0_ALIGN                    0
9115
#define GISB_ARBITER_BP_WRITE_0_reserved0_BITS                     26
9116
#define GISB_ARBITER_BP_WRITE_0_reserved0_SHIFT                    6
9117
9118
/* GISB_ARBITER :: BP_WRITE_0 :: bsp [05:05] */
9119
#define GISB_ARBITER_BP_WRITE_0_bsp_MASK                           0x00000020
9120
#define GISB_ARBITER_BP_WRITE_0_bsp_ALIGN                          0
9121
#define GISB_ARBITER_BP_WRITE_0_bsp_BITS                           1
9122
#define GISB_ARBITER_BP_WRITE_0_bsp_SHIFT                          5
9123
#define GISB_ARBITER_BP_WRITE_0_bsp_DISABLE                        0
9124
#define GISB_ARBITER_BP_WRITE_0_bsp_ENABLE                         1
9125
9126
/* GISB_ARBITER :: BP_WRITE_0 :: aes [04:04] */
9127
#define GISB_ARBITER_BP_WRITE_0_aes_MASK                           0x00000010
9128
#define GISB_ARBITER_BP_WRITE_0_aes_ALIGN                          0
9129
#define GISB_ARBITER_BP_WRITE_0_aes_BITS                           1
9130
#define GISB_ARBITER_BP_WRITE_0_aes_SHIFT                          4
9131
#define GISB_ARBITER_BP_WRITE_0_aes_DISABLE                        0
9132
#define GISB_ARBITER_BP_WRITE_0_aes_ENABLE                         1
9133
9134
/* GISB_ARBITER :: BP_WRITE_0 :: fve [03:03] */
9135
#define GISB_ARBITER_BP_WRITE_0_fve_MASK                           0x00000008
9136
#define GISB_ARBITER_BP_WRITE_0_fve_ALIGN                          0
9137
#define GISB_ARBITER_BP_WRITE_0_fve_BITS                           1
9138
#define GISB_ARBITER_BP_WRITE_0_fve_SHIFT                          3
9139
#define GISB_ARBITER_BP_WRITE_0_fve_DISABLE                        0
9140
#define GISB_ARBITER_BP_WRITE_0_fve_ENABLE                         1
9141
9142
/* GISB_ARBITER :: BP_WRITE_0 :: tgt [02:02] */
9143
#define GISB_ARBITER_BP_WRITE_0_tgt_MASK                           0x00000004
9144
#define GISB_ARBITER_BP_WRITE_0_tgt_ALIGN                          0
9145
#define GISB_ARBITER_BP_WRITE_0_tgt_BITS                           1
9146
#define GISB_ARBITER_BP_WRITE_0_tgt_SHIFT                          2
9147
#define GISB_ARBITER_BP_WRITE_0_tgt_DISABLE                        0
9148
#define GISB_ARBITER_BP_WRITE_0_tgt_ENABLE                         1
9149
9150
/* GISB_ARBITER :: BP_WRITE_0 :: dbu [01:01] */
9151
#define GISB_ARBITER_BP_WRITE_0_dbu_MASK                           0x00000002
9152
#define GISB_ARBITER_BP_WRITE_0_dbu_ALIGN                          0
9153
#define GISB_ARBITER_BP_WRITE_0_dbu_BITS                           1
9154
#define GISB_ARBITER_BP_WRITE_0_dbu_SHIFT                          1
9155
#define GISB_ARBITER_BP_WRITE_0_dbu_DISABLE                        0
9156
#define GISB_ARBITER_BP_WRITE_0_dbu_ENABLE                         1
9157
9158
/* GISB_ARBITER :: BP_WRITE_0 :: cce [00:00] */
9159
#define GISB_ARBITER_BP_WRITE_0_cce_MASK                           0x00000001
9160
#define GISB_ARBITER_BP_WRITE_0_cce_ALIGN                          0
9161
#define GISB_ARBITER_BP_WRITE_0_cce_BITS                           1
9162
#define GISB_ARBITER_BP_WRITE_0_cce_SHIFT                          0
9163
#define GISB_ARBITER_BP_WRITE_0_cce_DISABLE                        0
9164
#define GISB_ARBITER_BP_WRITE_0_cce_ENABLE                         1
9165
9166
9167
/****************************************************************************
9168
 * GISB_ARBITER :: BP_ENABLE_0
9169
 ***************************************************************************/
9170
/* GISB_ARBITER :: BP_ENABLE_0 :: reserved0 [31:03] */
9171
#define GISB_ARBITER_BP_ENABLE_0_reserved0_MASK                    0xfffffff8
9172
#define GISB_ARBITER_BP_ENABLE_0_reserved0_ALIGN                   0
9173
#define GISB_ARBITER_BP_ENABLE_0_reserved0_BITS                    29
9174
#define GISB_ARBITER_BP_ENABLE_0_reserved0_SHIFT                   3
9175
9176
/* GISB_ARBITER :: BP_ENABLE_0 :: block [02:02] */
9177
#define GISB_ARBITER_BP_ENABLE_0_block_MASK                        0x00000004
9178
#define GISB_ARBITER_BP_ENABLE_0_block_ALIGN                       0
9179
#define GISB_ARBITER_BP_ENABLE_0_block_BITS                        1
9180
#define GISB_ARBITER_BP_ENABLE_0_block_SHIFT                       2
9181
#define GISB_ARBITER_BP_ENABLE_0_block_DISABLE                     0
9182
#define GISB_ARBITER_BP_ENABLE_0_block_ENABLE                      1
9183
9184
/* GISB_ARBITER :: BP_ENABLE_0 :: address [01:01] */
9185
#define GISB_ARBITER_BP_ENABLE_0_address_MASK                      0x00000002
9186
#define GISB_ARBITER_BP_ENABLE_0_address_ALIGN                     0
9187
#define GISB_ARBITER_BP_ENABLE_0_address_BITS                      1
9188
#define GISB_ARBITER_BP_ENABLE_0_address_SHIFT                     1
9189
#define GISB_ARBITER_BP_ENABLE_0_address_DISABLE                   0
9190
#define GISB_ARBITER_BP_ENABLE_0_address_ENABLE                    1
9191
9192
/* GISB_ARBITER :: BP_ENABLE_0 :: access [00:00] */
9193
#define GISB_ARBITER_BP_ENABLE_0_access_MASK                       0x00000001
9194
#define GISB_ARBITER_BP_ENABLE_0_access_ALIGN                      0
9195
#define GISB_ARBITER_BP_ENABLE_0_access_BITS                       1
9196
#define GISB_ARBITER_BP_ENABLE_0_access_SHIFT                      0
9197
#define GISB_ARBITER_BP_ENABLE_0_access_DISABLE                    0
9198
#define GISB_ARBITER_BP_ENABLE_0_access_ENABLE                     1
9199
9200
9201
/****************************************************************************
9202
 * GISB_ARBITER :: BP_START_ADDR_1
9203
 ***************************************************************************/
9204
/* GISB_ARBITER :: BP_START_ADDR_1 :: start [31:00] */
9205
#define GISB_ARBITER_BP_START_ADDR_1_start_MASK                    0xffffffff
9206
#define GISB_ARBITER_BP_START_ADDR_1_start_ALIGN                   0
9207
#define GISB_ARBITER_BP_START_ADDR_1_start_BITS                    32
9208
#define GISB_ARBITER_BP_START_ADDR_1_start_SHIFT                   0
9209
9210
9211
/****************************************************************************
9212
 * GISB_ARBITER :: BP_END_ADDR_1
9213
 ***************************************************************************/
9214
/* GISB_ARBITER :: BP_END_ADDR_1 :: end [31:00] */
9215
#define GISB_ARBITER_BP_END_ADDR_1_end_MASK                        0xffffffff
9216
#define GISB_ARBITER_BP_END_ADDR_1_end_ALIGN                       0
9217
#define GISB_ARBITER_BP_END_ADDR_1_end_BITS                        32
9218
#define GISB_ARBITER_BP_END_ADDR_1_end_SHIFT                       0
9219
9220
9221
/****************************************************************************
9222
 * GISB_ARBITER :: BP_READ_1
9223
 ***************************************************************************/
9224
/* GISB_ARBITER :: BP_READ_1 :: reserved0 [31:06] */
9225
#define GISB_ARBITER_BP_READ_1_reserved0_MASK                      0xffffffc0
9226
#define GISB_ARBITER_BP_READ_1_reserved0_ALIGN                     0
9227
#define GISB_ARBITER_BP_READ_1_reserved0_BITS                      26
9228
#define GISB_ARBITER_BP_READ_1_reserved0_SHIFT                     6
9229
9230
/* GISB_ARBITER :: BP_READ_1 :: bsp [05:05] */
9231
#define GISB_ARBITER_BP_READ_1_bsp_MASK                            0x00000020
9232
#define GISB_ARBITER_BP_READ_1_bsp_ALIGN                           0
9233
#define GISB_ARBITER_BP_READ_1_bsp_BITS                            1
9234
#define GISB_ARBITER_BP_READ_1_bsp_SHIFT                           5
9235
#define GISB_ARBITER_BP_READ_1_bsp_DISABLE                         0
9236
#define GISB_ARBITER_BP_READ_1_bsp_ENABLE                          1
9237
9238
/* GISB_ARBITER :: BP_READ_1 :: aes [04:04] */
9239
#define GISB_ARBITER_BP_READ_1_aes_MASK                            0x00000010
9240
#define GISB_ARBITER_BP_READ_1_aes_ALIGN                           0
9241
#define GISB_ARBITER_BP_READ_1_aes_BITS                            1
9242
#define GISB_ARBITER_BP_READ_1_aes_SHIFT                           4
9243
#define GISB_ARBITER_BP_READ_1_aes_DISABLE                         0
9244
#define GISB_ARBITER_BP_READ_1_aes_ENABLE                          1
9245
9246
/* GISB_ARBITER :: BP_READ_1 :: fve [03:03] */
9247
#define GISB_ARBITER_BP_READ_1_fve_MASK                            0x00000008
9248
#define GISB_ARBITER_BP_READ_1_fve_ALIGN                           0
9249
#define GISB_ARBITER_BP_READ_1_fve_BITS                            1
9250
#define GISB_ARBITER_BP_READ_1_fve_SHIFT                           3
9251
#define GISB_ARBITER_BP_READ_1_fve_DISABLE                         0
9252
#define GISB_ARBITER_BP_READ_1_fve_ENABLE                          1
9253
9254
/* GISB_ARBITER :: BP_READ_1 :: tgt [02:02] */
9255
#define GISB_ARBITER_BP_READ_1_tgt_MASK                            0x00000004
9256
#define GISB_ARBITER_BP_READ_1_tgt_ALIGN                           0
9257
#define GISB_ARBITER_BP_READ_1_tgt_BITS                            1
9258
#define GISB_ARBITER_BP_READ_1_tgt_SHIFT                           2
9259
#define GISB_ARBITER_BP_READ_1_tgt_DISABLE                         0
9260
#define GISB_ARBITER_BP_READ_1_tgt_ENABLE                          1
9261
9262
/* GISB_ARBITER :: BP_READ_1 :: dbu [01:01] */
9263
#define GISB_ARBITER_BP_READ_1_dbu_MASK                            0x00000002
9264
#define GISB_ARBITER_BP_READ_1_dbu_ALIGN                           0
9265
#define GISB_ARBITER_BP_READ_1_dbu_BITS                            1
9266
#define GISB_ARBITER_BP_READ_1_dbu_SHIFT                           1
9267
#define GISB_ARBITER_BP_READ_1_dbu_DISABLE                         0
9268
#define GISB_ARBITER_BP_READ_1_dbu_ENABLE                          1
9269
9270
/* GISB_ARBITER :: BP_READ_1 :: cce [00:00] */
9271
#define GISB_ARBITER_BP_READ_1_cce_MASK                            0x00000001
9272
#define GISB_ARBITER_BP_READ_1_cce_ALIGN                           0
9273
#define GISB_ARBITER_BP_READ_1_cce_BITS                            1
9274
#define GISB_ARBITER_BP_READ_1_cce_SHIFT                           0
9275
#define GISB_ARBITER_BP_READ_1_cce_DISABLE                         0
9276
#define GISB_ARBITER_BP_READ_1_cce_ENABLE                          1
9277
9278
9279
/****************************************************************************
9280
 * GISB_ARBITER :: BP_WRITE_1
9281
 ***************************************************************************/
9282
/* GISB_ARBITER :: BP_WRITE_1 :: reserved0 [31:06] */
9283
#define GISB_ARBITER_BP_WRITE_1_reserved0_MASK                     0xffffffc0
9284
#define GISB_ARBITER_BP_WRITE_1_reserved0_ALIGN                    0
9285
#define GISB_ARBITER_BP_WRITE_1_reserved0_BITS                     26
9286
#define GISB_ARBITER_BP_WRITE_1_reserved0_SHIFT                    6
9287
9288
/* GISB_ARBITER :: BP_WRITE_1 :: bsp [05:05] */
9289
#define GISB_ARBITER_BP_WRITE_1_bsp_MASK                           0x00000020
9290
#define GISB_ARBITER_BP_WRITE_1_bsp_ALIGN                          0
9291
#define GISB_ARBITER_BP_WRITE_1_bsp_BITS                           1
9292
#define GISB_ARBITER_BP_WRITE_1_bsp_SHIFT                          5
9293
#define GISB_ARBITER_BP_WRITE_1_bsp_DISABLE                        0
9294
#define GISB_ARBITER_BP_WRITE_1_bsp_ENABLE                         1
9295
9296
/* GISB_ARBITER :: BP_WRITE_1 :: aes [04:04] */
9297
#define GISB_ARBITER_BP_WRITE_1_aes_MASK                           0x00000010
9298
#define GISB_ARBITER_BP_WRITE_1_aes_ALIGN                          0
9299
#define GISB_ARBITER_BP_WRITE_1_aes_BITS                           1
9300
#define GISB_ARBITER_BP_WRITE_1_aes_SHIFT                          4
9301
#define GISB_ARBITER_BP_WRITE_1_aes_DISABLE                        0
9302
#define GISB_ARBITER_BP_WRITE_1_aes_ENABLE                         1
9303
9304
/* GISB_ARBITER :: BP_WRITE_1 :: fve [03:03] */
9305
#define GISB_ARBITER_BP_WRITE_1_fve_MASK                           0x00000008
9306
#define GISB_ARBITER_BP_WRITE_1_fve_ALIGN                          0
9307
#define GISB_ARBITER_BP_WRITE_1_fve_BITS                           1
9308
#define GISB_ARBITER_BP_WRITE_1_fve_SHIFT                          3
9309
#define GISB_ARBITER_BP_WRITE_1_fve_DISABLE                        0
9310
#define GISB_ARBITER_BP_WRITE_1_fve_ENABLE                         1
9311
9312
/* GISB_ARBITER :: BP_WRITE_1 :: tgt [02:02] */
9313
#define GISB_ARBITER_BP_WRITE_1_tgt_MASK                           0x00000004
9314
#define GISB_ARBITER_BP_WRITE_1_tgt_ALIGN                          0
9315
#define GISB_ARBITER_BP_WRITE_1_tgt_BITS                           1
9316
#define GISB_ARBITER_BP_WRITE_1_tgt_SHIFT                          2
9317
#define GISB_ARBITER_BP_WRITE_1_tgt_DISABLE                        0
9318
#define GISB_ARBITER_BP_WRITE_1_tgt_ENABLE                         1
9319
9320
/* GISB_ARBITER :: BP_WRITE_1 :: dbu [01:01] */
9321
#define GISB_ARBITER_BP_WRITE_1_dbu_MASK                           0x00000002
9322
#define GISB_ARBITER_BP_WRITE_1_dbu_ALIGN                          0
9323
#define GISB_ARBITER_BP_WRITE_1_dbu_BITS                           1
9324
#define GISB_ARBITER_BP_WRITE_1_dbu_SHIFT                          1
9325
#define GISB_ARBITER_BP_WRITE_1_dbu_DISABLE                        0
9326
#define GISB_ARBITER_BP_WRITE_1_dbu_ENABLE                         1
9327
9328
/* GISB_ARBITER :: BP_WRITE_1 :: cce [00:00] */
9329
#define GISB_ARBITER_BP_WRITE_1_cce_MASK                           0x00000001
9330
#define GISB_ARBITER_BP_WRITE_1_cce_ALIGN                          0
9331
#define GISB_ARBITER_BP_WRITE_1_cce_BITS                           1
9332
#define GISB_ARBITER_BP_WRITE_1_cce_SHIFT                          0
9333
#define GISB_ARBITER_BP_WRITE_1_cce_DISABLE                        0
9334
#define GISB_ARBITER_BP_WRITE_1_cce_ENABLE                         1
9335
9336
9337
/****************************************************************************
9338
 * GISB_ARBITER :: BP_ENABLE_1
9339
 ***************************************************************************/
9340
/* GISB_ARBITER :: BP_ENABLE_1 :: reserved0 [31:03] */
9341
#define GISB_ARBITER_BP_ENABLE_1_reserved0_MASK                    0xfffffff8
9342
#define GISB_ARBITER_BP_ENABLE_1_reserved0_ALIGN                   0
9343
#define GISB_ARBITER_BP_ENABLE_1_reserved0_BITS                    29
9344
#define GISB_ARBITER_BP_ENABLE_1_reserved0_SHIFT                   3
9345
9346
/* GISB_ARBITER :: BP_ENABLE_1 :: block [02:02] */
9347
#define GISB_ARBITER_BP_ENABLE_1_block_MASK                        0x00000004
9348
#define GISB_ARBITER_BP_ENABLE_1_block_ALIGN                       0
9349
#define GISB_ARBITER_BP_ENABLE_1_block_BITS                        1
9350
#define GISB_ARBITER_BP_ENABLE_1_block_SHIFT                       2
9351
#define GISB_ARBITER_BP_ENABLE_1_block_DISABLE                     0
9352
#define GISB_ARBITER_BP_ENABLE_1_block_ENABLE                      1
9353
9354
/* GISB_ARBITER :: BP_ENABLE_1 :: address [01:01] */
9355
#define GISB_ARBITER_BP_ENABLE_1_address_MASK                      0x00000002
9356
#define GISB_ARBITER_BP_ENABLE_1_address_ALIGN                     0
9357
#define GISB_ARBITER_BP_ENABLE_1_address_BITS                      1
9358
#define GISB_ARBITER_BP_ENABLE_1_address_SHIFT                     1
9359
#define GISB_ARBITER_BP_ENABLE_1_address_DISABLE                   0
9360
#define GISB_ARBITER_BP_ENABLE_1_address_ENABLE                    1
9361
9362
/* GISB_ARBITER :: BP_ENABLE_1 :: access [00:00] */
9363
#define GISB_ARBITER_BP_ENABLE_1_access_MASK                       0x00000001
9364
#define GISB_ARBITER_BP_ENABLE_1_access_ALIGN                      0
9365
#define GISB_ARBITER_BP_ENABLE_1_access_BITS                       1
9366
#define GISB_ARBITER_BP_ENABLE_1_access_SHIFT                      0
9367
#define GISB_ARBITER_BP_ENABLE_1_access_DISABLE                    0
9368
#define GISB_ARBITER_BP_ENABLE_1_access_ENABLE                     1
9369
9370
9371
/****************************************************************************
9372
 * GISB_ARBITER :: BP_START_ADDR_2
9373
 ***************************************************************************/
9374
/* GISB_ARBITER :: BP_START_ADDR_2 :: start [31:00] */
9375
#define GISB_ARBITER_BP_START_ADDR_2_start_MASK                    0xffffffff
9376
#define GISB_ARBITER_BP_START_ADDR_2_start_ALIGN                   0
9377
#define GISB_ARBITER_BP_START_ADDR_2_start_BITS                    32
9378
#define GISB_ARBITER_BP_START_ADDR_2_start_SHIFT                   0
9379
9380
9381
/****************************************************************************
9382
 * GISB_ARBITER :: BP_END_ADDR_2
9383
 ***************************************************************************/
9384
/* GISB_ARBITER :: BP_END_ADDR_2 :: end [31:00] */
9385
#define GISB_ARBITER_BP_END_ADDR_2_end_MASK                        0xffffffff
9386
#define GISB_ARBITER_BP_END_ADDR_2_end_ALIGN                       0
9387
#define GISB_ARBITER_BP_END_ADDR_2_end_BITS                        32
9388
#define GISB_ARBITER_BP_END_ADDR_2_end_SHIFT                       0
9389
9390
9391
/****************************************************************************
9392
 * GISB_ARBITER :: BP_READ_2
9393
 ***************************************************************************/
9394
/* GISB_ARBITER :: BP_READ_2 :: reserved0 [31:06] */
9395
#define GISB_ARBITER_BP_READ_2_reserved0_MASK                      0xffffffc0
9396
#define GISB_ARBITER_BP_READ_2_reserved0_ALIGN                     0
9397
#define GISB_ARBITER_BP_READ_2_reserved0_BITS                      26
9398
#define GISB_ARBITER_BP_READ_2_reserved0_SHIFT                     6
9399
9400
/* GISB_ARBITER :: BP_READ_2 :: bsp [05:05] */
9401
#define GISB_ARBITER_BP_READ_2_bsp_MASK                            0x00000020
9402
#define GISB_ARBITER_BP_READ_2_bsp_ALIGN                           0
9403
#define GISB_ARBITER_BP_READ_2_bsp_BITS                            1
9404
#define GISB_ARBITER_BP_READ_2_bsp_SHIFT                           5
9405
#define GISB_ARBITER_BP_READ_2_bsp_DISABLE                         0
9406
#define GISB_ARBITER_BP_READ_2_bsp_ENABLE                          1
9407
9408
/* GISB_ARBITER :: BP_READ_2 :: aes [04:04] */
9409
#define GISB_ARBITER_BP_READ_2_aes_MASK                            0x00000010
9410
#define GISB_ARBITER_BP_READ_2_aes_ALIGN                           0
9411
#define GISB_ARBITER_BP_READ_2_aes_BITS                            1
9412
#define GISB_ARBITER_BP_READ_2_aes_SHIFT                           4
9413
#define GISB_ARBITER_BP_READ_2_aes_DISABLE                         0
9414
#define GISB_ARBITER_BP_READ_2_aes_ENABLE                          1
9415
9416
/* GISB_ARBITER :: BP_READ_2 :: fve [03:03] */
9417
#define GISB_ARBITER_BP_READ_2_fve_MASK                            0x00000008
9418
#define GISB_ARBITER_BP_READ_2_fve_ALIGN                           0
9419
#define GISB_ARBITER_BP_READ_2_fve_BITS                            1
9420
#define GISB_ARBITER_BP_READ_2_fve_SHIFT                           3
9421
#define GISB_ARBITER_BP_READ_2_fve_DISABLE                         0
9422
#define GISB_ARBITER_BP_READ_2_fve_ENABLE                          1
9423
9424
/* GISB_ARBITER :: BP_READ_2 :: tgt [02:02] */
9425
#define GISB_ARBITER_BP_READ_2_tgt_MASK                            0x00000004
9426
#define GISB_ARBITER_BP_READ_2_tgt_ALIGN                           0
9427
#define GISB_ARBITER_BP_READ_2_tgt_BITS                            1
9428
#define GISB_ARBITER_BP_READ_2_tgt_SHIFT                           2
9429
#define GISB_ARBITER_BP_READ_2_tgt_DISABLE                         0
9430
#define GISB_ARBITER_BP_READ_2_tgt_ENABLE                          1
9431
9432
/* GISB_ARBITER :: BP_READ_2 :: dbu [01:01] */
9433
#define GISB_ARBITER_BP_READ_2_dbu_MASK                            0x00000002
9434
#define GISB_ARBITER_BP_READ_2_dbu_ALIGN                           0
9435
#define GISB_ARBITER_BP_READ_2_dbu_BITS                            1
9436
#define GISB_ARBITER_BP_READ_2_dbu_SHIFT                           1
9437
#define GISB_ARBITER_BP_READ_2_dbu_DISABLE                         0
9438
#define GISB_ARBITER_BP_READ_2_dbu_ENABLE                          1
9439
9440
/* GISB_ARBITER :: BP_READ_2 :: cce [00:00] */
9441
#define GISB_ARBITER_BP_READ_2_cce_MASK                            0x00000001
9442
#define GISB_ARBITER_BP_READ_2_cce_ALIGN                           0
9443
#define GISB_ARBITER_BP_READ_2_cce_BITS                            1
9444
#define GISB_ARBITER_BP_READ_2_cce_SHIFT                           0
9445
#define GISB_ARBITER_BP_READ_2_cce_DISABLE                         0
9446
#define GISB_ARBITER_BP_READ_2_cce_ENABLE                          1
9447
9448
9449
/****************************************************************************
9450
 * GISB_ARBITER :: BP_WRITE_2
9451
 ***************************************************************************/
9452
/* GISB_ARBITER :: BP_WRITE_2 :: reserved0 [31:06] */
9453
#define GISB_ARBITER_BP_WRITE_2_reserved0_MASK                     0xffffffc0
9454
#define GISB_ARBITER_BP_WRITE_2_reserved0_ALIGN                    0
9455
#define GISB_ARBITER_BP_WRITE_2_reserved0_BITS                     26
9456
#define GISB_ARBITER_BP_WRITE_2_reserved0_SHIFT                    6
9457
9458
/* GISB_ARBITER :: BP_WRITE_2 :: bsp [05:05] */
9459
#define GISB_ARBITER_BP_WRITE_2_bsp_MASK                           0x00000020
9460
#define GISB_ARBITER_BP_WRITE_2_bsp_ALIGN                          0
9461
#define GISB_ARBITER_BP_WRITE_2_bsp_BITS                           1
9462
#define GISB_ARBITER_BP_WRITE_2_bsp_SHIFT                          5
9463
#define GISB_ARBITER_BP_WRITE_2_bsp_DISABLE                        0
9464
#define GISB_ARBITER_BP_WRITE_2_bsp_ENABLE                         1
9465
9466
/* GISB_ARBITER :: BP_WRITE_2 :: aes [04:04] */
9467
#define GISB_ARBITER_BP_WRITE_2_aes_MASK                           0x00000010
9468
#define GISB_ARBITER_BP_WRITE_2_aes_ALIGN                          0
9469
#define GISB_ARBITER_BP_WRITE_2_aes_BITS                           1
9470
#define GISB_ARBITER_BP_WRITE_2_aes_SHIFT                          4
9471
#define GISB_ARBITER_BP_WRITE_2_aes_DISABLE                        0
9472
#define GISB_ARBITER_BP_WRITE_2_aes_ENABLE                         1
9473
9474
/* GISB_ARBITER :: BP_WRITE_2 :: fve [03:03] */
9475
#define GISB_ARBITER_BP_WRITE_2_fve_MASK                           0x00000008
9476
#define GISB_ARBITER_BP_WRITE_2_fve_ALIGN                          0
9477
#define GISB_ARBITER_BP_WRITE_2_fve_BITS                           1
9478
#define GISB_ARBITER_BP_WRITE_2_fve_SHIFT                          3
9479
#define GISB_ARBITER_BP_WRITE_2_fve_DISABLE                        0
9480
#define GISB_ARBITER_BP_WRITE_2_fve_ENABLE                         1
9481
9482
/* GISB_ARBITER :: BP_WRITE_2 :: tgt [02:02] */
9483
#define GISB_ARBITER_BP_WRITE_2_tgt_MASK                           0x00000004
9484
#define GISB_ARBITER_BP_WRITE_2_tgt_ALIGN                          0
9485
#define GISB_ARBITER_BP_WRITE_2_tgt_BITS                           1
9486
#define GISB_ARBITER_BP_WRITE_2_tgt_SHIFT                          2
9487
#define GISB_ARBITER_BP_WRITE_2_tgt_DISABLE                        0
9488
#define GISB_ARBITER_BP_WRITE_2_tgt_ENABLE                         1
9489
9490
/* GISB_ARBITER :: BP_WRITE_2 :: dbu [01:01] */
9491
#define GISB_ARBITER_BP_WRITE_2_dbu_MASK                           0x00000002
9492
#define GISB_ARBITER_BP_WRITE_2_dbu_ALIGN                          0
9493
#define GISB_ARBITER_BP_WRITE_2_dbu_BITS                           1
9494
#define GISB_ARBITER_BP_WRITE_2_dbu_SHIFT                          1
9495
#define GISB_ARBITER_BP_WRITE_2_dbu_DISABLE                        0
9496
#define GISB_ARBITER_BP_WRITE_2_dbu_ENABLE                         1
9497
9498
/* GISB_ARBITER :: BP_WRITE_2 :: cce [00:00] */
9499
#define GISB_ARBITER_BP_WRITE_2_cce_MASK                           0x00000001
9500
#define GISB_ARBITER_BP_WRITE_2_cce_ALIGN                          0
9501
#define GISB_ARBITER_BP_WRITE_2_cce_BITS                           1
9502
#define GISB_ARBITER_BP_WRITE_2_cce_SHIFT                          0
9503
#define GISB_ARBITER_BP_WRITE_2_cce_DISABLE                        0
9504
#define GISB_ARBITER_BP_WRITE_2_cce_ENABLE                         1
9505
9506
9507
/****************************************************************************
9508
 * GISB_ARBITER :: BP_ENABLE_2
9509
 ***************************************************************************/
9510
/* GISB_ARBITER :: BP_ENABLE_2 :: reserved0 [31:03] */
9511
#define GISB_ARBITER_BP_ENABLE_2_reserved0_MASK                    0xfffffff8
9512
#define GISB_ARBITER_BP_ENABLE_2_reserved0_ALIGN                   0
9513
#define GISB_ARBITER_BP_ENABLE_2_reserved0_BITS                    29
9514
#define GISB_ARBITER_BP_ENABLE_2_reserved0_SHIFT                   3
9515
9516
/* GISB_ARBITER :: BP_ENABLE_2 :: block [02:02] */
9517
#define GISB_ARBITER_BP_ENABLE_2_block_MASK                        0x00000004
9518
#define GISB_ARBITER_BP_ENABLE_2_block_ALIGN                       0
9519
#define GISB_ARBITER_BP_ENABLE_2_block_BITS                        1
9520
#define GISB_ARBITER_BP_ENABLE_2_block_SHIFT                       2
9521
#define GISB_ARBITER_BP_ENABLE_2_block_DISABLE                     0
9522
#define GISB_ARBITER_BP_ENABLE_2_block_ENABLE                      1
9523
9524
/* GISB_ARBITER :: BP_ENABLE_2 :: address [01:01] */
9525
#define GISB_ARBITER_BP_ENABLE_2_address_MASK                      0x00000002
9526
#define GISB_ARBITER_BP_ENABLE_2_address_ALIGN                     0
9527
#define GISB_ARBITER_BP_ENABLE_2_address_BITS                      1
9528
#define GISB_ARBITER_BP_ENABLE_2_address_SHIFT                     1
9529
#define GISB_ARBITER_BP_ENABLE_2_address_DISABLE                   0
9530
#define GISB_ARBITER_BP_ENABLE_2_address_ENABLE                    1
9531
9532
/* GISB_ARBITER :: BP_ENABLE_2 :: access [00:00] */
9533
#define GISB_ARBITER_BP_ENABLE_2_access_MASK                       0x00000001
9534
#define GISB_ARBITER_BP_ENABLE_2_access_ALIGN                      0
9535
#define GISB_ARBITER_BP_ENABLE_2_access_BITS                       1
9536
#define GISB_ARBITER_BP_ENABLE_2_access_SHIFT                      0
9537
#define GISB_ARBITER_BP_ENABLE_2_access_DISABLE                    0
9538
#define GISB_ARBITER_BP_ENABLE_2_access_ENABLE                     1
9539
9540
9541
/****************************************************************************
9542
 * GISB_ARBITER :: BP_START_ADDR_3
9543
 ***************************************************************************/
9544
/* GISB_ARBITER :: BP_START_ADDR_3 :: start [31:00] */
9545
#define GISB_ARBITER_BP_START_ADDR_3_start_MASK                    0xffffffff
9546
#define GISB_ARBITER_BP_START_ADDR_3_start_ALIGN                   0
9547
#define GISB_ARBITER_BP_START_ADDR_3_start_BITS                    32
9548
#define GISB_ARBITER_BP_START_ADDR_3_start_SHIFT                   0
9549
9550
9551
/****************************************************************************
9552
 * GISB_ARBITER :: BP_END_ADDR_3
9553
 ***************************************************************************/
9554
/* GISB_ARBITER :: BP_END_ADDR_3 :: end [31:00] */
9555
#define GISB_ARBITER_BP_END_ADDR_3_end_MASK                        0xffffffff
9556
#define GISB_ARBITER_BP_END_ADDR_3_end_ALIGN                       0
9557
#define GISB_ARBITER_BP_END_ADDR_3_end_BITS                        32
9558
#define GISB_ARBITER_BP_END_ADDR_3_end_SHIFT                       0
9559
9560
9561
/****************************************************************************
9562
 * GISB_ARBITER :: BP_READ_3
9563
 ***************************************************************************/
9564
/* GISB_ARBITER :: BP_READ_3 :: reserved0 [31:06] */
9565
#define GISB_ARBITER_BP_READ_3_reserved0_MASK                      0xffffffc0
9566
#define GISB_ARBITER_BP_READ_3_reserved0_ALIGN                     0
9567
#define GISB_ARBITER_BP_READ_3_reserved0_BITS                      26
9568
#define GISB_ARBITER_BP_READ_3_reserved0_SHIFT                     6
9569
9570
/* GISB_ARBITER :: BP_READ_3 :: bsp [05:05] */
9571
#define GISB_ARBITER_BP_READ_3_bsp_MASK                            0x00000020
9572
#define GISB_ARBITER_BP_READ_3_bsp_ALIGN                           0
9573
#define GISB_ARBITER_BP_READ_3_bsp_BITS                            1
9574
#define GISB_ARBITER_BP_READ_3_bsp_SHIFT                           5
9575
#define GISB_ARBITER_BP_READ_3_bsp_DISABLE                         0
9576
#define GISB_ARBITER_BP_READ_3_bsp_ENABLE                          1
9577
9578
/* GISB_ARBITER :: BP_READ_3 :: aes [04:04] */
9579
#define GISB_ARBITER_BP_READ_3_aes_MASK                            0x00000010
9580
#define GISB_ARBITER_BP_READ_3_aes_ALIGN                           0
9581
#define GISB_ARBITER_BP_READ_3_aes_BITS                            1
9582
#define GISB_ARBITER_BP_READ_3_aes_SHIFT                           4
9583
#define GISB_ARBITER_BP_READ_3_aes_DISABLE                         0
9584
#define GISB_ARBITER_BP_READ_3_aes_ENABLE                          1
9585
9586
/* GISB_ARBITER :: BP_READ_3 :: fve [03:03] */
9587
#define GISB_ARBITER_BP_READ_3_fve_MASK                            0x00000008
9588
#define GISB_ARBITER_BP_READ_3_fve_ALIGN                           0
9589
#define GISB_ARBITER_BP_READ_3_fve_BITS                            1
9590
#define GISB_ARBITER_BP_READ_3_fve_SHIFT                           3
9591
#define GISB_ARBITER_BP_READ_3_fve_DISABLE                         0
9592
#define GISB_ARBITER_BP_READ_3_fve_ENABLE                          1
9593
9594
/* GISB_ARBITER :: BP_READ_3 :: tgt [02:02] */
9595
#define GISB_ARBITER_BP_READ_3_tgt_MASK                            0x00000004
9596
#define GISB_ARBITER_BP_READ_3_tgt_ALIGN                           0
9597
#define GISB_ARBITER_BP_READ_3_tgt_BITS                            1
9598
#define GISB_ARBITER_BP_READ_3_tgt_SHIFT                           2
9599
#define GISB_ARBITER_BP_READ_3_tgt_DISABLE                         0
9600
#define GISB_ARBITER_BP_READ_3_tgt_ENABLE                          1
9601
9602
/* GISB_ARBITER :: BP_READ_3 :: dbu [01:01] */
9603
#define GISB_ARBITER_BP_READ_3_dbu_MASK                            0x00000002
9604
#define GISB_ARBITER_BP_READ_3_dbu_ALIGN                           0
9605
#define GISB_ARBITER_BP_READ_3_dbu_BITS                            1
9606
#define GISB_ARBITER_BP_READ_3_dbu_SHIFT                           1
9607
#define GISB_ARBITER_BP_READ_3_dbu_DISABLE                         0
9608
#define GISB_ARBITER_BP_READ_3_dbu_ENABLE                          1
9609
9610
/* GISB_ARBITER :: BP_READ_3 :: cce [00:00] */
9611
#define GISB_ARBITER_BP_READ_3_cce_MASK                            0x00000001
9612
#define GISB_ARBITER_BP_READ_3_cce_ALIGN                           0
9613
#define GISB_ARBITER_BP_READ_3_cce_BITS                            1
9614
#define GISB_ARBITER_BP_READ_3_cce_SHIFT                           0
9615
#define GISB_ARBITER_BP_READ_3_cce_DISABLE                         0
9616
#define GISB_ARBITER_BP_READ_3_cce_ENABLE                          1
9617
9618
9619
/****************************************************************************
9620
 * GISB_ARBITER :: BP_WRITE_3
9621
 ***************************************************************************/
9622
/* GISB_ARBITER :: BP_WRITE_3 :: reserved0 [31:06] */
9623
#define GISB_ARBITER_BP_WRITE_3_reserved0_MASK                     0xffffffc0
9624
#define GISB_ARBITER_BP_WRITE_3_reserved0_ALIGN                    0
9625
#define GISB_ARBITER_BP_WRITE_3_reserved0_BITS                     26
9626
#define GISB_ARBITER_BP_WRITE_3_reserved0_SHIFT                    6
9627
9628
/* GISB_ARBITER :: BP_WRITE_3 :: bsp [05:05] */
9629
#define GISB_ARBITER_BP_WRITE_3_bsp_MASK                           0x00000020
9630
#define GISB_ARBITER_BP_WRITE_3_bsp_ALIGN                          0
9631
#define GISB_ARBITER_BP_WRITE_3_bsp_BITS                           1
9632
#define GISB_ARBITER_BP_WRITE_3_bsp_SHIFT                          5
9633
#define GISB_ARBITER_BP_WRITE_3_bsp_DISABLE                        0
9634
#define GISB_ARBITER_BP_WRITE_3_bsp_ENABLE                         1
9635
9636
/* GISB_ARBITER :: BP_WRITE_3 :: aes [04:04] */
9637
#define GISB_ARBITER_BP_WRITE_3_aes_MASK                           0x00000010
9638
#define GISB_ARBITER_BP_WRITE_3_aes_ALIGN                          0
9639
#define GISB_ARBITER_BP_WRITE_3_aes_BITS                           1
9640
#define GISB_ARBITER_BP_WRITE_3_aes_SHIFT                          4
9641
#define GISB_ARBITER_BP_WRITE_3_aes_DISABLE                        0
9642
#define GISB_ARBITER_BP_WRITE_3_aes_ENABLE                         1
9643
9644
/* GISB_ARBITER :: BP_WRITE_3 :: fve [03:03] */
9645
#define GISB_ARBITER_BP_WRITE_3_fve_MASK                           0x00000008
9646
#define GISB_ARBITER_BP_WRITE_3_fve_ALIGN                          0
9647
#define GISB_ARBITER_BP_WRITE_3_fve_BITS                           1
9648
#define GISB_ARBITER_BP_WRITE_3_fve_SHIFT                          3
9649
#define GISB_ARBITER_BP_WRITE_3_fve_DISABLE                        0
9650
#define GISB_ARBITER_BP_WRITE_3_fve_ENABLE                         1
9651
9652
/* GISB_ARBITER :: BP_WRITE_3 :: tgt [02:02] */
9653
#define GISB_ARBITER_BP_WRITE_3_tgt_MASK                           0x00000004
9654
#define GISB_ARBITER_BP_WRITE_3_tgt_ALIGN                          0
9655
#define GISB_ARBITER_BP_WRITE_3_tgt_BITS                           1
9656
#define GISB_ARBITER_BP_WRITE_3_tgt_SHIFT                          2
9657
#define GISB_ARBITER_BP_WRITE_3_tgt_DISABLE                        0
9658
#define GISB_ARBITER_BP_WRITE_3_tgt_ENABLE                         1
9659
9660
/* GISB_ARBITER :: BP_WRITE_3 :: dbu [01:01] */
9661
#define GISB_ARBITER_BP_WRITE_3_dbu_MASK                           0x00000002
9662
#define GISB_ARBITER_BP_WRITE_3_dbu_ALIGN                          0
9663
#define GISB_ARBITER_BP_WRITE_3_dbu_BITS                           1
9664
#define GISB_ARBITER_BP_WRITE_3_dbu_SHIFT                          1
9665
#define GISB_ARBITER_BP_WRITE_3_dbu_DISABLE                        0
9666
#define GISB_ARBITER_BP_WRITE_3_dbu_ENABLE                         1
9667
9668
/* GISB_ARBITER :: BP_WRITE_3 :: cce [00:00] */
9669
#define GISB_ARBITER_BP_WRITE_3_cce_MASK                           0x00000001
9670
#define GISB_ARBITER_BP_WRITE_3_cce_ALIGN                          0
9671
#define GISB_ARBITER_BP_WRITE_3_cce_BITS                           1
9672
#define GISB_ARBITER_BP_WRITE_3_cce_SHIFT                          0
9673
#define GISB_ARBITER_BP_WRITE_3_cce_DISABLE                        0
9674
#define GISB_ARBITER_BP_WRITE_3_cce_ENABLE                         1
9675
9676
9677
/****************************************************************************
9678
 * GISB_ARBITER :: BP_ENABLE_3
9679
 ***************************************************************************/
9680
/* GISB_ARBITER :: BP_ENABLE_3 :: reserved0 [31:03] */
9681
#define GISB_ARBITER_BP_ENABLE_3_reserved0_MASK                    0xfffffff8
9682
#define GISB_ARBITER_BP_ENABLE_3_reserved0_ALIGN                   0
9683
#define GISB_ARBITER_BP_ENABLE_3_reserved0_BITS                    29
9684
#define GISB_ARBITER_BP_ENABLE_3_reserved0_SHIFT                   3
9685
9686
/* GISB_ARBITER :: BP_ENABLE_3 :: block [02:02] */
9687
#define GISB_ARBITER_BP_ENABLE_3_block_MASK                        0x00000004
9688
#define GISB_ARBITER_BP_ENABLE_3_block_ALIGN                       0
9689
#define GISB_ARBITER_BP_ENABLE_3_block_BITS                        1
9690
#define GISB_ARBITER_BP_ENABLE_3_block_SHIFT                       2
9691
#define GISB_ARBITER_BP_ENABLE_3_block_DISABLE                     0
9692
#define GISB_ARBITER_BP_ENABLE_3_block_ENABLE                      1
9693
9694
/* GISB_ARBITER :: BP_ENABLE_3 :: address [01:01] */
9695
#define GISB_ARBITER_BP_ENABLE_3_address_MASK                      0x00000002
9696
#define GISB_ARBITER_BP_ENABLE_3_address_ALIGN                     0
9697
#define GISB_ARBITER_BP_ENABLE_3_address_BITS                      1
9698
#define GISB_ARBITER_BP_ENABLE_3_address_SHIFT                     1
9699
#define GISB_ARBITER_BP_ENABLE_3_address_DISABLE                   0
9700
#define GISB_ARBITER_BP_ENABLE_3_address_ENABLE                    1
9701
9702
/* GISB_ARBITER :: BP_ENABLE_3 :: access [00:00] */
9703
#define GISB_ARBITER_BP_ENABLE_3_access_MASK                       0x00000001
9704
#define GISB_ARBITER_BP_ENABLE_3_access_ALIGN                      0
9705
#define GISB_ARBITER_BP_ENABLE_3_access_BITS                       1
9706
#define GISB_ARBITER_BP_ENABLE_3_access_SHIFT                      0
9707
#define GISB_ARBITER_BP_ENABLE_3_access_DISABLE                    0
9708
#define GISB_ARBITER_BP_ENABLE_3_access_ENABLE                     1
9709
9710
9711
/****************************************************************************
9712
 * GISB_ARBITER :: BP_START_ADDR_4
9713
 ***************************************************************************/
9714
/* GISB_ARBITER :: BP_START_ADDR_4 :: start [31:00] */
9715
#define GISB_ARBITER_BP_START_ADDR_4_start_MASK                    0xffffffff
9716
#define GISB_ARBITER_BP_START_ADDR_4_start_ALIGN                   0
9717
#define GISB_ARBITER_BP_START_ADDR_4_start_BITS                    32
9718
#define GISB_ARBITER_BP_START_ADDR_4_start_SHIFT                   0
9719
9720
9721
/****************************************************************************
9722
 * GISB_ARBITER :: BP_END_ADDR_4
9723
 ***************************************************************************/
9724
/* GISB_ARBITER :: BP_END_ADDR_4 :: end [31:00] */
9725
#define GISB_ARBITER_BP_END_ADDR_4_end_MASK                        0xffffffff
9726
#define GISB_ARBITER_BP_END_ADDR_4_end_ALIGN                       0
9727
#define GISB_ARBITER_BP_END_ADDR_4_end_BITS                        32
9728
#define GISB_ARBITER_BP_END_ADDR_4_end_SHIFT                       0
9729
9730
9731
/****************************************************************************
9732
 * GISB_ARBITER :: BP_READ_4
9733
 ***************************************************************************/
9734
/* GISB_ARBITER :: BP_READ_4 :: reserved0 [31:06] */
9735
#define GISB_ARBITER_BP_READ_4_reserved0_MASK                      0xffffffc0
9736
#define GISB_ARBITER_BP_READ_4_reserved0_ALIGN                     0
9737
#define GISB_ARBITER_BP_READ_4_reserved0_BITS                      26
9738
#define GISB_ARBITER_BP_READ_4_reserved0_SHIFT                     6
9739
9740
/* GISB_ARBITER :: BP_READ_4 :: bsp [05:05] */
9741
#define GISB_ARBITER_BP_READ_4_bsp_MASK                            0x00000020
9742
#define GISB_ARBITER_BP_READ_4_bsp_ALIGN                           0
9743
#define GISB_ARBITER_BP_READ_4_bsp_BITS                            1
9744
#define GISB_ARBITER_BP_READ_4_bsp_SHIFT                           5
9745
#define GISB_ARBITER_BP_READ_4_bsp_DISABLE                         0
9746
#define GISB_ARBITER_BP_READ_4_bsp_ENABLE                          1
9747
9748
/* GISB_ARBITER :: BP_READ_4 :: aes [04:04] */
9749
#define GISB_ARBITER_BP_READ_4_aes_MASK                            0x00000010
9750
#define GISB_ARBITER_BP_READ_4_aes_ALIGN                           0
9751
#define GISB_ARBITER_BP_READ_4_aes_BITS                            1
9752
#define GISB_ARBITER_BP_READ_4_aes_SHIFT                           4
9753
#define GISB_ARBITER_BP_READ_4_aes_DISABLE                         0
9754
#define GISB_ARBITER_BP_READ_4_aes_ENABLE                          1
9755
9756
/* GISB_ARBITER :: BP_READ_4 :: fve [03:03] */
9757
#define GISB_ARBITER_BP_READ_4_fve_MASK                            0x00000008
9758
#define GISB_ARBITER_BP_READ_4_fve_ALIGN                           0
9759
#define GISB_ARBITER_BP_READ_4_fve_BITS                            1
9760
#define GISB_ARBITER_BP_READ_4_fve_SHIFT                           3
9761
#define GISB_ARBITER_BP_READ_4_fve_DISABLE                         0
9762
#define GISB_ARBITER_BP_READ_4_fve_ENABLE                          1
9763
9764
/* GISB_ARBITER :: BP_READ_4 :: tgt [02:02] */
9765
#define GISB_ARBITER_BP_READ_4_tgt_MASK                            0x00000004
9766
#define GISB_ARBITER_BP_READ_4_tgt_ALIGN                           0
9767
#define GISB_ARBITER_BP_READ_4_tgt_BITS                            1
9768
#define GISB_ARBITER_BP_READ_4_tgt_SHIFT                           2
9769
#define GISB_ARBITER_BP_READ_4_tgt_DISABLE                         0
9770
#define GISB_ARBITER_BP_READ_4_tgt_ENABLE                          1
9771
9772
/* GISB_ARBITER :: BP_READ_4 :: dbu [01:01] */
9773
#define GISB_ARBITER_BP_READ_4_dbu_MASK                            0x00000002
9774
#define GISB_ARBITER_BP_READ_4_dbu_ALIGN                           0
9775
#define GISB_ARBITER_BP_READ_4_dbu_BITS                            1
9776
#define GISB_ARBITER_BP_READ_4_dbu_SHIFT                           1
9777
#define GISB_ARBITER_BP_READ_4_dbu_DISABLE                         0
9778
#define GISB_ARBITER_BP_READ_4_dbu_ENABLE                          1
9779
9780
/* GISB_ARBITER :: BP_READ_4 :: cce [00:00] */
9781
#define GISB_ARBITER_BP_READ_4_cce_MASK                            0x00000001
9782
#define GISB_ARBITER_BP_READ_4_cce_ALIGN                           0
9783
#define GISB_ARBITER_BP_READ_4_cce_BITS                            1
9784
#define GISB_ARBITER_BP_READ_4_cce_SHIFT                           0
9785
#define GISB_ARBITER_BP_READ_4_cce_DISABLE                         0
9786
#define GISB_ARBITER_BP_READ_4_cce_ENABLE                          1
9787
9788
9789
/****************************************************************************
9790
 * GISB_ARBITER :: BP_WRITE_4
9791
 ***************************************************************************/
9792
/* GISB_ARBITER :: BP_WRITE_4 :: reserved0 [31:06] */
9793
#define GISB_ARBITER_BP_WRITE_4_reserved0_MASK                     0xffffffc0
9794
#define GISB_ARBITER_BP_WRITE_4_reserved0_ALIGN                    0
9795
#define GISB_ARBITER_BP_WRITE_4_reserved0_BITS                     26
9796
#define GISB_ARBITER_BP_WRITE_4_reserved0_SHIFT                    6
9797
9798
/* GISB_ARBITER :: BP_WRITE_4 :: bsp [05:05] */
9799
#define GISB_ARBITER_BP_WRITE_4_bsp_MASK                           0x00000020
9800
#define GISB_ARBITER_BP_WRITE_4_bsp_ALIGN                          0
9801
#define GISB_ARBITER_BP_WRITE_4_bsp_BITS                           1
9802
#define GISB_ARBITER_BP_WRITE_4_bsp_SHIFT                          5
9803
#define GISB_ARBITER_BP_WRITE_4_bsp_DISABLE                        0
9804
#define GISB_ARBITER_BP_WRITE_4_bsp_ENABLE                         1
9805
9806
/* GISB_ARBITER :: BP_WRITE_4 :: aes [04:04] */
9807
#define GISB_ARBITER_BP_WRITE_4_aes_MASK                           0x00000010
9808
#define GISB_ARBITER_BP_WRITE_4_aes_ALIGN                          0
9809
#define GISB_ARBITER_BP_WRITE_4_aes_BITS                           1
9810
#define GISB_ARBITER_BP_WRITE_4_aes_SHIFT                          4
9811
#define GISB_ARBITER_BP_WRITE_4_aes_DISABLE                        0
9812
#define GISB_ARBITER_BP_WRITE_4_aes_ENABLE                         1
9813
9814
/* GISB_ARBITER :: BP_WRITE_4 :: fve [03:03] */
9815
#define GISB_ARBITER_BP_WRITE_4_fve_MASK                           0x00000008
9816
#define GISB_ARBITER_BP_WRITE_4_fve_ALIGN                          0
9817
#define GISB_ARBITER_BP_WRITE_4_fve_BITS                           1
9818
#define GISB_ARBITER_BP_WRITE_4_fve_SHIFT                          3
9819
#define GISB_ARBITER_BP_WRITE_4_fve_DISABLE                        0
9820
#define GISB_ARBITER_BP_WRITE_4_fve_ENABLE                         1
9821
9822
/* GISB_ARBITER :: BP_WRITE_4 :: tgt [02:02] */
9823
#define GISB_ARBITER_BP_WRITE_4_tgt_MASK                           0x00000004
9824
#define GISB_ARBITER_BP_WRITE_4_tgt_ALIGN                          0
9825
#define GISB_ARBITER_BP_WRITE_4_tgt_BITS                           1
9826
#define GISB_ARBITER_BP_WRITE_4_tgt_SHIFT                          2
9827
#define GISB_ARBITER_BP_WRITE_4_tgt_DISABLE                        0
9828
#define GISB_ARBITER_BP_WRITE_4_tgt_ENABLE                         1
9829
9830
/* GISB_ARBITER :: BP_WRITE_4 :: dbu [01:01] */
9831
#define GISB_ARBITER_BP_WRITE_4_dbu_MASK                           0x00000002
9832
#define GISB_ARBITER_BP_WRITE_4_dbu_ALIGN                          0
9833
#define GISB_ARBITER_BP_WRITE_4_dbu_BITS                           1
9834
#define GISB_ARBITER_BP_WRITE_4_dbu_SHIFT                          1
9835
#define GISB_ARBITER_BP_WRITE_4_dbu_DISABLE                        0
9836
#define GISB_ARBITER_BP_WRITE_4_dbu_ENABLE                         1
9837
9838
/* GISB_ARBITER :: BP_WRITE_4 :: cce [00:00] */
9839
#define GISB_ARBITER_BP_WRITE_4_cce_MASK                           0x00000001
9840
#define GISB_ARBITER_BP_WRITE_4_cce_ALIGN                          0
9841
#define GISB_ARBITER_BP_WRITE_4_cce_BITS                           1
9842
#define GISB_ARBITER_BP_WRITE_4_cce_SHIFT                          0
9843
#define GISB_ARBITER_BP_WRITE_4_cce_DISABLE                        0
9844
#define GISB_ARBITER_BP_WRITE_4_cce_ENABLE                         1
9845
9846
9847
/****************************************************************************
9848
 * GISB_ARBITER :: BP_ENABLE_4
9849
 ***************************************************************************/
9850
/* GISB_ARBITER :: BP_ENABLE_4 :: reserved0 [31:03] */
9851
#define GISB_ARBITER_BP_ENABLE_4_reserved0_MASK                    0xfffffff8
9852
#define GISB_ARBITER_BP_ENABLE_4_reserved0_ALIGN                   0
9853
#define GISB_ARBITER_BP_ENABLE_4_reserved0_BITS                    29
9854
#define GISB_ARBITER_BP_ENABLE_4_reserved0_SHIFT                   3
9855
9856
/* GISB_ARBITER :: BP_ENABLE_4 :: block [02:02] */
9857
#define GISB_ARBITER_BP_ENABLE_4_block_MASK                        0x00000004
9858
#define GISB_ARBITER_BP_ENABLE_4_block_ALIGN                       0
9859
#define GISB_ARBITER_BP_ENABLE_4_block_BITS                        1
9860
#define GISB_ARBITER_BP_ENABLE_4_block_SHIFT                       2
9861
#define GISB_ARBITER_BP_ENABLE_4_block_DISABLE                     0
9862
#define GISB_ARBITER_BP_ENABLE_4_block_ENABLE                      1
9863
9864
/* GISB_ARBITER :: BP_ENABLE_4 :: address [01:01] */
9865
#define GISB_ARBITER_BP_ENABLE_4_address_MASK                      0x00000002
9866
#define GISB_ARBITER_BP_ENABLE_4_address_ALIGN                     0
9867
#define GISB_ARBITER_BP_ENABLE_4_address_BITS                      1
9868
#define GISB_ARBITER_BP_ENABLE_4_address_SHIFT                     1
9869
#define GISB_ARBITER_BP_ENABLE_4_address_DISABLE                   0
9870
#define GISB_ARBITER_BP_ENABLE_4_address_ENABLE                    1
9871
9872
/* GISB_ARBITER :: BP_ENABLE_4 :: access [00:00] */
9873
#define GISB_ARBITER_BP_ENABLE_4_access_MASK                       0x00000001
9874
#define GISB_ARBITER_BP_ENABLE_4_access_ALIGN                      0
9875
#define GISB_ARBITER_BP_ENABLE_4_access_BITS                       1
9876
#define GISB_ARBITER_BP_ENABLE_4_access_SHIFT                      0
9877
#define GISB_ARBITER_BP_ENABLE_4_access_DISABLE                    0
9878
#define GISB_ARBITER_BP_ENABLE_4_access_ENABLE                     1
9879
9880
9881
/****************************************************************************
9882
 * GISB_ARBITER :: BP_START_ADDR_5
9883
 ***************************************************************************/
9884
/* GISB_ARBITER :: BP_START_ADDR_5 :: start [31:00] */
9885
#define GISB_ARBITER_BP_START_ADDR_5_start_MASK                    0xffffffff
9886
#define GISB_ARBITER_BP_START_ADDR_5_start_ALIGN                   0
9887
#define GISB_ARBITER_BP_START_ADDR_5_start_BITS                    32
9888
#define GISB_ARBITER_BP_START_ADDR_5_start_SHIFT                   0
9889
9890
9891
/****************************************************************************
9892
 * GISB_ARBITER :: BP_END_ADDR_5
9893
 ***************************************************************************/
9894
/* GISB_ARBITER :: BP_END_ADDR_5 :: end [31:00] */
9895
#define GISB_ARBITER_BP_END_ADDR_5_end_MASK                        0xffffffff
9896
#define GISB_ARBITER_BP_END_ADDR_5_end_ALIGN                       0
9897
#define GISB_ARBITER_BP_END_ADDR_5_end_BITS                        32
9898
#define GISB_ARBITER_BP_END_ADDR_5_end_SHIFT                       0
9899
9900
9901
/****************************************************************************
9902
 * GISB_ARBITER :: BP_READ_5
9903
 ***************************************************************************/
9904
/* GISB_ARBITER :: BP_READ_5 :: reserved0 [31:06] */
9905
#define GISB_ARBITER_BP_READ_5_reserved0_MASK                      0xffffffc0
9906
#define GISB_ARBITER_BP_READ_5_reserved0_ALIGN                     0
9907
#define GISB_ARBITER_BP_READ_5_reserved0_BITS                      26
9908
#define GISB_ARBITER_BP_READ_5_reserved0_SHIFT                     6
9909
9910
/* GISB_ARBITER :: BP_READ_5 :: bsp [05:05] */
9911
#define GISB_ARBITER_BP_READ_5_bsp_MASK                            0x00000020
9912
#define GISB_ARBITER_BP_READ_5_bsp_ALIGN                           0
9913
#define GISB_ARBITER_BP_READ_5_bsp_BITS                            1
9914
#define GISB_ARBITER_BP_READ_5_bsp_SHIFT                           5
9915
#define GISB_ARBITER_BP_READ_5_bsp_DISABLE                         0
9916
#define GISB_ARBITER_BP_READ_5_bsp_ENABLE                          1
9917
9918
/* GISB_ARBITER :: BP_READ_5 :: aes [04:04] */
9919
#define GISB_ARBITER_BP_READ_5_aes_MASK                            0x00000010
9920
#define GISB_ARBITER_BP_READ_5_aes_ALIGN                           0
9921
#define GISB_ARBITER_BP_READ_5_aes_BITS                            1
9922
#define GISB_ARBITER_BP_READ_5_aes_SHIFT                           4
9923
#define GISB_ARBITER_BP_READ_5_aes_DISABLE                         0
9924
#define GISB_ARBITER_BP_READ_5_aes_ENABLE                          1
9925
9926
/* GISB_ARBITER :: BP_READ_5 :: fve [03:03] */
9927
#define GISB_ARBITER_BP_READ_5_fve_MASK                            0x00000008
9928
#define GISB_ARBITER_BP_READ_5_fve_ALIGN                           0
9929
#define GISB_ARBITER_BP_READ_5_fve_BITS                            1
9930
#define GISB_ARBITER_BP_READ_5_fve_SHIFT                           3
9931
#define GISB_ARBITER_BP_READ_5_fve_DISABLE                         0
9932
#define GISB_ARBITER_BP_READ_5_fve_ENABLE                          1
9933
9934
/* GISB_ARBITER :: BP_READ_5 :: tgt [02:02] */
9935
#define GISB_ARBITER_BP_READ_5_tgt_MASK                            0x00000004
9936
#define GISB_ARBITER_BP_READ_5_tgt_ALIGN                           0
9937
#define GISB_ARBITER_BP_READ_5_tgt_BITS                            1
9938
#define GISB_ARBITER_BP_READ_5_tgt_SHIFT                           2
9939
#define GISB_ARBITER_BP_READ_5_tgt_DISABLE                         0
9940
#define GISB_ARBITER_BP_READ_5_tgt_ENABLE                          1
9941
9942
/* GISB_ARBITER :: BP_READ_5 :: dbu [01:01] */
9943
#define GISB_ARBITER_BP_READ_5_dbu_MASK                            0x00000002
9944
#define GISB_ARBITER_BP_READ_5_dbu_ALIGN                           0
9945
#define GISB_ARBITER_BP_READ_5_dbu_BITS                            1
9946
#define GISB_ARBITER_BP_READ_5_dbu_SHIFT                           1
9947
#define GISB_ARBITER_BP_READ_5_dbu_DISABLE                         0
9948
#define GISB_ARBITER_BP_READ_5_dbu_ENABLE                          1
9949
9950
/* GISB_ARBITER :: BP_READ_5 :: cce [00:00] */
9951
#define GISB_ARBITER_BP_READ_5_cce_MASK                            0x00000001
9952
#define GISB_ARBITER_BP_READ_5_cce_ALIGN                           0
9953
#define GISB_ARBITER_BP_READ_5_cce_BITS                            1
9954
#define GISB_ARBITER_BP_READ_5_cce_SHIFT                           0
9955
#define GISB_ARBITER_BP_READ_5_cce_DISABLE                         0
9956
#define GISB_ARBITER_BP_READ_5_cce_ENABLE                          1
9957
9958
9959
/****************************************************************************
9960
 * GISB_ARBITER :: BP_WRITE_5
9961
 ***************************************************************************/
9962
/* GISB_ARBITER :: BP_WRITE_5 :: reserved0 [31:06] */
9963
#define GISB_ARBITER_BP_WRITE_5_reserved0_MASK                     0xffffffc0
9964
#define GISB_ARBITER_BP_WRITE_5_reserved0_ALIGN                    0
9965
#define GISB_ARBITER_BP_WRITE_5_reserved0_BITS                     26
9966
#define GISB_ARBITER_BP_WRITE_5_reserved0_SHIFT                    6
9967
9968
/* GISB_ARBITER :: BP_WRITE_5 :: bsp [05:05] */
9969
#define GISB_ARBITER_BP_WRITE_5_bsp_MASK                           0x00000020
9970
#define GISB_ARBITER_BP_WRITE_5_bsp_ALIGN                          0
9971
#define GISB_ARBITER_BP_WRITE_5_bsp_BITS                           1
9972
#define GISB_ARBITER_BP_WRITE_5_bsp_SHIFT                          5
9973
#define GISB_ARBITER_BP_WRITE_5_bsp_DISABLE                        0
9974
#define GISB_ARBITER_BP_WRITE_5_bsp_ENABLE                         1
9975
9976
/* GISB_ARBITER :: BP_WRITE_5 :: aes [04:04] */
9977
#define GISB_ARBITER_BP_WRITE_5_aes_MASK                           0x00000010
9978
#define GISB_ARBITER_BP_WRITE_5_aes_ALIGN                          0
9979
#define GISB_ARBITER_BP_WRITE_5_aes_BITS                           1
9980
#define GISB_ARBITER_BP_WRITE_5_aes_SHIFT                          4
9981
#define GISB_ARBITER_BP_WRITE_5_aes_DISABLE                        0
9982
#define GISB_ARBITER_BP_WRITE_5_aes_ENABLE                         1
9983
9984
/* GISB_ARBITER :: BP_WRITE_5 :: fve [03:03] */
9985
#define GISB_ARBITER_BP_WRITE_5_fve_MASK                           0x00000008
9986
#define GISB_ARBITER_BP_WRITE_5_fve_ALIGN                          0
9987
#define GISB_ARBITER_BP_WRITE_5_fve_BITS                           1
9988
#define GISB_ARBITER_BP_WRITE_5_fve_SHIFT                          3
9989
#define GISB_ARBITER_BP_WRITE_5_fve_DISABLE                        0
9990
#define GISB_ARBITER_BP_WRITE_5_fve_ENABLE                         1
9991
9992
/* GISB_ARBITER :: BP_WRITE_5 :: tgt [02:02] */
9993
#define GISB_ARBITER_BP_WRITE_5_tgt_MASK                           0x00000004
9994
#define GISB_ARBITER_BP_WRITE_5_tgt_ALIGN                          0
9995
#define GISB_ARBITER_BP_WRITE_5_tgt_BITS                           1
9996
#define GISB_ARBITER_BP_WRITE_5_tgt_SHIFT                          2
9997
#define GISB_ARBITER_BP_WRITE_5_tgt_DISABLE                        0
9998
#define GISB_ARBITER_BP_WRITE_5_tgt_ENABLE                         1
9999
10000
/* GISB_ARBITER :: BP_WRITE_5 :: dbu [01:01] */
10001
#define GISB_ARBITER_BP_WRITE_5_dbu_MASK                           0x00000002
10002
#define GISB_ARBITER_BP_WRITE_5_dbu_ALIGN                          0
10003
#define GISB_ARBITER_BP_WRITE_5_dbu_BITS                           1
10004
#define GISB_ARBITER_BP_WRITE_5_dbu_SHIFT                          1
10005
#define GISB_ARBITER_BP_WRITE_5_dbu_DISABLE                        0
10006
#define GISB_ARBITER_BP_WRITE_5_dbu_ENABLE                         1
10007
10008
/* GISB_ARBITER :: BP_WRITE_5 :: cce [00:00] */
10009
#define GISB_ARBITER_BP_WRITE_5_cce_MASK                           0x00000001
10010
#define GISB_ARBITER_BP_WRITE_5_cce_ALIGN                          0
10011
#define GISB_ARBITER_BP_WRITE_5_cce_BITS                           1
10012
#define GISB_ARBITER_BP_WRITE_5_cce_SHIFT                          0
10013
#define GISB_ARBITER_BP_WRITE_5_cce_DISABLE                        0
10014
#define GISB_ARBITER_BP_WRITE_5_cce_ENABLE                         1
10015
10016
10017
/****************************************************************************
10018
 * GISB_ARBITER :: BP_ENABLE_5
10019
 ***************************************************************************/
10020
/* GISB_ARBITER :: BP_ENABLE_5 :: reserved0 [31:03] */
10021
#define GISB_ARBITER_BP_ENABLE_5_reserved0_MASK                    0xfffffff8
10022
#define GISB_ARBITER_BP_ENABLE_5_reserved0_ALIGN                   0
10023
#define GISB_ARBITER_BP_ENABLE_5_reserved0_BITS                    29
10024
#define GISB_ARBITER_BP_ENABLE_5_reserved0_SHIFT                   3
10025
10026
/* GISB_ARBITER :: BP_ENABLE_5 :: block [02:02] */
10027
#define GISB_ARBITER_BP_ENABLE_5_block_MASK                        0x00000004
10028
#define GISB_ARBITER_BP_ENABLE_5_block_ALIGN                       0
10029
#define GISB_ARBITER_BP_ENABLE_5_block_BITS                        1
10030
#define GISB_ARBITER_BP_ENABLE_5_block_SHIFT                       2
10031
#define GISB_ARBITER_BP_ENABLE_5_block_DISABLE                     0
10032
#define GISB_ARBITER_BP_ENABLE_5_block_ENABLE                      1
10033
10034
/* GISB_ARBITER :: BP_ENABLE_5 :: address [01:01] */
10035
#define GISB_ARBITER_BP_ENABLE_5_address_MASK                      0x00000002
10036
#define GISB_ARBITER_BP_ENABLE_5_address_ALIGN                     0
10037
#define GISB_ARBITER_BP_ENABLE_5_address_BITS                      1
10038
#define GISB_ARBITER_BP_ENABLE_5_address_SHIFT                     1
10039
#define GISB_ARBITER_BP_ENABLE_5_address_DISABLE                   0
10040
#define GISB_ARBITER_BP_ENABLE_5_address_ENABLE                    1
10041
10042
/* GISB_ARBITER :: BP_ENABLE_5 :: access [00:00] */
10043
#define GISB_ARBITER_BP_ENABLE_5_access_MASK                       0x00000001
10044
#define GISB_ARBITER_BP_ENABLE_5_access_ALIGN                      0
10045
#define GISB_ARBITER_BP_ENABLE_5_access_BITS                       1
10046
#define GISB_ARBITER_BP_ENABLE_5_access_SHIFT                      0
10047
#define GISB_ARBITER_BP_ENABLE_5_access_DISABLE                    0
10048
#define GISB_ARBITER_BP_ENABLE_5_access_ENABLE                     1
10049
10050
10051
/****************************************************************************
10052
 * GISB_ARBITER :: BP_START_ADDR_6
10053
 ***************************************************************************/
10054
/* GISB_ARBITER :: BP_START_ADDR_6 :: start [31:00] */
10055
#define GISB_ARBITER_BP_START_ADDR_6_start_MASK                    0xffffffff
10056
#define GISB_ARBITER_BP_START_ADDR_6_start_ALIGN                   0
10057
#define GISB_ARBITER_BP_START_ADDR_6_start_BITS                    32
10058
#define GISB_ARBITER_BP_START_ADDR_6_start_SHIFT                   0
10059
10060
10061
/****************************************************************************
10062
 * GISB_ARBITER :: BP_END_ADDR_6
10063
 ***************************************************************************/
10064
/* GISB_ARBITER :: BP_END_ADDR_6 :: end [31:00] */
10065
#define GISB_ARBITER_BP_END_ADDR_6_end_MASK                        0xffffffff
10066
#define GISB_ARBITER_BP_END_ADDR_6_end_ALIGN                       0
10067
#define GISB_ARBITER_BP_END_ADDR_6_end_BITS                        32
10068
#define GISB_ARBITER_BP_END_ADDR_6_end_SHIFT                       0
10069
10070
10071
/****************************************************************************
10072
 * GISB_ARBITER :: BP_READ_6
10073
 ***************************************************************************/
10074
/* GISB_ARBITER :: BP_READ_6 :: reserved0 [31:06] */
10075
#define GISB_ARBITER_BP_READ_6_reserved0_MASK                      0xffffffc0
10076
#define GISB_ARBITER_BP_READ_6_reserved0_ALIGN                     0
10077
#define GISB_ARBITER_BP_READ_6_reserved0_BITS                      26
10078
#define GISB_ARBITER_BP_READ_6_reserved0_SHIFT                     6
10079
10080
/* GISB_ARBITER :: BP_READ_6 :: bsp [05:05] */
10081
#define GISB_ARBITER_BP_READ_6_bsp_MASK                            0x00000020
10082
#define GISB_ARBITER_BP_READ_6_bsp_ALIGN                           0
10083
#define GISB_ARBITER_BP_READ_6_bsp_BITS                            1
10084
#define GISB_ARBITER_BP_READ_6_bsp_SHIFT                           5
10085
#define GISB_ARBITER_BP_READ_6_bsp_DISABLE                         0
10086
#define GISB_ARBITER_BP_READ_6_bsp_ENABLE                          1
10087
10088
/* GISB_ARBITER :: BP_READ_6 :: aes [04:04] */
10089
#define GISB_ARBITER_BP_READ_6_aes_MASK                            0x00000010
10090
#define GISB_ARBITER_BP_READ_6_aes_ALIGN                           0
10091
#define GISB_ARBITER_BP_READ_6_aes_BITS                            1
10092
#define GISB_ARBITER_BP_READ_6_aes_SHIFT                           4
10093
#define GISB_ARBITER_BP_READ_6_aes_DISABLE                         0
10094
#define GISB_ARBITER_BP_READ_6_aes_ENABLE                          1
10095
10096
/* GISB_ARBITER :: BP_READ_6 :: fve [03:03] */
10097
#define GISB_ARBITER_BP_READ_6_fve_MASK                            0x00000008
10098
#define GISB_ARBITER_BP_READ_6_fve_ALIGN                           0
10099
#define GISB_ARBITER_BP_READ_6_fve_BITS                            1
10100
#define GISB_ARBITER_BP_READ_6_fve_SHIFT                           3
10101
#define GISB_ARBITER_BP_READ_6_fve_DISABLE                         0
10102
#define GISB_ARBITER_BP_READ_6_fve_ENABLE                          1
10103
10104
/* GISB_ARBITER :: BP_READ_6 :: tgt [02:02] */
10105
#define GISB_ARBITER_BP_READ_6_tgt_MASK                            0x00000004
10106
#define GISB_ARBITER_BP_READ_6_tgt_ALIGN                           0
10107
#define GISB_ARBITER_BP_READ_6_tgt_BITS                            1
10108
#define GISB_ARBITER_BP_READ_6_tgt_SHIFT                           2
10109
#define GISB_ARBITER_BP_READ_6_tgt_DISABLE                         0
10110
#define GISB_ARBITER_BP_READ_6_tgt_ENABLE                          1
10111
10112
/* GISB_ARBITER :: BP_READ_6 :: dbu [01:01] */
10113
#define GISB_ARBITER_BP_READ_6_dbu_MASK                            0x00000002
10114
#define GISB_ARBITER_BP_READ_6_dbu_ALIGN                           0
10115
#define GISB_ARBITER_BP_READ_6_dbu_BITS                            1
10116
#define GISB_ARBITER_BP_READ_6_dbu_SHIFT                           1
10117
#define GISB_ARBITER_BP_READ_6_dbu_DISABLE                         0
10118
#define GISB_ARBITER_BP_READ_6_dbu_ENABLE                          1
10119
10120
/* GISB_ARBITER :: BP_READ_6 :: cce [00:00] */
10121
#define GISB_ARBITER_BP_READ_6_cce_MASK                            0x00000001
10122
#define GISB_ARBITER_BP_READ_6_cce_ALIGN                           0
10123
#define GISB_ARBITER_BP_READ_6_cce_BITS                            1
10124
#define GISB_ARBITER_BP_READ_6_cce_SHIFT                           0
10125
#define GISB_ARBITER_BP_READ_6_cce_DISABLE                         0
10126
#define GISB_ARBITER_BP_READ_6_cce_ENABLE                          1
10127
10128
10129
/****************************************************************************
10130
 * GISB_ARBITER :: BP_WRITE_6
10131
 ***************************************************************************/
10132
/* GISB_ARBITER :: BP_WRITE_6 :: reserved0 [31:06] */
10133
#define GISB_ARBITER_BP_WRITE_6_reserved0_MASK                     0xffffffc0
10134
#define GISB_ARBITER_BP_WRITE_6_reserved0_ALIGN                    0
10135
#define GISB_ARBITER_BP_WRITE_6_reserved0_BITS                     26
10136
#define GISB_ARBITER_BP_WRITE_6_reserved0_SHIFT                    6
10137
10138
/* GISB_ARBITER :: BP_WRITE_6 :: bsp [05:05] */
10139
#define GISB_ARBITER_BP_WRITE_6_bsp_MASK                           0x00000020
10140
#define GISB_ARBITER_BP_WRITE_6_bsp_ALIGN                          0
10141
#define GISB_ARBITER_BP_WRITE_6_bsp_BITS                           1
10142
#define GISB_ARBITER_BP_WRITE_6_bsp_SHIFT                          5
10143
#define GISB_ARBITER_BP_WRITE_6_bsp_DISABLE                        0
10144
#define GISB_ARBITER_BP_WRITE_6_bsp_ENABLE                         1
10145
10146
/* GISB_ARBITER :: BP_WRITE_6 :: aes [04:04] */
10147
#define GISB_ARBITER_BP_WRITE_6_aes_MASK                           0x00000010
10148
#define GISB_ARBITER_BP_WRITE_6_aes_ALIGN                          0
10149
#define GISB_ARBITER_BP_WRITE_6_aes_BITS                           1
10150
#define GISB_ARBITER_BP_WRITE_6_aes_SHIFT                          4
10151
#define GISB_ARBITER_BP_WRITE_6_aes_DISABLE                        0
10152
#define GISB_ARBITER_BP_WRITE_6_aes_ENABLE                         1
10153
10154
/* GISB_ARBITER :: BP_WRITE_6 :: fve [03:03] */
10155
#define GISB_ARBITER_BP_WRITE_6_fve_MASK                           0x00000008
10156
#define GISB_ARBITER_BP_WRITE_6_fve_ALIGN                          0
10157
#define GISB_ARBITER_BP_WRITE_6_fve_BITS                           1
10158
#define GISB_ARBITER_BP_WRITE_6_fve_SHIFT                          3
10159
#define GISB_ARBITER_BP_WRITE_6_fve_DISABLE                        0
10160
#define GISB_ARBITER_BP_WRITE_6_fve_ENABLE                         1
10161
10162
/* GISB_ARBITER :: BP_WRITE_6 :: tgt [02:02] */
10163
#define GISB_ARBITER_BP_WRITE_6_tgt_MASK                           0x00000004
10164
#define GISB_ARBITER_BP_WRITE_6_tgt_ALIGN                          0
10165
#define GISB_ARBITER_BP_WRITE_6_tgt_BITS                           1
10166
#define GISB_ARBITER_BP_WRITE_6_tgt_SHIFT                          2
10167
#define GISB_ARBITER_BP_WRITE_6_tgt_DISABLE                        0
10168
#define GISB_ARBITER_BP_WRITE_6_tgt_ENABLE                         1
10169
10170
/* GISB_ARBITER :: BP_WRITE_6 :: dbu [01:01] */
10171
#define GISB_ARBITER_BP_WRITE_6_dbu_MASK                           0x00000002
10172
#define GISB_ARBITER_BP_WRITE_6_dbu_ALIGN                          0
10173
#define GISB_ARBITER_BP_WRITE_6_dbu_BITS                           1
10174
#define GISB_ARBITER_BP_WRITE_6_dbu_SHIFT                          1
10175
#define GISB_ARBITER_BP_WRITE_6_dbu_DISABLE                        0
10176
#define GISB_ARBITER_BP_WRITE_6_dbu_ENABLE                         1
10177
10178
/* GISB_ARBITER :: BP_WRITE_6 :: cce [00:00] */
10179
#define GISB_ARBITER_BP_WRITE_6_cce_MASK                           0x00000001
10180
#define GISB_ARBITER_BP_WRITE_6_cce_ALIGN                          0
10181
#define GISB_ARBITER_BP_WRITE_6_cce_BITS                           1
10182
#define GISB_ARBITER_BP_WRITE_6_cce_SHIFT                          0
10183
#define GISB_ARBITER_BP_WRITE_6_cce_DISABLE                        0
10184
#define GISB_ARBITER_BP_WRITE_6_cce_ENABLE                         1
10185
10186
10187
/****************************************************************************
10188
 * GISB_ARBITER :: BP_ENABLE_6
10189
 ***************************************************************************/
10190
/* GISB_ARBITER :: BP_ENABLE_6 :: reserved0 [31:03] */
10191
#define GISB_ARBITER_BP_ENABLE_6_reserved0_MASK                    0xfffffff8
10192
#define GISB_ARBITER_BP_ENABLE_6_reserved0_ALIGN                   0
10193
#define GISB_ARBITER_BP_ENABLE_6_reserved0_BITS                    29
10194
#define GISB_ARBITER_BP_ENABLE_6_reserved0_SHIFT                   3
10195
10196
/* GISB_ARBITER :: BP_ENABLE_6 :: block [02:02] */
10197
#define GISB_ARBITER_BP_ENABLE_6_block_MASK                        0x00000004
10198
#define GISB_ARBITER_BP_ENABLE_6_block_ALIGN                       0
10199
#define GISB_ARBITER_BP_ENABLE_6_block_BITS                        1
10200
#define GISB_ARBITER_BP_ENABLE_6_block_SHIFT                       2
10201
#define GISB_ARBITER_BP_ENABLE_6_block_DISABLE                     0
10202
#define GISB_ARBITER_BP_ENABLE_6_block_ENABLE                      1
10203
10204
/* GISB_ARBITER :: BP_ENABLE_6 :: address [01:01] */
10205
#define GISB_ARBITER_BP_ENABLE_6_address_MASK                      0x00000002
10206
#define GISB_ARBITER_BP_ENABLE_6_address_ALIGN                     0
10207
#define GISB_ARBITER_BP_ENABLE_6_address_BITS                      1
10208
#define GISB_ARBITER_BP_ENABLE_6_address_SHIFT                     1
10209
#define GISB_ARBITER_BP_ENABLE_6_address_DISABLE                   0
10210
#define GISB_ARBITER_BP_ENABLE_6_address_ENABLE                    1
10211
10212
/* GISB_ARBITER :: BP_ENABLE_6 :: access [00:00] */
10213
#define GISB_ARBITER_BP_ENABLE_6_access_MASK                       0x00000001
10214
#define GISB_ARBITER_BP_ENABLE_6_access_ALIGN                      0
10215
#define GISB_ARBITER_BP_ENABLE_6_access_BITS                       1
10216
#define GISB_ARBITER_BP_ENABLE_6_access_SHIFT                      0
10217
#define GISB_ARBITER_BP_ENABLE_6_access_DISABLE                    0
10218
#define GISB_ARBITER_BP_ENABLE_6_access_ENABLE                     1
10219
10220
10221
/****************************************************************************
10222
 * GISB_ARBITER :: BP_START_ADDR_7
10223
 ***************************************************************************/
10224
/* GISB_ARBITER :: BP_START_ADDR_7 :: start [31:00] */
10225
#define GISB_ARBITER_BP_START_ADDR_7_start_MASK                    0xffffffff
10226
#define GISB_ARBITER_BP_START_ADDR_7_start_ALIGN                   0
10227
#define GISB_ARBITER_BP_START_ADDR_7_start_BITS                    32
10228
#define GISB_ARBITER_BP_START_ADDR_7_start_SHIFT                   0
10229
10230
10231
/****************************************************************************
10232
 * GISB_ARBITER :: BP_END_ADDR_7
10233
 ***************************************************************************/
10234
/* GISB_ARBITER :: BP_END_ADDR_7 :: end [31:00] */
10235
#define GISB_ARBITER_BP_END_ADDR_7_end_MASK                        0xffffffff
10236
#define GISB_ARBITER_BP_END_ADDR_7_end_ALIGN                       0
10237
#define GISB_ARBITER_BP_END_ADDR_7_end_BITS                        32
10238
#define GISB_ARBITER_BP_END_ADDR_7_end_SHIFT                       0
10239
10240
10241
/****************************************************************************
10242
 * GISB_ARBITER :: BP_READ_7
10243
 ***************************************************************************/
10244
/* GISB_ARBITER :: BP_READ_7 :: reserved0 [31:06] */
10245
#define GISB_ARBITER_BP_READ_7_reserved0_MASK                      0xffffffc0
10246
#define GISB_ARBITER_BP_READ_7_reserved0_ALIGN                     0
10247
#define GISB_ARBITER_BP_READ_7_reserved0_BITS                      26
10248
#define GISB_ARBITER_BP_READ_7_reserved0_SHIFT                     6
10249
10250
/* GISB_ARBITER :: BP_READ_7 :: bsp [05:05] */
10251
#define GISB_ARBITER_BP_READ_7_bsp_MASK                            0x00000020
10252
#define GISB_ARBITER_BP_READ_7_bsp_ALIGN                           0
10253
#define GISB_ARBITER_BP_READ_7_bsp_BITS                            1
10254
#define GISB_ARBITER_BP_READ_7_bsp_SHIFT                           5
10255
#define GISB_ARBITER_BP_READ_7_bsp_DISABLE                         0
10256
#define GISB_ARBITER_BP_READ_7_bsp_ENABLE                          1
10257
10258
/* GISB_ARBITER :: BP_READ_7 :: aes [04:04] */
10259
#define GISB_ARBITER_BP_READ_7_aes_MASK                            0x00000010
10260
#define GISB_ARBITER_BP_READ_7_aes_ALIGN                           0
10261
#define GISB_ARBITER_BP_READ_7_aes_BITS                            1
10262
#define GISB_ARBITER_BP_READ_7_aes_SHIFT                           4
10263
#define GISB_ARBITER_BP_READ_7_aes_DISABLE                         0
10264
#define GISB_ARBITER_BP_READ_7_aes_ENABLE                          1
10265
10266
/* GISB_ARBITER :: BP_READ_7 :: fve [03:03] */
10267
#define GISB_ARBITER_BP_READ_7_fve_MASK                            0x00000008
10268
#define GISB_ARBITER_BP_READ_7_fve_ALIGN                           0
10269
#define GISB_ARBITER_BP_READ_7_fve_BITS                            1
10270
#define GISB_ARBITER_BP_READ_7_fve_SHIFT                           3
10271
#define GISB_ARBITER_BP_READ_7_fve_DISABLE                         0
10272
#define GISB_ARBITER_BP_READ_7_fve_ENABLE                          1
10273
10274
/* GISB_ARBITER :: BP_READ_7 :: tgt [02:02] */
10275
#define GISB_ARBITER_BP_READ_7_tgt_MASK                            0x00000004
10276
#define GISB_ARBITER_BP_READ_7_tgt_ALIGN                           0
10277
#define GISB_ARBITER_BP_READ_7_tgt_BITS                            1
10278
#define GISB_ARBITER_BP_READ_7_tgt_SHIFT                           2
10279
#define GISB_ARBITER_BP_READ_7_tgt_DISABLE                         0
10280
#define GISB_ARBITER_BP_READ_7_tgt_ENABLE                          1
10281
10282
/* GISB_ARBITER :: BP_READ_7 :: dbu [01:01] */
10283
#define GISB_ARBITER_BP_READ_7_dbu_MASK                            0x00000002
10284
#define GISB_ARBITER_BP_READ_7_dbu_ALIGN                           0
10285
#define GISB_ARBITER_BP_READ_7_dbu_BITS                            1
10286
#define GISB_ARBITER_BP_READ_7_dbu_SHIFT                           1
10287
#define GISB_ARBITER_BP_READ_7_dbu_DISABLE                         0
10288
#define GISB_ARBITER_BP_READ_7_dbu_ENABLE                          1
10289
10290
/* GISB_ARBITER :: BP_READ_7 :: cce [00:00] */
10291
#define GISB_ARBITER_BP_READ_7_cce_MASK                            0x00000001
10292
#define GISB_ARBITER_BP_READ_7_cce_ALIGN                           0
10293
#define GISB_ARBITER_BP_READ_7_cce_BITS                            1
10294
#define GISB_ARBITER_BP_READ_7_cce_SHIFT                           0
10295
#define GISB_ARBITER_BP_READ_7_cce_DISABLE                         0
10296
#define GISB_ARBITER_BP_READ_7_cce_ENABLE                          1
10297
10298
10299
/****************************************************************************
10300
 * GISB_ARBITER :: BP_WRITE_7
10301
 ***************************************************************************/
10302
/* GISB_ARBITER :: BP_WRITE_7 :: reserved0 [31:06] */
10303
#define GISB_ARBITER_BP_WRITE_7_reserved0_MASK                     0xffffffc0
10304
#define GISB_ARBITER_BP_WRITE_7_reserved0_ALIGN                    0
10305
#define GISB_ARBITER_BP_WRITE_7_reserved0_BITS                     26
10306
#define GISB_ARBITER_BP_WRITE_7_reserved0_SHIFT                    6
10307
10308
/* GISB_ARBITER :: BP_WRITE_7 :: bsp [05:05] */
10309
#define GISB_ARBITER_BP_WRITE_7_bsp_MASK                           0x00000020
10310
#define GISB_ARBITER_BP_WRITE_7_bsp_ALIGN                          0
10311
#define GISB_ARBITER_BP_WRITE_7_bsp_BITS                           1
10312
#define GISB_ARBITER_BP_WRITE_7_bsp_SHIFT                          5
10313
#define GISB_ARBITER_BP_WRITE_7_bsp_DISABLE                        0
10314
#define GISB_ARBITER_BP_WRITE_7_bsp_ENABLE                         1
10315
10316
/* GISB_ARBITER :: BP_WRITE_7 :: aes [04:04] */
10317
#define GISB_ARBITER_BP_WRITE_7_aes_MASK                           0x00000010
10318
#define GISB_ARBITER_BP_WRITE_7_aes_ALIGN                          0
10319
#define GISB_ARBITER_BP_WRITE_7_aes_BITS                           1
10320
#define GISB_ARBITER_BP_WRITE_7_aes_SHIFT                          4
10321
#define GISB_ARBITER_BP_WRITE_7_aes_DISABLE                        0
10322
#define GISB_ARBITER_BP_WRITE_7_aes_ENABLE                         1
10323
10324
/* GISB_ARBITER :: BP_WRITE_7 :: fve [03:03] */
10325
#define GISB_ARBITER_BP_WRITE_7_fve_MASK                           0x00000008
10326
#define GISB_ARBITER_BP_WRITE_7_fve_ALIGN                          0
10327
#define GISB_ARBITER_BP_WRITE_7_fve_BITS                           1
10328
#define GISB_ARBITER_BP_WRITE_7_fve_SHIFT                          3
10329
#define GISB_ARBITER_BP_WRITE_7_fve_DISABLE                        0
10330
#define GISB_ARBITER_BP_WRITE_7_fve_ENABLE                         1
10331
10332
/* GISB_ARBITER :: BP_WRITE_7 :: tgt [02:02] */
10333
#define GISB_ARBITER_BP_WRITE_7_tgt_MASK                           0x00000004
10334
#define GISB_ARBITER_BP_WRITE_7_tgt_ALIGN                          0
10335
#define GISB_ARBITER_BP_WRITE_7_tgt_BITS                           1
10336
#define GISB_ARBITER_BP_WRITE_7_tgt_SHIFT                          2
10337
#define GISB_ARBITER_BP_WRITE_7_tgt_DISABLE                        0
10338
#define GISB_ARBITER_BP_WRITE_7_tgt_ENABLE                         1
10339
10340
/* GISB_ARBITER :: BP_WRITE_7 :: dbu [01:01] */
10341
#define GISB_ARBITER_BP_WRITE_7_dbu_MASK                           0x00000002
10342
#define GISB_ARBITER_BP_WRITE_7_dbu_ALIGN                          0
10343
#define GISB_ARBITER_BP_WRITE_7_dbu_BITS                           1
10344
#define GISB_ARBITER_BP_WRITE_7_dbu_SHIFT                          1
10345
#define GISB_ARBITER_BP_WRITE_7_dbu_DISABLE                        0
10346
#define GISB_ARBITER_BP_WRITE_7_dbu_ENABLE                         1
10347
10348
/* GISB_ARBITER :: BP_WRITE_7 :: cce [00:00] */
10349
#define GISB_ARBITER_BP_WRITE_7_cce_MASK                           0x00000001
10350
#define GISB_ARBITER_BP_WRITE_7_cce_ALIGN                          0
10351
#define GISB_ARBITER_BP_WRITE_7_cce_BITS                           1
10352
#define GISB_ARBITER_BP_WRITE_7_cce_SHIFT                          0
10353
#define GISB_ARBITER_BP_WRITE_7_cce_DISABLE                        0
10354
#define GISB_ARBITER_BP_WRITE_7_cce_ENABLE                         1
10355
10356
10357
/****************************************************************************
10358
 * GISB_ARBITER :: BP_ENABLE_7
10359
 ***************************************************************************/
10360
/* GISB_ARBITER :: BP_ENABLE_7 :: reserved0 [31:03] */
10361
#define GISB_ARBITER_BP_ENABLE_7_reserved0_MASK                    0xfffffff8
10362
#define GISB_ARBITER_BP_ENABLE_7_reserved0_ALIGN                   0
10363
#define GISB_ARBITER_BP_ENABLE_7_reserved0_BITS                    29
10364
#define GISB_ARBITER_BP_ENABLE_7_reserved0_SHIFT                   3
10365
10366
/* GISB_ARBITER :: BP_ENABLE_7 :: block [02:02] */
10367
#define GISB_ARBITER_BP_ENABLE_7_block_MASK                        0x00000004
10368
#define GISB_ARBITER_BP_ENABLE_7_block_ALIGN                       0
10369
#define GISB_ARBITER_BP_ENABLE_7_block_BITS                        1
10370
#define GISB_ARBITER_BP_ENABLE_7_block_SHIFT                       2
10371
#define GISB_ARBITER_BP_ENABLE_7_block_DISABLE                     0
10372
#define GISB_ARBITER_BP_ENABLE_7_block_ENABLE                      1
10373
10374
/* GISB_ARBITER :: BP_ENABLE_7 :: address [01:01] */
10375
#define GISB_ARBITER_BP_ENABLE_7_address_MASK                      0x00000002
10376
#define GISB_ARBITER_BP_ENABLE_7_address_ALIGN                     0
10377
#define GISB_ARBITER_BP_ENABLE_7_address_BITS                      1
10378
#define GISB_ARBITER_BP_ENABLE_7_address_SHIFT                     1
10379
#define GISB_ARBITER_BP_ENABLE_7_address_DISABLE                   0
10380
#define GISB_ARBITER_BP_ENABLE_7_address_ENABLE                    1
10381
10382
/* GISB_ARBITER :: BP_ENABLE_7 :: access [00:00] */
10383
#define GISB_ARBITER_BP_ENABLE_7_access_MASK                       0x00000001
10384
#define GISB_ARBITER_BP_ENABLE_7_access_ALIGN                      0
10385
#define GISB_ARBITER_BP_ENABLE_7_access_BITS                       1
10386
#define GISB_ARBITER_BP_ENABLE_7_access_SHIFT                      0
10387
#define GISB_ARBITER_BP_ENABLE_7_access_DISABLE                    0
10388
#define GISB_ARBITER_BP_ENABLE_7_access_ENABLE                     1
10389
10390
10391
/****************************************************************************
10392
 * GISB_ARBITER :: BP_CAP_ADDR
10393
 ***************************************************************************/
10394
/* GISB_ARBITER :: BP_CAP_ADDR :: address [31:00] */
10395
#define GISB_ARBITER_BP_CAP_ADDR_address_MASK                      0xffffffff
10396
#define GISB_ARBITER_BP_CAP_ADDR_address_ALIGN                     0
10397
#define GISB_ARBITER_BP_CAP_ADDR_address_BITS                      32
10398
#define GISB_ARBITER_BP_CAP_ADDR_address_SHIFT                     0
10399
10400
10401
/****************************************************************************
10402
 * GISB_ARBITER :: BP_CAP_DATA
10403
 ***************************************************************************/
10404
/* GISB_ARBITER :: BP_CAP_DATA :: data [31:00] */
10405
#define GISB_ARBITER_BP_CAP_DATA_data_MASK                         0xffffffff
10406
#define GISB_ARBITER_BP_CAP_DATA_data_ALIGN                        0
10407
#define GISB_ARBITER_BP_CAP_DATA_data_BITS                         32
10408
#define GISB_ARBITER_BP_CAP_DATA_data_SHIFT                        0
10409
10410
10411
/****************************************************************************
10412
 * GISB_ARBITER :: BP_CAP_STATUS
10413
 ***************************************************************************/
10414
/* GISB_ARBITER :: BP_CAP_STATUS :: reserved0 [31:06] */
10415
#define GISB_ARBITER_BP_CAP_STATUS_reserved0_MASK                  0xffffffc0
10416
#define GISB_ARBITER_BP_CAP_STATUS_reserved0_ALIGN                 0
10417
#define GISB_ARBITER_BP_CAP_STATUS_reserved0_BITS                  26
10418
#define GISB_ARBITER_BP_CAP_STATUS_reserved0_SHIFT                 6
10419
10420
/* GISB_ARBITER :: BP_CAP_STATUS :: bs_b [05:02] */
10421
#define GISB_ARBITER_BP_CAP_STATUS_bs_b_MASK                       0x0000003c
10422
#define GISB_ARBITER_BP_CAP_STATUS_bs_b_ALIGN                      0
10423
#define GISB_ARBITER_BP_CAP_STATUS_bs_b_BITS                       4
10424
#define GISB_ARBITER_BP_CAP_STATUS_bs_b_SHIFT                      2
10425
10426
/* GISB_ARBITER :: BP_CAP_STATUS :: write [01:01] */
10427
#define GISB_ARBITER_BP_CAP_STATUS_write_MASK                      0x00000002
10428
#define GISB_ARBITER_BP_CAP_STATUS_write_ALIGN                     0
10429
#define GISB_ARBITER_BP_CAP_STATUS_write_BITS                      1
10430
#define GISB_ARBITER_BP_CAP_STATUS_write_SHIFT                     1
10431
10432
/* GISB_ARBITER :: BP_CAP_STATUS :: valid [00:00] */
10433
#define GISB_ARBITER_BP_CAP_STATUS_valid_MASK                      0x00000001
10434
#define GISB_ARBITER_BP_CAP_STATUS_valid_ALIGN                     0
10435
#define GISB_ARBITER_BP_CAP_STATUS_valid_BITS                      1
10436
#define GISB_ARBITER_BP_CAP_STATUS_valid_SHIFT                     0
10437
10438
10439
/****************************************************************************
10440
 * GISB_ARBITER :: BP_CAP_MASTER
10441
 ***************************************************************************/
10442
/* GISB_ARBITER :: BP_CAP_MASTER :: reserved0 [31:06] */
10443
#define GISB_ARBITER_BP_CAP_MASTER_reserved0_MASK                  0xffffffc0
10444
#define GISB_ARBITER_BP_CAP_MASTER_reserved0_ALIGN                 0
10445
#define GISB_ARBITER_BP_CAP_MASTER_reserved0_BITS                  26
10446
#define GISB_ARBITER_BP_CAP_MASTER_reserved0_SHIFT                 6
10447
10448
/* GISB_ARBITER :: BP_CAP_MASTER :: bsp [05:05] */
10449
#define GISB_ARBITER_BP_CAP_MASTER_bsp_MASK                        0x00000020
10450
#define GISB_ARBITER_BP_CAP_MASTER_bsp_ALIGN                       0
10451
#define GISB_ARBITER_BP_CAP_MASTER_bsp_BITS                        1
10452
#define GISB_ARBITER_BP_CAP_MASTER_bsp_SHIFT                       5
10453
10454
/* GISB_ARBITER :: BP_CAP_MASTER :: aes [04:04] */
10455
#define GISB_ARBITER_BP_CAP_MASTER_aes_MASK                        0x00000010
10456
#define GISB_ARBITER_BP_CAP_MASTER_aes_ALIGN                       0
10457
#define GISB_ARBITER_BP_CAP_MASTER_aes_BITS                        1
10458
#define GISB_ARBITER_BP_CAP_MASTER_aes_SHIFT                       4
10459
10460
/* GISB_ARBITER :: BP_CAP_MASTER :: fve [03:03] */
10461
#define GISB_ARBITER_BP_CAP_MASTER_fve_MASK                        0x00000008
10462
#define GISB_ARBITER_BP_CAP_MASTER_fve_ALIGN                       0
10463
#define GISB_ARBITER_BP_CAP_MASTER_fve_BITS                        1
10464
#define GISB_ARBITER_BP_CAP_MASTER_fve_SHIFT                       3
10465
10466
/* GISB_ARBITER :: BP_CAP_MASTER :: tgt [02:02] */
10467
#define GISB_ARBITER_BP_CAP_MASTER_tgt_MASK                        0x00000004
10468
#define GISB_ARBITER_BP_CAP_MASTER_tgt_ALIGN                       0
10469
#define GISB_ARBITER_BP_CAP_MASTER_tgt_BITS                        1
10470
#define GISB_ARBITER_BP_CAP_MASTER_tgt_SHIFT                       2
10471
10472
/* GISB_ARBITER :: BP_CAP_MASTER :: dbu [01:01] */
10473
#define GISB_ARBITER_BP_CAP_MASTER_dbu_MASK                        0x00000002
10474
#define GISB_ARBITER_BP_CAP_MASTER_dbu_ALIGN                       0
10475
#define GISB_ARBITER_BP_CAP_MASTER_dbu_BITS                        1
10476
#define GISB_ARBITER_BP_CAP_MASTER_dbu_SHIFT                       1
10477
10478
/* GISB_ARBITER :: BP_CAP_MASTER :: cce [00:00] */
10479
#define GISB_ARBITER_BP_CAP_MASTER_cce_MASK                        0x00000001
10480
#define GISB_ARBITER_BP_CAP_MASTER_cce_ALIGN                       0
10481
#define GISB_ARBITER_BP_CAP_MASTER_cce_BITS                        1
10482
#define GISB_ARBITER_BP_CAP_MASTER_cce_SHIFT                       0
10483
10484
10485
/****************************************************************************
10486
 * GISB_ARBITER :: ERR_CAP_CLR
10487
 ***************************************************************************/
10488
/* GISB_ARBITER :: ERR_CAP_CLR :: reserved0 [31:01] */
10489
#define GISB_ARBITER_ERR_CAP_CLR_reserved0_MASK                    0xfffffffe
10490
#define GISB_ARBITER_ERR_CAP_CLR_reserved0_ALIGN                   0
10491
#define GISB_ARBITER_ERR_CAP_CLR_reserved0_BITS                    31
10492
#define GISB_ARBITER_ERR_CAP_CLR_reserved0_SHIFT                   1
10493
10494
/* GISB_ARBITER :: ERR_CAP_CLR :: clear [00:00] */
10495
#define GISB_ARBITER_ERR_CAP_CLR_clear_MASK                        0x00000001
10496
#define GISB_ARBITER_ERR_CAP_CLR_clear_ALIGN                       0
10497
#define GISB_ARBITER_ERR_CAP_CLR_clear_BITS                        1
10498
#define GISB_ARBITER_ERR_CAP_CLR_clear_SHIFT                       0
10499
10500
10501
/****************************************************************************
10502
 * GISB_ARBITER :: ERR_CAP_ADDR
10503
 ***************************************************************************/
10504
/* GISB_ARBITER :: ERR_CAP_ADDR :: address [31:00] */
10505
#define GISB_ARBITER_ERR_CAP_ADDR_address_MASK                     0xffffffff
10506
#define GISB_ARBITER_ERR_CAP_ADDR_address_ALIGN                    0
10507
#define GISB_ARBITER_ERR_CAP_ADDR_address_BITS                     32
10508
#define GISB_ARBITER_ERR_CAP_ADDR_address_SHIFT                    0
10509
10510
10511
/****************************************************************************
10512
 * GISB_ARBITER :: ERR_CAP_DATA
10513
 ***************************************************************************/
10514
/* GISB_ARBITER :: ERR_CAP_DATA :: data [31:00] */
10515
#define GISB_ARBITER_ERR_CAP_DATA_data_MASK                        0xffffffff
10516
#define GISB_ARBITER_ERR_CAP_DATA_data_ALIGN                       0
10517
#define GISB_ARBITER_ERR_CAP_DATA_data_BITS                        32
10518
#define GISB_ARBITER_ERR_CAP_DATA_data_SHIFT                       0
10519
10520
10521
/****************************************************************************
10522
 * GISB_ARBITER :: ERR_CAP_STATUS
10523
 ***************************************************************************/
10524
/* GISB_ARBITER :: ERR_CAP_STATUS :: reserved0 [31:13] */
10525
#define GISB_ARBITER_ERR_CAP_STATUS_reserved0_MASK                 0xffffe000
10526
#define GISB_ARBITER_ERR_CAP_STATUS_reserved0_ALIGN                0
10527
#define GISB_ARBITER_ERR_CAP_STATUS_reserved0_BITS                 19
10528
#define GISB_ARBITER_ERR_CAP_STATUS_reserved0_SHIFT                13
10529
10530
/* GISB_ARBITER :: ERR_CAP_STATUS :: timeout [12:12] */
10531
#define GISB_ARBITER_ERR_CAP_STATUS_timeout_MASK                   0x00001000
10532
#define GISB_ARBITER_ERR_CAP_STATUS_timeout_ALIGN                  0
10533
#define GISB_ARBITER_ERR_CAP_STATUS_timeout_BITS                   1
10534
#define GISB_ARBITER_ERR_CAP_STATUS_timeout_SHIFT                  12
10535
10536
/* GISB_ARBITER :: ERR_CAP_STATUS :: tea [11:11] */
10537
#define GISB_ARBITER_ERR_CAP_STATUS_tea_MASK                       0x00000800
10538
#define GISB_ARBITER_ERR_CAP_STATUS_tea_ALIGN                      0
10539
#define GISB_ARBITER_ERR_CAP_STATUS_tea_BITS                       1
10540
#define GISB_ARBITER_ERR_CAP_STATUS_tea_SHIFT                      11
10541
10542
/* GISB_ARBITER :: ERR_CAP_STATUS :: reserved1 [10:06] */
10543
#define GISB_ARBITER_ERR_CAP_STATUS_reserved1_MASK                 0x000007c0
10544
#define GISB_ARBITER_ERR_CAP_STATUS_reserved1_ALIGN                0
10545
#define GISB_ARBITER_ERR_CAP_STATUS_reserved1_BITS                 5
10546
#define GISB_ARBITER_ERR_CAP_STATUS_reserved1_SHIFT                6
10547
10548
/* GISB_ARBITER :: ERR_CAP_STATUS :: bs_b [05:02] */
10549
#define GISB_ARBITER_ERR_CAP_STATUS_bs_b_MASK                      0x0000003c
10550
#define GISB_ARBITER_ERR_CAP_STATUS_bs_b_ALIGN                     0
10551
#define GISB_ARBITER_ERR_CAP_STATUS_bs_b_BITS                      4
10552
#define GISB_ARBITER_ERR_CAP_STATUS_bs_b_SHIFT                     2
10553
10554
/* GISB_ARBITER :: ERR_CAP_STATUS :: write [01:01] */
10555
#define GISB_ARBITER_ERR_CAP_STATUS_write_MASK                     0x00000002
10556
#define GISB_ARBITER_ERR_CAP_STATUS_write_ALIGN                    0
10557
#define GISB_ARBITER_ERR_CAP_STATUS_write_BITS                     1
10558
#define GISB_ARBITER_ERR_CAP_STATUS_write_SHIFT                    1
10559
10560
/* GISB_ARBITER :: ERR_CAP_STATUS :: valid [00:00] */
10561
#define GISB_ARBITER_ERR_CAP_STATUS_valid_MASK                     0x00000001
10562
#define GISB_ARBITER_ERR_CAP_STATUS_valid_ALIGN                    0
10563
#define GISB_ARBITER_ERR_CAP_STATUS_valid_BITS                     1
10564
#define GISB_ARBITER_ERR_CAP_STATUS_valid_SHIFT                    0
10565
10566
10567
/****************************************************************************
10568
 * GISB_ARBITER :: ERR_CAP_MASTER
10569
 ***************************************************************************/
10570
/* GISB_ARBITER :: ERR_CAP_MASTER :: reserved0 [31:06] */
10571
#define GISB_ARBITER_ERR_CAP_MASTER_reserved0_MASK                 0xffffffc0
10572
#define GISB_ARBITER_ERR_CAP_MASTER_reserved0_ALIGN                0
10573
#define GISB_ARBITER_ERR_CAP_MASTER_reserved0_BITS                 26
10574
#define GISB_ARBITER_ERR_CAP_MASTER_reserved0_SHIFT                6
10575
10576
/* GISB_ARBITER :: ERR_CAP_MASTER :: bsp [05:05] */
10577
#define GISB_ARBITER_ERR_CAP_MASTER_bsp_MASK                       0x00000020
10578
#define GISB_ARBITER_ERR_CAP_MASTER_bsp_ALIGN                      0
10579
#define GISB_ARBITER_ERR_CAP_MASTER_bsp_BITS                       1
10580
#define GISB_ARBITER_ERR_CAP_MASTER_bsp_SHIFT                      5
10581
10582
/* GISB_ARBITER :: ERR_CAP_MASTER :: aes [04:04] */
10583
#define GISB_ARBITER_ERR_CAP_MASTER_aes_MASK                       0x00000010
10584
#define GISB_ARBITER_ERR_CAP_MASTER_aes_ALIGN                      0
10585
#define GISB_ARBITER_ERR_CAP_MASTER_aes_BITS                       1
10586
#define GISB_ARBITER_ERR_CAP_MASTER_aes_SHIFT                      4
10587
10588
/* GISB_ARBITER :: ERR_CAP_MASTER :: fve [03:03] */
10589
#define GISB_ARBITER_ERR_CAP_MASTER_fve_MASK                       0x00000008
10590
#define GISB_ARBITER_ERR_CAP_MASTER_fve_ALIGN                      0
10591
#define GISB_ARBITER_ERR_CAP_MASTER_fve_BITS                       1
10592
#define GISB_ARBITER_ERR_CAP_MASTER_fve_SHIFT                      3
10593
10594
/* GISB_ARBITER :: ERR_CAP_MASTER :: tgt [02:02] */
10595
#define GISB_ARBITER_ERR_CAP_MASTER_tgt_MASK                       0x00000004
10596
#define GISB_ARBITER_ERR_CAP_MASTER_tgt_ALIGN                      0
10597
#define GISB_ARBITER_ERR_CAP_MASTER_tgt_BITS                       1
10598
#define GISB_ARBITER_ERR_CAP_MASTER_tgt_SHIFT                      2
10599
10600
/* GISB_ARBITER :: ERR_CAP_MASTER :: dbu [01:01] */
10601
#define GISB_ARBITER_ERR_CAP_MASTER_dbu_MASK                       0x00000002
10602
#define GISB_ARBITER_ERR_CAP_MASTER_dbu_ALIGN                      0
10603
#define GISB_ARBITER_ERR_CAP_MASTER_dbu_BITS                       1
10604
#define GISB_ARBITER_ERR_CAP_MASTER_dbu_SHIFT                      1
10605
10606
/* GISB_ARBITER :: ERR_CAP_MASTER :: cce [00:00] */
10607
#define GISB_ARBITER_ERR_CAP_MASTER_cce_MASK                       0x00000001
10608
#define GISB_ARBITER_ERR_CAP_MASTER_cce_ALIGN                      0
10609
#define GISB_ARBITER_ERR_CAP_MASTER_cce_BITS                       1
10610
#define GISB_ARBITER_ERR_CAP_MASTER_cce_SHIFT                      0
10611
10612
10613
/****************************************************************************
10614
 * BCM70012_MISC_TOP_MISC_GR_BRIDGE
10615
 ***************************************************************************/
10616
/****************************************************************************
10617
 * MISC_GR_BRIDGE :: REVISION
10618
 ***************************************************************************/
10619
/* MISC_GR_BRIDGE :: REVISION :: reserved0 [31:16] */
10620
#define MISC_GR_BRIDGE_REVISION_reserved0_MASK                     0xffff0000
10621
#define MISC_GR_BRIDGE_REVISION_reserved0_ALIGN                    0
10622
#define MISC_GR_BRIDGE_REVISION_reserved0_BITS                     16
10623
#define MISC_GR_BRIDGE_REVISION_reserved0_SHIFT                    16
10624
10625
/* MISC_GR_BRIDGE :: REVISION :: MAJOR [15:08] */
10626
#define MISC_GR_BRIDGE_REVISION_MAJOR_MASK                         0x0000ff00
10627
#define MISC_GR_BRIDGE_REVISION_MAJOR_ALIGN                        0
10628
#define MISC_GR_BRIDGE_REVISION_MAJOR_BITS                         8
10629
#define MISC_GR_BRIDGE_REVISION_MAJOR_SHIFT                        8
10630
10631
/* MISC_GR_BRIDGE :: REVISION :: MINOR [07:00] */
10632
#define MISC_GR_BRIDGE_REVISION_MINOR_MASK                         0x000000ff
10633
#define MISC_GR_BRIDGE_REVISION_MINOR_ALIGN                        0
10634
#define MISC_GR_BRIDGE_REVISION_MINOR_BITS                         8
10635
#define MISC_GR_BRIDGE_REVISION_MINOR_SHIFT                        0
10636
10637
10638
/****************************************************************************
10639
 * MISC_GR_BRIDGE :: CTRL
10640
 ***************************************************************************/
10641
/* MISC_GR_BRIDGE :: CTRL :: reserved0 [31:01] */
10642
#define MISC_GR_BRIDGE_CTRL_reserved0_MASK                         0xfffffffe
10643
#define MISC_GR_BRIDGE_CTRL_reserved0_ALIGN                        0
10644
#define MISC_GR_BRIDGE_CTRL_reserved0_BITS                         31
10645
#define MISC_GR_BRIDGE_CTRL_reserved0_SHIFT                        1
10646
10647
/* MISC_GR_BRIDGE :: CTRL :: gisb_error_intr [00:00] */
10648
#define MISC_GR_BRIDGE_CTRL_gisb_error_intr_MASK                   0x00000001
10649
#define MISC_GR_BRIDGE_CTRL_gisb_error_intr_ALIGN                  0
10650
#define MISC_GR_BRIDGE_CTRL_gisb_error_intr_BITS                   1
10651
#define MISC_GR_BRIDGE_CTRL_gisb_error_intr_SHIFT                  0
10652
#define MISC_GR_BRIDGE_CTRL_gisb_error_intr_INTR_DISABLE           0
10653
#define MISC_GR_BRIDGE_CTRL_gisb_error_intr_INTR_ENABLE            1
10654
10655
10656
/****************************************************************************
10657
 * MISC_GR_BRIDGE :: SPARE_SW_RESET_0
10658
 ***************************************************************************/
10659
/* MISC_GR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */
10660
#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK             0xfffffffe
10661
#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN            0
10662
#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS             31
10663
#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT            1
10664
10665
/* MISC_GR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */
10666
#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK        0x00000001
10667
#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN       0
10668
#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS        1
10669
#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT       0
10670
#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_DEASSERT    0
10671
#define MISC_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ASSERT      1
10672
10673
10674
/****************************************************************************
10675
 * MISC_GR_BRIDGE :: SPARE_SW_RESET_1
10676
 ***************************************************************************/
10677
/* MISC_GR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */
10678
#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK             0xfffffffe
10679
#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN            0
10680
#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS             31
10681
#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT            1
10682
10683
/* MISC_GR_BRIDGE :: SPARE_SW_RESET_1 :: SPARE_SW_RESET [00:00] */
10684
#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_MASK        0x00000001
10685
#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ALIGN       0
10686
#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_BITS        1
10687
#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_SHIFT       0
10688
#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_DEASSERT    0
10689
#define MISC_GR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ASSERT      1
10690
10691
10692
/****************************************************************************
10693
 * BCM70012_DBU_TOP_DBU
10694
 ***************************************************************************/
10695
/****************************************************************************
10696
 * DBU :: DBU_CMD
10697
 ***************************************************************************/
10698
/* DBU :: DBU_CMD :: reserved0 [31:03] */
10699
#define DBU_DBU_CMD_reserved0_MASK                                 0xfffffff8
10700
#define DBU_DBU_CMD_reserved0_ALIGN                                0
10701
#define DBU_DBU_CMD_reserved0_BITS                                 29
10702
#define DBU_DBU_CMD_reserved0_SHIFT                                3
10703
10704
/* DBU :: DBU_CMD :: RX_OVERFLOW [02:02] */
10705
#define DBU_DBU_CMD_RX_OVERFLOW_MASK                               0x00000004
10706
#define DBU_DBU_CMD_RX_OVERFLOW_ALIGN                              0
10707
#define DBU_DBU_CMD_RX_OVERFLOW_BITS                               1
10708
#define DBU_DBU_CMD_RX_OVERFLOW_SHIFT                              2
10709
10710
/* DBU :: DBU_CMD :: RX_ERROR [01:01] */
10711
#define DBU_DBU_CMD_RX_ERROR_MASK                                  0x00000002
10712
#define DBU_DBU_CMD_RX_ERROR_ALIGN                                 0
10713
#define DBU_DBU_CMD_RX_ERROR_BITS                                  1
10714
#define DBU_DBU_CMD_RX_ERROR_SHIFT                                 1
10715
10716
/* DBU :: DBU_CMD :: ENABLE [00:00] */
10717
#define DBU_DBU_CMD_ENABLE_MASK                                    0x00000001
10718
#define DBU_DBU_CMD_ENABLE_ALIGN                                   0
10719
#define DBU_DBU_CMD_ENABLE_BITS                                    1
10720
#define DBU_DBU_CMD_ENABLE_SHIFT                                   0
10721
10722
10723
/****************************************************************************
10724
 * DBU :: DBU_STATUS
10725
 ***************************************************************************/
10726
/* DBU :: DBU_STATUS :: reserved0 [31:02] */
10727
#define DBU_DBU_STATUS_reserved0_MASK                              0xfffffffc
10728
#define DBU_DBU_STATUS_reserved0_ALIGN                             0
10729
#define DBU_DBU_STATUS_reserved0_BITS                              30
10730
#define DBU_DBU_STATUS_reserved0_SHIFT                             2
10731
10732
/* DBU :: DBU_STATUS :: TXDATA_OCCUPIED [01:01] */
10733
#define DBU_DBU_STATUS_TXDATA_OCCUPIED_MASK                        0x00000002
10734
#define DBU_DBU_STATUS_TXDATA_OCCUPIED_ALIGN                       0
10735
#define DBU_DBU_STATUS_TXDATA_OCCUPIED_BITS                        1
10736
#define DBU_DBU_STATUS_TXDATA_OCCUPIED_SHIFT                       1
10737
10738
/* DBU :: DBU_STATUS :: RXDATA_VALID [00:00] */
10739
#define DBU_DBU_STATUS_RXDATA_VALID_MASK                           0x00000001
10740
#define DBU_DBU_STATUS_RXDATA_VALID_ALIGN                          0
10741
#define DBU_DBU_STATUS_RXDATA_VALID_BITS                           1
10742
#define DBU_DBU_STATUS_RXDATA_VALID_SHIFT                          0
10743
10744
10745
/****************************************************************************
10746
 * DBU :: DBU_CONFIG
10747
 ***************************************************************************/
10748
/* DBU :: DBU_CONFIG :: reserved0 [31:03] */
10749
#define DBU_DBU_CONFIG_reserved0_MASK                              0xfffffff8
10750
#define DBU_DBU_CONFIG_reserved0_ALIGN                             0
10751
#define DBU_DBU_CONFIG_reserved0_BITS                              29
10752
#define DBU_DBU_CONFIG_reserved0_SHIFT                             3
10753
10754
/* DBU :: DBU_CONFIG :: CRLF_ENABLE [02:02] */
10755
#define DBU_DBU_CONFIG_CRLF_ENABLE_MASK                            0x00000004
10756
#define DBU_DBU_CONFIG_CRLF_ENABLE_ALIGN                           0
10757
#define DBU_DBU_CONFIG_CRLF_ENABLE_BITS                            1
10758
#define DBU_DBU_CONFIG_CRLF_ENABLE_SHIFT                           2
10759
10760
/* DBU :: DBU_CONFIG :: DEBUGSM_ENABLE [01:01] */
10761
#define DBU_DBU_CONFIG_DEBUGSM_ENABLE_MASK                         0x00000002
10762
#define DBU_DBU_CONFIG_DEBUGSM_ENABLE_ALIGN                        0
10763
#define DBU_DBU_CONFIG_DEBUGSM_ENABLE_BITS                         1
10764
#define DBU_DBU_CONFIG_DEBUGSM_ENABLE_SHIFT                        1
10765
10766
/* DBU :: DBU_CONFIG :: TIMING_OVERRIDE [00:00] */
10767
#define DBU_DBU_CONFIG_TIMING_OVERRIDE_MASK                        0x00000001
10768
#define DBU_DBU_CONFIG_TIMING_OVERRIDE_ALIGN                       0
10769
#define DBU_DBU_CONFIG_TIMING_OVERRIDE_BITS                        1
10770
#define DBU_DBU_CONFIG_TIMING_OVERRIDE_SHIFT                       0
10771
10772
10773
/****************************************************************************
10774
 * DBU :: DBU_TIMING
10775
 ***************************************************************************/
10776
/* DBU :: DBU_TIMING :: BIT_INTERVAL [31:16] */
10777
#define DBU_DBU_TIMING_BIT_INTERVAL_MASK                           0xffff0000
10778
#define DBU_DBU_TIMING_BIT_INTERVAL_ALIGN                          0
10779
#define DBU_DBU_TIMING_BIT_INTERVAL_BITS                           16
10780
#define DBU_DBU_TIMING_BIT_INTERVAL_SHIFT                          16
10781
10782
/* DBU :: DBU_TIMING :: FB_SMPL_OFFSET [15:00] */
10783
#define DBU_DBU_TIMING_FB_SMPL_OFFSET_MASK                         0x0000ffff
10784
#define DBU_DBU_TIMING_FB_SMPL_OFFSET_ALIGN                        0
10785
#define DBU_DBU_TIMING_FB_SMPL_OFFSET_BITS                         16
10786
#define DBU_DBU_TIMING_FB_SMPL_OFFSET_SHIFT                        0
10787
10788
10789
/****************************************************************************
10790
 * DBU :: DBU_RXDATA
10791
 ***************************************************************************/
10792
/* DBU :: DBU_RXDATA :: reserved0 [31:09] */
10793
#define DBU_DBU_RXDATA_reserved0_MASK                              0xfffffe00
10794
#define DBU_DBU_RXDATA_reserved0_ALIGN                             0
10795
#define DBU_DBU_RXDATA_reserved0_BITS                              23
10796
#define DBU_DBU_RXDATA_reserved0_SHIFT                             9
10797
10798
/* DBU :: DBU_RXDATA :: ERROR [08:08] */
10799
#define DBU_DBU_RXDATA_ERROR_MASK                                  0x00000100
10800
#define DBU_DBU_RXDATA_ERROR_ALIGN                                 0
10801
#define DBU_DBU_RXDATA_ERROR_BITS                                  1
10802
#define DBU_DBU_RXDATA_ERROR_SHIFT                                 8
10803
10804
/* DBU :: DBU_RXDATA :: VALUE [07:00] */
10805
#define DBU_DBU_RXDATA_VALUE_MASK                                  0x000000ff
10806
#define DBU_DBU_RXDATA_VALUE_ALIGN                                 0
10807
#define DBU_DBU_RXDATA_VALUE_BITS                                  8
10808
#define DBU_DBU_RXDATA_VALUE_SHIFT                                 0
10809
10810
10811
/****************************************************************************
10812
 * DBU :: DBU_TXDATA
10813
 ***************************************************************************/
10814
/* DBU :: DBU_TXDATA :: reserved0 [31:08] */
10815
#define DBU_DBU_TXDATA_reserved0_MASK                              0xffffff00
10816
#define DBU_DBU_TXDATA_reserved0_ALIGN                             0
10817
#define DBU_DBU_TXDATA_reserved0_BITS                              24
10818
#define DBU_DBU_TXDATA_reserved0_SHIFT                             8
10819
10820
/* DBU :: DBU_TXDATA :: VALUE [07:00] */
10821
#define DBU_DBU_TXDATA_VALUE_MASK                                  0x000000ff
10822
#define DBU_DBU_TXDATA_VALUE_ALIGN                                 0
10823
#define DBU_DBU_TXDATA_VALUE_BITS                                  8
10824
#define DBU_DBU_TXDATA_VALUE_SHIFT                                 0
10825
10826
10827
/****************************************************************************
10828
 * BCM70012_DBU_TOP_DBU_RGR_BRIDGE
10829
 ***************************************************************************/
10830
/****************************************************************************
10831
 * DBU_RGR_BRIDGE :: REVISION
10832
 ***************************************************************************/
10833
/* DBU_RGR_BRIDGE :: REVISION :: reserved0 [31:16] */
10834
#define DBU_RGR_BRIDGE_REVISION_reserved0_MASK                     0xffff0000
10835
#define DBU_RGR_BRIDGE_REVISION_reserved0_ALIGN                    0
10836
#define DBU_RGR_BRIDGE_REVISION_reserved0_BITS                     16
10837
#define DBU_RGR_BRIDGE_REVISION_reserved0_SHIFT                    16
10838
10839
/* DBU_RGR_BRIDGE :: REVISION :: MAJOR [15:08] */
10840
#define DBU_RGR_BRIDGE_REVISION_MAJOR_MASK                         0x0000ff00
10841
#define DBU_RGR_BRIDGE_REVISION_MAJOR_ALIGN                        0
10842
#define DBU_RGR_BRIDGE_REVISION_MAJOR_BITS                         8
10843
#define DBU_RGR_BRIDGE_REVISION_MAJOR_SHIFT                        8
10844
10845
/* DBU_RGR_BRIDGE :: REVISION :: MINOR [07:00] */
10846
#define DBU_RGR_BRIDGE_REVISION_MINOR_MASK                         0x000000ff
10847
#define DBU_RGR_BRIDGE_REVISION_MINOR_ALIGN                        0
10848
#define DBU_RGR_BRIDGE_REVISION_MINOR_BITS                         8
10849
#define DBU_RGR_BRIDGE_REVISION_MINOR_SHIFT                        0
10850
10851
10852
/****************************************************************************
10853
 * DBU_RGR_BRIDGE :: CTRL
10854
 ***************************************************************************/
10855
/* DBU_RGR_BRIDGE :: CTRL :: reserved0 [31:02] */
10856
#define DBU_RGR_BRIDGE_CTRL_reserved0_MASK                         0xfffffffc
10857
#define DBU_RGR_BRIDGE_CTRL_reserved0_ALIGN                        0
10858
#define DBU_RGR_BRIDGE_CTRL_reserved0_BITS                         30
10859
#define DBU_RGR_BRIDGE_CTRL_reserved0_SHIFT                        2
10860
10861
/* DBU_RGR_BRIDGE :: CTRL :: rbus_error_intr [01:01] */
10862
#define DBU_RGR_BRIDGE_CTRL_rbus_error_intr_MASK                   0x00000002
10863
#define DBU_RGR_BRIDGE_CTRL_rbus_error_intr_ALIGN                  0
10864
#define DBU_RGR_BRIDGE_CTRL_rbus_error_intr_BITS                   1
10865
#define DBU_RGR_BRIDGE_CTRL_rbus_error_intr_SHIFT                  1
10866
#define DBU_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_DISABLE           0
10867
#define DBU_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_ENABLE            1
10868
10869
/* DBU_RGR_BRIDGE :: CTRL :: gisb_error_intr [00:00] */
10870
#define DBU_RGR_BRIDGE_CTRL_gisb_error_intr_MASK                   0x00000001
10871
#define DBU_RGR_BRIDGE_CTRL_gisb_error_intr_ALIGN                  0
10872
#define DBU_RGR_BRIDGE_CTRL_gisb_error_intr_BITS                   1
10873
#define DBU_RGR_BRIDGE_CTRL_gisb_error_intr_SHIFT                  0
10874
#define DBU_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_DISABLE           0
10875
#define DBU_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_ENABLE            1
10876
10877
10878
/****************************************************************************
10879
 * DBU_RGR_BRIDGE :: RBUS_TIMER
10880
 ***************************************************************************/
10881
/* DBU_RGR_BRIDGE :: RBUS_TIMER :: reserved0 [31:16] */
10882
#define DBU_RGR_BRIDGE_RBUS_TIMER_reserved0_MASK                   0xffff0000
10883
#define DBU_RGR_BRIDGE_RBUS_TIMER_reserved0_ALIGN                  0
10884
#define DBU_RGR_BRIDGE_RBUS_TIMER_reserved0_BITS                   16
10885
#define DBU_RGR_BRIDGE_RBUS_TIMER_reserved0_SHIFT                  16
10886
10887
/* DBU_RGR_BRIDGE :: RBUS_TIMER :: timer_value [15:00] */
10888
#define DBU_RGR_BRIDGE_RBUS_TIMER_timer_value_MASK                 0x0000ffff
10889
#define DBU_RGR_BRIDGE_RBUS_TIMER_timer_value_ALIGN                0
10890
#define DBU_RGR_BRIDGE_RBUS_TIMER_timer_value_BITS                 16
10891
#define DBU_RGR_BRIDGE_RBUS_TIMER_timer_value_SHIFT                0
10892
10893
10894
/****************************************************************************
10895
 * DBU_RGR_BRIDGE :: SPARE_SW_RESET_0
10896
 ***************************************************************************/
10897
/* DBU_RGR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */
10898
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK             0xfffffffe
10899
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN            0
10900
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS             31
10901
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT            1
10902
10903
/* DBU_RGR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */
10904
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK        0x00000001
10905
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN       0
10906
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS        1
10907
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT       0
10908
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_DEASSERT    0
10909
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ASSERT      1
10910
10911
10912
/****************************************************************************
10913
 * DBU_RGR_BRIDGE :: SPARE_SW_RESET_1
10914
 ***************************************************************************/
10915
/* DBU_RGR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */
10916
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK             0xfffffffe
10917
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN            0
10918
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS             31
10919
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT            1
10920
10921
/* DBU_RGR_BRIDGE :: SPARE_SW_RESET_1 :: SPARE_SW_RESET [00:00] */
10922
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_MASK        0x00000001
10923
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ALIGN       0
10924
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_BITS        1
10925
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_SHIFT       0
10926
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_DEASSERT    0
10927
#define DBU_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ASSERT      1
10928
10929
10930
/****************************************************************************
10931
 * BCM70012_OTP_TOP_OTP
10932
 ***************************************************************************/
10933
/****************************************************************************
10934
 * OTP :: CONFIG_INFO
10935
 ***************************************************************************/
10936
/* OTP :: CONFIG_INFO :: reserved0 [31:22] */
10937
#define OTP_CONFIG_INFO_reserved0_MASK                             0xffc00000
10938
#define OTP_CONFIG_INFO_reserved0_ALIGN                            0
10939
#define OTP_CONFIG_INFO_reserved0_BITS                             10
10940
#define OTP_CONFIG_INFO_reserved0_SHIFT                            22
10941
10942
/* OTP :: CONFIG_INFO :: SELVL [21:20] */
10943
#define OTP_CONFIG_INFO_SELVL_MASK                                 0x00300000
10944
#define OTP_CONFIG_INFO_SELVL_ALIGN                                0
10945
#define OTP_CONFIG_INFO_SELVL_BITS                                 2
10946
#define OTP_CONFIG_INFO_SELVL_SHIFT                                20
10947
10948
/* OTP :: CONFIG_INFO :: reserved1 [19:17] */
10949
#define OTP_CONFIG_INFO_reserved1_MASK                             0x000e0000
10950
#define OTP_CONFIG_INFO_reserved1_ALIGN                            0
10951
#define OTP_CONFIG_INFO_reserved1_BITS                             3
10952
#define OTP_CONFIG_INFO_reserved1_SHIFT                            17
10953
10954
/* OTP :: CONFIG_INFO :: PTEST [16:16] */
10955
#define OTP_CONFIG_INFO_PTEST_MASK                                 0x00010000
10956
#define OTP_CONFIG_INFO_PTEST_ALIGN                                0
10957
#define OTP_CONFIG_INFO_PTEST_BITS                                 1
10958
#define OTP_CONFIG_INFO_PTEST_SHIFT                                16
10959
10960
/* OTP :: CONFIG_INFO :: reserved2 [15:13] */
10961
#define OTP_CONFIG_INFO_reserved2_MASK                             0x0000e000
10962
#define OTP_CONFIG_INFO_reserved2_ALIGN                            0
10963
#define OTP_CONFIG_INFO_reserved2_BITS                             3
10964
#define OTP_CONFIG_INFO_reserved2_SHIFT                            13
10965
10966
/* OTP :: CONFIG_INFO :: MAX_REDUNDANT_ROWS [12:08] */
10967
#define OTP_CONFIG_INFO_MAX_REDUNDANT_ROWS_MASK                    0x00001f00
10968
#define OTP_CONFIG_INFO_MAX_REDUNDANT_ROWS_ALIGN                   0
10969
#define OTP_CONFIG_INFO_MAX_REDUNDANT_ROWS_BITS                    5
10970
#define OTP_CONFIG_INFO_MAX_REDUNDANT_ROWS_SHIFT                   8
10971
10972
/* OTP :: CONFIG_INFO :: MAX_RETRY [07:04] */
10973
#define OTP_CONFIG_INFO_MAX_RETRY_MASK                             0x000000f0
10974
#define OTP_CONFIG_INFO_MAX_RETRY_ALIGN                            0
10975
#define OTP_CONFIG_INFO_MAX_RETRY_BITS                             4
10976
#define OTP_CONFIG_INFO_MAX_RETRY_SHIFT                            4
10977
10978
/* OTP :: CONFIG_INFO :: reserved3 [03:01] */
10979
#define OTP_CONFIG_INFO_reserved3_MASK                             0x0000000e
10980
#define OTP_CONFIG_INFO_reserved3_ALIGN                            0
10981
#define OTP_CONFIG_INFO_reserved3_BITS                             3
10982
#define OTP_CONFIG_INFO_reserved3_SHIFT                            1
10983
10984
/* OTP :: CONFIG_INFO :: PROG_MODE [00:00] */
10985
#define OTP_CONFIG_INFO_PROG_MODE_MASK                             0x00000001
10986
#define OTP_CONFIG_INFO_PROG_MODE_ALIGN                            0
10987
#define OTP_CONFIG_INFO_PROG_MODE_BITS                             1
10988
#define OTP_CONFIG_INFO_PROG_MODE_SHIFT                            0
10989
10990
10991
/****************************************************************************
10992
 * OTP :: CMD
10993
 ***************************************************************************/
10994
/* OTP :: CMD :: reserved0 [31:02] */
10995
#define OTP_CMD_reserved0_MASK                                     0xfffffffc
10996
#define OTP_CMD_reserved0_ALIGN                                    0
10997
#define OTP_CMD_reserved0_BITS                                     30
10998
#define OTP_CMD_reserved0_SHIFT                                    2
10999
11000
/* OTP :: CMD :: KEYS_AVAIL [01:01] */
11001
#define OTP_CMD_KEYS_AVAIL_MASK                                    0x00000002
11002
#define OTP_CMD_KEYS_AVAIL_ALIGN                                   0
11003
#define OTP_CMD_KEYS_AVAIL_BITS                                    1
11004
#define OTP_CMD_KEYS_AVAIL_SHIFT                                   1
11005
11006
/* OTP :: CMD :: PROGRAM_OTP [00:00] */
11007
#define OTP_CMD_PROGRAM_OTP_MASK                                   0x00000001
11008
#define OTP_CMD_PROGRAM_OTP_ALIGN                                  0
11009
#define OTP_CMD_PROGRAM_OTP_BITS                                   1
11010
#define OTP_CMD_PROGRAM_OTP_SHIFT                                  0
11011
11012
11013
/****************************************************************************
11014
 * OTP :: STATUS
11015
 ***************************************************************************/
11016
/* OTP :: STATUS :: reserved0 [31:30] */
11017
#define OTP_STATUS_reserved0_MASK                                  0xc0000000
11018
#define OTP_STATUS_reserved0_ALIGN                                 0
11019
#define OTP_STATUS_reserved0_BITS                                  2
11020
#define OTP_STATUS_reserved0_SHIFT                                 30
11021
11022
/* OTP :: STATUS :: TOTAL_RETRIES [29:17] */
11023
#define OTP_STATUS_TOTAL_RETRIES_MASK                              0x3ffe0000
11024
#define OTP_STATUS_TOTAL_RETRIES_ALIGN                             0
11025
#define OTP_STATUS_TOTAL_RETRIES_BITS                              13
11026
#define OTP_STATUS_TOTAL_RETRIES_SHIFT                             17
11027
11028
/* OTP :: STATUS :: ROWS_USED [16:12] */
11029
#define OTP_STATUS_ROWS_USED_MASK                                  0x0001f000
11030
#define OTP_STATUS_ROWS_USED_ALIGN                                 0
11031
#define OTP_STATUS_ROWS_USED_BITS                                  5
11032
#define OTP_STATUS_ROWS_USED_SHIFT                                 12
11033
11034
/* OTP :: STATUS :: MAX_RETRIES [11:08] */
11035
#define OTP_STATUS_MAX_RETRIES_MASK                                0x00000f00
11036
#define OTP_STATUS_MAX_RETRIES_ALIGN                               0
11037
#define OTP_STATUS_MAX_RETRIES_BITS                                4
11038
#define OTP_STATUS_MAX_RETRIES_SHIFT                               8
11039
11040
/* OTP :: STATUS :: PROG_STATUS [07:04] */
11041
#define OTP_STATUS_PROG_STATUS_MASK                                0x000000f0
11042
#define OTP_STATUS_PROG_STATUS_ALIGN                               0
11043
#define OTP_STATUS_PROG_STATUS_BITS                                4
11044
#define OTP_STATUS_PROG_STATUS_SHIFT                               4
11045
11046
/* OTP :: STATUS :: reserved1 [03:03] */
11047
#define OTP_STATUS_reserved1_MASK                                  0x00000008
11048
#define OTP_STATUS_reserved1_ALIGN                                 0
11049
#define OTP_STATUS_reserved1_BITS                                  1
11050
#define OTP_STATUS_reserved1_SHIFT                                 3
11051
11052
/* OTP :: STATUS :: CHECKSUM_MISMATCH [02:02] */
11053
#define OTP_STATUS_CHECKSUM_MISMATCH_MASK                          0x00000004
11054
#define OTP_STATUS_CHECKSUM_MISMATCH_ALIGN                         0
11055
#define OTP_STATUS_CHECKSUM_MISMATCH_BITS                          1
11056
#define OTP_STATUS_CHECKSUM_MISMATCH_SHIFT                         2
11057
11058
/* OTP :: STATUS :: INSUFFICIENT_ROWS [01:01] */
11059
#define OTP_STATUS_INSUFFICIENT_ROWS_MASK                          0x00000002
11060
#define OTP_STATUS_INSUFFICIENT_ROWS_ALIGN                         0
11061
#define OTP_STATUS_INSUFFICIENT_ROWS_BITS                          1
11062
#define OTP_STATUS_INSUFFICIENT_ROWS_SHIFT                         1
11063
11064
/* OTP :: STATUS :: PROGRAMMED [00:00] */
11065
#define OTP_STATUS_PROGRAMMED_MASK                                 0x00000001
11066
#define OTP_STATUS_PROGRAMMED_ALIGN                                0
11067
#define OTP_STATUS_PROGRAMMED_BITS                                 1
11068
#define OTP_STATUS_PROGRAMMED_SHIFT                                0
11069
11070
11071
/****************************************************************************
11072
 * OTP :: CONTENT_MISC
11073
 ***************************************************************************/
11074
/* OTP :: CONTENT_MISC :: reserved0 [31:06] */
11075
#define OTP_CONTENT_MISC_reserved0_MASK                            0xffffffc0
11076
#define OTP_CONTENT_MISC_reserved0_ALIGN                           0
11077
#define OTP_CONTENT_MISC_reserved0_BITS                            26
11078
#define OTP_CONTENT_MISC_reserved0_SHIFT                           6
11079
11080
/* OTP :: CONTENT_MISC :: DCI_SECURITY_ENABLE [05:05] */
11081
#define OTP_CONTENT_MISC_DCI_SECURITY_ENABLE_MASK                  0x00000020
11082
#define OTP_CONTENT_MISC_DCI_SECURITY_ENABLE_ALIGN                 0
11083
#define OTP_CONTENT_MISC_DCI_SECURITY_ENABLE_BITS                  1
11084
#define OTP_CONTENT_MISC_DCI_SECURITY_ENABLE_SHIFT                 5
11085
11086
/* OTP :: CONTENT_MISC :: AES_SECURITY_ENABLE [04:04] */
11087
#define OTP_CONTENT_MISC_AES_SECURITY_ENABLE_MASK                  0x00000010
11088
#define OTP_CONTENT_MISC_AES_SECURITY_ENABLE_ALIGN                 0
11089
#define OTP_CONTENT_MISC_AES_SECURITY_ENABLE_BITS                  1
11090
#define OTP_CONTENT_MISC_AES_SECURITY_ENABLE_SHIFT                 4
11091
11092
/* OTP :: CONTENT_MISC :: DISABLE_JTAG [03:03] */
11093
#define OTP_CONTENT_MISC_DISABLE_JTAG_MASK                         0x00000008
11094
#define OTP_CONTENT_MISC_DISABLE_JTAG_ALIGN                        0
11095
#define OTP_CONTENT_MISC_DISABLE_JTAG_BITS                         1
11096
#define OTP_CONTENT_MISC_DISABLE_JTAG_SHIFT                        3
11097
11098
/* OTP :: CONTENT_MISC :: DISABLE_UART [02:02] */
11099
#define OTP_CONTENT_MISC_DISABLE_UART_MASK                         0x00000004
11100
#define OTP_CONTENT_MISC_DISABLE_UART_ALIGN                        0
11101
#define OTP_CONTENT_MISC_DISABLE_UART_BITS                         1
11102
#define OTP_CONTENT_MISC_DISABLE_UART_SHIFT                        2
11103
11104
/* OTP :: CONTENT_MISC :: ENABLE_RANDOMIZATION [01:01] */
11105
#define OTP_CONTENT_MISC_ENABLE_RANDOMIZATION_MASK                 0x00000002
11106
#define OTP_CONTENT_MISC_ENABLE_RANDOMIZATION_ALIGN                0
11107
#define OTP_CONTENT_MISC_ENABLE_RANDOMIZATION_BITS                 1
11108
#define OTP_CONTENT_MISC_ENABLE_RANDOMIZATION_SHIFT                1
11109
11110
/* OTP :: CONTENT_MISC :: OTP_SECURITY_ENABLE [00:00] */
11111
#define OTP_CONTENT_MISC_OTP_SECURITY_ENABLE_MASK                  0x00000001
11112
#define OTP_CONTENT_MISC_OTP_SECURITY_ENABLE_ALIGN                 0
11113
#define OTP_CONTENT_MISC_OTP_SECURITY_ENABLE_BITS                  1
11114
#define OTP_CONTENT_MISC_OTP_SECURITY_ENABLE_SHIFT                 0
11115
11116
11117
/****************************************************************************
11118
 * OTP :: CONTENT_AES_0
11119
 ***************************************************************************/
11120
/* OTP :: CONTENT_AES_0 :: AES_KEY_0 [31:00] */
11121
#define OTP_CONTENT_AES_0_AES_KEY_0_MASK                           0xffffffff
11122
#define OTP_CONTENT_AES_0_AES_KEY_0_ALIGN                          0
11123
#define OTP_CONTENT_AES_0_AES_KEY_0_BITS                           32
11124
#define OTP_CONTENT_AES_0_AES_KEY_0_SHIFT                          0
11125
11126
11127
/****************************************************************************
11128
 * OTP :: CONTENT_AES_1
11129
 ***************************************************************************/
11130
/* OTP :: CONTENT_AES_1 :: AES_KEY_1 [31:00] */
11131
#define OTP_CONTENT_AES_1_AES_KEY_1_MASK                           0xffffffff
11132
#define OTP_CONTENT_AES_1_AES_KEY_1_ALIGN                          0
11133
#define OTP_CONTENT_AES_1_AES_KEY_1_BITS                           32
11134
#define OTP_CONTENT_AES_1_AES_KEY_1_SHIFT                          0
11135
11136
11137
/****************************************************************************
11138
 * OTP :: CONTENT_AES_2
11139
 ***************************************************************************/
11140
/* OTP :: CONTENT_AES_2 :: AES_KEY_2 [31:00] */
11141
#define OTP_CONTENT_AES_2_AES_KEY_2_MASK                           0xffffffff
11142
#define OTP_CONTENT_AES_2_AES_KEY_2_ALIGN                          0
11143
#define OTP_CONTENT_AES_2_AES_KEY_2_BITS                           32
11144
#define OTP_CONTENT_AES_2_AES_KEY_2_SHIFT                          0
11145
11146
11147
/****************************************************************************
11148
 * OTP :: CONTENT_AES_3
11149
 ***************************************************************************/
11150
/* OTP :: CONTENT_AES_3 :: AES_KEY_3 [31:00] */
11151
#define OTP_CONTENT_AES_3_AES_KEY_3_MASK                           0xffffffff
11152
#define OTP_CONTENT_AES_3_AES_KEY_3_ALIGN                          0
11153
#define OTP_CONTENT_AES_3_AES_KEY_3_BITS                           32
11154
#define OTP_CONTENT_AES_3_AES_KEY_3_SHIFT                          0
11155
11156
11157
/****************************************************************************
11158
 * OTP :: CONTENT_SHA_0
11159
 ***************************************************************************/
11160
/* OTP :: CONTENT_SHA_0 :: SHA_KEY_0 [31:00] */
11161
#define OTP_CONTENT_SHA_0_SHA_KEY_0_MASK                           0xffffffff
11162
#define OTP_CONTENT_SHA_0_SHA_KEY_0_ALIGN                          0
11163
#define OTP_CONTENT_SHA_0_SHA_KEY_0_BITS                           32
11164
#define OTP_CONTENT_SHA_0_SHA_KEY_0_SHIFT                          0
11165
11166
11167
/****************************************************************************
11168
 * OTP :: CONTENT_SHA_1
11169
 ***************************************************************************/
11170
/* OTP :: CONTENT_SHA_1 :: SHA_KEY_1 [31:00] */
11171
#define OTP_CONTENT_SHA_1_SHA_KEY_1_MASK                           0xffffffff
11172
#define OTP_CONTENT_SHA_1_SHA_KEY_1_ALIGN                          0
11173
#define OTP_CONTENT_SHA_1_SHA_KEY_1_BITS                           32
11174
#define OTP_CONTENT_SHA_1_SHA_KEY_1_SHIFT                          0
11175
11176
11177
/****************************************************************************
11178
 * OTP :: CONTENT_SHA_2
11179
 ***************************************************************************/
11180
/* OTP :: CONTENT_SHA_2 :: SHA_KEY_2 [31:00] */
11181
#define OTP_CONTENT_SHA_2_SHA_KEY_2_MASK                           0xffffffff
11182
#define OTP_CONTENT_SHA_2_SHA_KEY_2_ALIGN                          0
11183
#define OTP_CONTENT_SHA_2_SHA_KEY_2_BITS                           32
11184
#define OTP_CONTENT_SHA_2_SHA_KEY_2_SHIFT                          0
11185
11186
11187
/****************************************************************************
11188
 * OTP :: CONTENT_SHA_3
11189
 ***************************************************************************/
11190
/* OTP :: CONTENT_SHA_3 :: SHA_KEY_3 [31:00] */
11191
#define OTP_CONTENT_SHA_3_SHA_KEY_3_MASK                           0xffffffff
11192
#define OTP_CONTENT_SHA_3_SHA_KEY_3_ALIGN                          0
11193
#define OTP_CONTENT_SHA_3_SHA_KEY_3_BITS                           32
11194
#define OTP_CONTENT_SHA_3_SHA_KEY_3_SHIFT                          0
11195
11196
11197
/****************************************************************************
11198
 * OTP :: CONTENT_SHA_4
11199
 ***************************************************************************/
11200
/* OTP :: CONTENT_SHA_4 :: SHA_KEY_4 [31:00] */
11201
#define OTP_CONTENT_SHA_4_SHA_KEY_4_MASK                           0xffffffff
11202
#define OTP_CONTENT_SHA_4_SHA_KEY_4_ALIGN                          0
11203
#define OTP_CONTENT_SHA_4_SHA_KEY_4_BITS                           32
11204
#define OTP_CONTENT_SHA_4_SHA_KEY_4_SHIFT                          0
11205
11206
11207
/****************************************************************************
11208
 * OTP :: CONTENT_SHA_5
11209
 ***************************************************************************/
11210
/* OTP :: CONTENT_SHA_5 :: SHA_KEY_5 [31:00] */
11211
#define OTP_CONTENT_SHA_5_SHA_KEY_5_MASK                           0xffffffff
11212
#define OTP_CONTENT_SHA_5_SHA_KEY_5_ALIGN                          0
11213
#define OTP_CONTENT_SHA_5_SHA_KEY_5_BITS                           32
11214
#define OTP_CONTENT_SHA_5_SHA_KEY_5_SHIFT                          0
11215
11216
11217
/****************************************************************************
11218
 * OTP :: CONTENT_SHA_6
11219
 ***************************************************************************/
11220
/* OTP :: CONTENT_SHA_6 :: SHA_KEY_6 [31:00] */
11221
#define OTP_CONTENT_SHA_6_SHA_KEY_6_MASK                           0xffffffff
11222
#define OTP_CONTENT_SHA_6_SHA_KEY_6_ALIGN                          0
11223
#define OTP_CONTENT_SHA_6_SHA_KEY_6_BITS                           32
11224
#define OTP_CONTENT_SHA_6_SHA_KEY_6_SHIFT                          0
11225
11226
11227
/****************************************************************************
11228
 * OTP :: CONTENT_SHA_7
11229
 ***************************************************************************/
11230
/* OTP :: CONTENT_SHA_7 :: SHA_KEY_7 [31:00] */
11231
#define OTP_CONTENT_SHA_7_SHA_KEY_7_MASK                           0xffffffff
11232
#define OTP_CONTENT_SHA_7_SHA_KEY_7_ALIGN                          0
11233
#define OTP_CONTENT_SHA_7_SHA_KEY_7_BITS                           32
11234
#define OTP_CONTENT_SHA_7_SHA_KEY_7_SHIFT                          0
11235
11236
11237
/****************************************************************************
11238
 * OTP :: CONTENT_CHECKSUM
11239
 ***************************************************************************/
11240
/* OTP :: CONTENT_CHECKSUM :: reserved0 [31:16] */
11241
#define OTP_CONTENT_CHECKSUM_reserved0_MASK                        0xffff0000
11242
#define OTP_CONTENT_CHECKSUM_reserved0_ALIGN                       0
11243
#define OTP_CONTENT_CHECKSUM_reserved0_BITS                        16
11244
#define OTP_CONTENT_CHECKSUM_reserved0_SHIFT                       16
11245
11246
/* OTP :: CONTENT_CHECKSUM :: CHECKSUM [15:00] */
11247
#define OTP_CONTENT_CHECKSUM_CHECKSUM_MASK                         0x0000ffff
11248
#define OTP_CONTENT_CHECKSUM_CHECKSUM_ALIGN                        0
11249
#define OTP_CONTENT_CHECKSUM_CHECKSUM_BITS                         16
11250
#define OTP_CONTENT_CHECKSUM_CHECKSUM_SHIFT                        0
11251
11252
11253
/****************************************************************************
11254
 * OTP :: PROG_CTRL
11255
 ***************************************************************************/
11256
/* OTP :: PROG_CTRL :: reserved0 [31:02] */
11257
#define OTP_PROG_CTRL_reserved0_MASK                               0xfffffffc
11258
#define OTP_PROG_CTRL_reserved0_ALIGN                              0
11259
#define OTP_PROG_CTRL_reserved0_BITS                               30
11260
#define OTP_PROG_CTRL_reserved0_SHIFT                              2
11261
11262
/* OTP :: PROG_CTRL :: ENABLE [01:01] */
11263
#define OTP_PROG_CTRL_ENABLE_MASK                                  0x00000002
11264
#define OTP_PROG_CTRL_ENABLE_ALIGN                                 0
11265
#define OTP_PROG_CTRL_ENABLE_BITS                                  1
11266
#define OTP_PROG_CTRL_ENABLE_SHIFT                                 1
11267
11268
/* OTP :: PROG_CTRL :: RST [00:00] */
11269
#define OTP_PROG_CTRL_RST_MASK                                     0x00000001
11270
#define OTP_PROG_CTRL_RST_ALIGN                                    0
11271
#define OTP_PROG_CTRL_RST_BITS                                     1
11272
#define OTP_PROG_CTRL_RST_SHIFT                                    0
11273
11274
11275
/****************************************************************************
11276
 * OTP :: PROG_STATUS
11277
 ***************************************************************************/
11278
/* OTP :: PROG_STATUS :: reserved0 [31:02] */
11279
#define OTP_PROG_STATUS_reserved0_MASK                             0xfffffffc
11280
#define OTP_PROG_STATUS_reserved0_ALIGN                            0
11281
#define OTP_PROG_STATUS_reserved0_BITS                             30
11282
#define OTP_PROG_STATUS_reserved0_SHIFT                            2
11283
11284
/* OTP :: PROG_STATUS :: ORDY [01:01] */
11285
#define OTP_PROG_STATUS_ORDY_MASK                                  0x00000002
11286
#define OTP_PROG_STATUS_ORDY_ALIGN                                 0
11287
#define OTP_PROG_STATUS_ORDY_BITS                                  1
11288
#define OTP_PROG_STATUS_ORDY_SHIFT                                 1
11289
11290
/* OTP :: PROG_STATUS :: IRDY [00:00] */
11291
#define OTP_PROG_STATUS_IRDY_MASK                                  0x00000001
11292
#define OTP_PROG_STATUS_IRDY_ALIGN                                 0
11293
#define OTP_PROG_STATUS_IRDY_BITS                                  1
11294
#define OTP_PROG_STATUS_IRDY_SHIFT                                 0
11295
11296
11297
/****************************************************************************
11298
 * OTP :: PROG_PULSE
11299
 ***************************************************************************/
11300
/* OTP :: PROG_PULSE :: PROG_HI [31:00] */
11301
#define OTP_PROG_PULSE_PROG_HI_MASK                                0xffffffff
11302
#define OTP_PROG_PULSE_PROG_HI_ALIGN                               0
11303
#define OTP_PROG_PULSE_PROG_HI_BITS                                32
11304
#define OTP_PROG_PULSE_PROG_HI_SHIFT                               0
11305
11306
11307
/****************************************************************************
11308
 * OTP :: VERIFY_PULSE
11309
 ***************************************************************************/
11310
/* OTP :: VERIFY_PULSE :: PROG_LOW [31:16] */
11311
#define OTP_VERIFY_PULSE_PROG_LOW_MASK                             0xffff0000
11312
#define OTP_VERIFY_PULSE_PROG_LOW_ALIGN                            0
11313
#define OTP_VERIFY_PULSE_PROG_LOW_BITS                             16
11314
#define OTP_VERIFY_PULSE_PROG_LOW_SHIFT                            16
11315
11316
/* OTP :: VERIFY_PULSE :: VERIFY [15:00] */
11317
#define OTP_VERIFY_PULSE_VERIFY_MASK                               0x0000ffff
11318
#define OTP_VERIFY_PULSE_VERIFY_ALIGN                              0
11319
#define OTP_VERIFY_PULSE_VERIFY_BITS                               16
11320
#define OTP_VERIFY_PULSE_VERIFY_SHIFT                              0
11321
11322
11323
/****************************************************************************
11324
 * OTP :: PROG_MASK
11325
 ***************************************************************************/
11326
/* OTP :: PROG_MASK :: reserved0 [31:17] */
11327
#define OTP_PROG_MASK_reserved0_MASK                               0xfffe0000
11328
#define OTP_PROG_MASK_reserved0_ALIGN                              0
11329
#define OTP_PROG_MASK_reserved0_BITS                               15
11330
#define OTP_PROG_MASK_reserved0_SHIFT                              17
11331
11332
/* OTP :: PROG_MASK :: PROG_MASK [16:00] */
11333
#define OTP_PROG_MASK_PROG_MASK_MASK                               0x0001ffff
11334
#define OTP_PROG_MASK_PROG_MASK_ALIGN                              0
11335
#define OTP_PROG_MASK_PROG_MASK_BITS                               17
11336
#define OTP_PROG_MASK_PROG_MASK_SHIFT                              0
11337
11338
11339
/****************************************************************************
11340
 * OTP :: DATA_INPUT
11341
 ***************************************************************************/
11342
/* OTP :: DATA_INPUT :: reserved0 [31:31] */
11343
#define OTP_DATA_INPUT_reserved0_MASK                              0x80000000
11344
#define OTP_DATA_INPUT_reserved0_ALIGN                             0
11345
#define OTP_DATA_INPUT_reserved0_BITS                              1
11346
#define OTP_DATA_INPUT_reserved0_SHIFT                             31
11347
11348
/* OTP :: DATA_INPUT :: CMD [30:28] */
11349
#define OTP_DATA_INPUT_CMD_MASK                                    0x70000000
11350
#define OTP_DATA_INPUT_CMD_ALIGN                                   0
11351
#define OTP_DATA_INPUT_CMD_BITS                                    3
11352
#define OTP_DATA_INPUT_CMD_SHIFT                                   28
11353
11354
/* OTP :: DATA_INPUT :: reserved1 [27:26] */
11355
#define OTP_DATA_INPUT_reserved1_MASK                              0x0c000000
11356
#define OTP_DATA_INPUT_reserved1_ALIGN                             0
11357
#define OTP_DATA_INPUT_reserved1_BITS                              2
11358
#define OTP_DATA_INPUT_reserved1_SHIFT                             26
11359
11360
/* OTP :: DATA_INPUT :: ADDR [25:20] */
11361
#define OTP_DATA_INPUT_ADDR_MASK                                   0x03f00000
11362
#define OTP_DATA_INPUT_ADDR_ALIGN                                  0
11363
#define OTP_DATA_INPUT_ADDR_BITS                                   6
11364
#define OTP_DATA_INPUT_ADDR_SHIFT                                  20
11365
11366
/* OTP :: DATA_INPUT :: reserved2 [19:18] */
11367
#define OTP_DATA_INPUT_reserved2_MASK                              0x000c0000
11368
#define OTP_DATA_INPUT_reserved2_ALIGN                             0
11369
#define OTP_DATA_INPUT_reserved2_BITS                              2
11370
#define OTP_DATA_INPUT_reserved2_SHIFT                             18
11371
11372
/* OTP :: DATA_INPUT :: WRCOL [17:17] */
11373
#define OTP_DATA_INPUT_WRCOL_MASK                                  0x00020000
11374
#define OTP_DATA_INPUT_WRCOL_ALIGN                                 0
11375
#define OTP_DATA_INPUT_WRCOL_BITS                                  1
11376
#define OTP_DATA_INPUT_WRCOL_SHIFT                                 17
11377
11378
/* OTP :: DATA_INPUT :: DIN [16:00] */
11379
#define OTP_DATA_INPUT_DIN_MASK                                    0x0001ffff
11380
#define OTP_DATA_INPUT_DIN_ALIGN                                   0
11381
#define OTP_DATA_INPUT_DIN_BITS                                    17
11382
#define OTP_DATA_INPUT_DIN_SHIFT                                   0
11383
11384
11385
/****************************************************************************
11386
 * OTP :: DATA_OUTPUT
11387
 ***************************************************************************/
11388
/* OTP :: DATA_OUTPUT :: reserved0 [31:17] */
11389
#define OTP_DATA_OUTPUT_reserved0_MASK                             0xfffe0000
11390
#define OTP_DATA_OUTPUT_reserved0_ALIGN                            0
11391
#define OTP_DATA_OUTPUT_reserved0_BITS                             15
11392
#define OTP_DATA_OUTPUT_reserved0_SHIFT                            17
11393
11394
/* OTP :: DATA_OUTPUT :: DOUT [16:00] */
11395
#define OTP_DATA_OUTPUT_DOUT_MASK                                  0x0001ffff
11396
#define OTP_DATA_OUTPUT_DOUT_ALIGN                                 0
11397
#define OTP_DATA_OUTPUT_DOUT_BITS                                  17
11398
#define OTP_DATA_OUTPUT_DOUT_SHIFT                                 0
11399
11400
11401
/****************************************************************************
11402
 * BCM70012_OTP_TOP_OTP_GR_BRIDGE
11403
 ***************************************************************************/
11404
/****************************************************************************
11405
 * OTP_GR_BRIDGE :: REVISION
11406
 ***************************************************************************/
11407
/* OTP_GR_BRIDGE :: REVISION :: reserved0 [31:16] */
11408
#define OTP_GR_BRIDGE_REVISION_reserved0_MASK                      0xffff0000
11409
#define OTP_GR_BRIDGE_REVISION_reserved0_ALIGN                     0
11410
#define OTP_GR_BRIDGE_REVISION_reserved0_BITS                      16
11411
#define OTP_GR_BRIDGE_REVISION_reserved0_SHIFT                     16
11412
11413
/* OTP_GR_BRIDGE :: REVISION :: MAJOR [15:08] */
11414
#define OTP_GR_BRIDGE_REVISION_MAJOR_MASK                          0x0000ff00
11415
#define OTP_GR_BRIDGE_REVISION_MAJOR_ALIGN                         0
11416
#define OTP_GR_BRIDGE_REVISION_MAJOR_BITS                          8
11417
#define OTP_GR_BRIDGE_REVISION_MAJOR_SHIFT                         8
11418
11419
/* OTP_GR_BRIDGE :: REVISION :: MINOR [07:00] */
11420
#define OTP_GR_BRIDGE_REVISION_MINOR_MASK                          0x000000ff
11421
#define OTP_GR_BRIDGE_REVISION_MINOR_ALIGN                         0
11422
#define OTP_GR_BRIDGE_REVISION_MINOR_BITS                          8
11423
#define OTP_GR_BRIDGE_REVISION_MINOR_SHIFT                         0
11424
11425
11426
/****************************************************************************
11427
 * OTP_GR_BRIDGE :: CTRL
11428
 ***************************************************************************/
11429
/* OTP_GR_BRIDGE :: CTRL :: reserved0 [31:01] */
11430
#define OTP_GR_BRIDGE_CTRL_reserved0_MASK                          0xfffffffe
11431
#define OTP_GR_BRIDGE_CTRL_reserved0_ALIGN                         0
11432
#define OTP_GR_BRIDGE_CTRL_reserved0_BITS                          31
11433
#define OTP_GR_BRIDGE_CTRL_reserved0_SHIFT                         1
11434
11435
/* OTP_GR_BRIDGE :: CTRL :: gisb_error_intr [00:00] */
11436
#define OTP_GR_BRIDGE_CTRL_gisb_error_intr_MASK                    0x00000001
11437
#define OTP_GR_BRIDGE_CTRL_gisb_error_intr_ALIGN                   0
11438
#define OTP_GR_BRIDGE_CTRL_gisb_error_intr_BITS                    1
11439
#define OTP_GR_BRIDGE_CTRL_gisb_error_intr_SHIFT                   0
11440
#define OTP_GR_BRIDGE_CTRL_gisb_error_intr_INTR_DISABLE            0
11441
#define OTP_GR_BRIDGE_CTRL_gisb_error_intr_INTR_ENABLE             1
11442
614
11443
615
/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L0_OVERRUN_ERROR [10:10] */
11444
/****************************************************************************
616
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_MASK           0x00000400
11445
 * OTP_GR_BRIDGE :: SPARE_SW_RESET_0
617
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_ALIGN          0
11446
 ***************************************************************************/
618
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_BITS           1
11447
/* OTP_GR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */
619
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_SHIFT          10
11448
#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK              0xfffffffe
11449
#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN             0
11450
#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS              31
11451
#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT             1
11452
11453
/* OTP_GR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */
11454
#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK         0x00000001
11455
#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN        0
11456
#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS         1
11457
#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT        0
11458
#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_DEASSERT     0
11459
#define OTP_GR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ASSERT       1
620
11460
621
/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L1_DESC_TX_ABORT_ERRORS [09:09] */
622
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_MASK    0x00000200
623
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_ALIGN   0
624
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_BITS    1
625
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_SHIFT   9
626
11461
627
/* MISC1 :: Y_RX_ERROR_STATUS :: reserved1 [08:08] */
11462
/****************************************************************************
628
#define MISC1_Y_RX_ERROR_STATUS_reserved1_MASK                     0x00000100
11463
 * OTP_GR_BRIDGE :: SPARE_SW_RESET_1
629
#define MISC1_Y_RX_ERROR_STATUS_reserved1_ALIGN                    0
11464
 ***************************************************************************/
630
#define MISC1_Y_RX_ERROR_STATUS_reserved1_BITS                     1
11465
/* OTP_GR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */
631
#define MISC1_Y_RX_ERROR_STATUS_reserved1_SHIFT                    8
11466
#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK              0xfffffffe
11467
#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN             0
11468
#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS              31
11469
#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT             1
11470
11471
/* OTP_GR_BRIDGE :: SPARE_SW_RESET_1 :: OTP_00_SW_RESET [00:00] */
11472
#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_OTP_00_SW_RESET_MASK        0x00000001
11473
#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_OTP_00_SW_RESET_ALIGN       0
11474
#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_OTP_00_SW_RESET_BITS        1
11475
#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_OTP_00_SW_RESET_SHIFT       0
11476
#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_OTP_00_SW_RESET_DEASSERT    0
11477
#define OTP_GR_BRIDGE_SPARE_SW_RESET_1_OTP_00_SW_RESET_ASSERT      1
632
11478
633
/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L0_DESC_TX_ABORT_ERRORS [07:07] */
634
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_MASK    0x00000080
635
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_ALIGN   0
636
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_BITS    1
637
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_SHIFT   7
638
11479
639
/* MISC1 :: Y_RX_ERROR_STATUS :: reserved2 [06:05] */
11480
/****************************************************************************
640
#define MISC1_Y_RX_ERROR_STATUS_reserved2_MASK                     0x00000060
11481
 * BCM70012_AES_TOP_AES
641
#define MISC1_Y_RX_ERROR_STATUS_reserved2_ALIGN                    0
11482
 ***************************************************************************/
642
#define MISC1_Y_RX_ERROR_STATUS_reserved2_BITS                     2
11483
/****************************************************************************
643
#define MISC1_Y_RX_ERROR_STATUS_reserved2_SHIFT                    5
11484
 * AES :: CONFIG_INFO
11485
 ***************************************************************************/
11486
/* AES :: CONFIG_INFO :: SWAP [31:31] */
11487
#define AES_CONFIG_INFO_SWAP_MASK                                  0x80000000
11488
#define AES_CONFIG_INFO_SWAP_ALIGN                                 0
11489
#define AES_CONFIG_INFO_SWAP_BITS                                  1
11490
#define AES_CONFIG_INFO_SWAP_SHIFT                                 31
11491
11492
/* AES :: CONFIG_INFO :: reserved0 [30:19] */
11493
#define AES_CONFIG_INFO_reserved0_MASK                             0x7ff80000
11494
#define AES_CONFIG_INFO_reserved0_ALIGN                            0
11495
#define AES_CONFIG_INFO_reserved0_BITS                             12
11496
#define AES_CONFIG_INFO_reserved0_SHIFT                            19
11497
11498
/* AES :: CONFIG_INFO :: OFFSET [18:02] */
11499
#define AES_CONFIG_INFO_OFFSET_MASK                                0x0007fffc
11500
#define AES_CONFIG_INFO_OFFSET_ALIGN                               0
11501
#define AES_CONFIG_INFO_OFFSET_BITS                                17
11502
#define AES_CONFIG_INFO_OFFSET_SHIFT                               2
11503
11504
/* AES :: CONFIG_INFO :: reserved1 [01:00] */
11505
#define AES_CONFIG_INFO_reserved1_MASK                             0x00000003
11506
#define AES_CONFIG_INFO_reserved1_ALIGN                            0
11507
#define AES_CONFIG_INFO_reserved1_BITS                             2
11508
#define AES_CONFIG_INFO_reserved1_SHIFT                            0
644
11509
645
/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L1_FIFO_FULL_ERRORS [04:04] */
646
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK        0x00000010
647
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_ALIGN       0
648
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_BITS        1
649
#define MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_SHIFT       4
650
11510
651
/* MISC1 :: Y_RX_ERROR_STATUS :: reserved3 [03:02] */
11511
/****************************************************************************
652
#define MISC1_Y_RX_ERROR_STATUS_reserved3_MASK                     0x0000000c
11512
 * AES :: CMD
653
#define MISC1_Y_RX_ERROR_STATUS_reserved3_ALIGN                    0
11513
 ***************************************************************************/
654
#define MISC1_Y_RX_ERROR_STATUS_reserved3_BITS                     2
11514
/* AES :: CMD :: reserved0 [31:13] */
655
#define MISC1_Y_RX_ERROR_STATUS_reserved3_SHIFT                    2
11515
#define AES_CMD_reserved0_MASK                                     0xffffe000
11516
#define AES_CMD_reserved0_ALIGN                                    0
11517
#define AES_CMD_reserved0_BITS                                     19
11518
#define AES_CMD_reserved0_SHIFT                                    13
11519
11520
/* AES :: CMD :: WRITE_EEPROM [12:12] */
11521
#define AES_CMD_WRITE_EEPROM_MASK                                  0x00001000
11522
#define AES_CMD_WRITE_EEPROM_ALIGN                                 0
11523
#define AES_CMD_WRITE_EEPROM_BITS                                  1
11524
#define AES_CMD_WRITE_EEPROM_SHIFT                                 12
11525
11526
/* AES :: CMD :: reserved1 [11:09] */
11527
#define AES_CMD_reserved1_MASK                                     0x00000e00
11528
#define AES_CMD_reserved1_ALIGN                                    0
11529
#define AES_CMD_reserved1_BITS                                     3
11530
#define AES_CMD_reserved1_SHIFT                                    9
11531
11532
/* AES :: CMD :: START_EEPROM_COPY [08:08] */
11533
#define AES_CMD_START_EEPROM_COPY_MASK                             0x00000100
11534
#define AES_CMD_START_EEPROM_COPY_ALIGN                            0
11535
#define AES_CMD_START_EEPROM_COPY_BITS                             1
11536
#define AES_CMD_START_EEPROM_COPY_SHIFT                            8
11537
11538
/* AES :: CMD :: reserved2 [07:05] */
11539
#define AES_CMD_reserved2_MASK                                     0x000000e0
11540
#define AES_CMD_reserved2_ALIGN                                    0
11541
#define AES_CMD_reserved2_BITS                                     3
11542
#define AES_CMD_reserved2_SHIFT                                    5
11543
11544
/* AES :: CMD :: PREPARE_ENCRYPTION [04:04] */
11545
#define AES_CMD_PREPARE_ENCRYPTION_MASK                            0x00000010
11546
#define AES_CMD_PREPARE_ENCRYPTION_ALIGN                           0
11547
#define AES_CMD_PREPARE_ENCRYPTION_BITS                            1
11548
#define AES_CMD_PREPARE_ENCRYPTION_SHIFT                           4
11549
11550
/* AES :: CMD :: reserved3 [03:01] */
11551
#define AES_CMD_reserved3_MASK                                     0x0000000e
11552
#define AES_CMD_reserved3_ALIGN                                    0
11553
#define AES_CMD_reserved3_BITS                                     3
11554
#define AES_CMD_reserved3_SHIFT                                    1
11555
11556
/* AES :: CMD :: START_KEY_LOAD [00:00] */
11557
#define AES_CMD_START_KEY_LOAD_MASK                                0x00000001
11558
#define AES_CMD_START_KEY_LOAD_ALIGN                               0
11559
#define AES_CMD_START_KEY_LOAD_BITS                                1
11560
#define AES_CMD_START_KEY_LOAD_SHIFT                               0
656
11561
657
/* MISC1 :: Y_RX_ERROR_STATUS :: RX_L0_FIFO_FULL_ERRORS [01:01] */
658
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK        0x00000002
659
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_ALIGN       0
660
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_BITS        1
661
#define MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_SHIFT       1
662
11562
663
/* MISC1 :: Y_RX_ERROR_STATUS :: reserved4 [00:00] */
11563
/****************************************************************************
664
#define MISC1_Y_RX_ERROR_STATUS_reserved4_MASK                     0x00000001
11564
 * AES :: STATUS
665
#define MISC1_Y_RX_ERROR_STATUS_reserved4_ALIGN                    0
11565
 ***************************************************************************/
666
#define MISC1_Y_RX_ERROR_STATUS_reserved4_BITS                     1
11566
/* AES :: STATUS :: reserved0 [31:23] */
667
#define MISC1_Y_RX_ERROR_STATUS_reserved4_SHIFT                    0
11567
#define AES_STATUS_reserved0_MASK                                  0xff800000
11568
#define AES_STATUS_reserved0_ALIGN                                 0
11569
#define AES_STATUS_reserved0_BITS                                  9
11570
#define AES_STATUS_reserved0_SHIFT                                 23
11571
11572
/* AES :: STATUS :: STUCK_AT_ZERO [22:22] */
11573
#define AES_STATUS_STUCK_AT_ZERO_MASK                              0x00400000
11574
#define AES_STATUS_STUCK_AT_ZERO_ALIGN                             0
11575
#define AES_STATUS_STUCK_AT_ZERO_BITS                              1
11576
#define AES_STATUS_STUCK_AT_ZERO_SHIFT                             22
11577
11578
/* AES :: STATUS :: STUCK_AT_ONE [21:21] */
11579
#define AES_STATUS_STUCK_AT_ONE_MASK                               0x00200000
11580
#define AES_STATUS_STUCK_AT_ONE_ALIGN                              0
11581
#define AES_STATUS_STUCK_AT_ONE_BITS                               1
11582
#define AES_STATUS_STUCK_AT_ONE_SHIFT                              21
11583
11584
/* AES :: STATUS :: RANDOM_READY [20:20] */
11585
#define AES_STATUS_RANDOM_READY_MASK                               0x00100000
11586
#define AES_STATUS_RANDOM_READY_ALIGN                              0
11587
#define AES_STATUS_RANDOM_READY_BITS                               1
11588
#define AES_STATUS_RANDOM_READY_SHIFT                              20
11589
11590
/* AES :: STATUS :: reserved1 [19:16] */
11591
#define AES_STATUS_reserved1_MASK                                  0x000f0000
11592
#define AES_STATUS_reserved1_ALIGN                                 0
11593
#define AES_STATUS_reserved1_BITS                                  4
11594
#define AES_STATUS_reserved1_SHIFT                                 16
11595
11596
/* AES :: STATUS :: WRITE_EEPROM_TIMEOUT [15:15] */
11597
#define AES_STATUS_WRITE_EEPROM_TIMEOUT_MASK                       0x00008000
11598
#define AES_STATUS_WRITE_EEPROM_TIMEOUT_ALIGN                      0
11599
#define AES_STATUS_WRITE_EEPROM_TIMEOUT_BITS                       1
11600
#define AES_STATUS_WRITE_EEPROM_TIMEOUT_SHIFT                      15
11601
11602
/* AES :: STATUS :: WRITE_DATA_MISMATCH [14:14] */
11603
#define AES_STATUS_WRITE_DATA_MISMATCH_MASK                        0x00004000
11604
#define AES_STATUS_WRITE_DATA_MISMATCH_ALIGN                       0
11605
#define AES_STATUS_WRITE_DATA_MISMATCH_BITS                        1
11606
#define AES_STATUS_WRITE_DATA_MISMATCH_SHIFT                       14
11607
11608
/* AES :: STATUS :: WRITE_GISB_ERROR [13:13] */
11609
#define AES_STATUS_WRITE_GISB_ERROR_MASK                           0x00002000
11610
#define AES_STATUS_WRITE_GISB_ERROR_ALIGN                          0
11611
#define AES_STATUS_WRITE_GISB_ERROR_BITS                           1
11612
#define AES_STATUS_WRITE_GISB_ERROR_SHIFT                          13
11613
11614
/* AES :: STATUS :: WRITE_DONE [12:12] */
11615
#define AES_STATUS_WRITE_DONE_MASK                                 0x00001000
11616
#define AES_STATUS_WRITE_DONE_ALIGN                                0
11617
#define AES_STATUS_WRITE_DONE_BITS                                 1
11618
#define AES_STATUS_WRITE_DONE_SHIFT                                12
11619
11620
/* AES :: STATUS :: reserved2 [11:11] */
11621
#define AES_STATUS_reserved2_MASK                                  0x00000800
11622
#define AES_STATUS_reserved2_ALIGN                                 0
11623
#define AES_STATUS_reserved2_BITS                                  1
11624
#define AES_STATUS_reserved2_SHIFT                                 11
11625
11626
/* AES :: STATUS :: COPY_EEPROM_ERROR [10:10] */
11627
#define AES_STATUS_COPY_EEPROM_ERROR_MASK                          0x00000400
11628
#define AES_STATUS_COPY_EEPROM_ERROR_ALIGN                         0
11629
#define AES_STATUS_COPY_EEPROM_ERROR_BITS                          1
11630
#define AES_STATUS_COPY_EEPROM_ERROR_SHIFT                         10
11631
11632
/* AES :: STATUS :: COPY_GISB_ERROR [09:09] */
11633
#define AES_STATUS_COPY_GISB_ERROR_MASK                            0x00000200
11634
#define AES_STATUS_COPY_GISB_ERROR_ALIGN                           0
11635
#define AES_STATUS_COPY_GISB_ERROR_BITS                            1
11636
#define AES_STATUS_COPY_GISB_ERROR_SHIFT                           9
11637
11638
/* AES :: STATUS :: COPY_DONE [08:08] */
11639
#define AES_STATUS_COPY_DONE_MASK                                  0x00000100
11640
#define AES_STATUS_COPY_DONE_ALIGN                                 0
11641
#define AES_STATUS_COPY_DONE_BITS                                  1
11642
#define AES_STATUS_COPY_DONE_SHIFT                                 8
11643
11644
/* AES :: STATUS :: PREPARE_EEPROM_TIMEOUT [07:07] */
11645
#define AES_STATUS_PREPARE_EEPROM_TIMEOUT_MASK                     0x00000080
11646
#define AES_STATUS_PREPARE_EEPROM_TIMEOUT_ALIGN                    0
11647
#define AES_STATUS_PREPARE_EEPROM_TIMEOUT_BITS                     1
11648
#define AES_STATUS_PREPARE_EEPROM_TIMEOUT_SHIFT                    7
11649
11650
/* AES :: STATUS :: PREPARE_DATA_MISMATCH [06:06] */
11651
#define AES_STATUS_PREPARE_DATA_MISMATCH_MASK                      0x00000040
11652
#define AES_STATUS_PREPARE_DATA_MISMATCH_ALIGN                     0
11653
#define AES_STATUS_PREPARE_DATA_MISMATCH_BITS                      1
11654
#define AES_STATUS_PREPARE_DATA_MISMATCH_SHIFT                     6
11655
11656
/* AES :: STATUS :: PREPARE_GISB_ERROR [05:05] */
11657
#define AES_STATUS_PREPARE_GISB_ERROR_MASK                         0x00000020
11658
#define AES_STATUS_PREPARE_GISB_ERROR_ALIGN                        0
11659
#define AES_STATUS_PREPARE_GISB_ERROR_BITS                         1
11660
#define AES_STATUS_PREPARE_GISB_ERROR_SHIFT                        5
11661
11662
/* AES :: STATUS :: PREPARE_DONE [04:04] */
11663
#define AES_STATUS_PREPARE_DONE_MASK                               0x00000010
11664
#define AES_STATUS_PREPARE_DONE_ALIGN                              0
11665
#define AES_STATUS_PREPARE_DONE_BITS                               1
11666
#define AES_STATUS_PREPARE_DONE_SHIFT                              4
11667
11668
/* AES :: STATUS :: reserved3 [03:02] */
11669
#define AES_STATUS_reserved3_MASK                                  0x0000000c
11670
#define AES_STATUS_reserved3_ALIGN                                 0
11671
#define AES_STATUS_reserved3_BITS                                  2
11672
#define AES_STATUS_reserved3_SHIFT                                 2
11673
11674
/* AES :: STATUS :: KEY_LOAD_GISB_ERROR [01:01] */
11675
#define AES_STATUS_KEY_LOAD_GISB_ERROR_MASK                        0x00000002
11676
#define AES_STATUS_KEY_LOAD_GISB_ERROR_ALIGN                       0
11677
#define AES_STATUS_KEY_LOAD_GISB_ERROR_BITS                        1
11678
#define AES_STATUS_KEY_LOAD_GISB_ERROR_SHIFT                       1
11679
11680
/* AES :: STATUS :: KEY_LOAD_DONE [00:00] */
11681
#define AES_STATUS_KEY_LOAD_DONE_MASK                              0x00000001
11682
#define AES_STATUS_KEY_LOAD_DONE_ALIGN                             0
11683
#define AES_STATUS_KEY_LOAD_DONE_BITS                              1
11684
#define AES_STATUS_KEY_LOAD_DONE_SHIFT                             0
668
11685
669
11686
670
/****************************************************************************
11687
/****************************************************************************
671
 * MISC1 :: UV_RX_ERROR_STATUS
11688
 * AES :: EEPROM_CONFIG
672
 ***************************************************************************/
11689
 ***************************************************************************/
673
/* MISC1 :: UV_RX_ERROR_STATUS :: reserved0 [31:14] */
11690
/* AES :: EEPROM_CONFIG :: LENGTH [31:20] */
674
#define MISC1_UV_RX_ERROR_STATUS_reserved0_MASK                    0xffffc000
11691
#define AES_EEPROM_CONFIG_LENGTH_MASK                              0xfff00000
675
#define MISC1_UV_RX_ERROR_STATUS_reserved0_ALIGN                   0
11692
#define AES_EEPROM_CONFIG_LENGTH_ALIGN                             0
676
#define MISC1_UV_RX_ERROR_STATUS_reserved0_BITS                    18
11693
#define AES_EEPROM_CONFIG_LENGTH_BITS                              12
677
#define MISC1_UV_RX_ERROR_STATUS_reserved0_SHIFT                   14
11694
#define AES_EEPROM_CONFIG_LENGTH_SHIFT                             20
11695
11696
/* AES :: EEPROM_CONFIG :: reserved0 [19:16] */
11697
#define AES_EEPROM_CONFIG_reserved0_MASK                           0x000f0000
11698
#define AES_EEPROM_CONFIG_reserved0_ALIGN                          0
11699
#define AES_EEPROM_CONFIG_reserved0_BITS                           4
11700
#define AES_EEPROM_CONFIG_reserved0_SHIFT                          16
11701
11702
/* AES :: EEPROM_CONFIG :: START_ADDR [15:02] */
11703
#define AES_EEPROM_CONFIG_START_ADDR_MASK                          0x0000fffc
11704
#define AES_EEPROM_CONFIG_START_ADDR_ALIGN                         0
11705
#define AES_EEPROM_CONFIG_START_ADDR_BITS                          14
11706
#define AES_EEPROM_CONFIG_START_ADDR_SHIFT                         2
11707
11708
/* AES :: EEPROM_CONFIG :: reserved1 [01:00] */
11709
#define AES_EEPROM_CONFIG_reserved1_MASK                           0x00000003
11710
#define AES_EEPROM_CONFIG_reserved1_ALIGN                          0
11711
#define AES_EEPROM_CONFIG_reserved1_BITS                           2
11712
#define AES_EEPROM_CONFIG_reserved1_SHIFT                          0
678
11713
679
/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L1_UNDERRUN_ERROR [13:13] */
680
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK         0x00002000
681
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_ALIGN        0
682
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_BITS         1
683
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_SHIFT        13
684
11714
685
/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L1_OVERRUN_ERROR [12:12] */
11715
/****************************************************************************
686
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_MASK          0x00001000
11716
 * AES :: EEPROM_DATA_0
687
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_ALIGN         0
11717
 ***************************************************************************/
688
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_BITS          1
11718
/* AES :: EEPROM_DATA_0 :: DATA [31:00] */
689
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_SHIFT         12
11719
#define AES_EEPROM_DATA_0_DATA_MASK                                0xffffffff
11720
#define AES_EEPROM_DATA_0_DATA_ALIGN                               0
11721
#define AES_EEPROM_DATA_0_DATA_BITS                                32
11722
#define AES_EEPROM_DATA_0_DATA_SHIFT                               0
690
11723
691
/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L0_UNDERRUN_ERROR [11:11] */
692
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK         0x00000800
693
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_ALIGN        0
694
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_BITS         1
695
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_SHIFT        11
696
11724
697
/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L0_OVERRUN_ERROR [10:10] */
11725
/****************************************************************************
698
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_MASK          0x00000400
11726
 * AES :: EEPROM_DATA_1
699
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_ALIGN         0
11727
 ***************************************************************************/
700
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_BITS          1
11728
/* AES :: EEPROM_DATA_1 :: DATA [31:00] */
701
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_SHIFT         10
11729
#define AES_EEPROM_DATA_1_DATA_MASK                                0xffffffff
11730
#define AES_EEPROM_DATA_1_DATA_ALIGN                               0
11731
#define AES_EEPROM_DATA_1_DATA_BITS                                32
11732
#define AES_EEPROM_DATA_1_DATA_SHIFT                               0
702
11733
703
/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L1_DESC_TX_ABORT_ERRORS [09:09] */
704
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_MASK   0x00000200
705
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_ALIGN  0
706
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_BITS   1
707
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_SHIFT  9
708
11734
709
/* MISC1 :: UV_RX_ERROR_STATUS :: reserved1 [08:08] */
11735
/****************************************************************************
710
#define MISC1_UV_RX_ERROR_STATUS_reserved1_MASK                    0x00000100
11736
 * AES :: EEPROM_DATA_2
711
#define MISC1_UV_RX_ERROR_STATUS_reserved1_ALIGN                   0
11737
 ***************************************************************************/
712
#define MISC1_UV_RX_ERROR_STATUS_reserved1_BITS                    1
11738
/* AES :: EEPROM_DATA_2 :: DATA [31:00] */
713
#define MISC1_UV_RX_ERROR_STATUS_reserved1_SHIFT                   8
11739
#define AES_EEPROM_DATA_2_DATA_MASK                                0xffffffff
11740
#define AES_EEPROM_DATA_2_DATA_ALIGN                               0
11741
#define AES_EEPROM_DATA_2_DATA_BITS                                32
11742
#define AES_EEPROM_DATA_2_DATA_SHIFT                               0
714
11743
715
/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L0_DESC_TX_ABORT_ERRORS [07:07] */
716
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_MASK   0x00000080
717
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_ALIGN  0
718
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_BITS   1
719
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_SHIFT  7
720
11744
721
/* MISC1 :: UV_RX_ERROR_STATUS :: reserved2 [06:05] */
11745
/****************************************************************************
722
#define MISC1_UV_RX_ERROR_STATUS_reserved2_MASK                    0x00000060
11746
 * AES :: EEPROM_DATA_3
723
#define MISC1_UV_RX_ERROR_STATUS_reserved2_ALIGN                   0
11747
 ***************************************************************************/
724
#define MISC1_UV_RX_ERROR_STATUS_reserved2_BITS                    2
11748
/* AES :: EEPROM_DATA_3 :: DATA [31:00] */
725
#define MISC1_UV_RX_ERROR_STATUS_reserved2_SHIFT                   5
11749
#define AES_EEPROM_DATA_3_DATA_MASK                                0xffffffff
11750
#define AES_EEPROM_DATA_3_DATA_ALIGN                               0
11751
#define AES_EEPROM_DATA_3_DATA_BITS                                32
11752
#define AES_EEPROM_DATA_3_DATA_SHIFT                               0
726
11753
727
/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L1_FIFO_FULL_ERRORS [04:04] */
728
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK       0x00000010
729
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_ALIGN      0
730
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_BITS       1
731
#define MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_SHIFT      4
732
11754
733
/* MISC1 :: UV_RX_ERROR_STATUS :: reserved3 [03:02] */
11755
/****************************************************************************
734
#define MISC1_UV_RX_ERROR_STATUS_reserved3_MASK                    0x0000000c
11756
 * BCM70012_AES_TOP_AES_RGR_BRIDGE
735
#define MISC1_UV_RX_ERROR_STATUS_reserved3_ALIGN                   0
11757
 ***************************************************************************/
736
#define MISC1_UV_RX_ERROR_STATUS_reserved3_BITS                    2
11758
/****************************************************************************
737
#define MISC1_UV_RX_ERROR_STATUS_reserved3_SHIFT                   2
11759
 * AES_RGR_BRIDGE :: REVISION
11760
 ***************************************************************************/
11761
/* AES_RGR_BRIDGE :: REVISION :: reserved0 [31:16] */
11762
#define AES_RGR_BRIDGE_REVISION_reserved0_MASK                     0xffff0000
11763
#define AES_RGR_BRIDGE_REVISION_reserved0_ALIGN                    0
11764
#define AES_RGR_BRIDGE_REVISION_reserved0_BITS                     16
11765
#define AES_RGR_BRIDGE_REVISION_reserved0_SHIFT                    16
11766
11767
/* AES_RGR_BRIDGE :: REVISION :: MAJOR [15:08] */
11768
#define AES_RGR_BRIDGE_REVISION_MAJOR_MASK                         0x0000ff00
11769
#define AES_RGR_BRIDGE_REVISION_MAJOR_ALIGN                        0
11770
#define AES_RGR_BRIDGE_REVISION_MAJOR_BITS                         8
11771
#define AES_RGR_BRIDGE_REVISION_MAJOR_SHIFT                        8
11772
11773
/* AES_RGR_BRIDGE :: REVISION :: MINOR [07:00] */
11774
#define AES_RGR_BRIDGE_REVISION_MINOR_MASK                         0x000000ff
11775
#define AES_RGR_BRIDGE_REVISION_MINOR_ALIGN                        0
11776
#define AES_RGR_BRIDGE_REVISION_MINOR_BITS                         8
11777
#define AES_RGR_BRIDGE_REVISION_MINOR_SHIFT                        0
738
11778
739
/* MISC1 :: UV_RX_ERROR_STATUS :: RX_L0_FIFO_FULL_ERRORS [01:01] */
740
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK       0x00000002
741
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_ALIGN      0
742
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_BITS       1
743
#define MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_SHIFT      1
744
11779
745
/* MISC1 :: UV_RX_ERROR_STATUS :: reserved4 [00:00] */
11780
/****************************************************************************
746
#define MISC1_UV_RX_ERROR_STATUS_reserved4_MASK                    0x00000001
11781
 * AES_RGR_BRIDGE :: CTRL
747
#define MISC1_UV_RX_ERROR_STATUS_reserved4_ALIGN                   0
11782
 ***************************************************************************/
748
#define MISC1_UV_RX_ERROR_STATUS_reserved4_BITS                    1
11783
/* AES_RGR_BRIDGE :: CTRL :: reserved0 [31:02] */
749
#define MISC1_UV_RX_ERROR_STATUS_reserved4_SHIFT                   0
11784
#define AES_RGR_BRIDGE_CTRL_reserved0_MASK                         0xfffffffc
11785
#define AES_RGR_BRIDGE_CTRL_reserved0_ALIGN                        0
11786
#define AES_RGR_BRIDGE_CTRL_reserved0_BITS                         30
11787
#define AES_RGR_BRIDGE_CTRL_reserved0_SHIFT                        2
11788
11789
/* AES_RGR_BRIDGE :: CTRL :: rbus_error_intr [01:01] */
11790
#define AES_RGR_BRIDGE_CTRL_rbus_error_intr_MASK                   0x00000002
11791
#define AES_RGR_BRIDGE_CTRL_rbus_error_intr_ALIGN                  0
11792
#define AES_RGR_BRIDGE_CTRL_rbus_error_intr_BITS                   1
11793
#define AES_RGR_BRIDGE_CTRL_rbus_error_intr_SHIFT                  1
11794
#define AES_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_DISABLE           0
11795
#define AES_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_ENABLE            1
11796
11797
/* AES_RGR_BRIDGE :: CTRL :: gisb_error_intr [00:00] */
11798
#define AES_RGR_BRIDGE_CTRL_gisb_error_intr_MASK                   0x00000001
11799
#define AES_RGR_BRIDGE_CTRL_gisb_error_intr_ALIGN                  0
11800
#define AES_RGR_BRIDGE_CTRL_gisb_error_intr_BITS                   1
11801
#define AES_RGR_BRIDGE_CTRL_gisb_error_intr_SHIFT                  0
11802
#define AES_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_DISABLE           0
11803
#define AES_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_ENABLE            1
11804
11805
11806
/****************************************************************************
11807
 * AES_RGR_BRIDGE :: RBUS_TIMER
11808
 ***************************************************************************/
11809
/* AES_RGR_BRIDGE :: RBUS_TIMER :: reserved0 [31:16] */
11810
#define AES_RGR_BRIDGE_RBUS_TIMER_reserved0_MASK                   0xffff0000
11811
#define AES_RGR_BRIDGE_RBUS_TIMER_reserved0_ALIGN                  0
11812
#define AES_RGR_BRIDGE_RBUS_TIMER_reserved0_BITS                   16
11813
#define AES_RGR_BRIDGE_RBUS_TIMER_reserved0_SHIFT                  16
11814
11815
/* AES_RGR_BRIDGE :: RBUS_TIMER :: timer_value [15:00] */
11816
#define AES_RGR_BRIDGE_RBUS_TIMER_timer_value_MASK                 0x0000ffff
11817
#define AES_RGR_BRIDGE_RBUS_TIMER_timer_value_ALIGN                0
11818
#define AES_RGR_BRIDGE_RBUS_TIMER_timer_value_BITS                 16
11819
#define AES_RGR_BRIDGE_RBUS_TIMER_timer_value_SHIFT                0
11820
11821
11822
/****************************************************************************
11823
 * AES_RGR_BRIDGE :: SPARE_SW_RESET_0
11824
 ***************************************************************************/
11825
/* AES_RGR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */
11826
#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK             0xfffffffe
11827
#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN            0
11828
#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS             31
11829
#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT            1
11830
11831
/* AES_RGR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */
11832
#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK        0x00000001
11833
#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN       0
11834
#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS        1
11835
#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT       0
11836
#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_DEASSERT    0
11837
#define AES_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ASSERT      1
11838
11839
11840
/****************************************************************************
11841
 * AES_RGR_BRIDGE :: SPARE_SW_RESET_1
11842
 ***************************************************************************/
11843
/* AES_RGR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */
11844
#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK             0xfffffffe
11845
#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN            0
11846
#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS             31
11847
#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT            1
11848
11849
/* AES_RGR_BRIDGE :: SPARE_SW_RESET_1 :: SPARE_SW_RESET [00:00] */
11850
#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_MASK        0x00000001
11851
#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ALIGN       0
11852
#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_BITS        1
11853
#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_SHIFT       0
11854
#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_DEASSERT    0
11855
#define AES_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ASSERT      1
11856
11857
11858
/****************************************************************************
11859
 * BCM70012_DCI_TOP_DCI
11860
 ***************************************************************************/
11861
/****************************************************************************
11862
 * DCI :: CMD
11863
 ***************************************************************************/
11864
/* DCI :: CMD :: reserved0 [31:09] */
11865
#define DCI_CMD_reserved0_MASK                                     0xfffffe00
11866
#define DCI_CMD_reserved0_ALIGN                                    0
11867
#define DCI_CMD_reserved0_BITS                                     23
11868
#define DCI_CMD_reserved0_SHIFT                                    9
11869
11870
/* DCI :: CMD :: FORCE_FW_VALIDATED [08:08] */
11871
#define DCI_CMD_FORCE_FW_VALIDATED_MASK                            0x00000100
11872
#define DCI_CMD_FORCE_FW_VALIDATED_ALIGN                           0
11873
#define DCI_CMD_FORCE_FW_VALIDATED_BITS                            1
11874
#define DCI_CMD_FORCE_FW_VALIDATED_SHIFT                           8
11875
11876
/* DCI :: CMD :: reserved1 [07:05] */
11877
#define DCI_CMD_reserved1_MASK                                     0x000000e0
11878
#define DCI_CMD_reserved1_ALIGN                                    0
11879
#define DCI_CMD_reserved1_BITS                                     3
11880
#define DCI_CMD_reserved1_SHIFT                                    5
11881
11882
/* DCI :: CMD :: START_PROCESSOR [04:04] */
11883
#define DCI_CMD_START_PROCESSOR_MASK                               0x00000010
11884
#define DCI_CMD_START_PROCESSOR_ALIGN                              0
11885
#define DCI_CMD_START_PROCESSOR_BITS                               1
11886
#define DCI_CMD_START_PROCESSOR_SHIFT                              4
11887
11888
/* DCI :: CMD :: reserved2 [03:02] */
11889
#define DCI_CMD_reserved2_MASK                                     0x0000000c
11890
#define DCI_CMD_reserved2_ALIGN                                    0
11891
#define DCI_CMD_reserved2_BITS                                     2
11892
#define DCI_CMD_reserved2_SHIFT                                    2
11893
11894
/* DCI :: CMD :: DOWNLOAD_COMPLETE [01:01] */
11895
#define DCI_CMD_DOWNLOAD_COMPLETE_MASK                             0x00000002
11896
#define DCI_CMD_DOWNLOAD_COMPLETE_ALIGN                            0
11897
#define DCI_CMD_DOWNLOAD_COMPLETE_BITS                             1
11898
#define DCI_CMD_DOWNLOAD_COMPLETE_SHIFT                            1
11899
11900
/* DCI :: CMD :: INITIATE_FW_DOWNLOAD [00:00] */
11901
#define DCI_CMD_INITIATE_FW_DOWNLOAD_MASK                          0x00000001
11902
#define DCI_CMD_INITIATE_FW_DOWNLOAD_ALIGN                         0
11903
#define DCI_CMD_INITIATE_FW_DOWNLOAD_BITS                          1
11904
#define DCI_CMD_INITIATE_FW_DOWNLOAD_SHIFT                         0
11905
11906
11907
/****************************************************************************
11908
 * DCI :: STATUS
11909
 ***************************************************************************/
11910
/* DCI :: STATUS :: reserved0 [31:10] */
11911
#define DCI_STATUS_reserved0_MASK                                  0xfffffc00
11912
#define DCI_STATUS_reserved0_ALIGN                                 0
11913
#define DCI_STATUS_reserved0_BITS                                  22
11914
#define DCI_STATUS_reserved0_SHIFT                                 10
11915
11916
/* DCI :: STATUS :: SIGNATURE_MATCHED [09:09] */
11917
#define DCI_STATUS_SIGNATURE_MATCHED_MASK                          0x00000200
11918
#define DCI_STATUS_SIGNATURE_MATCHED_ALIGN                         0
11919
#define DCI_STATUS_SIGNATURE_MATCHED_BITS                          1
11920
#define DCI_STATUS_SIGNATURE_MATCHED_SHIFT                         9
11921
11922
/* DCI :: STATUS :: SIGNATURE_MISMATCH [08:08] */
11923
#define DCI_STATUS_SIGNATURE_MISMATCH_MASK                         0x00000100
11924
#define DCI_STATUS_SIGNATURE_MISMATCH_ALIGN                        0
11925
#define DCI_STATUS_SIGNATURE_MISMATCH_BITS                         1
11926
#define DCI_STATUS_SIGNATURE_MISMATCH_SHIFT                        8
11927
11928
/* DCI :: STATUS :: reserved1 [07:06] */
11929
#define DCI_STATUS_reserved1_MASK                                  0x000000c0
11930
#define DCI_STATUS_reserved1_ALIGN                                 0
11931
#define DCI_STATUS_reserved1_BITS                                  2
11932
#define DCI_STATUS_reserved1_SHIFT                                 6
11933
11934
/* DCI :: STATUS :: GISB_ERROR [05:05] */
11935
#define DCI_STATUS_GISB_ERROR_MASK                                 0x00000020
11936
#define DCI_STATUS_GISB_ERROR_ALIGN                                0
11937
#define DCI_STATUS_GISB_ERROR_BITS                                 1
11938
#define DCI_STATUS_GISB_ERROR_SHIFT                                5
11939
11940
/* DCI :: STATUS :: DOWNLOAD_READY [04:04] */
11941
#define DCI_STATUS_DOWNLOAD_READY_MASK                             0x00000010
11942
#define DCI_STATUS_DOWNLOAD_READY_ALIGN                            0
11943
#define DCI_STATUS_DOWNLOAD_READY_BITS                             1
11944
#define DCI_STATUS_DOWNLOAD_READY_SHIFT                            4
11945
11946
/* DCI :: STATUS :: reserved2 [03:01] */
11947
#define DCI_STATUS_reserved2_MASK                                  0x0000000e
11948
#define DCI_STATUS_reserved2_ALIGN                                 0
11949
#define DCI_STATUS_reserved2_BITS                                  3
11950
#define DCI_STATUS_reserved2_SHIFT                                 1
11951
11952
/* DCI :: STATUS :: FIRMWARE_VALIDATED [00:00] */
11953
#define DCI_STATUS_FIRMWARE_VALIDATED_MASK                         0x00000001
11954
#define DCI_STATUS_FIRMWARE_VALIDATED_ALIGN                        0
11955
#define DCI_STATUS_FIRMWARE_VALIDATED_BITS                         1
11956
#define DCI_STATUS_FIRMWARE_VALIDATED_SHIFT                        0
11957
11958
11959
/****************************************************************************
11960
 * DCI :: DRAM_BASE_ADDR
11961
 ***************************************************************************/
11962
/* DCI :: DRAM_BASE_ADDR :: reserved0 [31:13] */
11963
#define DCI_DRAM_BASE_ADDR_reserved0_MASK                          0xffffe000
11964
#define DCI_DRAM_BASE_ADDR_reserved0_ALIGN                         0
11965
#define DCI_DRAM_BASE_ADDR_reserved0_BITS                          19
11966
#define DCI_DRAM_BASE_ADDR_reserved0_SHIFT                         13
11967
11968
/* DCI :: DRAM_BASE_ADDR :: BASE_ADDR [12:00] */
11969
#define DCI_DRAM_BASE_ADDR_BASE_ADDR_MASK                          0x00001fff
11970
#define DCI_DRAM_BASE_ADDR_BASE_ADDR_ALIGN                         0
11971
#define DCI_DRAM_BASE_ADDR_BASE_ADDR_BITS                          13
11972
#define DCI_DRAM_BASE_ADDR_BASE_ADDR_SHIFT                         0
11973
11974
11975
/****************************************************************************
11976
 * DCI :: FIRMWARE_ADDR
11977
 ***************************************************************************/
11978
/* DCI :: FIRMWARE_ADDR :: reserved0 [31:19] */
11979
#define DCI_FIRMWARE_ADDR_reserved0_MASK                           0xfff80000
11980
#define DCI_FIRMWARE_ADDR_reserved0_ALIGN                          0
11981
#define DCI_FIRMWARE_ADDR_reserved0_BITS                           13
11982
#define DCI_FIRMWARE_ADDR_reserved0_SHIFT                          19
11983
11984
/* DCI :: FIRMWARE_ADDR :: FW_ADDR [18:02] */
11985
#define DCI_FIRMWARE_ADDR_FW_ADDR_MASK                             0x0007fffc
11986
#define DCI_FIRMWARE_ADDR_FW_ADDR_ALIGN                            0
11987
#define DCI_FIRMWARE_ADDR_FW_ADDR_BITS                             17
11988
#define DCI_FIRMWARE_ADDR_FW_ADDR_SHIFT                            2
11989
11990
/* DCI :: FIRMWARE_ADDR :: reserved1 [01:00] */
11991
#define DCI_FIRMWARE_ADDR_reserved1_MASK                           0x00000003
11992
#define DCI_FIRMWARE_ADDR_reserved1_ALIGN                          0
11993
#define DCI_FIRMWARE_ADDR_reserved1_BITS                           2
11994
#define DCI_FIRMWARE_ADDR_reserved1_SHIFT                          0
11995
11996
11997
/****************************************************************************
11998
 * DCI :: FIRMWARE_DATA
11999
 ***************************************************************************/
12000
/* DCI :: FIRMWARE_DATA :: FW_DATA [31:00] */
12001
#define DCI_FIRMWARE_DATA_FW_DATA_MASK                             0xffffffff
12002
#define DCI_FIRMWARE_DATA_FW_DATA_ALIGN                            0
12003
#define DCI_FIRMWARE_DATA_FW_DATA_BITS                             32
12004
#define DCI_FIRMWARE_DATA_FW_DATA_SHIFT                            0
12005
12006
12007
/****************************************************************************
12008
 * DCI :: SIGNATURE_DATA_0
12009
 ***************************************************************************/
12010
/* DCI :: SIGNATURE_DATA_0 :: SIG_DATA_0 [31:00] */
12011
#define DCI_SIGNATURE_DATA_0_SIG_DATA_0_MASK                       0xffffffff
12012
#define DCI_SIGNATURE_DATA_0_SIG_DATA_0_ALIGN                      0
12013
#define DCI_SIGNATURE_DATA_0_SIG_DATA_0_BITS                       32
12014
#define DCI_SIGNATURE_DATA_0_SIG_DATA_0_SHIFT                      0
12015
12016
12017
/****************************************************************************
12018
 * DCI :: SIGNATURE_DATA_1
12019
 ***************************************************************************/
12020
/* DCI :: SIGNATURE_DATA_1 :: SIG_DATA_1 [31:00] */
12021
#define DCI_SIGNATURE_DATA_1_SIG_DATA_1_MASK                       0xffffffff
12022
#define DCI_SIGNATURE_DATA_1_SIG_DATA_1_ALIGN                      0
12023
#define DCI_SIGNATURE_DATA_1_SIG_DATA_1_BITS                       32
12024
#define DCI_SIGNATURE_DATA_1_SIG_DATA_1_SHIFT                      0
12025
12026
12027
/****************************************************************************
12028
 * DCI :: SIGNATURE_DATA_2
12029
 ***************************************************************************/
12030
/* DCI :: SIGNATURE_DATA_2 :: SIG_DATA_2 [31:00] */
12031
#define DCI_SIGNATURE_DATA_2_SIG_DATA_2_MASK                       0xffffffff
12032
#define DCI_SIGNATURE_DATA_2_SIG_DATA_2_ALIGN                      0
12033
#define DCI_SIGNATURE_DATA_2_SIG_DATA_2_BITS                       32
12034
#define DCI_SIGNATURE_DATA_2_SIG_DATA_2_SHIFT                      0
12035
12036
12037
/****************************************************************************
12038
 * DCI :: SIGNATURE_DATA_3
12039
 ***************************************************************************/
12040
/* DCI :: SIGNATURE_DATA_3 :: SIG_DATA_3 [31:00] */
12041
#define DCI_SIGNATURE_DATA_3_SIG_DATA_3_MASK                       0xffffffff
12042
#define DCI_SIGNATURE_DATA_3_SIG_DATA_3_ALIGN                      0
12043
#define DCI_SIGNATURE_DATA_3_SIG_DATA_3_BITS                       32
12044
#define DCI_SIGNATURE_DATA_3_SIG_DATA_3_SHIFT                      0
12045
12046
12047
/****************************************************************************
12048
 * DCI :: SIGNATURE_DATA_4
12049
 ***************************************************************************/
12050
/* DCI :: SIGNATURE_DATA_4 :: SIG_DATA_4 [31:00] */
12051
#define DCI_SIGNATURE_DATA_4_SIG_DATA_4_MASK                       0xffffffff
12052
#define DCI_SIGNATURE_DATA_4_SIG_DATA_4_ALIGN                      0
12053
#define DCI_SIGNATURE_DATA_4_SIG_DATA_4_BITS                       32
12054
#define DCI_SIGNATURE_DATA_4_SIG_DATA_4_SHIFT                      0
12055
12056
12057
/****************************************************************************
12058
 * DCI :: SIGNATURE_DATA_5
12059
 ***************************************************************************/
12060
/* DCI :: SIGNATURE_DATA_5 :: SIG_DATA_5 [31:00] */
12061
#define DCI_SIGNATURE_DATA_5_SIG_DATA_5_MASK                       0xffffffff
12062
#define DCI_SIGNATURE_DATA_5_SIG_DATA_5_ALIGN                      0
12063
#define DCI_SIGNATURE_DATA_5_SIG_DATA_5_BITS                       32
12064
#define DCI_SIGNATURE_DATA_5_SIG_DATA_5_SHIFT                      0
12065
12066
12067
/****************************************************************************
12068
 * DCI :: SIGNATURE_DATA_6
12069
 ***************************************************************************/
12070
/* DCI :: SIGNATURE_DATA_6 :: SIG_DATA_6 [31:00] */
12071
#define DCI_SIGNATURE_DATA_6_SIG_DATA_6_MASK                       0xffffffff
12072
#define DCI_SIGNATURE_DATA_6_SIG_DATA_6_ALIGN                      0
12073
#define DCI_SIGNATURE_DATA_6_SIG_DATA_6_BITS                       32
12074
#define DCI_SIGNATURE_DATA_6_SIG_DATA_6_SHIFT                      0
12075
12076
12077
/****************************************************************************
12078
 * DCI :: SIGNATURE_DATA_7
12079
 ***************************************************************************/
12080
/* DCI :: SIGNATURE_DATA_7 :: SIG_DATA_7 [31:00] */
12081
#define DCI_SIGNATURE_DATA_7_SIG_DATA_7_MASK                       0xffffffff
12082
#define DCI_SIGNATURE_DATA_7_SIG_DATA_7_ALIGN                      0
12083
#define DCI_SIGNATURE_DATA_7_SIG_DATA_7_BITS                       32
12084
#define DCI_SIGNATURE_DATA_7_SIG_DATA_7_SHIFT                      0
12085
12086
12087
/****************************************************************************
12088
 * BCM70012_DCI_TOP_DCI_RGR_BRIDGE
12089
 ***************************************************************************/
12090
/****************************************************************************
12091
 * DCI_RGR_BRIDGE :: REVISION
12092
 ***************************************************************************/
12093
/* DCI_RGR_BRIDGE :: REVISION :: reserved0 [31:16] */
12094
#define DCI_RGR_BRIDGE_REVISION_reserved0_MASK                     0xffff0000
12095
#define DCI_RGR_BRIDGE_REVISION_reserved0_ALIGN                    0
12096
#define DCI_RGR_BRIDGE_REVISION_reserved0_BITS                     16
12097
#define DCI_RGR_BRIDGE_REVISION_reserved0_SHIFT                    16
12098
12099
/* DCI_RGR_BRIDGE :: REVISION :: MAJOR [15:08] */
12100
#define DCI_RGR_BRIDGE_REVISION_MAJOR_MASK                         0x0000ff00
12101
#define DCI_RGR_BRIDGE_REVISION_MAJOR_ALIGN                        0
12102
#define DCI_RGR_BRIDGE_REVISION_MAJOR_BITS                         8
12103
#define DCI_RGR_BRIDGE_REVISION_MAJOR_SHIFT                        8
12104
12105
/* DCI_RGR_BRIDGE :: REVISION :: MINOR [07:00] */
12106
#define DCI_RGR_BRIDGE_REVISION_MINOR_MASK                         0x000000ff
12107
#define DCI_RGR_BRIDGE_REVISION_MINOR_ALIGN                        0
12108
#define DCI_RGR_BRIDGE_REVISION_MINOR_BITS                         8
12109
#define DCI_RGR_BRIDGE_REVISION_MINOR_SHIFT                        0
12110
12111
12112
/****************************************************************************
12113
 * DCI_RGR_BRIDGE :: CTRL
12114
 ***************************************************************************/
12115
/* DCI_RGR_BRIDGE :: CTRL :: reserved0 [31:02] */
12116
#define DCI_RGR_BRIDGE_CTRL_reserved0_MASK                         0xfffffffc
12117
#define DCI_RGR_BRIDGE_CTRL_reserved0_ALIGN                        0
12118
#define DCI_RGR_BRIDGE_CTRL_reserved0_BITS                         30
12119
#define DCI_RGR_BRIDGE_CTRL_reserved0_SHIFT                        2
12120
12121
/* DCI_RGR_BRIDGE :: CTRL :: rbus_error_intr [01:01] */
12122
#define DCI_RGR_BRIDGE_CTRL_rbus_error_intr_MASK                   0x00000002
12123
#define DCI_RGR_BRIDGE_CTRL_rbus_error_intr_ALIGN                  0
12124
#define DCI_RGR_BRIDGE_CTRL_rbus_error_intr_BITS                   1
12125
#define DCI_RGR_BRIDGE_CTRL_rbus_error_intr_SHIFT                  1
12126
#define DCI_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_DISABLE           0
12127
#define DCI_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_ENABLE            1
12128
12129
/* DCI_RGR_BRIDGE :: CTRL :: gisb_error_intr [00:00] */
12130
#define DCI_RGR_BRIDGE_CTRL_gisb_error_intr_MASK                   0x00000001
12131
#define DCI_RGR_BRIDGE_CTRL_gisb_error_intr_ALIGN                  0
12132
#define DCI_RGR_BRIDGE_CTRL_gisb_error_intr_BITS                   1
12133
#define DCI_RGR_BRIDGE_CTRL_gisb_error_intr_SHIFT                  0
12134
#define DCI_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_DISABLE           0
12135
#define DCI_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_ENABLE            1
12136
12137
12138
/****************************************************************************
12139
 * DCI_RGR_BRIDGE :: RBUS_TIMER
12140
 ***************************************************************************/
12141
/* DCI_RGR_BRIDGE :: RBUS_TIMER :: reserved0 [31:16] */
12142
#define DCI_RGR_BRIDGE_RBUS_TIMER_reserved0_MASK                   0xffff0000
12143
#define DCI_RGR_BRIDGE_RBUS_TIMER_reserved0_ALIGN                  0
12144
#define DCI_RGR_BRIDGE_RBUS_TIMER_reserved0_BITS                   16
12145
#define DCI_RGR_BRIDGE_RBUS_TIMER_reserved0_SHIFT                  16
12146
12147
/* DCI_RGR_BRIDGE :: RBUS_TIMER :: timer_value [15:00] */
12148
#define DCI_RGR_BRIDGE_RBUS_TIMER_timer_value_MASK                 0x0000ffff
12149
#define DCI_RGR_BRIDGE_RBUS_TIMER_timer_value_ALIGN                0
12150
#define DCI_RGR_BRIDGE_RBUS_TIMER_timer_value_BITS                 16
12151
#define DCI_RGR_BRIDGE_RBUS_TIMER_timer_value_SHIFT                0
12152
12153
12154
/****************************************************************************
12155
 * DCI_RGR_BRIDGE :: SPARE_SW_RESET_0
12156
 ***************************************************************************/
12157
/* DCI_RGR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */
12158
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK             0xfffffffe
12159
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN            0
12160
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS             31
12161
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT            1
12162
12163
/* DCI_RGR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */
12164
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK        0x00000001
12165
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN       0
12166
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS        1
12167
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT       0
12168
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_DEASSERT    0
12169
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ASSERT      1
12170
12171
12172
/****************************************************************************
12173
 * DCI_RGR_BRIDGE :: SPARE_SW_RESET_1
12174
 ***************************************************************************/
12175
/* DCI_RGR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */
12176
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK             0xfffffffe
12177
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN            0
12178
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS             31
12179
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT            1
12180
12181
/* DCI_RGR_BRIDGE :: SPARE_SW_RESET_1 :: SPARE_SW_RESET [00:00] */
12182
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_MASK        0x00000001
12183
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ALIGN       0
12184
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_BITS        1
12185
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_SHIFT       0
12186
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_DEASSERT    0
12187
#define DCI_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ASSERT      1
12188
12189
12190
/****************************************************************************
12191
 * BCM70012_CCE_TOP_CCE_RGR_BRIDGE
12192
 ***************************************************************************/
12193
/****************************************************************************
12194
 * CCE_RGR_BRIDGE :: REVISION
12195
 ***************************************************************************/
12196
/* CCE_RGR_BRIDGE :: REVISION :: reserved0 [31:16] */
12197
#define CCE_RGR_BRIDGE_REVISION_reserved0_MASK                     0xffff0000
12198
#define CCE_RGR_BRIDGE_REVISION_reserved0_ALIGN                    0
12199
#define CCE_RGR_BRIDGE_REVISION_reserved0_BITS                     16
12200
#define CCE_RGR_BRIDGE_REVISION_reserved0_SHIFT                    16
12201
12202
/* CCE_RGR_BRIDGE :: REVISION :: MAJOR [15:08] */
12203
#define CCE_RGR_BRIDGE_REVISION_MAJOR_MASK                         0x0000ff00
12204
#define CCE_RGR_BRIDGE_REVISION_MAJOR_ALIGN                        0
12205
#define CCE_RGR_BRIDGE_REVISION_MAJOR_BITS                         8
12206
#define CCE_RGR_BRIDGE_REVISION_MAJOR_SHIFT                        8
12207
12208
/* CCE_RGR_BRIDGE :: REVISION :: MINOR [07:00] */
12209
#define CCE_RGR_BRIDGE_REVISION_MINOR_MASK                         0x000000ff
12210
#define CCE_RGR_BRIDGE_REVISION_MINOR_ALIGN                        0
12211
#define CCE_RGR_BRIDGE_REVISION_MINOR_BITS                         8
12212
#define CCE_RGR_BRIDGE_REVISION_MINOR_SHIFT                        0
12213
12214
12215
/****************************************************************************
12216
 * CCE_RGR_BRIDGE :: CTRL
12217
 ***************************************************************************/
12218
/* CCE_RGR_BRIDGE :: CTRL :: reserved0 [31:02] */
12219
#define CCE_RGR_BRIDGE_CTRL_reserved0_MASK                         0xfffffffc
12220
#define CCE_RGR_BRIDGE_CTRL_reserved0_ALIGN                        0
12221
#define CCE_RGR_BRIDGE_CTRL_reserved0_BITS                         30
12222
#define CCE_RGR_BRIDGE_CTRL_reserved0_SHIFT                        2
12223
12224
/* CCE_RGR_BRIDGE :: CTRL :: rbus_error_intr [01:01] */
12225
#define CCE_RGR_BRIDGE_CTRL_rbus_error_intr_MASK                   0x00000002
12226
#define CCE_RGR_BRIDGE_CTRL_rbus_error_intr_ALIGN                  0
12227
#define CCE_RGR_BRIDGE_CTRL_rbus_error_intr_BITS                   1
12228
#define CCE_RGR_BRIDGE_CTRL_rbus_error_intr_SHIFT                  1
12229
#define CCE_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_DISABLE           0
12230
#define CCE_RGR_BRIDGE_CTRL_rbus_error_intr_INTR_ENABLE            1
12231
12232
/* CCE_RGR_BRIDGE :: CTRL :: gisb_error_intr [00:00] */
12233
#define CCE_RGR_BRIDGE_CTRL_gisb_error_intr_MASK                   0x00000001
12234
#define CCE_RGR_BRIDGE_CTRL_gisb_error_intr_ALIGN                  0
12235
#define CCE_RGR_BRIDGE_CTRL_gisb_error_intr_BITS                   1
12236
#define CCE_RGR_BRIDGE_CTRL_gisb_error_intr_SHIFT                  0
12237
#define CCE_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_DISABLE           0
12238
#define CCE_RGR_BRIDGE_CTRL_gisb_error_intr_INTR_ENABLE            1
12239
12240
12241
/****************************************************************************
12242
 * CCE_RGR_BRIDGE :: RBUS_TIMER
12243
 ***************************************************************************/
12244
/* CCE_RGR_BRIDGE :: RBUS_TIMER :: reserved0 [31:16] */
12245
#define CCE_RGR_BRIDGE_RBUS_TIMER_reserved0_MASK                   0xffff0000
12246
#define CCE_RGR_BRIDGE_RBUS_TIMER_reserved0_ALIGN                  0
12247
#define CCE_RGR_BRIDGE_RBUS_TIMER_reserved0_BITS                   16
12248
#define CCE_RGR_BRIDGE_RBUS_TIMER_reserved0_SHIFT                  16
12249
12250
/* CCE_RGR_BRIDGE :: RBUS_TIMER :: timer_value [15:00] */
12251
#define CCE_RGR_BRIDGE_RBUS_TIMER_timer_value_MASK                 0x0000ffff
12252
#define CCE_RGR_BRIDGE_RBUS_TIMER_timer_value_ALIGN                0
12253
#define CCE_RGR_BRIDGE_RBUS_TIMER_timer_value_BITS                 16
12254
#define CCE_RGR_BRIDGE_RBUS_TIMER_timer_value_SHIFT                0
12255
12256
12257
/****************************************************************************
12258
 * CCE_RGR_BRIDGE :: SPARE_SW_RESET_0
12259
 ***************************************************************************/
12260
/* CCE_RGR_BRIDGE :: SPARE_SW_RESET_0 :: reserved0 [31:01] */
12261
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_MASK             0xfffffffe
12262
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_ALIGN            0
12263
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_BITS             31
12264
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_reserved0_SHIFT            1
12265
12266
/* CCE_RGR_BRIDGE :: SPARE_SW_RESET_0 :: SPARE_SW_RESET [00:00] */
12267
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_MASK        0x00000001
12268
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ALIGN       0
12269
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_BITS        1
12270
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_SHIFT       0
12271
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_DEASSERT    0
12272
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_0_SPARE_SW_RESET_ASSERT      1
12273
12274
12275
/****************************************************************************
12276
 * CCE_RGR_BRIDGE :: SPARE_SW_RESET_1
12277
 ***************************************************************************/
12278
/* CCE_RGR_BRIDGE :: SPARE_SW_RESET_1 :: reserved0 [31:01] */
12279
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_MASK             0xfffffffe
12280
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_ALIGN            0
12281
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_BITS             31
12282
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_reserved0_SHIFT            1
12283
12284
/* CCE_RGR_BRIDGE :: SPARE_SW_RESET_1 :: SPARE_SW_RESET [00:00] */
12285
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_MASK        0x00000001
12286
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ALIGN       0
12287
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_BITS        1
12288
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_SHIFT       0
12289
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_DEASSERT    0
12290
#define CCE_RGR_BRIDGE_SPARE_SW_RESET_1_SPARE_SW_RESET_ASSERT      1
12291
750
12292
751
/****************************************************************************
12293
/****************************************************************************
752
 * Datatype Definitions.
12294
 * Datatype Definitions.
Lines 754-757 Link Here
754
#endif /* #ifndef MACFILE_H__ */
12296
#endif /* #ifndef MACFILE_H__ */
755
12297
756
/* End of File */
12298
/* End of File */
757
(-)crystalhd~/bcm_70015_regs.h (+1376 lines)
Line 0 Link Here
1
/***************************************************************************
2
 *     Copyright (c) 1999-2009, Broadcom Corporation
3
 *
4
 **********************************************************************
5
 * This file is part of the crystalhd device driver.
6
 *
7
 * This driver is free software; you can redistribute it and/or modify
8
 * it under the terms of the GNU General Public License as published by
9
 * the Free Software Foundation, version 2 of the License.
10
 *
11
 * This driver is distributed in the hope that it will be useful,
12
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
13
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
14
 * GNU General Public License for more details.
15
 *
16
 * You should have received a copy of the GNU General Public License
17
 * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
18
 **********************************************************************
19
 *
20
 * $brcm_Workfile: bchp_misc1.h $
21
 * $brcm_Revision: Hydra_Software_Devel/1 $
22
 * $brcm_Date: 7/17/09 8:11p $
23
 *
24
 * Module Description:
25
 *                     DO NOT EDIT THIS FILE DIRECTLY
26
 *
27
 * This module was generated magically with RDB from a source description
28
 * file. You must edit the source file for changes to be made to this file.
29
 *
30
 *
31
 * Date:           Generated on         Fri Jul 17 19:42:40 2009
32
 *                 MD5 Checksum         2914699efc3fb3edefca5cb4f4f38b34
33
 *
34
 * Compiled with:  RDB Utility          combo_header.pl
35
 *                 RDB Parser           3.0
36
 *                 unknown              unknown
37
 *                 Perl Interpreter     5.008008
38
 *                 Operating System     linux
39
 *
40
 * Revision History:
41
 *
42
 * $brcm_Log: /magnum/basemodules/chp/70015/rdb/a0/bchp_misc1.h $
43
 *
44
 * Hydra_Software_Devel/1   7/17/09 8:11p albertl
45
 * PR56880: Initial revision.
46
 *
47
 ***************************************************************************/
48
49
#ifndef BCHP_MISC1_H__
50
#define BCHP_MISC1_H__
51
52
/***************************************************************************
53
 *MISC1 - Registers for DMA List Control
54
 ***************************************************************************/
55
#define BCHP_MISC1_TX_FIRST_DESC_L_ADDR_LIST0    0x00502000 /* Tx DMA Descriptor List0 First Descriptor lower Address */
56
#define BCHP_MISC1_TX_FIRST_DESC_U_ADDR_LIST0    0x00502004 /* Tx DMA Descriptor List0 First Descriptor Upper Address */
57
#define BCHP_MISC1_TX_FIRST_DESC_L_ADDR_LIST1    0x00502008 /* Tx DMA Descriptor List1 First Descriptor Lower Address */
58
#define BCHP_MISC1_TX_FIRST_DESC_U_ADDR_LIST1    0x0050200c /* Tx DMA Descriptor List1 First Descriptor Upper Address */
59
#define BCHP_MISC1_TX_SW_DESC_LIST_CTRL_STS      0x00502010 /* Tx DMA Software Descriptor List Control and Status */
60
#define BCHP_MISC1_TX_DMA_ERROR_STATUS           0x00502018 /* Tx DMA Engine Error Status */
61
#define BCHP_MISC1_TX_DMA_CTRL                   0x00502034 /* Tx DMA Flea Interface Control */
62
#define BCHP_MISC1_Y_RX_SW_DESC_LIST_CTRL_STS    0x00502050 /* Y Rx Software Descriptor List Control and Status */
63
#define BCHP_MISC1_Y_RX_ERROR_STATUS             0x00502054 /* Y Rx Engine Error Status */
64
#define BCHP_MISC1_Y_RX_LIST0_CUR_BYTE_CNT       0x00502060 /* Y Rx List0 Current Descriptor Byte Count */
65
#define BCHP_MISC1_Y_RX_LIST1_CUR_BYTE_CNT       0x0050206c /* Y Rx List1 Current Descriptor Byte Count */
66
#define BCHP_MISC1_HIF_RX_ERROR_STATUS           0x00502094 /* HIF Rx Engine Error Status */
67
#define BCHP_MISC1_HIF_RX_LIST0_CUR_BYTE_CNT     0x005020a0 /* HIF Rx List0 Current Descriptor Byte Count */
68
#define BCHP_MISC1_HIF_RX_LIST1_CUR_BYTE_CNT     0x005020ac /* HIF Rx List1 Current Descriptor Byte Count */
69
#define BCHP_MISC1_HIF_DMA_CTRL                  0x005020b0 /* HIF Rx DMA Flea Interface Control */
70
#define BCHP_MISC1_DMA_DEBUG_OPTIONS_REG         0x005020c0 /* DMA Debug Options Register */
71
72
/***************************************************************************
73
 *TX_SW_DESC_LIST_CTRL_STS - Tx DMA Software Descriptor List Control and Status
74
 ***************************************************************************/
75
/* MISC1 :: TX_SW_DESC_LIST_CTRL_STS :: TX_DMA_RUN_STOP [00:00] */
76
#define BCHP_MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_MASK   0x00000001
77
78
#endif /* #ifndef BCHP_MISC1_H__ */
79
80
/**********************************************************************
81
 *
82
 * $brcm_Workfile: bchp_misc2.h $
83
 * $brcm_Revision: Hydra_Software_Devel/1 $
84
 * $brcm_Date: 7/17/09 8:11p $
85
 *
86
 * Module Description:
87
 *                     DO NOT EDIT THIS FILE DIRECTLY
88
 *
89
 * This module was generated magically with RDB from a source description
90
 * file. You must edit the source file for changes to be made to this file.
91
 *
92
 *
93
 * Date:           Generated on         Fri Jul 17 19:42:37 2009
94
 *                 MD5 Checksum         2914699efc3fb3edefca5cb4f4f38b34
95
 *
96
 * Compiled with:  RDB Utility          combo_header.pl
97
 *                 RDB Parser           3.0
98
 *                 unknown              unknown
99
 *                 Perl Interpreter     5.008008
100
 *                 Operating System     linux
101
 *
102
 * Revision History:
103
 *
104
 * $brcm_Log: /magnum/basemodules/chp/70015/rdb/a0/bchp_misc2.h $
105
 *
106
 * Hydra_Software_Devel/1   7/17/09 8:11p albertl
107
 * PR56880: Initial revision.
108
 *
109
 ***************************************************************************/
110
111
#ifndef BCHP_MISC2_H__
112
#define BCHP_MISC2_H__
113
114
/***************************************************************************
115
 *MISC2 - Registers for Meta DMA, Direct DRAM Access, Global Controls
116
 ***************************************************************************/
117
#define BCHP_MISC2_DIRECT_WINDOW_CONTROL         0x00502120 /* Direct DRAM Access Window Control */
118
119
/***************************************************************************
120
 *DIRECT_WINDOW_CONTROL - Direct DRAM Access Window Control
121
 ***************************************************************************/
122
/* MISC2 :: DIRECT_WINDOW_CONTROL :: DIRECT_WINDOW_BASE_ADDR [31:16] */
123
#define BCHP_MISC2_DIRECT_WINDOW_CONTROL_DIRECT_WINDOW_BASE_ADDR_MASK 0xffff0000
124
125
/* MISC2 :: DIRECT_WINDOW_CONTROL :: DIRECT_WINDOW_ENABLE [00:00] */
126
#define BCHP_MISC2_DIRECT_WINDOW_CONTROL_DIRECT_WINDOW_ENABLE_MASK 0x00000001
127
128
#endif /* #ifndef BCHP_MISC2_H__ */
129
130
/***************************************************************************
131
 *
132
 * $brcm_Workfile: bchp_misc3.h $
133
 * $brcm_Revision: Hydra_Software_Devel/1 $
134
 * $brcm_Date: 7/17/09 8:11p $
135
 *
136
 * Module Description:
137
 *                     DO NOT EDIT THIS FILE DIRECTLY
138
 *
139
 * This module was generated magically with RDB from a source description
140
 * file. You must edit the source file for changes to be made to this file.
141
 *
142
 *
143
 * Date:           Generated on         Fri Jul 17 19:42:19 2009
144
 *                 MD5 Checksum         2914699efc3fb3edefca5cb4f4f38b34
145
 *
146
 * Compiled with:  RDB Utility          combo_header.pl
147
 *                 RDB Parser           3.0
148
 *                 unknown              unknown
149
 *                 Perl Interpreter     5.008008
150
 *                 Operating System     linux
151
 *
152
 * Revision History:
153
 *
154
 * $brcm_Log: /magnum/basemodules/chp/70015/rdb/a0/bchp_misc3.h $
155
 *
156
 * Hydra_Software_Devel/1   7/17/09 8:11p albertl
157
 * PR56880: Initial revision.
158
 *
159
 ***************************************************************************/
160
161
#ifndef BCHP_MISC3_H__
162
#define BCHP_MISC3_H__
163
164
/***************************************************************************
165
 *MISC3 - Registers for Reset, Options, DMA Checksums
166
 ***************************************************************************/
167
#define BCHP_MISC3_RESET_CTRL                    0x00502200 /* Reset Control Register */
168
169
#endif /* #ifndef BCHP_MISC3_H__ */
170
171
/***************************************************************************
172
 *
173
 * $brcm_Workfile: bchp_scrub_ctrl.h $
174
 * $brcm_Revision: Hydra_Software_Devel/1 $
175
 * $brcm_Date: 7/17/09 8:18p $
176
 *
177
 * Module Description:
178
 *                     DO NOT EDIT THIS FILE DIRECTLY
179
 *
180
 * This module was generated magically with RDB from a source description
181
 * file. You must edit the source file for changes to be made to this file.
182
 *
183
 *
184
 * Date:           Generated on         Fri Jul 17 19:42:19 2009
185
 *                 MD5 Checksum         2914699efc3fb3edefca5cb4f4f38b34
186
 *
187
 * Compiled with:  RDB Utility          combo_header.pl
188
 *                 RDB Parser           3.0
189
 *                 unknown              unknown
190
 *                 Perl Interpreter     5.008008
191
 *                 Operating System     linux
192
 *
193
 * Revision History:
194
 *
195
 * $brcm_Log: /magnum/basemodules/chp/70015/rdb/a0/bchp_scrub_ctrl.h $
196
 *
197
 * Hydra_Software_Devel/1   7/17/09 8:18p albertl
198
 * PR56880: Initial revision.
199
 *
200
 ***************************************************************************/
201
202
#ifndef BCHP_SCRUB_CTRL_H__
203
#define BCHP_SCRUB_CTRL_H__
204
205
/***************************************************************************
206
 *SCRUB_CTRL - Scrub Control Registers
207
 ***************************************************************************/
208
#define BCHP_SCRUB_CTRL_SCRUB_ENABLE             0x000f6000 /* Secure Sequencer Enable */
209
#define BCHP_SCRUB_CTRL_BORCH_END_ADDRESS        0x000f6004 /* ARM Bridge Out-of-Range Checker End Address */
210
#define BCHP_SCRUB_CTRL_STARCH_END_ADDRESS       0x000f6008 /* Static ARCH End Address */
211
#define BCHP_SCRUB_CTRL_BI_CMAC_31_0             0x000f600c /* Boot Image CMAC value[31:0] */
212
#define BCHP_SCRUB_CTRL_BI_CMAC_63_32            0x000f6010 /* Boot Image CMAC value[63:32] */
213
#define BCHP_SCRUB_CTRL_BI_CMAC_95_64            0x000f6014 /* Boot Image CMAC value[95:64] */
214
#define BCHP_SCRUB_CTRL_BI_CMAC_127_96           0x000f6018 /* Boot Image CMAC value[127:96] */
215
216
/***************************************************************************
217
 *SCRUB_ENABLE - Secure Sequencer Enable
218
 ***************************************************************************/
219
/* SCRUB_CTRL :: SCRUB_ENABLE :: DSCRAM_EN [01:01] */
220
#define BCHP_SCRUB_CTRL_SCRUB_ENABLE_DSCRAM_EN_SHIFT               1
221
222
/* SCRUB_CTRL :: SCRUB_ENABLE :: SCRUB_EN [00:00] */
223
#define BCHP_SCRUB_CTRL_SCRUB_ENABLE_SCRUB_EN_SHIFT                0
224
225
/***************************************************************************
226
 *BORCH_END_ADDRESS - ARM Bridge Out-of-Range Checker End Address
227
 ***************************************************************************/
228
/* SCRUB_CTRL :: BORCH_END_ADDRESS :: BORCH_END_ADDR [26:00] */
229
#define BCHP_SCRUB_CTRL_BORCH_END_ADDRESS_BORCH_END_ADDR_MASK      0x07ffffff
230
231
#endif /* #ifndef BCHP_SCRUB_CTRL_H__ */
232
233
/***************************************************************************
234
 *
235
 * $brcm_Workfile: bchp_wrap_misc_intr2.h $
236
 * $brcm_Revision: Hydra_Software_Devel/1 $
237
 * $brcm_Date: 7/17/09 8:23p $
238
 *
239
 * Module Description:
240
 *                     DO NOT EDIT THIS FILE DIRECTLY
241
 *
242
 * This module was generated magically with RDB from a source description
243
 * file. You must edit the source file for changes to be made to this file.
244
 *
245
 *
246
 * Date:           Generated on         Fri Jul 17 19:43:21 2009
247
 *                 MD5 Checksum         2914699efc3fb3edefca5cb4f4f38b34
248
 *
249
 * Compiled with:  RDB Utility          combo_header.pl
250
 *                 RDB Parser           3.0
251
 *                 unknown              unknown
252
 *                 Perl Interpreter     5.008008
253
 *                 Operating System     linux
254
 *
255
 * Revision History:
256
 *
257
 * $brcm_Log: /magnum/basemodules/chp/70015/rdb/a0/bchp_wrap_misc_intr2.h $
258
 *
259
 * Hydra_Software_Devel/1   7/17/09 8:23p albertl
260
 * PR56880: Initial revision.
261
 *
262
 ***************************************************************************/
263
264
#ifndef BCHP_WRAP_MISC_INTR2_H__
265
#define BCHP_WRAP_MISC_INTR2_H__
266
267
/***************************************************************************
268
 *WRAP_MISC_INTR2 - MISC block Level 2 Interrupt Controller
269
 ***************************************************************************/
270
#define BCHP_WRAP_MISC_INTR2_CPU_STATUS          0x000f2000 /* CPU interrupt Status Register */
271
#define BCHP_WRAP_MISC_INTR2_PCI_STATUS          0x000f2018 /* PCI interrupt Status Register */
272
#define BCHP_WRAP_MISC_INTR2_PCI_CLEAR           0x000f2020 /* PCI interrupt Clear Register */
273
274
/***************************************************************************
275
 *CPU_STATUS - CPU interrupt Status Register
276
 ***************************************************************************/
277
/* WRAP_MISC_INTR2 :: CPU_STATUS :: BOOT_VER_FAIL_INTR [23:23] */
278
#define BCHP_WRAP_MISC_INTR2_CPU_STATUS_BOOT_VER_FAIL_INTR_SHIFT   23
279
280
/* WRAP_MISC_INTR2 :: CPU_STATUS :: BOOT_VER_DONE_INTR [22:22] */
281
#define BCHP_WRAP_MISC_INTR2_CPU_STATUS_BOOT_VER_DONE_INTR_SHIFT   22
282
283
/* WRAP_MISC_INTR2 :: CPU_STATUS :: SCRM_KEY_DONE_INTR [19:19] */
284
#define BCHP_WRAP_MISC_INTR2_CPU_STATUS_SCRM_KEY_DONE_INTR_SHIFT   19
285
286
/* WRAP_MISC_INTR2 :: CPU_STATUS :: SHARF_ERR_INTR [04:04] */
287
#define BCHP_WRAP_MISC_INTR2_CPU_STATUS_SHARF_ERR_INTR_SHIFT       4
288
289
#endif /* #ifndef BCHP_WRAP_MISC_INTR2_H__ */
290
291
/***************************************************************************
292
 *
293
 * $brcm_Workfile: bchp_armcr4_bridge.h $
294
 * $brcm_Revision: Hydra_Software_Devel/1 $
295
 * $brcm_Date: 7/17/09 8:28p $
296
 *
297
 * Module Description:
298
 *                     DO NOT EDIT THIS FILE DIRECTLY
299
 *
300
 * This module was generated magically with RDB from a source description
301
 * file. You must edit the source file for changes to be made to this file.
302
 *
303
 *
304
 * Date:           Generated on         Fri Jul 17 19:42:56 2009
305
 *                 MD5 Checksum         2914699efc3fb3edefca5cb4f4f38b34
306
 *
307
 * Compiled with:  RDB Utility          combo_header.pl
308
 *                 RDB Parser           3.0
309
 *                 unknown              unknown
310
 *                 Perl Interpreter     5.008008
311
 *                 Operating System     linux
312
 *
313
 * Revision History:
314
 *
315
 * $brcm_Log: /magnum/basemodules/chp/70015/rdb/a0/bchp_armcr4_bridge.h $
316
 *
317
 * Hydra_Software_Devel/1   7/17/09 8:28p albertl
318
 * PR56880: Initial revision.
319
 *
320
 ***************************************************************************/
321
322
#ifndef BCHP_ARMCR4_BRIDGE_H__
323
#define BCHP_ARMCR4_BRIDGE_H__
324
325
/***************************************************************************
326
 *ARMCR4_BRIDGE - ARM Cortex R4 Bridge control registers
327
 ***************************************************************************/
328
#define BCHP_ARMCR4_BRIDGE_REG_CORE_REV_ID       0x000e0000 /* ARM Cortex R4 bridge revision ID */
329
#define BCHP_ARMCR4_BRIDGE_REG_BRIDGE_CTL        0x000e0004 /* Bridge interface and buffer configuration
330
 */
331
#define BCHP_ARMCR4_BRIDGE_REG_ARM_CTL           0x000e0008 /* ARM core configuration */
332
#define BCHP_ARMCR4_BRIDGE_REG_BRIDGE_STS        0x000e0014 /* Bridge interface and buffer status */
333
#define BCHP_ARMCR4_BRIDGE_REG_MBOX_PCI1         0x000e0018 /* PCI mailbox #1 */
334
#define BCHP_ARMCR4_BRIDGE_REG_MBOX_ARM1         0x000e001c /* ARM mailbox #1 */
335
#define BCHP_ARMCR4_BRIDGE_REG_MBOX_PCI2         0x000e0020 /* PCI mailbox #2 */
336
#define BCHP_ARMCR4_BRIDGE_REG_MBOX_ARM2         0x000e0024 /* ARM mailbox #2 */
337
#define BCHP_ARMCR4_BRIDGE_REG_MBOX_PCI3         0x000e0028 /* PCI mailbox #3 */
338
#define BCHP_ARMCR4_BRIDGE_REG_MBOX_ARM3         0x000e002c /* ARM mailbox #3 */
339
#define BCHP_ARMCR4_BRIDGE_REG_MBOX_PCI4         0x000e0030 /* PCI mailbox #4 */
340
#define BCHP_ARMCR4_BRIDGE_REG_MBOX_ARM4         0x000e0034 /* ARM mailbox #4 */
341
#define BCHP_ARMCR4_BRIDGE_REG_SEMAPHORE_1       0x000e0038 /* CPU semaphore #1 */
342
#define BCHP_ARMCR4_BRIDGE_REG_SEMAPHORE_2       0x000e003c /* CPU semaphore #2 */
343
#define BCHP_ARMCR4_BRIDGE_REG_SEMAPHORE_3       0x000e0040 /* CPU semaphore #3 */
344
#define BCHP_ARMCR4_BRIDGE_REG_SEMAPHORE_4       0x000e0044 /* CPU semaphore #4 */
345
#define BCHP_ARMCR4_BRIDGE_REG_SCRATCH_1         0x000e0048 /* CPU scratchpad #1 */
346
#define BCHP_ARMCR4_BRIDGE_REG_SCRATCH_2         0x000e004c /* CPU scratchpad #2 */
347
#define BCHP_ARMCR4_BRIDGE_REG_SCRATCH_3         0x000e0050 /* CPU scratchpad #3 */
348
#define BCHP_ARMCR4_BRIDGE_REG_SCRATCH_4         0x000e0054 /* CPU scratchpad #4 */
349
#define BCHP_ARMCR4_BRIDGE_REG_SCRATCH_5         0x000e0058 /* CPU scratchpad #5 */
350
#define BCHP_ARMCR4_BRIDGE_REG_SCRATCH_6         0x000e005c /* CPU scratchpad #6 */
351
#define BCHP_ARMCR4_BRIDGE_REG_SCRATCH_7         0x000e0060 /* CPU scratchpad #7 */
352
#define BCHP_ARMCR4_BRIDGE_REG_SCRATCH_8         0x000e0064 /* CPU scratchpad #8 */
353
#define BCHP_ARMCR4_BRIDGE_REG_SCRATCH_9         0x000e0068 /* CPU scratchpad #9 */
354
#define BCHP_ARMCR4_BRIDGE_REG_PERF_CONFIG       0x000e006c /* Performance monitor configuration */
355
#define BCHP_ARMCR4_BRIDGE_REG_PERF_LIMIT        0x000e0070 /* Performance monitor count threshold */
356
#define BCHP_ARMCR4_BRIDGE_REG_PERF_WR_CNT       0x000e0074 /* Counts the number of merge buffer updates (hits + misses) */
357
#define BCHP_ARMCR4_BRIDGE_REG_PERF_WR_MISS      0x000e0078 /* Counts the number of merge buffer misses */
358
#define BCHP_ARMCR4_BRIDGE_REG_PERF_RD_CNT       0x000e007c /* Counts the number of prefetch buffer accesses (hits + misses) */
359
#define BCHP_ARMCR4_BRIDGE_REG_PERF_RD_MISS      0x000e0080 /* Counts the number of prefetch buffer misses */
360
#define BCHP_ARMCR4_BRIDGE_REG_MEMORY_TM1        0x000e0084 /* ARM memory TM1 control register */
361
#define BCHP_ARMCR4_BRIDGE_REG_MEMORY_TM2        0x000e0088 /* ARM memory TM2 control register */
362
#define BCHP_ARMCR4_BRIDGE_REG_MEMORY_TM3        0x000e008c /* ARM memory TM3 control register */
363
#define BCHP_ARMCR4_BRIDGE_REG_FIFO_STATUS       0x000e0090 /* Fifo Status */
364
#define BCHP_ARMCR4_BRIDGE_REG_BORCH_STATUS      0x000e0094 /* Bridge Out-of-range Checker Status */
365
#define BCHP_ARMCR4_BRIDGE_REG_MEMORY_TM4        0x000e0098 /* ARM memory TM4 control register */
366
367
368
/***************************************************************************
369
 *REG_BRIDGE_CTL - Bridge interface and buffer configuration
370
 ***************************************************************************/
371
/* ARMCR4_BRIDGE :: REG_BRIDGE_CTL :: arm_run_request [01:01] */
372
#define BCHP_ARMCR4_BRIDGE_REG_BRIDGE_CTL_arm_run_request_SHIFT    1
373
374
#endif /* #ifndef BCHP_ARMCR4_BRIDGE_H__ */
375
376
/***************************************************************************
377
 *
378
 * $brcm_Workfile: bchp_intr.h $
379
 * $brcm_Revision: Hydra_Software_Devel/1 $
380
 * $brcm_Date: 7/17/09 8:09p $
381
 *
382
 * Module Description:
383
 *                     DO NOT EDIT THIS FILE DIRECTLY
384
 *
385
 * This module was generated magically with RDB from a source description
386
 * file. You must edit the source file for changes to be made to this file.
387
 *
388
 *
389
 * Date:           Generated on         Fri Jul 17 19:42:44 2009
390
 *                 MD5 Checksum         2914699efc3fb3edefca5cb4f4f38b34
391
 *
392
 * Compiled with:  RDB Utility          combo_header.pl
393
 *                 RDB Parser           3.0
394
 *                 unknown              unknown
395
 *                 Perl Interpreter     5.008008
396
 *                 Operating System     linux
397
 *
398
 * Revision History:
399
 *
400
 * $brcm_Log: /magnum/basemodules/chp/70015/rdb/a0/bchp_intr.h $
401
 *
402
 * Hydra_Software_Devel/1   7/17/09 8:09p albertl
403
 * PR56880: Initial revision.
404
 *
405
 ***************************************************************************/
406
407
#ifndef BCHP_INTR_H__
408
#define BCHP_INTR_H__
409
410
/***************************************************************************
411
 *INTR - TGT L2 Interrupt Controller Registers
412
 ***************************************************************************/
413
#define BCHP_INTR_INTR_STATUS                    0x00500700 /* Interrupt Status Register */
414
#define BCHP_INTR_INTR_CLR_REG                   0x00500708 /* Interrupt Clear Register */
415
#define BCHP_INTR_INTR_MSK_SET_REG               0x00500710 /* Interrupt Mask Set Register */
416
#define BCHP_INTR_INTR_MSK_CLR_REG               0x00500714 /* Interrupt Mask Clear Register */
417
#define BCHP_INTR_EOI_CTRL                       0x00500718 /* End of interrupt control register */
418
419
420
#endif /* #ifndef BCHP_INTR_H__ */
421
422
/***************************************************************************
423
 *
424
 * $brcm_Workfile: bchp_pri_arb_control_regs.h $
425
 * $brcm_Revision: Hydra_Software_Devel/1 $
426
 * $brcm_Date: 7/17/09 8:14p $
427
 *
428
 * Module Description:
429
 *                     DO NOT EDIT THIS FILE DIRECTLY
430
 *
431
 * This module was generated magically with RDB from a source description
432
 * file. You must edit the source file for changes to be made to this file.
433
 *
434
 *
435
 * Date:           Generated on         Fri Jul 17 19:43:12 2009
436
 *                 MD5 Checksum         2914699efc3fb3edefca5cb4f4f38b34
437
 *
438
 * Compiled with:  RDB Utility          combo_header.pl
439
 *                 RDB Parser           3.0
440
 *                 unknown              unknown
441
 *                 Perl Interpreter     5.008008
442
 *                 Operating System     linux
443
 *
444
 * Revision History:
445
 *
446
 * $brcm_Log: /magnum/basemodules/chp/70015/rdb/a0/bchp_pri_arb_control_regs.h $
447
 *
448
 * Hydra_Software_Devel/1   7/17/09 8:14p albertl
449
 * PR56880: Initial revision.
450
 *
451
 ***************************************************************************/
452
453
#ifndef BCHP_PRI_ARB_CONTROL_REGS_H__
454
#define BCHP_PRI_ARB_CONTROL_REGS_H__
455
456
/***************************************************************************
457
 *PRI_ARB_CONTROL_REGS - PRIMARY_ARB control registers
458
 ***************************************************************************/
459
#define BCHP_PRI_ARB_CONTROL_REGS_REFRESH_CTL_0  0x0040cb00 /* Refresh client control for ddr interface #0 */
460
#define BCHP_PRI_ARB_CONTROL_REGS_MASTER_CTL     0x0040cb30 /* Master Control */
461
462
/***************************************************************************
463
 *REFRESH_CTL_0 - Refresh client control for ddr interface #0
464
 ***************************************************************************/
465
/* PRI_ARB_CONTROL_REGS :: REFRESH_CTL_0 :: enable [12:12] */
466
#define BCHP_PRI_ARB_CONTROL_REGS_REFRESH_CTL_0_enable_MASK        0x00001000
467
468
/***************************************************************************
469
 *MASTER_CTL - Master Control
470
 ***************************************************************************/
471
/* PRI_ARB_CONTROL_REGS :: MASTER_CTL :: arb_disable [00:00] */
472
#define BCHP_PRI_ARB_CONTROL_REGS_MASTER_CTL_arb_disable_Enable    0
473
#define BCHP_PRI_ARB_CONTROL_REGS_MASTER_CTL_arb_disable_Disable   1
474
475
#endif /* #ifndef BCHP_PRI_ARB_CONTROL_REGS_H__ */
476
477
/***************************************************************************
478
 *
479
 * $brcm_Workfile: bchp_ddr23_ctl_regs_0.h $
480
 * $brcm_Revision: Hydra_Software_Devel/1 $
481
 * $brcm_Date: 7/17/09 7:59p $
482
 *
483
 * Module Description:
484
 *                     DO NOT EDIT THIS FILE DIRECTLY
485
 *
486
 * This module was generated magically with RDB from a source description
487
 * file. You must edit the source file for changes to be made to this file.
488
 *
489
 *
490
 * Date:           Generated on         Fri Jul 17 19:43:08 2009
491
 *                 MD5 Checksum         2914699efc3fb3edefca5cb4f4f38b34
492
 *
493
 * Compiled with:  RDB Utility          combo_header.pl
494
 *                 RDB Parser           3.0
495
 *                 unknown              unknown
496
 *                 Perl Interpreter     5.008008
497
 *                 Operating System     linux
498
 *
499
 * Revision History:
500
 *
501
 * $brcm_Log: /magnum/basemodules/chp/70015/rdb/a0/bchp_ddr23_ctl_regs_0.h $
502
 *
503
 * Hydra_Software_Devel/1   7/17/09 7:59p albertl
504
 * PR56880: Initial revision.
505
 *
506
 ***************************************************************************/
507
508
#ifndef BCHP_DDR23_CTL_REGS_0_H__
509
#define BCHP_DDR23_CTL_REGS_0_H__
510
511
/***************************************************************************
512
 *DDR23_CTL_REGS_0 - DDR23 controller registers
513
 ***************************************************************************/
514
#define BCHP_DDR23_CTL_REGS_0_CTL_STATUS         0x01800004 /* DDR23 Controller status register */
515
#define BCHP_DDR23_CTL_REGS_0_PARAMS1            0x01800010 /* DDR23 Controller Configuration Set #1 */
516
#define BCHP_DDR23_CTL_REGS_0_PARAMS2            0x01800014 /* DDR23 Controller Configuration Set #2 */
517
#define BCHP_DDR23_CTL_REGS_0_PARAMS3            0x01800018 /* DDR23 Controller Configuration Set #3 */
518
#define BCHP_DDR23_CTL_REGS_0_REFRESH            0x0180001c /* DDR23 Controller Automated Refresh Configuration */
519
#define BCHP_DDR23_CTL_REGS_0_REFRESH_CMD        0x01800020 /* Host Initiated Refresh Control */
520
#define BCHP_DDR23_CTL_REGS_0_PRECHARGE_CMD      0x01800024 /* Host Initiated Precharge Control */
521
#define BCHP_DDR23_CTL_REGS_0_LOAD_MODE_CMD      0x01800028 /* Host Initiated Load Mode Control */
522
#define BCHP_DDR23_CTL_REGS_0_LOAD_EMODE_CMD     0x0180002c /* Host Initiated Load Extended Mode Control */
523
#define BCHP_DDR23_CTL_REGS_0_LOAD_EMODE2_CMD    0x01800030 /* Host Initiated Load Extended Mode #2 Control */
524
#define BCHP_DDR23_CTL_REGS_0_LOAD_EMODE3_CMD    0x01800034 /* Host Initiated Load Extended Mode #3 Control */
525
#define BCHP_DDR23_CTL_REGS_0_ZQ_CALIBRATE       0x01800038 /* Host Initiated ZQ Calibration Cycle */
526
#define BCHP_DDR23_CTL_REGS_0_LATENCY            0x01800040 /* DDR2 Controller Access Latency Control */
527
#define BCHP_DDR23_CTL_REGS_0_SCRATCH            0x01800058 /* Scratch Register */
528
#define BCHP_DDR23_CTL_REGS_0_UPDATE_VDL         0x018000f0 /* RAM Macro TM Control */
529
530
/***************************************************************************
531
 *CTL_STATUS - DDR23 Controller status register
532
 ***************************************************************************/
533
/* DDR23_CTL_REGS_0 :: CTL_STATUS :: clke [01:01] */
534
#define BCHP_DDR23_CTL_REGS_0_CTL_STATUS_clke_MASK                 0x00000002
535
536
/* DDR23_CTL_REGS_0 :: CTL_STATUS :: idle [00:00] */
537
#define BCHP_DDR23_CTL_REGS_0_CTL_STATUS_idle_MASK                 0x00000001
538
539
/***************************************************************************
540
 *PARAMS1 - DDR23 Controller Configuration Set #1
541
 ***************************************************************************/
542
/* DDR23_CTL_REGS_0 :: PARAMS1 :: trtp [31:28] */
543
#define BCHP_DDR23_CTL_REGS_0_PARAMS1_trtp_MASK                    0xf0000000
544
#define BCHP_DDR23_CTL_REGS_0_PARAMS1_trtp_SHIFT                   28
545
546
/* DDR23_CTL_REGS_0 :: PARAMS1 :: twl [27:24] */
547
#define BCHP_DDR23_CTL_REGS_0_PARAMS1_twl_MASK                     0x0f000000
548
#define BCHP_DDR23_CTL_REGS_0_PARAMS1_twl_SHIFT                    24
549
550
/* DDR23_CTL_REGS_0 :: PARAMS1 :: tcas [23:20] */
551
#define BCHP_DDR23_CTL_REGS_0_PARAMS1_tcas_MASK                    0x00f00000
552
#define BCHP_DDR23_CTL_REGS_0_PARAMS1_tcas_SHIFT                   20
553
554
/* DDR23_CTL_REGS_0 :: PARAMS1 :: twtr [19:16] */
555
#define BCHP_DDR23_CTL_REGS_0_PARAMS1_twtr_MASK                    0x000f0000
556
#define BCHP_DDR23_CTL_REGS_0_PARAMS1_twtr_SHIFT                   16
557
558
/* DDR23_CTL_REGS_0 :: PARAMS1 :: twr [15:12] */
559
#define BCHP_DDR23_CTL_REGS_0_PARAMS1_twr_MASK                     0x0000f000
560
#define BCHP_DDR23_CTL_REGS_0_PARAMS1_twr_SHIFT                    12
561
562
/* DDR23_CTL_REGS_0 :: PARAMS1 :: trrd [11:08] */
563
#define BCHP_DDR23_CTL_REGS_0_PARAMS1_trrd_MASK                    0x00000f00
564
#define BCHP_DDR23_CTL_REGS_0_PARAMS1_trrd_SHIFT                   8
565
566
/* DDR23_CTL_REGS_0 :: PARAMS1 :: trp [07:04] */
567
#define BCHP_DDR23_CTL_REGS_0_PARAMS1_trp_MASK                     0x000000f0
568
#define BCHP_DDR23_CTL_REGS_0_PARAMS1_trp_SHIFT                    4
569
570
/* DDR23_CTL_REGS_0 :: PARAMS1 :: trcd [03:00] */
571
#define BCHP_DDR23_CTL_REGS_0_PARAMS1_trcd_MASK                    0x0000000f
572
#define BCHP_DDR23_CTL_REGS_0_PARAMS1_trcd_SHIFT                   0
573
574
/***************************************************************************
575
 *PARAMS2 - DDR23 Controller Configuration Set #2
576
 ***************************************************************************/
577
/* DDR23_CTL_REGS_0 :: PARAMS2 :: auto_idle [31:31] */
578
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_auto_idle_MASK               0x80000000
579
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_auto_idle_SHIFT              31
580
581
/* DDR23_CTL_REGS_0 :: PARAMS2 :: row_bits [30:30] */
582
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_row_bits_MASK                0x40000000
583
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_row_bits_SHIFT               30
584
585
/* DDR23_CTL_REGS_0 :: PARAMS2 :: use_chr_hgt [29:29] */
586
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_use_chr_hgt_MASK             0x20000000
587
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_use_chr_hgt_SHIFT            29
588
589
/* DDR23_CTL_REGS_0 :: PARAMS2 :: clke [28:28] */
590
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_clke_MASK                    0x10000000
591
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_clke_SHIFT                   28
592
593
/* DDR23_CTL_REGS_0 :: PARAMS2 :: sd_col_bits [27:26] */
594
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_sd_col_bits_MASK             0x0c000000
595
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_sd_col_bits_SHIFT            26
596
597
/* DDR23_CTL_REGS_0 :: PARAMS2 :: il_sel [25:25] */
598
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_il_sel_MASK                  0x02000000
599
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_il_sel_SHIFT                 25
600
601
/* DDR23_CTL_REGS_0 :: PARAMS2 :: dis_itlv [24:24] */
602
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_dis_itlv_MASK                0x01000000
603
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_dis_itlv_SHIFT               24
604
605
/* DDR23_CTL_REGS_0 :: PARAMS2 :: reserved0 [23:23] */
606
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_reserved0_MASK               0x00800000
607
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_reserved0_SHIFT              23
608
609
/* DDR23_CTL_REGS_0 :: PARAMS2 :: cs0_only [22:22] */
610
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_cs0_only_MASK                0x00400000
611
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_cs0_only_SHIFT               22
612
613
/* DDR23_CTL_REGS_0 :: PARAMS2 :: allow_pictmem_rd [21:21] */
614
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_allow_pictmem_rd_MASK        0x00200000
615
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_allow_pictmem_rd_SHIFT       21
616
617
/* DDR23_CTL_REGS_0 :: PARAMS2 :: bank_bits [20:20] */
618
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_bank_bits_MASK               0x00100000
619
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_bank_bits_SHIFT              20
620
621
/* DDR23_CTL_REGS_0 :: PARAMS2 :: trfc [19:12] */
622
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_trfc_MASK                    0x000ff000
623
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_trfc_SHIFT                   12
624
625
/* DDR23_CTL_REGS_0 :: PARAMS2 :: tfaw [11:06] */
626
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_tfaw_MASK                    0x00000fc0
627
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_tfaw_SHIFT                   6
628
629
/* DDR23_CTL_REGS_0 :: PARAMS2 :: tras [05:00] */
630
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_tras_MASK                    0x0000003f
631
#define BCHP_DDR23_CTL_REGS_0_PARAMS2_tras_SHIFT                   0
632
633
/***************************************************************************
634
 *PARAMS3 - DDR23 Controller Configuration Set #3
635
 ***************************************************************************/
636
/* DDR23_CTL_REGS_0 :: PARAMS3 :: ddr3_reset [31:31] */
637
#define BCHP_DDR23_CTL_REGS_0_PARAMS3_ddr3_reset_MASK              0x80000000
638
#define BCHP_DDR23_CTL_REGS_0_PARAMS3_ddr3_reset_SHIFT             31
639
640
/* DDR23_CTL_REGS_0 :: PARAMS3 :: reserved0 [30:06] */
641
#define BCHP_DDR23_CTL_REGS_0_PARAMS3_reserved0_MASK               0x7fffffc0
642
#define BCHP_DDR23_CTL_REGS_0_PARAMS3_reserved0_SHIFT              6
643
644
/* DDR23_CTL_REGS_0 :: PARAMS3 :: ddr_bl [05:05] */
645
#define BCHP_DDR23_CTL_REGS_0_PARAMS3_ddr_bl_MASK                  0x00000020
646
#define BCHP_DDR23_CTL_REGS_0_PARAMS3_ddr_bl_SHIFT                 5
647
648
/* DDR23_CTL_REGS_0 :: PARAMS3 :: cmd_2t [04:04] */
649
#define BCHP_DDR23_CTL_REGS_0_PARAMS3_cmd_2t_MASK                  0x00000010
650
#define BCHP_DDR23_CTL_REGS_0_PARAMS3_cmd_2t_SHIFT                 4
651
652
/* DDR23_CTL_REGS_0 :: PARAMS3 :: wr_odt_mode [03:03] */
653
#define BCHP_DDR23_CTL_REGS_0_PARAMS3_wr_odt_mode_MASK             0x00000008
654
#define BCHP_DDR23_CTL_REGS_0_PARAMS3_wr_odt_mode_SHIFT            3
655
656
/* DDR23_CTL_REGS_0 :: PARAMS3 :: wr_odt_te_adj [02:02] */
657
#define BCHP_DDR23_CTL_REGS_0_PARAMS3_wr_odt_te_adj_MASK           0x00000004
658
#define BCHP_DDR23_CTL_REGS_0_PARAMS3_wr_odt_te_adj_SHIFT          2
659
660
/* DDR23_CTL_REGS_0 :: PARAMS3 :: wr_odt_le_adj [01:01] */
661
#define BCHP_DDR23_CTL_REGS_0_PARAMS3_wr_odt_le_adj_MASK           0x00000002
662
#define BCHP_DDR23_CTL_REGS_0_PARAMS3_wr_odt_le_adj_SHIFT          1
663
664
/* DDR23_CTL_REGS_0 :: PARAMS3 :: wr_odt_en [00:00] */
665
#define BCHP_DDR23_CTL_REGS_0_PARAMS3_wr_odt_en_MASK               0x00000001
666
#define BCHP_DDR23_CTL_REGS_0_PARAMS3_wr_odt_en_SHIFT              0
667
668
/***************************************************************************
669
 *UPDATE_VDL - RAM Macro TM Control
670
 ***************************************************************************/
671
/* DDR23_CTL_REGS_0 :: UPDATE_VDL :: refresh [00:00] */
672
#define BCHP_DDR23_CTL_REGS_0_UPDATE_VDL_refresh_MASK              0x00000001
673
674
675
#endif /* #ifndef BCHP_DDR23_CTL_REGS_0_H__ */
676
677
/***************************************************************************
678
 *
679
 * $brcm_Workfile: bchp_ddr23_phy_byte_lane_0.h $
680
 * $brcm_Revision: Hydra_Software_Devel/1 $
681
 * $brcm_Date: 7/17/09 7:59p $
682
 *
683
 * Module Description:
684
 *                     DO NOT EDIT THIS FILE DIRECTLY
685
 *
686
 * This module was generated magically with RDB from a source description
687
 * file. You must edit the source file for changes to be made to this file.
688
 *
689
 *
690
 * Date:           Generated on         Fri Jul 17 19:43:18 2009
691
 *                 MD5 Checksum         2914699efc3fb3edefca5cb4f4f38b34
692
 *
693
 * Compiled with:  RDB Utility          combo_header.pl
694
 *                 RDB Parser           3.0
695
 *                 unknown              unknown
696
 *                 Perl Interpreter     5.008008
697
 *                 Operating System     linux
698
 *
699
 * Revision History:
700
 *
701
 * $brcm_Log: /magnum/basemodules/chp/70015/rdb/a0/bchp_ddr23_phy_byte_lane_0.h $
702
 *
703
 * Hydra_Software_Devel/1   7/17/09 7:59p albertl
704
 * PR56880: Initial revision.
705
 *
706
 ***************************************************************************/
707
708
#ifndef BCHP_DDR23_PHY_BYTE_LANE_0_H__
709
#define BCHP_DDR23_PHY_BYTE_LANE_0_H__
710
711
/***************************************************************************
712
 *DDR23_PHY_BYTE_LANE_0 - DDR23 DDR23 byte lane #0 control registers
713
 ***************************************************************************/
714
#define BCHP_DDR23_PHY_BYTE_LANE_0_VDL_CALIBRATE 0x01801204 /* Byte lane VDL calibration control register */
715
#define BCHP_DDR23_PHY_BYTE_LANE_0_VDL_STATUS    0x01801208 /* Byte lane VDL calibration status register */
716
#define BCHP_DDR23_PHY_BYTE_LANE_0_VDL_OVERRIDE_0 0x01801210 /* Read DQSP VDL static override control register */
717
#define BCHP_DDR23_PHY_BYTE_LANE_0_VDL_OVERRIDE_1 0x01801214 /* Read DQSN VDL static override control register */
718
#define BCHP_DDR23_PHY_BYTE_LANE_0_VDL_OVERRIDE_2 0x01801218 /* Read Enable VDL static override control register */
719
#define BCHP_DDR23_PHY_BYTE_LANE_0_VDL_OVERRIDE_3 0x0180121c /* Write data and mask VDL static override control register */
720
#define BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL  0x01801230 /* Byte Lane read channel control register */
721
#define BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL 0x0180123c /* Idle mode SSTL pad control register */
722
#define BCHP_DDR23_PHY_BYTE_LANE_0_DRIVE_PAD_CTL 0x01801240 /* SSTL pad drive characteristics control register */
723
#define BCHP_DDR23_PHY_BYTE_LANE_0_WR_PREAMBLE_MODE 0x01801248 /* Write cycle preamble control register */
724
#define BCHP_DDR23_PHY_BYTE_LANE_0_CLOCK_REG_CONTROL 0x0180124c /* Clock Regulator control register */
725
726
/***************************************************************************
727
 *READ_CONTROL - Byte Lane read channel control register
728
 ***************************************************************************/
729
/* DDR23_PHY_BYTE_LANE_1 :: READ_CONTROL :: rd_data_dly [09:08] */
730
#define BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_rd_data_dly_MASK   0x00000300
731
#define BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_rd_data_dly_SHIFT  8
732
733
/* DDR23_PHY_BYTE_LANE_1 :: READ_CONTROL :: dq_odt_enable [03:03] */
734
#define BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_dq_odt_enable_MASK 0x00000008
735
#define BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_dq_odt_enable_SHIFT 3
736
737
/* DDR23_PHY_BYTE_LANE_1 :: READ_CONTROL :: dq_odt_adj [02:02] */
738
#define BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_dq_odt_adj_MASK    0x00000004
739
#define BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_dq_odt_adj_SHIFT   2
740
741
/* DDR23_PHY_BYTE_LANE_1 :: READ_CONTROL :: rd_enb_odt_enable [01:01] */
742
#define BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_rd_enb_odt_enable_MASK 0x00000002
743
#define BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_rd_enb_odt_enable_SHIFT 1
744
745
/* DDR23_PHY_BYTE_LANE_1 :: READ_CONTROL :: rd_enb_odt_adj [00:00] */
746
#define BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_rd_enb_odt_adj_MASK 0x00000001
747
#define BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_rd_enb_odt_adj_SHIFT 0
748
749
/***************************************************************************
750
 *IDLE_PAD_CONTROL - Idle mode SSTL pad control register
751
 ***************************************************************************/
752
/* DDR23_PHY_BYTE_LANE_1 :: IDLE_PAD_CONTROL :: idle [31:31] */
753
#define BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL_idle_MASK      0x80000000
754
755
/* DDR23_PHY_BYTE_LANE_1 :: IDLE_PAD_CONTROL :: dm_iddq [18:18] */
756
#define BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL_dm_iddq_MASK   0x00040000
757
758
/* DDR23_PHY_BYTE_LANE_1 :: IDLE_PAD_CONTROL :: dq_iddq [14:14] */
759
#define BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL_dq_iddq_MASK   0x00004000
760
761
/* DDR23_PHY_BYTE_LANE_1 :: IDLE_PAD_CONTROL :: read_enb_iddq [10:10] */
762
#define BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL_read_enb_iddq_MASK 0x00000400
763
764
/* DDR23_PHY_BYTE_LANE_1 :: IDLE_PAD_CONTROL :: dqs_iddq [06:06] */
765
#define BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL_dqs_iddq_MASK  0x00000040
766
767
/* DDR23_PHY_BYTE_LANE_1 :: IDLE_PAD_CONTROL :: clk_iddq [02:02] */
768
#define BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL_clk_iddq_MASK  0x00000004
769
770
/***************************************************************************
771
 *DRIVE_PAD_CTL - SSTL pad drive characteristics control register
772
 ***************************************************************************/
773
/* DDR23_PHY_BYTE_LANE_1 :: DRIVE_PAD_CTL :: seltxdrv_ci [02:02] */
774
#define BCHP_DDR23_PHY_BYTE_LANE_0_DRIVE_PAD_CTL_seltxdrv_ci_MASK  0x00000004
775
776
/***************************************************************************
777
 *CLOCK_REG_CONTROL - Clock Regulator control register
778
 ***************************************************************************/
779
/* DDR23_PHY_BYTE_LANE_1 :: CLOCK_REG_CONTROL :: pwrdn [00:00] */
780
#define BCHP_DDR23_PHY_BYTE_LANE_0_CLOCK_REG_CONTROL_pwrdn_MASK    0x00000001
781
782
#endif /* #ifndef BCHP_DDR23_PHY_BYTE_LANE_0_H__ */
783
784
/***************************************************************************
785
 *
786
 * $brcm_Workfile: bchp_ddr23_phy_byte_lane_1.h $
787
 * $brcm_Revision: Hydra_Software_Devel/1 $
788
 * $brcm_Date: 7/17/09 7:59p $
789
 *
790
 * Module Description:
791
 *                     DO NOT EDIT THIS FILE DIRECTLY
792
 *
793
 * This module was generated magically with RDB from a source description
794
 * file. You must edit the source file for changes to be made to this file.
795
 *
796
 *
797
 * Date:           Generated on         Fri Jul 17 19:42:17 2009
798
 *                 MD5 Checksum         2914699efc3fb3edefca5cb4f4f38b34
799
 *
800
 * Compiled with:  RDB Utility          combo_header.pl
801
 *                 RDB Parser           3.0
802
 *                 unknown              unknown
803
 *                 Perl Interpreter     5.008008
804
 *                 Operating System     linux
805
 *
806
 * Revision History:
807
 *
808
 * $brcm_Log: /magnum/basemodules/chp/70015/rdb/a0/bchp_ddr23_phy_byte_lane_1.h $
809
 *
810
 * Hydra_Software_Devel/1   7/17/09 7:59p albertl
811
 * PR56880: Initial revision.
812
 *
813
 ***************************************************************************/
814
815
#ifndef BCHP_DDR23_PHY_BYTE_LANE_1_H__
816
#define BCHP_DDR23_PHY_BYTE_LANE_1_H__
817
818
/***************************************************************************
819
 *DDR23_PHY_BYTE_LANE_1 - DDR23 DDR23 byte lane #1 control registers
820
 ***************************************************************************/
821
#define BCHP_DDR23_PHY_BYTE_LANE_1_VDL_CALIBRATE 0x01801104 /* Byte lane VDL calibration control register */
822
#define BCHP_DDR23_PHY_BYTE_LANE_1_VDL_STATUS    0x01801108 /* Byte lane VDL calibration status register */
823
#define BCHP_DDR23_PHY_BYTE_LANE_1_VDL_OVERRIDE_0 0x01801110 /* Read DQSP VDL static override control register */
824
#define BCHP_DDR23_PHY_BYTE_LANE_1_VDL_OVERRIDE_1 0x01801114 /* Read DQSN VDL static override control register */
825
#define BCHP_DDR23_PHY_BYTE_LANE_1_VDL_OVERRIDE_2 0x01801118 /* Read Enable VDL static override control register */
826
#define BCHP_DDR23_PHY_BYTE_LANE_1_VDL_OVERRIDE_3 0x0180111c /* Write data and mask VDL static override control register */
827
#define BCHP_DDR23_PHY_BYTE_LANE_1_READ_CONTROL  0x01801130 /* Byte Lane read channel control register */
828
#define BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL 0x0180113c /* Idle mode SSTL pad control register */
829
#define BCHP_DDR23_PHY_BYTE_LANE_1_DRIVE_PAD_CTL 0x01801140 /* SSTL pad drive characteristics control register */
830
#define BCHP_DDR23_PHY_BYTE_LANE_1_CLOCK_PAD_DISABLE 0x01801144 /* Clock pad disable register */
831
#define BCHP_DDR23_PHY_BYTE_LANE_1_WR_PREAMBLE_MODE 0x01801148 /* Write cycle preamble control register */
832
#define BCHP_DDR23_PHY_BYTE_LANE_1_CLOCK_REG_CONTROL 0x0180114c /* Clock Regulator control register */
833
834
/***************************************************************************
835
 *READ_CONTROL - Byte Lane read channel control register
836
 ***************************************************************************/
837
/* DDR23_PHY_BYTE_LANE_1 :: READ_CONTROL :: dq_odt_enable [03:03] */
838
#define BCHP_DDR23_PHY_BYTE_LANE_1_READ_CONTROL_dq_odt_enable_MASK 0x00000008
839
840
/***************************************************************************
841
 *IDLE_PAD_CONTROL - Idle mode SSTL pad control register
842
 ***************************************************************************/
843
/* DDR23_PHY_BYTE_LANE_1 :: IDLE_PAD_CONTROL :: idle [31:31] */
844
#define BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL_idle_MASK      0x80000000
845
846
/* DDR23_PHY_BYTE_LANE_1 :: IDLE_PAD_CONTROL :: dm_iddq [18:18] */
847
#define BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL_dm_iddq_MASK   0x00040000
848
849
/* DDR23_PHY_BYTE_LANE_1 :: IDLE_PAD_CONTROL :: dq_iddq [14:14] */
850
#define BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL_dq_iddq_MASK   0x00004000
851
852
/* DDR23_PHY_BYTE_LANE_1 :: IDLE_PAD_CONTROL :: read_enb_iddq [10:10] */
853
#define BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL_read_enb_iddq_MASK 0x00000400
854
855
/* DDR23_PHY_BYTE_LANE_1 :: IDLE_PAD_CONTROL :: dqs_iddq [06:06] */
856
#define BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL_dqs_iddq_MASK  0x00000040
857
858
/* DDR23_PHY_BYTE_LANE_1 :: IDLE_PAD_CONTROL :: clk_iddq [02:02] */
859
#define BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL_clk_iddq_MASK  0x00000004
860
861
/***************************************************************************
862
 *DRIVE_PAD_CTL - SSTL pad drive characteristics control register
863
 ***************************************************************************/
864
/* DDR23_PHY_BYTE_LANE_1 :: DRIVE_PAD_CTL :: reserved0 [31:06] */
865
#define BCHP_DDR23_PHY_BYTE_LANE_0_DRIVE_PAD_CTL_reserved0_MASK    0xffffffc0
866
#define BCHP_DDR23_PHY_BYTE_LANE_0_DRIVE_PAD_CTL_reserved0_SHIFT   6
867
868
/* DDR23_PHY_BYTE_LANE_1 :: DRIVE_PAD_CTL :: rt60b_ddr_read_enb [05:05] */
869
#define BCHP_DDR23_PHY_BYTE_LANE_0_DRIVE_PAD_CTL_rt60b_ddr_read_enb_MASK 0x00000020
870
#define BCHP_DDR23_PHY_BYTE_LANE_0_DRIVE_PAD_CTL_rt60b_ddr_read_enb_SHIFT 5
871
872
/* DDR23_PHY_BYTE_LANE_1 :: DRIVE_PAD_CTL :: rt60b [04:04] */
873
#define BCHP_DDR23_PHY_BYTE_LANE_0_DRIVE_PAD_CTL_rt60b_MASK        0x00000010
874
#define BCHP_DDR23_PHY_BYTE_LANE_0_DRIVE_PAD_CTL_rt60b_SHIFT       4
875
876
/* DDR23_PHY_BYTE_LANE_1 :: DRIVE_PAD_CTL :: sel_sstl18 [03:03] */
877
#define BCHP_DDR23_PHY_BYTE_LANE_0_DRIVE_PAD_CTL_sel_sstl18_MASK   0x00000008
878
#define BCHP_DDR23_PHY_BYTE_LANE_0_DRIVE_PAD_CTL_sel_sstl18_SHIFT  3
879
880
/* DDR23_PHY_BYTE_LANE_1 :: DRIVE_PAD_CTL :: seltxdrv_ci [02:02] */
881
#define BCHP_DDR23_PHY_BYTE_LANE_0_DRIVE_PAD_CTL_seltxdrv_ci_MASK  0x00000004
882
#define BCHP_DDR23_PHY_BYTE_LANE_0_DRIVE_PAD_CTL_seltxdrv_ci_SHIFT 2
883
884
/* DDR23_PHY_BYTE_LANE_1 :: DRIVE_PAD_CTL :: selrxdrv [01:01] */
885
#define BCHP_DDR23_PHY_BYTE_LANE_0_DRIVE_PAD_CTL_selrxdrv_MASK     0x00000002
886
#define BCHP_DDR23_PHY_BYTE_LANE_0_DRIVE_PAD_CTL_selrxdrv_SHIFT    1
887
888
/* DDR23_PHY_BYTE_LANE_1 :: DRIVE_PAD_CTL :: slew [00:00] */
889
#define BCHP_DDR23_PHY_BYTE_LANE_0_DRIVE_PAD_CTL_slew_MASK         0x00000001
890
#define BCHP_DDR23_PHY_BYTE_LANE_0_DRIVE_PAD_CTL_slew_SHIFT        0
891
892
/***************************************************************************
893
 *CLOCK_PAD_DISABLE - Clock pad disable register
894
 ***************************************************************************/
895
/* DDR23_PHY_BYTE_LANE_1 :: CLOCK_PAD_DISABLE :: clk_pad_dis [00:00] */
896
#define BCHP_DDR23_PHY_BYTE_LANE_1_CLOCK_PAD_DISABLE_clk_pad_dis_MASK 0x00000001
897
898
/***************************************************************************
899
 *CLOCK_REG_CONTROL - Clock Regulator control register
900
 ***************************************************************************/
901
/* DDR23_PHY_BYTE_LANE_1 :: CLOCK_REG_CONTROL :: pwrdn [00:00] */
902
#define BCHP_DDR23_PHY_BYTE_LANE_1_CLOCK_REG_CONTROL_pwrdn_MASK    0x00000001
903
904
#endif /* #ifndef BCHP_DDR23_PHY_BYTE_LANE_1_H__ */
905
906
/***************************************************************************
907
 *
908
 * $brcm_Workfile: bchp_ddr23_phy_control_regs.h $
909
 * $brcm_Revision: Hydra_Software_Devel/1 $
910
 * $brcm_Date: 7/17/09 7:59p $
911
 *
912
 * Module Description:
913
 *                     DO NOT EDIT THIS FILE DIRECTLY
914
 *
915
 * This module was generated magically with RDB from a source description
916
 * file. You must edit the source file for changes to be made to this file.
917
 *
918
 *
919
 * Date:           Generated on         Fri Jul 17 19:42:21 2009
920
 *                 MD5 Checksum         2914699efc3fb3edefca5cb4f4f38b34
921
 *
922
 * Compiled with:  RDB Utility          combo_header.pl
923
 *                 RDB Parser           3.0
924
 *                 unknown              unknown
925
 *                 Perl Interpreter     5.008008
926
 *                 Operating System     linux
927
 *
928
 * Revision History:
929
 *
930
 * $brcm_Log: /magnum/basemodules/chp/70015/rdb/a0/bchp_ddr23_phy_control_regs.h $
931
 *
932
 * Hydra_Software_Devel/1   7/17/09 7:59p albertl
933
 * PR56880: Initial revision.
934
 *
935
 ***************************************************************************/
936
937
#ifndef BCHP_DDR23_PHY_CONTROL_REGS_H__
938
#define BCHP_DDR23_PHY_CONTROL_REGS_H__
939
940
/***************************************************************************
941
 *DDR23_PHY_CONTROL_REGS - DDR23 DDR23 physical interface control registers
942
 ***************************************************************************/
943
#define BCHP_DDR23_PHY_CONTROL_REGS_CLK_PM_CTRL  0x01801004 /* PHY clock power management control register */
944
#define BCHP_DDR23_PHY_CONTROL_REGS_PLL_STATUS   0x01801010 /* PHY PLL status register */
945
#define BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG   0x01801014 /* PHY PLL configuration register */
946
#define BCHP_DDR23_PHY_CONTROL_REGS_PLL_PRE_DIVIDER 0x01801018 /* PHY PLL pre-divider control register */
947
#define BCHP_DDR23_PHY_CONTROL_REGS_PLL_DIVIDER  0x0180101c /* PHY PLL divider control register */
948
#define BCHP_DDR23_PHY_CONTROL_REGS_STATIC_VDL_OVERRIDE 0x01801030 /* Address & Control VDL static override control register */
949
#define BCHP_DDR23_PHY_CONTROL_REGS_IDLE_PAD_CONTROL 0x01801038 /* Idle mode SSTL pad control register */
950
#define BCHP_DDR23_PHY_CONTROL_REGS_ZQ_PVT_COMP_CTL 0x0180103c /* PVT Compensation control and status register */
951
#define BCHP_DDR23_PHY_CONTROL_REGS_DRIVE_PAD_CTL 0x01801040 /* SSTL pad drive characteristics control register */
952
#define BCHP_DDR23_PHY_CONTROL_REGS_CLOCK_REG_CONTROL 0x01801044 /* Clock Regulator control register */
953
954
/***************************************************************************
955
 *CLK_PM_CTRL - PHY clock power management control register
956
 ***************************************************************************/
957
/* DDR23_PHY_CONTROL_REGS :: CLK_PM_CTRL :: DIS_DDR_CLK [00:00] */
958
#define BCHP_DDR23_PHY_CONTROL_REGS_CLK_PM_CTRL_DIS_DDR_CLK_MASK   0x00000001
959
960
/***************************************************************************
961
 *PLL_CONFIG - PHY PLL configuration register
962
 ***************************************************************************/
963
/* DDR23_PHY_CONTROL_REGS :: PLL_CONFIG :: ENB_CLKOUT [04:04] */
964
#define BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG_ENB_CLKOUT_MASK     0x00000010
965
966
/* DDR23_PHY_CONTROL_REGS :: PLL_CONFIG :: PWRDN [00:00] */
967
#define BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG_PWRDN_MASK          0x00000001
968
969
/***************************************************************************
970
 *IDLE_PAD_CONTROL - Idle mode SSTL pad control register
971
 ***************************************************************************/
972
/* DDR23_PHY_CONTROL_REGS :: IDLE_PAD_CONTROL :: idle [31:31] */
973
#define BCHP_DDR23_PHY_CONTROL_REGS_IDLE_PAD_CONTROL_idle_MASK     0x80000000
974
975
/* DDR23_PHY_CONTROL_REGS :: IDLE_PAD_CONTROL :: rxenb [08:08] */
976
#define BCHP_DDR23_PHY_CONTROL_REGS_IDLE_PAD_CONTROL_rxenb_MASK    0x00000100
977
978
/* DDR23_PHY_CONTROL_REGS :: IDLE_PAD_CONTROL :: ctl_iddq [06:06] */
979
#define BCHP_DDR23_PHY_CONTROL_REGS_IDLE_PAD_CONTROL_ctl_iddq_MASK 0x00000040
980
981
/* DDR23_PHY_CONTROL_REGS :: IDLE_PAD_CONTROL :: cke_reb [01:01] */
982
#define BCHP_DDR23_PHY_CONTROL_REGS_IDLE_PAD_CONTROL_cke_reb_MASK  0x00000002
983
984
/***************************************************************************
985
 *DRIVE_PAD_CTL - SSTL pad drive characteristics control register
986
 ***************************************************************************/
987
/* DDR23_PHY_CONTROL_REGS :: DRIVE_PAD_CTL :: reserved0 [31:05] */
988
#define BCHP_DDR23_PHY_CONTROL_REGS_DRIVE_PAD_CTL_reserved0_MASK   0xffffffe0
989
#define BCHP_DDR23_PHY_CONTROL_REGS_DRIVE_PAD_CTL_reserved0_SHIFT  5
990
991
/* DDR23_PHY_CONTROL_REGS :: DRIVE_PAD_CTL :: rt60b [04:04] */
992
#define BCHP_DDR23_PHY_CONTROL_REGS_DRIVE_PAD_CTL_rt60b_MASK       0x00000010
993
#define BCHP_DDR23_PHY_CONTROL_REGS_DRIVE_PAD_CTL_rt60b_SHIFT      4
994
995
/* DDR23_PHY_CONTROL_REGS :: DRIVE_PAD_CTL :: sel_sstl18 [03:03] */
996
#define BCHP_DDR23_PHY_CONTROL_REGS_DRIVE_PAD_CTL_sel_sstl18_MASK  0x00000008
997
#define BCHP_DDR23_PHY_CONTROL_REGS_DRIVE_PAD_CTL_sel_sstl18_SHIFT 3
998
999
/* DDR23_PHY_CONTROL_REGS :: DRIVE_PAD_CTL :: seltxdrv_ci [02:02] */
1000
#define BCHP_DDR23_PHY_CONTROL_REGS_DRIVE_PAD_CTL_seltxdrv_ci_MASK 0x00000004
1001
#define BCHP_DDR23_PHY_CONTROL_REGS_DRIVE_PAD_CTL_seltxdrv_ci_SHIFT 2
1002
1003
/* DDR23_PHY_CONTROL_REGS :: DRIVE_PAD_CTL :: selrxdrv [01:01] */
1004
#define BCHP_DDR23_PHY_CONTROL_REGS_DRIVE_PAD_CTL_selrxdrv_MASK    0x00000002
1005
#define BCHP_DDR23_PHY_CONTROL_REGS_DRIVE_PAD_CTL_selrxdrv_SHIFT   1
1006
1007
/* DDR23_PHY_CONTROL_REGS :: DRIVE_PAD_CTL :: slew [00:00] */
1008
#define BCHP_DDR23_PHY_CONTROL_REGS_DRIVE_PAD_CTL_slew_MASK        0x00000001
1009
#define BCHP_DDR23_PHY_CONTROL_REGS_DRIVE_PAD_CTL_slew_SHIFT       0
1010
1011
/***************************************************************************
1012
 *ZQ_PVT_COMP_CTL - PVT Compensation control and status register
1013
 ***************************************************************************/
1014
/* DDR23_PHY_CONTROL_REGS :: ZQ_PVT_COMP_CTL :: sample_done [28:28] */
1015
#define BCHP_DDR23_PHY_CONTROL_REGS_ZQ_PVT_COMP_CTL_sample_done_MASK 0x10000000
1016
1017
/* DDR23_PHY_CONTROL_REGS :: ZQ_PVT_COMP_CTL :: sample_en [26:26] */
1018
#define BCHP_DDR23_PHY_CONTROL_REGS_ZQ_PVT_COMP_CTL_sample_en_MASK 0x04000000
1019
1020
/***************************************************************************
1021
 *CLOCK_REG_CONTROL - Clock Regulator control register
1022
 ***************************************************************************/
1023
/* DDR23_PHY_CONTROL_REGS :: CLOCK_REG_CONTROL :: pwrdn [00:00] */
1024
#define BCHP_DDR23_PHY_CONTROL_REGS_CLOCK_REG_CONTROL_pwrdn_MASK   0x00000001
1025
1026
#endif /* #ifndef BCHP_DDR23_PHY_CONTROL_REGS_H__ */
1027
1028
/***************************************************************************
1029
 *
1030
 * $brcm_Workfile: bchp_clk.h $
1031
 * $brcm_Revision: Hydra_Software_Devel/1 $
1032
 * $brcm_Date: 7/17/09 7:58p $
1033
 *
1034
 * Module Description:
1035
 *                     DO NOT EDIT THIS FILE DIRECTLY
1036
 *
1037
 * This module was generated magically with RDB from a source description
1038
 * file. You must edit the source file for changes to be made to this file.
1039
 *
1040
 *
1041
 * Date:           Generated on         Fri Jul 17 19:42:39 2009
1042
 *                 MD5 Checksum         2914699efc3fb3edefca5cb4f4f38b34
1043
 *
1044
 * Compiled with:  RDB Utility          combo_header.pl
1045
 *                 RDB Parser           3.0
1046
 *                 unknown              unknown
1047
 *                 Perl Interpreter     5.008008
1048
 *                 Operating System     linux
1049
 *
1050
 * Revision History:
1051
 *
1052
 * $brcm_Log: /magnum/basemodules/chp/70015/rdb/a0/bchp_clk.h $
1053
 *
1054
 * Hydra_Software_Devel/1   7/17/09 7:58p albertl
1055
 * PR56880: Initial revision.
1056
 *
1057
 ***************************************************************************/
1058
1059
#ifndef BCHP_CLK_H__
1060
#define BCHP_CLK_H__
1061
1062
/***************************************************************************
1063
 *CLK - CLOCK_GEN Registers
1064
 ***************************************************************************/
1065
#define BCHP_CLK_PM_CTRL                         0x00070004 /* Software power management control to turn off clocks */
1066
#define BCHP_CLK_TEMP_MON_CTRL                   0x00070040 /* Temperature monitor control. */
1067
#define BCHP_CLK_TEMP_MON_STATUS                 0x00070044 /* Temperature monitor status. */
1068
#define BCHP_CLK_PLL0_ARM_DIV                    0x00070110 /* Main PLL0 channel 3 ARM clock divider settings */
1069
#define BCHP_CLK_PLL1_CTRL                       0x00070120 /* Main PLL1 reset, enable, powerdown, and control */
1070
1071
/***************************************************************************
1072
 *PM_CTRL - Software power management control to turn off clocks
1073
 ***************************************************************************/
1074
/* CLK :: PM_CTRL :: DIS_SUN_27_LOW_PWR [25:25] */
1075
#define BCHP_CLK_PM_CTRL_DIS_SUN_27_LOW_PWR_MASK                   0x02000000
1076
1077
/* CLK :: PM_CTRL :: DIS_SUN_108_LOW_PWR [24:24] */
1078
#define BCHP_CLK_PM_CTRL_DIS_SUN_108_LOW_PWR_MASK                  0x01000000
1079
1080
/* CLK :: PM_CTRL :: DIS_MISC_OTP_9_CLK [19:19] */
1081
#define BCHP_CLK_PM_CTRL_DIS_MISC_OTP_9_CLK_MASK                   0x00080000
1082
1083
/* CLK :: PM_CTRL :: DIS_ARM_CLK [18:18] */
1084
#define BCHP_CLK_PM_CTRL_DIS_ARM_CLK_MASK                          0x00040000
1085
1086
/* CLK :: PM_CTRL :: DIS_AVD_CLK [17:17] */
1087
#define BCHP_CLK_PM_CTRL_DIS_AVD_CLK_MASK                          0x00020000
1088
1089
/* CLK :: PM_CTRL :: DIS_BLINK_108_CLK [12:12] */
1090
#define BCHP_CLK_PM_CTRL_DIS_BLINK_108_CLK_MASK                    0x00001000
1091
1092
/* CLK :: PM_CTRL :: DIS_DDR_108_CLK [11:11] */
1093
#define BCHP_CLK_PM_CTRL_DIS_DDR_108_CLK_MASK                      0x00000800
1094
1095
/* CLK :: PM_CTRL :: DIS_AVD_108_CLK [10:10] */
1096
#define BCHP_CLK_PM_CTRL_DIS_AVD_108_CLK_MASK                      0x00000400
1097
1098
/* CLK :: PM_CTRL :: DIS_MISC_108_CLK [09:09] */
1099
#define BCHP_CLK_PM_CTRL_DIS_MISC_108_CLK_MASK                     0x00000200
1100
1101
/* CLK :: PM_CTRL :: DIS_BLINK_216_CLK [04:04] */
1102
#define BCHP_CLK_PM_CTRL_DIS_BLINK_216_CLK_MASK                    0x00000010
1103
1104
/* CLK :: PM_CTRL :: DIS_DDR_216_CLK [03:03] */
1105
#define BCHP_CLK_PM_CTRL_DIS_DDR_216_CLK_MASK                      0x00000008
1106
1107
/* CLK :: PM_CTRL :: DIS_AVD_216_CLK [02:02] */
1108
#define BCHP_CLK_PM_CTRL_DIS_AVD_216_CLK_MASK                      0x00000004
1109
1110
/* CLK :: PM_CTRL :: DIS_MISC_216_CLK [01:01] */
1111
#define BCHP_CLK_PM_CTRL_DIS_MISC_216_CLK_MASK                     0x00000002
1112
1113
/* CLK :: PM_CTRL :: DIS_SUN_216_CLK [00:00] */
1114
#define BCHP_CLK_PM_CTRL_DIS_SUN_216_CLK_MASK                      0x00000001
1115
1116
/***************************************************************************
1117
 *PLL1_CTRL - Main PLL1 reset, enable, powerdown, and control
1118
 ***************************************************************************/
1119
/* CLK :: PLL1_CTRL :: POWERDOWN [03:03] */
1120
#define BCHP_CLK_PLL1_CTRL_POWERDOWN_MASK                          0x00000008
1121
1122
#endif /* #ifndef BCHP_CLK_H__ */
1123
1124
/***************************************************************************
1125
 *
1126
 * $brcm_Workfile: bchp_pcie_tl.h $
1127
 * $brcm_Revision: Hydra_Software_Devel/1 $
1128
 * $brcm_Date: 7/17/09 8:13p $
1129
 *
1130
 * Module Description:
1131
 *                     DO NOT EDIT THIS FILE DIRECTLY
1132
 *
1133
 * This module was generated magically with RDB from a source description
1134
 * file. You must edit the source file for changes to be made to this file.
1135
 *
1136
 *
1137
 * Date:           Generated on         Fri Jul 17 19:42:28 2009
1138
 *                 MD5 Checksum         2914699efc3fb3edefca5cb4f4f38b34
1139
 *
1140
 * Compiled with:  RDB Utility          combo_header.pl
1141
 *                 RDB Parser           3.0
1142
 *                 unknown              unknown
1143
 *                 Perl Interpreter     5.008008
1144
 *                 Operating System     linux
1145
 *
1146
 * Revision History:
1147
 *
1148
 * $brcm_Log: /magnum/basemodules/chp/70015/rdb/a0/bchp_pcie_tl.h $
1149
 *
1150
 * Hydra_Software_Devel/1   7/17/09 8:13p albertl
1151
 * PR56880: Initial revision.
1152
 *
1153
 ***************************************************************************/
1154
1155
#ifndef BCHP_PCIE_TL_H__
1156
#define BCHP_PCIE_TL_H__
1157
1158
/***************************************************************************
1159
 *PCIE_TL - PCIE TL related registers
1160
 ***************************************************************************/
1161
#define BCHP_PCIE_TL_TRANSACTION_CONFIGURATION   0x00500404 /* TRANSACTION_CONFIGURATION Register */
1162
1163
#endif /* #ifndef BCHP_PCIE_TL_H__ */
1164
1165
/***************************************************************************
1166
 *
1167
 * $brcm_Workfile: bchp_sun_gisb_arb.h $
1168
 * $brcm_Revision: Hydra_Software_Devel/1 $
1169
 * $brcm_Date: 7/17/09 8:19p $
1170
 *
1171
 * Module Description:
1172
 *                     DO NOT EDIT THIS FILE DIRECTLY
1173
 *
1174
 * This module was generated magically with RDB from a source description
1175
 * file. You must edit the source file for changes to be made to this file.
1176
 *
1177
 *
1178
 * Date:           Generated on         Fri Jul 17 19:42:30 2009
1179
 *                 MD5 Checksum         2914699efc3fb3edefca5cb4f4f38b34
1180
 *
1181
 * Compiled with:  RDB Utility          combo_header.pl
1182
 *                 RDB Parser           3.0
1183
 *                 unknown              unknown
1184
 *                 Perl Interpreter     5.008008
1185
 *                 Operating System     linux
1186
 *
1187
 * Revision History:
1188
 *
1189
 * $brcm_Log: /magnum/basemodules/chp/70015/rdb/a0/bchp_sun_gisb_arb.h $
1190
 *
1191
 * Hydra_Software_Devel/1   7/17/09 8:19p albertl
1192
 * PR56880: Initial revision.
1193
 *
1194
 ***************************************************************************/
1195
1196
#ifndef BCHP_SUN_GISB_ARB_H__
1197
#define BCHP_SUN_GISB_ARB_H__
1198
1199
/***************************************************************************
1200
 *SUN_GISB_ARB - GISB Arbiter registers
1201
 ***************************************************************************/
1202
#define BCHP_SUN_GISB_ARB_TIMER                  0x0040000c /* GISB ARBITER Timer Value Register */
1203
1204
#endif /* #ifndef BCHP_SUN_GISB_ARB_H__ */
1205
1206
/***************************************************************************
1207
 *
1208
 * $brcm_Workfile: bchp_misc_perst.h $
1209
 * $brcm_Revision: Hydra_Software_Devel/1 $
1210
 * $brcm_Date: 7/17/09 8:12p $
1211
 *
1212
 * Module Description:
1213
 *                     DO NOT EDIT THIS FILE DIRECTLY
1214
 *
1215
 * This module was generated magically with RDB from a source description
1216
 * file. You must edit the source file for changes to be made to this file.
1217
 *
1218
 *
1219
 * Date:           Generated on         Fri Jul 17 19:43:23 2009
1220
 *                 MD5 Checksum         2914699efc3fb3edefca5cb4f4f38b34
1221
 *
1222
 * Compiled with:  RDB Utility          combo_header.pl
1223
 *                 RDB Parser           3.0
1224
 *                 unknown              unknown
1225
 *                 Perl Interpreter     5.008008
1226
 *                 Operating System     linux
1227
 *
1228
 * Revision History:
1229
 *
1230
 * $brcm_Log: /magnum/basemodules/chp/70015/rdb/a0/bchp_misc_perst.h $
1231
 *
1232
 * Hydra_Software_Devel/1   7/17/09 8:12p albertl
1233
 * PR56880: Initial revision.
1234
 *
1235
 ***************************************************************************/
1236
1237
#ifndef BCHP_MISC_PERST_H__
1238
#define BCHP_MISC_PERST_H__
1239
1240
/***************************************************************************
1241
 *MISC_PERST - Registers for Link reset on PERST_N
1242
 ***************************************************************************/
1243
#define BCHP_MISC_PERST_CLOCK_CTRL               0x0050229c /* Clock Control Register */
1244
1245
/***************************************************************************
1246
 *CLOCK_CTRL - Clock Control Register
1247
 ***************************************************************************/
1248
/* MISC_PERST :: CLOCK_CTRL :: EARLY_L1_EXIT [02:02] */
1249
#define BCHP_MISC_PERST_CLOCK_CTRL_EARLY_L1_EXIT_MASK              0x00000004
1250
1251
#endif /* #ifndef BCHP_MISC_PERST_H__ */
1252
1253
/***************************************************************************
1254
 *
1255
 * $brcm_Workfile: bchp_sun_top_ctrl.h $
1256
 * $brcm_Revision: Hydra_Software_Devel/1 $
1257
 * $brcm_Date: 7/17/09 8:20p $
1258
 *
1259
 * Module Description:
1260
 *                     DO NOT EDIT THIS FILE DIRECTLY
1261
 *
1262
 * This module was generated magically with RDB from a source description
1263
 * file. You must edit the source file for changes to be made to this file.
1264
 *
1265
 *
1266
 * Date:           Generated on         Fri Jul 17 19:43:07 2009
1267
 *                 MD5 Checksum         2914699efc3fb3edefca5cb4f4f38b34
1268
 *
1269
 * Compiled with:  RDB Utility          combo_header.pl
1270
 *                 RDB Parser           3.0
1271
 *                 unknown              unknown
1272
 *                 Perl Interpreter     5.008008
1273
 *                 Operating System     linux
1274
 *
1275
 * Revision History:
1276
 *
1277
 * $brcm_Log: /magnum/basemodules/chp/70015/rdb/a0/bchp_sun_top_ctrl.h $
1278
 *
1279
 * Hydra_Software_Devel/1   7/17/09 8:20p albertl
1280
 * PR56880: Initial revision.
1281
 *
1282
 ***************************************************************************/
1283
1284
#ifndef BCHP_SUN_TOP_CTRL_H__
1285
#define BCHP_SUN_TOP_CTRL_H__
1286
1287
/***************************************************************************
1288
 *SUN_TOP_CTRL - Top Control registers
1289
 ***************************************************************************/
1290
#define BCHP_SUN_TOP_CTRL_PIN_MUX_CTRL_0         0x00404100 /* Pinmux control register 0 */
1291
1292
#endif /* #ifndef BCHP_SUN_TOP_CTRL_H__ */
1293
1294
/***************************************************************************
1295
 *
1296
 * $brcm_Workfile: bchp_gio.h $
1297
 * $brcm_Revision: Hydra_Software_Devel/1 $
1298
 * $brcm_Date: 7/17/09 8:07p $
1299
 *
1300
 * Module Description:
1301
 *                     DO NOT EDIT THIS FILE DIRECTLY
1302
 *
1303
 * This module was generated magically with RDB from a source description
1304
 * file. You must edit the source file for changes to be made to this file.
1305
 *
1306
 *
1307
 * Date:           Generated on         Fri Jul 17 19:42:13 2009
1308
 *                 MD5 Checksum         2914699efc3fb3edefca5cb4f4f38b34
1309
 *
1310
 * Compiled with:  RDB Utility          combo_header.pl
1311
 *                 RDB Parser           3.0
1312
 *                 unknown              unknown
1313
 *                 Perl Interpreter     5.008008
1314
 *                 Operating System     linux
1315
 *
1316
 * Revision History:
1317
 *
1318
 * $brcm_Log: /magnum/basemodules/chp/70015/rdb/a0/bchp_gio.h $
1319
 *
1320
 * Hydra_Software_Devel/1   7/17/09 8:07p albertl
1321
 * PR56880: Initial revision.
1322
 *
1323
 ***************************************************************************/
1324
1325
#ifndef BCHP_GIO_H__
1326
#define BCHP_GIO_H__
1327
1328
/***************************************************************************
1329
 *GIO - GPIO
1330
 ***************************************************************************/
1331
#define BCHP_GIO_DATA_LO                         0x00406004 /* GENERAL PURPOSE I/O DATA [31:0] */
1332
#define BCHP_GIO_IODIR_LO                        0x00406008 /* GENERAL PURPOSE I/O DIRECTION [31:0] */
1333
1334
#endif /* #ifndef BCHP_GIO_H__ */
1335
1336
/***************************************************************************
1337
 *
1338
 * $brcm_Workfile: bchp_pri_client_regs.h $
1339
 * $brcm_Revision: Hydra_Software_Devel/1 $
1340
 * $brcm_Date: 7/17/09 8:16p $
1341
 *
1342
 * Module Description:
1343
 *                     DO NOT EDIT THIS FILE DIRECTLY
1344
 *
1345
 * This module was generated magically with RDB from a source description
1346
 * file. You must edit the source file for changes to be made to this file.
1347
 *
1348
 *
1349
 * Date:           Generated on         Fri Jul 17 19:42:12 2009
1350
 *                 MD5 Checksum         2914699efc3fb3edefca5cb4f4f38b34
1351
 *
1352
 * Compiled with:  RDB Utility          combo_header.pl
1353
 *                 RDB Parser           3.0
1354
 *                 unknown              unknown
1355
 *                 Perl Interpreter     5.008008
1356
 *                 Operating System     linux
1357
 *
1358
 * Revision History:
1359
 *
1360
 * $brcm_Log: /magnum/basemodules/chp/70015/rdb/a0/bchp_pri_client_regs.h $
1361
 *
1362
 * Hydra_Software_Devel/1   7/17/09 8:16p albertl
1363
 * PR56880: Initial revision.
1364
 *
1365
 ***************************************************************************/
1366
1367
#ifndef BCHP_PRI_CLIENT_REGS_H__
1368
#define BCHP_PRI_CLIENT_REGS_H__
1369
1370
/***************************************************************************
1371
 *PRI_CLIENT_REGS - PRIMARY_ARB_CLIENTS client configuration registers
1372
 ***************************************************************************/
1373
#define BCHP_PRI_CLIENT_REGS_CLIENT_00_COUNT     0x0040c000 /* Arbiter Client DEBLOCK Blockout Counter Register */
1374
#define BCHP_PRI_CLIENT_REGS_CLIENT_00_CONTROL   0x0040c004 /* Arbiter Client DEBLOCK Configuration Register */
1375
1376
#endif /* #ifndef BCHP_PRI_CLIENT_REGS_H__ */
(-)crystalhd~/crystalhd_cmds.c (-261 / +411 lines)
Lines 4-10 Link Here
4
 *  Name: crystalhd_cmds . c
4
 *  Name: crystalhd_cmds . c
5
 *
5
 *
6
 *  Description:
6
 *  Description:
7
 *		BCM70010 Linux driver user command interfaces.
7
 *		BCM70012/BCM70015 Linux driver user command interfaces.
8
 *
8
 *
9
 *  HISTORY:
9
 *  HISTORY:
10
 *
10
 *
Lines 24-30 Link Here
24
 * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
24
 * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
25
 **********************************************************************/
25
 **********************************************************************/
26
26
27
#include "crystalhd.h"
27
#include "crystalhd_lnx.h"
28
#include "crystalhd_hw.h"
28
29
29
static struct crystalhd_user *bc_cproc_get_uid(struct crystalhd_cmd *ctx)
30
static struct crystalhd_user *bc_cproc_get_uid(struct crystalhd_cmd *ctx)
30
{
31
{
Lines 41-47 static struct crystalhd_user *bc_cproc_g Link Here
41
	return user;
42
	return user;
42
}
43
}
43
44
44
static int bc_cproc_get_user_count(struct crystalhd_cmd *ctx)
45
int bc_get_userhandle_count(struct crystalhd_cmd *ctx)
45
{
46
{
46
	int i, count = 0;
47
	int i, count = 0;
47
48
Lines 53-120 static int bc_cproc_get_user_count(struc Link Here
53
	return count;
54
	return count;
54
}
55
}
55
56
56
static void bc_cproc_mark_pwr_state(struct crystalhd_cmd *ctx)
57
static void bc_cproc_mark_pwr_state(struct crystalhd_cmd *ctx, uint32_t state)
57
{
58
{
58
	int i;
59
	int i;
59
60
60
	for (i = 0; i < BC_LINK_MAX_OPENS; i++) {
61
	for (i = 0; i < BC_LINK_MAX_OPENS; i++) {
61
		if (!ctx->user[i].in_use)
62
		if (!ctx->user[i].in_use)
62
			continue;
63
			continue;
63
		if (ctx->user[i].mode == DTS_DIAG_MODE ||
64
		if ((ctx->user[i].mode & 0xFF) == DTS_DIAG_MODE ||
64
		    ctx->user[i].mode == DTS_PLAYBACK_MODE) {
65
		    (ctx->user[i].mode & 0xFF) == DTS_PLAYBACK_MODE) {
65
			ctx->pwr_state_change = 1;
66
			ctx->pwr_state_change = state;
66
			break;
67
			break;
67
		}
68
		}
68
	}
69
	}
69
}
70
}
70
71
71
static enum BC_STATUS bc_cproc_notify_mode(struct crystalhd_cmd *ctx,
72
static BC_STATUS bc_cproc_notify_mode(struct crystalhd_cmd *ctx,
72
				      struct crystalhd_ioctl_data *idata)
73
				      crystalhd_ioctl_data *idata)
73
{
74
{
75
	struct device *dev = chddev();
74
	int rc = 0, i = 0;
76
	int rc = 0, i = 0;
75
77
76
	if (!ctx || !idata) {
78
	if (!ctx || !idata) {
77
		BCMLOG_ERR("Invalid Arg!!\n");
79
		dev_err(dev, "%s: Invalid Arg\n", __func__);
78
		return BC_STS_INV_ARG;
80
		return BC_STS_INV_ARG;
79
	}
81
	}
80
82
81
	if (ctx->user[idata->u_id].mode != DTS_MODE_INV) {
83
	if (ctx->user[idata->u_id].mode != DTS_MODE_INV) {
82
		BCMLOG_ERR("Close the handle first..\n");
84
		dev_err(dev, "Close the handle first..\n");
83
		return BC_STS_ERR_USAGE;
85
		return BC_STS_ERR_USAGE;
84
	}
86
	}
85
	if (idata->udata.u.NotifyMode.Mode == DTS_MONITOR_MODE) {
87
88
	if ((idata->udata.u.NotifyMode.Mode && 0xFF) == DTS_MONITOR_MODE) {
86
		ctx->user[idata->u_id].mode = idata->udata.u.NotifyMode.Mode;
89
		ctx->user[idata->u_id].mode = idata->udata.u.NotifyMode.Mode;
87
		return BC_STS_SUCCESS;
90
		return BC_STS_SUCCESS;
88
	}
91
	}
92
89
	if (ctx->state != BC_LINK_INVALID) {
93
	if (ctx->state != BC_LINK_INVALID) {
90
		BCMLOG_ERR("Link invalid state %d\n", ctx->state);
94
		dev_err(dev, "Link invalid state notify mode %x \n", ctx->state);
91
		return BC_STS_ERR_USAGE;
95
		return BC_STS_ERR_USAGE;
92
	}
96
	}
97
93
	/* Check for duplicate playback sessions..*/
98
	/* Check for duplicate playback sessions..*/
94
	for (i = 0; i < BC_LINK_MAX_OPENS; i++) {
99
	for (i = 0; i < BC_LINK_MAX_OPENS; i++) {
95
		if (ctx->user[i].mode == DTS_DIAG_MODE ||
100
		if ((ctx->user[i].mode & 0xFF) == DTS_DIAG_MODE ||
96
		    ctx->user[i].mode == DTS_PLAYBACK_MODE) {
101
		    (ctx->user[i].mode & 0xFF) == DTS_PLAYBACK_MODE) {
97
			BCMLOG_ERR("multiple playback sessions are not supported..\n");
102
			dev_err(dev, "multiple playback sessions are not "
103
				"supported..\n");
98
			return BC_STS_ERR_USAGE;
104
			return BC_STS_ERR_USAGE;
99
		}
105
		}
100
	}
106
	}
101
	ctx->cin_wait_exit = 0;
107
	ctx->cin_wait_exit = 0;
108
102
	ctx->user[idata->u_id].mode = idata->udata.u.NotifyMode.Mode;
109
	ctx->user[idata->u_id].mode = idata->udata.u.NotifyMode.Mode;
110
	/* Create list pools */
111
	rc = crystalhd_create_elem_pool(ctx->adp, BC_LINK_ELEM_POOL_SZ);
112
	if (rc)
113
		return BC_STS_ERROR;
103
	/* Setup mmap pool for uaddr sgl mapping..*/
114
	/* Setup mmap pool for uaddr sgl mapping..*/
104
	rc = crystalhd_create_dio_pool(ctx->adp, BC_LINK_MAX_SGLS);
115
	rc = crystalhd_create_dio_pool(ctx->adp, BC_LINK_MAX_SGLS);
105
	if (rc)
116
	if (rc)
106
		return BC_STS_ERROR;
117
		return BC_STS_ERROR;
107
118
108
	/* Setup Hardware DMA rings */
119
	/* Setup Hardware DMA rings */
109
	return crystalhd_hw_setup_dma_rings(&ctx->hw_ctx);
120
	return crystalhd_hw_setup_dma_rings(ctx->hw_ctx);
110
}
121
}
111
122
112
static enum BC_STATUS bc_cproc_get_version(struct crystalhd_cmd *ctx,
123
static BC_STATUS bc_cproc_get_version(struct crystalhd_cmd *ctx,
113
				      struct crystalhd_ioctl_data *idata)
124
				      crystalhd_ioctl_data *idata)
114
{
125
{
115
116
	if (!ctx || !idata) {
126
	if (!ctx || !idata) {
117
		BCMLOG_ERR("Invalid Arg!!\n");
127
		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
118
		return BC_STS_INV_ARG;
128
		return BC_STS_INV_ARG;
119
	}
129
	}
120
	idata->udata.u.VerInfo.DriverMajor = crystalhd_kmod_major;
130
	idata->udata.u.VerInfo.DriverMajor = crystalhd_kmod_major;
Lines 124-134 static enum BC_STATUS bc_cproc_get_versi Link Here
124
}
134
}
125
135
126
136
127
static enum BC_STATUS bc_cproc_get_hwtype(struct crystalhd_cmd *ctx,
137
static BC_STATUS bc_cproc_get_hwtype(struct crystalhd_cmd *ctx, crystalhd_ioctl_data *idata)
128
					struct crystalhd_ioctl_data *idata)
129
{
138
{
130
	if (!ctx || !idata) {
139
	if (!ctx || !idata) {
131
		BCMLOG_ERR("Invalid Arg!!\n");
140
		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
132
		return BC_STS_INV_ARG;
141
		return BC_STS_INV_ARG;
133
	}
142
	}
134
143
Lines 142-235 static enum BC_STATUS bc_cproc_get_hwtyp Link Here
142
	return BC_STS_SUCCESS;
151
	return BC_STS_SUCCESS;
143
}
152
}
144
153
145
static enum BC_STATUS bc_cproc_reg_rd(struct crystalhd_cmd *ctx,
154
static BC_STATUS bc_cproc_reg_rd(struct crystalhd_cmd *ctx,
146
				 struct crystalhd_ioctl_data *idata)
155
				 crystalhd_ioctl_data *idata)
147
{
156
{
148
	if (!ctx || !idata)
157
	if (!ctx || !idata)
149
		return BC_STS_INV_ARG;
158
		return BC_STS_INV_ARG;
150
	idata->udata.u.regAcc.Value = bc_dec_reg_rd(ctx->adp,
159
	idata->udata.u.regAcc.Value = ctx->hw_ctx->pfnReadDevRegister(ctx->adp,
151
					idata->udata.u.regAcc.Offset);
160
					idata->udata.u.regAcc.Offset);
152
	return BC_STS_SUCCESS;
161
	return BC_STS_SUCCESS;
153
}
162
}
154
163
155
static enum BC_STATUS bc_cproc_reg_wr(struct crystalhd_cmd *ctx,
164
static BC_STATUS bc_cproc_reg_wr(struct crystalhd_cmd *ctx,
156
				 struct crystalhd_ioctl_data *idata)
165
				 crystalhd_ioctl_data *idata)
157
{
166
{
158
	if (!ctx || !idata)
167
	if (!ctx || !idata)
159
		return BC_STS_INV_ARG;
168
		return BC_STS_INV_ARG;
160
169
161
	bc_dec_reg_wr(ctx->adp, idata->udata.u.regAcc.Offset,
170
	ctx->hw_ctx->pfnWriteDevRegister(ctx->adp, idata->udata.u.regAcc.Offset,
162
		      idata->udata.u.regAcc.Value);
171
		      idata->udata.u.regAcc.Value);
163
172
164
	return BC_STS_SUCCESS;
173
	return BC_STS_SUCCESS;
165
}
174
}
166
175
167
static enum BC_STATUS bc_cproc_link_reg_rd(struct crystalhd_cmd *ctx,
176
static BC_STATUS bc_cproc_link_reg_rd(struct crystalhd_cmd *ctx,
168
				      struct crystalhd_ioctl_data *idata)
177
				      crystalhd_ioctl_data *idata)
169
{
178
{
170
	if (!ctx || !idata)
179
	if (!ctx || !idata)
171
		return BC_STS_INV_ARG;
180
		return BC_STS_INV_ARG;
172
181
173
	idata->udata.u.regAcc.Value = crystalhd_reg_rd(ctx->adp,
182
	idata->udata.u.regAcc.Value = ctx->hw_ctx->pfnReadFPGARegister(ctx->adp,
174
					idata->udata.u.regAcc.Offset);
183
					idata->udata.u.regAcc.Offset);
175
	return BC_STS_SUCCESS;
184
	return BC_STS_SUCCESS;
176
}
185
}
177
186
178
static enum BC_STATUS bc_cproc_link_reg_wr(struct crystalhd_cmd *ctx,
187
static BC_STATUS bc_cproc_link_reg_wr(struct crystalhd_cmd *ctx,
179
				      struct crystalhd_ioctl_data *idata)
188
				      crystalhd_ioctl_data *idata)
180
{
189
{
181
	if (!ctx || !idata)
190
	if (!ctx || !idata)
182
		return BC_STS_INV_ARG;
191
		return BC_STS_INV_ARG;
183
192
184
	crystalhd_reg_wr(ctx->adp, idata->udata.u.regAcc.Offset,
193
	ctx->hw_ctx->pfnWriteFPGARegister(ctx->adp, idata->udata.u.regAcc.Offset,
185
		       idata->udata.u.regAcc.Value);
194
		       idata->udata.u.regAcc.Value);
186
195
187
	return BC_STS_SUCCESS;
196
	return BC_STS_SUCCESS;
188
}
197
}
189
198
190
static enum BC_STATUS bc_cproc_mem_rd(struct crystalhd_cmd *ctx,
199
static BC_STATUS bc_cproc_mem_rd(struct crystalhd_cmd *ctx,
191
				 struct crystalhd_ioctl_data *idata)
200
				 crystalhd_ioctl_data *idata)
192
{
201
{
193
	enum BC_STATUS sts = BC_STS_SUCCESS;
202
	BC_STATUS sts = BC_STS_SUCCESS;
194
203
195
	if (!ctx || !idata || !idata->add_cdata)
204
	if (!ctx || !idata || !idata->add_cdata)
196
		return BC_STS_INV_ARG;
205
		return BC_STS_INV_ARG;
197
206
198
	if (idata->udata.u.devMem.NumDwords > (idata->add_cdata_sz / 4)) {
207
	if (idata->udata.u.devMem.NumDwords > (idata->add_cdata_sz / 4)) {
199
		BCMLOG_ERR("insufficient buffer\n");
208
		dev_err(chddev(), "insufficient buffer\n");
200
		return BC_STS_INV_ARG;
209
		return BC_STS_INV_ARG;
201
	}
210
	}
202
	sts = crystalhd_mem_rd(ctx->adp, idata->udata.u.devMem.StartOff,
211
	sts = ctx->hw_ctx->pfnDevDRAMRead(ctx->hw_ctx, idata->udata.u.devMem.StartOff,
203
			     idata->udata.u.devMem.NumDwords,
212
			     idata->udata.u.devMem.NumDwords,
204
			     (uint32_t *)idata->add_cdata);
213
			     (uint32_t *)idata->add_cdata);
205
	return sts;
214
	return sts;
206
215
207
}
216
}
208
217
209
static enum BC_STATUS bc_cproc_mem_wr(struct crystalhd_cmd *ctx,
218
static BC_STATUS bc_cproc_mem_wr(struct crystalhd_cmd *ctx,
210
				 struct crystalhd_ioctl_data *idata)
219
				 crystalhd_ioctl_data *idata)
211
{
220
{
212
	enum BC_STATUS sts = BC_STS_SUCCESS;
221
	BC_STATUS sts = BC_STS_SUCCESS;
213
222
214
	if (!ctx || !idata || !idata->add_cdata)
223
	if (!ctx || !idata || !idata->add_cdata)
215
		return BC_STS_INV_ARG;
224
		return BC_STS_INV_ARG;
216
225
217
	if (idata->udata.u.devMem.NumDwords > (idata->add_cdata_sz / 4)) {
226
	if (idata->udata.u.devMem.NumDwords > (idata->add_cdata_sz / 4)) {
218
		BCMLOG_ERR("insufficient buffer\n");
227
		dev_err(chddev(), "insufficient buffer\n");
219
		return BC_STS_INV_ARG;
228
		return BC_STS_INV_ARG;
220
	}
229
	}
221
230
222
	sts = crystalhd_mem_wr(ctx->adp, idata->udata.u.devMem.StartOff,
231
	sts = ctx->hw_ctx->pfnDevDRAMWrite(ctx->hw_ctx, idata->udata.u.devMem.StartOff,
223
			     idata->udata.u.devMem.NumDwords,
232
			     idata->udata.u.devMem.NumDwords,
224
			     (uint32_t *)idata->add_cdata);
233
			     (uint32_t *)idata->add_cdata);
225
	return sts;
234
	return sts;
226
}
235
}
227
236
228
static enum BC_STATUS bc_cproc_cfg_rd(struct crystalhd_cmd *ctx,
237
static BC_STATUS bc_cproc_cfg_rd(struct crystalhd_cmd *ctx,
229
				 struct crystalhd_ioctl_data *idata)
238
				 crystalhd_ioctl_data *idata)
230
{
239
{
231
	uint32_t ix, cnt, off, len;
240
	uint32_t ix, cnt, off, len;
232
	enum BC_STATUS sts = BC_STS_SUCCESS;
241
	BC_STATUS sts = BC_STS_SUCCESS;
233
	uint32_t *temp;
242
	uint32_t *temp;
234
243
235
	if (!ctx || !idata)
244
	if (!ctx || !idata)
Lines 239-246 static enum BC_STATUS bc_cproc_cfg_rd(st Link Here
239
	off = idata->udata.u.pciCfg.Offset;
248
	off = idata->udata.u.pciCfg.Offset;
240
	len = idata->udata.u.pciCfg.Size;
249
	len = idata->udata.u.pciCfg.Size;
241
250
242
	if (len <= 4)
251
	if (len <= 4) {
243
		return crystalhd_pci_cfg_rd(ctx->adp, off, len, temp);
252
		sts = crystalhd_pci_cfg_rd(ctx->adp, off, len, temp);
253
		return sts;
254
	}
244
255
245
	/* Truncate to dword alignment..*/
256
	/* Truncate to dword alignment..*/
246
	len = 4;
257
	len = 4;
Lines 248-254 static enum BC_STATUS bc_cproc_cfg_rd(st Link Here
248
	for (ix = 0; ix < cnt; ix++) {
259
	for (ix = 0; ix < cnt; ix++) {
249
		sts = crystalhd_pci_cfg_rd(ctx->adp, off, len, &temp[ix]);
260
		sts = crystalhd_pci_cfg_rd(ctx->adp, off, len, &temp[ix]);
250
		if (sts != BC_STS_SUCCESS) {
261
		if (sts != BC_STS_SUCCESS) {
251
			BCMLOG_ERR("config read : %d\n", sts);
262
			dev_err(chddev(), "config read : %d\n", sts);
252
			return sts;
263
			return sts;
253
		}
264
		}
254
		off += len;
265
		off += len;
Lines 257-267 static enum BC_STATUS bc_cproc_cfg_rd(st Link Here
257
	return sts;
268
	return sts;
258
}
269
}
259
270
260
static enum BC_STATUS bc_cproc_cfg_wr(struct crystalhd_cmd *ctx,
271
static BC_STATUS bc_cproc_cfg_wr(struct crystalhd_cmd *ctx,
261
				 struct crystalhd_ioctl_data *idata)
272
				 crystalhd_ioctl_data *idata)
262
{
273
{
263
	uint32_t ix, cnt, off, len;
274
	uint32_t ix, cnt, off, len;
264
	enum BC_STATUS sts = BC_STS_SUCCESS;
275
	BC_STATUS sts = BC_STS_SUCCESS;
265
	uint32_t *temp;
276
	uint32_t *temp;
266
277
267
	if (!ctx || !idata)
278
	if (!ctx || !idata)
Lines 280-286 static enum BC_STATUS bc_cproc_cfg_wr(st Link Here
280
	for (ix = 0; ix < cnt; ix++) {
291
	for (ix = 0; ix < cnt; ix++) {
281
		sts = crystalhd_pci_cfg_wr(ctx->adp, off, len, temp[ix]);
292
		sts = crystalhd_pci_cfg_wr(ctx->adp, off, len, temp[ix]);
282
		if (sts != BC_STS_SUCCESS) {
293
		if (sts != BC_STS_SUCCESS) {
283
			BCMLOG_ERR("config write : %d\n", sts);
294
			dev_err(chddev(), "config write : %d\n", sts);
284
			return sts;
295
			return sts;
285
		}
296
		}
286
		off += len;
297
		off += len;
Lines 289-317 static enum BC_STATUS bc_cproc_cfg_wr(st Link Here
289
	return sts;
300
	return sts;
290
}
301
}
291
302
292
static enum BC_STATUS bc_cproc_download_fw(struct crystalhd_cmd *ctx,
303
static BC_STATUS bc_cproc_download_fw(struct crystalhd_cmd *ctx,
293
				      struct crystalhd_ioctl_data *idata)
304
				      crystalhd_ioctl_data *idata)
294
{
305
{
295
	enum BC_STATUS sts = BC_STS_SUCCESS;
306
	BC_STATUS sts = BC_STS_SUCCESS;
307
308
	dev_dbg(chddev(), "Downloading FW\n");
296
309
297
	if (!ctx || !idata || !idata->add_cdata || !idata->add_cdata_sz) {
310
	if (!ctx || !idata || !idata->add_cdata || !idata->add_cdata_sz) {
298
		BCMLOG_ERR("Invalid Arg!!\n");
311
		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
299
		return BC_STS_INV_ARG;
312
		return BC_STS_INV_ARG;
300
	}
313
	}
301
314
302
	if (ctx->state != BC_LINK_INVALID) {
315
	if ((ctx->state != BC_LINK_INVALID) && (ctx->state != BC_LINK_RESUME)) {
303
		BCMLOG_ERR("Link invalid state %d\n", ctx->state);
316
		dev_dbg(chddev(), "Link invalid state download fw %x \n", ctx->state);
304
		return BC_STS_ERR_USAGE;
317
		return BC_STS_ERR_USAGE;
305
	}
318
	}
306
319
307
	sts = crystalhd_download_fw(ctx->adp, (uint8_t *)idata->add_cdata,
320
	sts = ctx->hw_ctx->pfnFWDwnld(ctx->hw_ctx, (uint8_t *)idata->add_cdata,
308
				  idata->add_cdata_sz);
321
				  idata->add_cdata_sz);
309
322
310
	if (sts != BC_STS_SUCCESS)
323
	if (sts != BC_STS_SUCCESS) {
311
		BCMLOG_ERR("Firmware Download Failure!! - %d\n", sts);
324
		dev_info(chddev(), "Firmware Download Failure!! - %d\n", sts);
312
	else
325
	} else
313
		ctx->state |= BC_LINK_INIT;
326
		ctx->state |= BC_LINK_INIT;
314
327
328
	ctx->pwr_state_change = BC_HW_RUNNING;
329
330
	ctx->hw_ctx->FwCmdCnt = 0;
315
	return sts;
331
	return sts;
316
}
332
}
317
333
Lines 328-341 static enum BC_STATUS bc_cproc_download_ Link Here
328
 *	Abort pending input transfers and issue decoder flush command.
344
 *	Abort pending input transfers and issue decoder flush command.
329
 *
345
 *
330
 */
346
 */
331
static enum BC_STATUS bc_cproc_do_fw_cmd(struct crystalhd_cmd *ctx,
347
static BC_STATUS bc_cproc_do_fw_cmd(struct crystalhd_cmd *ctx, crystalhd_ioctl_data *idata)
332
					struct crystalhd_ioctl_data *idata)
333
{
348
{
334
	enum BC_STATUS sts;
349
	struct device *dev = chddev();
350
	BC_STATUS sts;
335
	uint32_t *cmd;
351
	uint32_t *cmd;
336
352
337
	if (!(ctx->state & BC_LINK_INIT)) {
353
	if (!(ctx->state & BC_LINK_INIT)) {
338
		BCMLOG_ERR("Link invalid state %d\n", ctx->state);
354
		dev_dbg(dev, "Link invalid state do fw cmd %x \n", ctx->state);
339
		return BC_STS_ERR_USAGE;
355
		return BC_STS_ERR_USAGE;
340
	}
356
	}
341
357
Lines 345-362 static enum BC_STATUS bc_cproc_do_fw_cmd Link Here
345
	if (cmd[0] == eCMD_C011_DEC_CHAN_PAUSE) {
361
	if (cmd[0] == eCMD_C011_DEC_CHAN_PAUSE) {
346
		if (!cmd[3]) {
362
		if (!cmd[3]) {
347
			ctx->state &= ~BC_LINK_PAUSED;
363
			ctx->state &= ~BC_LINK_PAUSED;
348
			crystalhd_hw_unpause(&ctx->hw_ctx);
364
			ctx->hw_ctx->pfnIssuePause(ctx->hw_ctx, false);
349
		}
365
		}
350
	} else if (cmd[0] == eCMD_C011_DEC_CHAN_FLUSH) {
366
	} else if (cmd[0] == eCMD_C011_DEC_CHAN_FLUSH) {
351
		BCMLOG(BCMLOG_INFO, "Flush issued\n");
367
		dev_dbg(dev, "Flush issued\n");
352
		if (cmd[3])
368
		if (cmd[3])
353
			ctx->cin_wait_exit = 1;
369
			ctx->cin_wait_exit = 1;
354
	}
370
	}
355
371
356
	sts = crystalhd_do_fw_cmd(&ctx->hw_ctx, &idata->udata.u.fwCmd);
372
	sts = ctx->hw_ctx->pfnDoFirmwareCmd(ctx->hw_ctx, &idata->udata.u.fwCmd);
357
373
358
	if (sts != BC_STS_SUCCESS) {
374
	if (sts != BC_STS_SUCCESS) {
359
		BCMLOG(BCMLOG_INFO, "fw cmd %x failed\n", cmd[0]);
375
		dev_dbg(dev, "fw cmd %x failed\n", cmd[0]);
360
		return sts;
376
		return sts;
361
	}
377
	}
362
378
Lines 364-370 static enum BC_STATUS bc_cproc_do_fw_cmd Link Here
364
	if (cmd[0] == eCMD_C011_DEC_CHAN_PAUSE) {
380
	if (cmd[0] == eCMD_C011_DEC_CHAN_PAUSE) {
365
		if (cmd[3]) {
381
		if (cmd[3]) {
366
			ctx->state |= BC_LINK_PAUSED;
382
			ctx->state |= BC_LINK_PAUSED;
367
			crystalhd_hw_pause(&ctx->hw_ctx);
383
			ctx->hw_ctx->pfnIssuePause(ctx->hw_ctx, true);
368
		}
384
		}
369
	}
385
	}
370
386
Lines 372-422 static enum BC_STATUS bc_cproc_do_fw_cmd Link Here
372
}
388
}
373
389
374
static void bc_proc_in_completion(struct crystalhd_dio_req *dio_hnd,
390
static void bc_proc_in_completion(struct crystalhd_dio_req *dio_hnd,
375
				  wait_queue_head_t *event, enum BC_STATUS sts)
391
				  wait_queue_head_t *event, BC_STATUS sts)
376
{
392
{
377
	if (!dio_hnd || !event) {
393
	if (!dio_hnd || !event) {
378
		BCMLOG_ERR("Invalid Arg!!\n");
394
		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
379
		return;
395
		return;
380
	}
396
	}
381
	if (sts == BC_STS_IO_USER_ABORT)
397
	if (sts == BC_STS_IO_USER_ABORT || sts == BC_STS_PWR_MGMT)
382
		return;
398
		 return;
383
399
384
	dio_hnd->uinfo.comp_sts = sts;
400
	dio_hnd->uinfo.comp_sts = sts;
385
	dio_hnd->uinfo.ev_sts = 1;
401
	dio_hnd->uinfo.ev_sts = 1;
386
	crystalhd_set_event(event);
402
	crystalhd_set_event(event);
387
}
403
}
388
404
389
static enum BC_STATUS bc_cproc_codein_sleep(struct crystalhd_cmd *ctx)
405
static BC_STATUS bc_cproc_codein_sleep(struct crystalhd_cmd *ctx)
390
{
406
{
391
	wait_queue_head_t sleep_ev;
407
	wait_queue_head_t sleep_ev;
392
	int rc = 0;
408
	int rc = 0;
393
409
394
	if (ctx->state & BC_LINK_SUSPEND)
410
	if (ctx->state & BC_LINK_SUSPEND)
395
		return BC_STS_IO_USER_ABORT;
411
		return BC_STS_PWR_MGMT;
396
412
397
	if (ctx->cin_wait_exit) {
413
	if (ctx->cin_wait_exit) {
398
		ctx->cin_wait_exit = 0;
414
		ctx->cin_wait_exit = 0;
399
		return BC_STS_CMD_CANCELLED;
415
		return BC_STS_CMD_CANCELLED;
400
	}
416
	}
401
	crystalhd_create_event(&sleep_ev);
417
	crystalhd_create_event(&sleep_ev);
402
	crystalhd_wait_on_event(&sleep_ev, 0, 100, rc, 0);
418
	crystalhd_wait_on_event(&sleep_ev, 0, 100, rc, false);
403
	if (rc == -EINTR)
419
	if (rc == -EINTR)
404
		return BC_STS_IO_USER_ABORT;
420
		return BC_STS_IO_USER_ABORT;
405
421
406
	return BC_STS_SUCCESS;
422
	return BC_STS_SUCCESS;
407
}
423
}
408
424
409
static enum BC_STATUS bc_cproc_hw_txdma(struct crystalhd_cmd *ctx,
425
static BC_STATUS bc_cproc_hw_txdma(struct crystalhd_cmd *ctx,
410
				   struct crystalhd_ioctl_data *idata,
426
				   crystalhd_ioctl_data *idata,
411
				   struct crystalhd_dio_req *dio)
427
				   struct crystalhd_dio_req *dio)
412
{
428
{
429
	struct device *dev = chddev();
413
	uint32_t tx_listid = 0;
430
	uint32_t tx_listid = 0;
414
	enum BC_STATUS sts = BC_STS_SUCCESS;
431
	BC_STATUS sts = BC_STS_SUCCESS;
415
	wait_queue_head_t event;
432
	wait_queue_head_t event;
416
	int rc = 0;
433
	int rc = 0;
417
434
418
	if (!ctx || !idata || !dio) {
435
	if (!ctx || !idata || !dio) {
419
		BCMLOG_ERR("Invalid Arg!!\n");
436
		dev_err(dev, "%s: Invalid Arg\n", __func__);
420
		return BC_STS_INV_ARG;
437
		return BC_STS_INV_ARG;
421
	}
438
	}
422
439
Lines 424-430 static enum BC_STATUS bc_cproc_hw_txdma( Link Here
424
441
425
	ctx->tx_list_id = 0;
442
	ctx->tx_list_id = 0;
426
	/* msleep_interruptible(2000); */
443
	/* msleep_interruptible(2000); */
427
	sts = crystalhd_hw_post_tx(&ctx->hw_ctx, dio, bc_proc_in_completion,
444
	sts = crystalhd_hw_post_tx(ctx->hw_ctx, dio, bc_proc_in_completion,
428
				 &event, &tx_listid,
445
				 &event, &tx_listid,
429
				 idata->udata.u.ProcInput.Encrypted);
446
				 idata->udata.u.ProcInput.Encrypted);
430
447
Lines 432-444 static enum BC_STATUS bc_cproc_hw_txdma( Link Here
432
		sts = bc_cproc_codein_sleep(ctx);
449
		sts = bc_cproc_codein_sleep(ctx);
433
		if (sts != BC_STS_SUCCESS)
450
		if (sts != BC_STS_SUCCESS)
434
			break;
451
			break;
435
		sts = crystalhd_hw_post_tx(&ctx->hw_ctx, dio,
452
		sts = crystalhd_hw_post_tx(ctx->hw_ctx, dio,
436
					 bc_proc_in_completion,
453
					 bc_proc_in_completion,
437
					 &event, &tx_listid,
454
					 &event, &tx_listid,
438
					 idata->udata.u.ProcInput.Encrypted);
455
					 idata->udata.u.ProcInput.Encrypted);
439
	}
456
	}
440
	if (sts != BC_STS_SUCCESS) {
457
	if (sts != BC_STS_SUCCESS) {
441
		BCMLOG(BCMLOG_DBG, "_hw_txdma returning sts:%d\n", sts);
458
		dev_dbg(dev, "_hw_txdma returning sts:%d\n", sts);
442
		return sts;
459
		return sts;
443
	}
460
	}
444
	if (ctx->cin_wait_exit)
461
	if (ctx->cin_wait_exit)
Lines 446-461 static enum BC_STATUS bc_cproc_hw_txdma( Link Here
446
463
447
	ctx->tx_list_id = tx_listid;
464
	ctx->tx_list_id = tx_listid;
448
465
466
	dev_dbg(dev, "Sending TX\n");
467
449
	/* _post() succeeded.. wait for the completion. */
468
	/* _post() succeeded.. wait for the completion. */
450
	crystalhd_wait_on_event(&event, (dio->uinfo.ev_sts), 3000, rc, 0);
469
	crystalhd_wait_on_event(&event, (dio->uinfo.ev_sts), 3000, rc, false);
451
	ctx->tx_list_id = 0;
470
	ctx->tx_list_id = 0;
452
	if (!rc) {
471
	if (!rc) {
453
		return dio->uinfo.comp_sts;
472
		return dio->uinfo.comp_sts;
454
	} else if (rc == -EBUSY) {
473
	} else if (rc == -EBUSY) {
455
		BCMLOG(BCMLOG_DBG, "_tx_post() T/O\n");
474
		dev_dbg(dev, "_tx_post() T/O \n");
456
		sts = BC_STS_TIMEOUT;
475
		sts = BC_STS_TIMEOUT;
457
	} else if (rc == -EINTR) {
476
	} else if (rc == -EINTR) {
458
		BCMLOG(BCMLOG_DBG, "Tx Wait Signal int.\n");
477
		dev_dbg(dev, "Tx Wait Signal int.\n");
459
		sts = BC_STS_IO_USER_ABORT;
478
		sts = BC_STS_IO_USER_ABORT;
460
	} else {
479
	} else {
461
		sts = BC_STS_IO_ERROR;
480
		sts = BC_STS_IO_ERROR;
Lines 465-521 static enum BC_STATUS bc_cproc_hw_txdma( Link Here
465
	 * so no need to wait on the event again.. the return itself
484
	 * so no need to wait on the event again.. the return itself
466
	 * ensures the release of our resources.
485
	 * ensures the release of our resources.
467
	 */
486
	 */
468
	crystalhd_hw_cancel_tx(&ctx->hw_ctx, tx_listid);
487
	crystalhd_hw_cancel_tx(ctx->hw_ctx, tx_listid);
469
488
470
	return sts;
489
	return sts;
471
}
490
}
472
491
473
/* Helper function to check on user buffers */
492
/* Helper function to check on user buffers */
474
static enum BC_STATUS bc_cproc_check_inbuffs(bool pin, void *ubuff,
493
static BC_STATUS bc_cproc_check_inbuffs(bool pin, void *ubuff, uint32_t ub_sz,
475
				 uint32_t ub_sz, uint32_t uv_off, bool en_422)
494
					uint32_t uv_off, bool en_422)
476
{
495
{
496
	struct device *dev = chddev();
477
	if (!ubuff || !ub_sz) {
497
	if (!ubuff || !ub_sz) {
478
		BCMLOG_ERR("%s->Invalid Arg %p %x\n",
498
		dev_err(dev, "%s->Invalid Arg %p %x\n",
479
			((pin) ? "TX" : "RX"), ubuff, ub_sz);
499
			((pin) ? "TX" : "RX"), ubuff, ub_sz);
480
		return BC_STS_INV_ARG;
500
		return BC_STS_INV_ARG;
481
	}
501
	}
482
502
483
	/* Check for alignment */
503
	/* Check for alignment */
484
	if (((uintptr_t)ubuff) & 0x03) {
504
	if (((uintptr_t)ubuff) & 0x03) {
485
		BCMLOG_ERR(
505
		dev_err(dev, "%s-->Un-aligned address not implemented yet.. %p \n",
486
			"%s-->Un-aligned address not implemented yet.. %p\n",
506
				((pin) ? "TX" : "RX"), ubuff);
487
			 ((pin) ? "TX" : "RX"), ubuff);
488
		return BC_STS_NOT_IMPL;
507
		return BC_STS_NOT_IMPL;
489
	}
508
	}
490
	if (pin)
509
	if (pin)
491
		return BC_STS_SUCCESS;
510
		return BC_STS_SUCCESS;
492
511
493
	if (!en_422 && !uv_off) {
512
	if (!en_422 && !uv_off) {
494
		BCMLOG_ERR("Need UV offset for 420 mode.\n");
513
		dev_err(dev, "Need UV offset for 420 mode.\n");
495
		return BC_STS_INV_ARG;
514
		return BC_STS_INV_ARG;
496
	}
515
	}
497
516
498
	if (en_422 && uv_off) {
517
	if (en_422 && uv_off) {
499
		BCMLOG_ERR("UV offset in 422 mode ??\n");
518
		dev_err(dev, "UV offset in 422 mode ??\n");
500
		return BC_STS_INV_ARG;
519
		return BC_STS_INV_ARG;
501
	}
520
	}
502
521
503
	return BC_STS_SUCCESS;
522
	return BC_STS_SUCCESS;
504
}
523
}
505
524
506
static enum BC_STATUS bc_cproc_proc_input(struct crystalhd_cmd *ctx,
525
static BC_STATUS bc_cproc_proc_input(struct crystalhd_cmd *ctx, crystalhd_ioctl_data *idata)
507
					struct crystalhd_ioctl_data *idata)
508
{
526
{
527
	struct device *dev = chddev();
509
	void *ubuff;
528
	void *ubuff;
510
	uint32_t ub_sz;
529
	uint32_t ub_sz;
511
	struct crystalhd_dio_req *dio_hnd = NULL;
530
	struct crystalhd_dio_req *dio_hnd = NULL;
512
	enum BC_STATUS sts = BC_STS_SUCCESS;
531
	BC_STATUS sts = BC_STS_SUCCESS;
513
532
514
	if (!ctx || !idata) {
533
	if (!ctx || !idata) {
515
		BCMLOG_ERR("Invalid Arg!!\n");
534
		dev_err(dev, "%s: Invalid Arg\n", __func__);
516
		return BC_STS_INV_ARG;
535
		return BC_STS_INV_ARG;
517
	}
536
	}
518
537
538
	if (ctx->state & BC_LINK_SUSPEND) {
539
		dev_err(dev, "proc_input: Link Suspended\n");
540
		return BC_STS_PWR_MGMT;
541
	}
542
519
	ubuff = idata->udata.u.ProcInput.pDmaBuff;
543
	ubuff = idata->udata.u.ProcInput.pDmaBuff;
520
	ub_sz = idata->udata.u.ProcInput.BuffSz;
544
	ub_sz = idata->udata.u.ProcInput.BuffSz;
521
545
Lines 525-531 static enum BC_STATUS bc_cproc_proc_inpu Link Here
525
549
526
	sts = crystalhd_map_dio(ctx->adp, ubuff, ub_sz, 0, 0, 1, &dio_hnd);
550
	sts = crystalhd_map_dio(ctx->adp, ubuff, ub_sz, 0, 0, 1, &dio_hnd);
527
	if (sts != BC_STS_SUCCESS) {
551
	if (sts != BC_STS_SUCCESS) {
528
		BCMLOG_ERR("dio map - %d\n", sts);
552
		dev_err(dev, "dio map - %d \n", sts);
529
		return sts;
553
		return sts;
530
	}
554
	}
531
555
Lines 539-555 static enum BC_STATUS bc_cproc_proc_inpu Link Here
539
	return sts;
563
	return sts;
540
}
564
}
541
565
542
static enum BC_STATUS bc_cproc_add_cap_buff(struct crystalhd_cmd *ctx,
566
static BC_STATUS bc_cproc_add_cap_buff(struct crystalhd_cmd *ctx,
543
				       struct crystalhd_ioctl_data *idata)
567
				       crystalhd_ioctl_data *idata)
544
{
568
{
569
	struct device *dev = chddev();
545
	void *ubuff;
570
	void *ubuff;
546
	uint32_t ub_sz, uv_off;
571
	uint32_t ub_sz, uv_off;
547
	bool en_422;
572
	bool en_422;
548
	struct crystalhd_dio_req *dio_hnd = NULL;
573
	struct crystalhd_dio_req *dio_hnd = NULL;
549
	enum BC_STATUS sts = BC_STS_SUCCESS;
574
	BC_STATUS sts = BC_STS_SUCCESS;
550
575
551
	if (!ctx || !idata) {
576
	if (!ctx || !idata) {
552
		BCMLOG_ERR("Invalid Arg!!\n");
577
		dev_err(dev, "%s: Invalid Arg\n", __func__);
553
		return BC_STS_INV_ARG;
578
		return BC_STS_INV_ARG;
554
	}
579
	}
555
580
Lines 559-579 static enum BC_STATUS bc_cproc_add_cap_b Link Here
559
	en_422 = idata->udata.u.RxBuffs.b422Mode;
584
	en_422 = idata->udata.u.RxBuffs.b422Mode;
560
585
561
	sts = bc_cproc_check_inbuffs(0, ubuff, ub_sz, uv_off, en_422);
586
	sts = bc_cproc_check_inbuffs(0, ubuff, ub_sz, uv_off, en_422);
587
562
	if (sts != BC_STS_SUCCESS)
588
	if (sts != BC_STS_SUCCESS)
563
		return sts;
589
		return sts;
564
590
565
	sts = crystalhd_map_dio(ctx->adp, ubuff, ub_sz, uv_off,
591
	sts = crystalhd_map_dio(ctx->adp, ubuff, ub_sz, uv_off,
566
			      en_422, 0, &dio_hnd);
592
			      en_422, 0, &dio_hnd);
567
	if (sts != BC_STS_SUCCESS) {
593
	if (sts != BC_STS_SUCCESS) {
568
		BCMLOG_ERR("dio map - %d\n", sts);
594
		dev_err(dev, "dio map - %d \n", sts);
569
		return sts;
595
		return sts;
570
	}
596
	}
571
597
572
	if (!dio_hnd)
598
	if (!dio_hnd)
573
		return BC_STS_ERROR;
599
		return BC_STS_ERROR;
574
600
575
	sts = crystalhd_hw_add_cap_buffer(&ctx->hw_ctx, dio_hnd,
601
	sts = crystalhd_hw_add_cap_buffer(ctx->hw_ctx, dio_hnd, (ctx->state == BC_LINK_READY));
576
					 (ctx->state == BC_LINK_READY));
577
	if ((sts != BC_STS_SUCCESS) && (sts != BC_STS_BUSY)) {
602
	if ((sts != BC_STS_SUCCESS) && (sts != BC_STS_BUSY)) {
578
		crystalhd_unmap_dio(ctx->adp, dio_hnd);
603
		crystalhd_unmap_dio(ctx->adp, dio_hnd);
579
		return sts;
604
		return sts;
Lines 582-626 static enum BC_STATUS bc_cproc_add_cap_b Link Here
582
	return BC_STS_SUCCESS;
607
	return BC_STS_SUCCESS;
583
}
608
}
584
609
585
static enum BC_STATUS bc_cproc_fmt_change(struct crystalhd_cmd *ctx,
610
static BC_STATUS bc_cproc_fmt_change(struct crystalhd_cmd *ctx,
586
				     struct crystalhd_dio_req *dio)
611
				     struct crystalhd_dio_req *dio)
587
{
612
{
588
	enum BC_STATUS sts = BC_STS_SUCCESS;
613
	BC_STATUS sts = BC_STS_SUCCESS;
589
614
590
	sts = crystalhd_hw_add_cap_buffer(&ctx->hw_ctx, dio, 0);
615
	sts = crystalhd_hw_add_cap_buffer(ctx->hw_ctx, dio, 0);
591
	if (sts != BC_STS_SUCCESS)
616
	if (sts != BC_STS_SUCCESS)
592
		return sts;
617
		return sts;
593
618
594
	ctx->state |= BC_LINK_FMT_CHG;
619
	ctx->state |= BC_LINK_FMT_CHG;
595
	if (ctx->state == BC_LINK_READY)
620
	if (ctx->state == BC_LINK_READY)
596
		sts = crystalhd_hw_start_capture(&ctx->hw_ctx);
621
		sts = crystalhd_hw_start_capture(ctx->hw_ctx);
597
622
598
	return sts;
623
	return sts;
599
}
624
}
600
625
601
static enum BC_STATUS bc_cproc_fetch_frame(struct crystalhd_cmd *ctx,
626
static BC_STATUS bc_cproc_fetch_frame(struct crystalhd_cmd *ctx,
602
				      struct crystalhd_ioctl_data *idata)
627
				      crystalhd_ioctl_data *idata)
603
{
628
{
629
	struct device *dev = chddev();
604
	struct crystalhd_dio_req *dio = NULL;
630
	struct crystalhd_dio_req *dio = NULL;
605
	enum BC_STATUS sts = BC_STS_SUCCESS;
631
	BC_STATUS sts = BC_STS_SUCCESS;
606
	struct BC_DEC_OUT_BUFF *frame;
632
	BC_DEC_OUT_BUFF *frame;
607
633
608
	if (!ctx || !idata) {
634
	if (!ctx || !idata) {
609
		BCMLOG_ERR("Invalid Arg!!\n");
635
		dev_err(dev, "%s: Invalid Arg\n", __func__);
610
		return BC_STS_INV_ARG;
636
		return BC_STS_INV_ARG;
611
	}
637
	}
612
638
639
	if (ctx->state & BC_LINK_SUSPEND)
640
		return BC_STS_PWR_MGMT;
641
613
	if (!(ctx->state & BC_LINK_CAP_EN)) {
642
	if (!(ctx->state & BC_LINK_CAP_EN)) {
614
		BCMLOG(BCMLOG_DBG, "Capture not enabled..%x\n", ctx->state);
643
		dev_dbg(dev, "Capture not enabled..%x\n", ctx->state);
615
		return BC_STS_ERR_USAGE;
644
		return BC_STS_ERR_USAGE;
616
	}
645
	}
617
646
618
	frame = &idata->udata.u.DecOutData;
647
	frame = &idata->udata.u.DecOutData;
619
648
620
	sts = crystalhd_hw_get_cap_buffer(&ctx->hw_ctx, &frame->PibInfo, &dio);
649
	sts = crystalhd_hw_get_cap_buffer(ctx->hw_ctx, &frame->PibInfo, &dio);
621
	if (sts != BC_STS_SUCCESS)
650
	if (sts != BC_STS_SUCCESS)
622
		return (ctx->state & BC_LINK_SUSPEND) ?
651
		return (ctx->state & BC_LINK_SUSPEND) ? BC_STS_PWR_MGMT : sts;
623
					 BC_STS_IO_USER_ABORT : sts;
652
653
	dev_dbg(dev, "Got Picture\n");
624
654
625
	frame->Flags = dio->uinfo.comp_flags;
655
	frame->Flags = dio->uinfo.comp_flags;
626
656
Lines 640-665 static enum BC_STATUS bc_cproc_fetch_fra Link Here
640
	return BC_STS_SUCCESS;
670
	return BC_STS_SUCCESS;
641
}
671
}
642
672
643
static enum BC_STATUS bc_cproc_start_capture(struct crystalhd_cmd *ctx,
673
static BC_STATUS bc_cproc_start_capture(struct crystalhd_cmd *ctx,
644
					struct crystalhd_ioctl_data *idata)
674
					crystalhd_ioctl_data *idata)
645
{
675
{
646
	ctx->state |= BC_LINK_CAP_EN;
676
	ctx->state |= BC_LINK_CAP_EN;
677
678
	if( idata->udata.u.RxCap.PauseThsh )
679
		ctx->hw_ctx->PauseThreshold = idata->udata.u.RxCap.PauseThsh;
680
	else
681
		ctx->hw_ctx->PauseThreshold = HW_PAUSE_THRESHOLD;
682
683
	if( idata->udata.u.RxCap.ResumeThsh )
684
		ctx->hw_ctx->ResumeThreshold = idata->udata.u.RxCap.ResumeThsh;
685
	else
686
		ctx->hw_ctx->ResumeThreshold = HW_RESUME_THRESHOLD;
687
688
	printk(KERN_DEBUG "start_capture: pause_th:%d, resume_th:%d\n", ctx->hw_ctx->PauseThreshold, ctx->hw_ctx->ResumeThreshold);
689
690
	ctx->hw_ctx->DrvTotalFrmCaptured = 0;
691
692
	ctx->hw_ctx->DefaultPauseThreshold = ctx->hw_ctx->PauseThreshold; /* used to restore on FMTCH */
693
694
	ctx->hw_ctx->pfnNotifyHardware(ctx->hw_ctx, BC_EVENT_START_CAPTURE);
695
647
	if (ctx->state == BC_LINK_READY)
696
	if (ctx->state == BC_LINK_READY)
648
		return crystalhd_hw_start_capture(&ctx->hw_ctx);
697
		return crystalhd_hw_start_capture(ctx->hw_ctx);
649
698
650
	return BC_STS_SUCCESS;
699
	return BC_STS_SUCCESS;
651
}
700
}
652
701
653
static enum BC_STATUS bc_cproc_flush_cap_buffs(struct crystalhd_cmd *ctx,
702
static BC_STATUS bc_cproc_flush_cap_buffs(struct crystalhd_cmd *ctx,
654
					  struct crystalhd_ioctl_data *idata)
703
					  crystalhd_ioctl_data *idata)
655
{
704
{
656
	struct crystalhd_dio_req *dio = NULL;
705
	struct device *dev = chddev();
657
	enum BC_STATUS sts = BC_STS_SUCCESS;
706
	struct crystalhd_rx_dma_pkt *rpkt;
658
	struct BC_DEC_OUT_BUFF *frame;
659
	uint32_t count;
660
707
661
	if (!ctx || !idata) {
708
	if (!ctx || !idata) {
662
		BCMLOG_ERR("Invalid Arg!!\n");
709
		dev_err(dev, "%s: Invalid Arg\n", __func__);
663
		return BC_STS_INV_ARG;
710
		return BC_STS_INV_ARG;
664
	}
711
	}
665
712
Lines 667-703 static enum BC_STATUS bc_cproc_flush_cap Link Here
667
		return BC_STS_ERR_USAGE;
714
		return BC_STS_ERR_USAGE;
668
715
669
	/* We should ack flush even when we are in paused/suspend state */
716
	/* We should ack flush even when we are in paused/suspend state */
670
	if (!(ctx->state & BC_LINK_READY))
717
/*	if (!(ctx->state & BC_LINK_READY)) */
671
		return crystalhd_hw_stop_capture(&ctx->hw_ctx);
718
/*		return crystalhd_hw_stop_capture(&ctx->hw_ctx); */
672
719
673
	ctx->state &= ~(BC_LINK_CAP_EN|BC_LINK_FMT_CHG);
720
	dev_dbg(dev, "number of rx success %u and failure %u\n", ctx->hw_ctx->stats.rx_success, ctx->hw_ctx->stats.rx_errors);
674
721
	if(idata->udata.u.FlushRxCap.bDiscardOnly) {
675
	frame = &idata->udata.u.DecOutData;
722
		/* just flush without unmapping and then resume */
676
	for (count = 0; count < BC_RX_LIST_CNT; count++) {
723
		crystalhd_hw_stop_capture(ctx->hw_ctx, false);
677
724
		while((rpkt = crystalhd_dioq_fetch(ctx->hw_ctx->rx_actq)) != NULL)
678
		sts = crystalhd_hw_get_cap_buffer(&ctx->hw_ctx,
725
			crystalhd_dioq_add(ctx->hw_ctx->rx_freeq, rpkt, false, rpkt->pkt_tag);
679
					 &frame->PibInfo, &dio);
726
680
		if (sts != BC_STS_SUCCESS)
727
		while((rpkt = crystalhd_dioq_fetch(ctx->hw_ctx->rx_rdyq)) != NULL)
681
			break;
728
			crystalhd_dioq_add(ctx->hw_ctx->rx_freeq, rpkt, false, rpkt->pkt_tag);
682
729
		crystalhd_hw_start_capture(ctx->hw_ctx);
683
		crystalhd_unmap_dio(ctx->adp, dio);
730
	} else {
731
		ctx->state &= ~(BC_LINK_CAP_EN|BC_LINK_FMT_CHG);
732
		crystalhd_hw_stop_capture(ctx->hw_ctx, true);
684
	}
733
	}
685
734
686
	return crystalhd_hw_stop_capture(&ctx->hw_ctx);
735
	return BC_STS_SUCCESS;
687
}
736
}
688
737
689
static enum BC_STATUS bc_cproc_get_stats(struct crystalhd_cmd *ctx,
738
static BC_STATUS bc_cproc_get_stats(struct crystalhd_cmd *ctx,
690
				    struct crystalhd_ioctl_data *idata)
739
				    crystalhd_ioctl_data *idata)
691
{
740
{
692
	struct BC_DTS_STATS *stats;
741
	BC_DTS_STATS *stats;
693
	struct crystalhd_hw_stats	hw_stats;
742
	struct crystalhd_hw_stats	hw_stats;
743
	uint32_t pic_width;
744
	uint8_t flags = 0;
745
	bool readTxOnly = false;
746
	unsigned long irqflags;
694
747
695
	if (!ctx || !idata) {
748
	if (!ctx || !idata) {
696
		BCMLOG_ERR("Invalid Arg!!\n");
749
		dev_err(chddev(), "%s: Invalid Arg\n", __func__);
697
		return BC_STS_INV_ARG;
750
		return BC_STS_INV_ARG;
698
	}
751
	}
699
752
700
	crystalhd_hw_stats(&ctx->hw_ctx, &hw_stats);
753
	crystalhd_hw_stats(ctx->hw_ctx, &hw_stats);
701
754
702
	stats = &idata->udata.u.drvStat;
755
	stats = &idata->udata.u.drvStat;
703
	stats->drvRLL = hw_stats.rdyq_count;
756
	stats->drvRLL = hw_stats.rdyq_count;
Lines 710-772 static enum BC_STATUS bc_cproc_get_stats Link Here
710
	stats->TxFifoBsyCnt = hw_stats.cin_busy;
763
	stats->TxFifoBsyCnt = hw_stats.cin_busy;
711
	stats->pauseCount = hw_stats.pause_cnt;
764
	stats->pauseCount = hw_stats.pause_cnt;
712
765
713
	if (ctx->pwr_state_change)
766
	/* Indicate that we are checking stats on the input buffer for a single threaded application */
714
		stats->pwr_state_change = 1;
767
	/* this will prevent the HW from going to low power because we assume that once we have told the application */
768
	/* that we have space in the HW, the app is going to try to DMA. And if we block that DMA, a single threaded application */
769
	/* will deadlock */
770
	if(stats->DrvNextMDataPLD & BC_BIT(31))
771
	{
772
		flags |= 0x08;
773
		/* Also for single threaded applications, check to see if we have reduced the power down */
774
		/* pause threshold to too low and increase it if the RLL is close to the threshold */
775
/*		if(pDrvStat->drvRLL >= pDevExt->pHwExten->PauseThreshold)
776
			pDevExt->pHwExten->PauseThreshold++;
777
		PeekNextTS = TRUE;*/
778
	}
779
780
	/* also indicate that we are just checking stats and not posting */
781
	/* This allows multi-threaded applications to be placed into low power state */
782
	/* because eveentually the RX thread will wake up the HW when needed */
783
	flags |= 0x04;
784
785
	stats->pwr_state_change = ctx->pwr_state_change;
786
715
	if (ctx->state & BC_LINK_PAUSED)
787
	if (ctx->state & BC_LINK_PAUSED)
716
		stats->DrvPauseTime = 1;
788
		stats->DrvPauseTime = 1;
717
789
790
	/* use bit 29 of the input status to indicate that we are trying to read VC1 status */
791
	/* This is important for the BCM70012 which uses a different input queue for VC1 */
792
	if(stats->DrvcpbEmptySize & BC_BIT(29))
793
		flags = 0x2;
794
	/* Bit 30 is used to indicate that we are reading only the TX stats and to not touch the Ready list */
795
	if(stats->DrvcpbEmptySize & BC_BIT(30))
796
		readTxOnly = true;
797
798
	spin_lock_irqsave(&ctx->hw_ctx->lock, irqflags);
799
	ctx->hw_ctx->pfnCheckInputFIFO(ctx->hw_ctx, 0, &stats->DrvcpbEmptySize,
800
				      false, &flags);
801
	spin_unlock_irqrestore(&ctx->hw_ctx->lock, irqflags);
802
803
	/* status peek ahead to retreive the next decoded frame timestamp */
804
/*	if (!readTxOnly && stats->drvRLL && (stats->DrvNextMDataPLD & BC_BIT(31))) { */
805
	if (!readTxOnly && stats->drvRLL) {
806
		dev_dbg(chddev(), "Have Pictures %d\n", stats->drvRLL);
807
		pic_width = stats->DrvNextMDataPLD & 0xffff;
808
		stats->DrvNextMDataPLD = 0;
809
		if (pic_width <= 1920) {
810
			/* get fetch lock to make sure that fetch is not in progress as wel peek */
811
			if(down_interruptible(&ctx->hw_ctx->fetch_sem))
812
				goto get_out;
813
			if(ctx->hw_ctx->pfnPeekNextDeodedFr(ctx->hw_ctx,&stats->DrvNextMDataPLD, &stats->picNumFlags, pic_width)) {
814
				/* Check in case we dropped a picture here */
815
				crystalhd_hw_stats(ctx->hw_ctx, &hw_stats);
816
				stats->drvRLL = hw_stats.rdyq_count;
817
				stats->drvFLL = hw_stats.freeq_count;
818
			}
819
			up(&ctx->hw_ctx->fetch_sem);
820
			dev_dbg(chddev(), "peeking done\n");
821
		}
822
	}
823
824
get_out:
718
	return BC_STS_SUCCESS;
825
	return BC_STS_SUCCESS;
719
}
826
}
720
827
721
static enum BC_STATUS bc_cproc_reset_stats(struct crystalhd_cmd *ctx,
828
static BC_STATUS bc_cproc_reset_stats(struct crystalhd_cmd *ctx,
722
				      struct crystalhd_ioctl_data *idata)
829
				      crystalhd_ioctl_data *idata)
723
{
830
{
724
	crystalhd_hw_stats(&ctx->hw_ctx, NULL);
831
	crystalhd_hw_stats(ctx->hw_ctx, NULL);
725
832
726
	return BC_STS_SUCCESS;
833
	return BC_STS_SUCCESS;
727
}
834
}
728
835
729
static enum BC_STATUS bc_cproc_chg_clk(struct crystalhd_cmd *ctx,
836
/**
730
				  struct crystalhd_ioctl_data *idata)
837
 *
838
 * bc_cproc_release_user - Close Application Handle
839
 *
840
 * Used to be crystalhd_user_close
841
 *
842
 * @ctx: Command layer contextx.
843
 * @uc: User ID context.
844
 *
845
 * Return:
846
 *	status
847
 *
848
 * Closer aplication handle and release app specific
849
 * resources.
850
 *
851
 * Move to IOCTL based implementation called from the RELEASE IOCTL
852
 */
853
BC_STATUS bc_cproc_release_user(struct crystalhd_cmd *ctx, crystalhd_ioctl_data *idata)
731
{
854
{
732
	struct BC_CLOCK *clock;
855
733
	uint32_t oldClk;
856
	struct device *dev = chddev();
734
	enum BC_STATUS sts = BC_STS_SUCCESS;
857
	uint32_t mode;
735
858
736
	if (!ctx || !idata) {
859
	if (!ctx || !idata) {
737
		BCMLOG_ERR("Invalid Arg!!\n");
860
		dev_err(dev, "%s: Invalid Arg\n", __func__);
738
		return BC_STS_INV_ARG;
861
		return BC_STS_INV_ARG;
739
	}
862
	}
740
863
741
	clock = &idata->udata.u.clockValue;
864
	if (ctx->user[idata->u_id].mode == DTS_MODE_INV) {
742
	oldClk = ctx->hw_ctx.core_clock_mhz;
865
		dev_err(dev, "Handle is already closed\n");
743
	ctx->hw_ctx.core_clock_mhz = clock->clk;
866
		return BC_STS_ERR_USAGE;
867
	}
868
869
	mode = ctx->user[idata->u_id].mode;
870
871
	ctx->user[idata->u_id].mode = DTS_MODE_INV;
872
	ctx->user[idata->u_id].in_use = 0;
744
873
745
	if (ctx->state & BC_LINK_READY) {
874
	dev_info(chddev(), "Closing user[%x] handle via ioctl with mode %x\n", idata->u_id, mode);
746
		sts = crystalhd_hw_set_core_clock(&ctx->hw_ctx);
875
747
		if (sts == BC_STS_CLK_NOCHG)
876
	if (((mode & 0xFF) == DTS_DIAG_MODE) ||
748
			ctx->hw_ctx.core_clock_mhz = oldClk;
877
		((mode & 0xFF) == DTS_PLAYBACK_MODE) ||
878
		((bc_get_userhandle_count(ctx) == 0) && (ctx->hw_ctx != NULL))) {
879
		ctx->cin_wait_exit = 1;
880
		/* Stop the HW Capture just in case flush did not get called before stop */
881
		ctx->pwr_state_change = BC_HW_RUNNING;
882
		crystalhd_hw_stop_capture(ctx->hw_ctx, true);
883
		crystalhd_hw_free_dma_rings(ctx->hw_ctx);
884
		crystalhd_destroy_dio_pool(ctx->adp);
885
		crystalhd_delete_elem_pool(ctx->adp);
886
		ctx->state = BC_LINK_INVALID;
887
		crystalhd_hw_close(ctx->hw_ctx, ctx->adp);
888
		kfree(ctx->hw_ctx);
889
		ctx->hw_ctx = NULL;
749
	}
890
	}
750
891
751
	clock->clk = ctx->hw_ctx.core_clock_mhz;
892
	if(ctx->adp->cfg_users > 0)
893
		ctx->adp->cfg_users--;
752
894
753
	return sts;
895
	return BC_STS_SUCCESS;
754
}
896
}
755
897
756
/*=============== Cmd Proc Table.. ======================================*/
898
/*=============== Cmd Proc Table.. ======================================*/
757
static const struct crystalhd_cmd_tbl	g_crystalhd_cproc_tbl[] = {
899
static const struct crystalhd_cmd_tbl	g_crystalhd_cproc_tbl[] = {
758
	{ BCM_IOC_GET_VERSION,		bc_cproc_get_version,	0},
900
	{ BCM_IOC_GET_VERSION,		bc_cproc_get_version,	0},
759
	{ BCM_IOC_GET_HWTYPE,		bc_cproc_get_hwtype,	0},
901
	{ BCM_IOC_GET_HWTYPE,		bc_cproc_get_hwtype,	0},
760
	{ BCM_IOC_REG_RD,		bc_cproc_reg_rd,	0},
902
	{ BCM_IOC_REG_RD,			bc_cproc_reg_rd,	0},
761
	{ BCM_IOC_REG_WR,		bc_cproc_reg_wr,	0},
903
	{ BCM_IOC_REG_WR,			bc_cproc_reg_wr,	0},
762
	{ BCM_IOC_FPGA_RD,		bc_cproc_link_reg_rd,	0},
904
	{ BCM_IOC_FPGA_RD,			bc_cproc_link_reg_rd,	0},
763
	{ BCM_IOC_FPGA_WR,		bc_cproc_link_reg_wr,	0},
905
	{ BCM_IOC_FPGA_WR,			bc_cproc_link_reg_wr,	0},
764
	{ BCM_IOC_MEM_RD,		bc_cproc_mem_rd,	0},
906
	{ BCM_IOC_MEM_RD,			bc_cproc_mem_rd,	0},
765
	{ BCM_IOC_MEM_WR,		bc_cproc_mem_wr,	0},
907
	{ BCM_IOC_MEM_WR,			bc_cproc_mem_wr,	0},
766
	{ BCM_IOC_RD_PCI_CFG,		bc_cproc_cfg_rd,	0},
908
	{ BCM_IOC_RD_PCI_CFG,		bc_cproc_cfg_rd,	0},
767
	{ BCM_IOC_WR_PCI_CFG,		bc_cproc_cfg_wr,	1},
909
	{ BCM_IOC_WR_PCI_CFG,		bc_cproc_cfg_wr,	1},
768
	{ BCM_IOC_FW_DOWNLOAD,		bc_cproc_download_fw,	1},
910
	{ BCM_IOC_FW_DOWNLOAD,		bc_cproc_download_fw,	1},
769
	{ BCM_IOC_FW_CMD,		bc_cproc_do_fw_cmd,	1},
911
	{ BCM_IOC_FW_CMD,			bc_cproc_do_fw_cmd,	1},
770
	{ BCM_IOC_PROC_INPUT,		bc_cproc_proc_input,	1},
912
	{ BCM_IOC_PROC_INPUT,		bc_cproc_proc_input,	1},
771
	{ BCM_IOC_ADD_RXBUFFS,		bc_cproc_add_cap_buff,	1},
913
	{ BCM_IOC_ADD_RXBUFFS,		bc_cproc_add_cap_buff,	1},
772
	{ BCM_IOC_FETCH_RXBUFF,		bc_cproc_fetch_frame,	1},
914
	{ BCM_IOC_FETCH_RXBUFF,		bc_cproc_fetch_frame,	1},
Lines 775-786 static const struct crystalhd_cmd_tbl g_ Link Here
775
	{ BCM_IOC_GET_DRV_STAT,		bc_cproc_get_stats,	0},
917
	{ BCM_IOC_GET_DRV_STAT,		bc_cproc_get_stats,	0},
776
	{ BCM_IOC_RST_DRV_STAT,		bc_cproc_reset_stats,	0},
918
	{ BCM_IOC_RST_DRV_STAT,		bc_cproc_reset_stats,	0},
777
	{ BCM_IOC_NOTIFY_MODE,		bc_cproc_notify_mode,	0},
919
	{ BCM_IOC_NOTIFY_MODE,		bc_cproc_notify_mode,	0},
778
	{ BCM_IOC_CHG_CLK,		bc_cproc_chg_clk, 0},
920
	{ BCM_IOC_RELEASE,			bc_cproc_release_user,  0},
779
	{ BCM_IOC_END,			NULL},
921
	{ BCM_IOC_END,				NULL},
780
};
922
};
781
923
782
/*=============== Cmd Proc Functions.. ===================================*/
924
/*=============== Cmd Proc Functions.. ===================================*/
783
784
/**
925
/**
785
 * crystalhd_suspend - Power management suspend request.
926
 * crystalhd_suspend - Power management suspend request.
786
 * @ctx: Command layer context.
927
 * @ctx: Command layer context.
Lines 798-813 static const struct crystalhd_cmd_tbl g_ Link Here
798
 *
939
 *
799
 * Current gstreamer frame work does not provide any power management
940
 * Current gstreamer frame work does not provide any power management
800
 * related notification to user mode decoder plug-in. As a work-around
941
 * related notification to user mode decoder plug-in. As a work-around
801
 * we pass on the power management notification to our plug-in by completing
942
 * we pass on the power mangement notification to our plug-in by completing
802
 * all outstanding requests with BC_STS_IO_USER_ABORT return code.
943
 * all outstanding requests with BC_STS_IO_USER_ABORT return code.
803
 */
944
 */
804
enum BC_STATUS crystalhd_suspend(struct crystalhd_cmd *ctx,
945
BC_STATUS crystalhd_suspend(struct crystalhd_cmd *ctx, crystalhd_ioctl_data *idata)
805
				struct crystalhd_ioctl_data *idata)
806
{
946
{
807
	enum BC_STATUS sts = BC_STS_SUCCESS;
947
	struct device *dev = chddev();
948
	BC_STATUS sts = BC_STS_SUCCESS;
949
	struct crystalhd_rx_dma_pkt *rpkt = NULL;
808
950
809
	if (!ctx || !idata) {
951
	if (!ctx || !idata) {
810
		BCMLOG_ERR("Invalid Parameters\n");
952
		dev_err(dev, "Invalid Parameters\n");
811
		return BC_STS_ERROR;
953
		return BC_STS_ERROR;
812
	}
954
	}
813
955
Lines 815-845 enum BC_STATUS crystalhd_suspend(struct Link Here
815
		return BC_STS_SUCCESS;
957
		return BC_STS_SUCCESS;
816
958
817
	if (ctx->state == BC_LINK_INVALID) {
959
	if (ctx->state == BC_LINK_INVALID) {
818
		BCMLOG(BCMLOG_DBG, "Nothing To Do Suspend Success\n");
960
		dev_dbg(dev, "Nothing To Do Suspend Success\n");
819
		return BC_STS_SUCCESS;
961
		return BC_STS_SUCCESS;
820
	}
962
	}
821
963
822
	ctx->state |= BC_LINK_SUSPEND;
964
	dev_dbg(dev, "State before suspend is %x\n", ctx->state);
823
965
824
	bc_cproc_mark_pwr_state(ctx);
966
	bc_cproc_mark_pwr_state(ctx, BC_HW_SUSPEND); /* going to suspend */
825
967
826
	if (ctx->state & BC_LINK_CAP_EN) {
968
	if (ctx->state & BC_LINK_CAP_EN) {
827
		sts = bc_cproc_flush_cap_buffs(ctx, idata);
969
		// Clean any pending RX
828
		if (sts != BC_STS_SUCCESS)
970
		crystalhd_hw_stop_capture(ctx->hw_ctx, false);
829
			return sts;
971
		while((rpkt = crystalhd_dioq_fetch(ctx->hw_ctx->rx_actq)) != NULL)
972
			crystalhd_dioq_add(ctx->hw_ctx->rx_freeq, rpkt, false, rpkt->pkt_tag);
973
974
		while((rpkt = crystalhd_dioq_fetch(ctx->hw_ctx->rx_rdyq)) != NULL)
975
			crystalhd_dioq_add(ctx->hw_ctx->rx_freeq, rpkt, false, rpkt->pkt_tag);
830
	}
976
	}
831
977
832
	if (ctx->tx_list_id) {
978
	if (ctx->tx_list_id) {
833
		sts = crystalhd_hw_cancel_tx(&ctx->hw_ctx, ctx->tx_list_id);
979
		sts = crystalhd_hw_cancel_tx(ctx->hw_ctx, ctx->tx_list_id);
834
		if (sts != BC_STS_SUCCESS)
980
		if (sts != BC_STS_SUCCESS)
835
			return sts;
981
			return sts;
836
	}
982
	}
983
	else
984
	{
985
		// Even if there is no active TX DMA need to stop and reset TX DMA pointers
986
		ctx->hw_ctx->pfnStopTxDMA(ctx->hw_ctx);
987
	}
837
988
838
	sts = crystalhd_hw_suspend(&ctx->hw_ctx);
989
	ctx->state = BC_LINK_SUSPEND;
990
991
	sts = crystalhd_hw_suspend(ctx->hw_ctx);
839
	if (sts != BC_STS_SUCCESS)
992
	if (sts != BC_STS_SUCCESS)
840
		return sts;
993
		return sts;
841
994
842
	BCMLOG(BCMLOG_DBG, "BCM70012 suspend success\n");
995
	dev_dbg(dev, "Crystal HD suspend success\n");
843
996
844
	return BC_STS_SUCCESS;
997
	return BC_STS_SUCCESS;
845
}
998
}
Lines 860-870 enum BC_STATUS crystalhd_suspend(struct Link Here
860
 * start a new playback session from the pre-suspend clip position.
1013
 * start a new playback session from the pre-suspend clip position.
861
 *
1014
 *
862
 */
1015
 */
863
enum BC_STATUS crystalhd_resume(struct crystalhd_cmd *ctx)
1016
BC_STATUS crystalhd_resume(struct crystalhd_cmd *ctx)
864
{
1017
{
865
	BCMLOG(BCMLOG_DBG, "crystalhd_resume Success %x\n", ctx->state);
1018
	BC_STATUS sts = BC_STS_SUCCESS;
1019
1020
	sts = crystalhd_hw_resume(ctx->hw_ctx);
1021
	if (sts != BC_STS_SUCCESS)
1022
		return sts;
866
1023
867
	bc_cproc_mark_pwr_state(ctx);
1024
	bc_cproc_mark_pwr_state(ctx, BC_HW_RESUME); /* Starting resume */
1025
1026
	ctx->state = BC_LINK_RESUME;
1027
1028
	dev_dbg(chddev(), "crystalhd_resume Success %x\n", ctx->state);
868
1029
869
	return BC_STS_SUCCESS;
1030
	return BC_STS_SUCCESS;
870
}
1031
}
Lines 881-946 enum BC_STATUS crystalhd_resume(struct c Link Here
881
 * application specific resources. HW layer initialization
1042
 * application specific resources. HW layer initialization
882
 * is done for the first open request.
1043
 * is done for the first open request.
883
 */
1044
 */
884
enum BC_STATUS crystalhd_user_open(struct crystalhd_cmd *ctx,
1045
BC_STATUS crystalhd_user_open(struct crystalhd_cmd *ctx,
885
			    struct crystalhd_user **user_ctx)
1046
			      struct crystalhd_user **user_ctx)
886
{
1047
{
1048
	struct device *dev = chddev();
887
	struct crystalhd_user *uc;
1049
	struct crystalhd_user *uc;
888
1050
889
	if (!ctx || !user_ctx) {
1051
	if (!ctx || !user_ctx) {
890
		BCMLOG_ERR("Invalid arg..\n");
1052
		dev_err(dev, "Invalid arg..\n");
891
		return BC_STS_INV_ARG;
1053
		return BC_STS_INV_ARG;
892
	}
1054
	}
893
1055
894
	uc = bc_cproc_get_uid(ctx);
1056
	uc = bc_cproc_get_uid(ctx);
895
	if (!uc) {
1057
	if (!uc) {
896
		BCMLOG(BCMLOG_INFO, "No free user context...\n");
1058
		dev_info(dev, "No free user context...\n");
897
		return BC_STS_BUSY;
1059
		return BC_STS_BUSY;
898
	}
1060
	}
899
1061
900
	BCMLOG(BCMLOG_INFO, "Opening new user[%x] handle\n", uc->uid);
1062
	dev_info(dev, "Opening new user[%x] handle\n", uc->uid);
901
902
	crystalhd_hw_open(&ctx->hw_ctx, ctx->adp);
903
1063
904
	uc->in_use = 1;
1064
	uc->mode = DTS_MODE_INV;
905
1065
	uc->in_use = 0;
906
	*user_ctx = uc;
907
908
	return BC_STS_SUCCESS;
909
}
910
911
/**
912
 * crystalhd_user_close - Close application handle.
913
 * @ctx: Command layer contextx.
914
 * @uc: User ID context.
915
 *
916
 * Return:
917
 *	status
918
 *
919
 * Closer application handle and release app specific
920
 * resources.
921
 */
922
enum BC_STATUS crystalhd_user_close(struct crystalhd_cmd *ctx,
923
					 struct crystalhd_user *uc)
924
{
925
	uint32_t mode = uc->mode;
926
927
	ctx->user[uc->uid].mode = DTS_MODE_INV;
928
	ctx->user[uc->uid].in_use = 0;
929
	ctx->cin_wait_exit = 1;
930
	ctx->pwr_state_change = 0;
931
1066
932
	BCMLOG(BCMLOG_INFO, "Closing user[%x] handle\n", uc->uid);
1067
	if(ctx->hw_ctx == NULL) {
1068
		ctx->hw_ctx = (struct crystalhd_hw*)kmalloc(sizeof(struct crystalhd_hw), GFP_KERNEL);
1069
		if(ctx->hw_ctx != NULL)
1070
			memset(ctx->hw_ctx, 0, sizeof(struct crystalhd_hw));
1071
		else
1072
			return BC_STS_ERROR;
933
1073
934
	if ((mode == DTS_DIAG_MODE) || (mode == DTS_PLAYBACK_MODE)) {
1074
		crystalhd_hw_open(ctx->hw_ctx, ctx->adp);
935
		crystalhd_hw_free_dma_rings(&ctx->hw_ctx);
936
		crystalhd_destroy_dio_pool(ctx->adp);
937
	} else if (bc_cproc_get_user_count(ctx)) {
938
		return BC_STS_SUCCESS;
939
	}
1075
	}
940
1076
941
	crystalhd_hw_close(&ctx->hw_ctx);
1077
	uc->in_use = 1;
1078
1079
	*user_ctx = uc;
942
1080
943
	ctx->state = BC_LINK_INVALID;
1081
	ctx->pwr_state_change = BC_HW_RUNNING;
944
1082
945
	return BC_STS_SUCCESS;
1083
	return BC_STS_SUCCESS;
946
}
1084
}
Lines 955-972 enum BC_STATUS crystalhd_user_close(stru Link Here
955
 *
1093
 *
956
 * Called at the time of driver load.
1094
 * Called at the time of driver load.
957
 */
1095
 */
958
enum BC_STATUS crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
1096
BC_STATUS crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
959
				    struct crystalhd_adp *adp)
1097
				    struct crystalhd_adp *adp)
960
{
1098
{
1099
	struct device *dev = &adp->pdev->dev;
961
	int i = 0;
1100
	int i = 0;
962
1101
963
	if (!ctx || !adp) {
1102
	if (!ctx || !adp) {
964
		BCMLOG_ERR("Invalid arg!!\n");
1103
		dev_err(dev, "%s: Invalid arg\n", __func__);
965
		return BC_STS_INV_ARG;
1104
		return BC_STS_INV_ARG;
966
	}
1105
	}
967
1106
968
	if (ctx->adp)
1107
	if (ctx->adp)
969
		BCMLOG(BCMLOG_DBG, "Resetting Cmd context delete missing..\n");
1108
		dev_dbg(dev, "Resetting Cmd context delete missing..\n");
970
1109
971
	ctx->adp = adp;
1110
	ctx->adp = adp;
972
	for (i = 0; i < BC_LINK_MAX_OPENS; i++) {
1111
	for (i = 0; i < BC_LINK_MAX_OPENS; i++) {
Lines 975-983 enum BC_STATUS crystalhd_setup_cmd_conte Link Here
975
		ctx->user[i].mode = DTS_MODE_INV;
1114
		ctx->user[i].mode = DTS_MODE_INV;
976
	}
1115
	}
977
1116
1117
	ctx->hw_ctx = (struct crystalhd_hw*)kmalloc(sizeof(struct crystalhd_hw), GFP_KERNEL);
1118
1119
	memset(ctx->hw_ctx, 0, sizeof(struct crystalhd_hw));
1120
978
	/*Open and Close the Hardware to put it in to sleep state*/
1121
	/*Open and Close the Hardware to put it in to sleep state*/
979
	crystalhd_hw_open(&ctx->hw_ctx, ctx->adp);
1122
	crystalhd_hw_open(ctx->hw_ctx, ctx->adp);
980
	crystalhd_hw_close(&ctx->hw_ctx);
1123
	crystalhd_hw_close(ctx->hw_ctx, ctx->adp);
1124
	kfree(ctx->hw_ctx);
1125
	ctx->hw_ctx = NULL;
1126
981
	return BC_STS_SUCCESS;
1127
	return BC_STS_SUCCESS;
982
}
1128
}
983
1129
Lines 990-998 enum BC_STATUS crystalhd_setup_cmd_conte Link Here
990
 *
1136
 *
991
 * Called at the time of driver un-load.
1137
 * Called at the time of driver un-load.
992
 */
1138
 */
993
enum BC_STATUS crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx)
1139
BC_STATUS crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx)
994
{
1140
{
995
	BCMLOG(BCMLOG_DBG, "Deleting Command context..\n");
1141
	dev_dbg(chddev(), "Deleting Command context..\n");
996
1142
997
	ctx->adp = NULL;
1143
	ctx->adp = NULL;
998
1144
Lines 1012-1040 enum BC_STATUS crystalhd_delete_cmd_cont Link Here
1012
 * mode of operation and returns the function pointer
1158
 * mode of operation and returns the function pointer
1013
 * from the cproc table.
1159
 * from the cproc table.
1014
 */
1160
 */
1015
crystalhd_cmd_proc crystalhd_get_cmd_proc(struct crystalhd_cmd *ctx,
1161
crystalhd_cmd_proc crystalhd_get_cmd_proc(struct crystalhd_cmd *ctx, uint32_t cmd,
1016
				 uint32_t cmd, struct crystalhd_user *uc)
1162
				      struct crystalhd_user *uc)
1017
{
1163
{
1164
	struct device *dev = chddev();
1018
	crystalhd_cmd_proc cproc = NULL;
1165
	crystalhd_cmd_proc cproc = NULL;
1019
	unsigned int i, tbl_sz;
1166
	unsigned int i, tbl_sz;
1020
1167
1021
	if (!ctx) {
1168
	if (!ctx) {
1022
		BCMLOG_ERR("Invalid arg.. Cmd[%d]\n", cmd);
1169
		dev_err(dev, "Invalid arg.. Cmd[%d]\n", cmd);
1023
		return NULL;
1170
		return NULL;
1024
	}
1171
	}
1025
1172
1026
	if ((cmd != BCM_IOC_GET_DRV_STAT) && (ctx->state & BC_LINK_SUSPEND)) {
1173
	if ((cmd != BCM_IOC_GET_DRV_STAT) && (ctx->state & BC_LINK_SUSPEND)) {
1027
		BCMLOG_ERR("Invalid State [suspend Set].. Cmd[%d]\n", cmd);
1174
		dev_err(dev, "Invalid State [suspend Set].. Cmd[%x]\n", cmd);
1028
		return NULL;
1175
		return NULL;
1029
	}
1176
	}
1030
1177
1031
	tbl_sz = sizeof(g_crystalhd_cproc_tbl) /
1178
	tbl_sz = sizeof(g_crystalhd_cproc_tbl) / sizeof(struct crystalhd_cmd_tbl);
1032
				 sizeof(struct crystalhd_cmd_tbl);
1033
	for (i = 0; i < tbl_sz; i++) {
1179
	for (i = 0; i < tbl_sz; i++) {
1034
		if (g_crystalhd_cproc_tbl[i].cmd_id == cmd) {
1180
		if (g_crystalhd_cproc_tbl[i].cmd_id == cmd) {
1035
			if ((uc->mode == DTS_MONITOR_MODE) &&
1181
			if ((uc->mode == DTS_MONITOR_MODE) &&
1036
			    (g_crystalhd_cproc_tbl[i].block_mon)) {
1182
			    (g_crystalhd_cproc_tbl[i].block_mon)) {
1037
				BCMLOG(BCMLOG_INFO, "Blocking cmd %d\n", cmd);
1183
				dev_dbg(dev, "Blocking cmd %d \n", cmd);
1038
				break;
1184
				break;
1039
			}
1185
			}
1040
			cproc = g_crystalhd_cproc_tbl[i].cmd_proc;
1186
			cproc = g_crystalhd_cproc_tbl[i].cmd_proc;
Lines 1050-1056 crystalhd_cmd_proc crystalhd_get_cmd_pro Link Here
1050
 * @ctx: Command layer contextx.
1196
 * @ctx: Command layer contextx.
1051
 *
1197
 *
1052
 * Return:
1198
 * Return:
1053
 *	TRUE: If interrupt from bcm70012 device.
1199
 *	TRUE: If interrupt from CrystalHD device.
1054
 *
1200
 *
1055
 *
1201
 *
1056
 * ISR entry point from OS layer.
1202
 * ISR entry point from OS layer.
Lines 1058-1066 crystalhd_cmd_proc crystalhd_get_cmd_pro Link Here
1058
bool crystalhd_cmd_interrupt(struct crystalhd_cmd *ctx)
1204
bool crystalhd_cmd_interrupt(struct crystalhd_cmd *ctx)
1059
{
1205
{
1060
	if (!ctx) {
1206
	if (!ctx) {
1061
		BCMLOG_ERR("Invalid arg..\n");
1207
		printk(KERN_ERR "%s: Invalid arg..\n", __func__);
1062
		return false;
1208
		return false;
1063
	}
1209
	}
1064
1210
1065
	return crystalhd_hw_interrupt(ctx->adp, &ctx->hw_ctx);
1211
	/* If HW has not been initialized then all interrupts are spurious */
1212
	if ((ctx->hw_ctx == NULL) || (ctx->hw_ctx->pfnFindAndClearIntr == NULL))
1213
		return false;
1214
1215
	return ctx->hw_ctx->pfnFindAndClearIntr(ctx->adp, ctx->hw_ctx);
1066
}
1216
}
(-)crystalhd~/crystalhd_cmds.h (-19 / +18 lines)
Lines 29-48 Link Here
29
29
30
/*
30
/*
31
 * NOTE:: This is the main interface file between the Linux layer
31
 * NOTE:: This is the main interface file between the Linux layer
32
 *        and the hardware layer. This file will use the definitions
32
 *        and the harware layer. This file will use the definitions
33
 *        from _dts_glob and dts_defs etc.. which are defined for
33
 *        from _dts_glob and dts_defs etc.. which are defined for
34
 *        windows.
34
 *        windows.
35
 */
35
 */
36
36
37
#include "crystalhd.h"
37
#include "crystalhd_hw.h"
38
#include "crystalhd_misc.h"
38
39
39
enum crystalhd_state {
40
extern struct device * chddev(void);
41
42
enum _crystalhd_state{
40
	BC_LINK_INVALID		= 0x00,
43
	BC_LINK_INVALID		= 0x00,
41
	BC_LINK_INIT		= 0x01,
44
	BC_LINK_INIT		= 0x01,
42
	BC_LINK_CAP_EN		= 0x02,
45
	BC_LINK_CAP_EN		= 0x02,
43
	BC_LINK_FMT_CHG		= 0x04,
46
	BC_LINK_FMT_CHG		= 0x04,
44
	BC_LINK_SUSPEND		= 0x10,
47
	BC_LINK_SUSPEND		= 0x10,
45
	BC_LINK_PAUSED		= 0x20,
48
	BC_LINK_PAUSED		= 0x20,
49
	BC_LINK_RESUME		= 0x40,
46
	BC_LINK_READY	= (BC_LINK_INIT | BC_LINK_CAP_EN | BC_LINK_FMT_CHG),
50
	BC_LINK_READY	= (BC_LINK_INIT | BC_LINK_CAP_EN | BC_LINK_FMT_CHG),
47
};
51
};
48
52
Lines 62-73 struct crystalhd_cmd { Link Here
62
	spinlock_t		ctx_lock;
66
	spinlock_t		ctx_lock;
63
	uint32_t		tx_list_id;
67
	uint32_t		tx_list_id;
64
	uint32_t		cin_wait_exit;
68
	uint32_t		cin_wait_exit;
65
	uint32_t		pwr_state_change;
69
	uint32_t		pwr_state_change; /* 0 is running, 1 is going to suspend, 2 is going to resume */
66
	struct crystalhd_hw	hw_ctx;
70
	struct crystalhd_hw		*hw_ctx;
67
};
71
};
68
72
69
typedef enum BC_STATUS(*crystalhd_cmd_proc)(struct crystalhd_cmd *,
73
typedef BC_STATUS (*crystalhd_cmd_proc)(struct crystalhd_cmd *, crystalhd_ioctl_data *);
70
					 struct crystalhd_ioctl_data *);
71
74
72
struct crystalhd_cmd_tbl {
75
struct crystalhd_cmd_tbl {
73
	uint32_t		cmd_id;
76
	uint32_t		cmd_id;
Lines 75-92 struct crystalhd_cmd_tbl { Link Here
75
	uint32_t		block_mon;
78
	uint32_t		block_mon;
76
};
79
};
77
80
78
enum BC_STATUS crystalhd_suspend(struct crystalhd_cmd *ctx,
81
79
				 struct crystalhd_ioctl_data *idata);
82
BC_STATUS crystalhd_suspend(struct crystalhd_cmd *ctx, crystalhd_ioctl_data *idata);
80
enum BC_STATUS crystalhd_resume(struct crystalhd_cmd *ctx);
83
BC_STATUS crystalhd_resume(struct crystalhd_cmd *ctx);
81
crystalhd_cmd_proc crystalhd_get_cmd_proc(struct crystalhd_cmd *ctx,
84
crystalhd_cmd_proc crystalhd_get_cmd_proc(struct crystalhd_cmd *ctx, uint32_t cmd,
82
				 uint32_t cmd, struct crystalhd_user *uc);
85
				      struct crystalhd_user *uc);
83
enum BC_STATUS crystalhd_user_open(struct crystalhd_cmd *ctx,
86
BC_STATUS crystalhd_user_open(struct crystalhd_cmd *ctx, struct crystalhd_user **user_ctx);
84
				 struct crystalhd_user **user_ctx);
87
BC_STATUS crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx, struct crystalhd_adp *adp);
85
enum BC_STATUS crystalhd_user_close(struct crystalhd_cmd *ctx,
88
BC_STATUS crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx);
86
				 struct crystalhd_user *uc);
87
enum BC_STATUS crystalhd_setup_cmd_context(struct crystalhd_cmd *ctx,
88
				 struct crystalhd_adp *adp);
89
enum BC_STATUS crystalhd_delete_cmd_context(struct crystalhd_cmd *ctx);
90
bool crystalhd_cmd_interrupt(struct crystalhd_cmd *ctx);
89
bool crystalhd_cmd_interrupt(struct crystalhd_cmd *ctx);
91
90
92
#endif
91
#endif
(-)crystalhd~/crystalhd_flea_ddr.c (+734 lines)
Line 0 Link Here
1
/***************************************************************************
2
 * Copyright (c) 2005-2010, Broadcom Corporation.
3
 *
4
 *  Name: crystalhd_flea_ddr . c
5
 *
6
 *  Description:
7
 *		BCM70015 generic DDR routines
8
 *
9
 *  HISTORY:
10
 *
11
 **********************************************************************
12
 * This file is part of the crystalhd device driver.
13
 *
14
 * This driver is free software; you can redistribute it and/or modify
15
 * it under the terms of the GNU General Public License as published by
16
 * the Free Software Foundation, version 2 of the License.
17
 *
18
 * This driver is distributed in the hope that it will be useful,
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 * GNU General Public License for more details.
22
 *
23
 * You should have received a copy of the GNU General Public License
24
 * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
25
 **********************************************************************/
26
27
#include "crystalhd_hw.h"
28
#include "crystalhd_flea_ddr.h"
29
30
/*#include "bchp_ddr23_ctl_regs_0.h" */
31
/*#include "bchp_ddr23_phy_byte_lane_0.h" */
32
/*#include "bchp_ddr23_phy_byte_lane_1.h" */
33
/*#include "bchp_ddr23_phy_control_regs.h" */
34
/*#include "bchp_pri_arb_control_regs.h" */
35
/*#include "bchp_pri_client_regs.h" */
36
37
/* RTS Programming Values for all Clients */
38
/*   column legend */
39
/*   [0]: 1=Program, 0=Default; */
40
/*   [1]: Blockout Count; */
41
/*   [2]: Critical Period; */
42
/*   [3]: Priority; */
43
/*   [4]: Access Mode */
44
/* Default mode for clients is best effort */
45
46
uint32_t rts_prog_vals[21][5] = {
47
  {1,    130,    130,      6,      1}, /*       Deblock ( 0) */
48
  {1,   1469,   1469,      9,      1}, /*         Cabac ( 1) */
49
  {1,    251,    251,      4,      1}, /*         Iloop ( 2) */
50
  {1,    842,    842,      5,      1}, /*         Oloop ( 3) */
51
  {1,   1512,   1512,     10,      1}, /*      Symb_Int ( 4) */
52
  {1,     43,     43,     14,      1}, /*         Mcomp ( 5) */
53
  {1,   1318,   1318,     11,      1}, /*         XPT_0 ( 6) */
54
  {1,   4320,   4320,     16,      1}, /*         XPT_1 ( 7) */
55
  {1,   5400,   5400,     17,      0}, /*         XPT_2 ( 8) */
56
  {1,   1080,   1080,     18,      1}, /*           ARM ( 9) */
57
  {1,    691,    691,      7,      0}, /*       MEM_DMA (10) */
58
  {1,   1382,   1382,     15,      0}, /*         SHARF (11) */
59
  {1,    346,    346,      2,      0}, /*           BVN (12) */
60
  {1,   1728,   1728,     13,      1}, /*        RxDMA3 (13) */
61
  {1,    864,    864,      8,      1}, /*         TxDMA (14) */
62
  {1,    173,    173,      3,      1}, /*       MetaDMA (15) */
63
  {1,   2160,   2160,     19,      1}, /*     DirectDMA (16) */
64
  {1,  10800,  10800,     20,      1}, /*           MSA (17) */
65
  {1,    216,    216,      1,      1}, /*         TRACE (18) */
66
  {1,   1598,   1598,     12,      0}, /*      refresh1 (19) */
67
  { 0, 0, 0, 0, 0}, /*(20) */
68
};
69
70
void crystalhd_flea_ddr_pll_config(struct crystalhd_hw* hw, int32_t *speed_grade, int32_t num_plls, uint32_t tmode)
71
{
72
	uint32_t PLL_NDIV_INT[2];
73
	uint32_t PLL_M1DIV[2];
74
	int32_t  i;
75
	uint32_t tmp;
76
	uint32_t config;
77
	uint32_t timeout;
78
	uint32_t skip_init[2];     /* completely skip initialization */
79
	/*uint32_t offset[2]; */
80
	uint32_t skip_pll_setup;
81
	uint32_t poll_cnt;
82
83
	skip_init[0] =  0;
84
	skip_init[1] =  0;
85
86
	/* If the test mode is not 0 then skip the PLL setups too. */
87
	if (tmode != 0){
88
		skip_pll_setup = 1;
89
	}
90
	else {
91
		skip_pll_setup = 0;
92
	}
93
94
	/* Use this scratch register in DDR0 - which should reset to 0 - as a simple symaphore for the test */
95
	/* to monitor if and when the Initialization of the DDR is complete */
96
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_SCRATCH, 0);
97
98
	if (!skip_pll_setup) {
99
		for(i=0;i<num_plls;i++) {
100
			switch(speed_grade[i])
101
			{
102
				case DDR2_333MHZ: PLL_NDIV_INT[i] = 49; PLL_M1DIV[i] = 2; break;
103
				case DDR2_400MHZ: PLL_NDIV_INT[i] = 59; PLL_M1DIV[i] = 2; break;
104
				case DDR2_533MHZ: PLL_NDIV_INT[i] = 39; PLL_M1DIV[i] = 1; break;
105
				case DDR2_667MHZ: PLL_NDIV_INT[i] = 49; PLL_M1DIV[i] = 1; break;
106
				default:
107
					printk("Undefined speed_grade of %d\n",speed_grade[i]);
108
					break;
109
			}
110
		}
111
112
		/*////////////////////////// */
113
		/*setup the PLLs */
114
115
		for(i=0;i<num_plls;i++) {
116
			if (skip_init[i]) continue;
117
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG,
118
					  (0 << 0) | /*PWRDWN */
119
					  (0 << 1) | /*REFCOMP_PWRDWN */
120
					  (1 << 2) | /*ARESET */
121
					  (1 << 3) | /*DRESET */
122
					  (0 << 4) | /*ENB_CLKOUT */
123
					  (0 << 5) | /*BYPEN ??? */
124
					  (0 << 6) | /*PWRDWN_CH1 */
125
					  (0 << 8) | /*DLY_CH1 */
126
					  (0 << 10)| /*VCO_RNG */
127
					  (1 << 31)  /*DIV2 CLK RESET */
128
					  );
129
130
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_PLL_PRE_DIVIDER,
131
						(1 << 0) | /*P1DIV */
132
						(1 << 4) | /*P2DIV */
133
						(PLL_NDIV_INT[i] << 8) | /*NDIV_INT */
134
						(1 << 24) /*BYPASS_SDMOD */
135
						);
136
137
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_PLL_DIVIDER,
138
						(PLL_M1DIV[i] << 24) /*M1DIV */
139
						);
140
141
			config = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG);
142
			config &= 0xfffffffb; /*clear ARESET */
143
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG, config);
144
		}
145
146
		/*poll for lock */
147
		for(i=0;i<num_plls;i++){
148
			if (skip_init[i]) continue;
149
			timeout = 10;
150
			tmp = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_PLL_STATUS);
151
			while((timeout>0) && ((tmp & 0x1) == 0)){
152
				msleep_interruptible(1);
153
				tmp = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_PLL_STATUS);
154
				timeout--;
155
			}
156
			if (timeout<=0)
157
				printk("Timed out waiting for DDR Controller PLL %d to lock\n",i);
158
		}
159
160
		/*deassert PLL digital reset */
161
		for(i=0;i<num_plls;i++){
162
			if (skip_init[i]) continue;
163
			config = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG);
164
			config &= 0xfffffff7; /*clear DRESET */
165
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG, config);
166
		}
167
168
		/*deassert reset of logic */
169
		for(i=0;i<num_plls;i++){
170
			if (skip_init[i]) continue;
171
			config = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG);
172
			config &= 0x7fffffff; /*clear logic reset */
173
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG, config);
174
		}
175
	} /* end (skip_pll_setup) */
176
177
	/*run VDL calibration for all byte lanes */
178
	for(i=0;i<num_plls;i++) {
179
		if (skip_init[i]) continue;
180
		tmp = 0;
181
		hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_VDL_CALIBRATE,tmp);
182
		hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_VDL_CALIBRATE,tmp);
183
		tmp = (
184
			(1 << 0) | /*calib_fast */
185
			(1 << 1)   /*calib_once */
186
			);
187
		hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_VDL_CALIBRATE,tmp);
188
		hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_VDL_CALIBRATE,tmp);
189
190
191
		if (!skip_pll_setup){  /*VDLs might not lock if clocks are bypassed */
192
			timeout=100;
193
			tmp = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_VDL_STATUS);
194
			while((timeout>0) && ((tmp & 0x3) == 0x0)){
195
				msleep_interruptible(1);
196
				timeout--;
197
				tmp = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_VDL_STATUS);
198
			}
199
			if ((tmp & 0x3) != 0x3)
200
				printk("VDL calibration did not finish or did not lock!\n");
201
			timeout=100;
202
			tmp = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_VDL_STATUS);
203
			while((timeout>0) && ((tmp & 0x3) == 0x0)){
204
				msleep_interruptible(1);
205
				timeout--;
206
				tmp = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_VDL_STATUS);
207
			}
208
			if ((tmp & 0x3) != 0x3)
209
				printk("VDL calibration did not finish or did not lock!\n");
210
211
			if(timeout<=0){
212
				printk("DDR PHY %d VDL Calibration failed\n",i);
213
			}
214
		}
215
		else {
216
			msleep_interruptible(1);
217
		}
218
219
		/*clear VDL calib settings */
220
		tmp = 0;
221
		hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_VDL_CALIBRATE,tmp);
222
		hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_VDL_CALIBRATE,tmp);
223
224
		/*override the ADDR/CTRL VDLs with results from Bytelane #0 */
225
		/*if tmode other than zero then set the VDL compensations to max values of 0x1ff. */
226
		tmp = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_VDL_STATUS);
227
		tmp = (tmp >> 4) & 0x3ff;
228
		/* If in other than tmode 0 then set the VDL override settings to max. */
229
		if (tmode) {
230
			tmp = 0x3ff;
231
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_VDL_OVERRIDE_0, 0x1003f);
232
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_VDL_OVERRIDE_1, 0x1003f);
233
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_VDL_OVERRIDE_2, 0x1003f);
234
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_VDL_OVERRIDE_3, 0x1003f);
235
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_VDL_OVERRIDE_0, 0x1003f);
236
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_VDL_OVERRIDE_1, 0x1003f);
237
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_VDL_OVERRIDE_2, 0x1003f);
238
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_VDL_OVERRIDE_3, 0x1003f);
239
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_UPDATE_VDL, BCHP_DDR23_CTL_REGS_0_UPDATE_VDL_refresh_MASK);
240
		}
241
		hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_STATIC_VDL_OVERRIDE,
242
			(((tmp & 0x3f0) >> 4) << 0) |  /* step override value */
243
			(1 << 16)  |  /* override enable */
244
			(1 << 20)     /* override force ; no update vdl required */
245
			);
246
247
		/* NAREN added support for ZQ Calibration */
248
		hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_ZQ_PVT_COMP_CTL, 0);
249
		hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_ZQ_PVT_COMP_CTL, BCHP_DDR23_PHY_CONTROL_REGS_ZQ_PVT_COMP_CTL_sample_en_MASK);
250
		tmp = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_ZQ_PVT_COMP_CTL);
251
252
		poll_cnt = 0;
253
		while(1)
254
		{
255
			if(!(tmp & BCHP_DDR23_PHY_CONTROL_REGS_ZQ_PVT_COMP_CTL_sample_done_MASK))
256
				tmp = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_ZQ_PVT_COMP_CTL);
257
			else
258
				break;
259
260
			if(poll_cnt++ > 100)
261
				break;
262
		}
263
264
		if(tmode) {
265
			/* Set fields addr_ovr_en and dq_pvr_en to '1'.  Set all *_override_val fields to 0xf - ZQ_PVT_COMP_CTL */
266
			tmp = ( (  1 << 25) |     /*  addr_ovr_en */
267
					(  1 << 24) |     /*  dq_ovr_en */
268
					(0xf << 12) |     /* addr_pd_override_val */
269
					(0xf << 8)  |     /* addr_nd_override_val */
270
					(0xf << 4)  |     /* dq_pd_override_val */
271
					(0xf << 0)  );    /* dq_nd_override_val */
272
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_ZQ_PVT_COMP_CTL, tmp);
273
			/* Drive_PAD_CTL register.  Set field selrxdrv and slew to 0; */
274
			tmp = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_DRIVE_PAD_CTL);
275
			tmp &= (0xfffffffe);    /*clear bits 0 and 1. */
276
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_DRIVE_PAD_CTL,tmp);
277
		}
278
	}/*for(i=0.. */
279
}
280
281
void crystalhd_flea_ddr_ctrl_init(struct crystalhd_hw *hw,
282
								int32_t port,
283
								int32_t ddr3,
284
								int32_t speed_grade,
285
								int32_t col,
286
								int32_t bank,
287
								int32_t row,
288
								uint32_t tmode)
289
{
290
	/*uint32_t offset; */
291
	/*uint32_t arb_refresh_addr; */
292
	uint32_t port_int;
293
294
	uint32_t data;
295
296
	/*DDR2 Parameters */
297
	uint8_t tRCD = 0;
298
	uint8_t tRP = 0;
299
	uint8_t tRRD = 0;
300
	uint8_t tWR = 0;
301
	uint8_t tWTR = 0;
302
	uint8_t tCAS = 0;
303
	uint8_t tWL = 0;
304
	uint8_t tRTP = 0;
305
	uint8_t tRAS = 0;
306
	uint8_t tFAW = 0;
307
	uint8_t tRFC = 0;
308
	uint8_t INTLV_BYTES = 0;
309
	uint8_t INTLV_DISABLE = 0;
310
	uint8_t CTRL_BITS = 0;
311
	uint8_t ALLOW_PICTMEM_RD = 0;
312
	uint8_t DIS_DQS_ODT = 0;
313
	uint8_t CS0_ONLY = 0;
314
	uint8_t EN_ODT_EARLY = 0;
315
	uint8_t EN_ODT_LATE = 0;
316
	uint8_t USE_CHR_HGT = 0;
317
	uint8_t DIS_ODT = 0;
318
	uint8_t EN_2T_TIMING = 0;
319
	uint8_t CWL = 0;
320
	uint8_t DQ_WIDTH = 0;
321
322
	uint8_t DM_IDLE_MODE = 0;
323
	uint8_t CTL_IDLE_MODE = 0;
324
	uint8_t DQ_IDLE_MODE = 0;
325
326
	uint8_t DIS_LATENCY_CTRL = 0;
327
328
	uint8_t PSPLIT = 0;
329
	uint8_t DSPLIT = 0;
330
331
	/* For each controller port, 0 and 1. */
332
	for (port_int=0; port_int < 1; ++port_int)  {
333
#if 0
334
		printk("******************************************************\n");
335
		printk("* Configuring DDR23 at addr=0x%x, speed grade [%s]\n",0,
336
                ((speed_grade == DDR2_667MHZ) && (tmode == 0)) ? "667MHZ":
337
                ((speed_grade == DDR2_533MHZ) && (tmode == 0)) ? "533MHZ":
338
                ((speed_grade == DDR2_400MHZ) && (tmode == 0)) ? "400MHZ":
339
                ((speed_grade == DDR2_333MHZ) && (tmode == 0)) ? "333MHZ":
340
                ((speed_grade == DDR2_266MHZ) && (tmode == 0)) ? "266MHZ": "400MHZ" );
341
#endif
342
		/* Written in this manner to prevent table lookup in Memory for embedded MIPS code. */
343
		/* Cannot use memory until it is inited!  Case statements with greater than 5 cases use memory tables */
344
		/* when optimized.  Tony O 9/18/07 */
345
		/* Note if not in test mode 0, choose the slowest clock speed. */
346
		if (speed_grade == DDR2_200MHZ) {
347
			tRCD = 3;
348
			tRP = 3;
349
			tRRD = 2;
350
			tWR = 3;
351
			tWTR = 2;
352
			tCAS = 4;
353
			tWL = 3;
354
			tRTP = 2;
355
			tRAS = 8;
356
			tFAW = 10;
357
			if (bank == BANK_SIZE_4)
358
				tRFC = 21;
359
			else /*BANK_SIZE_8 */
360
				tRFC = 26;
361
		}
362
		else if (speed_grade == DDR2_266MHZ ) {
363
			tRCD = 4;
364
			tRP = 4;
365
			tRRD = 3;
366
			tWR = 4;
367
			tWTR = 2;
368
			tCAS = 4;
369
			tWL = 3;
370
			tRTP = 2;
371
			tRAS = 11;
372
			tFAW = 14;
373
			if (bank == BANK_SIZE_4)
374
				tRFC = 28;
375
			else /*BANK_SIZE_8 */
376
				tRFC = 34;
377
		}
378
		else if (speed_grade == DDR2_333MHZ) {
379
			tRCD = 4;
380
			tRP = 4;
381
			tRRD = 4;
382
			tWR = 5;
383
			tWTR = 3;
384
			tCAS = 4;
385
			tWL = 3;
386
			tRTP = 3;
387
			tRAS = 14;
388
			tFAW = 17;
389
			if (bank == BANK_SIZE_4)
390
				tRFC = 35;
391
			else /*BANK_SIZE_8 */
392
				tRFC = 43;
393
		}
394
		else if ((speed_grade == DDR2_400MHZ) || (tmode != 0)) { /* -25E timing */
395
			tRCD = 6;
396
			tRP = 6;
397
			tRRD = 4;
398
			tWR = 6;
399
			tWTR = 4;
400
			tCAS = ddr3 ? 6 : 5;
401
			tWL = ddr3 ? 5 : 4;
402
			tRTP = 3;
403
			tRAS = 18;
404
			tFAW = 20;
405
			if (bank == BANK_SIZE_4)
406
				tRFC = 42;
407
			else /*BANK_SIZE_8 */
408
				tRFC = 52;
409
			CWL = tWL - 5;
410
		}
411
		else if (speed_grade == DDR2_533MHZ) { /* -187E timing */
412
			tRCD = 7;
413
			tRP = 7;
414
			tRRD =  6;
415
			tWR = 8;
416
			tWTR = 4;
417
			tCAS = 7;
418
			tWL = tCAS - 1;
419
			tRTP = 4;
420
			tRAS = 22;
421
			tFAW = 24;
422
			tRFC = 68;
423
			CWL = tWL - 5;
424
		}
425
		else if (speed_grade == DDR2_667MHZ) { /* -15E  timing */
426
			tRCD = 9;
427
			tRP = 9;
428
			tRRD =  5;/* 4/5 */
429
			tWR = 10;
430
			tWTR = 5;
431
			tCAS = 9;
432
			tWL = 7;
433
			tRTP = 5;
434
			tRAS = 24;
435
			tFAW = 30; /* 20/30 */
436
			tRFC = 74;
437
			CWL = tWL - 5;
438
		}
439
		else
440
			printk("init: CANNOT HAPPEN - Memory DDR23 Ctrl_init failure. Incorrect speed grade type [%d]\n", speed_grade);
441
442
		CTRL_BITS = 0; /* Control Bit for CKE signal */
443
		EN_2T_TIMING = 0;
444
		INTLV_DISABLE = ddr3 ? 1:0;  /* disable for DDR3, enable for DDR2 */
445
		INTLV_BYTES = 0;
446
		ALLOW_PICTMEM_RD = 0;
447
		DIS_DQS_ODT = 0;
448
		CS0_ONLY = 0;
449
		EN_ODT_EARLY = 0;
450
		EN_ODT_LATE = 0;
451
		USE_CHR_HGT = 0;
452
		DIS_ODT = 0;
453
454
		/*Power Saving Controls */
455
		DM_IDLE_MODE = 0;
456
		CTL_IDLE_MODE = 0;
457
		DQ_IDLE_MODE = 0;
458
459
		/*Latency Control Setting */
460
		DIS_LATENCY_CTRL = 0;
461
462
		/* ****** Start of Grain/Flea specific fixed settings ***** */
463
		CS0_ONLY = 1 ;      /* 16-bit mode only */
464
		INTLV_DISABLE = 1 ; /* Interleave is always disabled */
465
		DQ_WIDTH = 16 ;
466
		/* ****** End of Grain specific fixed settings ***** */
467
468
#if 0
469
		printk("* DDR23 Config: CAS: %d, tRFC: %d, INTLV: %d, WIDTH: %d\n",
470
				tCAS,tRFC,INTLV_BYTES,DQ_WIDTH);
471
		printk("******************************************************\n");
472
#endif
473
		/*Disable refresh */
474
		data = ((0x68 << 0) |  /*Refresh period */
475
				(0x0 << 12)    /*disable refresh */
476
				);
477
478
		hw->pfnWriteDevRegister(hw->adp, BCHP_PRI_ARB_CONTROL_REGS_REFRESH_CTL_0, data);
479
480
		/* DecSd_Ddr2Param1 */
481
		data = 0;
482
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS1, trcd, tRCD); /* trcd */
483
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS1, trp, tRP); /* trp */
484
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS1, trrd, tRRD);  /* trrd */
485
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS1, twr, tWR);  /* twr */
486
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS1, twtr, tWTR);  /* twtr */
487
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS1, tcas, tCAS);  /* tcas */
488
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS1, twl, tWL); /* twl */
489
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS1, trtp, tRTP); /* trtp */
490
491
		hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_PARAMS1,  data );
492
493
		/*DecSd_Ddr2Param3 - deassert reset only */
494
		data = 0;
495
		/*DEBUG_PRINT(PARAMS3, data); */
496
		hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_PARAMS3,  data );
497
498
		/* Reset must be deasserted 500us before CKE. This needs */
499
		/* to be reflected in the CFE. (add delay here) */
500
501
		/*DecSd_Ddr2Param2 */
502
		data = 0;
503
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS2, tras, tRAS);  /* tras */
504
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS2, tfaw, tFAW); /* tfaw */
505
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS2, trfc, tRFC); /* trfc */
506
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS2, bank_bits, bank & 1); /*  0 = bank size of 4K == 2bits, 1 = bank size of 8k == 3 bits */
507
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS2, allow_pictmem_rd, ALLOW_PICTMEM_RD);
508
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS2, cs0_only, CS0_ONLY);
509
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS2, dis_itlv, INTLV_DISABLE); /* #disable interleave */
510
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS2, il_sel, INTLV_BYTES); /* #bytes per interleave */
511
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS2, sd_col_bits, col & 3); /* column bits, 0 = 9, 1= 10, 2 or 3 = 11 bits */
512
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS2, clke, CTRL_BITS); /* Control Bit for CKE signal */
513
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS2, use_chr_hgt, USE_CHR_HGT);
514
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS2, row_bits, row & 1); /* row size 1 is 16K for 2GB device, otherwise 0 and 8k sized */
515
516
		/*DEBUG_PRINT(PARAMS2, data); */
517
		hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_PARAMS2,  data );
518
519
		/*DecSd_Ddr2Param3. */
520
		data = 0;
521
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS3, wr_odt_en, DIS_ODT ? 0 : 1);
522
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS3, wr_odt_le_adj, EN_ODT_EARLY ? 1 : 0);
523
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS3, wr_odt_te_adj, EN_ODT_LATE ? 1 : 0);
524
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS3, cmd_2t, EN_2T_TIMING ? 1: 0);  /* 2T timing is disabled */
525
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS3, ddr_bl, ddr3 ? 1: 0);  /* 0 for DDR2, 1 for DDR3 */
526
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS3, wr_odt_mode, ddr3 ? 1:0);  /* ddr3 preamble */
527
		SET_FIELD(data, BCHP_DDR23_CTL_REGS_0, PARAMS3, ddr3_reset, ddr3 ? 0:1);  /* ddr3 reset */
528
529
		/*DEBUG_PRINT(PARAMS3, data); */
530
		hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_PARAMS3,  data );
531
	} /* for( port_int......) */
532
533
	data = 0;
534
	SET_FIELD(data, BCHP_DDR23_PHY_CONTROL_REGS, DRIVE_PAD_CTL, slew, 1);
535
	SET_FIELD(data, BCHP_DDR23_PHY_CONTROL_REGS, DRIVE_PAD_CTL, seltxdrv_ci, 1);
536
	SET_FIELD(data, BCHP_DDR23_PHY_CONTROL_REGS, DRIVE_PAD_CTL, sel_sstl18, ddr3 ? 0 : 1);
537
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_DRIVE_PAD_CTL, data );
538
539
	data = 0;
540
	SET_FIELD(data, BCHP_DDR23_PHY_BYTE_LANE_0, DRIVE_PAD_CTL, slew, 0);
541
	SET_FIELD(data, BCHP_DDR23_PHY_BYTE_LANE_0, DRIVE_PAD_CTL, selrxdrv, 0);
542
	SET_FIELD(data, BCHP_DDR23_PHY_BYTE_LANE_0, DRIVE_PAD_CTL, seltxdrv_ci, 0);
543
	SET_FIELD(data, BCHP_DDR23_PHY_BYTE_LANE_0, DRIVE_PAD_CTL, sel_sstl18, ddr3 ? 0 : 1);
544
	SET_FIELD(data, BCHP_DDR23_PHY_BYTE_LANE_0, DRIVE_PAD_CTL, rt60b, 0);
545
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_DRIVE_PAD_CTL, data );
546
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_DRIVE_PAD_CTL, data );
547
548
	data = 0;
549
550
	if (speed_grade == DDR2_667MHZ) {
551
		data = ((data & ~BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_rd_data_dly_MASK) | ((2 << BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_rd_data_dly_SHIFT) & BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_rd_data_dly_MASK));
552
	} else {
553
		data = ((data & ~BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_rd_data_dly_MASK) | ((1 << BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_rd_data_dly_SHIFT) & BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_rd_data_dly_MASK));
554
	}
555
556
	data = ((data & ~BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_dq_odt_enable_MASK) | ((((DIS_DQS_ODT || DIS_ODT) ? 0:1) << BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_dq_odt_enable_SHIFT) & BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_dq_odt_enable_MASK));
557
	data = ((data & ~BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_dq_odt_adj_MASK) | (((EN_ODT_EARLY ? 1 : 0) << BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_dq_odt_adj_SHIFT) & BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_dq_odt_adj_MASK));
558
	data = ((data & ~BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_rd_enb_odt_enable_MASK) | (((DIS_ODT ? 0:1) << BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_rd_enb_odt_enable_SHIFT) & BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_rd_enb_odt_enable_MASK));
559
	data = ((data & ~BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_rd_enb_odt_adj_MASK) | (((EN_ODT_EARLY ? 1 : 0) << BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_rd_enb_odt_adj_SHIFT) & BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_rd_enb_odt_adj_MASK));
560
561
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL, data);
562
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_READ_CONTROL, data);
563
564
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_WR_PREAMBLE_MODE, ddr3 ? 1 : 0);
565
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_WR_PREAMBLE_MODE, ddr3 ? 1 : 0);
566
567
	/* Disable unused clocks */
568
569
	for (port_int=0; port_int<1; ++port_int) { /* For Grain */
570
		/* Changes for Grain/Flea */
571
		/*offset = 0; */
572
		/*arb_refresh_addr = BCHP_PRI_ARB_CONTROL_REGS_REFRESH_CTL_0; */
573
		/*offset += GLOBAL_REG_RBUS_START; */
574
		/* Changes for Grain - till here */
575
576
		if (ddr3) {
577
			data = (CWL & 0x07) << 3;
578
			/*DEBUG_PRINT(LOAD_EMODE2_CMD, data); */
579
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_LOAD_EMODE2_CMD,  data );
580
581
			data = 0;
582
			/*DEBUG_PRINT(LOAD_EMODE3_CMD, data); */
583
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_LOAD_EMODE3_CMD,  data );
584
585
			data = 6;  /* was 4; */
586
			/*DEBUG_PRINT(LOAD_EMODE_CMD, data); */
587
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_LOAD_EMODE_CMD,  data );
588
589
			data = 0x1100;   /* Reset DLL */
590
			data += ((tWR-4) << 9);
591
			data += ((tCAS-4) << 4);
592
			/*DEBUG_PRINT(LOAD_MODE_CMD, data); */
593
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_LOAD_MODE_CMD,  data );
594
595
596
			data = 0x0400;  /* long calibration */
597
			/*DEBUG_PRINT(ZQ_CALIBRATE, data); */
598
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_ZQ_CALIBRATE,  data );
599
600
			msleep_interruptible(1);
601
		}
602
		else
603
		{
604
			/*DecSd_RegSdPrechCmd    // Precharge */
605
			data = 0;
606
			/*DEBUG_PRINT(PRECHARGE_CMD, data); */
607
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_PRECHARGE_CMD,  data );
608
609
			/*DEBUG_PRINT(PRECHARGE_CMD, data); */
610
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_PRECHARGE_CMD,  data );
611
612
			/*DecSd_RegSdLdModeCmd   //Clear EMODE 2,3 */
613
			data = 0;
614
			/*DEBUG_PRINT(LOAD_EMODE2_CMD, data); */
615
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_LOAD_EMODE2_CMD,  data );
616
617
			/*DEBUG_PRINT(LOAD_EMODE3_CMD, data); */
618
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_LOAD_EMODE3_CMD,  data );
619
620
			/*DecSd_RegSdLdEmodeCmd  // Enable DLL ; Rtt ; enable OCD */
621
			data = 0x3C0;
622
			/*DEBUG_PRINT(LOAD_EMODE_CMD, data); */
623
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_LOAD_EMODE_CMD,  data );
624
625
			/*DecSd_RegSdLdModeCmd */
626
			data = 0x102;   /* Reset DLL */
627
			data += ((tWR-1) << 9);
628
			data += (tCAS << 4);
629
			/*DEBUG_PRINT(LOAD_MODE_CMD, data); */
630
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_LOAD_MODE_CMD,  data );
631
632
			/*DecSd_RegSdPrechCmd    // Precharge */
633
			data = 0;
634
			/*DEBUG_PRINT(PRECHARGE_CMD, data); */
635
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_PRECHARGE_CMD,  data );
636
637
			/*DEBUG_PRINT(PRECHARGE_CMD, data); */
638
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_PRECHARGE_CMD,  data );
639
640
			/*DecSd_RegSdRefCmd      // Refresh */
641
			data = 0x69;
642
			/*DEBUG_PRINT(REFRESH_CMD, data); */
643
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_REFRESH_CMD,  data );
644
645
			/*DEBUG_PRINT(REFRESH_CMD, data); */
646
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_REFRESH_CMD,  data );
647
648
			/*DecSd_RegSdLdModeCmd */
649
			data = 0x002;   /* Un-Reset DLL */
650
			data += ((tWR-1) << 9);
651
			data += (tCAS << 4);
652
			/*DEBUG_PRINT(LOAD_MODE_CMD, data); */
653
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_LOAD_MODE_CMD,  data );
654
655
			/*DecSd_RegSdLdEmodeCmd  // Enable DLL ; Rtt ; enable OCD */
656
			data = 0x3C0;
657
			/*DEBUG_PRINT(LOAD_EMODE_CMD, data); */
658
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_LOAD_EMODE_CMD,  data );
659
660
			/*DecSd_RegSdLdEmodeCmd  // Enable DLL ; Rtt ; disable OCD */
661
			data = 0x40;
662
			/*DEBUG_PRINT(LOAD_EMODE_CMD, data); */
663
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_LOAD_EMODE_CMD,  data );
664
		}
665
666
		/*Enable refresh */
667
		data = ((0x68 << 0) |  /*Refresh period */
668
				(0x1 << 12)    /*enable refresh */
669
				);
670
		if (tmode == 0) {
671
			/*MemSysRegWr(arb_refresh_addr + GLOBAL_REG_RBUS_START,data); */
672
			hw->pfnWriteDevRegister(hw->adp, BCHP_PRI_ARB_CONTROL_REGS_REFRESH_CTL_0,data);
673
		}
674
675
		/*offset = 0; */
676
		/*offset += GLOBAL_REG_RBUS_START; */
677
678
		/* Use this scratch register in DDR0 as a simple symaphore for the test */
679
		/* to monitor if and when the Initialization of the DDR is complete. Seeing a non zero value */
680
		/* indicates DDR init complete.  This code is ONLY for the MIPS. It has no affect in init.c */
681
		/* The MIPS executes this code and we wait until DDR 1 is inited before setting the semaphore. */
682
		if ( port_int == 1)
683
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_SCRATCH, 0xff);
684
685
		/*Setup the Arbiter Data and Pict Buffer split if specified */
686
		if (port_int==0) { /*only need to do this once */
687
			/*where is the pict buff split (2 bits) */
688
			/*0 = always mem_a, 1 = (<128 is mem_a), 2 = (<64 is mem_a), 3 = always mem_b */
689
			PSPLIT = 0;
690
691
			/*0 = 32MB, 1 = 64MB, 2 = 128 MB, 3 = 256MB, 4=512MB */
692
			DSPLIT = 4;
693
694
			data = 0;
695
			data += DSPLIT;
696
			data += PSPLIT<< 4;
697
			/* MemSysRegWr (PRI_ARB_CONTROL_REGS_CONC_CTL + offset,  data ); */
698
		}
699
700
		if (DIS_LATENCY_CTRL == 1){
701
			/*set the work limit to the maximum */
702
			/*DEBUG_PRINT(LATENCY, data); */
703
			hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_LATENCY,  0x3ff );
704
		}
705
	} /* for (port_int=0......  ) */
706
707
 return;
708
}
709
710
void crystalhd_flea_ddr_arb_rts_init(struct crystalhd_hw *hw)
711
{
712
	uint32_t addr_cnt;
713
	uint32_t addr_ctrl;
714
	uint32_t i;
715
716
	addr_cnt = BCHP_PRI_CLIENT_REGS_CLIENT_00_COUNT;
717
	addr_ctrl = BCHP_PRI_CLIENT_REGS_CLIENT_00_CONTROL;
718
719
	/*Go through the various clients and program them */
720
	for(i=0;i<21;i++){
721
		if (rts_prog_vals[i][0] > 0) {
722
			hw->pfnWriteDevRegister(hw->adp, addr_cnt,
723
				(rts_prog_vals[i][1]) |        /*Blockout Count */
724
				(rts_prog_vals[i][2] << 16)    /*Critical Period */
725
				);
726
			hw->pfnWriteDevRegister(hw->adp, addr_ctrl,
727
				(rts_prog_vals[i][3]) |        /*Priority Level */
728
				(rts_prog_vals[i][4] << 8)     /*Access Mode */
729
				);
730
		}
731
		addr_cnt+=8;
732
		addr_ctrl+=8;
733
	}
734
}
(-)crystalhd~/crystalhd_flea_ddr.h (+73 lines)
Line 0 Link Here
1
/***************************************************************************
2
 * Copyright (c) 2005-2010, Broadcom Corporation.
3
 *
4
 *  Name: crystalhd_flea_ddr . h
5
 *
6
 *  Description:
7
 *		BCM70015 generic DDR routines
8
 *
9
 *  HISTORY:
10
 *
11
 **********************************************************************
12
 * This file is part of the crystalhd device driver.
13
 *
14
 * This driver is free software; you can redistribute it and/or modify
15
 * it under the terms of the GNU General Public License as published by
16
 * the Free Software Foundation, version 2 of the License.
17
 *
18
 * This driver is distributed in the hope that it will be useful,
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 * GNU General Public License for more details.
22
 *
23
 * You should have received a copy of the GNU General Public License
24
 * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
25
 **********************************************************************/
26
27
#undef  BRCM_ALIGN
28
#define BRCM_ALIGN(c,r,f)   0
29
30
#define MEM_SYS_NUM_DDR_PLLS 2;
31
32
/*extern uint32_t rts_prog_vals[][5]; */
33
34
enum eDDR2_SPEED_GRADE {
35
  DDR2_400MHZ = 0x0,
36
  DDR2_333MHZ = 0x1,
37
  DDR2_266MHZ = 0x2,
38
  DDR2_200MHZ = 0x3,
39
  DDR2_533MHZ = 0x4,
40
  DDR2_667MHZ = 0x5
41
};
42
43
enum eSD_COL_SIZE {
44
  COL_BITS_9  = 0x0,
45
  COL_BITS_10 = 0x1,
46
  COL_BITS_11 = 0x2,
47
};
48
49
enum eSD_BANK_SIZE {
50
  BANK_SIZE_4  = 0x0,
51
  BANK_SIZE_8  = 0x1,
52
};
53
54
enum eSD_ROW_SIZE {
55
  ROW_SIZE_8K  = 0x0,
56
  ROW_SIZE_16K = 0x1,
57
};
58
59
/*DDR PHY PLL init routine */
60
void crystalhd_flea_ddr_pll_config(struct crystalhd_hw* hw, int32_t *speed_grade, int32_t num_plls, uint32_t tmode);
61
62
/*DDR controller init routine */
63
void crystalhd_flea_ddr_ctrl_init(struct crystalhd_hw *hw,
64
						int32_t port,
65
                        int32_t ddr3,
66
                        int32_t speed_grade,
67
                        int32_t col,
68
                        int32_t bank,
69
                        int32_t row,
70
                        uint32_t tmode );
71
72
/*RTS Init routines */
73
void crystalhd_flea_ddr_arb_rts_init(struct crystalhd_hw *hw);
(-)crystalhd~/crystalhd_fleafuncs.c (+2955 lines)
Line 0 Link Here
1
/***************************************************************************
2
 * Copyright (c) 2005-2009, Broadcom Corporation.
3
 *
4
 *  Name: crystalhd_fleafuncs.c
5
 *
6
 *  Description:
7
 *		BCM70015 Linux driver HW layer.
8
 *
9
 *  HISTORY:
10
 *
11
 **********************************************************************
12
 * This file is part of the crystalhd device driver.
13
 *
14
 * This driver is free software; you can redistribute it and/or modify
15
 * it under the terms of the GNU General Public License as published by
16
 * the Free Software Foundation, version 2 of the License.
17
 *
18
 * This driver is distributed in the hope that it will be useful,
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 * GNU General Public License for more details.
22
 *
23
 * You should have received a copy of the GNU General Public License
24
 * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
25
 **********************************************************************/
26
27
#include <linux/pci.h>
28
#include <linux/delay.h>
29
#include <linux/device.h>
30
#include <asm/tsc.h>
31
#include <asm/msr.h>
32
#include "crystalhd_hw.h"
33
#include "crystalhd_fleafuncs.h"
34
#include "crystalhd_lnx.h"
35
#include "FleaDefs.h"
36
#include "crystalhd_flea_ddr.h"
37
38
#define OFFSETOF(_s_, _m_) ((size_t)(unsigned long)&(((_s_ *)0)->_m_))
39
40
void crystalhd_flea_core_reset(struct crystalhd_hw *hw)
41
{
42
	unsigned int pollCnt=0,regVal=0;
43
44
	dev_dbg(&hw->adp->pdev->dev,"[crystalhd_flea_core_reset]: Starting core reset\n");
45
46
	hw->pfnWriteDevRegister(hw->adp, BCHP_MISC3_RESET_CTRL,	0x01);
47
48
	pollCnt=0;
49
	while (1)
50
	{
51
		pollCnt++;
52
		regVal=0;
53
54
		msleep_interruptible(1);
55
56
		regVal = hw->pfnReadDevRegister(hw->adp, BCHP_MISC3_RESET_CTRL);
57
58
		if(!(regVal & 0x01))
59
		{
60
			/*
61
			-- Bit is 0, Reset is completed. Which means that
62
			-- wait for sometime and then allow other accesses.
63
			*/
64
			msleep_interruptible(1);
65
			break;
66
		}
67
68
		if(pollCnt > MAX_VALID_POLL_CNT)
69
		{
70
			printk("!!FATAL ERROR!! Core Reset Failure\n");
71
			break;
72
		}
73
	}
74
75
	msleep_interruptible(5);
76
77
	return;
78
}
79
80
void crystalhd_flea_disable_interrupts(struct crystalhd_hw *hw)
81
{
82
	union FLEA_INTR_BITS_COMMON IntrMaskReg;
83
	/*
84
	-- Mask everything except the reserved bits.
85
	*/
86
	IntrMaskReg.WholeReg =0xffffffff;
87
	IntrMaskReg.Reserved1=0;
88
	IntrMaskReg.Reserved2=0;
89
	IntrMaskReg.Reserved3=0;
90
	IntrMaskReg.Reserved4=0;
91
92
	hw->pfnWriteDevRegister(hw->adp, BCHP_INTR_INTR_MSK_SET_REG, IntrMaskReg.WholeReg);
93
94
	return;
95
}
96
97
void crystalhd_flea_enable_interrupts(struct crystalhd_hw *hw)
98
{
99
	union FLEA_INTR_BITS_COMMON IntrMaskReg;
100
	/*
101
	-- Clear The Mask for everything except the reserved bits.
102
	*/
103
	IntrMaskReg.WholeReg =0xffffffff;
104
	IntrMaskReg.Reserved1=0;
105
	IntrMaskReg.Reserved2=0;
106
	IntrMaskReg.Reserved3=0;
107
	IntrMaskReg.Reserved4=0;
108
109
	hw->pfnWriteDevRegister(hw->adp, BCHP_INTR_INTR_MSK_CLR_REG, IntrMaskReg.WholeReg);
110
111
	return;
112
}
113
114
void crystalhd_flea_clear_interrupts(struct crystalhd_hw *hw)
115
{
116
	union FLEA_INTR_BITS_COMMON	IntrStsValue;
117
118
	IntrStsValue.WholeReg = hw->pfnReadDevRegister(hw->adp, BCHP_INTR_INTR_STATUS);
119
120
	if(IntrStsValue.WholeReg)
121
	{
122
		hw->pfnWriteDevRegister(hw->adp, BCHP_INTR_INTR_CLR_REG, IntrStsValue.WholeReg);
123
		hw->pfnWriteDevRegister(hw->adp, BCHP_INTR_EOI_CTRL, 1);
124
	}
125
126
	return;
127
}
128
129
bool crystalhd_flea_detect_ddr3(struct crystalhd_hw *hw)
130
{
131
	uint32_t regVal = 0;
132
133
	/*Set the Multiplexer to select the GPIO-6*/
134
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_SUN_TOP_CTRL_PIN_MUX_CTRL_0);
135
136
	/*Make sure that the bits-24:27 are reset*/
137
	if(regVal & 0x0f000000)
138
	{
139
		regVal = regVal & 0xf0ffffff; /*Clear bit 24-27 for selecting GPIO_06*/
140
		hw->pfnWriteDevRegister(hw->adp, BCHP_SUN_TOP_CTRL_PIN_MUX_CTRL_0, regVal);
141
	}
142
143
	regVal=0;
144
	/*Set the Direction of GPIO-6*/
145
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_GIO_IODIR_LO);
146
147
	if(!(regVal & BC_BIT(6)))
148
	{
149
		/*Set the Bit number 6 to make the GPIO6 as input*/
150
		regVal |= BC_BIT(6);
151
		hw->pfnWriteDevRegister(hw->adp, BCHP_GIO_IODIR_LO, regVal);
152
	}
153
154
	regVal=0;
155
	regVal = hw->pfnReadDevRegister(hw->adp,	BCHP_GIO_DATA_LO);
156
157
	/*If this bit is clear then have DDR-3 else we have DDR-2*/
158
	if(!(regVal & BC_BIT(6)))
159
	{
160
		dev_dbg(&hw->adp->pdev->dev,"DDR-3 Detected\n");
161
		return true;
162
	}
163
	dev_dbg(&hw->adp->pdev->dev,"DDR-2 Detected\n");
164
	return false;
165
}
166
167
void crystalhd_flea_init_dram(struct crystalhd_hw *hw)
168
{
169
	int32_t ddr2_speed_grade[2];
170
	uint32_t sd_0_col_size, sd_0_bank_size, sd_0_row_size;
171
	uint32_t sd_1_col_size, sd_1_bank_size, sd_1_row_size;
172
	uint32_t ddr3_mode[2];
173
	uint32_t regVal;
174
	bool bDDR3Detected=false; /*Should be filled in using the detection logic. Default to DDR2 */
175
176
	/* On all designs we are using DDR2 or DDR3 x16 and running at a max of 400Mhz */
177
	/* Only one bank of DDR supported. The other is a dummy */
178
179
	ddr2_speed_grade[0] = DDR2_400MHZ;
180
	ddr2_speed_grade[1] = DDR2_400MHZ;
181
	sd_0_col_size = COL_BITS_10;
182
	sd_0_bank_size = BANK_SIZE_8;
183
	sd_0_row_size = ROW_SIZE_8K; /* DDR2 */
184
	/*	sd_0_row_size = ROW_SIZE_16K; // DDR3 */
185
	sd_1_col_size = COL_BITS_10;
186
	sd_1_bank_size = BANK_SIZE_8;
187
	sd_1_row_size = ROW_SIZE_8K;
188
	ddr3_mode[0] = 0;
189
	ddr3_mode[1] = 0;
190
191
	bDDR3Detected = crystalhd_flea_detect_ddr3(hw);
192
	if(bDDR3Detected)
193
	{
194
		ddr3_mode[0] = 1;
195
		sd_0_row_size = ROW_SIZE_16K; /* DDR3 */
196
		sd_1_row_size = ROW_SIZE_16K; /* DDR3 */
197
198
	}
199
200
	/* Step 1. PLL Init */
201
	crystalhd_flea_ddr_pll_config(hw, ddr2_speed_grade, 1, 0); /* only need to configure PLLs in TM0 */
202
203
	/* Step 2. DDR CTRL Init */
204
	crystalhd_flea_ddr_ctrl_init(hw, 0, ddr3_mode[0], ddr2_speed_grade[0], sd_0_col_size, sd_0_bank_size, sd_0_row_size, 0);
205
206
	/* Step 3 RTS Init - Real time scheduling memory arbiter */
207
	crystalhd_flea_ddr_arb_rts_init(hw);
208
209
	/* NAREN turn off ODT. The REF1 and SV1 and most customer designs allow this. */
210
	/* IF SOMEONE COMPLAINS ABOUT MEMORY OR DATA CORRUPTION LOOK HERE FIRST */
211
212
	/*hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_LOAD_EMODE_CMD, 0x02, false); */
213
214
	/*regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_PARAMS3);
215
	regVal &= ~(BCHP_DDR23_CTL_REGS_0_PARAMS3_wr_odt_en_MASK);
216
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_PARAMS3, regVal);*/
217
218
	/*regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_DRIVE_PAD_CTL);
219
	regVal |= BCHP_DDR23_PHY_BYTE_LANE_1_DRIVE_PAD_CTL_seltxdrv_ci_MASK;
220
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_DRIVE_PAD_CTL, regVal);
221
222
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_DRIVE_PAD_CTL);
223
	regVal |= BCHP_DDR23_PHY_BYTE_LANE_0_DRIVE_PAD_CTL_seltxdrv_ci_MASK;
224
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_DRIVE_PAD_CTL, regVal);*/
225
226
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_CLOCK_PAD_DISABLE);
227
	regVal |= BCHP_DDR23_PHY_BYTE_LANE_1_CLOCK_PAD_DISABLE_clk_pad_dis_MASK;
228
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_CLOCK_PAD_DISABLE, regVal);
229
230
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL);
231
	regVal &= ~(BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL_dq_odt_enable_MASK);
232
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_READ_CONTROL, regVal);
233
234
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_READ_CONTROL);
235
	regVal &= ~(BCHP_DDR23_PHY_BYTE_LANE_1_READ_CONTROL_dq_odt_enable_MASK);
236
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_READ_CONTROL, regVal);
237
238
	return;
239
}
240
241
uint32_t crystalhd_flea_reg_rd(struct crystalhd_adp *adp, uint32_t reg_off)
242
{
243
	uint32_t baseAddr = reg_off >> 16;
244
	void	*regAddr;
245
246
	if (!adp) {
247
		printk(KERN_ERR "%s: Invalid args\n", __func__);
248
		return 0;
249
	}
250
251
	if(baseAddr == 0 || baseAddr == FLEA_GISB_DIRECT_BASE) /* Direct Mapped Region */
252
	{
253
		regAddr = adp->i2o_addr + (reg_off & 0x0000FFFF);
254
		if(regAddr > (adp->i2o_addr + adp->pci_i2o_len)) {
255
			dev_err(&adp->pdev->dev, "%s: reg_off out of range: 0x%08x\n",
256
					__func__, reg_off);
257
			return 0;
258
		}
259
		return readl(regAddr);
260
	}
261
	else /* non directly mapped region */
262
	{
263
		if(adp->pci_i2o_len < 0xFFFF) {
264
			printk("Un-expected mapped region size\n");
265
			return 0;
266
		}
267
		regAddr = adp->i2o_addr + FLEA_GISB_INDIRECT_ADDRESS;
268
		writel(reg_off | 0x10000000, regAddr);
269
		regAddr = adp->i2o_addr + FLEA_GISB_INDIRECT_DATA;
270
		return readl(regAddr);
271
	}
272
}
273
274
void crystalhd_flea_reg_wr(struct crystalhd_adp *adp, uint32_t reg_off, uint32_t val)
275
{
276
	uint32_t baseAddr = reg_off >> 16;
277
	void	*regAddr;
278
279
	if (!adp) {
280
		printk(KERN_ERR "%s: Invalid args\n", __func__);
281
		return;
282
	}
283
284
	if(baseAddr == 0 || baseAddr == FLEA_GISB_DIRECT_BASE) /* Direct Mapped Region */
285
	{
286
		regAddr = adp->i2o_addr + (reg_off & 0x0000FFFF);
287
		if(regAddr > (adp->i2o_addr + adp->pci_i2o_len)) {
288
			dev_err(&adp->pdev->dev, "%s: reg_off out of range: 0x%08x\n",
289
					__func__, reg_off);
290
					return ;
291
		}
292
		writel(val, regAddr);
293
	}
294
	else /* non directly mapped region */
295
	{
296
		if(adp->pci_i2o_len < 0xFFFF) {
297
			printk("Un-expected mapped region size\n");
298
			return;
299
		}
300
		regAddr = adp->i2o_addr + FLEA_GISB_INDIRECT_ADDRESS;
301
		writel(reg_off | 0x10000000, regAddr);
302
		regAddr = adp->i2o_addr + FLEA_GISB_INDIRECT_DATA;
303
		writel(val, regAddr);
304
	}
305
}
306
307
/**
308
* crystalhd_flea_mem_rd - Read data from DRAM area.
309
* @adp: Adapter instance
310
* @start_off: Start offset.
311
* @dw_cnt: Count in dwords.
312
* @rd_buff: Buffer to copy the data from dram.
313
*
314
* Return:
315
*	Status.
316
*
317
* Dram read routine.
318
*/
319
BC_STATUS crystalhd_flea_mem_rd(struct crystalhd_hw *hw, uint32_t start_off,
320
								uint32_t dw_cnt, uint32_t *rd_buff)
321
{
322
	uint32_t ix = 0;
323
	uint32_t addr = start_off, base;
324
325
	if (!hw || !rd_buff) {
326
		printk(KERN_ERR "%s: Invalid arg\n", __func__);
327
		return BC_STS_INV_ARG;
328
	}
329
330
	if( hw->FleaPowerState == FLEA_PS_LP_COMPLETE ) {
331
		/*printk(KERN_ERR "%s: Flea power down, cann't read memory.\n", __func__); */
332
		return BC_STS_BUSY;
333
	}
334
335
	if((start_off + dw_cnt * 4) > FLEA_TOTAL_DRAM_SIZE) {
336
		printk(KERN_ERR "Access beyond DRAM limit at Addr 0x%x and size 0x%x words\n", start_off, dw_cnt);
337
		return BC_STS_ERROR;
338
	}
339
340
	/* Set the base addr for the 512kb window */
341
	hw->pfnWriteDevRegister(hw->adp, BCHP_MISC2_DIRECT_WINDOW_CONTROL,
342
							(addr & BCHP_MISC2_DIRECT_WINDOW_CONTROL_DIRECT_WINDOW_BASE_ADDR_MASK) | BCHP_MISC2_DIRECT_WINDOW_CONTROL_DIRECT_WINDOW_ENABLE_MASK);
343
344
	for (ix = 0; ix < dw_cnt; ix++) {
345
		rd_buff[ix] = readl(hw->adp->mem_addr + (addr & ~BCHP_MISC2_DIRECT_WINDOW_CONTROL_DIRECT_WINDOW_BASE_ADDR_MASK));
346
		base = addr & BCHP_MISC2_DIRECT_WINDOW_CONTROL_DIRECT_WINDOW_BASE_ADDR_MASK;
347
		addr += 4; /* DWORD access at all times */
348
		if (base != (addr & BCHP_MISC2_DIRECT_WINDOW_CONTROL_DIRECT_WINDOW_BASE_ADDR_MASK)) {
349
			/* Set the base addr for next 512kb window */
350
			hw->pfnWriteDevRegister(hw->adp, BCHP_MISC2_DIRECT_WINDOW_CONTROL,
351
										(addr & BCHP_MISC2_DIRECT_WINDOW_CONTROL_DIRECT_WINDOW_BASE_ADDR_MASK) | BCHP_MISC2_DIRECT_WINDOW_CONTROL_DIRECT_WINDOW_ENABLE_MASK);
352
		}
353
	}
354
	return BC_STS_SUCCESS;
355
}
356
357
/**
358
* crystalhd_flea_mem_wr - Write data to DRAM area.
359
* @adp: Adapter instance
360
* @start_off: Start offset.
361
* @dw_cnt: Count in dwords.
362
* @wr_buff: Data Buffer to be written.
363
*
364
* Return:
365
*	Status.
366
*
367
* Dram write routine.
368
*/
369
BC_STATUS crystalhd_flea_mem_wr(struct crystalhd_hw *hw, uint32_t start_off,
370
								uint32_t dw_cnt, uint32_t *wr_buff)
371
{
372
	uint32_t ix = 0;
373
	uint32_t addr = start_off, base;
374
	uint32_t temp;
375
376
	if (!hw || !wr_buff) {
377
		printk(KERN_ERR "%s: Invalid arg\n", __func__);
378
		return BC_STS_INV_ARG;
379
	}
380
381
	if( hw->FleaPowerState == FLEA_PS_LP_COMPLETE ) {
382
		/*printk(KERN_ERR "%s: Flea power down, cann't write memory.\n", __func__); */
383
		return BC_STS_BUSY;
384
	}
385
386
	if((start_off + dw_cnt * 4) > FLEA_TOTAL_DRAM_SIZE) {
387
		printk("Access beyond DRAM limit at Addr 0x%x and size 0x%x words\n", start_off, dw_cnt);
388
		return BC_STS_ERROR;
389
	}
390
391
	/* Set the base addr for the 512kb window */
392
	hw->pfnWriteDevRegister(hw->adp, BCHP_MISC2_DIRECT_WINDOW_CONTROL,
393
							(addr & BCHP_MISC2_DIRECT_WINDOW_CONTROL_DIRECT_WINDOW_BASE_ADDR_MASK) | BCHP_MISC2_DIRECT_WINDOW_CONTROL_DIRECT_WINDOW_ENABLE_MASK);
394
395
	for (ix = 0; ix < dw_cnt; ix++) {
396
		writel(wr_buff[ix], hw->adp->mem_addr + (addr & ~BCHP_MISC2_DIRECT_WINDOW_CONTROL_DIRECT_WINDOW_BASE_ADDR_MASK));
397
		base = addr & BCHP_MISC2_DIRECT_WINDOW_CONTROL_DIRECT_WINDOW_BASE_ADDR_MASK;
398
		addr += 4; /* DWORD access at all times */
399
		if (base != (addr & BCHP_MISC2_DIRECT_WINDOW_CONTROL_DIRECT_WINDOW_BASE_ADDR_MASK)) {
400
			/* Set the base addr for next 512kb window */
401
			hw->pfnWriteDevRegister(hw->adp, BCHP_MISC2_DIRECT_WINDOW_CONTROL,
402
									(addr & BCHP_MISC2_DIRECT_WINDOW_CONTROL_DIRECT_WINDOW_BASE_ADDR_MASK) | BCHP_MISC2_DIRECT_WINDOW_CONTROL_DIRECT_WINDOW_ENABLE_MASK);
403
		}
404
	}
405
406
	/*Dummy Read To Flush Memory Arbitrator*/
407
	crystalhd_flea_mem_rd(hw, start_off, 1, &temp);
408
	return BC_STS_SUCCESS;
409
}
410
411
412
static
413
void crystalhd_flea_runtime_power_up(struct crystalhd_hw *hw)
414
{
415
	uint32_t regVal;
416
	uint64_t currTick;
417
	uint32_t totalTick_Hi;
418
	uint32_t TickSpentInPD_Hi;
419
	uint64_t temp_64;
420
	long totalTick_Hi_f;
421
	long TickSpentInPD_Hi_f;
422
423
	/*printk("RT PU \n"); */
424
425
	/* NAREN This function restores clocks and power to the DRAM and to the core to bring the decoder back up to full operation */
426
	/* Start the DRAM controller clocks first */
427
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_CLK_PM_CTRL);
428
	regVal &= ~(BCHP_CLK_PM_CTRL_DIS_DDR_108_CLK_MASK |	BCHP_CLK_PM_CTRL_DIS_DDR_216_CLK_MASK);
429
	hw->pfnWriteDevRegister(hw->adp, BCHP_CLK_PM_CTRL, regVal);
430
431
	/* Delay to allow the DRAM clock to stabilize */
432
	udelay(25);
433
434
	/* Power Up PHY and start clocks on DRAM device */
435
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_CLOCK_REG_CONTROL);
436
	regVal &= ~(BCHP_DDR23_PHY_CONTROL_REGS_CLOCK_REG_CONTROL_pwrdn_MASK);
437
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_CLOCK_REG_CONTROL, regVal);
438
439
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG);
440
	regVal &= ~(BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG_PWRDN_MASK);
441
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG, regVal);
442
443
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_CLK_PM_CTRL,
444
		~(BCHP_DDR23_PHY_CONTROL_REGS_CLK_PM_CTRL_DIS_DDR_CLK_MASK));
445
446
	/* Delay to allow the PLL to lock */
447
	udelay(25);
448
449
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_IDLE_PAD_CONTROL);
450
	regVal &= ~(BCHP_DDR23_PHY_CONTROL_REGS_IDLE_PAD_CONTROL_idle_MASK );
451
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_IDLE_PAD_CONTROL, regVal);
452
453
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_CLOCK_REG_CONTROL);
454
	regVal &= ~(BCHP_DDR23_PHY_BYTE_LANE_0_CLOCK_REG_CONTROL_pwrdn_MASK);
455
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_CLOCK_REG_CONTROL, regVal);
456
457
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_CLOCK_REG_CONTROL);
458
	regVal &= ~(BCHP_DDR23_PHY_BYTE_LANE_1_CLOCK_REG_CONTROL_pwrdn_MASK);
459
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_CLOCK_REG_CONTROL, regVal);
460
461
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL);
462
	regVal &= ~(BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL_idle_MASK );
463
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL, regVal);
464
465
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL);
466
	regVal &= ~(BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL_idle_MASK );
467
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL, regVal);
468
469
	/* Start Refresh Cycles from controller */
470
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_PRI_ARB_CONTROL_REGS_REFRESH_CTL_0);
471
	regVal |= BCHP_PRI_ARB_CONTROL_REGS_REFRESH_CTL_0_enable_MASK;
472
	hw->pfnWriteDevRegister(hw->adp, BCHP_PRI_ARB_CONTROL_REGS_REFRESH_CTL_0, regVal);
473
474
	/* turn off self-refresh */
475
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_PARAMS2);
476
	regVal &= ~(BCHP_DDR23_CTL_REGS_0_PARAMS2_clke_MASK);
477
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_PARAMS2, regVal);
478
479
	udelay(5);
480
481
	/* Issue refresh cycle */
482
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_REFRESH_CMD, 0x60);
483
484
	/* Enable the ARM AVD and BLINK clocks */
485
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_CLK_PM_CTRL);
486
487
	regVal &= ~(BCHP_CLK_PM_CTRL_DIS_ARM_CLK_MASK |
488
				BCHP_CLK_PM_CTRL_DIS_AVD_CLK_MASK |
489
				BCHP_CLK_PM_CTRL_DIS_BLINK_108_CLK_MASK |
490
				BCHP_CLK_PM_CTRL_DIS_AVD_108_CLK_MASK |
491
				BCHP_CLK_PM_CTRL_DIS_BLINK_216_CLK_MASK |
492
				BCHP_CLK_PM_CTRL_DIS_AVD_216_CLK_MASK);
493
494
	hw->pfnWriteDevRegister(hw->adp, BCHP_CLK_PM_CTRL, 0x03000000);
495
496
	/* Start arbiter */
497
	hw->pfnWriteDevRegister(hw->adp, BCHP_PRI_ARB_CONTROL_REGS_MASTER_CTL, BCHP_PRI_ARB_CONTROL_REGS_MASTER_CTL_arb_disable_Enable);
498
499
#ifdef _POWER_HANDLE_AVD_WATCHDOG_
500
	/* Restore Watchdog timers */
501
	/* Make sure the timeouts do not happen */
502
	/*Outer Loop Watchdog timer */
503
	hw->pfnWriteDevRegister(hw->adp, BCHP_DECODE_CPUREGS_0_REG_WATCHDOG_TMR, hw->OLWatchDogTimer);
504
505
	/*//Inner Loop Watchdog timer */
506
	hw->pfnWriteDevRegister(hw->adp, BCHP_DECODE_CPUREGS2_0_REG_WATCHDOG_TMR, hw->ILWatchDogTimer);
507
508
#endif
509
510
	/*printk("RT Power Up Flea Complete\n"); */
511
512
	rdtscll(currTick);
513
514
	hw->TickSpentInPD += (currTick - hw->TickStartInPD);
515
516
	temp_64 = (hw->TickSpentInPD)>>24;
517
	TickSpentInPD_Hi = (uint32_t)(temp_64);
518
	TickSpentInPD_Hi_f = (long)TickSpentInPD_Hi;
519
520
	temp_64 = (currTick - hw->TickCntDecodePU)>>24;
521
	totalTick_Hi = (uint32_t)(temp_64);
522
	totalTick_Hi_f = (long)totalTick_Hi;
523
524
	if( totalTick_Hi_f <= 0 )
525
	{
526
		temp_64 = (hw->TickSpentInPD);
527
		TickSpentInPD_Hi = (uint32_t)(temp_64);
528
		TickSpentInPD_Hi_f = (long)TickSpentInPD_Hi;
529
530
		temp_64 = (currTick - hw->TickCntDecodePU);
531
		totalTick_Hi = (uint32_t)(temp_64);
532
		totalTick_Hi_f = (long)totalTick_Hi;
533
	}
534
535
	if( totalTick_Hi_f <= 0 )
536
	{
537
		printk("totalTick_Hi_f <= 0, set hw->PDRatio = 60\n");
538
		hw->PDRatio = 60;
539
	}
540
	else
541
		hw->PDRatio = (TickSpentInPD_Hi_f * 100) / totalTick_Hi_f;
542
543
	/*printk("Ticks currently spent in PD: 0x%llx Total: 0x%llx Ratio %d,\n", */
544
	/*	hw->TickSpentInPD, (currTick - hw->TickCntDecodePU), hw->PDRatio); */
545
546
	/* NAREN check if the PD ratio is greater than 75. If so, try to increase the PauseThreshold to improve the ratio */
547
	/* never go higher than the default threshold */
548
	if((hw->PDRatio > 75) && (hw->PauseThreshold < hw->DefaultPauseThreshold))
549
	{
550
		/*printk("Current PDRatio:%u, PauseThreshold:%u, DefaultPauseThreshold:%u, incress PauseThreshold.\n", */
551
		/*		hw->PDRatio, hw->PauseThreshold, hw->DefaultPauseThreshold); */
552
		hw->PauseThreshold++;
553
	}
554
	else
555
	{
556
		/*printk("Current PDRatio:%u, PauseThreshold:%u, DefaultPauseThreshold:%u, don't incress PauseThreshold.\n", */
557
		/*		hw->PDRatio, hw->PauseThreshold, hw->DefaultPauseThreshold); */
558
	}
559
560
	return;
561
}
562
563
static
564
void crystalhd_flea_runtime_power_dn(struct crystalhd_hw *hw)
565
{
566
	uint32_t regVal;
567
	uint32_t pollCnt;
568
569
	/*printk("RT PD \n"); */
570
571
	hw->DrvPauseCnt++;
572
573
	/* NAREN This function stops the decoder clocks including the AVD, ARM and DRAM */
574
	/* It powers down the DRAM device and places the DRAM into self-refresh */
575
576
#ifdef _POWER_HANDLE_AVD_WATCHDOG_
577
	/* Make sure the timeouts do not happen */
578
	/* Because the AVD drops to a debug prompt and stops decoding if it hits any watchdogs */
579
	/*Outer Loop Watchdog timer */
580
	regVal = hw->pfnReadDevRegister(hw->adp,
581
		BCHP_DECODE_CPUREGS_0_REG_WATCHDOG_TMR);
582
583
	hw->OLWatchDogTimer = regVal;
584
	hw->pfnWriteDevRegister(hw->adp,
585
		BCHP_DECODE_CPUREGS_0_REG_WATCHDOG_TMR,
586
		0xffffffff);
587
588
	/*Inner Loop Watchdog timer */
589
	regVal = hw->pfnReadDevRegister(hw->adp,
590
		BCHP_DECODE_CPUREGS2_0_REG_WATCHDOG_TMR);
591
592
	hw->ILWatchDogTimer = regVal;
593
	hw->pfnWriteDevRegister(hw->adp,
594
		BCHP_DECODE_CPUREGS2_0_REG_WATCHDOG_TMR,
595
		0xffffffff);
596
#endif
597
598
	/* Stop memory arbiter first to freese memory access */
599
	hw->pfnWriteDevRegister(hw->adp, BCHP_PRI_ARB_CONTROL_REGS_MASTER_CTL, BCHP_PRI_ARB_CONTROL_REGS_MASTER_CTL_arb_disable_Disable);
600
601
	/* delay at least 15us for memory transactions to complete */
602
	/* udelay(15); */
603
604
	/* Wait for MEMC to become idle. Continue even if we are no since worst case this would just mean higher power consumption */
605
	pollCnt=0;
606
	while (pollCnt++ <= 400) /*200 */
607
	{
608
		regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_CTL_STATUS);
609
610
		if(regVal & BCHP_DDR23_CTL_REGS_0_CTL_STATUS_idle_MASK)
611
		{
612
			/* udelay(10); */
613
			break;
614
		}
615
		udelay(10);
616
	}
617
618
	/*If we failed Start the arbiter and return*/
619
	if(!(regVal & BCHP_DDR23_CTL_REGS_0_CTL_STATUS_idle_MASK))
620
	{
621
		printk("RT PD : failed Start the arbiter and return.\n");
622
		hw->pfnWriteDevRegister(hw->adp,
623
			BCHP_PRI_ARB_CONTROL_REGS_MASTER_CTL,
624
			BCHP_PRI_ARB_CONTROL_REGS_MASTER_CTL_arb_disable_Enable);
625
		return;
626
	}
627
628
	/* Disable the AVD, ARM and BLINK clocks*/
629
	/*regVal = hw->pfnReadDevRegister(hw->adp, BCHP_CLK_PM_CTRL);
630
631
	regVal |=	BCHP_CLK_PM_CTRL_DIS_ARM_CLK_MASK |
632
				BCHP_CLK_PM_CTRL_DIS_AVD_CLK_MASK |
633
				BCHP_CLK_PM_CTRL_DIS_BLINK_108_CLK_MASK |
634
				BCHP_CLK_PM_CTRL_DIS_AVD_108_CLK_MASK |
635
				BCHP_CLK_PM_CTRL_DIS_BLINK_216_CLK_MASK |
636
				BCHP_CLK_PM_CTRL_DIS_AVD_216_CLK_MASK;
637
638
	hw->pfnWriteDevRegister(hw->adp, BCHP_CLK_PM_CTRL, regValE);*/
639
640
	/* turn on self-refresh */
641
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_PARAMS2);
642
	regVal |= BCHP_DDR23_CTL_REGS_0_PARAMS2_clke_MASK;
643
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_PARAMS2, regVal);
644
645
	/* Issue refresh cycle */
646
	hw->pfnWriteDevRegister(hw->adp,	BCHP_DDR23_CTL_REGS_0_REFRESH_CMD, 0x60);
647
648
	/* Stop Refresh Cycles from controller */
649
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_PRI_ARB_CONTROL_REGS_REFRESH_CTL_0);
650
	regVal &= ~(BCHP_PRI_ARB_CONTROL_REGS_REFRESH_CTL_0_enable_MASK);
651
	hw->pfnWriteDevRegister(hw->adp, BCHP_PRI_ARB_CONTROL_REGS_REFRESH_CTL_0, regVal);
652
653
	/* Check if we are in self-refresh. Continue even if we are no since worst case this would just mean higher power consumption */
654
	pollCnt=0;
655
	while(pollCnt++ < 100)
656
	{
657
		regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_CTL_STATUS);
658
659
		if(!(regVal & BCHP_DDR23_CTL_REGS_0_CTL_STATUS_clke_MASK))
660
			break;
661
	}
662
663
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_CLK_PM_CTRL);
664
665
	regVal |=	BCHP_CLK_PM_CTRL_DIS_ARM_CLK_MASK |
666
				BCHP_CLK_PM_CTRL_DIS_AVD_CLK_MASK |
667
				BCHP_CLK_PM_CTRL_DIS_BLINK_108_CLK_MASK |
668
				BCHP_CLK_PM_CTRL_DIS_AVD_108_CLK_MASK |
669
				BCHP_CLK_PM_CTRL_DIS_BLINK_216_CLK_MASK |
670
				BCHP_CLK_PM_CTRL_DIS_AVD_216_CLK_MASK;
671
672
	hw->pfnWriteDevRegister(hw->adp, BCHP_CLK_PM_CTRL, regVal);
673
674
	/* Power down PHY and stop clocks on DRAM */
675
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL);
676
677
	regVal |=	BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL_idle_MASK |
678
				BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL_dm_iddq_MASK |
679
				BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL_dq_iddq_MASK |
680
				BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL_read_enb_iddq_MASK |
681
				BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL_dqs_iddq_MASK |
682
				BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL_clk_iddq_MASK;
683
684
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL, regVal);
685
686
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL);
687
688
	regVal |=	BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL_idle_MASK |
689
				BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL_dm_iddq_MASK |
690
				BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL_dq_iddq_MASK |
691
				BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL_read_enb_iddq_MASK |
692
				BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL_dqs_iddq_MASK |
693
				BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL_clk_iddq_MASK;
694
695
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL, regVal);
696
697
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_CLOCK_REG_CONTROL);
698
	regVal |= BCHP_DDR23_PHY_BYTE_LANE_0_CLOCK_REG_CONTROL_pwrdn_MASK;
699
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_CLOCK_REG_CONTROL, regVal);
700
701
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_CLOCK_REG_CONTROL);
702
	regVal |= BCHP_DDR23_PHY_BYTE_LANE_1_CLOCK_REG_CONTROL_pwrdn_MASK;
703
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_CLOCK_REG_CONTROL, regVal);
704
705
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_IDLE_PAD_CONTROL);
706
	regVal |=	BCHP_DDR23_PHY_CONTROL_REGS_IDLE_PAD_CONTROL_idle_MASK |
707
				BCHP_DDR23_PHY_CONTROL_REGS_IDLE_PAD_CONTROL_ctl_iddq_MASK |
708
				BCHP_DDR23_PHY_CONTROL_REGS_IDLE_PAD_CONTROL_rxenb_MASK |
709
				BCHP_DDR23_PHY_CONTROL_REGS_IDLE_PAD_CONTROL_cke_reb_MASK;
710
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_IDLE_PAD_CONTROL, regVal);
711
712
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_CLK_PM_CTRL, BCHP_DDR23_PHY_CONTROL_REGS_CLK_PM_CTRL_DIS_DDR_CLK_MASK);
713
714
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG);
715
	regVal |= BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG_PWRDN_MASK;
716
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG, regVal);
717
718
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_CLOCK_REG_CONTROL);
719
	regVal |= BCHP_DDR23_PHY_CONTROL_REGS_CLOCK_REG_CONTROL_pwrdn_MASK;
720
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_CLOCK_REG_CONTROL, regVal);
721
722
	/* Finally clock off the DRAM controller */
723
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_CLK_PM_CTRL);
724
	regVal |=	BCHP_CLK_PM_CTRL_DIS_DDR_108_CLK_MASK |	BCHP_CLK_PM_CTRL_DIS_DDR_216_CLK_MASK;
725
	hw->pfnWriteDevRegister(hw->adp, BCHP_CLK_PM_CTRL, regVal);
726
727
	/* udelay(20); */
728
729
	/*printk("RT Power Down Flea Complete\n"); */
730
731
	/* Measure how much time we spend in idle */
732
	rdtscll(hw->TickStartInPD);
733
734
	return;
735
}
736
737
bool crystalhd_flea_detect_fw_alive(struct crystalhd_hw *hw)
738
{
739
	uint32_t pollCnt		= 0;
740
	uint32_t hbCnt			= 0;
741
	uint32_t heartBeatReg1	= 0;
742
	uint32_t heartBeatReg2	= 0;
743
	bool	 bRetVal		= false;
744
745
	heartBeatReg1 = hw->pfnReadDevRegister(hw->adp, HEART_BEAT_REGISTER);
746
	while(1)
747
	{
748
		heartBeatReg2 = hw->pfnReadDevRegister(hw->adp, HEART_BEAT_REGISTER);
749
		if(heartBeatReg1 != heartBeatReg2) {
750
			hbCnt++;
751
			heartBeatReg1 = heartBeatReg2;
752
		}
753
754
		if(hbCnt >= HEART_BEAT_POLL_CNT) {
755
			bRetVal = true;
756
			break;
757
		}
758
759
		pollCnt++;
760
		if(pollCnt >= FLEA_MAX_POLL_CNT) {
761
			bRetVal = false;
762
			break;
763
		}
764
765
		msleep_interruptible(1);
766
	}
767
768
	return bRetVal;
769
}
770
771
void crystalhd_flea_handle_PicQSts_intr(struct crystalhd_hw *hw)
772
{
773
	uint32_t	newChBitmap=0;
774
775
	newChBitmap = hw->pfnReadDevRegister(hw->adp, RX_DMA_PIC_QSTS_MBOX);
776
777
	hw->PicQSts = newChBitmap;
778
779
	/* -- For link we were enabling the capture on format change
780
	   -- For Flea, we will get a PicQSts interrupt where we will
781
	   -- enable the capture. */
782
783
	if(hw->RxCaptureState != 1)
784
	{
785
		hw->RxCaptureState = 1;
786
	}
787
}
788
789
void crystalhd_flea_update_tx_buff_info(struct crystalhd_hw *hw)
790
{
791
	TX_INPUT_BUFFER_INFO	TxBuffInfo;
792
	uint32_t ReadSzInDWords=0;
793
794
	ReadSzInDWords = (sizeof(TxBuffInfo) - sizeof(TxBuffInfo.Reserved))/4;
795
	hw->pfnDevDRAMRead(hw, hw->TxBuffInfoAddr, ReadSzInDWords, (uint32_t*)&TxBuffInfo);
796
797
	if(TxBuffInfo.DramBuffAdd % 4)
798
	{
799
		printk("Tx Err:: DWORD UNAligned Tx Addr. Not Updating\n");
800
		return;
801
	}
802
803
	hw->TxFwInputBuffInfo.DramBuffAdd			= TxBuffInfo.DramBuffAdd;
804
	hw->TxFwInputBuffInfo.DramBuffSzInBytes		= TxBuffInfo.DramBuffSzInBytes;
805
	hw->TxFwInputBuffInfo.Flags					= TxBuffInfo.Flags;
806
	hw->TxFwInputBuffInfo.HostXferSzInBytes		= TxBuffInfo.HostXferSzInBytes;
807
	hw->TxFwInputBuffInfo.SeqNum				= TxBuffInfo.SeqNum;
808
809
	return;
810
}
811
812
/* was HWFleaNotifyFllChange */
813
void crystalhd_flea_notify_fll_change(struct crystalhd_hw *hw, bool bCleanupContext)
814
{
815
	unsigned long flags = 0;
816
	uint32_t freeListLen = 0;
817
	/*
818
	* When we are doing the cleanup we should update DRAM only if the
819
	* firmware is running. So Detect the heart beat.
820
	*/
821
	if(bCleanupContext && (!crystalhd_flea_detect_fw_alive(hw)))
822
		return;
823
824
	spin_lock_irqsave(&hw->lock, flags);
825
	freeListLen = crystalhd_dioq_count(hw->rx_freeq);
826
	hw->pfnDevDRAMWrite(hw, hw->FleaFLLUpdateAddr, 1, &freeListLen);
827
	spin_unlock_irqrestore(&hw->lock, flags);
828
829
	return;
830
}
831
832
833
static
834
void crystalhd_flea_init_power_state(struct crystalhd_hw *hw)
835
{
836
	hw->FleaEnablePWM = false;	/* enable by default */
837
	hw->FleaPowerState = FLEA_PS_NONE;
838
}
839
840
static
841
bool crystalhd_flea_set_power_state(struct crystalhd_hw *hw,
842
					enum FLEA_POWER_STATES	NewState)
843
{
844
	bool StChangeSuccess=false;
845
	uint32_t tempFLL = 0;
846
	uint32_t freeListLen = 0;
847
	BC_STATUS sts;
848
	struct crystalhd_rx_dma_pkt *rx_pkt = NULL;
849
850
	freeListLen = crystalhd_dioq_count(hw->rx_freeq);
851
852
	switch(NewState)
853
	{
854
		case FLEA_PS_ACTIVE:
855
		{
856
			/*Transition to Active State*/
857
			if(hw->FleaPowerState == FLEA_PS_LP_PENDING)
858
			{
859
				StChangeSuccess = true;
860
				hw->FleaPowerState = FLEA_PS_ACTIVE;
861
				/* Write the correct FLL to FW */
862
				hw->pfnDevDRAMWrite(hw,
863
									hw->FleaFLLUpdateAddr,
864
									1,
865
									&freeListLen);
866
				/* We need to check to post here because we may never get a context to post otherwise */
867
				if(hw->PicQSts != 0)
868
				{
869
					rx_pkt = crystalhd_dioq_fetch(hw->rx_freeq);
870
					if (rx_pkt)
871
						sts = hw->pfnPostRxSideBuff(hw, rx_pkt);
872
				}
873
				/*printk(" Success\n"); */
874
875
			}else if(hw->FleaPowerState == FLEA_PS_LP_COMPLETE){
876
				crystalhd_flea_runtime_power_up(hw);
877
				StChangeSuccess = true;
878
				hw->FleaPowerState = FLEA_PS_ACTIVE;
879
				/* Write the correct FLL to FW */
880
				hw->pfnDevDRAMWrite(hw,
881
										hw->FleaFLLUpdateAddr,
882
										1,
883
										&freeListLen);
884
				/* Now check if we missed processing PiQ and TXFIFO interrupts when we were in power down */
885
				if (hw->PwrDwnPiQIntr)
886
				{
887
					crystalhd_flea_handle_PicQSts_intr(hw);
888
					hw->PwrDwnPiQIntr = false;
889
				}
890
				/* We need to check to post here because we may never get a context to post otherwise */
891
				if(hw->PicQSts != 0)
892
				{
893
					rx_pkt = crystalhd_dioq_fetch(hw->rx_freeq);
894
					if (rx_pkt)
895
						sts = hw->pfnPostRxSideBuff(hw, rx_pkt);
896
				}
897
				if (hw->PwrDwnTxIntr)
898
				{
899
					crystalhd_flea_update_tx_buff_info(hw);
900
					hw->PwrDwnTxIntr = false;
901
				}
902
903
			}
904
			break;
905
		}
906
907
		case FLEA_PS_LP_PENDING:
908
		{
909
			if(hw->FleaPowerState != FLEA_PS_ACTIVE)
910
			{
911
				break;
912
			}
913
914
			/*printk(" Success\n"); */
915
916
			StChangeSuccess = true;
917
			/* Write 0 FLL to FW to prevent it from sending PQ*/
918
			hw->pfnDevDRAMWrite(hw,
919
									hw->FleaFLLUpdateAddr,
920
									1,
921
									&tempFLL);
922
			hw->FleaPowerState = FLEA_PS_LP_PENDING;
923
			break;
924
		}
925
926
		case FLEA_PS_LP_COMPLETE:
927
		{
928
			if( (hw->FleaPowerState == FLEA_PS_ACTIVE) ||
929
			    (hw->FleaPowerState == FLEA_PS_LP_PENDING)) {
930
				/* Write 0 FLL to FW to prevent it from sending PQ*/
931
				hw->pfnDevDRAMWrite(hw,
932
									hw->FleaFLLUpdateAddr,
933
									1,
934
									&tempFLL);
935
				crystalhd_flea_runtime_power_dn(hw);
936
				StChangeSuccess = true;
937
				hw->FleaPowerState = FLEA_PS_LP_COMPLETE;
938
939
			}
940
			break;
941
		}
942
		default:
943
			break;
944
	}
945
946
	return StChangeSuccess;
947
}
948
949
/*
950
* Look At Different States and List Status and decide on
951
* Next Logical State To Be In.
952
*/
953
static
954
void crystalhd_flea_set_next_power_state(struct crystalhd_hw *hw,
955
						enum FLEA_STATE_CH_EVENT		PowerEvt)
956
{
957
	enum FLEA_POWER_STATES NextPS;
958
	NextPS = hw->FleaPowerState;
959
960
	if( hw->FleaEnablePWM == false )
961
	{
962
		hw->FleaPowerState = FLEA_PS_ACTIVE;
963
		return;
964
	}
965
966
/*	printk("Trying Power State Transition from %x Because Of Event:%d \n", */
967
/*			hw->FleaPowerState, */
968
/*			PowerEvt); */
969
970
	if(PowerEvt == FLEA_EVT_STOP_DEVICE)
971
	{
972
		hw->FleaPowerState = FLEA_PS_STOPPED;
973
		return;
974
	}
975
976
	if(PowerEvt == FLEA_EVT_START_DEVICE)
977
	{
978
		hw->FleaPowerState = FLEA_PS_ACTIVE;
979
		return;
980
	}
981
982
	switch(hw->FleaPowerState)
983
	{
984
		case FLEA_PS_ACTIVE:
985
		{
986
			if(PowerEvt == FLEA_EVT_FLL_CHANGE)
987
			{
988
				/*Ready List Was Decremented. */
989
				/*printk("1:TxL0Sts:%x TxL1Sts:%x EmptyCnt:%x RxL0Sts:%x RxL1Sts:%x FwCmdCnt:%x\n", */
990
				/*	hw->TxList0Sts, */
991
				/*	hw->TxList1Sts, */
992
				/*	hw->EmptyCnt, */
993
				/*	hw->rx_list_sts[0], */
994
				/*	hw->rx_list_sts[1], */
995
				/*	hw->FwCmdCnt); */
996
997
				if( (hw->TxList0Sts == ListStsFree)	&&
998
					(hw->TxList1Sts == ListStsFree) &&
999
					(!hw->EmptyCnt) && /*We have Not Indicated Any Empty Fifo to Application*/
1000
					(!hw->SingleThreadAppFIFOEmpty) && /*for single threaded apps*/
1001
					(!(hw->rx_list_sts[0] && rx_waiting_y_intr)) &&
1002
					(!(hw->rx_list_sts[1] && rx_waiting_y_intr)) &&
1003
					(!hw->FwCmdCnt))
1004
				{
1005
					NextPS = FLEA_PS_LP_COMPLETE;
1006
				}else{
1007
					NextPS = FLEA_PS_LP_PENDING;
1008
				}
1009
			}
1010
1011
			break;
1012
		}
1013
1014
		case FLEA_PS_LP_PENDING:
1015
		{
1016
			if( (PowerEvt == FLEA_EVT_FW_CMD_POST) ||
1017
				(PowerEvt == FLEA_EVT_FLL_CHANGE))
1018
			{
1019
				NextPS = FLEA_PS_ACTIVE;
1020
			}else if(PowerEvt == FLEA_EVT_CMD_COMP){
1021
1022
				/*printk("2:TxL0Sts:%x TxL1Sts:%x EmptyCnt:%x STAppFIFOEmpty:%x RxL0Sts:%x RxL1Sts:%x FwCmdCnt:%x\n", */
1023
				/*	hw->TxList0Sts, */
1024
				/*	hw->TxList1Sts, */
1025
				/*	hw->EmptyCnt, */
1026
				/*	hw->SingleThreadAppFIFOEmpty, */
1027
				/*	hw->rx_list_sts[0], */
1028
				/*	hw->rx_list_sts[1], */
1029
				/*	hw->FwCmdCnt); */
1030
1031
				if( (hw->TxList0Sts == ListStsFree)	&&
1032
					(hw->TxList1Sts == ListStsFree) &&
1033
					(!hw->EmptyCnt) &&	/*We have Not Indicated Any Empty Fifo to Application*/
1034
					(!hw->SingleThreadAppFIFOEmpty) && /*for single threaded apps*/
1035
					(!(hw->rx_list_sts[0] && rx_waiting_y_intr)) &&
1036
					(!(hw->rx_list_sts[1] && rx_waiting_y_intr)) &&
1037
					(!hw->FwCmdCnt))
1038
				{
1039
					NextPS = FLEA_PS_LP_COMPLETE;
1040
				}
1041
			}
1042
			break;
1043
		}
1044
		case FLEA_PS_LP_COMPLETE:
1045
		{
1046
			if( (PowerEvt == FLEA_EVT_FLL_CHANGE) ||
1047
				(PowerEvt == FLEA_EVT_FW_CMD_POST))
1048
			{
1049
				NextPS = FLEA_PS_ACTIVE;
1050
			}
1051
1052
			break;
1053
		}
1054
		default:
1055
		{
1056
			printk("Invalid Flea Power State %x\n",
1057
				hw->FleaPowerState);
1058
1059
			break;
1060
		}
1061
	}
1062
1063
	if(hw->FleaPowerState != NextPS)
1064
	{
1065
		printk("%s:State Transition [FromSt:%x ToSt:%x] Because Of Event:%d \n",
1066
			__FUNCTION__,
1067
			hw->FleaPowerState,
1068
			NextPS,
1069
			PowerEvt);
1070
1071
		crystalhd_flea_set_power_state(hw,NextPS);
1072
	}
1073
1074
	return;
1075
}
1076
1077
/* was FleaSetRxPicFireAddr */
1078
#if 0
1079
static
1080
void crystalhd_flea_set_rx_pic_fire_addr(struct crystalhd_hw *hw, uint32_t BorshContents)
1081
{
1082
	hw->FleaRxPicDelAddr = BorshContents + 1 + HOST_TO_FW_PIC_DEL_INFO_ADDR;
1083
	hw->FleaFLLUpdateAddr = BorshContents + 1 + HOST_TO_FW_FLL_ADDR;
1084
1085
	return;
1086
}
1087
#endif
1088
1089
void crystalhd_flea_init_temperature_measure (struct crystalhd_hw *hw, bool bTurnOn)
1090
{
1091
	hw->TemperatureRegVal=0;
1092
1093
	if(bTurnOn) {
1094
		hw->pfnWriteDevRegister(hw->adp, BCHP_CLK_TEMP_MON_CTRL, 0x3);
1095
		hw->pfnWriteDevRegister(hw->adp, BCHP_CLK_TEMP_MON_CTRL, 0x203);
1096
	} else {
1097
		hw->pfnWriteDevRegister(hw->adp, BCHP_CLK_TEMP_MON_CTRL, 0x103);
1098
	}
1099
1100
	return;
1101
}
1102
1103
/* was HwFleaUpdateTempInfo */
1104
void crystalhd_flea_update_temperature(struct crystalhd_hw *hw)
1105
{
1106
	uint32_t	regVal = 0;
1107
1108
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_CLK_TEMP_MON_STATUS);
1109
	hw->TemperatureRegVal = regVal;
1110
1111
	return;
1112
}
1113
1114
/**
1115
* crystalhd_flea_download_fw - Write data to DRAM area.
1116
* @adp: Adapter instance
1117
* @pBuffer: Buffer pointer for the FW data.
1118
* @buffSz: data size in bytes.
1119
*
1120
* Return:
1121
*	Status.
1122
*
1123
* Flea firmware download routine.
1124
*/
1125
BC_STATUS crystalhd_flea_download_fw(struct crystalhd_hw *hw, uint8_t *pBuffer, uint32_t buffSz)
1126
{
1127
	uint32_t pollCnt=0,regVal=0;
1128
	uint32_t borchStachAddr=0;
1129
	uint32_t *pCmacSig=NULL,cmacOffset=0,i=0;
1130
	/*uint32_t BuffSz = (BuffSzInDWords * 4); */
1131
	/*uint32_t HBCnt=0; */
1132
1133
	bool bRetVal = true;
1134
	bool bSecure = true; // Default production cards. Can be false only for internal Broadcom dev cards
1135
1136
	dev_dbg(&hw->adp->pdev->dev, "[%s]: Sz:%d\n", __func__, buffSz);
1137
1138
/*
1139
 *-- Step 1. Enable the SRCUBBING and DRAM SCRAMBLING
1140
 *-- Step 2. Poll for SCRAM_KEY_DONE_INT.
1141
 *-- Step 3. Write the BORCH and STARCH addresses.
1142
 *-- Step 4. Write the firmware to DRAM.
1143
 *-- Step 5. Write the CMAC to SCRUB->CMAC registers.
1144
 *-- Step 6. Write the ARM run bit to 1.
1145
 *-- Step 7. Poll for BOOT verification done interrupt.
1146
 */
1147
1148
	/* First validate that we got data in the FW buffer */
1149
	if (buffSz == 0)
1150
		return BC_STS_ERROR;
1151
1152
/*-- Step 1. Enable the SRCUBBING and DRAM SCRAMBLING. */
1153
/*   Can we set both the bits at the same time?? Security Arch Doc describes the steps */
1154
/*   and the first step is to enable scrubbing and then scrambling. */
1155
1156
	if(bSecure)
1157
	{
1158
		dev_dbg(&hw->adp->pdev->dev,"[crystalhd_flea_download_fw]: step 1. Enable scrubbing\n");
1159
1160
		/* Enable Scrubbing */
1161
		regVal = hw->pfnReadDevRegister(hw->adp, BCHP_SCRUB_CTRL_SCRUB_ENABLE);
1162
		regVal |= SCRUB_ENABLE_BIT;
1163
		hw->pfnWriteDevRegister(hw->adp, BCHP_SCRUB_CTRL_SCRUB_ENABLE, regVal);
1164
1165
		/* Enable Scrambling */
1166
		regVal |= DRAM_SCRAM_ENABLE_BIT;
1167
		hw->pfnWriteDevRegister(hw->adp, BCHP_SCRUB_CTRL_SCRUB_ENABLE, regVal);
1168
1169
1170
		//-- Step 2. Poll for SCRAM_KEY_DONE_INT.
1171
		dev_dbg(&hw->adp->pdev->dev,"[crystalhd_flea_download_fw]: step 2. Poll for SCRAM_KEY_DONE_INT\n");
1172
1173
		pollCnt=0;
1174
		while(pollCnt < FLEA_MAX_POLL_CNT)
1175
		{
1176
			regVal = hw->pfnReadDevRegister(hw->adp, BCHP_WRAP_MISC_INTR2_PCI_STATUS);
1177
1178
			if(regVal & SCRAM_KEY_DONE_INT_BIT)
1179
				break;
1180
1181
			pollCnt++;
1182
			msleep_interruptible(1); /*1 Milli Sec delay*/
1183
		}
1184
1185
		/* -- Will Assert when we do not see SCRAM_KEY_DONE_INTERRUPT */
1186
		if(!(regVal & SCRAM_KEY_DONE_INT_BIT))
1187
		{
1188
			dev_err(&hw->adp->pdev->dev,"[crystalhd_flea_download_fw]: step 2. Did not get scram key done interrupt.\n");
1189
			return BC_STS_ERROR;
1190
		}
1191
	}
1192
1193
	/*Clear the interrupts by writing the register value back*/
1194
	regVal &= 0x00FFFFFF; /*Mask off the reserved bits.[24-31] */
1195
	hw->pfnWriteDevRegister(hw->adp, BCHP_WRAP_MISC_INTR2_PCI_CLEAR, regVal);
1196
1197
/*-- Step 3. Write the BORCH and STARCH addresses. */
1198
	borchStachAddr = GetScrubEndAddr(buffSz);
1199
	if(!bSecure)
1200
		borchStachAddr = (buffSz - 1) & BCHP_SCRUB_CTRL_BORCH_END_ADDRESS_BORCH_END_ADDR_MASK;
1201
1202
	hw->pfnWriteDevRegister(hw->adp, BCHP_SCRUB_CTRL_BORCH_END_ADDRESS, borchStachAddr);
1203
	hw->pfnWriteDevRegister(hw->adp, BCHP_SCRUB_CTRL_STARCH_END_ADDRESS, borchStachAddr);
1204
1205
	/*
1206
	 *	Now the command address is
1207
	 *	relative to firmware file size.
1208
	 */
1209
	/*FWIFSetFleaCmdAddr(pHWExt->pFwExt, */
1210
	/*		borchStachAddr+1+DDRADDR_4_FWCMDS); */
1211
1212
	hw->fwcmdPostAddr = borchStachAddr+1+DDRADDR_4_FWCMDS;
1213
	hw->fwcmdPostMbox = FW_CMD_POST_MBOX;
1214
	hw->fwcmdRespMbox = FW_CMD_RES_MBOX;
1215
	/*FleaSetRxPicFireAddr(pHWExt,borchStachAddr); */
1216
	hw->FleaRxPicDelAddr = borchStachAddr + 1 + HOST_TO_FW_PIC_DEL_INFO_ADDR;
1217
	hw->FleaFLLUpdateAddr = borchStachAddr + 1 + HOST_TO_FW_FLL_ADDR;
1218
1219
	dev_dbg(&hw->adp->pdev->dev,"[crystalhd_flea_download_fw]: step 3. Write the BORCH and STARCH addresses. %x:%x, %x:%x\n",
1220
			BCHP_SCRUB_CTRL_BORCH_END_ADDRESS,
1221
			borchStachAddr,
1222
			BCHP_SCRUB_CTRL_STARCH_END_ADDRESS,
1223
			borchStachAddr );
1224
1225
/*-- Step 4. Write the firmware to DRAM. [Without the Signature, 32-bit access to DRAM] */
1226
1227
	dev_dbg(&hw->adp->pdev->dev,"[crystalhd_flea_download_fw]: step 4. Write the firmware to DRAM. Sz:%d Bytes\n",
1228
			buffSz - FLEA_FW_SIG_LEN_IN_BYTES - LENGTH_FIELD_SIZE);
1229
1230
	if(bSecure)
1231
		hw->pfnDevDRAMWrite(hw, FW_DOWNLOAD_START_ADDR, (buffSz - FLEA_FW_SIG_LEN_IN_BYTES - LENGTH_FIELD_SIZE)/4, (uint32_t *)pBuffer);
1232
	else
1233
		hw->pfnDevDRAMWrite(hw, FW_DOWNLOAD_START_ADDR, buffSz/4, (uint32_t*)pBuffer);
1234
1235
/* -- Step 5. Write the signature to CMAC register. */
1236
/*
1237
-- This is what we need to write to CMAC registers.
1238
==================================================================================
1239
Register							Offset				Boot Image CMAC
1240
														Value
1241
==================================================================================
1242
BCHP_SCRUB_CTRL_BI_CMAC_31_0		0x000f600c			CMAC Bits[31:0]
1243
BCHP_SCRUB_CTRL_BI_CMAC_63_32		0x000f6010			CMAC Bits[63:32]
1244
BCHP_SCRUB_CTRL_BI_CMAC_95_64		0x000f6014			CMAC Bits[95:64]
1245
BCHP_SCRUB_CTRL_BI_CMAC_127_96		0x000f6018			CMAC Bits[127:96]
1246
==================================================================================
1247
*/
1248
1249
	if(bSecure)
1250
	{
1251
		dev_dbg(&hw->adp->pdev->dev,"[crystalhd_flea_download_fw]: step 5. Write the signature to CMAC register.\n");
1252
		cmacOffset = buffSz - FLEA_FW_SIG_LEN_IN_BYTES;
1253
		pCmacSig = (uint32_t *) &pBuffer[cmacOffset];
1254
1255
		for(i=0;i < FLEA_FW_SIG_LEN_IN_DWORD;i++)
1256
		{
1257
			uint32_t offSet = (BCHP_SCRUB_CTRL_BI_CMAC_127_96 - (i * 4));
1258
1259
			hw->pfnWriteDevRegister(hw->adp, offSet, cpu_to_be32(*pCmacSig));
1260
1261
			pCmacSig++;
1262
		}
1263
	}
1264
1265
/*-- Step 6. Write the ARM run bit to 1. */
1266
/*   We need a write back because we do not want to change other bits */
1267
	dev_dbg(&hw->adp->pdev->dev,"[crystalhd_flea_download_fw]: step 6. Write the ARM run bit to 1.\n");
1268
1269
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_ARMCR4_BRIDGE_REG_BRIDGE_CTL);
1270
	regVal |= ARM_RUN_REQ_BIT;
1271
	hw->pfnWriteDevRegister(hw->adp, BCHP_ARMCR4_BRIDGE_REG_BRIDGE_CTL, regVal);
1272
1273
	if(bSecure)
1274
	{
1275
		/* -- Step 7. Poll for Boot Verification done/failure interrupt.*/
1276
		dev_dbg(&hw->adp->pdev->dev,"[crystalhd_flea_download_fw]: step 7. Poll for Boot Verification done/failure interrupt.\n");
1277
		pollCnt=0;
1278
		while(1)
1279
		{
1280
			regVal = hw->pfnReadDevRegister(hw->adp, BCHP_WRAP_MISC_INTR2_PCI_STATUS);
1281
1282
			if(regVal & BOOT_VER_FAIL_BIT )
1283
			{
1284
				dev_err(&hw->adp->pdev->dev,"[crystalhd_flea_download_fw]: step 7. Error bit occured. RetVal:%x\n", regVal);
1285
1286
				bRetVal = false;
1287
				break;
1288
			}
1289
1290
			if(regVal & BOOT_VER_DONE_BIT)
1291
			{
1292
				dev_dbg(&hw->adp->pdev->dev,"[crystalhd_flea_download_fw]: step 7. Done  RetVal:%x\n", regVal);
1293
1294
				bRetVal = true; /*This is the only place we return TRUE from*/
1295
				break;
1296
			}
1297
1298
			pollCnt++;
1299
			if( pollCnt >= FLEA_MAX_POLL_CNT )
1300
			{
1301
				dev_err(&hw->adp->pdev->dev,"[crystalhd_flea_download_fw]: step 7. Both done and failure bits are not set.\n");
1302
				bRetVal = false;
1303
				break;
1304
			}
1305
1306
			msleep_interruptible(5); /*5 Milli Sec delay*/
1307
		}
1308
1309
		if( !bRetVal )
1310
		{
1311
			dev_info(&hw->adp->pdev->dev,"[crystalhd_flea_download_fw]: step 7. Firmware image signature failure.\n");
1312
			return BC_STS_ERROR;
1313
		}
1314
1315
		/*Clear the interrupts by writing the register value back*/
1316
		regVal &= 0x00FFFFFF; //Mask off the reserved bits.[24-31]
1317
		hw->pfnWriteDevRegister(hw->adp, BCHP_WRAP_MISC_INTR2_PCI_CLEAR, regVal);
1318
1319
		msleep_interruptible(10); /*10 Milli Sec delay*/
1320
	}
1321
	else
1322
		bRetVal = true;
1323
1324
	/*
1325
	   -- It was seen on Dell390 systems that the firmware command was fired before the
1326
	   -- firmware was actually ready to accept the firmware commands. The driver did
1327
	   -- not recieve a response for the firmware commands and this was causing the DIL to timeout
1328
	   -- ,reclaim the resources and crash. The following code looks for the heartbeat and
1329
	   -- to make sure that we return from this function only when we get the heart beat making sure
1330
	   -- that the firmware is running.
1331
	   */
1332
1333
	bRetVal = crystalhd_flea_detect_fw_alive(hw);
1334
	if( !bRetVal )
1335
	{
1336
		dev_info(&hw->adp->pdev->dev,"[crystalhd_flea_download_fw]: step 8. Detect firmware heart beat failed.\n");
1337
		return BC_STS_ERROR;
1338
	}
1339
1340
	dev_dbg(&hw->adp->pdev->dev, "[%s]: Complete.\n", __func__);
1341
	return BC_STS_SUCCESS;
1342
}
1343
1344
bool crystalhd_flea_start_device(struct crystalhd_hw *hw)
1345
{
1346
	uint32_t	regVal	= 0;
1347
	bool		bRetVal = false;
1348
1349
	/*
1350
	-- Issue Core reset to bring in the default values in place
1351
	*/
1352
	crystalhd_flea_core_reset(hw);
1353
1354
	/*
1355
	-- If the gisb arbitar register is not set to some other value
1356
	-- and the firmware crashes, we see a NMI since the hardware did
1357
	-- not respond to a register read at all. The PCI-E trace confirms the problem.
1358
	-- Right now we are setting the register values to 0x7e00 and will check later
1359
	-- what should be the correct value to program.
1360
	*/
1361
	hw->pfnWriteDevRegister(hw->adp, BCHP_SUN_GISB_ARB_TIMER, 0xd80);
1362
1363
	/*
1364
	-- Disable all interrupts
1365
	*/
1366
	crystalhd_flea_clear_interrupts(hw);
1367
	crystalhd_flea_disable_interrupts(hw);
1368
1369
	/*
1370
	-- Enable the option for getting the done count in
1371
	-- Rx DMA engine.
1372
	*/
1373
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_MISC1_DMA_DEBUG_OPTIONS_REG);
1374
	regVal |= 0x10;
1375
	hw->pfnWriteDevRegister(hw->adp, BCHP_MISC1_DMA_DEBUG_OPTIONS_REG, regVal);
1376
1377
	/*
1378
	-- Enable the TX DMA Engine once on startup.
1379
	-- This is a new bit added.
1380
	*/
1381
	hw->pfnWriteDevRegister(hw->adp, BCHP_MISC1_TX_DMA_CTRL, 0x01);
1382
1383
	/*
1384
	-- Enable the RX3 DMA Engine once on startup.
1385
	-- This is a new bit added.
1386
	*/
1387
	hw->pfnWriteDevRegister(hw->adp, BCHP_MISC1_HIF_DMA_CTRL, 0x01);
1388
1389
	/*
1390
	-- Set the Run bit for RX-Y and RX-UV DMA engines.
1391
	*/
1392
	hw->pfnWriteDevRegister(hw->adp, BCHP_MISC1_Y_RX_SW_DESC_LIST_CTRL_STS, 0x01);
1393
1394
	/*
1395
	-- Make sure Early L1 is disabled - NAREN - This will not prevent the device from entering L1 under active mode
1396
	*/
1397
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_MISC_PERST_CLOCK_CTRL);
1398
	regVal &= ~BCHP_MISC_PERST_CLOCK_CTRL_EARLY_L1_EXIT_MASK;
1399
	hw->pfnWriteDevRegister(hw->adp, BCHP_MISC_PERST_CLOCK_CTRL, regVal);
1400
1401
	crystalhd_flea_init_dram(hw);
1402
1403
	msleep_interruptible(5);
1404
1405
	/* Enable the Single Shot Transaction on PCI by disabling the */
1406
	/* bit 29 of transaction configuration register */
1407
1408
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_PCIE_TL_TRANSACTION_CONFIGURATION);
1409
	regVal &= (~(BC_BIT(29)));
1410
	hw->pfnWriteDevRegister(hw->adp, BCHP_PCIE_TL_TRANSACTION_CONFIGURATION, regVal);
1411
1412
	crystalhd_flea_init_temperature_measure(hw,true);
1413
1414
	crystalhd_flea_init_power_state(hw);
1415
	crystalhd_flea_set_next_power_state(hw, FLEA_EVT_START_DEVICE);
1416
1417
	/*
1418
	-- Enable all interrupts
1419
	*/
1420
	crystalhd_flea_clear_interrupts(hw);
1421
	crystalhd_flea_enable_interrupts(hw);
1422
1423
	/*
1424
	-- This is the only time we set this pointer for Flea.
1425
	-- Since there is no stop the pointer is not reset anytime....
1426
	-- except for fatal errors.
1427
	*/
1428
	hw->rx_list_post_index = 0;
1429
	hw->RxCaptureState = 0;
1430
1431
	msleep_interruptible(1);
1432
1433
	return bRetVal;
1434
}
1435
1436
1437
bool crystalhd_flea_stop_device(struct crystalhd_hw *hw)
1438
{
1439
	uint32_t regVal=0, pollCnt=0;
1440
1441
	/*
1442
	-- Issue the core reset so that we
1443
	-- make sure there is nothing running.
1444
	*/
1445
	crystalhd_flea_core_reset(hw);
1446
1447
	crystalhd_flea_init_temperature_measure(hw, false);
1448
1449
	/*
1450
	-- If the gisb arbitrater register is not set to some other value
1451
	-- and the firmware crashes, we see a NMI since the hardware did
1452
	-- not respond to a register read at all. The PCI-E trace confirms the problem.
1453
	-- Right now we are setting the register values to 0x7e00 and will check later
1454
	-- what should be the correct value to program.
1455
	*/
1456
	hw->pfnWriteDevRegister(hw->adp, BCHP_SUN_GISB_ARB_TIMER, 0xd80);
1457
1458
	/*
1459
	-- Disable the TX DMA Engine once on shutdown.
1460
	-- This is a new bit added.
1461
	*/
1462
	hw->pfnWriteDevRegister(hw->adp, BCHP_MISC1_TX_DMA_CTRL, 0x0);
1463
1464
	/*
1465
	-- Disable the RX3 DMA Engine once on Stop.
1466
	-- This is a new bit added.
1467
	*/
1468
	hw->pfnWriteDevRegister(hw->adp, BCHP_MISC1_HIF_DMA_CTRL, 0x0);
1469
1470
	/*
1471
	-- Clear the RunStop Bit For RX DMA Control
1472
	*/
1473
	hw->pfnWriteDevRegister(hw->adp, BCHP_MISC1_Y_RX_SW_DESC_LIST_CTRL_STS, 0x0);
1474
1475
	hw->pfnWriteDevRegister(hw->adp, BCHP_PRI_ARB_CONTROL_REGS_REFRESH_CTL_0, 0x0);
1476
1477
	/* * Wait for MEMC to become idle */
1478
	pollCnt=0;
1479
	while (1)
1480
	{
1481
		regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_CTL_STATUS);
1482
1483
		if(regVal & BCHP_DDR23_CTL_REGS_0_CTL_STATUS_idle_MASK)
1484
			break;
1485
1486
		pollCnt++;
1487
		if(pollCnt >= 100)
1488
			break;
1489
1490
		msleep_interruptible(1);
1491
	}
1492
1493
	/*First Disable the AVD and ARM before disabling the DRAM*/
1494
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_CLK_PM_CTRL);
1495
1496
	regVal = BCHP_CLK_PM_CTRL_DIS_ARM_CLK_MASK |
1497
			 BCHP_CLK_PM_CTRL_DIS_AVD_CLK_MASK |
1498
			 BCHP_CLK_PM_CTRL_DIS_AVD_108_CLK_MASK |
1499
			 BCHP_CLK_PM_CTRL_DIS_AVD_216_CLK_MASK;
1500
1501
	hw->pfnWriteDevRegister(hw->adp, BCHP_CLK_PM_CTRL, regVal);
1502
1503
	/*
1504
	-- Disable the interrupt after disabling the ARM and AVD.
1505
	-- We should be able to access the registers because we still
1506
	-- have not disabled the clock for blink block. We disable the
1507
	-- blick 108 abd 216 clock at the end of this function.
1508
	*/
1509
	crystalhd_flea_clear_interrupts(hw);
1510
	crystalhd_flea_disable_interrupts(hw);
1511
1512
	/*Now try disabling the DRAM.*/
1513
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_PARAMS2);
1514
1515
	regVal |= BCHP_DDR23_CTL_REGS_0_PARAMS2_clke_MASK;
1516
1517
	/* * disable CKE */
1518
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_PARAMS2, regVal);
1519
1520
	/* * issue refresh command */
1521
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_REFRESH_CMD, 0x60);
1522
1523
	pollCnt=0;
1524
	while(1)
1525
	{
1526
		regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_CTL_REGS_0_CTL_STATUS);
1527
1528
		if(!(regVal & BCHP_DDR23_CTL_REGS_0_CTL_STATUS_clke_MASK))
1529
			break;
1530
1531
		pollCnt++;
1532
		if(pollCnt >= 100)
1533
			break;
1534
1535
		msleep_interruptible(1);
1536
	}
1537
1538
	/* * Enable DDR clock, DM and READ_ENABLE pads power down and force into the power down */
1539
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL,
1540
							BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL_idle_MASK |
1541
							BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL_dm_iddq_MASK |
1542
							BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL_dq_iddq_MASK |
1543
							BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL_read_enb_iddq_MASK |
1544
							BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL_dqs_iddq_MASK |
1545
							BCHP_DDR23_PHY_BYTE_LANE_0_IDLE_PAD_CONTROL_clk_iddq_MASK);
1546
1547
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL,
1548
							BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL_idle_MASK |
1549
							BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL_dm_iddq_MASK |
1550
							BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL_dq_iddq_MASK |
1551
							BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL_read_enb_iddq_MASK |
1552
							BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL_dqs_iddq_MASK |
1553
							BCHP_DDR23_PHY_BYTE_LANE_1_IDLE_PAD_CONTROL_clk_iddq_MASK);
1554
1555
	/* * Power down BL LDO cells */
1556
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_0_CLOCK_REG_CONTROL,
1557
							BCHP_DDR23_PHY_BYTE_LANE_0_CLOCK_REG_CONTROL_pwrdn_MASK);
1558
1559
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_BYTE_LANE_1_CLOCK_REG_CONTROL,
1560
							BCHP_DDR23_PHY_BYTE_LANE_1_CLOCK_REG_CONTROL_pwrdn_MASK);
1561
1562
	/* * Enable DDR control signal pad power down and force into the power down */
1563
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_IDLE_PAD_CONTROL,
1564
							BCHP_DDR23_PHY_CONTROL_REGS_IDLE_PAD_CONTROL_idle_MASK |
1565
							BCHP_DDR23_PHY_CONTROL_REGS_IDLE_PAD_CONTROL_ctl_iddq_MASK);
1566
1567
	/* * Disable ddr phy clock */
1568
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_CLK_PM_CTRL,
1569
							BCHP_DDR23_PHY_CONTROL_REGS_CLK_PM_CTRL_DIS_DDR_CLK_MASK);
1570
1571
	/* * Disable PLL output */
1572
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG);
1573
1574
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG,
1575
							regVal & ~BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG_ENB_CLKOUT_MASK);
1576
1577
	/* * Power down addr_ctl LDO cells */
1578
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_CLOCK_REG_CONTROL,
1579
							BCHP_DDR23_PHY_CONTROL_REGS_CLOCK_REG_CONTROL_pwrdn_MASK);
1580
1581
	/* * Power down the PLL */
1582
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG);
1583
1584
	hw->pfnWriteDevRegister(hw->adp, BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG,
1585
							regVal | BCHP_DDR23_PHY_CONTROL_REGS_PLL_CONFIG_PWRDN_MASK);
1586
1587
	/* shut down the PLL1 */
1588
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_CLK_PLL1_CTRL);
1589
1590
	hw->pfnWriteDevRegister(hw->adp, BCHP_CLK_PLL1_CTRL,
1591
							regVal | BCHP_CLK_PLL1_CTRL_POWERDOWN_MASK);
1592
1593
	hw->pfnWriteDevRegister(hw->adp, BCHP_CLK_PLL0_ARM_DIV,	0xff);
1594
1595
	regVal = hw->pfnReadDevRegister(hw->adp, BCHP_CLK_PM_CTRL);
1596
1597
	regVal |= BCHP_CLK_PM_CTRL_DIS_SUN_27_LOW_PWR_MASK |
1598
			  BCHP_CLK_PM_CTRL_DIS_SUN_108_LOW_PWR_MASK |
1599
			  BCHP_CLK_PM_CTRL_DIS_MISC_OTP_9_CLK_MASK |
1600
			  BCHP_CLK_PM_CTRL_DIS_ARM_CLK_MASK |
1601
			  BCHP_CLK_PM_CTRL_DIS_AVD_CLK_MASK |
1602
			  BCHP_CLK_PM_CTRL_DIS_AVD_108_CLK_MASK |
1603
			  BCHP_CLK_PM_CTRL_DIS_BLINK_108_CLK_MASK |
1604
			  BCHP_CLK_PM_CTRL_DIS_MISC_108_CLK_MASK |
1605
			  BCHP_CLK_PM_CTRL_DIS_BLINK_216_CLK_MASK |
1606
			  BCHP_CLK_PM_CTRL_DIS_DDR_108_CLK_MASK |
1607
			  BCHP_CLK_PM_CTRL_DIS_DDR_216_CLK_MASK |
1608
			  BCHP_CLK_PM_CTRL_DIS_AVD_216_CLK_MASK |
1609
			  BCHP_CLK_PM_CTRL_DIS_MISC_216_CLK_MASK |
1610
			  BCHP_CLK_PM_CTRL_DIS_SUN_216_CLK_MASK;
1611
1612
	hw->pfnWriteDevRegister(hw->adp, BCHP_CLK_PM_CTRL, regVal);
1613
1614
	crystalhd_flea_set_next_power_state(hw, FLEA_EVT_STOP_DEVICE);
1615
	return true;
1616
}
1617
1618
bool
1619
crystalhd_flea_wake_up_hw(struct crystalhd_hw *hw)
1620
{
1621
	if(hw->FleaPowerState != FLEA_PS_ACTIVE)
1622
	{
1623
		crystalhd_flea_set_next_power_state(hw,	FLEA_EVT_FLL_CHANGE);
1624
	}
1625
1626
	/* Now notify HW of the number of entries in the Free List */
1627
	/* This starts up the channel bitmap delivery */
1628
	crystalhd_flea_notify_fll_change(hw, false);
1629
1630
	hw->WakeUpDecodeDone = true;
1631
1632
	return true;
1633
}
1634
1635
bool crystalhd_flea_check_input_full(struct crystalhd_hw *hw, uint32_t needed_sz, uint32_t *empty_sz, bool b_188_byte_pkts, uint8_t *flags)
1636
{
1637
	uint32_t				regVal=0;
1638
	TX_INPUT_BUFFER_INFO	*pTxBuffInfo;
1639
	uint32_t				FlagsAddr=0;
1640
1641
	*empty_sz = 0;
1642
/*	*DramAddrOut=0; */
1643
1644
1645
	/* Add condition here to wake up the HW in case some application is trying to do TX before starting RX - like FP */
1646
	/* To prevent deadlocks. We are called here from Synchronized context so we can safely call this directly */
1647
1648
	if(hw->WakeUpDecodeDone != true)
1649
	{
1650
		/* Only wake up the HW if we are either being called from a single threaded app - like FP */
1651
		/* or if we are not checking for the input buffer size as just a test */
1652
		if(*flags == 0)
1653
			crystalhd_flea_wake_up_hw(hw);
1654
		else {
1655
			*empty_sz = 2 * 1024 * 1024; /* FW Buffer size */
1656
			/**DramAddrOut=0; */
1657
			*flags=0;
1658
			return false;
1659
		}
1660
	}
1661
1662
	/* if we have told the app that we have buffer empty then we cannot go to low power */
1663
	if((hw->FleaPowerState != FLEA_PS_ACTIVE) && !hw->SingleThreadAppFIFOEmpty)
1664
	{
1665
		/**TxBuffSzOut=0; */
1666
		/**DramAddrOut=0; */
1667
		*empty_sz = 0;
1668
		*flags=0;
1669
		/*printk("PD can't Tx\n"); */
1670
		return true; /*Indicate FULL*/
1671
	}
1672
1673
1674
	if(hw->TxFwInputBuffInfo.Flags & DFW_FLAGS_TX_ABORT)
1675
	{
1676
		*empty_sz=0;
1677
		/**DramAddrOut=0; */
1678
		*flags |= DFW_FLAGS_TX_ABORT;
1679
		return true;
1680
	}
1681
1682
	if( (hw->TxFwInputBuffInfo.DramBuffSzInBytes < needed_sz)
1683
		||(!hw->TxFwInputBuffInfo.DramBuffAdd))
1684
	{
1685
		*empty_sz=0;
1686
		/**DramAddrOut=0; */
1687
		*flags=0;
1688
		return true; /*Indicate FULL*/
1689
	}
1690
1691
	if(hw->TxFwInputBuffInfo.DramBuffAdd % 4)
1692
	{
1693
		/*
1694
		-- Indicate Full if we get a non-dowrd aligned address.
1695
		-- This will avoid us posting the command to firmware and
1696
		-- The TX will timeout and we will close the application properly.
1697
		-- This avoids a illegal operation as far as the TX is concerned.
1698
		*/
1699
		printk("TxSDRAM-Destination Address Not DWORD Aligned:%x\n",hw->TxFwInputBuffInfo.DramBuffAdd);
1700
		return true;
1701
	}
1702
1703
	/*
1704
	-- We got everything correctly from the firmware and hence we should be
1705
	-- able to do the DMA. Indicate what app wants to hear.
1706
	-- Firmware SAYS: I AM HUNGRY, GIVE ME FOOD. :)
1707
	*/
1708
	*empty_sz=hw->TxFwInputBuffInfo.DramBuffSzInBytes;
1709
	/**dramAddrOut=pHWExt->TxFwInputBuffInfo.DramBuffAdd; */
1710
/*	printk("empty size is %d\n", *empty_sz); */
1711
1712
	/* If we are just checking stats and are not actually going to DMA, don't increment */
1713
	/* But we have to account for single threaded apps */
1714
	if((*flags & 0x08) == 0x08)
1715
	{
1716
		/* This is a synchronized function */
1717
		/* NAREN - In single threaded mode, if we have less than a defined size of buffer */
1718
		/* ask the firmware to wrap around. To prevent deadlocks. */
1719
		if(hw->TxFwInputBuffInfo.DramBuffSzInBytes < TX_WRAP_THRESHOLD)
1720
		{
1721
			pTxBuffInfo = (TX_INPUT_BUFFER_INFO *) (0);
1722
			FlagsAddr = hw->TxBuffInfoAddr + ((uintptr_t) (&pTxBuffInfo->Flags));
1723
			/* Read Modify the Flags to ask the FW to WRAP */
1724
			hw->pfnDevDRAMRead(hw,FlagsAddr,1,&regVal);
1725
			regVal |= DFW_FLAGS_WRAP;
1726
			hw->pfnDevDRAMWrite(hw,FlagsAddr,1,&regVal);
1727
1728
			/* Indicate Busy to the application because we have to get new buffers from FW */
1729
			*empty_sz=0;
1730
			/* *DramAddrOut=0; */
1731
			*flags=0;
1732
			/* Wait for the next interrupt from the HW */
1733
			hw->TxFwInputBuffInfo.DramBuffSzInBytes = 0;
1734
			hw->TxFwInputBuffInfo.DramBuffAdd = 0;
1735
			return true;
1736
		}
1737
		else
1738
			hw->SingleThreadAppFIFOEmpty = true;
1739
	}
1740
	else if((*flags & 0x04) != 0x04)
1741
		hw->EmptyCnt++;		/*OS_INTERLOCK_INCREMENT(&pHWExt->EmptyCnt); */
1742
1743
	/* Different from our Windows implementation */
1744
	/* set bit 7 of the flags field to indicate that we have to use the destination address for TX */
1745
	*flags |= BC_BIT(7);
1746
1747
	return false; /*Indicate Empty*/
1748
}
1749
1750
BC_STATUS crystalhd_flea_fw_cmd_post_proc(struct crystalhd_hw *hw, BC_FW_CMD *fw_cmd)
1751
{
1752
	BC_STATUS sts = BC_STS_SUCCESS;
1753
	struct DecRspChannelStartVideo *st_rsp = NULL;
1754
	struct C011_TS_CMD				*pGenRsp = NULL;
1755
	struct DecRspChannelChannelOpen *pRsp  = NULL;
1756
1757
	pGenRsp = (struct C011_TS_CMD *) fw_cmd->rsp;
1758
1759
	switch (fw_cmd->cmd[0]) {
1760
		case eCMD_C011_DEC_CHAN_STREAM_OPEN:
1761
			hw->channelNum = pGenRsp->ulParams[2];
1762
1763
			dev_dbg(&hw->adp->pdev->dev, "Snooped Stream Open Cmd For ChNo:%x\n", hw->channelNum);
1764
			break;
1765
		case eCMD_C011_DEC_CHAN_OPEN:
1766
			pRsp = (struct DecRspChannelChannelOpen *)pGenRsp;
1767
			hw->channelNum = pRsp->ChannelID;
1768
1769
			/* used in Flea to update the Tx Buffer stats */
1770
			hw->TxBuffInfoAddr = pRsp->transportStreamCaptureAddr;
1771
			hw->TxFwInputBuffInfo.DramBuffAdd=0;
1772
			hw->TxFwInputBuffInfo.DramBuffSzInBytes=0;
1773
			hw->TxFwInputBuffInfo.Flags=0;
1774
			hw->TxFwInputBuffInfo.HostXferSzInBytes=0;
1775
			hw->TxFwInputBuffInfo.SeqNum=0;
1776
1777
			/* NAREN Init power management states here when we start the channel */
1778
			hw->PwrDwnTxIntr = false;
1779
			hw->PwrDwnPiQIntr = false;
1780
			hw->EmptyCnt = 0;
1781
			hw->SingleThreadAppFIFOEmpty = false;
1782
1783
			dev_dbg(&hw->adp->pdev->dev, "Snooped ChOpen Cmd For ChNo:%x TxBuffAddr:%x\n",
1784
					hw->channelNum,
1785
					hw->TxBuffInfoAddr);
1786
			break;
1787
		case eCMD_C011_DEC_CHAN_START_VIDEO:
1788
			st_rsp = (struct DecRspChannelStartVideo *)fw_cmd->rsp;
1789
			hw->pib_del_Q_addr = st_rsp->picInfoDeliveryQ;
1790
			hw->pib_rel_Q_addr = st_rsp->picInfoReleaseQ;
1791
1792
			dev_dbg(&hw->adp->pdev->dev, "Snooping CHAN_START_VIDEO command to get the Addr of Del/Rel Queue\n");
1793
			dev_dbg(&hw->adp->pdev->dev, "DelQAddr:%x RelQAddr:%x\n",
1794
					hw->pib_del_Q_addr, hw->pib_rel_Q_addr);
1795
			break;
1796
		default:
1797
			break;
1798
	}
1799
	return sts;
1800
}
1801
1802
BC_STATUS crystalhd_flea_do_fw_cmd(struct crystalhd_hw *hw, BC_FW_CMD *fw_cmd)
1803
{
1804
	struct device *dev;
1805
	uint32_t cnt = 0, cmd_res_addr;
1806
	uint32_t *cmd_buff, *res_buff;
1807
	wait_queue_head_t fw_cmd_event;
1808
	int rc = 0;
1809
	BC_STATUS sts;
1810
	unsigned long flags;
1811
1812
	crystalhd_create_event(&fw_cmd_event);
1813
1814
	if (!hw || !fw_cmd) {
1815
		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
1816
		return BC_STS_INV_ARG;
1817
	}
1818
1819
	dev = &hw->adp->pdev->dev;
1820
1821
	dev_dbg(dev, "%s entered\n", __func__);
1822
1823
	cmd_buff = fw_cmd->cmd;
1824
	res_buff = fw_cmd->rsp;
1825
1826
	if (!cmd_buff || !res_buff) {
1827
		dev_err(dev, "Invalid Parameters for F/W Command\n");
1828
		return BC_STS_INV_ARG;
1829
	}
1830
1831
	hw->fwcmd_evt_sts = 0;
1832
	hw->pfw_cmd_event = &fw_cmd_event;
1833
	hw->FwCmdCnt++;
1834
1835
	if(hw->FleaPowerState != FLEA_PS_ACTIVE)
1836
	{
1837
		crystalhd_flea_set_next_power_state(hw,	FLEA_EVT_FW_CMD_POST);
1838
	}
1839
1840
	spin_lock_irqsave(&hw->lock, flags);
1841
1842
	/*Write the command to the memory*/
1843
	hw->pfnDevDRAMWrite(hw, hw->fwcmdPostAddr, FW_CMD_BUFF_SZ, cmd_buff);
1844
1845
	/*Memory Read for memory arbitrator flush*/
1846
	hw->pfnDevDRAMRead(hw, hw->fwcmdPostAddr, 1, &cnt);
1847
1848
	/* Write the command address to mailbox */
1849
	hw->pfnWriteDevRegister(hw->adp, hw->fwcmdPostMbox, hw->fwcmdPostAddr);
1850
1851
	spin_unlock_irqrestore(&hw->lock, flags);
1852
1853
	msleep_interruptible(50);
1854
1855
	/* FW commands should complete even if we got a signal from the upper layer */
1856
	crystalhd_wait_on_event(&fw_cmd_event, hw->fwcmd_evt_sts,
1857
							20000, rc, true);
1858
1859
	if (!rc) {
1860
		sts = BC_STS_SUCCESS;
1861
	} else if (rc == -EBUSY) {
1862
		dev_err(dev, "Firmware command T/O\n");
1863
		sts = BC_STS_TIMEOUT;
1864
	} else if (rc == -EINTR) {
1865
		dev_info(dev, "FwCmd Wait Signal - Can Never Happen\n");
1866
		sts = BC_STS_IO_USER_ABORT;
1867
	} else {
1868
		dev_err(dev, "FwCmd IO Error.\n");
1869
		sts = BC_STS_IO_ERROR;
1870
	}
1871
1872
	if (sts != BC_STS_SUCCESS) {
1873
		dev_err(dev, "FwCmd Failed.\n");
1874
		return sts;
1875
	}
1876
1877
	spin_lock_irqsave(&hw->lock, flags);
1878
1879
	/*Get the Responce Address*/
1880
	cmd_res_addr = hw->pfnReadDevRegister(hw->adp, hw->fwcmdRespMbox);
1881
1882
	/*Read the Response*/
1883
	hw->pfnDevDRAMRead(hw, cmd_res_addr, FW_CMD_BUFF_SZ, res_buff);
1884
1885
	spin_unlock_irqrestore(&hw->lock, flags);
1886
1887
	if (res_buff[2] != 0) {
1888
		dev_err(dev, "res_buff[2] != C011_RET_SUCCESS\n");
1889
		return BC_STS_FW_CMD_ERR;
1890
	}
1891
1892
	sts = crystalhd_flea_fw_cmd_post_proc(hw, fw_cmd);
1893
	if (sts != BC_STS_SUCCESS)
1894
		dev_err(dev, "crystalhd_fw_cmd_post_proc Failed.\n");
1895
1896
	return sts;
1897
1898
}
1899
1900
void crystalhd_flea_get_dnsz(struct crystalhd_hw *hw, uint32_t list_index, uint32_t *y_dw_dnsz, uint32_t *uv_dw_dnsz)
1901
{
1902
	uint32_t y_dn_sz_reg, uv_dn_sz_reg;
1903
1904
	if (!list_index) {
1905
		y_dn_sz_reg  = BCHP_MISC1_Y_RX_LIST0_CUR_BYTE_CNT;
1906
		uv_dn_sz_reg = BCHP_MISC1_HIF_RX_LIST0_CUR_BYTE_CNT;
1907
	} else {
1908
		y_dn_sz_reg  = BCHP_MISC1_Y_RX_LIST1_CUR_BYTE_CNT;
1909
		uv_dn_sz_reg = BCHP_MISC1_HIF_RX_LIST1_CUR_BYTE_CNT;
1910
	}
1911
1912
	*y_dw_dnsz  = hw->pfnReadFPGARegister(hw->adp, y_dn_sz_reg);
1913
	*uv_dw_dnsz = hw->pfnReadFPGARegister(hw->adp, uv_dn_sz_reg);
1914
1915
	return ;
1916
}
1917
1918
BC_STATUS crystalhd_flea_hw_pause(struct crystalhd_hw *hw, bool state)
1919
{
1920
	/*printk("%s: Set flea to power down.\n", __func__); */
1921
	crystalhd_flea_set_next_power_state(hw,	FLEA_EVT_FLL_CHANGE);
1922
	return BC_STS_SUCCESS;
1923
}
1924
1925
bool crystalhd_flea_peek_next_decoded_frame(struct crystalhd_hw *hw, uint64_t *meta_payload, uint32_t *picNumFlags, uint32_t PicWidth)
1926
{
1927
	unsigned long flags = 0;
1928
	struct crystalhd_dioq *ioq;
1929
	struct crystalhd_elem *tmp;
1930
	struct crystalhd_rx_dma_pkt *rpkt;
1931
1932
	*meta_payload = 0;
1933
1934
	ioq = hw->rx_rdyq;
1935
	spin_lock_irqsave(&ioq->lock, flags);
1936
1937
	if ((ioq->count > 0) && (ioq->head != (struct crystalhd_elem *)&ioq->head)) {
1938
		tmp = ioq->head;
1939
		spin_unlock_irqrestore(&ioq->lock, flags);
1940
		rpkt = (struct crystalhd_rx_dma_pkt *)tmp->data;
1941
		if (rpkt) {
1942
			flea_GetPictureInfo(hw, rpkt, picNumFlags, meta_payload);
1943
			/*printk("%s: flea_GetPictureInfo Pic#:%d\n", __func__, PicNumber); */
1944
		}
1945
		return true;
1946
	}
1947
	spin_unlock_irqrestore(&ioq->lock, flags);
1948
1949
	return false;
1950
1951
}
1952
1953
void crystalhd_flea_clear_rx_errs_intrs(struct crystalhd_hw *hw)
1954
/*
1955
-- Clears all the errors and interrupt on RX DMA engine.
1956
*/
1957
{
1958
	uint32_t ulRegVal;
1959
	union FLEA_INTR_BITS_COMMON	IntrToClear,IntrSts;
1960
1961
	IntrToClear.WholeReg = 0;
1962
	IntrSts.WholeReg = 0;
1963
1964
	IntrSts.WholeReg = hw->pfnReadDevRegister(hw->adp, BCHP_INTR_INTR_STATUS);
1965
	if(IntrSts.WholeReg)
1966
	{
1967
		ulRegVal = hw->pfnReadDevRegister(hw->adp, BCHP_MISC1_Y_RX_ERROR_STATUS);
1968
		hw->pfnWriteDevRegister(hw->adp, BCHP_MISC1_Y_RX_ERROR_STATUS, ulRegVal);
1969
		ulRegVal = hw->pfnReadDevRegister(hw->adp, BCHP_MISC1_HIF_RX_ERROR_STATUS);
1970
		hw->pfnWriteDevRegister(hw->adp, BCHP_MISC1_HIF_RX_ERROR_STATUS, ulRegVal);
1971
1972
		IntrToClear.L0UVRxDMADone	=	IntrSts.L0UVRxDMADone;
1973
		IntrToClear.L0UVRxDMAErr	=	IntrSts.L0UVRxDMAErr;
1974
		IntrToClear.L0YRxDMADone	=	IntrSts.L0YRxDMADone;
1975
		IntrToClear.L0YRxDMAErr		=	IntrSts.L0YRxDMAErr;
1976
		IntrToClear.L1UVRxDMADone	=	IntrSts.L1UVRxDMADone;
1977
		IntrToClear.L1UVRxDMAErr	=	IntrSts.L1UVRxDMAErr;
1978
		IntrToClear.L1YRxDMADone	=	IntrSts.L1YRxDMADone;
1979
		IntrToClear.L1YRxDMAErr		=	IntrSts.L1YRxDMAErr;
1980
1981
		hw->pfnWriteDevRegister(hw->adp, BCHP_INTR_INTR_CLR_REG, IntrToClear.WholeReg);
1982
1983
		hw->pfnWriteDevRegister(hw->adp, BCHP_INTR_EOI_CTRL, 1);
1984
	}
1985
	return;
1986
}
1987
1988
1989
void crystalhd_flea_stop_rx_dma_engine(struct crystalhd_hw *hw)
1990
{
1991
	union FLEA_INTR_BITS_COMMON	IntrStsValue;
1992
	bool failedL0 = true, failedL1 = true;
1993
	uint32_t pollCnt = 0;
1994
1995
	hw->RxCaptureState = 2;
1996
1997
	if((hw->rx_list_sts[0] == sts_free) && (hw->rx_list_sts[1] == sts_free)) {
1998
		hw->RxCaptureState = 0;
1999
		hw->RxSeqNum = 0;
2000
		return; /* Nothing to be done */
2001
	}
2002
2003
	if(hw->rx_list_sts[0] == sts_free)
2004
		failedL0 = false;
2005
	if(hw->rx_list_sts[1] == sts_free)
2006
		failedL1 = false;
2007
2008
	while(1)
2009
	{
2010
		IntrStsValue.WholeReg = hw->pfnReadDevRegister(hw->adp, BCHP_INTR_INTR_STATUS);
2011
2012
		if(hw->rx_list_sts[0] != sts_free) {
2013
			if( (IntrStsValue.L0YRxDMADone)  || (IntrStsValue.L0YRxDMAErr) ||
2014
				(IntrStsValue.L0UVRxDMADone) || (IntrStsValue.L0UVRxDMAErr) )
2015
			{
2016
				failedL0 = false;
2017
			}
2018
		}
2019
		else
2020
			failedL0 = false;
2021
2022
		if(hw->rx_list_sts[1] != sts_free) {
2023
			if( (IntrStsValue.L1YRxDMADone)  || (IntrStsValue.L1YRxDMAErr) ||
2024
				(IntrStsValue.L1UVRxDMADone) || (IntrStsValue.L1UVRxDMAErr) )
2025
			{
2026
				failedL1 = false;
2027
			}
2028
		}
2029
		else
2030
			failedL1 = false;
2031
2032
		msleep_interruptible(10);
2033
2034
		if(pollCnt >= MAX_VALID_POLL_CNT)
2035
			break;
2036
2037
		if((failedL0 == false) && (failedL1 == false))
2038
			break;
2039
2040
		pollCnt++;
2041
	}
2042
2043
	if(failedL0 || failedL1)
2044
		printk("Failed to stop RX DMA\n");
2045
2046
	hw->RxCaptureState = 0;
2047
	hw->RxSeqNum = 0;
2048
2049
	crystalhd_flea_clear_rx_errs_intrs(hw);
2050
}
2051
2052
BC_STATUS crystalhd_flea_hw_fire_rxdma(struct crystalhd_hw *hw,
2053
									   struct crystalhd_rx_dma_pkt *rx_pkt)
2054
{
2055
	struct device *dev;
2056
	addr_64 desc_addr;
2057
	unsigned long flags;
2058
	PIC_DELIVERY_HOST_INFO	PicDeliInfo;
2059
	uint32_t BuffSzInDwords;
2060
2061
	if (!hw || !rx_pkt) {
2062
		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
2063
		return BC_STS_INV_ARG;
2064
	}
2065
2066
	dev = &hw->adp->pdev->dev;
2067
2068
	if (hw->rx_list_post_index >= DMA_ENGINE_CNT) {
2069
		dev_err(dev, "List Out Of bounds %x\n", hw->rx_list_post_index);
2070
		return BC_STS_INV_ARG;
2071
	}
2072
2073
	if(hw->RxCaptureState != 1) {
2074
		dev_err(dev, "Capture not enabled\n");
2075
		return BC_STS_BUSY;
2076
	}
2077
2078
	spin_lock_irqsave(&hw->rx_lock, flags);
2079
	if (hw->rx_list_sts[hw->rx_list_post_index]) {
2080
		dev_dbg(dev, "HW list is busy\n");
2081
		spin_unlock_irqrestore(&hw->rx_lock, flags);
2082
		return BC_STS_BUSY;
2083
	}
2084
2085
	if (!TEST_BIT(hw->PicQSts, hw->channelNum)) {
2086
		/* NO pictures available for this channel */
2087
		dev_dbg(dev, "No Picture Available for DMA\n");
2088
		spin_unlock_irqrestore(&hw->rx_lock, flags);
2089
		return BC_STS_BUSY;
2090
	}
2091
2092
	CLEAR_BIT(hw->PicQSts, hw->channelNum);
2093
2094
	desc_addr.full_addr = rx_pkt->desc_mem.phy_addr;
2095
2096
	PicDeliInfo.ListIndex = hw->rx_list_post_index;
2097
	PicDeliInfo.RxSeqNumber = hw->RxSeqNum;
2098
	PicDeliInfo.HostDescMemLowAddr_Y = desc_addr.low_part;
2099
	PicDeliInfo.HostDescMemHighAddr_Y = desc_addr.high_part;
2100
2101
	if (rx_pkt->uv_phy_addr) {
2102
		/* Program the UV descriptor */
2103
		desc_addr.full_addr = rx_pkt->uv_phy_addr;
2104
		PicDeliInfo.HostDescMemLowAddr_UV = desc_addr.low_part;
2105
		PicDeliInfo.HostDescMemHighAddr_UV = desc_addr.high_part;
2106
	}
2107
2108
	rx_pkt->pkt_tag = hw->rx_pkt_tag_seed + hw->rx_list_post_index;
2109
	hw->rx_list_sts[hw->rx_list_post_index] |= rx_waiting_y_intr;
2110
	if (rx_pkt->uv_phy_addr)
2111
		hw->rx_list_sts[hw->rx_list_post_index] |= rx_waiting_uv_intr;
2112
	hw->rx_list_post_index = (hw->rx_list_post_index + 1) % DMA_ENGINE_CNT;
2113
2114
	spin_unlock_irqrestore(&hw->rx_lock, flags);
2115
2116
	crystalhd_dioq_add(hw->rx_actq, (void *)rx_pkt, false, rx_pkt->pkt_tag);
2117
2118
	BuffSzInDwords = (sizeof (PicDeliInfo) - sizeof(PicDeliInfo.Reserved))/4;
2119
2120
	/*
2121
	-- Write the parameters in DRAM.
2122
	*/
2123
	spin_lock_irqsave(&hw->lock, flags);
2124
	hw->pfnDevDRAMWrite(hw, hw->FleaRxPicDelAddr, BuffSzInDwords, (uint32_t*)&PicDeliInfo);
2125
	hw->pfnWriteDevRegister(hw->adp, RX_POST_MAILBOX, hw->channelNum);
2126
	spin_unlock_irqrestore(&hw->lock, flags);
2127
2128
	hw->RxSeqNum++;
2129
2130
	return BC_STS_SUCCESS;
2131
}
2132
2133
BC_STATUS crystalhd_flea_hw_post_cap_buff(struct crystalhd_hw *hw, struct crystalhd_rx_dma_pkt *rx_pkt)
2134
{
2135
	BC_STATUS sts = crystalhd_flea_hw_fire_rxdma(hw, rx_pkt);
2136
2137
	if (sts != BC_STS_SUCCESS)
2138
		crystalhd_dioq_add(hw->rx_freeq, (void *)rx_pkt, false, rx_pkt->pkt_tag);
2139
2140
	hw->pfnNotifyFLLChange(hw, false);
2141
2142
	return sts;
2143
}
2144
2145
void crystalhd_flea_start_tx_dma_engine(struct crystalhd_hw *hw, uint8_t list_id, addr_64 desc_addr)
2146
{
2147
	uint32_t dma_cntrl;
2148
	uint32_t first_desc_u_addr, first_desc_l_addr;
2149
	TX_INPUT_BUFFER_INFO	TxBuffInfo;
2150
	uint32_t WrAddr=0, WrSzInDWords=0;
2151
2152
	hw->EmptyCnt--;
2153
	hw->SingleThreadAppFIFOEmpty = false;
2154
2155
	/* For FLEA, first update the HW with the DMA parameters */
2156
	WrSzInDWords = (sizeof(TxBuffInfo.DramBuffAdd) +
2157
					sizeof(TxBuffInfo.DramBuffSzInBytes) +
2158
					sizeof(TxBuffInfo.HostXferSzInBytes))/4;
2159
2160
	/*Make the DramBuffSz as Zero skip first ULONG*/
2161
	WrAddr = hw->TxBuffInfoAddr;
2162
	hw->TxFwInputBuffInfo.DramBuffAdd = TxBuffInfo.DramBuffAdd = 0;
2163
	hw->TxFwInputBuffInfo.DramBuffSzInBytes =  TxBuffInfo.DramBuffSzInBytes = 0;
2164
	TxBuffInfo.HostXferSzInBytes = hw->TxFwInputBuffInfo.HostXferSzInBytes;
2165
2166
	hw->pfnDevDRAMWrite(hw,	WrAddr,	WrSzInDWords, (uint32_t *)&TxBuffInfo);
2167
2168
	if (list_id == 0) {
2169
		first_desc_u_addr = BCHP_MISC1_TX_FIRST_DESC_U_ADDR_LIST0;
2170
		first_desc_l_addr = BCHP_MISC1_TX_FIRST_DESC_L_ADDR_LIST0;
2171
	} else {
2172
		first_desc_u_addr = BCHP_MISC1_TX_FIRST_DESC_U_ADDR_LIST1;
2173
		first_desc_l_addr = BCHP_MISC1_TX_FIRST_DESC_L_ADDR_LIST1;
2174
	}
2175
2176
	dma_cntrl = hw->pfnReadFPGARegister(hw->adp, BCHP_MISC1_TX_SW_DESC_LIST_CTRL_STS);
2177
	if (!(dma_cntrl & BCHP_MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_MASK)) {
2178
		dma_cntrl |= BCHP_MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_MASK;
2179
		hw->pfnWriteFPGARegister(hw->adp, BCHP_MISC1_TX_SW_DESC_LIST_CTRL_STS,
2180
								 dma_cntrl);
2181
	}
2182
2183
	hw->pfnWriteFPGARegister(hw->adp, first_desc_u_addr, desc_addr.high_part);
2184
2185
	hw->pfnWriteFPGARegister(hw->adp, first_desc_l_addr, desc_addr.low_part | 0x01);
2186
	/* Be sure we set the valid bit ^^^^ */
2187
2188
	return;
2189
}
2190
2191
BC_STATUS crystalhd_flea_stop_tx_dma_engine(struct crystalhd_hw *hw)
2192
{
2193
	struct device *dev;
2194
	uint32_t dma_cntrl, cnt = 30;
2195
	uint32_t l1 = 1, l2 = 1;
2196
2197
	dma_cntrl = hw->pfnReadFPGARegister(hw->adp, BCHP_MISC1_TX_SW_DESC_LIST_CTRL_STS);
2198
2199
	dev = &hw->adp->pdev->dev;
2200
2201
	dev_dbg(dev, "Stopping TX DMA Engine..\n");
2202
2203
	if (!(dma_cntrl & BCHP_MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_MASK)) {
2204
		hw->TxList0Sts = ListStsFree;
2205
		hw->TxList1Sts = ListStsFree;
2206
		hw->tx_list_post_index = 0;
2207
2208
		dev_dbg(dev, "Already Stopped\n");
2209
		return BC_STS_SUCCESS;
2210
	}
2211
2212
	crystalhd_flea_disable_interrupts(hw);
2213
2214
	/* Issue stop to HW */
2215
	dma_cntrl &= ~BCHP_MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_MASK;
2216
	hw->pfnWriteFPGARegister(hw->adp, BCHP_MISC1_TX_SW_DESC_LIST_CTRL_STS, dma_cntrl);
2217
2218
	dev_dbg(dev, "Cleared the DMA Start bit\n");
2219
2220
	/* Poll for 3seconds (30 * 100ms) on both the lists..*/
2221
	while ((l1 || l2) && cnt) {
2222
2223
		if (l1) {
2224
			l1 = hw->pfnReadFPGARegister(hw->adp,
2225
										 BCHP_MISC1_TX_FIRST_DESC_L_ADDR_LIST0);
2226
			l1 &= BCHP_MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_MASK;
2227
		}
2228
2229
		if (l2) {
2230
			l2 = hw->pfnReadFPGARegister(hw->adp,
2231
										 BCHP_MISC1_TX_FIRST_DESC_L_ADDR_LIST1);
2232
			l2 &= BCHP_MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_MASK;
2233
		}
2234
2235
		msleep_interruptible(100);
2236
2237
		cnt--;
2238
	}
2239
2240
	if (!cnt) {
2241
		dev_err(dev, "Failed to stop TX DMA.. l1 %d, l2 %d\n", l1, l2);
2242
		crystalhd_flea_enable_interrupts(hw);
2243
		return BC_STS_ERROR;
2244
	}
2245
2246
	hw->TxList0Sts = ListStsFree;
2247
	hw->TxList1Sts = ListStsFree;
2248
2249
	hw->tx_list_post_index = 0;
2250
	dev_dbg(dev, "stopped TX DMA..\n");
2251
	crystalhd_flea_enable_interrupts(hw);
2252
2253
	return BC_STS_SUCCESS;
2254
}
2255
2256
static void crystalhd_flea_update_tx_done_to_fw(struct crystalhd_hw *hw)
2257
{
2258
	struct device *dev;
2259
	uint32_t				regVal		= 0;
2260
	uint32_t				seqNumAddr	= 0;
2261
	uint32_t				seqVal		= 0;
2262
	TX_INPUT_BUFFER_INFO	*pTxBuffInfo;
2263
2264
	dev = &hw->adp->pdev->dev;
2265
	/*
2266
	-- first update the sequence number and then update the
2267
	-- scratch.
2268
	*/
2269
	pTxBuffInfo = (TX_INPUT_BUFFER_INFO *) (0);
2270
	seqNumAddr = hw->TxBuffInfoAddr + ((uintptr_t) (&pTxBuffInfo->SeqNum));
2271
2272
	/*Read the seqnece number */
2273
	hw->pfnDevDRAMRead(hw, seqNumAddr, 1, &regVal);
2274
2275
	seqVal = regVal;
2276
	regVal++;
2277
2278
	/*Increment and Write back to same memory location. */
2279
	hw->pfnDevDRAMWrite(hw,	seqNumAddr, 1, &regVal);
2280
2281
	regVal = hw->pfnReadDevRegister(hw->adp, INDICATE_TX_DONE_REG);
2282
	regVal++;
2283
	hw->pfnWriteDevRegister(hw->adp, INDICATE_TX_DONE_REG, regVal);
2284
2285
	dev_dbg(dev, "TxUpdate[SeqNum DRAM Addr:%x] SeqNum:%x ScratchValue:%x\n",
2286
		seqNumAddr, seqVal, regVal);
2287
2288
	return;
2289
}
2290
2291
bool crystalhd_flea_tx_list0_handler(struct crystalhd_hw *hw, uint32_t err_sts)
2292
{
2293
	uint32_t err_mask, tmp;
2294
2295
	err_mask = MISC1_TX_DMA_ERROR_STATUS_TX_L0_DESC_TX_ABORT_ERRORS_MASK |
2296
	MISC1_TX_DMA_ERROR_STATUS_TX_L0_DMA_DATA_TX_ABORT_ERRORS_MASK |
2297
	MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_MASK;
2298
2299
	if (!(err_sts & err_mask))
2300
		return false;
2301
2302
	dev_err(&hw->adp->pdev->dev, "Error on Tx-L0 %x\n", err_sts);
2303
2304
	tmp = err_mask;
2305
2306
	if (err_sts & MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_MASK)
2307
		tmp &= ~MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_MASK;
2308
2309
	if (tmp) {
2310
		/* reset list index.*/
2311
		hw->tx_list_post_index = 0;
2312
	}
2313
2314
	tmp = err_sts & err_mask;
2315
	hw->pfnWriteDevRegister(hw->adp, BCHP_MISC1_TX_DMA_ERROR_STATUS, tmp);
2316
2317
	return true;
2318
}
2319
2320
bool crystalhd_flea_tx_list1_handler(struct crystalhd_hw *hw, uint32_t err_sts)
2321
{
2322
	uint32_t err_mask, tmp;
2323
2324
	err_mask = MISC1_TX_DMA_ERROR_STATUS_TX_L1_DESC_TX_ABORT_ERRORS_MASK |
2325
	MISC1_TX_DMA_ERROR_STATUS_TX_L1_DMA_DATA_TX_ABORT_ERRORS_MASK |
2326
	MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_MASK;
2327
2328
	if (!(err_sts & err_mask))
2329
		return false;
2330
2331
	dev_err(&hw->adp->pdev->dev, "Error on Tx-L1 %x\n", err_sts);
2332
2333
	tmp = err_mask;
2334
2335
	if (err_sts & MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_MASK)
2336
		tmp &= ~MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_MASK;
2337
2338
	if (tmp) {
2339
		/* reset list index.*/
2340
		hw->tx_list_post_index = 0;
2341
	}
2342
2343
	tmp = err_sts & err_mask;
2344
	hw->pfnWriteDevRegister(hw->adp, BCHP_MISC1_TX_DMA_ERROR_STATUS, tmp);
2345
2346
	return true;
2347
}
2348
2349
void crystalhd_flea_tx_isr(struct crystalhd_hw *hw, union FLEA_INTR_BITS_COMMON int_sts)
2350
{
2351
	uint32_t err_sts;
2352
2353
	if (int_sts.L0TxDMADone) {
2354
		hw->TxList0Sts &= ~TxListWaitingForIntr;
2355
		crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 0, BC_STS_SUCCESS);
2356
	}
2357
2358
	if (int_sts.L1TxDMADone) {
2359
		hw->TxList1Sts &= ~TxListWaitingForIntr;
2360
		crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 1, BC_STS_SUCCESS);
2361
	}
2362
2363
	if (!(int_sts.L0TxDMAErr || int_sts.L1TxDMAErr))
2364
		/* No error mask set.. */
2365
		return;
2366
2367
	/* Handle Tx errors. */
2368
	err_sts = hw->pfnReadDevRegister(hw->adp, BCHP_MISC1_TX_DMA_ERROR_STATUS);
2369
2370
	if (crystalhd_flea_tx_list0_handler(hw, err_sts))
2371
		crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 0, BC_STS_ERROR);
2372
2373
	if (crystalhd_flea_tx_list1_handler(hw, err_sts))
2374
		crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 1, BC_STS_ERROR);
2375
2376
	hw->stats.tx_errors++;
2377
}
2378
2379
bool crystalhd_flea_rx_list0_handler(struct crystalhd_hw *hw,
2380
									 union FLEA_INTR_BITS_COMMON int_sts,
2381
									 uint32_t y_err_sts,
2382
									 uint32_t uv_err_sts)
2383
{
2384
	uint32_t tmp;
2385
	enum list_sts tmp_lsts;
2386
2387
	if (!(y_err_sts & GET_Y0_ERR_MSK) && !(uv_err_sts & GET_UV0_ERR_MSK))
2388
		return false;
2389
2390
	tmp_lsts = hw->rx_list_sts[0];
2391
2392
	/* Y0 - DMA */
2393
	tmp = y_err_sts & GET_Y0_ERR_MSK;
2394
	if (int_sts.L0YRxDMADone)
2395
		hw->rx_list_sts[0] &= ~rx_waiting_y_intr;
2396
2397
	if (y_err_sts & MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK) {
2398
		hw->rx_list_sts[0] &= ~rx_waiting_y_intr;
2399
		tmp &= ~MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK;
2400
	}
2401
2402
	if (y_err_sts & MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK) {
2403
		/* Can never happen for Flea */
2404
		printk("FLEA fifo full - impossible\n");
2405
		hw->rx_list_sts[0] &= ~rx_y_mask;
2406
		hw->rx_list_sts[0] |= rx_y_error;
2407
		tmp &= ~MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK;
2408
	}
2409
2410
	if (tmp) {
2411
		hw->rx_list_sts[0] &= ~rx_y_mask;
2412
		hw->rx_list_sts[0] |= rx_y_error;
2413
		hw->rx_list_post_index = 0;
2414
	}
2415
2416
	/* UV0 - DMA */
2417
	tmp = uv_err_sts & GET_UV0_ERR_MSK;
2418
	if (int_sts.L0UVRxDMADone)
2419
		hw->rx_list_sts[0] &= ~rx_waiting_uv_intr;
2420
2421
	if (uv_err_sts & MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK) {
2422
		hw->rx_list_sts[0] &= ~rx_waiting_uv_intr;
2423
		tmp &= ~MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK;
2424
	}
2425
2426
	if (uv_err_sts & MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK) {
2427
		/* Can never happen for Flea */
2428
		printk("FLEA fifo full - impossible\n");
2429
		hw->rx_list_sts[0] &= ~rx_uv_mask;
2430
		hw->rx_list_sts[0] |= rx_uv_error;
2431
		tmp &= ~MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK;
2432
	}
2433
2434
	if (tmp) {
2435
		hw->rx_list_sts[0] &= ~rx_uv_mask;
2436
		hw->rx_list_sts[0] |= rx_uv_error;
2437
		hw->rx_list_post_index = 0;
2438
	}
2439
2440
	if (y_err_sts & GET_Y0_ERR_MSK) {
2441
		tmp = y_err_sts & GET_Y0_ERR_MSK;
2442
		hw->pfnWriteDevRegister(hw->adp, BCHP_MISC1_Y_RX_ERROR_STATUS, tmp);
2443
	}
2444
2445
	if (uv_err_sts & GET_UV0_ERR_MSK) {
2446
		tmp = uv_err_sts & GET_UV0_ERR_MSK;
2447
		hw->pfnWriteDevRegister(hw->adp, BCHP_MISC1_HIF_RX_ERROR_STATUS, tmp);
2448
	}
2449
2450
	return (tmp_lsts != hw->rx_list_sts[0]);
2451
}
2452
2453
bool crystalhd_flea_rx_list1_handler(struct crystalhd_hw *hw,
2454
									 union FLEA_INTR_BITS_COMMON int_sts,
2455
									 uint32_t y_err_sts,
2456
									 uint32_t uv_err_sts)
2457
{
2458
	uint32_t tmp;
2459
	enum list_sts tmp_lsts;
2460
2461
	if (!(y_err_sts & GET_Y1_ERR_MSK) && !(uv_err_sts & GET_UV1_ERR_MSK))
2462
		return false;
2463
2464
	tmp_lsts = hw->rx_list_sts[1];
2465
2466
	/* Y1 - DMA */
2467
	tmp = y_err_sts & GET_Y1_ERR_MSK;
2468
	if (int_sts.L1YRxDMADone)
2469
		hw->rx_list_sts[1] &= ~rx_waiting_y_intr;
2470
2471
	if (y_err_sts & MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK) {
2472
		hw->rx_list_sts[1] &= ~rx_waiting_y_intr;
2473
		tmp &= ~MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK;
2474
	}
2475
2476
	if (y_err_sts & MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK) {
2477
		/* Can never happen for Flea */
2478
		printk("FLEA fifo full - impossible\n");
2479
		hw->rx_list_sts[1] &= ~rx_y_mask;
2480
		hw->rx_list_sts[1] |= rx_y_error;
2481
		tmp &= ~MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK;
2482
	}
2483
2484
	if (tmp) {
2485
		hw->rx_list_sts[1] &= ~rx_y_mask;
2486
		hw->rx_list_sts[1] |= rx_y_error;
2487
		hw->rx_list_post_index = 0;
2488
	}
2489
2490
	/* UV1 - DMA */
2491
	tmp = uv_err_sts & GET_UV1_ERR_MSK;
2492
	if (int_sts.L1UVRxDMADone)
2493
		hw->rx_list_sts[1] &= ~rx_waiting_uv_intr;
2494
2495
	if (uv_err_sts & MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK) {
2496
		hw->rx_list_sts[1] &= ~rx_waiting_uv_intr;
2497
		tmp &= ~MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK;
2498
	}
2499
2500
	if (uv_err_sts & MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK) {
2501
		/* Can never happen for Flea */
2502
		printk("FLEA fifo full - impossible\n");
2503
		hw->rx_list_sts[1] &= ~rx_uv_mask;
2504
		hw->rx_list_sts[1] |= rx_uv_error;
2505
		tmp &= ~MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK;
2506
	}
2507
2508
	if (tmp) {
2509
		hw->rx_list_sts[1] &= ~rx_uv_mask;
2510
		hw->rx_list_sts[1] |= rx_uv_error;
2511
		hw->rx_list_post_index = 0;
2512
	}
2513
2514
	if (y_err_sts & GET_Y1_ERR_MSK) {
2515
		tmp = y_err_sts & GET_Y1_ERR_MSK;
2516
		hw->pfnWriteDevRegister(hw->adp, BCHP_MISC1_Y_RX_ERROR_STATUS, tmp);
2517
	}
2518
2519
	if (uv_err_sts & GET_UV1_ERR_MSK) {
2520
		tmp = uv_err_sts & GET_UV1_ERR_MSK;
2521
		hw->pfnWriteDevRegister(hw->adp, BCHP_MISC1_HIF_RX_ERROR_STATUS, tmp);
2522
	}
2523
2524
	return (tmp_lsts != hw->rx_list_sts[1]);
2525
}
2526
2527
void crystalhd_flea_rx_isr(struct crystalhd_hw *hw, union FLEA_INTR_BITS_COMMON intr_sts)
2528
{
2529
	unsigned long flags;
2530
	uint32_t i, list_avail = 0;
2531
	BC_STATUS comp_sts = BC_STS_NO_DATA;
2532
	uint32_t y_err_sts, uv_err_sts, y_dn_sz = 0, uv_dn_sz = 0;
2533
	bool ret = 0;
2534
2535
	if (!hw) {
2536
		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
2537
		return;
2538
	}
2539
2540
	if (!(intr_sts.L0YRxDMADone || intr_sts.L1YRxDMADone || intr_sts.L0UVRxDMADone || intr_sts.L1UVRxDMADone ||
2541
		intr_sts.L0YRxDMAErr || intr_sts.L1YRxDMAErr || intr_sts.L0UVRxDMAErr || intr_sts.L1UVRxDMAErr))
2542
		return;
2543
2544
	spin_lock_irqsave(&hw->rx_lock, flags);
2545
2546
	y_err_sts = hw->pfnReadDevRegister(hw->adp, BCHP_MISC1_Y_RX_ERROR_STATUS);
2547
	uv_err_sts = hw->pfnReadDevRegister(hw->adp, BCHP_MISC1_HIF_RX_ERROR_STATUS);
2548
2549
	for (i = 0; i < DMA_ENGINE_CNT; i++) {
2550
		/* Update States..*/
2551
		if (i == 0)
2552
			ret = crystalhd_flea_rx_list0_handler(hw, intr_sts, y_err_sts, uv_err_sts);
2553
		else
2554
			ret = crystalhd_flea_rx_list1_handler(hw, intr_sts, y_err_sts, uv_err_sts);
2555
		if (ret) {
2556
			switch (hw->rx_list_sts[i]) {
2557
				case sts_free:
2558
					comp_sts = BC_STS_SUCCESS;
2559
					list_avail = 1;
2560
					hw->stats.rx_success++;
2561
					break;
2562
				case rx_y_error:
2563
				case rx_uv_error:
2564
				case rx_sts_error:
2565
					/* We got error on both or Y or uv. */
2566
					hw->stats.rx_errors++;
2567
					hw->pfnHWGetDoneSize(hw, i, &y_dn_sz, &uv_dn_sz);
2568
					dev_info(&hw->adp->pdev->dev, "list_index:%x "
2569
					"rx[%d] rxtot[%d] Y:%x UV:%x Int:%x YDnSz:%x "
2570
					"UVDnSz:%x\n", i, hw->stats.rx_errors,
2571
							 hw->stats.rx_errors + hw->stats.rx_success,
2572
							 y_err_sts, uv_err_sts, intr_sts.WholeReg,
2573
							 y_dn_sz, uv_dn_sz);
2574
							 hw->rx_list_sts[i] = sts_free;
2575
							 comp_sts = BC_STS_ERROR;
2576
							 break;
2577
				default:
2578
					/* Wait for completion..*/
2579
					comp_sts = BC_STS_NO_DATA;
2580
					break;
2581
			}
2582
		}
2583
		/* handle completion...*/
2584
		if (comp_sts != BC_STS_NO_DATA) {
2585
			crystalhd_rx_pkt_done(hw, i, comp_sts);
2586
			comp_sts = BC_STS_NO_DATA;
2587
		}
2588
	}
2589
2590
	spin_unlock_irqrestore(&hw->rx_lock, flags);
2591
2592
	if (list_avail)
2593
		crystalhd_hw_start_capture(hw);
2594
}
2595
2596
bool crystalhd_flea_hw_interrupt_handle(struct crystalhd_adp *adp, struct crystalhd_hw *hw)
2597
{
2598
	union FLEA_INTR_BITS_COMMON	IntrStsValue;
2599
	bool				bIntFound		= false;
2600
	bool				bPostRxBuff		= false;
2601
	bool				bSomeCmdDone	= false;
2602
	struct crystalhd_rx_dma_pkt *rx_pkt;
2603
2604
	bool	rc = false;
2605
2606
	if (!adp || !hw->dev_started)
2607
		return rc;
2608
2609
	IntrStsValue.WholeReg=0;
2610
2611
	IntrStsValue.WholeReg = hw->pfnReadDevRegister(hw->adp, BCHP_INTR_INTR_STATUS);
2612
2613
	if(!IntrStsValue.WholeReg)
2614
		return rc;	/*Not Our interrupt*/
2615
2616
	/*If any of the bit is set we have a problem*/
2617
	if(IntrStsValue.HaltIntr || IntrStsValue.PcieTgtCaAttn || IntrStsValue.PcieTgtUrAttn)
2618
	{
2619
		printk("Bad HW Error in CrystalHD Driver\n");
2620
		return rc;
2621
	}
2622
2623
	/* Our interrupt */
2624
	hw->stats.num_interrupts++;
2625
	rc = true;
2626
2627
	/* NAREN When In Power Down state, only interrupts possible are TXFIFO and PiQ       */
2628
	/* Save the state of these interrupts to process them when we resume from power down */
2629
	if(hw->FleaPowerState == FLEA_PS_LP_COMPLETE)
2630
	{
2631
		if(IntrStsValue.ArmMbox1Int)
2632
		{
2633
			hw->PwrDwnPiQIntr = true;
2634
			bIntFound = true;
2635
		}
2636
2637
		if(IntrStsValue.ArmMbox2Int)
2638
		{
2639
			hw->PwrDwnTxIntr = true;
2640
			bIntFound = true;
2641
		}
2642
2643
		/*Write End Of Interrupt for PCIE*/
2644
		if(bIntFound)
2645
		{
2646
			hw->pfnWriteDevRegister(hw->adp, BCHP_INTR_INTR_CLR_REG, IntrStsValue.WholeReg);
2647
			hw->pfnWriteDevRegister(hw->adp, BCHP_INTR_EOI_CTRL, 1);
2648
		}
2649
		return (bIntFound);
2650
	}
2651
2652
	/*
2653
	-- Arm Mail box Zero interrupt is
2654
	-- BCHP_ARMCR4_BRIDGE_REG_MBOX_ARM1
2655
	*/
2656
	if(IntrStsValue.ArmMbox0Int)
2657
	{
2658
		/*HWFWCmdComplete(pHWExt,IntrBmp); */
2659
		/*Set the Event and the status flag*/
2660
		if (hw->pfw_cmd_event) {
2661
			hw->fwcmd_evt_sts = 1;
2662
			crystalhd_set_event(hw->pfw_cmd_event);
2663
		}
2664
		bIntFound = true;
2665
		bSomeCmdDone = true;
2666
		hw->FwCmdCnt--;
2667
	}
2668
2669
	/* Rx interrupts */
2670
	crystalhd_flea_rx_isr(hw, IntrStsValue);
2671
2672
	if( IntrStsValue.L0YRxDMADone || IntrStsValue.L1YRxDMADone || IntrStsValue.L0UVRxDMADone || IntrStsValue.L1UVRxDMADone || IntrStsValue.L0YRxDMAErr || IntrStsValue.L1YRxDMAErr )
2673
	{
2674
		bSomeCmdDone = true;
2675
	}
2676
2677
2678
	/* Tx interrupts*/
2679
	crystalhd_flea_tx_isr(hw, IntrStsValue);
2680
2681
	/*
2682
	-- Indicate the TX Done to Flea Firmware.
2683
	*/
2684
	if(IntrStsValue.L0TxDMADone || IntrStsValue.L1TxDMADone || IntrStsValue.L0TxDMAErr || IntrStsValue.L1TxDMAErr)
2685
	{
2686
		crystalhd_flea_update_tx_done_to_fw(hw);
2687
		bSomeCmdDone = true;
2688
	}
2689
	/*
2690
	-- We are doing this here because we processed the interrupts.
2691
	-- We might want to change the PicQSts bitmap in any of the interrupts.
2692
	-- This should be done before trying to post the next RX buffer.
2693
	-- NOTE: ArmMbox1Int is BCHP_ARMCR4_BRIDGE_REG_MBOX_ARM2
2694
	*/
2695
	if(IntrStsValue.ArmMbox1Int)
2696
	{
2697
		/*pHWExt->FleaBmpIntrCnt++; */
2698
		crystalhd_flea_update_temperature(hw);
2699
		crystalhd_flea_handle_PicQSts_intr(hw);
2700
		bPostRxBuff = true;
2701
		bIntFound = true;
2702
	}
2703
2704
	if(IntrStsValue.ArmMbox2Int)
2705
	{
2706
		crystalhd_flea_update_temperature(hw);
2707
		crystalhd_flea_update_tx_buff_info(hw);
2708
		bIntFound = true;
2709
	}
2710
2711
	/*Write End Of Interrupt for PCIE*/
2712
	if(rc)
2713
	{
2714
		hw->pfnWriteDevRegister(hw->adp, BCHP_INTR_INTR_CLR_REG, IntrStsValue.WholeReg);
2715
		hw->pfnWriteDevRegister(hw->adp, BCHP_INTR_EOI_CTRL, 1);
2716
	}
2717
2718
	/* Try to post RX Capture buffer from ISR context */
2719
	if(bPostRxBuff) {
2720
		rx_pkt = crystalhd_dioq_fetch(hw->rx_freeq);
2721
		if (rx_pkt)
2722
			hw->pfnPostRxSideBuff(hw, rx_pkt);
2723
	}
2724
2725
	if( (hw->FleaPowerState == FLEA_PS_LP_PENDING) && (bSomeCmdDone))
2726
	{
2727
		/*printk("interrupt_handle: current PS:%d, bSomeCmdDone%d\n", hw->FleaPowerState,bSomeCmdDone); */
2728
		crystalhd_flea_set_next_power_state(hw, FLEA_EVT_CMD_COMP);
2729
	}
2730
2731
	/* NAREN place the device in low power mode if we have not started playing video */
2732
	/*if((hw->FleaPowerState == FLEA_PS_ACTIVE) && (hw->WakeUpDecodeDone != true)) */
2733
	/*{ */
2734
	/*	if((hw->ReadyListLen == 0) && (hw->FreeListLen == 0)) */
2735
	/*	{ */
2736
	/*		crystalhd_flea_set_next_power_state(hw, FLEA_EVT_FLL_CHANGE); */
2737
	/*		printk("ISR Idle\n"); */
2738
	/*	} */
2739
	/*} */
2740
2741
	return rc;
2742
}
2743
2744
/* This function cannot be called from ISR context since it uses APIs that can sleep */
2745
bool flea_GetPictureInfo(struct crystalhd_hw *hw, struct crystalhd_rx_dma_pkt * rx_pkt,
2746
							uint32_t *PicNumber, uint64_t *PicMetaData)
2747
{
2748
	struct device *dev = &hw->adp->pdev->dev;
2749
	uint32_t PicInfoLineNum = 0, offset = 0, size = 0;
2750
	PBC_PIC_INFO_BLOCK pPicInfoLine = NULL;
2751
	uint32_t tmpYBuffData;
2752
	unsigned long res = 0;
2753
	uint32_t widthField = 0;
2754
	bool rtVal = true;
2755
2756
	void *tmpPicInfo = NULL;
2757
	struct crystalhd_dio_req *dio = rx_pkt->dio_req;
2758
	*PicNumber = 0;
2759
	*PicMetaData = 0;
2760
2761
	if (!dio)
2762
		goto getpictureinfo_err_nosem;
2763
2764
/*	if(down_interruptible(&hw->fetch_sem)) */
2765
/*		goto getpictureinfo_err_nosem; */
2766
2767
	tmpPicInfo = kmalloc(2 * sizeof(BC_PIC_INFO_BLOCK) + 16, GFP_KERNEL); /* since copy_from_user can sleep anyway */
2768
	if(tmpPicInfo == NULL)
2769
		goto getpictureinfo_err;
2770
	dio->pib_va = kmalloc(32, GFP_KERNEL); /* temp buffer of 32 bytes for the rest; */
2771
	if(dio->pib_va == NULL)
2772
		goto getpictureinfo_err;
2773
2774
	offset = (rx_pkt->dio_req->uinfo.y_done_sz * 4) - PIC_PIB_DATA_OFFSET_FROM_END;
2775
	res = copy_from_user(dio->pib_va, (void *)(dio->uinfo.xfr_buff + offset), 4);
2776
	if (res != 0)
2777
		goto getpictureinfo_err;
2778
	PicInfoLineNum = *(uint32_t*)(dio->pib_va);
2779
	if (PicInfoLineNum > 1092) {
2780
		dev_err(dev, "Invalid Line Number[%x], DoneSz:0x%x Bytes\n",
2781
			(int)PicInfoLineNum, rx_pkt->dio_req->uinfo.y_done_sz * 4);
2782
		goto getpictureinfo_err;
2783
	}
2784
2785
	offset = (rx_pkt->dio_req->uinfo.y_done_sz * 4) - PIC_WIDTH_OFFSET_FROM_END;
2786
	res = copy_from_user(dio->pib_va, (void *)(dio->uinfo.xfr_buff + offset), 4);
2787
	if (res != 0)
2788
		goto getpictureinfo_err;
2789
	widthField = *(uint32_t*)(dio->pib_va);
2790
2791
	hw->PICWidth = widthField & 0x3FFFFFFF; /* bit 31 is FMT Change, bit 30 is EOS */
2792
	if (hw->PICWidth > 2048) {
2793
		dev_err(dev, "Invalid width [%d]\n", hw->PICWidth);
2794
		goto getpictureinfo_err;
2795
	}
2796
2797
	/* calc pic info line offset */
2798
	if (dio->uinfo.b422mode) {
2799
		size = 2 * sizeof(BC_PIC_INFO_BLOCK);
2800
		offset = (PicInfoLineNum * hw->PICWidth * 2) + 4;
2801
	} else {
2802
		size = sizeof(BC_PIC_INFO_BLOCK);
2803
		offset = (PicInfoLineNum * hw->PICWidth) + 4;
2804
	}
2805
2806
	res = copy_from_user(tmpPicInfo, (void *)(dio->uinfo.xfr_buff+offset), size);
2807
	if (res != 0)
2808
		goto getpictureinfo_err;
2809
2810
	pPicInfoLine = (PBC_PIC_INFO_BLOCK)(tmpPicInfo);
2811
2812
	*PicMetaData = pPicInfoLine->timeStamp;
2813
2814
	if(widthField & PIB_EOS_DETECTED_BIT)
2815
	{
2816
		dev_dbg(dev, "Got EOS flag.\n");
2817
		hw->DrvEosDetected = 1;
2818
		*(uint32_t *)(dio->pib_va) = 0xFFFFFFFF;
2819
		res = copy_to_user((void *)(dio->uinfo.xfr_buff), dio->pib_va, 4);
2820
		if (res != 0)
2821
			goto getpictureinfo_err;
2822
	}
2823
	else
2824
	{
2825
		if( hw->DrvEosDetected == 1 )
2826
			hw->DrvCancelEosFlag = 1;
2827
2828
		hw->DrvEosDetected = 0;
2829
		res = copy_from_user(dio->pib_va, (void *)(dio->uinfo.xfr_buff), 4);
2830
		if (res != 0)
2831
			goto getpictureinfo_err;
2832
2833
		tmpYBuffData = *(uint32_t *)(dio->pib_va);
2834
		pPicInfoLine->ycom = tmpYBuffData;
2835
		res = copy_to_user((void *)(dio->uinfo.xfr_buff+offset), tmpPicInfo, size);
2836
		if (res != 0)
2837
			goto getpictureinfo_err;
2838
2839
		*(uint32_t *)(dio->pib_va) = PicInfoLineNum;
2840
		res = copy_to_user((void *)(dio->uinfo.xfr_buff), dio->pib_va, 4);
2841
		if (res != 0)
2842
			goto getpictureinfo_err;
2843
	}
2844
2845
	if(widthField & PIB_FORMAT_CHANGE_BIT)
2846
	{
2847
		rx_pkt->flags = 0;
2848
		rx_pkt->flags |= COMP_FLAG_PIB_VALID | COMP_FLAG_FMT_CHANGE;
2849
2850
		rx_pkt->pib.picture_number			= pPicInfoLine->picture_number;
2851
		rx_pkt->pib.width					= pPicInfoLine->width;
2852
		rx_pkt->pib.height					= pPicInfoLine->height;
2853
		rx_pkt->pib.chroma_format			= pPicInfoLine->chroma_format;
2854
		rx_pkt->pib.pulldown				= pPicInfoLine->pulldown;
2855
		rx_pkt->pib.flags					= pPicInfoLine->flags;
2856
		rx_pkt->pib.sess_num				= pPicInfoLine->sess_num;
2857
		rx_pkt->pib.aspect_ratio			= pPicInfoLine->aspect_ratio;
2858
		rx_pkt->pib.colour_primaries		= pPicInfoLine->colour_primaries;
2859
		rx_pkt->pib.picture_meta_payload	= pPicInfoLine->picture_meta_payload;
2860
		rx_pkt->pib.frame_rate				= pPicInfoLine->frame_rate;
2861
		rx_pkt->pib.custom_aspect_ratio_width_height = pPicInfoLine->custom_aspect_ratio_width_height;
2862
		rx_pkt->pib.n_drop				= pPicInfoLine->n_drop;
2863
		rx_pkt->pib.ycom				= pPicInfoLine->ycom;
2864
		hw->PICHeight = rx_pkt->pib.height;
2865
		hw->PICWidth = rx_pkt->pib.width;
2866
		hw->LastPicNo=0;
2867
		hw->LastTwoPicNo=0;
2868
		hw->PDRatio = 0; /* NAREN - reset PD ratio to start measuring for new clip */
2869
		hw->PauseThreshold = hw->DefaultPauseThreshold;
2870
		hw->TickSpentInPD = 0;
2871
		rdtscll(hw->TickCntDecodePU);
2872
2873
		dev_dbg(dev, "[FMT CH] DoneSz:0x%x, PIB:%x %x %x %x %x %x %x %x %x %x\n",
2874
			rx_pkt->dio_req->uinfo.y_done_sz * 4,
2875
				 rx_pkt->pib.picture_number,
2876
				 rx_pkt->pib.aspect_ratio,
2877
				 rx_pkt->pib.chroma_format,
2878
				 rx_pkt->pib.colour_primaries,
2879
				 rx_pkt->pib.frame_rate,
2880
				 rx_pkt->pib.height,
2881
				 rx_pkt->pib.width,
2882
				 rx_pkt->pib.n_drop,
2883
				 rx_pkt->pib.pulldown,
2884
				 rx_pkt->pib.ycom);
2885
		rtVal = false;
2886
	}
2887
2888
	if(pPicInfoLine->flags & FLEA_DECODE_ERROR_FLAG)
2889
	{
2890
		*PicNumber = 0;
2891
	} else {
2892
		/* get pic number and flags */
2893
		if (dio->uinfo.b422mode)
2894
			offset = (PicInfoLineNum * hw->PICWidth * 2);
2895
		else
2896
			offset = (PicInfoLineNum * hw->PICWidth);
2897
2898
		res = copy_from_user(dio->pib_va, (void *)(dio->uinfo.xfr_buff+offset), 4);
2899
		if (res != 0)
2900
			goto getpictureinfo_err;
2901
2902
		*PicNumber = *(uint32_t *)(dio->pib_va);
2903
	}
2904
2905
	if(dio->pib_va)
2906
		kfree(dio->pib_va);
2907
	if(tmpPicInfo)
2908
		kfree(tmpPicInfo);
2909
2910
/*	up(&hw->fetch_sem); */
2911
2912
	return rtVal;
2913
2914
getpictureinfo_err:
2915
/*	up(&hw->fetch_sem); */
2916
2917
getpictureinfo_err_nosem:
2918
	if(dio->pib_va)
2919
		kfree(dio->pib_va);
2920
	if(tmpPicInfo)
2921
		kfree(tmpPicInfo);
2922
2923
	*PicNumber = 0;
2924
	*PicMetaData = 0;
2925
2926
	return false;
2927
}
2928
2929
uint32_t flea_GetRptDropParam(struct crystalhd_hw *hw, void* pRxDMAReq)
2930
{
2931
	uint32_t PicNumber = 0,result = 0;
2932
	uint64_t PicMetaData = 0;
2933
2934
	if(flea_GetPictureInfo(hw, (struct crystalhd_rx_dma_pkt *)pRxDMAReq,
2935
		&PicNumber, &PicMetaData))
2936
		result = PicNumber;
2937
2938
	return result;
2939
}
2940
2941
bool crystalhd_flea_notify_event(struct crystalhd_hw *hw, enum BRCM_EVENT EventCode)
2942
{
2943
	switch(EventCode)
2944
	{
2945
		case BC_EVENT_START_CAPTURE:
2946
		{
2947
			crystalhd_flea_wake_up_hw(hw);
2948
			break;
2949
		}
2950
		default:
2951
			break;
2952
	}
2953
2954
	return true;
2955
}
(-)crystalhd~/crystalhd_fleafuncs.h (+62 lines)
Line 0 Link Here
1
/***************************************************************************
2
 * Copyright (c) 2005-2009, Broadcom Corporation.
3
 *
4
 *  Name: crystalhd_fleafuncs . h
5
 *
6
 *  Description:
7
 *		BCM70015 Linux driver hardware layer.
8
 *
9
 *  HISTORY:
10
 *
11
 **********************************************************************
12
 * This file is part of the crystalhd device driver.
13
 *
14
 * This driver is free software; you can redistribute it and/or modify
15
 * it under the terms of the GNU General Public License as published by
16
 * the Free Software Foundation, version 2 of the License.
17
 *
18
 * This driver is distributed in the hope that it will be useful,
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 * GNU General Public License for more details.
22
 *
23
 * You should have received a copy of the GNU General Public License
24
 * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
25
 **********************************************************************/
26
27
#ifndef _CRYSTALHD_FLEAFUNCS_H_
28
#define _CRYSTALHD_FLEAFUNCS_H_
29
30
#include "FleaDefs.h"
31
32
#define FW_CMD_BUFF_SZ		64
33
34
bool crystalhd_flea_start_device(struct crystalhd_hw *hw);
35
bool crystalhd_flea_stop_device(struct crystalhd_hw *hw);
36
bool crystalhd_flea_hw_interrupt_handle(struct crystalhd_adp *adp, struct crystalhd_hw *hw);
37
uint32_t crystalhd_flea_reg_rd(struct crystalhd_adp *adp, uint32_t reg_off);											/* Done */
38
void crystalhd_flea_reg_wr(struct crystalhd_adp *adp, uint32_t reg_off, uint32_t val);									/* Done */
39
bool crystalhd_flea_check_input_full(struct crystalhd_hw *hw, uint32_t needed_sz, uint32_t *empty_sz, bool b_188_byte_pkts, uint8_t *flags);
40
BC_STATUS crystalhd_flea_mem_rd(struct crystalhd_hw *hw, uint32_t start_off, uint32_t dw_cnt, uint32_t *rd_buff);		/* Done */
41
BC_STATUS crystalhd_flea_mem_wr(struct crystalhd_hw *hw, uint32_t start_off, uint32_t dw_cnt, uint32_t *wr_buff);		/* Done */
42
BC_STATUS crystalhd_flea_do_fw_cmd(struct crystalhd_hw *hw, BC_FW_CMD *fw_cmd);
43
BC_STATUS crystalhd_flea_download_fw(struct crystalhd_hw* hw, uint8_t* buffer, uint32_t sz);
44
void crystalhd_flea_get_dnsz(struct crystalhd_hw *hw, uint32_t list_index, uint32_t *y_dw_dnsz, uint32_t *uv_dw_dnsz);
45
BC_STATUS crystalhd_flea_hw_pause(struct crystalhd_hw *hw, bool state);
46
bool crystalhd_flea_peek_next_decoded_frame(struct crystalhd_hw *hw, uint64_t *meta_payload, uint32_t *picNumFlags, uint32_t PicWidth);
47
BC_STATUS crystalhd_flea_hw_post_cap_buff(struct crystalhd_hw *hw, struct crystalhd_rx_dma_pkt *rx_pkt);
48
void crystalhd_flea_start_tx_dma_engine(struct crystalhd_hw *hw, uint8_t list_id, addr_64 desc_addr);
49
void crystalhd_flea_stop_rx_dma_engine(struct crystalhd_hw *hw);
50
BC_STATUS crystalhd_flea_stop_tx_dma_engine(struct crystalhd_hw *hw);
51
bool crystalhd_flea_tx_list0_handler(struct crystalhd_hw *hw, uint32_t err_sts);
52
bool crystalhd_flea_tx_list1_handler(struct crystalhd_hw *hw, uint32_t err_sts);
53
void crystalhd_flea_tx_isr(struct crystalhd_hw *hw, union FLEA_INTR_BITS_COMMON int_sts);
54
bool crystalhd_flea_rx_list0_handler(struct crystalhd_hw *hw,union FLEA_INTR_BITS_COMMON int_sts,uint32_t y_err_sts,uint32_t uv_err_sts);
55
bool crystalhd_flea_rx_list1_handler(struct crystalhd_hw *hw,union FLEA_INTR_BITS_COMMON int_sts,uint32_t y_err_sts,uint32_t uv_err_sts);
56
void crystalhd_flea_rx_isr(struct crystalhd_hw *hw, union FLEA_INTR_BITS_COMMON intr_sts);
57
void crystalhd_flea_notify_fll_change(struct crystalhd_hw *hw, bool bCleanupContext);
58
bool crystalhd_flea_notify_event(struct crystalhd_hw *hw, enum BRCM_EVENT EventCode);
59
60
bool flea_GetPictureInfo(struct crystalhd_hw *hw, struct crystalhd_rx_dma_pkt * rx_pkt,
61
						 uint32_t *PicNumber, uint64_t *PicMetaData);
62
#endif
(-)crystalhd~/crystalhd_fw_if.h (-296 / +314 lines)
Lines 27-63 Link Here
27
#ifndef _CRYSTALHD_FW_IF_H_
27
#ifndef _CRYSTALHD_FW_IF_H_
28
#define _CRYSTALHD_FW_IF_H_
28
#define _CRYSTALHD_FW_IF_H_
29
29
30
#include <linux/types.h>
31
30
/* TBD: Pull in only required defs into this file.. */
32
/* TBD: Pull in only required defs into this file.. */
31
33
32
/* User Data Header */
34
/* User Data Header */
33
struct user_data {
35
struct UD_HDR {
34
	struct user_data	*next;
36
   struct UD_HDR	*next;
35
	uint32_t		type;
37
   uint32_t		type;
36
	uint32_t		size;
38
   uint32_t		size;
37
};
39
};
38
40
41
42
39
/*------------------------------------------------------*
43
/*------------------------------------------------------*
40
 *    MPEG Extension to the PPB			 *
44
 *    MPEG Extension to the PPB			 *
41
 *------------------------------------------------------*/
45
 *------------------------------------------------------*/
42
struct ppb_mpeg {
46
struct PPB_MPEG {
43
	uint32_t		to_be_defined;
47
   uint32_t		to_be_defined;
44
	uint32_t		valid;
48
   uint32_t		valid;
45
49
46
	/* Always valid, defaults to picture size if no
50
   /* Always valid, defaults to picture size if no
47
	   sequence display extension in the stream. */
51
      sequence display extension in the stream. */
48
	uint32_t		display_horizontal_size;
52
   uint32_t		display_horizontal_size;
49
	uint32_t		display_vertical_size;
53
   uint32_t		display_vertical_size;
50
54
51
	/* MPEG_VALID_PANSCAN
55
   /* MPEG_VALID_PANSCAN
52
	   Offsets are a copy values from the MPEG stream. */
56
      Offsets are a copy values from the MPEG stream. */
53
	uint32_t		offset_count;
57
   uint32_t		offset_count;
54
	int32_t		horizontal_offset[3];
58
   int32_t		horizontal_offset[3];
55
	int32_t		vertical_offset[3];
59
   int32_t		vertical_offset[3];
56
60
57
	/* MPEG_VALID_USERDATA
61
   /* MPEG_VALID_USERDATA
58
	   User data is in the form of a linked list. */
62
      User data is in the form of a linked list. */
59
	int32_t		userDataSize;
63
   int32_t		userDataSize;
60
	struct user_data	*userData;
64
   struct UD_HDR		*userData;
61
65
62
};
66
};
63
67
Lines 65-90 struct ppb_mpeg { Link Here
65
/*------------------------------------------------------*
69
/*------------------------------------------------------*
66
 *    VC1 Extension to the PPB			  *
70
 *    VC1 Extension to the PPB			  *
67
 *------------------------------------------------------*/
71
 *------------------------------------------------------*/
68
struct ppb_vc1 {
72
struct PPB_VC1 {
69
	uint32_t		to_be_defined;
73
   uint32_t		to_be_defined;
70
	uint32_t		valid;
74
   uint32_t		valid;
71
75
72
	/* Always valid, defaults to picture size if no
76
   /* Always valid, defaults to picture size if no
73
	   sequence display extension in the stream. */
77
      sequence display extension in the stream. */
74
	uint32_t		display_horizontal_size;
78
   uint32_t		display_horizontal_size;
75
	uint32_t		display_vertical_size;
79
   uint32_t		display_vertical_size;
76
80
77
	/* VC1 pan scan windows */
81
  /* VC1 pan scan windows */
78
	uint32_t		num_panscan_windows;
82
   uint32_t		num_panscan_windows;
79
	int32_t		ps_horiz_offset[4];
83
   int32_t		ps_horiz_offset[4];
80
	int32_t		ps_vert_offset[4];
84
   int32_t		ps_vert_offset[4];
81
	int32_t		ps_width[4];
85
   int32_t		ps_width[4];
82
	int32_t		ps_height[4];
86
   int32_t		ps_height[4];
83
87
84
	/* VC1_VALID_USERDATA
88
   /* VC1_VALID_USERDATA
85
	   User data is in the form of a linked list. */
89
      User data is in the form of a linked list. */
86
	int32_t		userDataSize;
90
   int32_t		userDataSize;
87
	struct user_data	*userData;
91
   struct UD_HDR		*userData;
88
92
89
};
93
};
90
94
Lines 104-369 struct ppb_vc1 { Link Here
104
/* maximum number of intervals(as many as 256 intervals?) */
108
/* maximum number of intervals(as many as 256 intervals?) */
105
#define MAX_FGT_VALUE_INTERVAL	(256)
109
#define MAX_FGT_VALUE_INTERVAL	(256)
106
110
107
struct fgt_sei {
111
struct FGT_SEI {
108
	struct fgt_sei *next;
112
    struct FGT_SEI *next;
109
	unsigned char
113
    unsigned char model_values[3][MAX_FGT_VALUE_INTERVAL][MAX_FGT_MODEL_VALUE];
110
		 model_values[3][MAX_FGT_VALUE_INTERVAL][MAX_FGT_MODEL_VALUE];
114
    unsigned char upper_bound[3][MAX_FGT_VALUE_INTERVAL];
111
	unsigned char upper_bound[3][MAX_FGT_VALUE_INTERVAL];
115
    unsigned char lower_bound[3][MAX_FGT_VALUE_INTERVAL];
112
	unsigned char lower_bound[3][MAX_FGT_VALUE_INTERVAL];
116
113
117
    unsigned char cancel_flag;	/* Cancel flag: 1 no film grain. */
114
	unsigned char cancel_flag;	/* Cancel flag: 1 no film grain. */
118
    unsigned char model_id;	/* Model id. */
115
	unsigned char model_id;	/* Model id. */
119
116
120
    /* +unused SE based on Thomson spec */
117
	/* +unused SE based on Thomson spec */
121
    unsigned char color_desc_flag;	/* Separate color descrition flag. */
118
	unsigned char color_desc_flag;	/* Separate color description flag. */
122
    unsigned char bit_depth_luma;	/* Bit depth luma minus 8. */
119
	unsigned char bit_depth_luma;	/* Bit depth luma minus 8. */
123
    unsigned char bit_depth_chroma;	/* Bit depth chroma minus 8. */
120
	unsigned char bit_depth_chroma;	/* Bit depth chroma minus 8. */
124
    unsigned char full_range_flag;	/* Full range flag. */
121
	unsigned char full_range_flag;	/* Full range flag. */
125
    unsigned char color_primaries;	/* Color primaries. */
122
	unsigned char color_primaries;	/* Color primaries. */
126
    unsigned char transfer_charact;	/* Transfer characteristics. */
123
	unsigned char transfer_charact;	/* Transfer characteristics. */
127
    unsigned char matrix_coeff;		/*< Matrix coefficients. */
124
	unsigned char matrix_coeff;		/*< Matrix coefficients. */
128
    /* -unused SE based on Thomson spec */
125
	/* -unused SE based on Thomson spec */
129
126
130
    unsigned char blending_mode_id;	/* Blending mode. */
127
	unsigned char blending_mode_id;	/* Blending mode. */
131
    unsigned char log2_scale_factor;	/* Log2 scale factor (2-7). */
128
	unsigned char log2_scale_factor;	/* Log2 scale factor (2-7). */
132
    unsigned char comp_flag[3];		/* Components [0,2] parameters present flag. */
129
	unsigned char comp_flag[3];	/* Components [0,2]
133
    unsigned char num_intervals_minus1[3]; /* Number of intensity level intervals. */
130
					 parameters present flag. */
134
    unsigned char num_model_values[3];	/* Number of model values. */
131
	unsigned char num_intervals_minus1[3]; /* Number of
135
    uint16_t      repetition_period;	/* Repetition period (0-16384) */
132
					 intensity level intervals. */
136
133
	unsigned char num_model_values[3];	/* Number of model values. */
137
};
134
	uint16_t      repetition_period; /* Repetition period (0-16384) */
138
135
139
struct PPB_H264 {
136
};
140
   /* 'valid' specifies which fields (or sets of
137
141
    * fields) below are valid.  If the corresponding
138
struct ppb_h264 {
142
    * bit in 'valid' is NOT set then that field(s)
139
	/* 'valid' specifies which fields (or sets of
143
    * is (are) not initialized. */
140
	 * fields) below are valid.  If the corresponding
144
   uint32_t	valid;
141
	 * bit in 'valid' is NOT set then that field(s)
145
142
	 * is (are) not initialized. */
146
   int32_t		poc_top;	/* POC for Top Field/Frame */
143
	uint32_t	valid;
147
   int32_t		poc_bottom;	/* POC for Bottom Field    */
144
148
   uint32_t		idr_pic_id;
145
	int32_t		poc_top;	/* POC for Top Field/Frame */
149
146
	int32_t		poc_bottom;	/* POC for Bottom Field    */
150
   /* H264_VALID_PANSCAN */
147
	uint32_t		idr_pic_id;
151
   uint32_t		pan_scan_count;
148
152
   int32_t		pan_scan_left[3];
149
	/* H264_VALID_PANSCAN */
153
   int32_t		pan_scan_right[3];
150
	uint32_t		pan_scan_count;
154
   int32_t		pan_scan_top[3];
151
	int32_t		pan_scan_left[3];
155
   int32_t		pan_scan_bottom[3];
152
	int32_t		pan_scan_right[3];
156
153
	int32_t		pan_scan_top[3];
157
   /* H264_VALID_CT_TYPE */
154
	int32_t		pan_scan_bottom[3];
158
   uint32_t		ct_type_count;
155
159
   uint32_t		ct_type[3];
156
	/* H264_VALID_CT_TYPE */
160
157
	uint32_t		ct_type_count;
161
   /* H264_VALID_SPS_CROP */
158
	uint32_t		ct_type[3];
162
   int32_t		sps_crop_left;
159
163
   int32_t		sps_crop_right;
160
	/* H264_VALID_SPS_CROP */
164
   int32_t		sps_crop_top;
161
	int32_t		sps_crop_left;
165
   int32_t		sps_crop_bottom;
162
	int32_t		sps_crop_right;
166
163
	int32_t		sps_crop_top;
167
   /* H264_VALID_VUI */
164
	int32_t		sps_crop_bottom;
168
   uint32_t		chroma_top;
165
169
   uint32_t		chroma_bottom;
166
	/* H264_VALID_VUI */
170
167
	uint32_t		chroma_top;
171
   /* H264_VALID_USER */
168
	uint32_t		chroma_bottom;
172
   uint32_t		user_data_size;
169
173
   struct UD_HDR		*user_data;
170
	/* H264_VALID_USER */
174
171
	uint32_t		user_data_size;
175
   /* H264 VALID FGT */
172
	struct user_data	*user_data;
176
   struct FGT_SEI		*pfgt;
173
177
174
	/* H264 VALID FGT */
178
};
175
	struct fgt_sei	*pfgt;
179
176
180
struct PPB {
177
};
181
   /* Common fields. */
178
182
   uint32_t	picture_number;	/* Ordinal display number */
179
struct ppb {
183
   uint32_t	video_buffer;	/* Video (picbuf) number */
180
	/* Common fields. */
184
   uint32_t	video_address;	/* Address of picbuf Y */
181
	uint32_t	picture_number;	/* Ordinal display number */
185
   uint32_t	video_address_uv; /* Address of picbuf UV */
182
	uint32_t	video_buffer;	/* Video (picbuf) number */
186
   uint32_t	video_stripe;	/* Picbuf stripe */
183
	uint32_t	video_address;	/* Address of picbuf Y */
187
   uint32_t	video_width;	/* Picbuf width */
184
	uint32_t	video_address_uv; /* Address of picbuf UV */
188
   uint32_t	video_height;	/* Picbuf height */
185
	uint32_t	video_stripe;	/* Picbuf stripe */
189
186
	uint32_t	video_width;	/* Picbuf width */
190
   uint32_t	channel_id;	/* Decoder channel ID */
187
	uint32_t	video_height;	/* Picbuf height */
191
   uint32_t	status;		/* reserved */
188
192
   uint32_t	width;		/* pixels */
189
	uint32_t	channel_id;	/* Decoder channel ID */
193
   uint32_t	height;		/* pixels */
190
	uint32_t	status;		/* reserved */
194
   uint32_t	chroma_format;	/* see above */
191
	uint32_t	width;		/* pixels */
195
   uint32_t	pulldown;	/* see above */
192
	uint32_t	height;		/* pixels */
196
   uint32_t	flags;		/* see above */
193
	uint32_t	chroma_format;	/* see above */
197
   uint32_t	pts;		/* 32 LSBs of PTS */
194
	uint32_t	pulldown;	/* see above */
198
   uint32_t	protocol;	/* protocolXXX (above) */
195
	uint32_t	flags;		/* see above */
199
196
	uint32_t	pts;		/* 32 LSBs of PTS */
200
   uint32_t	frame_rate;	/* see above */
197
	uint32_t	protocol;	/* protocolXXX (above) */
201
   uint32_t	matrix_coeff;	/* see above */
198
202
   uint32_t	aspect_ratio;	/* see above */
199
	uint32_t	frame_rate;	/* see above */
203
   uint32_t	colour_primaries; /* see above */
200
	uint32_t	matrix_coeff;	/* see above */
204
   uint32_t	transfer_char;	/* see above */
201
	uint32_t	aspect_ratio;	/* see above */
205
   uint32_t	pcr_offset;	/* 45kHz if PCR type; else 27MHz */
202
	uint32_t	colour_primaries; /* see above */
206
   uint32_t	n_drop;		/* Number of pictures to be dropped */
203
	uint32_t	transfer_char;	/* see above */
207
204
	uint32_t	pcr_offset;	/* 45kHz if PCR type; else 27MHz */
208
   uint32_t	custom_aspect_ratio_width_height;
205
	uint32_t	n_drop;		/* Number of pictures to be dropped */
209
			/* upper 16-bits is Y and lower 16-bits is X */
206
210
207
	uint32_t	custom_aspect_ratio_width_height;
211
   uint32_t	picture_tag;	/* Indexing tag from BUD packets */
208
	/* upper 16-bits is Y and lower 16-bits is X */
212
   uint32_t	picture_done_payload;
209
213
   uint32_t	picture_meta_payload;
210
	uint32_t	picture_tag;	/* Indexing tag from BUD packets */
214
   uint32_t	reserved[1];
211
	uint32_t	picture_done_payload;
215
212
	uint32_t	picture_meta_payload;
216
   /* Protocol-specific extensions. */
213
	uint32_t	reserved[1];
217
   union {
214
218
      struct PPB_H264	h264;
215
	/* Protocol-specific extensions. */
219
      struct PPB_MPEG	mpeg;
216
	union {
220
      struct PPB_VC1	 vc1;
217
		struct ppb_h264	h264;
221
   } other;
218
		struct ppb_mpeg	mpeg;
222
219
		struct ppb_vc1	 vc1;
223
};
220
	} other;
224
221
225
struct C011_PIB {
222
};
226
   uint32_t	bFormatChange;
223
227
   uint32_t	resolution;
224
struct c011_pib {
228
   uint32_t	channelId;
225
	uint32_t	bFormatChange;
229
   uint32_t	ppbPtr;
226
	uint32_t	resolution;
230
   int32_t	ptsStcOffset;
227
	uint32_t	channelId;
231
   uint32_t	zeroPanscanValid;
228
	uint32_t	ppbPtr;
232
   uint32_t	dramOutBufAddr;
229
	int32_t	ptsStcOffset;
233
   uint32_t	yComponent;
230
	uint32_t	zeroPanscanValid;
234
   struct PPB			ppb;
231
	uint32_t	dramOutBufAddr;
235
232
	uint32_t	yComponent;
236
};
233
	struct ppb	ppb;
237
234
238
struct C011_TS_CMD {
235
};
239
	uint32_t	eCmd; /* eC011_TS_CMD */
236
240
	uint32_t	ulParams[63];
237
struct dec_rsp_channel_start_video {
241
};
238
	uint32_t	command;
242
239
	uint32_t	sequence;
243
struct DecRspChannelStartVideo {
240
	uint32_t	status;
244
    uint32_t	command;
241
	uint32_t	picBuf;
245
    uint32_t	sequence;
242
	uint32_t	picRelBuf;
246
    uint32_t	status;
243
	uint32_t	picInfoDeliveryQ;
247
    uint32_t	picBuf;
244
	uint32_t	picInfoReleaseQ;
248
    uint32_t	picRelBuf;
245
	uint32_t	channelStatus;
249
    uint32_t	picInfoDeliveryQ;
246
	uint32_t	userDataDeliveryQ;
250
    uint32_t	picInfoReleaseQ;
247
	uint32_t	userDataReleaseQ;
251
    uint32_t	channelStatus;
248
	uint32_t	transportStreamCaptureAddr;
252
    uint32_t	userDataDeliveryQ;
249
	uint32_t	asyncEventQ;
253
    uint32_t	userDataReleaseQ;
254
    uint32_t	transportStreamCaptureAddr;
255
    uint32_t	asyncEventQ;
256
257
};
250
258
259
struct DecRspChannelChannelOpen {
260
	uint32_t command;
261
	uint32_t sequence;
262
	uint32_t status;
263
	uint32_t ChannelID;
264
	uint32_t picBuf;
265
	uint32_t picRelBuf;
266
	uint32_t picInfoDeliveryQ;
267
	uint32_t picInfoReleaseQ;
268
	uint32_t channelStatus;
269
	uint32_t userDataDeliveryQ;
270
	uint32_t userDataReleaseQ;
271
	uint32_t transportStreamCaptureAddr;
272
	uint32_t asyncEventQ;
251
};
273
};
252
274
253
#define eCMD_C011_CMD_BASE	  (0x73763000)
275
#define eCMD_C011_CMD_BASE	  (0x73763000)
254
276
255
/* host commands */
277
/* host commands */
256
enum  c011_ts_cmd {
278
enum eC011_TS_CMD {
257
	eCMD_TS_GET_NEXT_PIC	= 0x7376F100, /* debug get next picture */
279
    eCMD_TS_GET_NEXT_PIC	= 0x7376F100, /* debug get next picture */
258
	eCMD_TS_GET_LAST_PIC	= 0x7376F102, /* debug get last pic status */
280
    eCMD_TS_GET_LAST_PIC	= 0x7376F102, /* debug get last pic status */
259
	eCMD_TS_READ_WRITE_MEM	= 0x7376F104, /* debug read write memory */
281
    eCMD_TS_READ_WRITE_MEM	= 0x7376F104, /* debug read write memory */
260
282
261
	/* New API commands */
283
    /* New API commands */
262
	/* General commands */
284
    /* General commands */
263
	eCMD_C011_INIT		= eCMD_C011_CMD_BASE + 0x01,
285
    eCMD_C011_INIT		= eCMD_C011_CMD_BASE + 0x01,
264
	eCMD_C011_RESET		= eCMD_C011_CMD_BASE + 0x02,
286
    eCMD_C011_RESET		= eCMD_C011_CMD_BASE + 0x02,
265
	eCMD_C011_SELF_TEST		= eCMD_C011_CMD_BASE + 0x03,
287
    eCMD_C011_SELF_TEST		= eCMD_C011_CMD_BASE + 0x03,
266
	eCMD_C011_GET_VERSION	= eCMD_C011_CMD_BASE + 0x04,
288
    eCMD_C011_GET_VERSION	= eCMD_C011_CMD_BASE + 0x04,
267
	eCMD_C011_GPIO		= eCMD_C011_CMD_BASE + 0x05,
289
    eCMD_C011_GPIO		= eCMD_C011_CMD_BASE + 0x05,
268
	eCMD_C011_DEBUG_SETUP	= eCMD_C011_CMD_BASE + 0x06,
290
    eCMD_C011_DEBUG_SETUP	= eCMD_C011_CMD_BASE + 0x06,
269
291
270
	/* Decoding commands */
292
    /* Decoding commands */
271
	eCMD_C011_DEC_CHAN_OPEN			= eCMD_C011_CMD_BASE + 0x100,
293
    eCMD_C011_DEC_CHAN_OPEN			= eCMD_C011_CMD_BASE + 0x100,
272
	eCMD_C011_DEC_CHAN_CLOSE		= eCMD_C011_CMD_BASE + 0x101,
294
    eCMD_C011_DEC_CHAN_CLOSE			= eCMD_C011_CMD_BASE + 0x101,
273
	eCMD_C011_DEC_CHAN_ACTIVATE		= eCMD_C011_CMD_BASE + 0x102,
295
    eCMD_C011_DEC_CHAN_ACTIVATE			= eCMD_C011_CMD_BASE + 0x102,
274
	eCMD_C011_DEC_CHAN_STATUS		= eCMD_C011_CMD_BASE + 0x103,
296
    eCMD_C011_DEC_CHAN_STATUS			= eCMD_C011_CMD_BASE + 0x103,
275
	eCMD_C011_DEC_CHAN_FLUSH		= eCMD_C011_CMD_BASE + 0x104,
297
    eCMD_C011_DEC_CHAN_FLUSH			= eCMD_C011_CMD_BASE + 0x104,
276
	eCMD_C011_DEC_CHAN_TRICK_PLAY		= eCMD_C011_CMD_BASE + 0x105,
298
    eCMD_C011_DEC_CHAN_TRICK_PLAY		= eCMD_C011_CMD_BASE + 0x105,
277
	eCMD_C011_DEC_CHAN_TS_PIDS		= eCMD_C011_CMD_BASE + 0x106,
299
    eCMD_C011_DEC_CHAN_TS_PIDS			= eCMD_C011_CMD_BASE + 0x106,
278
	eCMD_C011_DEC_CHAN_PS_STREAM_ID		= eCMD_C011_CMD_BASE + 0x107,
300
    eCMD_C011_DEC_CHAN_PS_STREAM_ID		= eCMD_C011_CMD_BASE + 0x107,
279
	eCMD_C011_DEC_CHAN_INPUT_PARAMS		= eCMD_C011_CMD_BASE + 0x108,
301
    eCMD_C011_DEC_CHAN_INPUT_PARAMS		= eCMD_C011_CMD_BASE + 0x108,
280
	eCMD_C011_DEC_CHAN_VIDEO_OUTPUT		= eCMD_C011_CMD_BASE + 0x109,
302
    eCMD_C011_DEC_CHAN_VIDEO_OUTPUT		= eCMD_C011_CMD_BASE + 0x109,
281
	eCMD_C011_DEC_CHAN_OUTPUT_FORMAT	= eCMD_C011_CMD_BASE + 0x10A,
303
    eCMD_C011_DEC_CHAN_OUTPUT_FORMAT		= eCMD_C011_CMD_BASE + 0x10A,
282
	eCMD_C011_DEC_CHAN_SCALING_FILTERS	= eCMD_C011_CMD_BASE + 0x10B,
304
    eCMD_C011_DEC_CHAN_SCALING_FILTERS		= eCMD_C011_CMD_BASE + 0x10B,
283
	eCMD_C011_DEC_CHAN_OSD_MODE		= eCMD_C011_CMD_BASE + 0x10D,
305
    eCMD_C011_DEC_CHAN_OSD_MODE			= eCMD_C011_CMD_BASE + 0x10D,
284
	eCMD_C011_DEC_CHAN_DROP			= eCMD_C011_CMD_BASE + 0x10E,
306
    eCMD_C011_DEC_CHAN_DROP			= eCMD_C011_CMD_BASE + 0x10E,
285
	eCMD_C011_DEC_CHAN_RELEASE		= eCMD_C011_CMD_BASE + 0x10F,
307
    eCMD_C011_DEC_CHAN_RELEASE			= eCMD_C011_CMD_BASE + 0x10F,
286
	eCMD_C011_DEC_CHAN_STREAM_SETTINGS	= eCMD_C011_CMD_BASE + 0x110,
308
    eCMD_C011_DEC_CHAN_STREAM_SETTINGS		= eCMD_C011_CMD_BASE + 0x110,
287
	eCMD_C011_DEC_CHAN_PAUSE_OUTPUT		= eCMD_C011_CMD_BASE + 0x111,
309
    eCMD_C011_DEC_CHAN_PAUSE_OUTPUT		= eCMD_C011_CMD_BASE + 0x111,
288
	eCMD_C011_DEC_CHAN_CHANGE		= eCMD_C011_CMD_BASE + 0x112,
310
    eCMD_C011_DEC_CHAN_CHANGE			= eCMD_C011_CMD_BASE + 0x112,
289
	eCMD_C011_DEC_CHAN_SET_STC		= eCMD_C011_CMD_BASE + 0x113,
311
    eCMD_C011_DEC_CHAN_SET_STC			= eCMD_C011_CMD_BASE + 0x113,
290
	eCMD_C011_DEC_CHAN_SET_PTS		= eCMD_C011_CMD_BASE + 0x114,
312
    eCMD_C011_DEC_CHAN_SET_PTS			= eCMD_C011_CMD_BASE + 0x114,
291
	eCMD_C011_DEC_CHAN_CC_MODE		= eCMD_C011_CMD_BASE + 0x115,
313
    eCMD_C011_DEC_CHAN_CC_MODE			= eCMD_C011_CMD_BASE + 0x115,
292
	eCMD_C011_DEC_CREATE_AUDIO_CONTEXT	= eCMD_C011_CMD_BASE + 0x116,
314
    eCMD_C011_DEC_CREATE_AUDIO_CONTEXT		= eCMD_C011_CMD_BASE + 0x116,
293
	eCMD_C011_DEC_COPY_AUDIO_CONTEXT	= eCMD_C011_CMD_BASE + 0x117,
315
    eCMD_C011_DEC_COPY_AUDIO_CONTEXT		= eCMD_C011_CMD_BASE + 0x117,
294
	eCMD_C011_DEC_DELETE_AUDIO_CONTEXT	= eCMD_C011_CMD_BASE + 0x118,
316
    eCMD_C011_DEC_DELETE_AUDIO_CONTEXT		= eCMD_C011_CMD_BASE + 0x118,
295
	eCMD_C011_DEC_CHAN_SET_DECYPTION	= eCMD_C011_CMD_BASE + 0x119,
317
    eCMD_C011_DEC_CHAN_SET_DECYPTION		= eCMD_C011_CMD_BASE + 0x119,
296
	eCMD_C011_DEC_CHAN_START_VIDEO		= eCMD_C011_CMD_BASE + 0x11A,
318
    eCMD_C011_DEC_CHAN_START_VIDEO		= eCMD_C011_CMD_BASE + 0x11A,
297
	eCMD_C011_DEC_CHAN_STOP_VIDEO		= eCMD_C011_CMD_BASE + 0x11B,
319
    eCMD_C011_DEC_CHAN_STOP_VIDEO		= eCMD_C011_CMD_BASE + 0x11B,
298
	eCMD_C011_DEC_CHAN_PIC_CAPTURE		= eCMD_C011_CMD_BASE + 0x11C,
320
    eCMD_C011_DEC_CHAN_PIC_CAPTURE		= eCMD_C011_CMD_BASE + 0x11C,
299
	eCMD_C011_DEC_CHAN_PAUSE		= eCMD_C011_CMD_BASE + 0x11D,
321
    eCMD_C011_DEC_CHAN_PAUSE			= eCMD_C011_CMD_BASE + 0x11D,
300
	eCMD_C011_DEC_CHAN_PAUSE_STATE		= eCMD_C011_CMD_BASE + 0x11E,
322
    eCMD_C011_DEC_CHAN_PAUSE_STATE		= eCMD_C011_CMD_BASE + 0x11E,
301
	eCMD_C011_DEC_CHAN_SET_SLOWM_RATE	= eCMD_C011_CMD_BASE + 0x11F,
323
    eCMD_C011_DEC_CHAN_SET_SLOWM_RATE		= eCMD_C011_CMD_BASE + 0x11F,
302
	eCMD_C011_DEC_CHAN_GET_SLOWM_RATE	= eCMD_C011_CMD_BASE + 0x120,
324
    eCMD_C011_DEC_CHAN_GET_SLOWM_RATE		= eCMD_C011_CMD_BASE + 0x120,
303
	eCMD_C011_DEC_CHAN_SET_FF_RATE		= eCMD_C011_CMD_BASE + 0x121,
325
    eCMD_C011_DEC_CHAN_SET_FF_RATE		= eCMD_C011_CMD_BASE + 0x121,
304
	eCMD_C011_DEC_CHAN_GET_FF_RATE		= eCMD_C011_CMD_BASE + 0x122,
326
    eCMD_C011_DEC_CHAN_GET_FF_RATE		= eCMD_C011_CMD_BASE + 0x122,
305
	eCMD_C011_DEC_CHAN_FRAME_ADVANCE	= eCMD_C011_CMD_BASE + 0x123,
327
    eCMD_C011_DEC_CHAN_FRAME_ADVANCE		= eCMD_C011_CMD_BASE + 0x123,
306
	eCMD_C011_DEC_CHAN_SET_SKIP_PIC_MODE	= eCMD_C011_CMD_BASE + 0x124,
328
    eCMD_C011_DEC_CHAN_SET_SKIP_PIC_MODE	= eCMD_C011_CMD_BASE + 0x124,
307
	eCMD_C011_DEC_CHAN_GET_SKIP_PIC_MODE	= eCMD_C011_CMD_BASE + 0x125,
329
    eCMD_C011_DEC_CHAN_GET_SKIP_PIC_MODE	= eCMD_C011_CMD_BASE + 0x125,
308
	eCMD_C011_DEC_CHAN_FILL_PIC_BUF		= eCMD_C011_CMD_BASE + 0x126,
330
    eCMD_C011_DEC_CHAN_FILL_PIC_BUF		= eCMD_C011_CMD_BASE + 0x126,
309
	eCMD_C011_DEC_CHAN_SET_CONTINUITY_CHECK	= eCMD_C011_CMD_BASE + 0x127,
331
    eCMD_C011_DEC_CHAN_SET_CONTINUITY_CHECK	= eCMD_C011_CMD_BASE + 0x127,
310
	eCMD_C011_DEC_CHAN_GET_CONTINUITY_CHECK	= eCMD_C011_CMD_BASE + 0x128,
332
    eCMD_C011_DEC_CHAN_GET_CONTINUITY_CHECK	= eCMD_C011_CMD_BASE + 0x128,
311
	eCMD_C011_DEC_CHAN_SET_BRCM_TRICK_MODE	= eCMD_C011_CMD_BASE + 0x129,
333
    eCMD_C011_DEC_CHAN_SET_BRCM_TRICK_MODE	= eCMD_C011_CMD_BASE + 0x129,
312
	eCMD_C011_DEC_CHAN_GET_BRCM_TRICK_MODE	= eCMD_C011_CMD_BASE + 0x12A,
334
    eCMD_C011_DEC_CHAN_GET_BRCM_TRICK_MODE	= eCMD_C011_CMD_BASE + 0x12A,
313
	eCMD_C011_DEC_CHAN_REVERSE_FIELD_STATUS	= eCMD_C011_CMD_BASE + 0x12B,
335
    eCMD_C011_DEC_CHAN_REVERSE_FIELD_STATUS	= eCMD_C011_CMD_BASE + 0x12B,
314
	eCMD_C011_DEC_CHAN_I_PICTURE_FOUND	= eCMD_C011_CMD_BASE + 0x12C,
336
    eCMD_C011_DEC_CHAN_I_PICTURE_FOUND		= eCMD_C011_CMD_BASE + 0x12C,
315
	eCMD_C011_DEC_CHAN_SET_PARAMETER	= eCMD_C011_CMD_BASE + 0x12D,
337
    eCMD_C011_DEC_CHAN_SET_PARAMETER		= eCMD_C011_CMD_BASE + 0x12D,
316
	eCMD_C011_DEC_CHAN_SET_USER_DATA_MODE	= eCMD_C011_CMD_BASE + 0x12E,
338
    eCMD_C011_DEC_CHAN_SET_USER_DATA_MODE	= eCMD_C011_CMD_BASE + 0x12E,
317
	eCMD_C011_DEC_CHAN_SET_PAUSE_DISPLAY_MODE = eCMD_C011_CMD_BASE + 0x12F,
339
    eCMD_C011_DEC_CHAN_SET_PAUSE_DISPLAY_MODE	= eCMD_C011_CMD_BASE + 0x12F,
318
	eCMD_C011_DEC_CHAN_SET_SLOW_DISPLAY_MODE = eCMD_C011_CMD_BASE + 0x130,
340
    eCMD_C011_DEC_CHAN_SET_SLOW_DISPLAY_MODE	= eCMD_C011_CMD_BASE + 0x130,
319
	eCMD_C011_DEC_CHAN_SET_FF_DISPLAY_MODE	= eCMD_C011_CMD_BASE + 0x131,
341
    eCMD_C011_DEC_CHAN_SET_FF_DISPLAY_MODE	= eCMD_C011_CMD_BASE + 0x131,
320
	eCMD_C011_DEC_CHAN_SET_DISPLAY_TIMING_MODE = eCMD_C011_CMD_BASE +
342
    eCMD_C011_DEC_CHAN_SET_DISPLAY_TIMING_MODE	= eCMD_C011_CMD_BASE + 0x132,
321
								 0x132,
343
    eCMD_C011_DEC_CHAN_SET_DISPLAY_MODE		= eCMD_C011_CMD_BASE + 0x133,
322
	eCMD_C011_DEC_CHAN_SET_DISPLAY_MODE	= eCMD_C011_CMD_BASE + 0x133,
344
    eCMD_C011_DEC_CHAN_GET_DISPLAY_MODE		= eCMD_C011_CMD_BASE + 0x134,
323
	eCMD_C011_DEC_CHAN_GET_DISPLAY_MODE	= eCMD_C011_CMD_BASE + 0x134,
345
    eCMD_C011_DEC_CHAN_SET_REVERSE_FIELD	= eCMD_C011_CMD_BASE + 0x135,
324
	eCMD_C011_DEC_CHAN_SET_REVERSE_FIELD	= eCMD_C011_CMD_BASE + 0x135,
346
    eCMD_C011_DEC_CHAN_STREAM_OPEN		= eCMD_C011_CMD_BASE + 0x136,
325
	eCMD_C011_DEC_CHAN_STREAM_OPEN		= eCMD_C011_CMD_BASE + 0x136,
347
    eCMD_C011_DEC_CHAN_SET_PCR_PID		= eCMD_C011_CMD_BASE + 0x137,
326
	eCMD_C011_DEC_CHAN_SET_PCR_PID		= eCMD_C011_CMD_BASE + 0x137,
348
    eCMD_C011_DEC_CHAN_SET_VID_PID		= eCMD_C011_CMD_BASE + 0x138,
327
	eCMD_C011_DEC_CHAN_SET_VID_PID		= eCMD_C011_CMD_BASE + 0x138,
349
    eCMD_C011_DEC_CHAN_SET_PAN_SCAN_MODE	= eCMD_C011_CMD_BASE + 0x139,
328
	eCMD_C011_DEC_CHAN_SET_PAN_SCAN_MODE	= eCMD_C011_CMD_BASE + 0x139,
350
    eCMD_C011_DEC_CHAN_START_DISPLAY_AT_PTS	= eCMD_C011_CMD_BASE + 0x140,
329
	eCMD_C011_DEC_CHAN_START_DISPLAY_AT_PTS	= eCMD_C011_CMD_BASE + 0x140,
351
    eCMD_C011_DEC_CHAN_STOP_DISPLAY_AT_PTS	= eCMD_C011_CMD_BASE + 0x141,
330
	eCMD_C011_DEC_CHAN_STOP_DISPLAY_AT_PTS	= eCMD_C011_CMD_BASE + 0x141,
352
    eCMD_C011_DEC_CHAN_SET_DISPLAY_ORDER	= eCMD_C011_CMD_BASE + 0x142,
331
	eCMD_C011_DEC_CHAN_SET_DISPLAY_ORDER	= eCMD_C011_CMD_BASE + 0x142,
353
    eCMD_C011_DEC_CHAN_GET_DISPLAY_ORDER	= eCMD_C011_CMD_BASE + 0x143,
332
	eCMD_C011_DEC_CHAN_GET_DISPLAY_ORDER	= eCMD_C011_CMD_BASE + 0x143,
354
    eCMD_C011_DEC_CHAN_SET_HOST_TRICK_MODE	= eCMD_C011_CMD_BASE + 0x144,
333
	eCMD_C011_DEC_CHAN_SET_HOST_TRICK_MODE	= eCMD_C011_CMD_BASE + 0x144,
355
    eCMD_C011_DEC_CHAN_SET_OPERATION_MODE	= eCMD_C011_CMD_BASE + 0x145,
334
	eCMD_C011_DEC_CHAN_SET_OPERATION_MODE	= eCMD_C011_CMD_BASE + 0x145,
356
    eCMD_C011_DEC_CHAN_DISPLAY_PAUSE_UNTO_PTS	= eCMD_C011_CMD_BASE + 0x146,
335
	eCMD_C011_DEC_CHAN_DISPLAY_PAUSE_UNTO_PTS = eCMD_C011_CMD_BASE + 0x146,
357
    eCMD_C011_DEC_CHAN_SET_PTS_STC_DIFF_THRESHOLD = eCMD_C011_CMD_BASE + 0x147,
336
	eCMD_C011_DEC_CHAN_SET_PTS_STC_DIFF_THRESHOLD = eCMD_C011_CMD_BASE +
358
    eCMD_C011_DEC_CHAN_SEND_COMPRESSED_BUF	= eCMD_C011_CMD_BASE + 0x148,
337
								 0x147,
359
    eCMD_C011_DEC_CHAN_SET_CLIPPING		= eCMD_C011_CMD_BASE + 0x149,
338
	eCMD_C011_DEC_CHAN_SEND_COMPRESSED_BUF	= eCMD_C011_CMD_BASE + 0x148,
360
    eCMD_C011_DEC_CHAN_SET_PARAMETERS_FOR_HARD_RESET_INTERRUPT_TO_HOST
339
	eCMD_C011_DEC_CHAN_SET_CLIPPING		= eCMD_C011_CMD_BASE + 0x149,
361
						= eCMD_C011_CMD_BASE + 0x150,
340
	eCMD_C011_DEC_CHAN_SET_PARAMETERS_FOR_HARD_RESET_INTERRUPT_TO_HOST
362
341
		= eCMD_C011_CMD_BASE + 0x150,
363
    /* Decoder RevD commands */
342
364
    eCMD_C011_DEC_CHAN_SET_CSC	= eCMD_C011_CMD_BASE + 0x180, /* color space conversion */
343
	/* Decoder RevD commands */
365
    eCMD_C011_DEC_CHAN_SET_RANGE_REMAP	= eCMD_C011_CMD_BASE + 0x181,
344
	eCMD_C011_DEC_CHAN_SET_CSC	= eCMD_C011_CMD_BASE + 0x180, /* color
366
    eCMD_C011_DEC_CHAN_SET_FGT		= eCMD_C011_CMD_BASE + 0x182,
345
							 space conversion */
367
    /* Note: 0x183 not implemented yet in Rev D main */
346
	eCMD_C011_DEC_CHAN_SET_RANGE_REMAP	= eCMD_C011_CMD_BASE + 0x181,
368
    eCMD_C011_DEC_CHAN_SET_LASTPICTURE_PADDING = eCMD_C011_CMD_BASE + 0x183,
347
	eCMD_C011_DEC_CHAN_SET_FGT		= eCMD_C011_CMD_BASE + 0x182,
369
348
	/* Note: 0x183 not implemented yet in Rev D main */
370
    /* Decoder 7412 commands (7412-only) */
349
	eCMD_C011_DEC_CHAN_SET_LASTPICTURE_PADDING = eCMD_C011_CMD_BASE +
371
    eCMD_C011_DEC_CHAN_SET_CONTENT_KEY	= eCMD_C011_CMD_BASE + 0x190,
350
								 0x183,
372
    eCMD_C011_DEC_CHAN_SET_SESSION_KEY	= eCMD_C011_CMD_BASE + 0x191,
351
373
    eCMD_C011_DEC_CHAN_FMT_CHANGE_ACK	= eCMD_C011_CMD_BASE + 0x192,
352
	/* Decoder 7412 commands (7412-only) */
374
353
	eCMD_C011_DEC_CHAN_SET_CONTENT_KEY	= eCMD_C011_CMD_BASE + 0x190,
375
    eCMD_C011_DEC_CHAN_CUSTOM_VIDOUT    = eCMD_C011_CMD_BASE + 0x1FF,
354
	eCMD_C011_DEC_CHAN_SET_SESSION_KEY	= eCMD_C011_CMD_BASE + 0x191,
376
355
	eCMD_C011_DEC_CHAN_FMT_CHANGE_ACK	= eCMD_C011_CMD_BASE + 0x192,
377
    /* Encoding commands */
356
378
    eCMD_C011_ENC_CHAN_OPEN		= eCMD_C011_CMD_BASE + 0x200,
357
	eCMD_C011_DEC_CHAN_CUSTOM_VIDOUT    = eCMD_C011_CMD_BASE + 0x1FF,
379
    eCMD_C011_ENC_CHAN_CLOSE		= eCMD_C011_CMD_BASE + 0x201,
358
380
    eCMD_C011_ENC_CHAN_ACTIVATE		= eCMD_C011_CMD_BASE + 0x202,
359
	/* Encoding commands */
381
    eCMD_C011_ENC_CHAN_CONTROL		= eCMD_C011_CMD_BASE + 0x203,
360
	eCMD_C011_ENC_CHAN_OPEN		= eCMD_C011_CMD_BASE + 0x200,
382
    eCMD_C011_ENC_CHAN_STATISTICS	= eCMD_C011_CMD_BASE + 0x204,
361
	eCMD_C011_ENC_CHAN_CLOSE		= eCMD_C011_CMD_BASE + 0x201,
362
	eCMD_C011_ENC_CHAN_ACTIVATE		= eCMD_C011_CMD_BASE + 0x202,
363
	eCMD_C011_ENC_CHAN_CONTROL		= eCMD_C011_CMD_BASE + 0x203,
364
	eCMD_C011_ENC_CHAN_STATISTICS	= eCMD_C011_CMD_BASE + 0x204,
365
383
366
	eNOTIFY_C011_ENC_CHAN_EVENT		= eCMD_C011_CMD_BASE + 0x210,
384
    eNOTIFY_C011_ENC_CHAN_EVENT		= eCMD_C011_CMD_BASE + 0x210,
367
385
368
};
386
};
369
387
(-)crystalhd~/crystalhd_hw.c (-1888 / +507 lines)
Lines 4-10 Link Here
4
 *  Name: crystalhd_hw . c
4
 *  Name: crystalhd_hw . c
5
 *
5
 *
6
 *  Description:
6
 *  Description:
7
 *		BCM70010 Linux driver HW layer.
7
 *		BCM70012/BCM70015 Linux driver hardware layer.
8
 *
9
 *  HISTORY:
8
 *
10
 *
9
 **********************************************************************
11
 **********************************************************************
10
 * This file is part of the crystalhd device driver.
12
 * This file is part of the crystalhd device driver.
Lines 22-365 Link Here
22
 * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
24
 * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
23
 **********************************************************************/
25
 **********************************************************************/
24
26
25
#include "crystalhd.h"
26
27
#include <linux/pci.h>
27
#include <linux/pci.h>
28
#include <linux/slab.h>
29
#include <linux/delay.h>
28
#include <linux/delay.h>
29
#include <linux/device.h>
30
#include <asm/tsc.h>
31
#include <asm/msr.h>
32
#include "crystalhd_lnx.h"
33
#include "crystalhd_linkfuncs.h"
34
#include "crystalhd_fleafuncs.h"
30
35
31
/* Functions internal to this file */
36
#define OFFSETOF(_s_, _m_) ((size_t)(unsigned long)&(((_s_ *)0)->_m_))
32
33
static void crystalhd_enable_uarts(struct crystalhd_adp *adp)
34
{
35
	bc_dec_reg_wr(adp, UartSelectA, BSVS_UART_STREAM);
36
	bc_dec_reg_wr(adp, UartSelectB, BSVS_UART_DEC_OUTER);
37
}
38
39
40
static void crystalhd_start_dram(struct crystalhd_adp *adp)
41
{
42
	bc_dec_reg_wr(adp, SDRAM_PARAM, ((40 / 5 - 1) <<  0) |
43
	/* tras (40ns tras)/(5ns period) -1 ((15/5 - 1) <<  4) | // trcd */
44
		      ((15 / 5 - 1) <<  7) |	/* trp */
45
		      ((10 / 5 - 1) << 10) |	/* trrd */
46
		      ((15 / 5 + 1) << 12) |	/* twr */
47
		      ((2 + 1) << 16) |		/* twtr */
48
		      ((70 / 5 - 2) << 19) |	/* trfc */
49
		      (0 << 23));
50
51
	bc_dec_reg_wr(adp, SDRAM_PRECHARGE, 0);
52
	bc_dec_reg_wr(adp, SDRAM_EXT_MODE, 2);
53
	bc_dec_reg_wr(adp, SDRAM_MODE, 0x132);
54
	bc_dec_reg_wr(adp, SDRAM_PRECHARGE, 0);
55
	bc_dec_reg_wr(adp, SDRAM_REFRESH, 0);
56
	bc_dec_reg_wr(adp, SDRAM_REFRESH, 0);
57
	bc_dec_reg_wr(adp, SDRAM_MODE, 0x32);
58
	/* setting the refresh rate here */
59
	bc_dec_reg_wr(adp, SDRAM_REF_PARAM, ((1 << 12) | 96));
60
}
61
62
63
static bool crystalhd_bring_out_of_rst(struct crystalhd_adp *adp)
64
{
65
	union link_misc_perst_deco_ctrl rst_deco_cntrl;
66
	union link_misc_perst_clk_ctrl rst_clk_cntrl;
67
	uint32_t temp;
68
69
	/*
70
	 * Link clocks: MISC_PERST_CLOCK_CTRL Clear PLL power down bit,
71
	 * delay to allow PLL to lock Clear alternate clock, stop clock bits
72
	 */
73
	rst_clk_cntrl.whole_reg = crystalhd_reg_rd(adp, MISC_PERST_CLOCK_CTRL);
74
	rst_clk_cntrl.pll_pwr_dn = 0;
75
	crystalhd_reg_wr(adp, MISC_PERST_CLOCK_CTRL, rst_clk_cntrl.whole_reg);
76
	msleep_interruptible(50);
77
78
	rst_clk_cntrl.whole_reg = crystalhd_reg_rd(adp, MISC_PERST_CLOCK_CTRL);
79
	rst_clk_cntrl.stop_core_clk = 0;
80
	rst_clk_cntrl.sel_alt_clk = 0;
81
82
	crystalhd_reg_wr(adp, MISC_PERST_CLOCK_CTRL, rst_clk_cntrl.whole_reg);
83
	msleep_interruptible(50);
84
85
	/*
86
	 * Bus Arbiter Timeout: GISB_ARBITER_TIMER
87
	 * Set internal bus arbiter timeout to 40us based on core clock speed
88
	 * (63MHz * 40us = 0x9D8)
89
	 */
90
	crystalhd_reg_wr(adp, GISB_ARBITER_TIMER, 0x9D8);
91
92
	/*
93
	 * Decoder clocks: MISC_PERST_DECODER_CTRL
94
	 * Enable clocks while 7412 reset is asserted, delay
95
	 * De-assert 7412 reset
96
	 */
97
	rst_deco_cntrl.whole_reg = crystalhd_reg_rd(adp,
98
					 MISC_PERST_DECODER_CTRL);
99
	rst_deco_cntrl.stop_bcm_7412_clk = 0;
100
	rst_deco_cntrl.bcm7412_rst = 1;
101
	crystalhd_reg_wr(adp, MISC_PERST_DECODER_CTRL,
102
					 rst_deco_cntrl.whole_reg);
103
	msleep_interruptible(10);
104
105
	rst_deco_cntrl.whole_reg = crystalhd_reg_rd(adp,
106
					 MISC_PERST_DECODER_CTRL);
107
	rst_deco_cntrl.bcm7412_rst = 0;
108
	crystalhd_reg_wr(adp, MISC_PERST_DECODER_CTRL,
109
					 rst_deco_cntrl.whole_reg);
110
	msleep_interruptible(50);
111
112
	/* Disable OTP_CONTENT_MISC to 0 to disable all secure modes */
113
	crystalhd_reg_wr(adp, OTP_CONTENT_MISC, 0);
114
115
	/* Clear bit 29 of 0x404 */
116
	temp = crystalhd_reg_rd(adp, PCIE_TL_TRANSACTION_CONFIGURATION);
117
	temp &= ~BC_BIT(29);
118
	crystalhd_reg_wr(adp, PCIE_TL_TRANSACTION_CONFIGURATION, temp);
119
120
	/* 2.5V regulator must be set to 2.6 volts (+6%) */
121
	/* FIXME: jarod: what's the point of this reg read? */
122
	temp = crystalhd_reg_rd(adp, MISC_PERST_VREG_CTRL);
123
	crystalhd_reg_wr(adp, MISC_PERST_VREG_CTRL, 0xF3);
124
125
	return true;
126
}
127
128
static bool crystalhd_put_in_reset(struct crystalhd_adp *adp)
129
{
130
	union link_misc_perst_deco_ctrl rst_deco_cntrl;
131
	union link_misc_perst_clk_ctrl  rst_clk_cntrl;
132
	uint32_t                  temp;
133
134
	/*
135
	 * Decoder clocks: MISC_PERST_DECODER_CTRL
136
	 * Assert 7412 reset, delay
137
	 * Assert 7412 stop clock
138
	 */
139
	rst_deco_cntrl.whole_reg = crystalhd_reg_rd(adp,
140
					 MISC_PERST_DECODER_CTRL);
141
	rst_deco_cntrl.stop_bcm_7412_clk = 1;
142
	crystalhd_reg_wr(adp, MISC_PERST_DECODER_CTRL,
143
					 rst_deco_cntrl.whole_reg);
144
	msleep_interruptible(50);
145
146
	/* Bus Arbiter Timeout: GISB_ARBITER_TIMER
147
	 * Set internal bus arbiter timeout to 40us based on core clock speed
148
	 * (6.75MHZ * 40us = 0x10E)
149
	 */
150
	crystalhd_reg_wr(adp, GISB_ARBITER_TIMER, 0x10E);
151
152
	/* Link clocks: MISC_PERST_CLOCK_CTRL
153
	 * Stop core clk, delay
154
	 * Set alternate clk, delay, set PLL power down
155
	 */
156
	rst_clk_cntrl.whole_reg = crystalhd_reg_rd(adp, MISC_PERST_CLOCK_CTRL);
157
	rst_clk_cntrl.stop_core_clk = 1;
158
	rst_clk_cntrl.sel_alt_clk = 1;
159
	crystalhd_reg_wr(adp, MISC_PERST_CLOCK_CTRL, rst_clk_cntrl.whole_reg);
160
	msleep_interruptible(50);
161
162
	rst_clk_cntrl.whole_reg = crystalhd_reg_rd(adp, MISC_PERST_CLOCK_CTRL);
163
	rst_clk_cntrl.pll_pwr_dn = 1;
164
	crystalhd_reg_wr(adp, MISC_PERST_CLOCK_CTRL, rst_clk_cntrl.whole_reg);
165
166
	/*
167
	 * Read and restore the Transaction Configuration Register
168
	 * after core reset
169
	 */
170
	temp = crystalhd_reg_rd(adp, PCIE_TL_TRANSACTION_CONFIGURATION);
171
172
	/*
173
	 * Link core soft reset: MISC3_RESET_CTRL
174
	 * - Write BIT[0]=1 and read it back for core reset to take place
175
	 */
176
	crystalhd_reg_wr(adp, MISC3_RESET_CTRL, 1);
177
	rst_deco_cntrl.whole_reg = crystalhd_reg_rd(adp, MISC3_RESET_CTRL);
178
	msleep_interruptible(50);
179
180
	/* restore the transaction configuration register */
181
	crystalhd_reg_wr(adp, PCIE_TL_TRANSACTION_CONFIGURATION, temp);
182
183
	return true;
184
}
185
186
static void crystalhd_disable_interrupts(struct crystalhd_adp *adp)
187
{
188
	union intr_mask_reg   intr_mask;
189
	intr_mask.whole_reg = crystalhd_reg_rd(adp, INTR_INTR_MSK_STS_REG);
190
	intr_mask.mask_pcie_err = 1;
191
	intr_mask.mask_pcie_rbusmast_err = 1;
192
	intr_mask.mask_pcie_rgr_bridge   = 1;
193
	intr_mask.mask_rx_done = 1;
194
	intr_mask.mask_rx_err  = 1;
195
	intr_mask.mask_tx_done = 1;
196
	intr_mask.mask_tx_err  = 1;
197
	crystalhd_reg_wr(adp, INTR_INTR_MSK_SET_REG, intr_mask.whole_reg);
198
199
	return;
200
}
201
202
static void crystalhd_enable_interrupts(struct crystalhd_adp *adp)
203
{
204
	union intr_mask_reg   intr_mask;
205
	intr_mask.whole_reg = crystalhd_reg_rd(adp, INTR_INTR_MSK_STS_REG);
206
	intr_mask.mask_pcie_err = 1;
207
	intr_mask.mask_pcie_rbusmast_err = 1;
208
	intr_mask.mask_pcie_rgr_bridge   = 1;
209
	intr_mask.mask_rx_done = 1;
210
	intr_mask.mask_rx_err  = 1;
211
	intr_mask.mask_tx_done = 1;
212
	intr_mask.mask_tx_err  = 1;
213
	crystalhd_reg_wr(adp, INTR_INTR_MSK_CLR_REG, intr_mask.whole_reg);
214
215
	return;
216
}
217
218
static void crystalhd_clear_errors(struct crystalhd_adp *adp)
219
{
220
	uint32_t reg;
221
222
	/* FIXME: jarod: wouldn't we want to write a 0 to the reg?
223
	 Or does the write clear the bits specified? */
224
	reg = crystalhd_reg_rd(adp, MISC1_Y_RX_ERROR_STATUS);
225
	if (reg)
226
		crystalhd_reg_wr(adp, MISC1_Y_RX_ERROR_STATUS, reg);
227
228
	reg = crystalhd_reg_rd(adp, MISC1_UV_RX_ERROR_STATUS);
229
	if (reg)
230
		crystalhd_reg_wr(adp, MISC1_UV_RX_ERROR_STATUS, reg);
231
232
	reg = crystalhd_reg_rd(adp, MISC1_TX_DMA_ERROR_STATUS);
233
	if (reg)
234
		crystalhd_reg_wr(adp, MISC1_TX_DMA_ERROR_STATUS, reg);
235
}
236
237
static void crystalhd_clear_interrupts(struct crystalhd_adp *adp)
238
{
239
	uint32_t intr_sts = crystalhd_reg_rd(adp, INTR_INTR_STATUS);
240
241
	if (intr_sts) {
242
		crystalhd_reg_wr(adp, INTR_INTR_CLR_REG, intr_sts);
243
244
		/* Write End Of Interrupt for PCIE */
245
		crystalhd_reg_wr(adp, INTR_EOI_CTRL, 1);
246
	}
247
}
248
249
static void crystalhd_soft_rst(struct crystalhd_adp *adp)
250
{
251
	uint32_t val;
252
253
	/* Assert c011 soft reset*/
254
	bc_dec_reg_wr(adp, DecHt_HostSwReset, 0x00000001);
255
	msleep_interruptible(50);
256
257
	/* Release c011 soft reset*/
258
	bc_dec_reg_wr(adp, DecHt_HostSwReset, 0x00000000);
259
260
	/* Disable Stuffing..*/
261
	val = crystalhd_reg_rd(adp, MISC2_GLOBAL_CTRL);
262
	val |= BC_BIT(8);
263
	crystalhd_reg_wr(adp, MISC2_GLOBAL_CTRL, val);
264
}
265
37
266
static bool crystalhd_load_firmware_config(struct crystalhd_adp *adp)
38
BC_STATUS crystalhd_hw_open(struct crystalhd_hw *hw, struct crystalhd_adp *adp)
267
{
39
{
268
	uint32_t i = 0, reg;
40
	struct device *dev;
269
41
	if (!hw || !adp) {
270
	crystalhd_reg_wr(adp, DCI_DRAM_BASE_ADDR, (BC_DRAM_FW_CFG_ADDR >> 19));
42
		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
271
43
		return BC_STS_INV_ARG;
272
	crystalhd_reg_wr(adp, AES_CMD, 0);
273
	crystalhd_reg_wr(adp, AES_CONFIG_INFO,
274
		 (BC_DRAM_FW_CFG_ADDR & 0x7FFFF));
275
	crystalhd_reg_wr(adp, AES_CMD, 0x1);
276
277
	/* FIXME: jarod: I've seen this fail,
278
	 and introducing extra delays helps... */
279
	for (i = 0; i < 100; ++i) {
280
		reg = crystalhd_reg_rd(adp, AES_STATUS);
281
		if (reg & 0x1)
282
			return true;
283
		msleep_interruptible(10);
284
	}
44
	}
285
45
286
	return false;
46
	if (hw->dev_started)
287
}
47
		return BC_STS_SUCCESS;
288
289
290
static bool crystalhd_start_device(struct crystalhd_adp *adp)
291
{
292
	uint32_t dbg_options, glb_cntrl = 0, reg_pwrmgmt = 0;
293
294
	BCMLOG(BCMLOG_INFO, "Starting BCM70012 Device\n");
295
296
	reg_pwrmgmt = crystalhd_reg_rd(adp, PCIE_DLL_DATA_LINK_CONTROL);
297
	reg_pwrmgmt &= ~ASPM_L1_ENABLE;
298
299
	crystalhd_reg_wr(adp, PCIE_DLL_DATA_LINK_CONTROL, reg_pwrmgmt);
300
48
301
	if (!crystalhd_bring_out_of_rst(adp)) {
49
	dev = &adp->pdev->dev;
302
		BCMLOG_ERR("Failed To Bring Link Out Of Reset\n");
50
	hw->PauseThreshold = BC_RX_LIST_CNT - 2;
303
		return false;
51
	hw->DefaultPauseThreshold = BC_RX_LIST_CNT - 2;
52
	hw->ResumeThreshold = 3;
53
54
	/* Setup HW specific functions appropriately */
55
	if (adp->pdev->device == BC_PCI_DEVID_FLEA) {
56
		dev_dbg(dev, "crystalhd_hw_open: setting up functions, device = Flea\n");
57
		hw->pfnStartDevice = crystalhd_flea_start_device;
58
		hw->pfnStopDevice = crystalhd_flea_stop_device;
59
		hw->pfnFindAndClearIntr = crystalhd_flea_hw_interrupt_handle;
60
		hw->pfnReadDevRegister = crystalhd_flea_reg_rd;					/* Done */
61
		hw->pfnWriteDevRegister = crystalhd_flea_reg_wr;				/* Done */
62
		hw->pfnReadFPGARegister = crystalhd_flea_reg_rd;				/* Done */
63
		hw->pfnWriteFPGARegister = crystalhd_flea_reg_wr;				/* Done */
64
		hw->pfnCheckInputFIFO = crystalhd_flea_check_input_full;
65
		hw->pfnDevDRAMRead = crystalhd_flea_mem_rd;						/* Done */
66
		hw->pfnDevDRAMWrite = crystalhd_flea_mem_wr;					/* Done */
67
		hw->pfnDoFirmwareCmd = crystalhd_flea_do_fw_cmd;
68
		hw->pfnFWDwnld = crystalhd_flea_download_fw;
69
		hw->pfnHWGetDoneSize = crystalhd_flea_get_dnsz;
70
		hw->pfnIssuePause = crystalhd_flea_hw_pause;
71
		hw->pfnPeekNextDeodedFr = crystalhd_flea_peek_next_decoded_frame;
72
		hw->pfnPostRxSideBuff = crystalhd_flea_hw_post_cap_buff;
73
		hw->pfnStartTxDMA = crystalhd_flea_start_tx_dma_engine;
74
		hw->pfnStopTxDMA = crystalhd_flea_stop_tx_dma_engine;
75
		hw->pfnStopRXDMAEngines = crystalhd_flea_stop_rx_dma_engine;
76
		hw->pfnNotifyFLLChange = crystalhd_flea_notify_fll_change;
77
		hw->pfnNotifyHardware = crystalhd_flea_notify_event;
78
	} else {
79
		dev_dbg(dev, "crystalhd_hw_open: setting up functions, device = Link\n");
80
		hw->pfnStartDevice = crystalhd_link_start_device;
81
		hw->pfnStopDevice = crystalhd_link_stop_device;
82
		hw->pfnFindAndClearIntr = crystalhd_link_hw_interrupt_handle;
83
		hw->pfnReadDevRegister = link_dec_reg_rd;
84
		hw->pfnWriteDevRegister = link_dec_reg_wr;
85
		hw->pfnReadFPGARegister = crystalhd_link_reg_rd;
86
		hw->pfnWriteFPGARegister = crystalhd_link_reg_wr;
87
		hw->pfnCheckInputFIFO = crystalhd_link_check_input_full;
88
		hw->pfnDevDRAMRead = crystalhd_link_mem_rd;
89
		hw->pfnDevDRAMWrite = crystalhd_link_mem_wr;
90
		hw->pfnDoFirmwareCmd = crystalhd_link_do_fw_cmd;
91
		hw->pfnFWDwnld = crystalhd_link_download_fw;
92
		hw->pfnHWGetDoneSize = crystalhd_link_get_dnsz;
93
		hw->pfnIssuePause = crystalhd_link_hw_pause;
94
		hw->pfnPeekNextDeodedFr = crystalhd_link_peek_next_decoded_frame;
95
		hw->pfnPostRxSideBuff = crystalhd_link_hw_post_cap_buff;
96
		hw->pfnStartTxDMA = crystalhd_link_start_tx_dma_engine;
97
		hw->pfnStopTxDMA = crystalhd_link_stop_tx_dma_engine;
98
		hw->pfnStopRXDMAEngines = crystalhd_link_stop_rx_dma_engine;
99
		hw->pfnNotifyFLLChange = crystalhd_link_notify_fll_change;
100
		hw->pfnNotifyHardware = crystalhd_link_notify_event;
304
	}
101
	}
305
102
306
	crystalhd_disable_interrupts(adp);
103
	hw->adp = adp;
307
104
	spin_lock_init(&hw->lock);
308
	crystalhd_clear_errors(adp);
105
	spin_lock_init(&hw->rx_lock);
309
106
	sema_init(&hw->fetch_sem, 1);
310
	crystalhd_clear_interrupts(adp);
311
312
	crystalhd_enable_interrupts(adp);
313
314
	/* Enable the option for getting the total no. of DWORDS
315
	 * that have been transferred by the RXDMA engine
316
	 */
317
	dbg_options = crystalhd_reg_rd(adp, MISC1_DMA_DEBUG_OPTIONS_REG);
318
	dbg_options |= 0x10;
319
	crystalhd_reg_wr(adp, MISC1_DMA_DEBUG_OPTIONS_REG, dbg_options);
320
107
321
	/* Enable PCI Global Control options */
108
	/* Seed for error checking and debugging. Random numbers */
322
	glb_cntrl = crystalhd_reg_rd(adp, MISC2_GLOBAL_CTRL);
109
	hw->tx_ioq_tag_seed = 0x70023070;
323
	glb_cntrl |= 0x100;
110
	hw->rx_pkt_tag_seed = 0x70029070;
324
	glb_cntrl |= 0x8000;
325
	crystalhd_reg_wr(adp, MISC2_GLOBAL_CTRL, glb_cntrl);
326
111
327
	crystalhd_enable_interrupts(adp);
112
	hw->stop_pending = 0;
113
	hw->pfnStartDevice(hw);
114
	hw->dev_started = true;
328
115
329
	crystalhd_soft_rst(adp);
116
	dev_dbg(dev, "Opening HW. hw:0x%lx, hw->adp:0x%lx\n",
330
	crystalhd_start_dram(adp);
117
		(uintptr_t)hw, (uintptr_t)(hw->adp));
331
	crystalhd_enable_uarts(adp);
332
118
333
	return true;
119
	return BC_STS_SUCCESS;
334
}
120
}
335
121
336
static bool crystalhd_stop_device(struct crystalhd_adp *adp)
122
BC_STATUS crystalhd_hw_close(struct crystalhd_hw *hw, struct crystalhd_adp *adp)
337
{
123
{
338
	uint32_t reg;
124
	if (!hw) {
339
125
		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
340
	BCMLOG(BCMLOG_INFO, "Stopping BCM70012 Device\n");
126
		return BC_STS_SUCCESS;
341
	/* Clear and disable interrupts */
127
	}
342
	crystalhd_disable_interrupts(adp);
343
	crystalhd_clear_errors(adp);
344
	crystalhd_clear_interrupts(adp);
345
128
346
	if (!crystalhd_put_in_reset(adp))
129
	if (!hw->dev_started)
347
		BCMLOG_ERR("Failed to Put Link To Reset State\n");
130
		return BC_STS_SUCCESS;
348
131
349
	reg = crystalhd_reg_rd(adp, PCIE_DLL_DATA_LINK_CONTROL);
132
	/* Stop and DDR sleep will happen in here */
350
	reg |= ASPM_L1_ENABLE;
133
	/* Only stop the HW if we are the last user */
351
	crystalhd_reg_wr(adp, PCIE_DLL_DATA_LINK_CONTROL, reg);
134
	if(adp->cfg_users == 1)
135
		crystalhd_hw_suspend(hw);
352
136
353
	/* Set PCI Clk Req */
137
	hw->dev_started = false;
354
	reg = crystalhd_reg_rd(adp, PCIE_CLK_REQ_REG);
355
	reg |= PCI_CLK_REQ_ENABLE;
356
	crystalhd_reg_wr(adp, PCIE_CLK_REQ_REG, reg);
357
138
358
	return true;
139
	return BC_STS_SUCCESS;
359
}
140
}
360
141
361
static struct crystalhd_rx_dma_pkt *crystalhd_hw_alloc_rx_pkt(
142
struct crystalhd_rx_dma_pkt *crystalhd_hw_alloc_rx_pkt(struct crystalhd_hw *hw)
362
					struct crystalhd_hw *hw)
363
{
143
{
364
	unsigned long flags = 0;
144
	unsigned long flags = 0;
365
	struct crystalhd_rx_dma_pkt *temp = NULL;
145
	struct crystalhd_rx_dma_pkt *temp = NULL;
Lines 380-386 static struct crystalhd_rx_dma_pkt *crys Link Here
380
	return temp;
160
	return temp;
381
}
161
}
382
162
383
static void crystalhd_hw_free_rx_pkt(struct crystalhd_hw *hw,
163
void crystalhd_hw_free_rx_pkt(struct crystalhd_hw *hw,
384
				   struct crystalhd_rx_dma_pkt *pkt)
164
				   struct crystalhd_rx_dma_pkt *pkt)
385
{
165
{
386
	unsigned long flags = 0;
166
	unsigned long flags = 0;
Lines 398-409 static void crystalhd_hw_free_rx_pkt(str Link Here
398
 * Call back from TX - IOQ deletion.
178
 * Call back from TX - IOQ deletion.
399
 *
179
 *
400
 * This routine will release the TX DMA rings allocated
180
 * This routine will release the TX DMA rings allocated
401
 * during setup_dma rings interface.
181
 * druing setup_dma rings interface.
402
 *
182
 *
403
 * Memory is allocated per DMA ring basis. This is just
183
 * Memory is allocated per DMA ring basis. This is just
404
 * a place holder to be able to create the dio queues.
184
 * a place holder to be able to create the dio queues.
405
 */
185
 */
406
static void crystalhd_tx_desc_rel_call_back(void *context, void *data)
186
void crystalhd_tx_desc_rel_call_back(void *context, void *data)
407
{
187
{
408
}
188
}
409
189
Lines 414-433 static void crystalhd_tx_desc_rel_call_b Link Here
414
 * back to our free pool. The actual cleanup of the DMA
194
 * back to our free pool. The actual cleanup of the DMA
415
 * ring descriptors happen during dma ring release.
195
 * ring descriptors happen during dma ring release.
416
 */
196
 */
417
static void crystalhd_rx_pkt_rel_call_back(void *context, void *data)
197
void crystalhd_rx_pkt_rel_call_back(void *context, void *data)
418
{
198
{
419
	struct crystalhd_hw *hw = (struct crystalhd_hw *)context;
199
	struct crystalhd_hw *hw = (struct crystalhd_hw *)context;
420
	struct crystalhd_rx_dma_pkt *pkt = (struct crystalhd_rx_dma_pkt *)data;
200
	struct crystalhd_rx_dma_pkt *pkt = (struct crystalhd_rx_dma_pkt *)data;
421
201
422
	if (!pkt || !hw) {
202
	if (!pkt || !hw) {
423
		BCMLOG_ERR("Invalid arg - %p %p\n", hw, pkt);
203
		printk(KERN_ERR "%s: Invalid arg - %p %p\n", __func__, hw, pkt);
424
		return;
204
		return;
425
	}
205
	}
426
206
427
	if (pkt->dio_req)
207
	if (pkt->dio_req)
428
		crystalhd_unmap_dio(hw->adp, pkt->dio_req);
208
		crystalhd_unmap_dio(hw->adp, pkt->dio_req);
429
	else
430
		BCMLOG_ERR("Missing dio_req: 0x%x\n", pkt->pkt_tag);
431
209
432
	crystalhd_hw_free_rx_pkt(hw, pkt);
210
	crystalhd_hw_free_rx_pkt(hw, pkt);
433
}
211
}
Lines 438-449 static void crystalhd_rx_pkt_rel_call_ba Link Here
438
		q = NULL;			\
216
		q = NULL;			\
439
	}
217
	}
440
218
441
static void crystalhd_hw_delete_ioqs(struct crystalhd_hw *hw)
219
void crystalhd_hw_delete_ioqs(struct crystalhd_hw *hw)
442
{
220
{
443
	if (!hw)
221
	if (!hw)
444
		return;
222
		return;
445
223
446
	BCMLOG(BCMLOG_DBG, "Deleting IOQs\n");
447
	crystalhd_hw_delete_ioq(hw->adp, hw->tx_actq);
224
	crystalhd_hw_delete_ioq(hw->adp, hw->tx_actq);
448
	crystalhd_hw_delete_ioq(hw->adp, hw->tx_freeq);
225
	crystalhd_hw_delete_ioq(hw->adp, hw->tx_freeq);
449
	crystalhd_hw_delete_ioq(hw->adp, hw->rx_actq);
226
	crystalhd_hw_delete_ioq(hw->adp, hw->rx_actq);
Lines 464-475 do { \ Link Here
464
 * TX - Active & Free
241
 * TX - Active & Free
465
 * RX - Active, Ready and Free.
242
 * RX - Active, Ready and Free.
466
 */
243
 */
467
static enum BC_STATUS crystalhd_hw_create_ioqs(struct crystalhd_hw   *hw)
244
BC_STATUS crystalhd_hw_create_ioqs(struct crystalhd_hw *hw)
468
{
245
{
469
	enum BC_STATUS   sts = BC_STS_SUCCESS;
246
	BC_STATUS   sts = BC_STS_SUCCESS;
470
247
471
	if (!hw) {
248
	if (!hw) {
472
		BCMLOG_ERR("Invalid Arg!!\n");
249
		printk(KERN_ERR "%s: Invalid Arg!!\n", __func__);
473
		return BC_STS_INV_ARG;
250
		return BC_STS_INV_ARG;
474
	}
251
	}
475
252
Lines 493-556 hw_create_ioq_err: Link Here
493
	return sts;
270
	return sts;
494
}
271
}
495
272
273
BC_STATUS crystalhd_hw_setup_dma_rings(struct crystalhd_hw *hw)
274
{
275
	struct device *dev;
276
	unsigned int i;
277
	void *mem;
278
	size_t mem_len;
279
	dma_addr_t phy_addr;
280
	BC_STATUS sts = BC_STS_SUCCESS;
281
	struct crystalhd_rx_dma_pkt *rpkt;
282
283
	if (!hw || !hw->adp) {
284
		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
285
		return BC_STS_INV_ARG;
286
	}
287
288
	dev = &hw->adp->pdev->dev;
289
290
	sts = crystalhd_hw_create_ioqs(hw);
291
	if (sts != BC_STS_SUCCESS) {
292
		dev_err(dev, "Failed to create IOQs..\n");
293
		return sts;
294
	}
295
296
	mem_len = BC_LINK_MAX_SGLS * sizeof(struct dma_descriptor);
297
298
	for (i = 0; i < BC_TX_LIST_CNT; i++) {
299
		mem = bc_kern_dma_alloc(hw->adp, mem_len, &phy_addr);
300
		if (mem) {
301
			memset(mem, 0, mem_len);
302
		} else {
303
			dev_err(dev, "Insufficient Memory For TX\n");
304
			crystalhd_hw_free_dma_rings(hw);
305
			return BC_STS_INSUFF_RES;
306
		}
307
		/* rx_pkt_pool -- static memory allocation  */
308
		hw->tx_pkt_pool[i].desc_mem.pdma_desc_start = mem;
309
		hw->tx_pkt_pool[i].desc_mem.phy_addr = phy_addr;
310
		hw->tx_pkt_pool[i].desc_mem.sz = BC_LINK_MAX_SGLS *
311
						 sizeof(struct dma_descriptor);
312
		hw->tx_pkt_pool[i].list_tag = 0;
313
314
		/* Add TX dma requests to Free Queue..*/
315
		sts = crystalhd_dioq_add(hw->tx_freeq,
316
				       &hw->tx_pkt_pool[i], false, 0);
317
		if (sts != BC_STS_SUCCESS) {
318
			crystalhd_hw_free_dma_rings(hw);
319
			return sts;
320
		}
321
	}
322
323
	for (i = 0; i < BC_RX_LIST_CNT; i++) {
324
		rpkt = kzalloc(sizeof(*rpkt), GFP_KERNEL);
325
		if (!rpkt) {
326
			dev_err(dev, "Insufficient Memory For RX\n");
327
			crystalhd_hw_free_dma_rings(hw);
328
			return BC_STS_INSUFF_RES;
329
		}
330
331
		mem = bc_kern_dma_alloc(hw->adp, mem_len, &phy_addr);
332
		if (mem) {
333
			memset(mem, 0, mem_len);
334
		} else {
335
			dev_err(dev, "Insufficient Memory For RX\n");
336
			crystalhd_hw_free_dma_rings(hw);
337
			return BC_STS_INSUFF_RES;
338
		}
339
		rpkt->desc_mem.pdma_desc_start = mem;
340
		rpkt->desc_mem.phy_addr = phy_addr;
341
		rpkt->desc_mem.sz  = BC_LINK_MAX_SGLS * sizeof(struct dma_descriptor);
342
		rpkt->pkt_tag = hw->rx_pkt_tag_seed + i;
343
		crystalhd_hw_free_rx_pkt(hw, rpkt);
344
	}
345
346
	return BC_STS_SUCCESS;
347
}
496
348
497
static bool crystalhd_code_in_full(struct crystalhd_adp *adp,
349
BC_STATUS crystalhd_hw_free_dma_rings(struct crystalhd_hw *hw)
498
		 uint32_t needed_sz, bool b_188_byte_pkts,  uint8_t flags)
499
{
350
{
500
	uint32_t base, end, writep, readp;
351
	unsigned int i;
501
	uint32_t cpbSize, cpbFullness, fifoSize;
352
	struct crystalhd_rx_dma_pkt *rpkt = NULL;
502
353
503
	if (flags & 0x02) { /* ASF Bit is set */
354
	if (!hw || !hw->adp) {
504
		base   = bc_dec_reg_rd(adp, REG_Dec_TsAudCDB2Base);
355
		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
505
		end    = bc_dec_reg_rd(adp, REG_Dec_TsAudCDB2End);
356
		return BC_STS_INV_ARG;
506
		writep = bc_dec_reg_rd(adp, REG_Dec_TsAudCDB2Wrptr);
507
		readp  = bc_dec_reg_rd(adp, REG_Dec_TsAudCDB2Rdptr);
508
	} else if (b_188_byte_pkts) { /*Encrypted 188 byte packets*/
509
		base   = bc_dec_reg_rd(adp, REG_Dec_TsUser0Base);
510
		end    = bc_dec_reg_rd(adp, REG_Dec_TsUser0End);
511
		writep = bc_dec_reg_rd(adp, REG_Dec_TsUser0Wrptr);
512
		readp  = bc_dec_reg_rd(adp, REG_Dec_TsUser0Rdptr);
513
	} else {
514
		base   = bc_dec_reg_rd(adp, REG_DecCA_RegCinBase);
515
		end    = bc_dec_reg_rd(adp, REG_DecCA_RegCinEnd);
516
		writep = bc_dec_reg_rd(adp, REG_DecCA_RegCinWrPtr);
517
		readp  = bc_dec_reg_rd(adp, REG_DecCA_RegCinRdPtr);
518
	}
357
	}
519
358
520
	cpbSize = end - base;
359
	/* Delete all IOQs.. */
521
	if (writep >= readp)
360
	crystalhd_hw_delete_ioqs(hw);
522
		cpbFullness = writep - readp;
523
	else
524
		cpbFullness = (end - base) - (readp - writep);
525
361
526
	fifoSize = cpbSize - cpbFullness;
362
	for (i = 0; i < BC_TX_LIST_CNT; i++) {
363
		if (hw->tx_pkt_pool[i].desc_mem.pdma_desc_start) {
364
			bc_kern_dma_free(hw->adp,
365
				hw->tx_pkt_pool[i].desc_mem.sz,
366
				hw->tx_pkt_pool[i].desc_mem.pdma_desc_start,
367
				hw->tx_pkt_pool[i].desc_mem.phy_addr);
527
368
528
	if (fifoSize < BC_INFIFO_THRESHOLD)
369
			hw->tx_pkt_pool[i].desc_mem.pdma_desc_start = NULL;
529
		return true;
370
		}
371
	}
530
372
531
	if (needed_sz > (fifoSize - BC_INFIFO_THRESHOLD))
373
	dev_dbg(&hw->adp->pdev->dev, "Releasing RX Pkt pool\n");
532
		return true;
374
	for (i = 0; i < BC_RX_LIST_CNT; i++) {
375
		rpkt = crystalhd_hw_alloc_rx_pkt(hw);
376
		if (!rpkt)
377
			break;
378
		bc_kern_dma_free(hw->adp, rpkt->desc_mem.sz,
379
				 rpkt->desc_mem.pdma_desc_start,
380
				 rpkt->desc_mem.phy_addr);
381
		kfree(rpkt);
382
	}
533
383
534
	return false;
384
	return BC_STS_SUCCESS;
535
}
385
}
536
386
537
static enum BC_STATUS crystalhd_hw_tx_req_complete(struct crystalhd_hw *hw,
387
BC_STATUS crystalhd_hw_tx_req_complete(struct crystalhd_hw *hw,
538
					 uint32_t list_id, enum BC_STATUS cs)
388
											  uint32_t list_id, BC_STATUS cs)
539
{
389
{
540
	struct tx_dma_pkt *tx_req;
390
	struct tx_dma_pkt *tx_req;
541
391
542
	if (!hw || !list_id) {
392
	if (!hw || !list_id) {
543
		BCMLOG_ERR("Invalid Arg..\n");
393
		printk(KERN_ERR "%s: Invalid Arg!!\n", __func__);
544
		return BC_STS_INV_ARG;
394
		return BC_STS_INV_ARG;
545
	}
395
	}
546
396
547
	hw->pwr_lock--;
397
	tx_req = (struct tx_dma_pkt *)crystalhd_dioq_find_and_fetch(hw->tx_actq, list_id);
548
549
	tx_req = (struct tx_dma_pkt *)crystalhd_dioq_find_and_fetch(
550
					hw->tx_actq, list_id);
551
	if (!tx_req) {
398
	if (!tx_req) {
552
		if (cs != BC_STS_IO_USER_ABORT)
399
		if (cs != BC_STS_IO_USER_ABORT)
553
			BCMLOG_ERR("Find and Fetch Did not find req\n");
400
			dev_err(&hw->adp->pdev->dev, "Find/Fetch: no req!\n");
554
		return BC_STS_NO_DATA;
401
		return BC_STS_NO_DATA;
555
	}
402
	}
556
403
Lines 560-567 static enum BC_STATUS crystalhd_hw_tx_re Link Here
560
		tx_req->cb_event  = NULL;
407
		tx_req->cb_event  = NULL;
561
		tx_req->call_back = NULL;
408
		tx_req->call_back = NULL;
562
	} else {
409
	} else {
563
		BCMLOG(BCMLOG_DBG, "Missing Tx Callback - %X\n",
410
		dev_dbg(&hw->adp->pdev->dev, "Missing Tx Callback - %X\n",
564
		       tx_req->list_tag);
411
		tx_req->list_tag);
565
	}
412
	}
566
413
567
	/* Now put back the tx_list back in FreeQ */
414
	/* Now put back the tx_list back in FreeQ */
Lines 570-715 static enum BC_STATUS crystalhd_hw_tx_re Link Here
570
	return crystalhd_dioq_add(hw->tx_freeq, tx_req, false, 0);
417
	return crystalhd_dioq_add(hw->tx_freeq, tx_req, false, 0);
571
}
418
}
572
419
573
static bool crystalhd_tx_list0_handler(struct crystalhd_hw *hw,
420
BC_STATUS crystalhd_hw_fill_desc(struct crystalhd_dio_req *ioreq,
574
					 uint32_t err_sts)
421
										struct dma_descriptor *desc,
575
{
422
										dma_addr_t desc_paddr_base,
576
	uint32_t err_mask, tmp;
423
										uint32_t sg_cnt, uint32_t sg_st_ix,
577
	unsigned long flags = 0;
424
										uint32_t sg_st_off, uint32_t xfr_sz,
578
425
										struct device *dev, uint32_t destDRAMaddr)
579
	err_mask = MISC1_TX_DMA_ERROR_STATUS_TX_L0_DESC_TX_ABORT_ERRORS_MASK |
580
		MISC1_TX_DMA_ERROR_STATUS_TX_L0_DMA_DATA_TX_ABORT_ERRORS_MASK |
581
		MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_MASK;
582
583
	if (!(err_sts & err_mask))
584
		return false;
585
586
	BCMLOG_ERR("Error on Tx-L0 %x\n", err_sts);
587
588
	tmp = err_mask;
589
590
	if (err_sts & MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_MASK)
591
		tmp &= ~MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_MASK;
592
593
	if (tmp) {
594
		spin_lock_irqsave(&hw->lock, flags);
595
		/* reset list index.*/
596
		hw->tx_list_post_index = 0;
597
		spin_unlock_irqrestore(&hw->lock, flags);
598
	}
599
600
	tmp = err_sts & err_mask;
601
	crystalhd_reg_wr(hw->adp, MISC1_TX_DMA_ERROR_STATUS, tmp);
602
603
	return true;
604
}
605
606
static bool crystalhd_tx_list1_handler(struct crystalhd_hw *hw,
607
					 uint32_t err_sts)
608
{
609
	uint32_t err_mask, tmp;
610
	unsigned long flags = 0;
611
612
	err_mask = MISC1_TX_DMA_ERROR_STATUS_TX_L1_DESC_TX_ABORT_ERRORS_MASK |
613
		MISC1_TX_DMA_ERROR_STATUS_TX_L1_DMA_DATA_TX_ABORT_ERRORS_MASK |
614
		MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_MASK;
615
616
	if (!(err_sts & err_mask))
617
		return false;
618
619
	BCMLOG_ERR("Error on Tx-L1 %x\n", err_sts);
620
621
	tmp = err_mask;
622
623
	if (err_sts & MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_MASK)
624
		tmp &= ~MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_MASK;
625
626
	if (tmp) {
627
		spin_lock_irqsave(&hw->lock, flags);
628
		/* reset list index.*/
629
		hw->tx_list_post_index = 0;
630
		spin_unlock_irqrestore(&hw->lock, flags);
631
	}
632
633
	tmp = err_sts & err_mask;
634
	crystalhd_reg_wr(hw->adp, MISC1_TX_DMA_ERROR_STATUS, tmp);
635
636
	return true;
637
}
638
639
static void crystalhd_tx_isr(struct crystalhd_hw *hw, uint32_t int_sts)
640
{
641
	uint32_t err_sts;
642
643
	if (int_sts & INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_MASK)
644
		crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 0,
645
					   BC_STS_SUCCESS);
646
647
	if (int_sts & INTR_INTR_STATUS_L1_TX_DMA_DONE_INTR_MASK)
648
		crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 1,
649
					   BC_STS_SUCCESS);
650
651
	if (!(int_sts & (INTR_INTR_STATUS_L0_TX_DMA_ERR_INTR_MASK |
652
			INTR_INTR_STATUS_L1_TX_DMA_ERR_INTR_MASK))) {
653
			/* No error mask set.. */
654
			return;
655
	}
656
657
	/* Handle Tx errors. */
658
	err_sts = crystalhd_reg_rd(hw->adp, MISC1_TX_DMA_ERROR_STATUS);
659
660
	if (crystalhd_tx_list0_handler(hw, err_sts))
661
		crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 0,
662
					   BC_STS_ERROR);
663
664
	if (crystalhd_tx_list1_handler(hw, err_sts))
665
		crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 1,
666
					   BC_STS_ERROR);
667
668
	hw->stats.tx_errors++;
669
}
670
671
static void crystalhd_hw_dump_desc(struct dma_descriptor *p_dma_desc,
672
				 uint32_t ul_desc_index, uint32_t cnt)
673
{
674
	uint32_t ix, ll = 0;
675
676
	if (!p_dma_desc || !cnt)
677
		return;
678
679
	/* FIXME: jarod: perhaps a modparam desc_debug to enable this,
680
	 rather than setting ll (log level, I presume) to non-zero? */
681
	if (!ll)
682
		return;
683
684
	for (ix = ul_desc_index; ix < (ul_desc_index + cnt); ix++) {
685
		BCMLOG(ll,
686
		 "%s[%d] Buff[%x:%x] Next:[%x:%x] XferSz:%x Intr:%x,Last:%x\n",
687
		 ((p_dma_desc[ul_desc_index].dma_dir) ? "TDesc" : "RDesc"),
688
		       ul_desc_index,
689
		       p_dma_desc[ul_desc_index].buff_addr_high,
690
		       p_dma_desc[ul_desc_index].buff_addr_low,
691
		       p_dma_desc[ul_desc_index].next_desc_addr_high,
692
		       p_dma_desc[ul_desc_index].next_desc_addr_low,
693
		       p_dma_desc[ul_desc_index].xfer_size,
694
		       p_dma_desc[ul_desc_index].intr_enable,
695
		       p_dma_desc[ul_desc_index].last_rec_indicator);
696
	}
697
698
}
699
700
static enum BC_STATUS crystalhd_hw_fill_desc(struct crystalhd_dio_req *ioreq,
701
				      struct dma_descriptor *desc,
702
				      dma_addr_t desc_paddr_base,
703
				      uint32_t sg_cnt, uint32_t sg_st_ix,
704
				      uint32_t sg_st_off, uint32_t xfr_sz)
705
{
426
{
706
	uint32_t count = 0, ix = 0, sg_ix = 0, len = 0, last_desc_ix = 0;
427
	uint32_t count = 0, ix = 0, sg_ix = 0, len = 0, last_desc_ix = 0;
707
	dma_addr_t desc_phy_addr = desc_paddr_base;
428
	dma_addr_t desc_phy_addr = desc_paddr_base;
708
	union addr_64 addr_temp;
429
	addr_64 addr_temp;
430
	uint32_t curDRAMaddr = destDRAMaddr;
709
431
710
	if (!ioreq || !desc || !desc_paddr_base || !xfr_sz ||
432
	if (!ioreq || !desc || !desc_paddr_base || !xfr_sz ||
711
	    (!sg_cnt && !ioreq->uinfo.dir_tx)) {
433
		(!sg_cnt && !ioreq->uinfo.dir_tx)) {
712
		BCMLOG_ERR("Invalid Args\n");
434
		dev_err(dev, "%s: Invalid Args\n", __func__);
713
		return BC_STS_INV_ARG;
435
		return BC_STS_INV_ARG;
714
	}
436
	}
715
437
Lines 721-728 static enum BC_STATUS crystalhd_hw_fill_ Link Here
721
		/* Get SGLE length */
443
		/* Get SGLE length */
722
		len = crystalhd_get_sgle_len(ioreq, sg_ix);
444
		len = crystalhd_get_sgle_len(ioreq, sg_ix);
723
		if (len % 4) {
445
		if (len % 4) {
724
			BCMLOG_ERR(" len in sg %d %d %d\n", len, sg_ix,
446
			dev_err(dev, "unsupported len in sg %d %d %d\n",
725
				 sg_cnt);
447
			len, sg_ix, sg_cnt);
726
			return BC_STS_NOT_IMPL;
448
			return BC_STS_NOT_IMPL;
727
		}
449
		}
728
		/* Setup DMA desc with Phy addr & Length at current index. */
450
		/* Setup DMA desc with Phy addr & Length at current index. */
Lines 734-744 static enum BC_STATUS crystalhd_hw_fill_ Link Here
734
		memset(&desc[ix], 0, sizeof(desc[ix]));
456
		memset(&desc[ix], 0, sizeof(desc[ix]));
735
		desc[ix].buff_addr_low  = addr_temp.low_part;
457
		desc[ix].buff_addr_low  = addr_temp.low_part;
736
		desc[ix].buff_addr_high = addr_temp.high_part;
458
		desc[ix].buff_addr_high = addr_temp.high_part;
737
		desc[ix].dma_dir        = ioreq->uinfo.dir_tx;
459
		desc[ix].dma_dir        = ioreq->uinfo.dir_tx; /* RX dma_dir = 0, TX dma_dir = 1 */
738
460
739
		/* Chain DMA descriptor.  */
461
		/* Chain DMA descriptor.  */
740
		addr_temp.full_addr = desc_phy_addr +
462
		addr_temp.full_addr = desc_phy_addr + sizeof(struct dma_descriptor);
741
					 sizeof(struct dma_descriptor);
742
		desc[ix].next_desc_addr_low = addr_temp.low_part;
463
		desc[ix].next_desc_addr_low = addr_temp.low_part;
743
		desc[ix].next_desc_addr_high = addr_temp.high_part;
464
		desc[ix].next_desc_addr_high = addr_temp.high_part;
744
465
Lines 747-763 static enum BC_STATUS crystalhd_hw_fill_ Link Here
747
468
748
		/* Debug.. */
469
		/* Debug.. */
749
		if ((!len) || (len > crystalhd_get_sgle_len(ioreq, sg_ix))) {
470
		if ((!len) || (len > crystalhd_get_sgle_len(ioreq, sg_ix))) {
750
			BCMLOG_ERR(
471
			dev_err(dev, "inv-len(%x) Ix(%d) count:%x xfr_sz:%x "
751
			 "inv-len(%x) Ix(%d) count:%x xfr_sz:%x sg_cnt:%d\n",
472
			"sg_cnt:%d\n", len, ix, count, xfr_sz, sg_cnt);
752
			 len, ix, count, xfr_sz, sg_cnt);
753
			return BC_STS_ERROR;
473
			return BC_STS_ERROR;
754
		}
474
		}
755
		/* Length expects Multiple of 4 */
475
		/* Length expects Multiple of 4 */
756
		desc[ix].xfer_size = (len / 4);
476
		desc[ix].xfer_size = (len / 4);
757
477
758
		crystalhd_hw_dump_desc(desc, ix, 1);
759
760
		count += len;
478
		count += len;
479
		/* If TX fill in the destination DRAM address if needed */
480
		if(ioreq->uinfo.dir_tx) {
481
			desc[ix].sdram_buff_addr = curDRAMaddr;
482
			curDRAMaddr = destDRAMaddr + count;
483
		}
484
		else
485
			desc[ix].sdram_buff_addr = 0;
486
761
		desc_phy_addr += sizeof(struct dma_descriptor);
487
		desc_phy_addr += sizeof(struct dma_descriptor);
762
	}
488
	}
763
489
Lines 772-777 static enum BC_STATUS crystalhd_hw_fill_ Link Here
772
		desc[ix].xfer_size	= 1;
498
		desc[ix].xfer_size	= 1;
773
		desc[ix].fill_bytes	= 4 - ioreq->fb_size;
499
		desc[ix].fill_bytes	= 4 - ioreq->fb_size;
774
		count += ioreq->fb_size;
500
		count += ioreq->fb_size;
501
		/* If TX fill in the destination DRAM address if needed */
502
		if(ioreq->uinfo.dir_tx) {
503
			desc[ix].sdram_buff_addr = curDRAMaddr;
504
			curDRAMaddr = destDRAMaddr + count;
505
		}
506
		else
507
			desc[ix].sdram_buff_addr = 0;
775
		last_desc_ix++;
508
		last_desc_ix++;
776
	}
509
	}
777
510
Lines 781-821 static enum BC_STATUS crystalhd_hw_fill_ Link Here
781
	desc[last_desc_ix].next_desc_addr_high = 0;
514
	desc[last_desc_ix].next_desc_addr_high = 0;
782
	desc[last_desc_ix].intr_enable = 1;
515
	desc[last_desc_ix].intr_enable = 1;
783
516
784
	crystalhd_hw_dump_desc(desc, last_desc_ix, 1);
785
786
	if (count != xfr_sz) {
517
	if (count != xfr_sz) {
787
		BCMLOG_ERR("internal error sz curr:%x exp:%x\n", count, xfr_sz);
518
		dev_err(dev, "interal error sz curr:%x exp:%x\n",
519
		count, xfr_sz);
788
		return BC_STS_ERROR;
520
		return BC_STS_ERROR;
789
	}
521
	}
790
522
791
	return BC_STS_SUCCESS;
523
	return BC_STS_SUCCESS;
792
}
524
}
793
525
794
static enum BC_STATUS crystalhd_xlat_sgl_to_dma_desc(
526
BC_STATUS crystalhd_xlat_sgl_to_dma_desc(struct crystalhd_dio_req *ioreq,
795
					      struct crystalhd_dio_req *ioreq,
527
												struct dma_desc_mem * pdesc_mem,
796
					      struct dma_desc_mem *pdesc_mem,
528
												uint32_t *uv_desc_index,
797
					      uint32_t *uv_desc_index)
529
												struct device *dev, uint32_t destDRAMaddr)
798
{
530
{
799
	struct dma_descriptor *desc = NULL;
531
	struct dma_descriptor *desc = NULL;
800
	dma_addr_t desc_paddr_base = 0;
532
	dma_addr_t desc_paddr_base = 0;
801
	uint32_t sg_cnt = 0, sg_st_ix = 0, sg_st_off = 0;
533
	uint32_t sg_cnt = 0, sg_st_ix = 0, sg_st_off = 0;
802
	uint32_t xfr_sz = 0;
534
	uint32_t xfr_sz = 0;
803
	enum BC_STATUS sts = BC_STS_SUCCESS;
535
	BC_STATUS sts = BC_STS_SUCCESS;
804
536
805
	/* Check params.. */
537
	/* Check params.. */
806
	if (!ioreq || !pdesc_mem || !uv_desc_index) {
538
	if (!ioreq || !pdesc_mem || !uv_desc_index) {
807
		BCMLOG_ERR("Invalid Args\n");
539
		dev_err(dev, "%s: Invalid Args\n", __func__);
808
		return BC_STS_INV_ARG;
540
		return BC_STS_INV_ARG;
809
	}
541
	}
810
542
811
	if (!pdesc_mem->sz || !pdesc_mem->pdma_desc_start ||
543
	if (!pdesc_mem->sz || !pdesc_mem->pdma_desc_start ||
812
	    !ioreq->sg || (!ioreq->sg_cnt && !ioreq->uinfo.dir_tx)) {
544
		!ioreq->sg || (!ioreq->sg_cnt && !ioreq->uinfo.dir_tx)) {
813
		BCMLOG_ERR("Invalid Args\n");
545
		dev_err(dev, "%s: Invalid Args\n", __func__);
814
		return BC_STS_INV_ARG;
546
		return BC_STS_INV_ARG;
815
	}
547
	}
816
548
817
	if ((ioreq->uinfo.dir_tx) && (ioreq->uinfo.uv_offset)) {
549
	if ((ioreq->uinfo.dir_tx) && (ioreq->uinfo.uv_offset)) {
818
		BCMLOG_ERR("UV offset for TX??\n");
550
		dev_err(dev, "%s: UV offset for TX??\n", __func__);
819
		return BC_STS_INV_ARG;
551
		return BC_STS_INV_ARG;
820
552
821
	}
553
	}
Lines 832-838 static enum BC_STATUS crystalhd_xlat_sgl Link Here
832
	}
564
	}
833
565
834
	sts = crystalhd_hw_fill_desc(ioreq, desc, desc_paddr_base, sg_cnt,
566
	sts = crystalhd_hw_fill_desc(ioreq, desc, desc_paddr_base, sg_cnt,
835
				   sg_st_ix, sg_st_off, xfr_sz);
567
									sg_st_ix, sg_st_off, xfr_sz, dev, destDRAMaddr);
836
568
837
	if ((sts != BC_STS_SUCCESS) || !ioreq->uinfo.uv_offset)
569
	if ((sts != BC_STS_SUCCESS) || !ioreq->uinfo.uv_offset)
838
		return sts;
570
		return sts;
Lines 840-846 static enum BC_STATUS crystalhd_xlat_sgl Link Here
840
	/* Prepare for UV mapping.. */
572
	/* Prepare for UV mapping.. */
841
	desc = &pdesc_mem->pdma_desc_start[sg_cnt];
573
	desc = &pdesc_mem->pdma_desc_start[sg_cnt];
842
	desc_paddr_base = pdesc_mem->phy_addr +
574
	desc_paddr_base = pdesc_mem->phy_addr +
843
			  (sg_cnt * sizeof(struct dma_descriptor));
575
	(sg_cnt * sizeof(struct dma_descriptor));
844
576
845
	/* Done with desc addr.. now update sg stuff.*/
577
	/* Done with desc addr.. now update sg stuff.*/
846
	sg_cnt    = ioreq->sg_cnt - ioreq->uinfo.uv_sg_ix;
578
	sg_cnt    = ioreq->sg_cnt - ioreq->uinfo.uv_sg_ix;
Lines 849-855 static enum BC_STATUS crystalhd_xlat_sgl Link Here
849
	sg_st_off = ioreq->uinfo.uv_sg_off;
581
	sg_st_off = ioreq->uinfo.uv_sg_off;
850
582
851
	sts = crystalhd_hw_fill_desc(ioreq, desc, desc_paddr_base, sg_cnt,
583
	sts = crystalhd_hw_fill_desc(ioreq, desc, desc_paddr_base, sg_cnt,
852
				   sg_st_ix, sg_st_off, xfr_sz);
584
								sg_st_ix, sg_st_off, xfr_sz, dev, destDRAMaddr);
853
	if (sts != BC_STS_SUCCESS)
585
	if (sts != BC_STS_SUCCESS)
854
		return sts;
586
		return sts;
855
587
Lines 858-2096 static enum BC_STATUS crystalhd_xlat_sgl Link Here
858
	return sts;
590
	return sts;
859
}
591
}
860
592
861
static void crystalhd_start_tx_dma_engine(struct crystalhd_hw *hw)
593
BC_STATUS crystalhd_rx_pkt_done(struct crystalhd_hw *hw,
594
									   uint32_t list_index,
595
									   BC_STATUS comp_sts)
862
{
596
{
863
	uint32_t dma_cntrl;
597
	struct crystalhd_rx_dma_pkt *rx_pkt = NULL;
598
	uint32_t y_dw_dnsz, uv_dw_dnsz;
599
	BC_STATUS sts = BC_STS_SUCCESS;
600
	uint64_t currTick;
864
601
865
	dma_cntrl = crystalhd_reg_rd(hw->adp, MISC1_TX_SW_DESC_LIST_CTRL_STS);
602
	uint32_t totalTick_Hi;
866
	if (!(dma_cntrl & DMA_START_BIT)) {
603
	uint32_t TickSpentInPD_Hi;
867
		dma_cntrl |= DMA_START_BIT;
604
	uint64_t temp_64;
868
		crystalhd_reg_wr(hw->adp, MISC1_TX_SW_DESC_LIST_CTRL_STS,
605
	int32_t totalTick_Hi_f;
869
			       dma_cntrl);
606
	int32_t TickSpentInPD_Hi_f;
870
	}
871
607
872
	return;
608
	if (!hw || list_index >= DMA_ENGINE_CNT) {
873
}
609
		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
610
		return BC_STS_INV_ARG;
611
	}
874
612
875
/* _CHECK_THIS_
613
	rx_pkt = crystalhd_dioq_find_and_fetch(hw->rx_actq,
876
 *
614
	hw->rx_pkt_tag_seed + list_index);
877
 * Verify if the Stop generates a completion interrupt or not.
615
	if (!rx_pkt) {
878
 * if it does not generate an interrupt, then add polling here.
616
		dev_err(&hw->adp->pdev->dev, "Act-Q: PostIx:%x L0Sts:%x "
879
 */
617
		"L1Sts:%x current L:%x tag:%x comp:%x\n",
880
static enum BC_STATUS crystalhd_stop_tx_dma_engine(struct crystalhd_hw *hw)
618
				hw->rx_list_post_index, hw->rx_list_sts[0],
881
{
619
				hw->rx_list_sts[1], list_index,
882
	uint32_t dma_cntrl, cnt = 30;
620
				hw->rx_pkt_tag_seed + list_index, comp_sts);
883
	uint32_t l1 = 1, l2 = 1;
621
				return BC_STS_INV_ARG;
884
	unsigned long flags = 0;
885
886
	dma_cntrl = crystalhd_reg_rd(hw->adp, MISC1_TX_SW_DESC_LIST_CTRL_STS);
887
888
	BCMLOG(BCMLOG_DBG, "Stopping TX DMA Engine..\n");
889
890
	if (!(dma_cntrl & DMA_START_BIT)) {
891
		BCMLOG(BCMLOG_DBG, "Already Stopped\n");
892
		return BC_STS_SUCCESS;
893
	}
894
895
	crystalhd_disable_interrupts(hw->adp);
896
897
	/* Issue stop to HW */
898
	/* This bit when set gave problems. Please check*/
899
	dma_cntrl &= ~DMA_START_BIT;
900
	crystalhd_reg_wr(hw->adp, MISC1_TX_SW_DESC_LIST_CTRL_STS, dma_cntrl);
901
902
	BCMLOG(BCMLOG_DBG, "Cleared the DMA Start bit\n");
903
904
	/* Poll for 3seconds (30 * 100ms) on both the lists..*/
905
	while ((l1 || l2) && cnt) {
906
907
		if (l1) {
908
			l1 = crystalhd_reg_rd(hw->adp,
909
				 MISC1_TX_FIRST_DESC_L_ADDR_LIST0);
910
			l1 &= DMA_START_BIT;
911
		}
912
913
		if (l2) {
914
			l2 = crystalhd_reg_rd(hw->adp,
915
				 MISC1_TX_FIRST_DESC_L_ADDR_LIST1);
916
			l2 &= DMA_START_BIT;
917
		}
918
919
		msleep_interruptible(100);
920
921
		cnt--;
922
	}
923
924
	if (!cnt) {
925
		BCMLOG_ERR("Failed to stop TX DMA.. l1 %d, l2 %d\n", l1, l2);
926
		crystalhd_enable_interrupts(hw->adp);
927
		return BC_STS_ERROR;
928
	}
929
930
	spin_lock_irqsave(&hw->lock, flags);
931
	hw->tx_list_post_index = 0;
932
	spin_unlock_irqrestore(&hw->lock, flags);
933
	BCMLOG(BCMLOG_DBG, "stopped TX DMA..\n");
934
	crystalhd_enable_interrupts(hw->adp);
935
936
	return BC_STS_SUCCESS;
937
}
938
939
static uint32_t crystalhd_get_pib_avail_cnt(struct crystalhd_hw *hw)
940
{
941
	/*
942
	* Position of the PIB Entries can be found at
943
	* 0th and the 1st location of the Circular list.
944
	*/
945
	uint32_t Q_addr;
946
	uint32_t pib_cnt, r_offset, w_offset;
947
948
	Q_addr = hw->pib_del_Q_addr;
949
950
	/* Get the Read Pointer */
951
	crystalhd_mem_rd(hw->adp, Q_addr, 1, &r_offset);
952
953
	/* Get the Write Pointer */
954
	crystalhd_mem_rd(hw->adp, Q_addr + sizeof(uint32_t), 1, &w_offset);
955
956
	if (r_offset == w_offset)
957
		return 0;	/* Queue is empty */
958
959
	if (w_offset > r_offset)
960
		pib_cnt = w_offset - r_offset;
961
	else
962
		pib_cnt = (w_offset + MAX_PIB_Q_DEPTH) -
963
			  (r_offset + MIN_PIB_Q_DEPTH);
964
965
	if (pib_cnt > MAX_PIB_Q_DEPTH) {
966
		BCMLOG_ERR("Invalid PIB Count (%u)\n", pib_cnt);
967
		return 0;
968
	}
969
970
	return pib_cnt;
971
}
972
973
static uint32_t crystalhd_get_addr_from_pib_Q(struct crystalhd_hw *hw)
974
{
975
	uint32_t Q_addr;
976
	uint32_t addr_entry, r_offset, w_offset;
977
978
	Q_addr = hw->pib_del_Q_addr;
979
980
	/* Get the Read Pointer 0Th Location is Read Pointer */
981
	crystalhd_mem_rd(hw->adp, Q_addr, 1, &r_offset);
982
983
	/* Get the Write Pointer 1st Location is Write pointer */
984
	crystalhd_mem_rd(hw->adp, Q_addr + sizeof(uint32_t), 1, &w_offset);
985
986
	/* Queue is empty */
987
	if (r_offset == w_offset)
988
		return 0;
989
990
	if ((r_offset < MIN_PIB_Q_DEPTH) || (r_offset >= MAX_PIB_Q_DEPTH))
991
		return 0;
992
993
	/* Get the Actual Address of the PIB */
994
	crystalhd_mem_rd(hw->adp, Q_addr + (r_offset * sizeof(uint32_t)),
995
		       1, &addr_entry);
996
997
	/* Increment the Read Pointer */
998
	r_offset++;
999
1000
	if (MAX_PIB_Q_DEPTH == r_offset)
1001
		r_offset = MIN_PIB_Q_DEPTH;
1002
1003
	/* Write back the read pointer to It's Location */
1004
	crystalhd_mem_wr(hw->adp, Q_addr, 1, &r_offset);
1005
1006
	return addr_entry;
1007
}
1008
1009
static bool crystalhd_rel_addr_to_pib_Q(struct crystalhd_hw *hw,
1010
					 uint32_t addr_to_rel)
1011
{
1012
	uint32_t Q_addr;
1013
	uint32_t r_offset, w_offset, n_offset;
1014
1015
	Q_addr = hw->pib_rel_Q_addr;
1016
1017
	/* Get the Read Pointer */
1018
	crystalhd_mem_rd(hw->adp, Q_addr, 1, &r_offset);
1019
1020
	/* Get the Write Pointer */
1021
	crystalhd_mem_rd(hw->adp, Q_addr + sizeof(uint32_t), 1, &w_offset);
1022
1023
	if ((r_offset < MIN_PIB_Q_DEPTH) ||
1024
	    (r_offset >= MAX_PIB_Q_DEPTH))
1025
		return false;
1026
1027
	n_offset = w_offset + 1;
1028
1029
	if (MAX_PIB_Q_DEPTH == n_offset)
1030
		n_offset = MIN_PIB_Q_DEPTH;
1031
1032
	if (r_offset == n_offset)
1033
		return false; /* should never happen */
1034
1035
	/* Write the DRAM ADDR to the Queue at Next Offset */
1036
	crystalhd_mem_wr(hw->adp, Q_addr + (w_offset * sizeof(uint32_t)),
1037
		       1, &addr_to_rel);
1038
1039
	/* Put the New value of the write pointer in Queue */
1040
	crystalhd_mem_wr(hw->adp, Q_addr + sizeof(uint32_t), 1, &n_offset);
1041
1042
	return true;
1043
}
1044
1045
static void cpy_pib_to_app(struct c011_pib *src_pib,
1046
					 struct BC_PIC_INFO_BLOCK *dst_pib)
1047
{
1048
	if (!src_pib || !dst_pib) {
1049
		BCMLOG_ERR("Invalid Arguments\n");
1050
		return;
1051
	}
1052
1053
	dst_pib->timeStamp           = 0;
1054
	dst_pib->picture_number      = src_pib->ppb.picture_number;
1055
	dst_pib->width               = src_pib->ppb.width;
1056
	dst_pib->height              = src_pib->ppb.height;
1057
	dst_pib->chroma_format       = src_pib->ppb.chroma_format;
1058
	dst_pib->pulldown            = src_pib->ppb.pulldown;
1059
	dst_pib->flags               = src_pib->ppb.flags;
1060
	dst_pib->sess_num            = src_pib->ptsStcOffset;
1061
	dst_pib->aspect_ratio        = src_pib->ppb.aspect_ratio;
1062
	dst_pib->colour_primaries     = src_pib->ppb.colour_primaries;
1063
	dst_pib->picture_meta_payload = src_pib->ppb.picture_meta_payload;
1064
	dst_pib->frame_rate		= src_pib->resolution;
1065
	return;
1066
}
1067
1068
static void crystalhd_hw_proc_pib(struct crystalhd_hw *hw)
1069
{
1070
	unsigned int cnt;
1071
	struct c011_pib src_pib;
1072
	uint32_t pib_addr, pib_cnt;
1073
	struct BC_PIC_INFO_BLOCK *AppPib;
1074
	struct crystalhd_rx_dma_pkt *rx_pkt = NULL;
1075
1076
	pib_cnt = crystalhd_get_pib_avail_cnt(hw);
1077
1078
	if (!pib_cnt)
1079
		return;
1080
1081
	for (cnt = 0; cnt < pib_cnt; cnt++) {
1082
1083
		pib_addr = crystalhd_get_addr_from_pib_Q(hw);
1084
		crystalhd_mem_rd(hw->adp, pib_addr, sizeof(struct c011_pib) / 4,
1085
			       (uint32_t *)&src_pib);
1086
1087
		if (src_pib.bFormatChange) {
1088
			rx_pkt = (struct crystalhd_rx_dma_pkt *)
1089
					crystalhd_dioq_fetch(hw->rx_freeq);
1090
			if (!rx_pkt)
1091
				return;
1092
			rx_pkt->flags = 0;
1093
			rx_pkt->flags |= COMP_FLAG_PIB_VALID |
1094
					 COMP_FLAG_FMT_CHANGE;
1095
			AppPib = &rx_pkt->pib;
1096
			cpy_pib_to_app(&src_pib, AppPib);
1097
1098
			BCMLOG(BCMLOG_DBG,
1099
			       "App PIB:%x %x %x %x %x %x %x %x %x %x\n",
1100
			       rx_pkt->pib.picture_number,
1101
			       rx_pkt->pib.aspect_ratio,
1102
			       rx_pkt->pib.chroma_format,
1103
			       rx_pkt->pib.colour_primaries,
1104
			       rx_pkt->pib.frame_rate,
1105
			       rx_pkt->pib.height,
1106
			       rx_pkt->pib.height,
1107
			       rx_pkt->pib.n_drop,
1108
			       rx_pkt->pib.pulldown,
1109
			       rx_pkt->pib.ycom);
1110
1111
			crystalhd_dioq_add(hw->rx_rdyq, (void *)rx_pkt, true,
1112
					 rx_pkt->pkt_tag);
1113
1114
		}
1115
1116
		crystalhd_rel_addr_to_pib_Q(hw, pib_addr);
1117
	}
1118
}
1119
1120
static void crystalhd_start_rx_dma_engine(struct crystalhd_hw *hw)
1121
{
1122
	uint32_t        dma_cntrl;
1123
1124
	dma_cntrl = crystalhd_reg_rd(hw->adp,
1125
			 MISC1_Y_RX_SW_DESC_LIST_CTRL_STS);
1126
	if (!(dma_cntrl & DMA_START_BIT)) {
1127
		dma_cntrl |= DMA_START_BIT;
1128
		crystalhd_reg_wr(hw->adp,
1129
			 MISC1_Y_RX_SW_DESC_LIST_CTRL_STS, dma_cntrl);
1130
	}
1131
1132
	dma_cntrl = crystalhd_reg_rd(hw->adp,
1133
			 MISC1_UV_RX_SW_DESC_LIST_CTRL_STS);
1134
	if (!(dma_cntrl & DMA_START_BIT)) {
1135
		dma_cntrl |= DMA_START_BIT;
1136
		crystalhd_reg_wr(hw->adp,
1137
			 MISC1_UV_RX_SW_DESC_LIST_CTRL_STS, dma_cntrl);
1138
	}
1139
1140
	return;
1141
}
1142
1143
static void crystalhd_stop_rx_dma_engine(struct crystalhd_hw *hw)
1144
{
1145
	uint32_t dma_cntrl = 0, count = 30;
1146
	uint32_t l0y = 1, l0uv = 1, l1y = 1, l1uv = 1;
1147
1148
	dma_cntrl = crystalhd_reg_rd(hw->adp,
1149
			 MISC1_Y_RX_SW_DESC_LIST_CTRL_STS);
1150
	if ((dma_cntrl & DMA_START_BIT)) {
1151
		dma_cntrl &= ~DMA_START_BIT;
1152
		crystalhd_reg_wr(hw->adp,
1153
			 MISC1_Y_RX_SW_DESC_LIST_CTRL_STS, dma_cntrl);
1154
	}
1155
1156
	dma_cntrl = crystalhd_reg_rd(hw->adp,
1157
			 MISC1_UV_RX_SW_DESC_LIST_CTRL_STS);
1158
	if ((dma_cntrl & DMA_START_BIT)) {
1159
		dma_cntrl &= ~DMA_START_BIT;
1160
		crystalhd_reg_wr(hw->adp,
1161
			 MISC1_UV_RX_SW_DESC_LIST_CTRL_STS, dma_cntrl);
1162
	}
1163
1164
	/* Poll for 3seconds (30 * 100ms) on both the lists..*/
1165
	while ((l0y || l0uv || l1y || l1uv) && count) {
1166
1167
		if (l0y) {
1168
			l0y = crystalhd_reg_rd(hw->adp,
1169
				 MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0);
1170
			l0y &= DMA_START_BIT;
1171
			if (!l0y)
1172
				hw->rx_list_sts[0] &= ~rx_waiting_y_intr;
1173
		}
1174
1175
		if (l1y) {
1176
			l1y = crystalhd_reg_rd(hw->adp,
1177
				 MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1);
1178
			l1y &= DMA_START_BIT;
1179
			if (!l1y)
1180
				hw->rx_list_sts[1] &= ~rx_waiting_y_intr;
1181
		}
1182
1183
		if (l0uv) {
1184
			l0uv = crystalhd_reg_rd(hw->adp,
1185
				 MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0);
1186
			l0uv &= DMA_START_BIT;
1187
			if (!l0uv)
1188
				hw->rx_list_sts[0] &= ~rx_waiting_uv_intr;
1189
		}
1190
1191
		if (l1uv) {
1192
			l1uv = crystalhd_reg_rd(hw->adp,
1193
				 MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1);
1194
			l1uv &= DMA_START_BIT;
1195
			if (!l1uv)
1196
				hw->rx_list_sts[1] &= ~rx_waiting_uv_intr;
1197
		}
1198
		msleep_interruptible(100);
1199
		count--;
1200
	}
1201
1202
	hw->rx_list_post_index = 0;
1203
1204
	BCMLOG(BCMLOG_SSTEP, "Capture Stop: %d List0:Sts:%x List1:Sts:%x\n",
1205
	       count, hw->rx_list_sts[0], hw->rx_list_sts[1]);
1206
}
1207
1208
static enum BC_STATUS crystalhd_hw_prog_rxdma(struct crystalhd_hw *hw,
1209
					 struct crystalhd_rx_dma_pkt *rx_pkt)
1210
{
1211
	uint32_t y_low_addr_reg, y_high_addr_reg;
1212
	uint32_t uv_low_addr_reg, uv_high_addr_reg;
1213
	union addr_64 desc_addr;
1214
	unsigned long flags;
1215
1216
	if (!hw || !rx_pkt) {
1217
		BCMLOG_ERR("Invalid Arguments\n");
1218
		return BC_STS_INV_ARG;
1219
	}
1220
1221
	if (hw->rx_list_post_index >= DMA_ENGINE_CNT) {
1222
		BCMLOG_ERR("List Out Of bounds %x\n", hw->rx_list_post_index);
1223
		return BC_STS_INV_ARG;
1224
	}
1225
1226
	spin_lock_irqsave(&hw->rx_lock, flags);
1227
	/* FIXME: jarod: sts_free is an enum for 0,
1228
	 in crystalhd_hw.h... yuk... */
1229
	if (sts_free != hw->rx_list_sts[hw->rx_list_post_index]) {
1230
		spin_unlock_irqrestore(&hw->rx_lock, flags);
1231
		return BC_STS_BUSY;
1232
	}
1233
1234
	if (!hw->rx_list_post_index) {
1235
		y_low_addr_reg   = MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0;
1236
		y_high_addr_reg  = MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST0;
1237
		uv_low_addr_reg  = MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0;
1238
		uv_high_addr_reg = MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST0;
1239
	} else {
1240
		y_low_addr_reg   = MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1;
1241
		y_high_addr_reg  = MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST1;
1242
		uv_low_addr_reg  = MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1;
1243
		uv_high_addr_reg = MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST1;
1244
	}
1245
	rx_pkt->pkt_tag = hw->rx_pkt_tag_seed + hw->rx_list_post_index;
1246
	hw->rx_list_sts[hw->rx_list_post_index] |= rx_waiting_y_intr;
1247
	if (rx_pkt->uv_phy_addr)
1248
		hw->rx_list_sts[hw->rx_list_post_index] |= rx_waiting_uv_intr;
1249
	hw->rx_list_post_index = (hw->rx_list_post_index + 1) % DMA_ENGINE_CNT;
1250
	spin_unlock_irqrestore(&hw->rx_lock, flags);
1251
1252
	crystalhd_dioq_add(hw->rx_actq, (void *)rx_pkt, false,
1253
			 rx_pkt->pkt_tag);
1254
1255
	crystalhd_start_rx_dma_engine(hw);
1256
	/* Program the Y descriptor */
1257
	desc_addr.full_addr = rx_pkt->desc_mem.phy_addr;
1258
	crystalhd_reg_wr(hw->adp, y_high_addr_reg, desc_addr.high_part);
1259
	crystalhd_reg_wr(hw->adp, y_low_addr_reg, desc_addr.low_part | 0x01);
1260
1261
	if (rx_pkt->uv_phy_addr) {
1262
		/* Program the UV descriptor */
1263
		desc_addr.full_addr = rx_pkt->uv_phy_addr;
1264
		crystalhd_reg_wr(hw->adp, uv_high_addr_reg,
1265
			 desc_addr.high_part);
1266
		crystalhd_reg_wr(hw->adp, uv_low_addr_reg,
1267
			 desc_addr.low_part | 0x01);
1268
	}
1269
1270
	return BC_STS_SUCCESS;
1271
}
1272
1273
static enum BC_STATUS crystalhd_hw_post_cap_buff(struct crystalhd_hw *hw,
1274
					  struct crystalhd_rx_dma_pkt *rx_pkt)
1275
{
1276
	enum BC_STATUS sts = crystalhd_hw_prog_rxdma(hw, rx_pkt);
1277
1278
	if (sts == BC_STS_BUSY)
1279
		crystalhd_dioq_add(hw->rx_freeq, (void *)rx_pkt,
1280
				 false, rx_pkt->pkt_tag);
1281
1282
	return sts;
1283
}
1284
1285
static void crystalhd_get_dnsz(struct crystalhd_hw *hw, uint32_t list_index,
1286
			     uint32_t *y_dw_dnsz, uint32_t *uv_dw_dnsz)
1287
{
1288
	uint32_t y_dn_sz_reg, uv_dn_sz_reg;
1289
1290
	if (!list_index) {
1291
		y_dn_sz_reg  = MISC1_Y_RX_LIST0_CUR_BYTE_CNT;
1292
		uv_dn_sz_reg = MISC1_UV_RX_LIST0_CUR_BYTE_CNT;
1293
	} else {
1294
		y_dn_sz_reg  = MISC1_Y_RX_LIST1_CUR_BYTE_CNT;
1295
		uv_dn_sz_reg = MISC1_UV_RX_LIST1_CUR_BYTE_CNT;
1296
	}
1297
1298
	*y_dw_dnsz  = crystalhd_reg_rd(hw->adp, y_dn_sz_reg);
1299
	*uv_dw_dnsz = crystalhd_reg_rd(hw->adp, uv_dn_sz_reg);
1300
}
1301
1302
/*
1303
 * This function should be called only after making sure that the two DMA
1304
 * lists are free. This function does not check if DMA's are active, before
1305
 * turning off the DMA.
1306
 */
1307
static void crystalhd_hw_finalize_pause(struct crystalhd_hw *hw)
1308
{
1309
	uint32_t dma_cntrl, aspm;
1310
1311
	hw->stop_pending = 0;
1312
1313
	dma_cntrl = crystalhd_reg_rd(hw->adp,
1314
			 MISC1_Y_RX_SW_DESC_LIST_CTRL_STS);
1315
	if (dma_cntrl & DMA_START_BIT) {
1316
		dma_cntrl &= ~DMA_START_BIT;
1317
		crystalhd_reg_wr(hw->adp,
1318
			 MISC1_Y_RX_SW_DESC_LIST_CTRL_STS, dma_cntrl);
1319
	}
1320
1321
	dma_cntrl = crystalhd_reg_rd(hw->adp,
1322
			 MISC1_UV_RX_SW_DESC_LIST_CTRL_STS);
1323
	if (dma_cntrl & DMA_START_BIT) {
1324
		dma_cntrl &= ~DMA_START_BIT;
1325
		crystalhd_reg_wr(hw->adp,
1326
			 MISC1_UV_RX_SW_DESC_LIST_CTRL_STS, dma_cntrl);
1327
	}
1328
	hw->rx_list_post_index = 0;
1329
1330
	aspm = crystalhd_reg_rd(hw->adp, PCIE_DLL_DATA_LINK_CONTROL);
1331
	aspm |= ASPM_L1_ENABLE;
1332
	/* NAREN BCMLOG(BCMLOG_INFO, "aspm on\n"); */
1333
	crystalhd_reg_wr(hw->adp, PCIE_DLL_DATA_LINK_CONTROL, aspm);
1334
}
1335
1336
static enum BC_STATUS crystalhd_rx_pkt_done(struct crystalhd_hw *hw,
1337
			 uint32_t list_index, enum BC_STATUS comp_sts)
1338
{
1339
	struct crystalhd_rx_dma_pkt *rx_pkt = NULL;
1340
	uint32_t y_dw_dnsz, uv_dw_dnsz;
1341
	enum BC_STATUS sts = BC_STS_SUCCESS;
1342
1343
	if (!hw || list_index >= DMA_ENGINE_CNT) {
1344
		BCMLOG_ERR("Invalid Arguments\n");
1345
		return BC_STS_INV_ARG;
1346
	}
1347
1348
	rx_pkt = crystalhd_dioq_find_and_fetch(hw->rx_actq,
1349
					     hw->rx_pkt_tag_seed + list_index);
1350
	if (!rx_pkt) {
1351
		BCMLOG_ERR(
1352
		"Act-Q:PostIx:%x L0Sts:%x L1Sts:%x current L:%x tag:%x comp:%x\n",
1353
			   hw->rx_list_post_index, hw->rx_list_sts[0],
1354
			   hw->rx_list_sts[1], list_index,
1355
			   hw->rx_pkt_tag_seed + list_index, comp_sts);
1356
		return BC_STS_INV_ARG;
1357
	}
1358
1359
	if (comp_sts == BC_STS_SUCCESS) {
1360
		crystalhd_get_dnsz(hw, list_index, &y_dw_dnsz, &uv_dw_dnsz);
1361
		rx_pkt->dio_req->uinfo.y_done_sz = y_dw_dnsz;
1362
		rx_pkt->flags = COMP_FLAG_DATA_VALID;
1363
		if (rx_pkt->uv_phy_addr)
1364
			rx_pkt->dio_req->uinfo.uv_done_sz = uv_dw_dnsz;
1365
		crystalhd_dioq_add(hw->rx_rdyq, rx_pkt, true,
1366
				hw->rx_pkt_tag_seed + list_index);
1367
		return sts;
1368
	}
1369
1370
	/* Check if we can post this DIO again. */
1371
	return crystalhd_hw_post_cap_buff(hw, rx_pkt);
1372
}
1373
1374
static bool crystalhd_rx_list0_handler(struct crystalhd_hw *hw,
1375
		 uint32_t int_sts, uint32_t y_err_sts, uint32_t uv_err_sts)
1376
{
1377
	uint32_t tmp;
1378
	enum list_sts tmp_lsts;
1379
1380
	if (!(y_err_sts & GET_Y0_ERR_MSK) && !(uv_err_sts & GET_UV0_ERR_MSK))
1381
		return false;
1382
1383
	tmp_lsts = hw->rx_list_sts[0];
1384
1385
	/* Y0 - DMA */
1386
	tmp = y_err_sts & GET_Y0_ERR_MSK;
1387
	if (int_sts & INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_MASK)
1388
		hw->rx_list_sts[0] &= ~rx_waiting_y_intr;
1389
1390
	if (y_err_sts & MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK) {
1391
		hw->rx_list_sts[0] &= ~rx_waiting_y_intr;
1392
		tmp &= ~MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK;
1393
	}
1394
1395
	if (y_err_sts & MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK) {
1396
		hw->rx_list_sts[0] &= ~rx_y_mask;
1397
		hw->rx_list_sts[0] |= rx_y_error;
1398
		tmp &= ~MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK;
1399
	}
1400
1401
	if (tmp) {
1402
		hw->rx_list_sts[0] &= ~rx_y_mask;
1403
		hw->rx_list_sts[0] |= rx_y_error;
1404
		hw->rx_list_post_index = 0;
1405
	}
1406
1407
	/* UV0 - DMA */
1408
	tmp = uv_err_sts & GET_UV0_ERR_MSK;
1409
	if (int_sts & INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_MASK)
1410
		hw->rx_list_sts[0] &= ~rx_waiting_uv_intr;
1411
1412
	if (uv_err_sts & MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK) {
1413
		hw->rx_list_sts[0] &= ~rx_waiting_uv_intr;
1414
		tmp &= ~MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK;
1415
	}
1416
1417
	if (uv_err_sts &
1418
	 MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK) {
1419
		hw->rx_list_sts[0] &= ~rx_uv_mask;
1420
		hw->rx_list_sts[0] |= rx_uv_error;
1421
		tmp &= ~MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK;
1422
	}
1423
1424
	if (tmp) {
1425
		hw->rx_list_sts[0] &= ~rx_uv_mask;
1426
		hw->rx_list_sts[0] |= rx_uv_error;
1427
		hw->rx_list_post_index = 0;
1428
	}
1429
1430
	if (y_err_sts & GET_Y0_ERR_MSK) {
1431
		tmp = y_err_sts & GET_Y0_ERR_MSK;
1432
		crystalhd_reg_wr(hw->adp, MISC1_Y_RX_ERROR_STATUS, tmp);
1433
	}
1434
1435
	if (uv_err_sts & GET_UV0_ERR_MSK) {
1436
		tmp = uv_err_sts & GET_UV0_ERR_MSK;
1437
		crystalhd_reg_wr(hw->adp, MISC1_UV_RX_ERROR_STATUS, tmp);
1438
	}
1439
1440
	return (tmp_lsts != hw->rx_list_sts[0]);
1441
}
1442
1443
static bool crystalhd_rx_list1_handler(struct crystalhd_hw *hw,
1444
		 uint32_t int_sts, uint32_t y_err_sts, uint32_t uv_err_sts)
1445
{
1446
	uint32_t tmp;
1447
	enum list_sts tmp_lsts;
1448
1449
	if (!(y_err_sts & GET_Y1_ERR_MSK) && !(uv_err_sts & GET_UV1_ERR_MSK))
1450
		return false;
1451
1452
	tmp_lsts = hw->rx_list_sts[1];
1453
1454
	/* Y1 - DMA */
1455
	tmp = y_err_sts & GET_Y1_ERR_MSK;
1456
	if (int_sts & INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_MASK)
1457
		hw->rx_list_sts[1] &= ~rx_waiting_y_intr;
1458
1459
	if (y_err_sts & MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK) {
1460
		hw->rx_list_sts[1] &= ~rx_waiting_y_intr;
1461
		tmp &= ~MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK;
1462
	}
1463
1464
	if (y_err_sts & MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK) {
1465
		/* Add retry-support..*/
1466
		hw->rx_list_sts[1] &= ~rx_y_mask;
1467
		hw->rx_list_sts[1] |= rx_y_error;
1468
		tmp &= ~MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK;
1469
	}
1470
1471
	if (tmp) {
1472
		hw->rx_list_sts[1] &= ~rx_y_mask;
1473
		hw->rx_list_sts[1] |= rx_y_error;
1474
		hw->rx_list_post_index = 0;
1475
	}
1476
1477
	/* UV1 - DMA */
1478
	tmp = uv_err_sts & GET_UV1_ERR_MSK;
1479
	if (int_sts & INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_MASK)
1480
		hw->rx_list_sts[1] &= ~rx_waiting_uv_intr;
1481
1482
	if (uv_err_sts & MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK) {
1483
		hw->rx_list_sts[1] &= ~rx_waiting_uv_intr;
1484
		tmp &= ~MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK;
1485
	}
1486
1487
	if (uv_err_sts & MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK) {
1488
		/* Add retry-support*/
1489
		hw->rx_list_sts[1] &= ~rx_uv_mask;
1490
		hw->rx_list_sts[1] |= rx_uv_error;
1491
		tmp &= ~MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK;
1492
	}
1493
1494
	if (tmp) {
1495
		hw->rx_list_sts[1] &= ~rx_uv_mask;
1496
		hw->rx_list_sts[1] |= rx_uv_error;
1497
		hw->rx_list_post_index = 0;
1498
	}
1499
1500
	if (y_err_sts & GET_Y1_ERR_MSK) {
1501
		tmp = y_err_sts & GET_Y1_ERR_MSK;
1502
		crystalhd_reg_wr(hw->adp, MISC1_Y_RX_ERROR_STATUS, tmp);
1503
	}
1504
1505
	if (uv_err_sts & GET_UV1_ERR_MSK) {
1506
		tmp = uv_err_sts & GET_UV1_ERR_MSK;
1507
		crystalhd_reg_wr(hw->adp, MISC1_UV_RX_ERROR_STATUS, tmp);
1508
	}
1509
1510
	return (tmp_lsts != hw->rx_list_sts[1]);
1511
}
1512
1513
1514
static void crystalhd_rx_isr(struct crystalhd_hw *hw, uint32_t intr_sts)
1515
{
1516
	unsigned long flags;
1517
	uint32_t i, list_avail = 0;
1518
	enum BC_STATUS comp_sts = BC_STS_NO_DATA;
1519
	uint32_t y_err_sts, uv_err_sts, y_dn_sz = 0, uv_dn_sz = 0;
1520
	bool ret = false;
1521
1522
	if (!hw) {
1523
		BCMLOG_ERR("Invalid Arguments\n");
1524
		return;
1525
	}
1526
1527
	if (!(intr_sts & GET_RX_INTR_MASK))
1528
		return;
1529
1530
	y_err_sts = crystalhd_reg_rd(hw->adp, MISC1_Y_RX_ERROR_STATUS);
1531
	uv_err_sts = crystalhd_reg_rd(hw->adp, MISC1_UV_RX_ERROR_STATUS);
1532
1533
	for (i = 0; i < DMA_ENGINE_CNT; i++) {
1534
		/* Update States..*/
1535
		spin_lock_irqsave(&hw->rx_lock, flags);
1536
		if (i == 0)
1537
			ret = crystalhd_rx_list0_handler(hw, intr_sts,
1538
					 y_err_sts, uv_err_sts);
1539
		else
1540
			ret = crystalhd_rx_list1_handler(hw, intr_sts,
1541
					 y_err_sts, uv_err_sts);
1542
		if (ret) {
1543
			switch (hw->rx_list_sts[i]) {
1544
			case sts_free:
1545
				comp_sts = BC_STS_SUCCESS;
1546
				list_avail = 1;
1547
				break;
1548
			case rx_y_error:
1549
			case rx_uv_error:
1550
			case rx_sts_error:
1551
				/* We got error on both or Y or uv. */
1552
				hw->stats.rx_errors++;
1553
				crystalhd_get_dnsz(hw, i, &y_dn_sz, &uv_dn_sz);
1554
				/* FIXME: jarod: this is where
1555
				 my mini pci-e card is tripping up */
1556
				BCMLOG(BCMLOG_DBG, "list_index:%x rx[%d] Y:%x UV:%x Int:%x YDnSz:%x UVDnSz:%x\n",
1557
				       i, hw->stats.rx_errors, y_err_sts,
1558
				       uv_err_sts, intr_sts, y_dn_sz,
1559
				       uv_dn_sz);
1560
				hw->rx_list_sts[i] = sts_free;
1561
				comp_sts = BC_STS_ERROR;
1562
				break;
1563
			default:
1564
				/* Wait for completion..*/
1565
				comp_sts = BC_STS_NO_DATA;
1566
				break;
1567
			}
1568
		}
1569
		spin_unlock_irqrestore(&hw->rx_lock, flags);
1570
1571
		/* handle completion...*/
1572
		if (comp_sts != BC_STS_NO_DATA) {
1573
			crystalhd_rx_pkt_done(hw, i, comp_sts);
1574
			comp_sts = BC_STS_NO_DATA;
1575
		}
1576
	}
1577
1578
	if (list_avail) {
1579
		if (hw->stop_pending) {
1580
			if ((hw->rx_list_sts[0] == sts_free) &&
1581
			    (hw->rx_list_sts[1] == sts_free))
1582
				crystalhd_hw_finalize_pause(hw);
1583
		} else {
1584
			crystalhd_hw_start_capture(hw);
1585
		}
1586
	}
1587
}
1588
1589
static enum BC_STATUS crystalhd_fw_cmd_post_proc(struct crystalhd_hw *hw,
1590
					  struct BC_FW_CMD *fw_cmd)
1591
{
1592
	enum BC_STATUS sts = BC_STS_SUCCESS;
1593
	struct dec_rsp_channel_start_video *st_rsp = NULL;
1594
1595
	switch (fw_cmd->cmd[0]) {
1596
	case eCMD_C011_DEC_CHAN_START_VIDEO:
1597
		st_rsp = (struct dec_rsp_channel_start_video *)fw_cmd->rsp;
1598
		hw->pib_del_Q_addr = st_rsp->picInfoDeliveryQ;
1599
		hw->pib_rel_Q_addr = st_rsp->picInfoReleaseQ;
1600
		BCMLOG(BCMLOG_DBG, "DelQAddr:%x RelQAddr:%x\n",
1601
		       hw->pib_del_Q_addr, hw->pib_rel_Q_addr);
1602
		break;
1603
	case eCMD_C011_INIT:
1604
		if (!(crystalhd_load_firmware_config(hw->adp))) {
1605
			BCMLOG_ERR("Invalid Params.\n");
1606
			sts = BC_STS_FW_AUTH_FAILED;
1607
		}
1608
		break;
1609
	default:
1610
		break;
1611
	}
1612
	return sts;
1613
}
1614
1615
static enum BC_STATUS crystalhd_put_ddr2sleep(struct crystalhd_hw *hw)
1616
{
1617
	uint32_t reg;
1618
	union link_misc_perst_decoder_ctrl rst_cntrl_reg;
1619
1620
	/* Pulse reset pin of 7412 (MISC_PERST_DECODER_CTRL) */
1621
	rst_cntrl_reg.whole_reg = crystalhd_reg_rd(hw->adp,
1622
					 MISC_PERST_DECODER_CTRL);
1623
1624
	rst_cntrl_reg.bcm_7412_rst = 1;
1625
	crystalhd_reg_wr(hw->adp, MISC_PERST_DECODER_CTRL,
1626
					 rst_cntrl_reg.whole_reg);
1627
	msleep_interruptible(50);
1628
1629
	rst_cntrl_reg.bcm_7412_rst = 0;
1630
	crystalhd_reg_wr(hw->adp, MISC_PERST_DECODER_CTRL,
1631
					 rst_cntrl_reg.whole_reg);
1632
1633
	/* Close all banks, put DDR in idle */
1634
	bc_dec_reg_wr(hw->adp, SDRAM_PRECHARGE, 0);
1635
1636
	/* Set bit 25 (drop CKE pin of DDR) */
1637
	reg = bc_dec_reg_rd(hw->adp, SDRAM_PARAM);
1638
	reg |= 0x02000000;
1639
	bc_dec_reg_wr(hw->adp, SDRAM_PARAM, reg);
1640
1641
	/* Reset the audio block */
1642
	bc_dec_reg_wr(hw->adp, AUD_DSP_MISC_SOFT_RESET, 0x1);
1643
1644
	/* Power down Raptor PLL */
1645
	reg = bc_dec_reg_rd(hw->adp, DecHt_PllCCtl);
1646
	reg |= 0x00008000;
1647
	bc_dec_reg_wr(hw->adp, DecHt_PllCCtl, reg);
1648
1649
	/* Power down all Audio PLL */
1650
	bc_dec_reg_wr(hw->adp, AIO_MISC_PLL_RESET, 0x1);
1651
1652
	/* Power down video clock (75MHz) */
1653
	reg = bc_dec_reg_rd(hw->adp, DecHt_PllECtl);
1654
	reg |= 0x00008000;
1655
	bc_dec_reg_wr(hw->adp, DecHt_PllECtl, reg);
1656
1657
	/* Power down video clock (75MHz) */
1658
	reg = bc_dec_reg_rd(hw->adp, DecHt_PllDCtl);
1659
	reg |= 0x00008000;
1660
	bc_dec_reg_wr(hw->adp, DecHt_PllDCtl, reg);
1661
1662
	/* Power down core clock (200MHz) */
1663
	reg = bc_dec_reg_rd(hw->adp, DecHt_PllACtl);
1664
	reg |= 0x00008000;
1665
	bc_dec_reg_wr(hw->adp, DecHt_PllACtl, reg);
1666
1667
	/* Power down core clock (200MHz) */
1668
	reg = bc_dec_reg_rd(hw->adp, DecHt_PllBCtl);
1669
	reg |= 0x00008000;
1670
	bc_dec_reg_wr(hw->adp, DecHt_PllBCtl, reg);
1671
1672
	return BC_STS_SUCCESS;
1673
}
1674
1675
/************************************************
1676
**
1677
*************************************************/
1678
1679
enum BC_STATUS crystalhd_download_fw(struct crystalhd_adp *adp, void *buffer,
1680
					 uint32_t sz)
1681
{
1682
	uint32_t reg_data, cnt, *temp_buff;
1683
	uint32_t fw_sig_len = 36;
1684
	uint32_t dram_offset = BC_FWIMG_ST_ADDR, sig_reg;
1685
1686
1687
	if (!adp || !buffer || !sz) {
1688
		BCMLOG_ERR("Invalid Params.\n");
1689
		return BC_STS_INV_ARG;
1690
	}
1691
1692
	reg_data = crystalhd_reg_rd(adp, OTP_CMD);
1693
	if (!(reg_data & 0x02)) {
1694
		BCMLOG_ERR("Invalid hw config.. otp not programmed\n");
1695
		return BC_STS_ERROR;
1696
	}
1697
1698
	reg_data = 0;
1699
	crystalhd_reg_wr(adp, DCI_CMD, 0);
1700
	reg_data |= BC_BIT(0);
1701
	crystalhd_reg_wr(adp, DCI_CMD, reg_data);
1702
1703
	reg_data = 0;
1704
	cnt = 1000;
1705
	msleep_interruptible(10);
1706
1707
	while (reg_data != BC_BIT(4)) {
1708
		reg_data = crystalhd_reg_rd(adp, DCI_STATUS);
1709
		reg_data &= BC_BIT(4);
1710
		if (--cnt == 0) {
1711
			BCMLOG_ERR("Firmware Download RDY Timeout.\n");
1712
			return BC_STS_TIMEOUT;
1713
		}
1714
	}
1715
1716
	msleep_interruptible(10);
1717
	/*  Load the FW to the FW_ADDR field in the DCI_FIRMWARE_ADDR */
1718
	crystalhd_reg_wr(adp, DCI_FIRMWARE_ADDR, dram_offset);
1719
	temp_buff = (uint32_t *)buffer;
1720
	for (cnt = 0; cnt < (sz - fw_sig_len); cnt += 4) {
1721
		crystalhd_reg_wr(adp, DCI_DRAM_BASE_ADDR, (dram_offset >> 19));
1722
		crystalhd_reg_wr(adp, DCI_FIRMWARE_DATA, *temp_buff);
1723
		dram_offset += 4;
1724
		temp_buff++;
1725
	}
1726
	msleep_interruptible(10);
1727
1728
	temp_buff++;
1729
1730
	sig_reg = (uint32_t)DCI_SIGNATURE_DATA_7;
1731
	for (cnt = 0; cnt < 8; cnt++) {
1732
		uint32_t swapped_data = *temp_buff;
1733
		swapped_data = bswap_32_1(swapped_data);
1734
		crystalhd_reg_wr(adp, sig_reg, swapped_data);
1735
		sig_reg -= 4;
1736
		temp_buff++;
1737
	}
1738
	msleep_interruptible(10);
1739
1740
	reg_data = 0;
1741
	reg_data |= BC_BIT(1);
1742
	crystalhd_reg_wr(adp, DCI_CMD, reg_data);
1743
	msleep_interruptible(10);
1744
1745
	reg_data = 0;
1746
	reg_data = crystalhd_reg_rd(adp, DCI_STATUS);
1747
1748
	if ((reg_data & BC_BIT(9)) == BC_BIT(9)) {
1749
		cnt = 1000;
1750
		while ((reg_data & BC_BIT(0)) != BC_BIT(0)) {
1751
			reg_data = crystalhd_reg_rd(adp, DCI_STATUS);
1752
			reg_data &= BC_BIT(0);
1753
			if (!(--cnt))
1754
				break;
1755
			msleep_interruptible(10);
1756
		}
1757
		reg_data = 0;
1758
		reg_data = crystalhd_reg_rd(adp, DCI_CMD);
1759
		reg_data |= BC_BIT(4);
1760
		crystalhd_reg_wr(adp, DCI_CMD, reg_data);
1761
1762
	} else {
1763
		BCMLOG_ERR("F/w Signature mismatch\n");
1764
		return BC_STS_FW_AUTH_FAILED;
1765
	}
1766
1767
	BCMLOG(BCMLOG_INFO, "Firmware Downloaded Successfully\n");
1768
	return BC_STS_SUCCESS;
1769
}
1770
1771
enum BC_STATUS crystalhd_do_fw_cmd(struct crystalhd_hw *hw,
1772
				struct BC_FW_CMD *fw_cmd)
1773
{
1774
	uint32_t cnt = 0, cmd_res_addr;
1775
	uint32_t *cmd_buff, *res_buff;
1776
	wait_queue_head_t fw_cmd_event;
1777
	int rc = 0;
1778
	enum BC_STATUS sts;
1779
1780
	crystalhd_create_event(&fw_cmd_event);
1781
1782
	if (!hw || !fw_cmd) {
1783
		BCMLOG_ERR("Invalid Arguments\n");
1784
		return BC_STS_INV_ARG;
1785
	}
1786
1787
	cmd_buff = fw_cmd->cmd;
1788
	res_buff = fw_cmd->rsp;
1789
1790
	if (!cmd_buff || !res_buff) {
1791
		BCMLOG_ERR("Invalid Parameters for F/W Command\n");
1792
		return BC_STS_INV_ARG;
1793
	}
1794
1795
	hw->pwr_lock++;
1796
1797
	hw->fwcmd_evt_sts = 0;
1798
	hw->pfw_cmd_event = &fw_cmd_event;
1799
1800
	/*Write the command to the memory*/
1801
	crystalhd_mem_wr(hw->adp, TS_Host2CpuSnd, FW_CMD_BUFF_SZ, cmd_buff);
1802
1803
	/*Memory Read for memory arbitrator flush*/
1804
	crystalhd_mem_rd(hw->adp, TS_Host2CpuSnd, 1, &cnt);
1805
1806
	/* Write the command address to mailbox */
1807
	bc_dec_reg_wr(hw->adp, Hst2CpuMbx1, TS_Host2CpuSnd);
1808
	msleep_interruptible(50);
1809
1810
	crystalhd_wait_on_event(&fw_cmd_event, hw->fwcmd_evt_sts, 20000, rc, 0);
1811
1812
	if (!rc) {
1813
		sts = BC_STS_SUCCESS;
1814
	} else if (rc == -EBUSY) {
1815
		BCMLOG_ERR("Firmware command T/O\n");
1816
		sts = BC_STS_TIMEOUT;
1817
	} else if (rc == -EINTR) {
1818
		BCMLOG(BCMLOG_DBG, "FwCmd Wait Signal int.\n");
1819
		sts = BC_STS_IO_USER_ABORT;
1820
	} else {
1821
		BCMLOG_ERR("FwCmd IO Error.\n");
1822
		sts = BC_STS_IO_ERROR;
1823
	}
1824
1825
	if (sts != BC_STS_SUCCESS) {
1826
		BCMLOG_ERR("FwCmd Failed.\n");
1827
		hw->pwr_lock--;
1828
		return sts;
1829
	}
1830
1831
	/*Get the Response Address*/
1832
	cmd_res_addr = bc_dec_reg_rd(hw->adp, Cpu2HstMbx1);
1833
1834
	/*Read the Response*/
1835
	crystalhd_mem_rd(hw->adp, cmd_res_addr, FW_CMD_BUFF_SZ, res_buff);
1836
1837
	hw->pwr_lock--;
1838
1839
	if (res_buff[2] != C011_RET_SUCCESS) {
1840
		BCMLOG_ERR("res_buff[2] != C011_RET_SUCCESS\n");
1841
		return BC_STS_FW_CMD_ERR;
1842
	}
622
	}
1843
623
1844
	sts = crystalhd_fw_cmd_post_proc(hw, fw_cmd);
624
	if (comp_sts == BC_STS_SUCCESS)
1845
	if (sts != BC_STS_SUCCESS)
625
	{
1846
		BCMLOG_ERR("crystalhd_fw_cmd_post_proc Failed.\n");
626
		hw->DrvTotalFrmCaptured++;
1847
1848
	return sts;
1849
}
1850
1851
bool crystalhd_hw_interrupt(struct crystalhd_adp *adp, struct crystalhd_hw *hw)
1852
{
1853
	uint32_t intr_sts = 0;
1854
	uint32_t deco_intr = 0;
1855
	bool rc = false;
1856
1857
	if (!adp || !hw->dev_started)
1858
		return rc;
1859
627
1860
	hw->stats.num_interrupts++;
628
		hw->pfnHWGetDoneSize(hw, list_index, &y_dw_dnsz, &uv_dw_dnsz);
1861
	hw->pwr_lock++;
629
		rx_pkt->dio_req->uinfo.y_done_sz = y_dw_dnsz;
1862
630
		rx_pkt->flags = COMP_FLAG_DATA_VALID;
1863
	deco_intr = bc_dec_reg_rd(adp, Stream2Host_Intr_Sts);
631
		if (rx_pkt->uv_phy_addr)
1864
	intr_sts  = crystalhd_reg_rd(adp, INTR_INTR_STATUS);
632
			rx_pkt->dio_req->uinfo.uv_done_sz = uv_dw_dnsz;
633
		crystalhd_dioq_add(hw->rx_rdyq, rx_pkt, true,
634
							hw->rx_pkt_tag_seed + list_index);
1865
635
1866
	if (intr_sts) {
636
		if( hw->adp->pdev->device == BC_PCI_DEVID_FLEA)
1867
		/* let system know we processed interrupt..*/
637
		{
1868
		rc = true;
638
			/*printk("pre-PD state %x RLL %x Ptsh %x ratio %d currentPS %d\n", */
1869
		hw->stats.dev_interrupts++;
639
			/*	hw->FleaPowerState, crystalhd_dioq_count(hw->rx_rdyq) , hw->PauseThreshold, hw->PDRatio, hw->FleaPowerState); */
1870
	}
640
			if(hw->FleaPowerState == FLEA_PS_ACTIVE)
641
			{
642
				if(crystalhd_dioq_count(hw->rx_rdyq) >= hw->PauseThreshold)
643
				{
644
					hw->pfnIssuePause(hw, true);
645
					hw->hw_pause_issued = true;
646
				}
647
				/* NAREN check if the PD ratio is less than 50. If so, try to reduce the PauseThreshold to improve the ratio */
648
				/* never go lower than 6 pictures */
649
				/* Only do this when we have some data to determine PDRatio */
650
				/* For now assume that if we have captured 100 pictures then we should have enough data for the analysis to start */
651
				if((hw->PDRatio < 50) && (hw->PauseThreshold > 6) && (hw->DrvTotalFrmCaptured > 100))
652
				{
653
					/*printk("Current PDRatio:%u, PauseThreshold:%u, DrvTotalFrmCaptured:%u  decress PauseThreshold\n", */
654
					/*	hw->PDRatio, hw->PauseThreshold, hw->DrvTotalFrmCaptured); */
655
					hw->PauseThreshold--;
656
				}
657
				else {
658
					rdtscll(currTick);
659
660
					temp_64 = (hw->TickSpentInPD)>>24;
661
					TickSpentInPD_Hi = (uint32_t)(temp_64);
662
					TickSpentInPD_Hi_f = (int32_t)TickSpentInPD_Hi;
663
664
					temp_64 = (currTick - hw->TickCntDecodePU)>>24;
665
					totalTick_Hi = (uint32_t)(temp_64);
666
					totalTick_Hi_f = (int32_t)totalTick_Hi;
667
668
					if( totalTick_Hi_f <= 0 )
669
					{
670
						temp_64 = (hw->TickSpentInPD);
671
						TickSpentInPD_Hi = (uint32_t)(temp_64);
672
						TickSpentInPD_Hi_f = (int32_t)TickSpentInPD_Hi;
673
674
						temp_64 = (currTick - hw->TickCntDecodePU);
675
						totalTick_Hi = (uint32_t)(temp_64);
676
						totalTick_Hi_f = (int32_t)totalTick_Hi;
677
					}
678
679
					if( totalTick_Hi_f <= 0 )
680
					{
681
						printk("totalTick_Hi_f <= 0, set hw->PDRatio = 60\n");
682
						hw->PDRatio = 60;
683
					}
684
					else
685
						hw->PDRatio = (TickSpentInPD_Hi_f * 100) / totalTick_Hi_f;
1871
686
1872
	if (deco_intr && (deco_intr != 0xdeaddead)) {
687
					/*printk("Current PDRatio:%u, PauseThreshold:%u, DrvTotalFrmCaptured:%u  don't decress PauseThreshold\n", */
688
					/*	hw->PDRatio, hw->PauseThreshold, hw->DrvTotalFrmCaptured); */
1873
689
1874
		if (deco_intr & 0x80000000) {
690
					/*hw->PDRatio = ((uint32_t)(hw->TickSpentInPD))/((uint32_t)(currTick - hw->TickCntDecodePU)/100); */
1875
			/*Set the Event and the status flag*/
691
				}
1876
			if (hw->pfw_cmd_event) {
1877
				hw->fwcmd_evt_sts = 1;
1878
				crystalhd_set_event(hw->pfw_cmd_event);
1879
			}
692
			}
1880
		}
693
		}
1881
694
		else if( hw->hw_pause_issued == false )
1882
		if (deco_intr & BC_BIT(1))
695
		{
1883
			crystalhd_hw_proc_pib(hw);
696
#if 0
1884
697
			if(crystalhd_dioq_count(hw->rx_rdyq) > hw->PauseThreshold)/*HW_PAUSE_THRESHOLD */
1885
		bc_dec_reg_wr(adp, Stream2Host_Intr_Sts, deco_intr);
698
			{
1886
		/* FIXME: jarod: No udelay? might this be
699
				dev_info(&hw->adp->pdev->dev, "HW PAUSE\n");
1887
		 the real reason mini pci-e cards were stalling out? */
700
				hw->pfnIssuePause(hw, true);
1888
		bc_dec_reg_wr(adp, Stream2Host_Intr_Sts, 0);
701
				hw->hw_pause_issued = true;
1889
		rc = true;
702
			}
1890
	}
703
#endif
1891
1892
	/* Rx interrupts */
1893
	crystalhd_rx_isr(hw, intr_sts);
1894
1895
	/* Tx interrupts*/
1896
	crystalhd_tx_isr(hw, intr_sts);
1897
1898
	/* Clear interrupts */
1899
	if (rc) {
1900
		if (intr_sts)
1901
			crystalhd_reg_wr(adp, INTR_INTR_CLR_REG, intr_sts);
1902
1903
		crystalhd_reg_wr(adp, INTR_EOI_CTRL, 1);
1904
	}
1905
1906
	hw->pwr_lock--;
1907
1908
	return rc;
1909
}
1910
1911
enum BC_STATUS crystalhd_hw_open(struct crystalhd_hw *hw,
1912
			 struct crystalhd_adp *adp)
1913
{
1914
	if (!hw || !adp) {
1915
		BCMLOG_ERR("Invalid Arguments\n");
1916
		return BC_STS_INV_ARG;
1917
	}
1918
1919
	if (hw->dev_started)
1920
		return BC_STS_SUCCESS;
1921
1922
	memset(hw, 0, sizeof(struct crystalhd_hw));
1923
1924
	hw->adp = adp;
1925
	spin_lock_init(&hw->lock);
1926
	spin_lock_init(&hw->rx_lock);
1927
	/* FIXME: jarod: what are these magic numbers?!? */
1928
	hw->tx_ioq_tag_seed = 0x70023070;
1929
	hw->rx_pkt_tag_seed = 0x70029070;
1930
1931
	hw->stop_pending = 0;
1932
	crystalhd_start_device(hw->adp);
1933
	hw->dev_started = true;
1934
1935
	/* set initial core clock  */
1936
	hw->core_clock_mhz = CLOCK_PRESET;
1937
	hw->prev_n = 0;
1938
	hw->pwr_lock = 0;
1939
	crystalhd_hw_set_core_clock(hw);
1940
1941
	return BC_STS_SUCCESS;
1942
}
1943
1944
enum BC_STATUS crystalhd_hw_close(struct crystalhd_hw *hw)
1945
{
1946
	if (!hw) {
1947
		BCMLOG_ERR("Invalid Arguments\n");
1948
		return BC_STS_INV_ARG;
1949
	}
1950
1951
	if (!hw->dev_started)
1952
		return BC_STS_SUCCESS;
1953
1954
	/* Stop and DDR sleep will happen in here */
1955
	crystalhd_hw_suspend(hw);
1956
	hw->dev_started = false;
1957
1958
	return BC_STS_SUCCESS;
1959
}
1960
1961
enum BC_STATUS crystalhd_hw_setup_dma_rings(struct crystalhd_hw *hw)
1962
{
1963
	unsigned int i;
1964
	void *mem;
1965
	size_t mem_len;
1966
	dma_addr_t phy_addr;
1967
	enum BC_STATUS sts = BC_STS_SUCCESS;
1968
	struct crystalhd_rx_dma_pkt *rpkt;
1969
1970
	if (!hw || !hw->adp) {
1971
		BCMLOG_ERR("Invalid Arguments\n");
1972
		return BC_STS_INV_ARG;
1973
	}
1974
1975
	sts = crystalhd_hw_create_ioqs(hw);
1976
	if (sts != BC_STS_SUCCESS) {
1977
		BCMLOG_ERR("Failed to create IOQs..\n");
1978
		return sts;
1979
	}
1980
1981
	mem_len = BC_LINK_MAX_SGLS * sizeof(struct dma_descriptor);
1982
1983
	for (i = 0; i < BC_TX_LIST_CNT; i++) {
1984
		mem = bc_kern_dma_alloc(hw->adp, mem_len, &phy_addr);
1985
		if (mem) {
1986
			memset(mem, 0, mem_len);
1987
		} else {
1988
			BCMLOG_ERR("Insufficient Memory For TX\n");
1989
			crystalhd_hw_free_dma_rings(hw);
1990
			return BC_STS_INSUFF_RES;
1991
		}
1992
		/* rx_pkt_pool -- static memory allocation  */
1993
		hw->tx_pkt_pool[i].desc_mem.pdma_desc_start = mem;
1994
		hw->tx_pkt_pool[i].desc_mem.phy_addr = phy_addr;
1995
		hw->tx_pkt_pool[i].desc_mem.sz = BC_LINK_MAX_SGLS *
1996
						 sizeof(struct dma_descriptor);
1997
		hw->tx_pkt_pool[i].list_tag = 0;
1998
1999
		/* Add TX dma requests to Free Queue..*/
2000
		sts = crystalhd_dioq_add(hw->tx_freeq,
2001
				       &hw->tx_pkt_pool[i], false, 0);
2002
		if (sts != BC_STS_SUCCESS) {
2003
			crystalhd_hw_free_dma_rings(hw);
2004
			return sts;
2005
		}
2006
	}
2007
2008
	for (i = 0; i < BC_RX_LIST_CNT; i++) {
2009
		rpkt = kzalloc(sizeof(*rpkt), GFP_KERNEL);
2010
		if (!rpkt) {
2011
			BCMLOG_ERR("Insufficient Memory For RX\n");
2012
			crystalhd_hw_free_dma_rings(hw);
2013
			return BC_STS_INSUFF_RES;
2014
		}
2015
2016
		mem = bc_kern_dma_alloc(hw->adp, mem_len, &phy_addr);
2017
		if (mem) {
2018
			memset(mem, 0, mem_len);
2019
		} else {
2020
			BCMLOG_ERR("Insufficient Memory For RX\n");
2021
			crystalhd_hw_free_dma_rings(hw);
2022
			kfree(rpkt);
2023
			return BC_STS_INSUFF_RES;
2024
		}
704
		}
2025
		rpkt->desc_mem.pdma_desc_start = mem;
2026
		rpkt->desc_mem.phy_addr = phy_addr;
2027
		rpkt->desc_mem.sz  = BC_LINK_MAX_SGLS *
2028
					 sizeof(struct dma_descriptor);
2029
		rpkt->pkt_tag = hw->rx_pkt_tag_seed + i;
2030
		crystalhd_hw_free_rx_pkt(hw, rpkt);
2031
	}
2032
2033
	return BC_STS_SUCCESS;
2034
}
2035
2036
enum BC_STATUS crystalhd_hw_free_dma_rings(struct crystalhd_hw *hw)
2037
{
2038
	unsigned int i;
2039
	struct crystalhd_rx_dma_pkt *rpkt = NULL;
2040
2041
	if (!hw || !hw->adp) {
2042
		BCMLOG_ERR("Invalid Arguments\n");
2043
		return BC_STS_INV_ARG;
2044
	}
2045
2046
	/* Delete all IOQs.. */
2047
	crystalhd_hw_delete_ioqs(hw);
2048
2049
	for (i = 0; i < BC_TX_LIST_CNT; i++) {
2050
		if (hw->tx_pkt_pool[i].desc_mem.pdma_desc_start) {
2051
			bc_kern_dma_free(hw->adp,
2052
				hw->tx_pkt_pool[i].desc_mem.sz,
2053
				hw->tx_pkt_pool[i].desc_mem.pdma_desc_start,
2054
				hw->tx_pkt_pool[i].desc_mem.phy_addr);
2055
705
2056
			hw->tx_pkt_pool[i].desc_mem.pdma_desc_start = NULL;
706
		return sts;
2057
		}
2058
	}
707
	}
2059
708
	/* Check if we can post this DIO again. */
2060
	BCMLOG(BCMLOG_DBG, "Releasing RX Pkt pool\n");
709
	return hw->pfnPostRxSideBuff(hw, rx_pkt);
2061
	do {
2062
		rpkt = crystalhd_hw_alloc_rx_pkt(hw);
2063
		if (!rpkt)
2064
			break;
2065
		bc_kern_dma_free(hw->adp, rpkt->desc_mem.sz,
2066
				 rpkt->desc_mem.pdma_desc_start,
2067
				 rpkt->desc_mem.phy_addr);
2068
		kfree(rpkt);
2069
	} while (rpkt);
2070
2071
	return BC_STS_SUCCESS;
2072
}
710
}
2073
711
2074
enum BC_STATUS crystalhd_hw_post_tx(struct crystalhd_hw *hw,
712
BC_STATUS crystalhd_hw_post_tx(struct crystalhd_hw *hw, struct crystalhd_dio_req *ioreq,
2075
			     struct crystalhd_dio_req *ioreq,
2076
			     hw_comp_callback call_back,
713
			     hw_comp_callback call_back,
2077
			     wait_queue_head_t *cb_event, uint32_t *list_id,
714
			     wait_queue_head_t *cb_event, uint32_t *list_id,
2078
			     uint8_t data_flags)
715
			     uint8_t data_flags)
2079
{
716
{
717
	struct device *dev;
2080
	struct tx_dma_pkt *tx_dma_packet = NULL;
718
	struct tx_dma_pkt *tx_dma_packet = NULL;
2081
	uint32_t first_desc_u_addr, first_desc_l_addr;
2082
	uint32_t low_addr, high_addr;
719
	uint32_t low_addr, high_addr;
2083
	union addr_64 desc_addr;
720
	addr_64 desc_addr;
2084
	enum BC_STATUS sts, add_sts;
721
	BC_STATUS sts, add_sts;
2085
	uint32_t dummy_index = 0;
722
	uint32_t dummy_index = 0;
2086
	unsigned long flags;
723
	unsigned long flags;
724
	uint8_t list_posted;
725
	uint8_t local_flags = data_flags;
2087
	bool rc;
726
	bool rc;
727
	uint32_t destDRAMaddr = 0;
2088
728
2089
	if (!hw || !ioreq || !call_back || !cb_event || !list_id) {
729
	if (!hw || !ioreq || !call_back || !cb_event || !list_id) {
2090
		BCMLOG_ERR("Invalid Arguments\n");
730
		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
2091
		return BC_STS_INV_ARG;
731
		return BC_STS_INV_ARG;
2092
	}
732
	}
2093
733
734
	dev = &hw->adp->pdev->dev;
735
2094
	/*
736
	/*
2095
	 * Since we hit code in busy condition very frequently,
737
	 * Since we hit code in busy condition very frequently,
2096
	 * we will check the code in status first before
738
	 * we will check the code in status first before
Lines 2098-2132 enum BC_STATUS crystalhd_hw_post_tx(stru Link Here
2098
	 *
740
	 *
2099
	 * This will avoid the Q fetch/add in normal condition.
741
	 * This will avoid the Q fetch/add in normal condition.
2100
	 */
742
	 */
2101
	rc = crystalhd_code_in_full(hw->adp, ioreq->uinfo.xfr_len,
743
2102
				  false, data_flags);
744
	rc = hw->pfnCheckInputFIFO(hw, ioreq->uinfo.xfr_len,
745
					   &dummy_index, false, &local_flags);
746
2103
	if (rc) {
747
	if (rc) {
2104
		hw->stats.cin_busy++;
748
		hw->stats.cin_busy++;
2105
		return BC_STS_BUSY;
749
		return BC_STS_BUSY;
2106
	}
750
	}
2107
751
752
	if(local_flags & BC_BIT(7))
753
		destDRAMaddr = hw->TxFwInputBuffInfo.DramBuffAdd;
754
2108
	/* Get a list from TxFreeQ */
755
	/* Get a list from TxFreeQ */
2109
	tx_dma_packet = (struct tx_dma_pkt *)crystalhd_dioq_fetch(
756
	tx_dma_packet = (struct tx_dma_pkt *)crystalhd_dioq_fetch(hw->tx_freeq);
2110
						hw->tx_freeq);
2111
	if (!tx_dma_packet) {
757
	if (!tx_dma_packet) {
2112
		BCMLOG_ERR("No empty elements..\n");
758
		dev_err(dev, "No empty elements..\n");
2113
		return BC_STS_ERR_USAGE;
759
		return BC_STS_INSUFF_RES;
2114
	}
760
	}
2115
761
2116
	sts = crystalhd_xlat_sgl_to_dma_desc(ioreq,
762
	sts = crystalhd_xlat_sgl_to_dma_desc(ioreq,
2117
					   &tx_dma_packet->desc_mem,
763
					     &tx_dma_packet->desc_mem,
2118
					   &dummy_index);
764
					     &dummy_index, dev, destDRAMaddr);
2119
	if (sts != BC_STS_SUCCESS) {
765
	if (sts != BC_STS_SUCCESS) {
2120
		add_sts = crystalhd_dioq_add(hw->tx_freeq, tx_dma_packet,
766
		add_sts = crystalhd_dioq_add(hw->tx_freeq, tx_dma_packet,
2121
					   false, 0);
767
					   false, 0);
2122
		if (add_sts != BC_STS_SUCCESS)
768
		if (add_sts != BC_STS_SUCCESS)
2123
			BCMLOG_ERR("double fault..\n");
769
			dev_err(dev, "double fault..\n");
2124
770
2125
		return sts;
771
		return sts;
2126
	}
772
	}
2127
773
2128
	hw->pwr_lock++;
2129
2130
	desc_addr.full_addr = tx_dma_packet->desc_mem.phy_addr;
774
	desc_addr.full_addr = tx_dma_packet->desc_mem.phy_addr;
2131
	low_addr = desc_addr.low_part;
775
	low_addr = desc_addr.low_part;
2132
	high_addr = desc_addr.high_part;
776
	high_addr = desc_addr.high_part;
Lines 2137-2157 enum BC_STATUS crystalhd_hw_post_tx(stru Link Here
2137
781
2138
	spin_lock_irqsave(&hw->lock, flags);
782
	spin_lock_irqsave(&hw->lock, flags);
2139
783
2140
	if (hw->tx_list_post_index == 0) {
784
	list_posted = hw->tx_list_post_index;
2141
		first_desc_u_addr = MISC1_TX_FIRST_DESC_U_ADDR_LIST0;
2142
		first_desc_l_addr = MISC1_TX_FIRST_DESC_L_ADDR_LIST0;
2143
	} else {
2144
		first_desc_u_addr = MISC1_TX_FIRST_DESC_U_ADDR_LIST1;
2145
		first_desc_l_addr = MISC1_TX_FIRST_DESC_L_ADDR_LIST1;
2146
	}
2147
785
2148
	*list_id = tx_dma_packet->list_tag = hw->tx_ioq_tag_seed +
786
	*list_id = tx_dma_packet->list_tag = hw->tx_ioq_tag_seed +
2149
					     hw->tx_list_post_index;
787
					     hw->tx_list_post_index;
2150
788
2151
	hw->tx_list_post_index = (hw->tx_list_post_index + 1) % DMA_ENGINE_CNT;
2152
789
2153
	spin_unlock_irqrestore(&hw->lock, flags);
790
	if( hw->tx_list_post_index % DMA_ENGINE_CNT) {
791
		hw->TxList1Sts |= TxListWaitingForIntr;
792
	}
793
	else {
794
		hw->TxList0Sts |= TxListWaitingForIntr;
795
	}
2154
796
797
	hw->tx_list_post_index = (hw->tx_list_post_index + 1) % DMA_ENGINE_CNT;
2155
798
2156
	/* Insert in Active Q..*/
799
	/* Insert in Active Q..*/
2157
	crystalhd_dioq_add(hw->tx_actq, tx_dma_packet, false,
800
	crystalhd_dioq_add(hw->tx_actq, tx_dma_packet, false,
Lines 2162-2173 enum BC_STATUS crystalhd_hw_post_tx(stru Link Here
2162
	 * the valid bit. So be ready for that. All
805
	 * the valid bit. So be ready for that. All
2163
	 * the initialization should happen before that.
806
	 * the initialization should happen before that.
2164
	 */
807
	 */
2165
	crystalhd_start_tx_dma_engine(hw);
2166
	crystalhd_reg_wr(hw->adp, first_desc_u_addr, desc_addr.high_part);
2167
808
2168
	crystalhd_reg_wr(hw->adp, first_desc_l_addr, desc_addr.low_part |
809
	/* Save the transfer length */
2169
					 0x01);
810
	hw->TxFwInputBuffInfo.HostXferSzInBytes = ioreq->uinfo.xfr_len;
2170
					/* Be sure we set the valid bit ^^^^ */
811
812
	hw->pfnStartTxDMA(hw, list_posted, desc_addr);
813
814
	spin_unlock_irqrestore(&hw->lock, flags);
2171
815
2172
	return BC_STS_SUCCESS;
816
	return BC_STS_SUCCESS;
2173
}
817
}
Lines 2181-2215 enum BC_STATUS crystalhd_hw_post_tx(stru Link Here
2181
 *
825
 *
2182
 * FIX_ME: Not Tested the actual condition..
826
 * FIX_ME: Not Tested the actual condition..
2183
 */
827
 */
2184
enum BC_STATUS crystalhd_hw_cancel_tx(struct crystalhd_hw *hw,
828
BC_STATUS crystalhd_hw_cancel_tx(struct crystalhd_hw *hw, uint32_t list_id)
2185
					 uint32_t list_id)
2186
{
829
{
830
	unsigned long flags;
2187
	if (!hw || !list_id) {
831
	if (!hw || !list_id) {
2188
		BCMLOG_ERR("Invalid Arguments\n");
832
		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
2189
		return BC_STS_INV_ARG;
833
		return BC_STS_INV_ARG;
2190
	}
834
	}
2191
835
2192
	crystalhd_stop_tx_dma_engine(hw);
836
	spin_lock_irqsave(&hw->lock, flags);
837
	hw->pfnStopTxDMA(hw);
838
	spin_unlock_irqrestore(&hw->lock, flags);
2193
	crystalhd_hw_tx_req_complete(hw, list_id, BC_STS_IO_USER_ABORT);
839
	crystalhd_hw_tx_req_complete(hw, list_id, BC_STS_IO_USER_ABORT);
2194
840
2195
	return BC_STS_SUCCESS;
841
	return BC_STS_SUCCESS;
2196
}
842
}
2197
843
2198
enum BC_STATUS crystalhd_hw_add_cap_buffer(struct crystalhd_hw *hw,
844
BC_STATUS crystalhd_hw_add_cap_buffer(struct crystalhd_hw *hw,
2199
				 struct crystalhd_dio_req *ioreq, bool en_post)
845
				    struct crystalhd_dio_req *ioreq, bool en_post)
2200
{
846
{
2201
	struct crystalhd_rx_dma_pkt *rpkt;
847
	struct crystalhd_rx_dma_pkt *rpkt;
2202
	uint32_t tag, uv_desc_ix = 0;
848
	uint32_t tag, uv_desc_ix = 0;
2203
	enum BC_STATUS sts;
849
	BC_STATUS sts;
2204
850
2205
	if (!hw || !ioreq) {
851
	if (!hw || !ioreq) {
2206
		BCMLOG_ERR("Invalid Arguments\n");
852
		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
2207
		return BC_STS_INV_ARG;
853
		return BC_STS_INV_ARG;
2208
	}
854
	}
2209
855
2210
	rpkt = crystalhd_hw_alloc_rx_pkt(hw);
856
	rpkt = crystalhd_hw_alloc_rx_pkt(hw);
2211
	if (!rpkt) {
857
	if (!rpkt) {
2212
		BCMLOG_ERR("Insufficient resources\n");
858
		dev_err(&hw->adp->pdev->dev, "Insufficient resources\n");
2213
		return BC_STS_INSUFF_RES;
859
		return BC_STS_INSUFF_RES;
2214
	}
860
	}
2215
861
Lines 2217-2223 enum BC_STATUS crystalhd_hw_add_cap_buff Link Here
2217
	tag = rpkt->pkt_tag;
863
	tag = rpkt->pkt_tag;
2218
864
2219
	sts = crystalhd_xlat_sgl_to_dma_desc(ioreq, &rpkt->desc_mem,
865
	sts = crystalhd_xlat_sgl_to_dma_desc(ioreq, &rpkt->desc_mem,
2220
					 &uv_desc_ix);
866
					     &uv_desc_ix, &hw->adp->pdev->dev, 0);
2221
	if (sts != BC_STS_SUCCESS)
867
	if (sts != BC_STS_SUCCESS)
2222
		return sts;
868
		return sts;
2223
869
Lines 2226-2260 enum BC_STATUS crystalhd_hw_add_cap_buff Link Here
2226
	/* Store the address of UV in the rx packet for post*/
872
	/* Store the address of UV in the rx packet for post*/
2227
	if (uv_desc_ix)
873
	if (uv_desc_ix)
2228
		rpkt->uv_phy_addr = rpkt->desc_mem.phy_addr +
874
		rpkt->uv_phy_addr = rpkt->desc_mem.phy_addr +
2229
			 (sizeof(struct dma_descriptor) * (uv_desc_ix + 1));
875
				    (sizeof(struct dma_descriptor) * (uv_desc_ix + 1));
2230
876
2231
	if (en_post)
877
	if (en_post && !hw->hw_pause_issued) {
2232
		sts = crystalhd_hw_post_cap_buff(hw, rpkt);
878
		sts = hw->pfnPostRxSideBuff(hw, rpkt);
2233
	else
879
	}
880
	else {
2234
		sts = crystalhd_dioq_add(hw->rx_freeq, rpkt, false, tag);
881
		sts = crystalhd_dioq_add(hw->rx_freeq, rpkt, false, tag);
882
		hw->pfnNotifyFLLChange(hw, false);
883
	}
2235
884
2236
	return sts;
885
	return sts;
2237
}
886
}
2238
887
2239
enum BC_STATUS crystalhd_hw_get_cap_buffer(struct crystalhd_hw *hw,
888
BC_STATUS crystalhd_hw_get_cap_buffer(struct crystalhd_hw *hw,
2240
				    struct BC_PIC_INFO_BLOCK *pib,
889
										struct C011_PIB *pib,
2241
				    struct crystalhd_dio_req **ioreq)
890
										struct crystalhd_dio_req **ioreq)
2242
{
891
{
2243
	struct crystalhd_rx_dma_pkt *rpkt;
892
	struct crystalhd_rx_dma_pkt *rpkt;
2244
	uint32_t timeout = BC_PROC_OUTPUT_TIMEOUT / 1000;
893
	uint32_t timeout = BC_PROC_OUTPUT_TIMEOUT / 1000;
2245
	uint32_t sig_pending = 0;
894
	uint32_t sig_pending = 0;
2246
895
2247
2248
	if (!hw || !ioreq || !pib) {
896
	if (!hw || !ioreq || !pib) {
2249
		BCMLOG_ERR("Invalid Arguments\n");
897
		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
2250
		return BC_STS_INV_ARG;
898
		return BC_STS_INV_ARG;
2251
	}
899
	}
2252
900
2253
	rpkt = crystalhd_dioq_fetch_wait(hw->rx_rdyq, timeout, &sig_pending);
901
	rpkt = crystalhd_dioq_fetch_wait(hw, timeout, &sig_pending);
902
903
	if( hw->adp->pdev->device == BC_PCI_DEVID_FLEA)
904
	{
905
		/*printk("pre-PU state %x RLL %x Rtsh %x, currentPS %d,\n", */
906
		/*	hw->FleaPowerState, crystalhd_dioq_count(hw->rx_rdyq) , hw->ResumeThreshold, hw->FleaPowerState); */
907
		if( (hw->FleaPowerState == FLEA_PS_LP_PENDING) ||
908
			(hw->FleaPowerState == FLEA_PS_LP_COMPLETE))
909
		{
910
			if(crystalhd_dioq_count(hw->rx_rdyq)  <= hw->ResumeThreshold)
911
				hw->pfnIssuePause(hw, false);	/*Need this Notification For Flea*/
912
				hw->hw_pause_issued = false;
913
		}
914
	}
915
	else if( hw->hw_pause_issued)
916
	{
917
#if 0
918
		if(crystalhd_dioq_count(hw->rx_rdyq) < hw->PauseThreshold ) /*HW_RESUME_THRESHOLD */
919
		{
920
			dev_info(&hw->adp->pdev->dev, "HW RESUME with rdy list %u \n",crystalhd_dioq_count(hw->rx_rdyq));
921
			hw->pfnIssuePause(hw, false);
922
			hw->hw_pause_issued = false;
923
		}
924
#endif
925
	}
926
2254
	if (!rpkt) {
927
	if (!rpkt) {
2255
		if (sig_pending) {
928
		if (sig_pending) {
2256
			BCMLOG(BCMLOG_INFO, "wait on frame time out %d\n",
2257
					 sig_pending);
2258
			return BC_STS_IO_USER_ABORT;
929
			return BC_STS_IO_USER_ABORT;
2259
		} else {
930
		} else {
2260
			return BC_STS_TIMEOUT;
931
			return BC_STS_TIMEOUT;
Lines 2264-2270 enum BC_STATUS crystalhd_hw_get_cap_buff Link Here
2264
	rpkt->dio_req->uinfo.comp_flags = rpkt->flags;
935
	rpkt->dio_req->uinfo.comp_flags = rpkt->flags;
2265
936
2266
	if (rpkt->flags & COMP_FLAG_PIB_VALID)
937
	if (rpkt->flags & COMP_FLAG_PIB_VALID)
2267
		memcpy(pib, &rpkt->pib, sizeof(*pib));
938
	{
939
		pib->ppb.picture_number = rpkt->pib.picture_number;
940
		pib->ppb.width = rpkt->pib.width;
941
		pib->ppb.height = rpkt->pib.height;
942
		pib->ppb.chroma_format = rpkt->pib.chroma_format;
943
		pib->ppb.pulldown = rpkt->pib.pulldown;
944
		pib->ppb.flags = rpkt->pib.flags;
945
		pib->ptsStcOffset = rpkt->pib.sess_num;
946
		pib->ppb.aspect_ratio = rpkt->pib.aspect_ratio;
947
		pib->ppb.colour_primaries = rpkt->pib.colour_primaries;
948
		pib->ppb.picture_meta_payload = rpkt->pib.picture_meta_payload;
949
		pib->resolution = rpkt->pib.frame_rate;
950
	}
2268
951
2269
	*ioreq = rpkt->dio_req;
952
	*ioreq = rpkt->dio_req;
2270
953
Lines 2273-2286 enum BC_STATUS crystalhd_hw_get_cap_buff Link Here
2273
	return BC_STS_SUCCESS;
956
	return BC_STS_SUCCESS;
2274
}
957
}
2275
958
2276
enum BC_STATUS crystalhd_hw_start_capture(struct crystalhd_hw *hw)
959
BC_STATUS crystalhd_hw_start_capture(struct crystalhd_hw *hw)
2277
{
960
{
2278
	struct crystalhd_rx_dma_pkt *rx_pkt;
961
	struct crystalhd_rx_dma_pkt *rx_pkt;
2279
	enum BC_STATUS sts;
962
	BC_STATUS sts;
2280
	uint32_t i;
963
	uint32_t i;
2281
964
2282
	if (!hw) {
965
	if (!hw) {
2283
		BCMLOG_ERR("Invalid Arguments\n");
966
		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
2284
		return BC_STS_INV_ARG;
967
		return BC_STS_INV_ARG;
2285
	}
968
	}
2286
969
Lines 2289-2295 enum BC_STATUS crystalhd_hw_start_captur Link Here
2289
		rx_pkt = crystalhd_dioq_fetch(hw->rx_freeq);
972
		rx_pkt = crystalhd_dioq_fetch(hw->rx_freeq);
2290
		if (!rx_pkt)
973
		if (!rx_pkt)
2291
			return BC_STS_NO_DATA;
974
			return BC_STS_NO_DATA;
2292
		sts = crystalhd_hw_post_cap_buff(hw, rx_pkt);
975
		sts = hw->pfnPostRxSideBuff(hw, rx_pkt);
2293
		if (BC_STS_SUCCESS != sts)
976
		if (BC_STS_SUCCESS != sts)
2294
			break;
977
			break;
2295
978
Lines 2298-2384 enum BC_STATUS crystalhd_hw_start_captur Link Here
2298
	return BC_STS_SUCCESS;
981
	return BC_STS_SUCCESS;
2299
}
982
}
2300
983
2301
enum BC_STATUS crystalhd_hw_stop_capture(struct crystalhd_hw *hw)
984
BC_STATUS crystalhd_hw_stop_capture(struct crystalhd_hw *hw, bool unmap)
2302
{
985
{
2303
	void *temp = NULL;
986
	void *temp = NULL;
2304
987
2305
	if (!hw) {
988
	if (!hw) {
2306
		BCMLOG_ERR("Invalid Arguments\n");
989
		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
2307
		return BC_STS_INV_ARG;
990
		return BC_STS_INV_ARG;
2308
	}
991
	}
2309
992
2310
	crystalhd_stop_rx_dma_engine(hw);
993
	hw->pfnStopRXDMAEngines(hw);
994
995
	if(!unmap)
996
		return BC_STS_SUCCESS;
2311
997
998
	/* Clear up Active, Ready and Free lists one by one and release resources */
2312
	do {
999
	do {
2313
		temp = crystalhd_dioq_fetch(hw->rx_freeq);
1000
		temp = crystalhd_dioq_fetch(hw->rx_actq);
2314
		if (temp)
1001
		if (temp)
2315
			crystalhd_rx_pkt_rel_call_back(hw, temp);
1002
			crystalhd_rx_pkt_rel_call_back(hw, temp);
2316
	} while (temp);
1003
	} while (temp);
2317
1004
2318
	return BC_STS_SUCCESS;
1005
	do {
2319
}
1006
		temp = crystalhd_dioq_fetch(hw->rx_rdyq);
2320
1007
		if (temp)
2321
enum BC_STATUS crystalhd_hw_pause(struct crystalhd_hw *hw)
1008
			crystalhd_rx_pkt_rel_call_back(hw, temp);
2322
{
1009
	} while (temp);
2323
	hw->stats.pause_cnt++;
2324
	hw->stop_pending = 1;
2325
1010
2326
	if ((hw->rx_list_sts[0] == sts_free) &&
1011
	do {
2327
	    (hw->rx_list_sts[1] == sts_free))
1012
		temp = crystalhd_dioq_fetch(hw->rx_freeq);
2328
		crystalhd_hw_finalize_pause(hw);
1013
		if (temp)
1014
			crystalhd_rx_pkt_rel_call_back(hw, temp);
1015
	} while (temp);
2329
1016
2330
	return BC_STS_SUCCESS;
1017
	return BC_STS_SUCCESS;
2331
}
1018
}
2332
1019
2333
enum BC_STATUS crystalhd_hw_unpause(struct crystalhd_hw *hw)
1020
BC_STATUS crystalhd_hw_suspend(struct crystalhd_hw *hw)
2334
{
1021
{
2335
	enum BC_STATUS sts;
1022
	if (!hw) {
2336
	uint32_t aspm;
1023
		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
2337
1024
		return BC_STS_INV_ARG;
2338
	hw->stop_pending = 0;
1025
	}
2339
1026
2340
	aspm = crystalhd_reg_rd(hw->adp, PCIE_DLL_DATA_LINK_CONTROL);
1027
	if (!hw->pfnStopDevice(hw)) {
2341
	aspm &= ~ASPM_L1_ENABLE;
1028
		dev_info(&hw->adp->pdev->dev, "Failed to Stop Device!!\n");
2342
/* NAREN BCMLOG(BCMLOG_INFO, "aspm off\n"); */
1029
		return BC_STS_ERROR;
2343
	crystalhd_reg_wr(hw->adp, PCIE_DLL_DATA_LINK_CONTROL, aspm);
1030
	}
2344
1031
2345
	sts = crystalhd_hw_start_capture(hw);
1032
	return BC_STS_SUCCESS;
2346
	return sts;
2347
}
1033
}
2348
1034
2349
enum BC_STATUS crystalhd_hw_suspend(struct crystalhd_hw *hw)
1035
BC_STATUS crystalhd_hw_resume(struct crystalhd_hw *hw)
2350
{
1036
{
2351
	enum BC_STATUS sts;
2352
2353
	if (!hw) {
1037
	if (!hw) {
2354
		BCMLOG_ERR("Invalid Arguments\n");
1038
		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
2355
		return BC_STS_INV_ARG;
1039
		return BC_STS_INV_ARG;
2356
	}
1040
	}
2357
1041
2358
	sts = crystalhd_put_ddr2sleep(hw);
1042
	// Reset list state
2359
	if (sts != BC_STS_SUCCESS) {
1043
	hw->rx_list_sts[0] = sts_free;
2360
		BCMLOG_ERR("Failed to Put DDR To Sleep!!\n");
1044
	hw->rx_list_sts[1] = sts_free;
2361
		return BC_STS_ERROR;
1045
	hw->TxList0Sts = ListStsFree;
2362
	}
1046
	hw->TxList1Sts = ListStsFree;
1047
	hw->rx_list_post_index = 0;
1048
	hw->tx_list_post_index = 0;
2363
1049
2364
	if (!crystalhd_stop_device(hw->adp)) {
1050
	if (hw->pfnStartDevice(hw)) {
2365
		BCMLOG_ERR("Failed to Stop Device!!\n");
1051
		dev_info(&hw->adp->pdev->dev, "Failed to Start Device!!\n");
2366
		return BC_STS_ERROR;
1052
		return BC_STS_ERROR;
2367
	}
1053
	}
2368
1054
2369
	return BC_STS_SUCCESS;
1055
	return BC_STS_SUCCESS;
2370
}
1056
}
2371
1057
2372
void crystalhd_hw_stats(struct crystalhd_hw *hw,
1058
void crystalhd_hw_stats(struct crystalhd_hw *hw, struct crystalhd_hw_stats *stats)
2373
		 struct crystalhd_hw_stats *stats)
2374
{
1059
{
2375
	if (!hw) {
1060
	if (!hw) {
2376
		BCMLOG_ERR("Invalid Arguments\n");
1061
		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
2377
		return;
1062
		return;
2378
	}
1063
	}
2379
1064
2380
	/* if called w/NULL stats, its a req to zero out the stats */
1065
	/* if called w/NULL stats, its a req to zero out the stats */
2381
	if (!stats) {
1066
	if (!stats) {
1067
		hw->DrvTotalFrmCaptured = 0;
2382
		memset(&hw->stats, 0, sizeof(hw->stats));
1068
		memset(&hw->stats, 0, sizeof(hw->stats));
2383
		return;
1069
		return;
2384
	}
1070
	}
Lines 2387-2456 void crystalhd_hw_stats(struct crystalhd Link Here
2387
	hw->stats.rdyq_count  = crystalhd_dioq_count(hw->rx_rdyq);
1073
	hw->stats.rdyq_count  = crystalhd_dioq_count(hw->rx_rdyq);
2388
	memcpy(stats, &hw->stats, sizeof(*stats));
1074
	memcpy(stats, &hw->stats, sizeof(*stats));
2389
}
1075
}
2390
2391
enum BC_STATUS crystalhd_hw_set_core_clock(struct crystalhd_hw *hw)
2392
{
2393
	uint32_t reg, n, i;
2394
	uint32_t vco_mg, refresh_reg;
2395
2396
	if (!hw) {
2397
		BCMLOG_ERR("Invalid Arguments\n");
2398
		return BC_STS_INV_ARG;
2399
	}
2400
2401
	/* FIXME: jarod: wha? */
2402
	/*n = (hw->core_clock_mhz * 3) / 20 + 1; */
2403
	n = hw->core_clock_mhz/5;
2404
2405
	if (n == hw->prev_n)
2406
		return BC_STS_CLK_NOCHG;
2407
2408
	if (hw->pwr_lock > 0) {
2409
		/* BCMLOG(BCMLOG_INFO,"pwr_lock is %u\n", hw->pwr_lock) */
2410
		return BC_STS_CLK_NOCHG;
2411
	}
2412
2413
	i = n * 27;
2414
	if (i < 560)
2415
		vco_mg = 0;
2416
	else if (i < 900)
2417
		vco_mg = 1;
2418
	else if (i < 1030)
2419
		vco_mg = 2;
2420
	else
2421
		vco_mg = 3;
2422
2423
	reg = bc_dec_reg_rd(hw->adp, DecHt_PllACtl);
2424
2425
	reg &= 0xFFFFCFC0;
2426
	reg |= n;
2427
	reg |= vco_mg << 12;
2428
2429
	BCMLOG(BCMLOG_INFO, "clock is moving to %d with n %d with vco_mg %d\n",
2430
	       hw->core_clock_mhz, n, vco_mg);
2431
2432
	/* Change the DRAM refresh rate to accommodate the new frequency */
2433
	/* refresh reg = ((refresh_rate * clock_rate)/16) - 1; rounding up*/
2434
	refresh_reg = (7 * hw->core_clock_mhz / 16);
2435
	bc_dec_reg_wr(hw->adp, SDRAM_REF_PARAM, ((1 << 12) | refresh_reg));
2436
2437
	bc_dec_reg_wr(hw->adp, DecHt_PllACtl, reg);
2438
2439
	i = 0;
2440
2441
	for (i = 0; i < 10; i++) {
2442
		reg = bc_dec_reg_rd(hw->adp, DecHt_PllACtl);
2443
2444
		if (reg & 0x00020000) {
2445
			hw->prev_n = n;
2446
			/* FIXME: jarod: outputting
2447
			 a random "C" is... confusing... */
2448
			BCMLOG(BCMLOG_INFO, "C");
2449
			return BC_STS_SUCCESS;
2450
		} else {
2451
			msleep_interruptible(10);
2452
		}
2453
	}
2454
	BCMLOG(BCMLOG_INFO, "clk change failed\n");
2455
	return BC_STS_CLK_NOCHG;
2456
}
(-)crystalhd~/crystalhd_hw.h (-240 / +385 lines)
Lines 26-193 Link Here
26
26
27
#ifndef _CRYSTALHD_HW_H_
27
#ifndef _CRYSTALHD_HW_H_
28
#define _CRYSTALHD_HW_H_
28
#define _CRYSTALHD_HW_H_
29
#define DEBUG 1
29
30
30
#include "crystalhd.h"
31
#include <linux/device.h>
32
#include <linux/version.h>
33
#include <linux/delay.h>
34
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 24)
35
#include <linux/semaphore.h>
36
#else
37
#include <asm/semaphore.h>
38
#endif
39
#include "crystalhd_fw_if.h"
40
#include "crystalhd_misc.h"
41
#include "DriverFwShare.h"
42
#include "FleaDefs.h"
31
43
32
/* HW constants..*/
44
/* HW constants..*/
33
#define DMA_ENGINE_CNT		2
45
#define DMA_ENGINE_CNT		2
34
#define MAX_PIB_Q_DEPTH		64
46
#define MAX_PIB_Q_DEPTH		64
35
#define MIN_PIB_Q_DEPTH		2
47
#define MIN_PIB_Q_DEPTH		2
36
#define WR_POINTER_OFF		4
48
#define WR_POINTER_OFF		4
49
#define MAX_VALID_POLL_CNT	1000
37
50
38
#define ASPM_L1_ENABLE		(BC_BIT(27))
51
#define TX_WRAP_THRESHOLD 128 * 1024
39
40
/*************************************************
41
  7412 Decoder  Registers.
42
**************************************************/
43
#define FW_CMD_BUFF_SZ		64
44
#define TS_Host2CpuSnd		0x00000100
45
#define Hst2CpuMbx1		0x00100F00
46
#define Cpu2HstMbx1		0x00100F04
47
#define MbxStat1		0x00100F08
48
#define Stream2Host_Intr_Sts	0x00100F24
49
#define C011_RET_SUCCESS	0x0 /* Return status of firmware command. */
50
51
/* TS input status register */
52
#define TS_StreamAFIFOStatus	0x0010044C
53
#define TS_StreamBFIFOStatus	0x0010084C
54
55
/*UART Selection definitions*/
56
#define UartSelectA		0x00100300
57
#define UartSelectB		0x00100304
58
59
#define BSVS_UART_DEC_NONE	0x00
60
#define BSVS_UART_DEC_OUTER	0x01
61
#define BSVS_UART_DEC_INNER	0x02
62
#define BSVS_UART_STREAM	0x03
63
64
/* Code-In fifo */
65
#define REG_DecCA_RegCinCTL	0xa00
66
#define REG_DecCA_RegCinBase	0xa0c
67
#define REG_DecCA_RegCinEnd	0xa10
68
#define REG_DecCA_RegCinWrPtr	0xa04
69
#define REG_DecCA_RegCinRdPtr	0xa08
70
71
#define REG_Dec_TsUser0Base	0x100864
72
#define REG_Dec_TsUser0Rdptr	0x100868
73
#define REG_Dec_TsUser0Wrptr	0x10086C
74
#define REG_Dec_TsUser0End	0x100874
75
76
/* ASF Case ...*/
77
#define REG_Dec_TsAudCDB2Base	0x10036c
78
#define REG_Dec_TsAudCDB2Rdptr  0x100378
79
#define REG_Dec_TsAudCDB2Wrptr  0x100374
80
#define REG_Dec_TsAudCDB2End	0x100370
81
82
/* DRAM bringup Registers */
83
#define SDRAM_PARAM		0x00040804
84
#define SDRAM_PRECHARGE		0x000408B0
85
#define SDRAM_EXT_MODE		0x000408A4
86
#define SDRAM_MODE		0x000408A0
87
#define SDRAM_REFRESH		0x00040890
88
#define SDRAM_REF_PARAM		0x00040808
89
90
#define DecHt_PllACtl		0x34000C
91
#define DecHt_PllBCtl		0x340010
92
#define DecHt_PllCCtl		0x340014
93
#define DecHt_PllDCtl		0x340034
94
#define DecHt_PllECtl		0x340038
95
#define AUD_DSP_MISC_SOFT_RESET	0x00240104
96
#define AIO_MISC_PLL_RESET	0x0026000C
97
#define PCIE_CLK_REQ_REG	0xDC
98
#define	PCI_CLK_REQ_ENABLE	(BC_BIT(8))
99
100
/*************************************************
101
  F/W Copy engine definitions..
102
**************************************************/
103
#define BC_FWIMG_ST_ADDR	0x00000000
104
/* FIXME: jarod: there's a kernel function that'll do this for us... */
105
#define rotr32_1(x, n)		(((x) >> n) | ((x) << (32 - n)))
106
#define bswap_32_1(x) ((rotr32_1((x), 24) & 0x00ff00ff) | (rotr32_1((x), 8) & 0xff00ff00))
107
108
#define DecHt_HostSwReset	0x340000
109
#define BC_DRAM_FW_CFG_ADDR	0x001c2000
110
111
union addr_64 {
112
	struct {
113
		uint32_t	low_part;
114
		uint32_t	high_part;
115
	};
116
52
117
	uint64_t	full_addr;
53
#define	NUMBER_OF_TRANSFERS_TX_SIDE				1
118
54
#define NUMBER_OF_TRANSFERS_RX_SIDE				2
119
};
120
121
union intr_mask_reg {
122
	struct {
123
		uint32_t	mask_tx_done:1;
124
		uint32_t	mask_tx_err:1;
125
		uint32_t	mask_rx_done:1;
126
		uint32_t	mask_rx_err:1;
127
		uint32_t	mask_pcie_err:1;
128
		uint32_t	mask_pcie_rbusmast_err:1;
129
		uint32_t	mask_pcie_rgr_bridge:1;
130
		uint32_t	reserved:25;
131
	};
132
133
	uint32_t	whole_reg;
134
135
};
136
137
union link_misc_perst_deco_ctrl {
138
	struct {
139
		uint32_t	bcm7412_rst:1;	/* 1 -> BCM7412 is held
140
						in reset. Reset value 1.*/
141
		uint32_t	reserved0:3;		/* Reserved.No Effect*/
142
		uint32_t	stop_bcm_7412_clk:1;	/* 1 ->Stops branch of
143
						27MHz clk used to clk BCM7412*/
144
		uint32_t	reserved1:27;		/* Reserved. No Effect*/
145
	};
146
147
	uint32_t	whole_reg;
148
149
};
150
151
union link_misc_perst_clk_ctrl {
152
	struct {
153
		uint32_t	sel_alt_clk:1;	  /* When set, selects a
154
				 6.75MHz clock as the source of core_clk */
155
		uint32_t	stop_core_clk:1;  /* When set, stops the branch
156
		 of core_clk that is not needed for low power operation */
157
		uint32_t	pll_pwr_dn:1;	  /* When set, powers down the
158
			 main PLL. The alternate clock bit should be set to
159
			 select an alternate clock before setting this bit.*/
160
		uint32_t	reserved0:5;	  /* Reserved */
161
		uint32_t	pll_mult:8;	  /* This setting controls
162
						 the multiplier for the PLL. */
163
		uint32_t	pll_div:4;	  /* This setting controls
164
						 the divider for the PLL. */
165
		uint32_t	reserved1:12;	  /* Reserved */
166
	};
167
168
	uint32_t	whole_reg;
169
170
};
171
172
union link_misc_perst_decoder_ctrl {
173
	struct {
174
		uint32_t	bcm_7412_rst:1; /* 1 -> BCM7412 is held
175
						 in reset. Reset value 1.*/
176
		uint32_t	res0:3; /* Reserved.No Effect*/
177
		uint32_t	stop_7412_clk:1; /* 1 ->Stops branch of 27MHz
178
						 clk used to clk BCM7412*/
179
		uint32_t	res1:27; /* Reserved. No Effect */
180
	};
181
182
	uint32_t	whole_reg;
183
55
56
struct BC_DRV_PIC_INFO {
57
	struct C011_PIB			DecoPIB;
58
	struct BC_DRV_PIC_INFO		*Flink;
184
};
59
};
185
60
186
union desc_low_addr_reg {
61
union desc_low_addr_reg {
187
	struct {
62
	struct {
63
#ifdef	__LITTLE_ENDIAN_BITFIELD
188
		uint32_t	list_valid:1;
64
		uint32_t	list_valid:1;
189
		uint32_t	reserved:4;
65
		uint32_t	reserved:4;
190
		uint32_t	low_addr:27;
66
		uint32_t	low_addr:27;
67
#else
68
		uint32_t	low_addr:27;
69
		uint32_t	reserved:4;
70
		uint32_t	list_valid:1;
71
#endif
191
	};
72
	};
192
73
193
	uint32_t	whole_reg;
74
	uint32_t	whole_reg;
Lines 195-200 union desc_low_addr_reg { Link Here
195
};
76
};
196
77
197
struct dma_descriptor {	/* 8 32-bit values */
78
struct dma_descriptor {	/* 8 32-bit values */
79
#ifdef	__LITTLE_ENDIAN_BITFIELD
198
	/* 0th u32 */
80
	/* 0th u32 */
199
	uint32_t sdram_buff_addr:28;	/* bits 0-27:  SDRAM Address */
81
	uint32_t sdram_buff_addr:28;	/* bits 0-27:  SDRAM Address */
200
	uint32_t res0:4;		/* bits 28-31: Reserved */
82
	uint32_t res0:4;		/* bits 28-31: Reserved */
Lines 225-231 struct dma_descriptor { /* 8 32-bit valu Link Here
225
107
226
	/* 7th u32 */
108
	/* 7th u32 */
227
	uint32_t res8;			/* Last 32bits reserved */
109
	uint32_t res8;			/* Last 32bits reserved */
110
#else
111
	/* 0th u32 */
112
	uint32_t res0:4;		/* bits 28-31: Reserved */
113
	uint32_t sdram_buff_addr:28;	/* bits 0-27:  SDRAM Address */
228
114
115
	/* 1st u32 */
116
	uint32_t buff_addr_low;		/* 1 buffer address low */
117
	uint32_t buff_addr_high;	/* 2 buffer address high */
118
119
	/* 3rd u32 */
120
	uint32_t intr_enable:1;		/* 31 - Interrupt After this desc */
121
	uint32_t res3:6;		/* 25-30 reserved */
122
	uint32_t xfer_size:23;		/* 2-24 = Xfer size in words */
123
	uint32_t res2:2;		/* 0-1 - Reserved */
124
125
	/* 4th u32 */
126
	uint32_t last_rec_indicator:1;	/* 31 bit Last Record Indicator */
127
	uint32_t dma_dir:1;		/* 30 bit DMA Direction */
128
	uint32_t fill_bytes:2;		/* 28-29 Bits Fill Bytes */
129
	uint32_t res4:25;		/* 3 - 27 Reserved bits */
130
	uint32_t next_desc_cont:1;	/* 2 - Next desc is in contig memory */
131
	uint32_t endian_xlat_align:2;	/* 0-1 Endian Translation */
132
133
	/* 5th u32 */
134
	uint32_t next_desc_addr_low;	/* 32-bits Next Desc Addr lower */
135
136
	/* 6th u32 */
137
	uint32_t next_desc_addr_high;	/* 32-bits Next Desc Addr Higher */
138
139
	/* 7th u32 */
140
	uint32_t res8;			/* Last 32bits reserved */
141
#endif
229
};
142
};
230
143
231
/*
144
/*
Lines 234-250 struct dma_descriptor { /* 8 32-bit valu Link Here
234
 * The  virtual address will determine what should be freed.
147
 * The  virtual address will determine what should be freed.
235
 */
148
 */
236
struct dma_desc_mem {
149
struct dma_desc_mem {
237
	struct dma_descriptor	*pdma_desc_start; /* 32-bytes for dma
150
	struct dma_descriptor		*pdma_desc_start;	/* 32-bytes for dma descriptor. should be first element */
238
				 descriptor. should be first element */
151
	dma_addr_t		phy_addr;		/* physical address of each DMA desc */
239
	dma_addr_t		phy_addr;	/* physical address
240
						 of each DMA desc */
241
	uint32_t		sz;
152
	uint32_t		sz;
242
	struct _dma_desc_mem_	*Next; /* points to Next Descriptor in chain */
153
	struct dma_desc_mem	*Next;			/* points to Next Descriptor in chain */
243
154
244
};
155
};
245
156
246
enum list_sts {
157
enum list_sts {
247
	sts_free = 0,
158
	sts_free		= 0,
248
159
249
	/* RX-Y Bits 0:7 */
160
	/* RX-Y Bits 0:7 */
250
	rx_waiting_y_intr	= 0x00000001,
161
	rx_waiting_y_intr	= 0x00000001,
Lines 259-285 enum list_sts { Link Here
259
170
260
	rx_y_mask		= 0x000000FF,
171
	rx_y_mask		= 0x000000FF,
261
	rx_uv_mask		= 0x0000FF00,
172
	rx_uv_mask		= 0x0000FF00,
173
174
};
175
176
177
enum INTERRUPT_STATUS {
178
	NO_INTERRUPT					= 0x0000,
179
	FPGA_RX_L0_DMA_DONE				= 0x0001, /*DONT CHANGE VALUES...SOME BITWIZE OPERATIONS WILL FAIL*/
180
	FPGA_RX_L1_DMA_DONE				= 0x0002, /*DONT CHANGE VALUES...SOME BITWIZE OPERATIONS WILL FAIL*/
181
	FPGA_TX_L0_DMA_DONE				= 0x0004, /*DONT CHANGE VALUES...SOME BITWIZE OPERATIONS WILL FAIL*/
182
	FPGA_TX_L1_DMA_DONE				= 0x0008, /*DONT CHANGE VALUES...SOME BITWIZE OPERATIONS WILL FAIL*/
183
	DECO_PIB_INTR					= 0x0010, /*DONT CHANGE VALUES...SOME BITWIZE OPERATIONS WILL FAIL*/
184
	DECO_FMT_CHANGE					= 0x0020,
185
	DECO_MBOX_RESP					= 0x0040,
186
	DECO_RESUME_FRM_INTER_PAUSE		= 0x0080, /*Not Handled in DPC Need to Fire Rx cmds on resume from Pause*/
187
};
188
189
enum ERROR_STATUS {
190
	NO_ERROR			=0,
191
	RX_Y_DMA_ERR_L0		=0x0001,/*DONT CHANGE VALUES...SOME BITWIZE OPERATIONS WILL FAIL*/
192
	RX_UV_DMA_ERR_L0	=0x0002,/*DONT CHANGE VALUES...SOME BITWIZE OPERATIONS WILL FAIL*/
193
	RX_Y_DMA_ERR_L1		=0x0004,/*DONT CHANGE VALUES...SOME BITWIZE OPERATIONS WILL FAIL*/
194
	RX_UV_DMA_ERR_L1	=0x0008,/*DONT CHANGE VALUES...SOME BITWIZE OPERATIONS WILL FAIL*/
195
	TX_DMA_ERR_L0		=0x0010,/*DONT CHANGE VALUES...SOME BITWIZE OPERATIONS WILL FAIL*/
196
	TX_DMA_ERR_L1		=0x0020,/*DONT CHANGE VALUES...SOME BITWIZE OPERATIONS WILL FAIL*/
197
	FW_CMD_ERROR		=0x0040,
198
	DROP_REPEATED		=0x0080,
199
	DROP_FLEA_FMTCH		=0x0100,/*We do not want to deliver the flea dummy frame*/
200
	DROP_DATA_ERROR		=0x0200,/*We were not able to get the PIB correctly so drop the frame. */
201
	DROP_SIZE_ERROR		=0x0400,/*We were not able to get the size properly from hardware. */
202
	FORCE_CANCEL		=0x8000
203
};
204
205
enum LIST_STATUS {
206
	ListStsFree=0,				/* Initial state and state the buffer is moved to Ready Buffer list. */
207
	RxListWaitingForYIntr=1,	/* When the Y Descriptor is posted. */
208
	RxListWaitingForUVIntr=2,	/* When the UV descriptor is posted. */
209
	TxListWaitingForIntr =4,
210
};
211
212
struct RX_DMA_LIST {
213
	enum LIST_STATUS		ListSts;
214
	/*LIST_ENTRY		ActiveList; */
215
	uint32_t			ActiveListLen;
216
	uint32_t			ListLockInd;					/* To Be Filled up During Init */
217
	uint32_t			ulDiscCount;					/* Discontinuity On this list */
218
	uint32_t			RxYFirstDescLADDRReg;			/* First Desc Low Addr Y	*/
219
	uint32_t			RxYFirstDescUADDRReg;			/* First Desc UPPER Addr Y	*/
220
	uint32_t			RxYCurDescLADDRReg;				/* Current Desc Low Addr Y	*/
221
	uint32_t			RxYCurDescUADDRReg;				/* First Desc Low Addr Y	*/
222
	uint32_t			RxYCurByteCntRemReg;			/* Cur Byte Cnt Rem Y		*/
223
224
	uint32_t			RxUVFirstDescLADDRReg;			/* First Desc Low Addr UV		*/
225
	uint32_t			RxUVFirstDescUADDRReg;			/* First Desc UPPER Addr UV		*/
226
	uint32_t			RxUVCurDescLADDRReg;			/* Current Desc Low Addr UV		*/
227
	uint32_t			RxUVCurDescUADDRReg;			/* Current Desc UPPER Addr UV	*/
228
	uint32_t			RxUVCurByteCntRemReg;			/* Cur Byte Cnt Rem UV			*/
262
};
229
};
263
230
264
struct tx_dma_pkt {
231
struct tx_dma_pkt {
265
	struct dma_desc_mem	desc_mem;
232
	struct dma_desc_mem		desc_mem;
266
	hw_comp_callback	call_back;
233
	hw_comp_callback	call_back;
267
	struct crystalhd_dio_req	*dio_req;
234
	struct crystalhd_dio_req	*dio_req;
268
	wait_queue_head_t	*cb_event;
235
	wait_queue_head_t	*cb_event;
269
	uint32_t		list_tag;
236
	uint32_t		list_tag;
237
270
};
238
};
271
239
272
struct crystalhd_rx_dma_pkt {
240
struct crystalhd_rx_dma_pkt {
273
	struct dma_desc_mem		desc_mem;
241
	struct dma_desc_mem			desc_mem;
274
	struct crystalhd_dio_req	*dio_req;
242
	struct crystalhd_dio_req		*dio_req;
275
	uint32_t			pkt_tag;
243
	uint32_t			pkt_tag;
276
	uint32_t			flags;
244
	uint32_t			flags;
277
	struct BC_PIC_INFO_BLOCK	pib;
245
	BC_PIC_INFO_BLOCK		pib;
278
	dma_addr_t			uv_phy_addr;
246
	dma_addr_t			uv_phy_addr;
279
	struct crystalhd_rx_dma_pkt	*next;
247
	struct  crystalhd_rx_dma_pkt	*next;
280
};
248
};
281
249
282
struct crystalhd_hw_stats {
250
struct crystalhd_hw_stats{
283
	uint32_t	rx_errors;
251
	uint32_t	rx_errors;
284
	uint32_t	tx_errors;
252
	uint32_t	tx_errors;
285
	uint32_t	freeq_count;
253
	uint32_t	freeq_count;
Lines 288-316 struct crystalhd_hw_stats { Link Here
288
	uint32_t	dev_interrupts;
256
	uint32_t	dev_interrupts;
289
	uint32_t	cin_busy;
257
	uint32_t	cin_busy;
290
	uint32_t	pause_cnt;
258
	uint32_t	pause_cnt;
259
	uint32_t	rx_success;
291
};
260
};
292
261
262
enum DECO_STATE {
263
	DECO_OPERATIONAL				= 0,			/* We start with this state.ST_FW_DWNLD,ST_CAPTURE,STOP_CAPTURE */
264
	DECO_INTER_PAUSED				= 1,			/* Driver Issued Pause To Decoder */
265
	DECO_INTER_PAUSE_IN_PROGRESS	= 2,			/* Pause CMD is pending with F/W  */
266
	DECO_INTER_RESUME_IN_PROGRESS	= 3,			/* Resume CMD is pending with F/W */
267
	DECO_STOPPED_BY_APP				= 4				/* After STOP Video I do not want to Throttle Decoder.So Special State */
268
};
269
270
/* */
271
/* These events can be used to notify the hardware layer */
272
/* to set up it adapter in proper state...or for anyother */
273
/* purpose for that matter. */
274
/* We will use this for intermediae events as defined below */
275
276
enum BRCM_EVENT {
277
	BC_EVENT_ADAPTER_INIT_FAILED	=0,
278
	BC_EVENT_ADAPTER_INIT_SUCCESS	=1,
279
	BC_EVENT_FW_DNLD_STARTED		=2,
280
	BC_EVENT_FW_DNLD_ERR			=3,
281
	BC_EVENT_FW_DNLD_DONE			=4,
282
	BC_EVENT_SYS_SHUT_DOWN			=5,
283
	BC_EVENT_START_CAPTURE			=6,
284
	BC_EVENT_START_CAPTURE_IMMI		=7,
285
	BC_EVENT_STOP_CAPTURE			=8,		/* Stop Capturing the Rx buffers Stop the DMA engines UnMapBuffers Discard Free and Ready list */
286
	BC_EVENT_DO_CLEANUP				=9,		/* Total Cleanup Rx And Tx side */
287
	BC_DISCARD_RX_BUFFERS			=10		/* Move all the Ready buffers to free list. Stop RX DMA. Post Rx Side buffers. */
288
};
289
290
struct crystalhd_hw; /* forward declaration for the types */
291
292
/*typedef void*		(*HW_VERIFY_DEVICE)(struct crystalhd_adp*); */
293
/*typedef bool		(*HW_INIT_DEVICE_RESOURCES)(struct crystalhd_adp*); */
294
/*typedef bool		(*HW_CLEAN_DEVICE_RESOURCES)(struct crystalhd_adp*); */
295
typedef bool		(*HW_START_DEVICE)(struct crystalhd_hw*);
296
typedef bool		(*HW_STOP_DEVICE)(struct crystalhd_hw*);
297
/* typedef bool	(*HW_XLAT_AND_FIRE_SGL)(struct crystalhd_adp*,PVOID,PSCATTER_GATHER_LIST,uint32_t); */
298
/* typedef bool	(*HW_RX_XLAT_SGL)(struct crystalhd_adp*,crystalhd_dio_req *ioreq); */
299
typedef bool		(*HW_FIND_AND_CLEAR_INTR)(struct crystalhd_adp*,struct crystalhd_hw*);
300
typedef uint32_t	(*HW_READ_DEVICE_REG)(struct crystalhd_adp*,uint32_t);
301
typedef void		(*HW_WRITE_DEVICE_REG)(struct crystalhd_adp*,uint32_t,uint32_t);
302
typedef uint32_t	(*HW_READ_FPGA_REG)(struct crystalhd_adp*,uint32_t);
303
typedef void		(*HW_WRITE_FPGA_REG)(struct crystalhd_adp*,uint32_t,uint32_t);
304
typedef BC_STATUS	(*HW_READ_DEV_MEM)(struct crystalhd_hw*,uint32_t,uint32_t,uint32_t*);
305
typedef BC_STATUS	(*HW_WRITE_DEV_MEM)(struct crystalhd_hw*,uint32_t,uint32_t,uint32_t*);
306
/* typedef bool		(*HW_INIT_DRAM)(struct crystalhd_adp*); */
307
/* typedef bool		(*HW_DISABLE_INTR)(struct crystalhd_adp*); */
308
/* typedef bool		(*HW_ENABLE_INTR)(struct crystalhd_adp*); */
309
typedef BC_STATUS	(*HW_POST_RX_SIDE_BUFF)(struct crystalhd_hw*,struct crystalhd_rx_dma_pkt*);
310
typedef bool		(*HW_CHECK_INPUT_FIFO)(struct crystalhd_hw*, uint32_t, uint32_t*,bool,uint8_t*);
311
typedef void		(*HW_START_TX_DMA)(struct crystalhd_hw*, uint8_t, addr_64);
312
typedef BC_STATUS	(*HW_STOP_TX_DMA)(struct crystalhd_hw*);
313
/* typedef bool		(*HW_EVENT_NOTIFICATION)(struct crystalhd_adp*,BRCM_EVENT); */
314
/* typedef bool		(*HW_RX_POST_INTR_PROCESSING)(struct crystalhd_adp*,uint32_t,uint32_t); */
315
typedef void		(*HW_GET_DONE_SIZE)(struct crystalhd_hw *hw, uint32_t, uint32_t*, uint32_t*);
316
/* typedef bool		(*HW_ADD_DRP_TO_FREE_LIST)(struct crystalhd_adp*,crystalhd_dio_req *ioreq); */
317
typedef struct crystalhd_dio_req*	(*HW_FETCH_DONE_BUFFERS)(struct crystalhd_adp*,bool);
318
/* typedef bool		(*HW_ADD_ROLLBACK_RXBUF)(struct crystalhd_adp*,crystalhd_dio_req *ioreq); */
319
typedef bool		(*HW_PEEK_NEXT_DECODED_RXBUF)(struct crystalhd_hw*,uint64_t*,uint32_t*,uint32_t);
320
typedef BC_STATUS	(*HW_FW_PASSTHRU_CMD)(struct crystalhd_hw*,PBC_FW_CMD);
321
/* typedef bool		(*HW_CANCEL_FW_CMDS)(struct crystalhd_adp*,OS_CANCEL_CALLBACK); */
322
/* typedef void*	(*HW_GET_FW_DONE_OS_CMD)(struct crystalhd_adp*); */
323
/* typedef PBC_DRV_PIC_INFO	(*SEARCH_FOR_PIB)(struct crystalhd_adp*,bool,uint32_t); */
324
/* typedef bool		(*HW_DO_DRAM_PWR_MGMT)(struct crystalhd_adp*); */
325
typedef BC_STATUS	(*HW_FW_DOWNLOAD)(struct crystalhd_hw*,uint8_t*,uint32_t);
326
typedef BC_STATUS	(*HW_ISSUE_DECO_PAUSE)(struct crystalhd_hw*, bool);
327
typedef void		(*HW_STOP_DMA_ENGINES)(struct crystalhd_hw*);
328
/*
329
typedef BOOLEAN		(*FIRE_RX_REQ_TO_HW)	(PHW_EXTENSION,PRX_DMA_LIST);
330
typedef BOOLEAN		(*PIC_POST_PROC)	(PHW_EXTENSION,PRX_DMA_LIST,PULONG);
331
typedef BOOLEAN		(*HW_ISSUE_DECO_PAUSE)	(PHW_EXTENSION,BOOLEAN,BOOLEAN);
332
typedef BOOLEAN		(*FIRE_TX_CMD_TO_HW)	(PCONTEXT_FOR_POST_TX);
333
*/
334
typedef void		(*NOTIFY_FLL_CHANGE)(struct crystalhd_hw*,bool);
335
typedef bool		(*HW_EVENT_NOTIFICATION)(struct crystalhd_hw*, enum BRCM_EVENT);
336
293
struct crystalhd_hw {
337
struct crystalhd_hw {
294
	struct tx_dma_pkt	tx_pkt_pool[DMA_ENGINE_CNT];
338
	struct tx_dma_pkt		tx_pkt_pool[DMA_ENGINE_CNT];
295
	spinlock_t		lock;
339
	spinlock_t		lock;
296
340
297
	uint32_t		tx_ioq_tag_seed;
341
	uint32_t		tx_ioq_tag_seed;
298
	uint32_t		tx_list_post_index;
342
	uint32_t		tx_list_post_index;
299
343
300
	struct crystalhd_rx_dma_pkt *rx_pkt_pool_head;
344
	struct crystalhd_rx_dma_pkt	*rx_pkt_pool_head;
301
	uint32_t		rx_pkt_tag_seed;
345
	uint32_t		rx_pkt_tag_seed;
302
346
303
	bool			dev_started;
347
	bool			dev_started;
304
	void			*adp;
348
	struct crystalhd_adp	*adp;
305
349
306
	wait_queue_head_t	*pfw_cmd_event;
350
	wait_queue_head_t	*pfw_cmd_event;
307
	int			fwcmd_evt_sts;
351
	int			fwcmd_evt_sts;
308
352
309
	uint32_t		pib_del_Q_addr;
353
	uint32_t		pib_del_Q_addr;
310
	uint32_t		pib_rel_Q_addr;
354
	uint32_t		pib_rel_Q_addr;
355
	uint32_t		channelNum;
311
356
312
	struct crystalhd_dioq	*tx_freeq;
357
	struct crystalhd_dioq		*tx_freeq;
313
	struct crystalhd_dioq	*tx_actq;
358
	struct crystalhd_dioq		*tx_actq;
314
359
315
	/* Rx DMA Engine Specific Locks */
360
	/* Rx DMA Engine Specific Locks */
316
	spinlock_t		rx_lock;
361
	spinlock_t		rx_lock;
Lines 321-407 struct crystalhd_hw { Link Here
321
	struct crystalhd_dioq	*rx_actq;
366
	struct crystalhd_dioq	*rx_actq;
322
	uint32_t		stop_pending;
367
	uint32_t		stop_pending;
323
368
369
	uint32_t		hw_pause_issued;
370
371
	uint32_t		fwcmdPostAddr;
372
	uint32_t		fwcmdPostMbox;
373
	uint32_t		fwcmdRespMbox;
374
324
	/* HW counters.. */
375
	/* HW counters.. */
325
	struct crystalhd_hw_stats	stats;
376
	struct crystalhd_hw_stats	stats;
326
377
327
	/* Core clock in MHz */
378
	/* Picture Information Block Management Variables */
328
	uint32_t		core_clock_mhz;
379
	uint32_t	PICWidth;	/* Pic Width Recieved On Format Change for link/With WidthField On Flea*/
329
	uint32_t		prev_n;
380
	uint32_t	PICHeight;	/* Pic Height Recieved on format change[Link and Flea]/Not Used in Flea*/
330
	uint32_t		pwr_lock;
381
	uint32_t	LastPicNo;	/* For Repeated Frame Detection */
331
};
382
	uint32_t	LastTwoPicNo;	/* For Repeated Frame Detection on Interlace clip*/
332
383
	uint32_t	LastSessNum;	/* For Session Change Detection */
333
/* Clock defines for power control */
384
334
#define CLOCK_PRESET 175
385
	struct semaphore fetch_sem; /* semaphore between fetch and probe of the next picture information, since both will be in process context */
335
386
336
/* DMA engine register BIT mask wrappers.. */
387
	uint32_t	RxCaptureState; /* 0 if capture is not enabled, 1 if capture is enabled, 2 if stop rxdma is pending */
337
#define DMA_START_BIT	MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_MASK
388
338
389
	/* BCM70015 mods */
339
#define GET_RX_INTR_MASK (INTR_INTR_STATUS_L1_UV_RX_DMA_ERR_INTR_MASK |	\
390
	uint32_t	PicQSts;		/* This is the bitmap given by PiCQSts Interrupt*/
340
	INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_MASK |	\
391
	uint32_t	TxBuffInfoAddr;		/* Address of the TX Fifo in DRAM*/
341
	INTR_INTR_STATUS_L1_Y_RX_DMA_ERR_INTR_MASK |		\
392
	uint32_t	FleaRxPicDelAddr;	/* Memory address where the pictures are fired*/
342
	INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_MASK |		\
393
	uint32_t	FleaFLLUpdateAddr;	/* Memory Address where FLL is updated*/
343
	INTR_INTR_STATUS_L0_UV_RX_DMA_ERR_INTR_MASK |		\
394
	uint32_t	FleaBmpIntrCnt;
344
	INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_MASK |	\
395
	uint32_t	RxSeqNum;
345
	INTR_INTR_STATUS_L0_Y_RX_DMA_ERR_INTR_MASK |		\
396
	uint32_t	DrvEosDetected;
346
	INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_MASK)
397
	uint32_t	DrvCancelEosFlag;
347
398
348
#define GET_Y0_ERR_MSK (MISC1_Y_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_MASK | \
399
	uint32_t	SkipDropBadFrames;
349
	MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK |		\
400
	uint32_t	TemperatureRegVal;
350
	MISC1_Y_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_MASK |	\
401
	TX_INPUT_BUFFER_INFO	TxFwInputBuffInfo;
351
	MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK)
402
352
403
	enum DECO_STATE			DecoderSt;				/* Weather the decoder is paused or not*/
353
#define GET_UV0_ERR_MSK (MISC1_UV_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_MASK | \
404
	uint32_t			PauseThreshold;
354
	MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK |		\
405
	uint32_t			ResumeThreshold;
355
	MISC1_UV_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_MASK |	\
406
356
	MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK)
407
	uint32_t				RxListPointer;					/* Treat the Rx List As Circular List */
357
408
	enum LIST_STATUS				TxList0Sts;
358
#define GET_Y1_ERR_MSK (MISC1_Y_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_MASK | \
409
	enum LIST_STATUS				TxList1Sts;
359
	MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK |		\
410
360
	MISC1_Y_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_MASK |	\
411
	uint32_t			FleaEnablePWM;
361
	MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK)
412
	uint32_t			FleaWaitFirstPlaybackNotify;
362
413
	enum FLEA_POWER_STATES	FleaPowerState;
363
#define GET_UV1_ERR_MSK	(MISC1_UV_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_MASK | \
414
	uint32_t			EmptyCnt;
364
	MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK |		\
415
	bool				SingleThreadAppFIFOEmpty;
365
	MISC1_UV_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_MASK |	\
416
	bool				PwrDwnTxIntr; /* Got an TX FIFO status interrupt when in power down state */
366
	MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK)
417
	bool				PwrDwnPiQIntr; /* Got a Picture Q interrupt when in power down state */
367
418
	uint32_t			OLWatchDogTimer;
368
419
	uint32_t			ILWatchDogTimer;
369
/**** API Exposed to the other layers ****/
420
	uint32_t			FwCmdCnt;
370
enum BC_STATUS crystalhd_download_fw(struct crystalhd_adp *adp,
421
	bool				WakeUpDecodeDone; /* Used to indicate that the HW is awake to RX is running so we can actively manage power */
371
			      void *buffer, uint32_t sz);
422
372
enum BC_STATUS crystalhd_do_fw_cmd(struct crystalhd_hw *hw,
423
	uint64_t			TickCntDecodePU; /* Time when we first powered up to decode */
373
				 struct BC_FW_CMD *fw_cmd);
424
	uint64_t			TickSpentInPD; /* Total amount of time spent in PD */
374
bool crystalhd_hw_interrupt(struct crystalhd_adp *adp,
425
	uint64_t			TickStartInPD; /* Tick count when we start in PD */
375
				 struct crystalhd_hw *hw);
426
	uint32_t			PDRatio; /* % of time spent in power down. Goal is to keep this close to 50 */
376
enum BC_STATUS crystalhd_hw_open(struct crystalhd_hw *,
427
	uint32_t			DefaultPauseThreshold; /* default threshold to set when we start power management */
377
				 struct crystalhd_adp *);
428
378
enum BC_STATUS crystalhd_hw_close(struct crystalhd_hw *);
429
/*	uint32_t			FreeListLen; */
379
enum BC_STATUS crystalhd_hw_setup_dma_rings(struct crystalhd_hw *);
430
/*	uint32_t			ReadyListLen; */
380
enum BC_STATUS crystalhd_hw_free_dma_rings(struct crystalhd_hw *);
431
381
432
/* */
382
433
/*	Counters needed for monitoring purposes. */
383
enum BC_STATUS crystalhd_hw_post_tx(struct crystalhd_hw *hw,
434
/*	These counters are per session and will be reset to zero in */
384
			     struct crystalhd_dio_req *ioreq,
435
/*  start capture. */
385
			     hw_comp_callback call_back,
436
/* */
386
			     wait_queue_head_t *cb_event,
437
	uint32_t					DrvPauseCnt;					 /* Number of Times the driver has issued pause.*/
387
			     uint32_t *list_id, uint8_t data_flags);
438
#if 0
388
439
	uint32_t					DrvServiceIntrCnt;				 /* Number of interrutps the driver serviced. */
389
enum BC_STATUS crystalhd_hw_pause(struct crystalhd_hw *hw);
440
	uint32_t					DrvIgnIntrCnt;					 /* Number of Interrupts Driver Ignored.NOT OUR INTR. */
390
enum BC_STATUS crystalhd_hw_unpause(struct crystalhd_hw *hw);
441
	uint32_t					DrvTotalFrmDropped;				 /* Number of frames dropped by the driver.*/
391
enum BC_STATUS crystalhd_hw_suspend(struct crystalhd_hw *hw);
442
#endif
392
enum BC_STATUS crystalhd_hw_cancel_tx(struct crystalhd_hw *hw,
443
	uint32_t					DrvTotalFrmCaptured;			 /* Numner of Good Frames Captured*/
393
				 uint32_t list_id);
444
#if 0
394
enum BC_STATUS crystalhd_hw_add_cap_buffer(struct crystalhd_hw *hw,
445
	uint32_t					DrvTotalHWErrs;					 /* Total HW Errors.*/
395
			 struct crystalhd_dio_req *ioreq, bool en_post);
446
	uint32_t					DrvTotalPIBFlushCnt;			 /* Number of Times the driver flushed PIB Queues.*/
396
enum BC_STATUS crystalhd_hw_get_cap_buffer(struct crystalhd_hw *hw,
447
	uint32_t					DrvMissedPIBCnt;				 /* Number of Frames for which the PIB was not found.*/
397
				    struct BC_PIC_INFO_BLOCK *pib,
448
	uint64_t					TickCntOnPause; */
398
				    struct crystalhd_dio_req **ioreq);
449
	uint32_t					TotalTimeInPause;				/* In Milliseconds */
399
enum BC_STATUS crystalhd_hw_stop_capture(struct crystalhd_hw *hw);
450
	uint32_t					RepeatedFramesCnt; */
400
enum BC_STATUS crystalhd_hw_start_capture(struct crystalhd_hw *hw);
451
#endif
401
void crystalhd_hw_stats(struct crystalhd_hw *hw,
402
			 struct crystalhd_hw_stats *stats);
403
452
404
/* API to program the core clock on the decoder */
453
/*	HW_VERIFY_DEVICE			pfnVerifyDevice; */
405
enum BC_STATUS crystalhd_hw_set_core_clock(struct crystalhd_hw *);
454
/*	HW_INIT_DEVICE_RESOURCES		pfnInitDevResources; */
455
/*	HW_CLEAN_DEVICE_RESOURCES		pfnCleanDevResources; */
456
	HW_START_DEVICE				pfnStartDevice;
457
	HW_STOP_DEVICE				pfnStopDevice;
458
/*	HW_XLAT_AND_FIRE_SGL			pfnTxXlatAndFireSGL; */
459
/*	HW_RX_XLAT_SGL				pfnRxXlatSgl; */
460
	HW_FIND_AND_CLEAR_INTR		pfnFindAndClearIntr;
461
	HW_READ_DEVICE_REG			pfnReadDevRegister;
462
	HW_WRITE_DEVICE_REG			pfnWriteDevRegister;
463
	HW_READ_FPGA_REG			pfnReadFPGARegister;
464
	HW_WRITE_FPGA_REG			pfnWriteFPGARegister;
465
	HW_READ_DEV_MEM				pfnDevDRAMRead;
466
	HW_WRITE_DEV_MEM			pfnDevDRAMWrite;
467
/*	HW_INIT_DRAM				pfnInitDRAM; */
468
/*	HW_DISABLE_INTR				pfnDisableIntr; */
469
/*	HW_ENABLE_INTR				pfnEnableIntr; */
470
	HW_POST_RX_SIDE_BUFF			pfnPostRxSideBuff;
471
	HW_CHECK_INPUT_FIFO			pfnCheckInputFIFO;
472
	HW_START_TX_DMA				pfnStartTxDMA;
473
	HW_STOP_TX_DMA				pfnStopTxDMA;
474
	HW_GET_DONE_SIZE			pfnHWGetDoneSize;
475
/*	HW_EVENT_NOTIFICATION			pfnNotifyHardware; */
476
/*	HW_ADD_DRP_TO_FREE_LIST			pfnAddRxDRPToFreeList; */
477
/*	HW_FETCH_DONE_BUFFERS			pfnFetchReadyRxDRP; */
478
/*	HW_ADD_ROLLBACK_RXBUF			pfnRollBackRxBuf; */
479
	HW_PEEK_NEXT_DECODED_RXBUF		pfnPeekNextDeodedFr;
480
	HW_FW_PASSTHRU_CMD			pfnDoFirmwareCmd;
481
/*	HW_GET_FW_DONE_OS_CMD			pfnGetFWDoneCmdOsCntxt; */
482
/*	HW_CANCEL_FW_CMDS			pfnCancelFWCmds; */
483
/*	SEARCH_FOR_PIB				pfnSearchPIB; */
484
/*	HW_DO_DRAM_PWR_MGMT			pfnDRAMPwrMgmt; */
485
	HW_FW_DOWNLOAD				pfnFWDwnld;
486
	HW_ISSUE_DECO_PAUSE			pfnIssuePause;
487
	HW_STOP_DMA_ENGINES			pfnStopRXDMAEngines;
488
/*	FIRE_RX_REQ_TO_HW			pfnFireRx; */
489
/*	PIC_POST_PROC				pfnPostProcessPicture; */
490
/*	FIRE_TX_CMD_TO_HW			pfnFireTx; */
491
	NOTIFY_FLL_CHANGE			pfnNotifyFLLChange;
492
	HW_EVENT_NOTIFICATION		pfnNotifyHardware;
493
};
494
495
struct crystalhd_rx_dma_pkt *crystalhd_hw_alloc_rx_pkt(struct crystalhd_hw *hw);
496
void crystalhd_hw_free_rx_pkt(struct crystalhd_hw *hw, struct crystalhd_rx_dma_pkt *pkt);
497
void crystalhd_tx_desc_rel_call_back(void *context, void *data);
498
void crystalhd_rx_pkt_rel_call_back(void *context, void *data);
499
void crystalhd_hw_delete_ioqs(struct crystalhd_hw *hw);
500
BC_STATUS crystalhd_hw_create_ioqs(struct crystalhd_hw *hw);
501
BC_STATUS crystalhd_hw_open(struct crystalhd_hw *hw, struct crystalhd_adp *adp);
502
BC_STATUS crystalhd_hw_close(struct crystalhd_hw *hw, struct crystalhd_adp *adp);
503
BC_STATUS crystalhd_hw_setup_dma_rings(struct crystalhd_hw *hw);
504
BC_STATUS crystalhd_hw_free_dma_rings(struct crystalhd_hw *hw);
505
BC_STATUS crystalhd_hw_tx_req_complete(struct crystalhd_hw *hw, uint32_t list_id, BC_STATUS cs);
506
BC_STATUS crystalhd_hw_fill_desc(struct crystalhd_dio_req *ioreq,
507
				struct dma_descriptor *desc,
508
				dma_addr_t desc_paddr_base,
509
				uint32_t sg_cnt, uint32_t sg_st_ix,
510
				uint32_t sg_st_off, uint32_t xfr_sz,
511
				struct device *dev, uint32_t destDRAMaddr);
512
BC_STATUS crystalhd_xlat_sgl_to_dma_desc(struct crystalhd_dio_req *ioreq,
513
					struct dma_desc_mem * pdesc_mem,
514
					uint32_t *uv_desc_index,
515
					struct device *dev, uint32_t destDRAMaddr);
516
BC_STATUS crystalhd_rx_pkt_done(struct crystalhd_hw *hw,
517
				uint32_t list_index,
518
				BC_STATUS comp_sts);
519
BC_STATUS crystalhd_hw_post_tx(struct crystalhd_hw *hw, struct crystalhd_dio_req *ioreq,
520
				hw_comp_callback call_back,
521
				wait_queue_head_t *cb_event, uint32_t *list_id,
522
				uint8_t data_flags);
523
BC_STATUS crystalhd_hw_cancel_tx(struct crystalhd_hw *hw, uint32_t list_id);
524
BC_STATUS crystalhd_hw_add_cap_buffer(struct crystalhd_hw *hw,struct crystalhd_dio_req *ioreq, bool en_post);
525
BC_STATUS crystalhd_hw_get_cap_buffer(struct crystalhd_hw *hw,struct C011_PIB *pib,struct crystalhd_dio_req **ioreq);
526
BC_STATUS crystalhd_hw_start_capture(struct crystalhd_hw *hw);
527
BC_STATUS crystalhd_hw_stop_capture(struct crystalhd_hw *hw, bool unmap);
528
BC_STATUS crystalhd_hw_suspend(struct crystalhd_hw *hw);
529
BC_STATUS crystalhd_hw_resume(struct crystalhd_hw *hw);
530
void crystalhd_hw_stats(struct crystalhd_hw *hw, struct crystalhd_hw_stats *stats);
531
532
#define GET_Y0_ERR_MSK (MISC1_Y_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_MASK |		\
533
						MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK |		\
534
						MISC1_Y_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_MASK |	\
535
						MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK)
536
537
#define GET_UV0_ERR_MSK (MISC1_UV_RX_ERROR_STATUS_RX_L0_OVERRUN_ERROR_MASK |		\
538
						MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK |		\
539
						MISC1_UV_RX_ERROR_STATUS_RX_L0_DESC_TX_ABORT_ERRORS_MASK |	\
540
						MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK)
541
542
#define GET_Y1_ERR_MSK (MISC1_Y_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_MASK |		\
543
						MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK |		\
544
						MISC1_Y_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_MASK |	\
545
						MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK)
546
547
#define GET_UV1_ERR_MSK	(MISC1_UV_RX_ERROR_STATUS_RX_L1_OVERRUN_ERROR_MASK |		\
548
						MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK |		\
549
						MISC1_UV_RX_ERROR_STATUS_RX_L1_DESC_TX_ABORT_ERRORS_MASK |	\
550
						MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK)
406
551
407
#endif
552
#endif
(-)crystalhd~/crystalhd_linkfuncs.c (+2058 lines)
Line 0 Link Here
1
/***************************************************************************
2
 * Copyright (c) 2005-2009, Broadcom Corporation.
3
 *
4
 *  Name: crystalhd_hw . c
5
 *
6
 *  Description:
7
 *		BCM70010 Linux driver HW layer.
8
 *
9
 **********************************************************************
10
 * This file is part of the crystalhd device driver.
11
 *
12
 * This driver is free software; you can redistribute it and/or modify
13
 * it under the terms of the GNU General Public License as published by
14
 * the Free Software Foundation, version 2 of the License.
15
 *
16
 * This driver is distributed in the hope that it will be useful,
17
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
18
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
19
 * GNU General Public License for more details.
20
 *
21
 * You should have received a copy of the GNU General Public License
22
 * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
23
 **********************************************************************/
24
25
#include <linux/pci.h>
26
#include <linux/delay.h>
27
#include <linux/device.h>
28
#include <asm/tsc.h>
29
#include "crystalhd_hw.h"
30
#include "crystalhd_lnx.h"
31
#include "crystalhd_linkfuncs.h"
32
33
#define OFFSETOF(_s_, _m_) ((size_t)(unsigned long)&(((_s_ *)0)->_m_))
34
35
/**
36
* link_dec_reg_rd - Read 70010's device register.
37
* @adp: Adapter instance
38
* @reg_off: Register offset.
39
*
40
* Return:
41
*	32bit value read
42
*
43
* 70010's device register read routine. This interface use
44
* 70010's device access range mapped from BAR-2 (4M) of PCIe
45
* configuration space.
46
*/
47
uint32_t link_dec_reg_rd(struct crystalhd_adp *adp, uint32_t reg_off)
48
{
49
	if (!adp) {
50
		printk(KERN_ERR "%s: Invalid args\n", __func__);
51
		return 0;
52
	}
53
54
	if (reg_off > adp->pci_mem_len) {
55
		dev_err(&adp->pdev->dev, "%s: reg_off out of range: 0x%08x\n",
56
			__func__, reg_off);
57
		return 0;
58
	}
59
60
	return readl(adp->mem_addr + reg_off);
61
}
62
63
/**
64
* link_dec_reg_wr - Write 70010's device register
65
* @adp: Adapter instance
66
* @reg_off: Register offset.
67
* @val: Dword value to be written.
68
*
69
* Return:
70
*	none.
71
*
72
* 70010's device register write routine. This interface use
73
* 70010's device access range mapped from BAR-2 (4M) of PCIe
74
* configuration space.
75
*/
76
void link_dec_reg_wr(struct crystalhd_adp *adp, uint32_t reg_off, uint32_t val)
77
{
78
	if (!adp) {
79
		printk(KERN_ERR "%s: Invalid args\n", __func__);
80
		return;
81
	}
82
83
	if (reg_off > adp->pci_mem_len) {
84
		dev_err(&adp->pdev->dev, "%s: reg_off out of range: 0x%08x\n",
85
			__func__, reg_off);
86
		return;
87
	}
88
89
	writel(val, adp->mem_addr + reg_off);
90
91
	/* the udelay is required for latest 70012, not for others... :( */
92
	udelay(8);
93
}
94
95
/**
96
* crystalhd_reg_rd - Read 70012's device register.
97
* @adp: Adapter instance
98
* @reg_off: Register offset.
99
*
100
* Return:
101
*	32bit value read
102
*
103
* 70012 device register  read routine. This interface use
104
* 70012's device access range mapped from BAR-1 (64K) of PCIe
105
* configuration space.
106
*
107
*/
108
uint32_t crystalhd_link_reg_rd(struct crystalhd_adp *adp, uint32_t reg_off)
109
{
110
	if (!adp) {
111
		printk(KERN_ERR "%s: Invalid args\n", __func__);
112
		return 0;
113
	}
114
115
	if (reg_off > adp->pci_i2o_len) {
116
		dev_err(&adp->pdev->dev, "%s: reg_off out of range: 0x%08x\n",
117
			__func__, reg_off);
118
		return 0;
119
	}
120
121
	return readl(adp->i2o_addr + reg_off);
122
}
123
124
/**
125
* crystalhd_reg_wr - Write 70012's device register
126
* @adp: Adapter instance
127
* @reg_off: Register offset.
128
* @val: Dword value to be written.
129
*
130
* Return:
131
*	none.
132
*
133
* 70012 device register  write routine. This interface use
134
* 70012's device access range mapped from BAR-1 (64K) of PCIe
135
* configuration space.
136
*
137
*/
138
void crystalhd_link_reg_wr(struct crystalhd_adp *adp, uint32_t reg_off, uint32_t val)
139
{
140
	if (!adp) {
141
		printk(KERN_ERR "%s: Invalid args\n", __func__);
142
		return;
143
	}
144
145
	if (reg_off > adp->pci_i2o_len) {
146
		dev_err(&adp->pdev->dev, "%s: reg_off out of range: 0x%08x\n",
147
				__func__, reg_off);
148
				return;
149
	}
150
151
	writel(val, adp->i2o_addr + reg_off);
152
}
153
154
inline uint32_t crystalhd_link_dram_rd(struct crystalhd_hw *hw, uint32_t mem_off)
155
{
156
	hw->pfnWriteFPGARegister(hw->adp,  DCI_DRAM_BASE_ADDR, (mem_off >> 19));
157
	return hw->pfnReadDevRegister(hw->adp,  (0x00380000 | (mem_off & 0x0007FFFF)));
158
}
159
160
inline void crystalhd_link_dram_wr(struct crystalhd_hw *hw, uint32_t mem_off, uint32_t val)
161
{
162
	hw->pfnWriteFPGARegister(hw->adp, DCI_DRAM_BASE_ADDR, (mem_off >> 19));
163
	hw->pfnWriteDevRegister(hw->adp, (0x00380000 | (mem_off & 0x0007FFFF)), val);
164
}
165
166
/**
167
* crystalhd_link_mem_rd - Read data from DRAM area.
168
* @adp: Adapter instance
169
* @start_off: Start offset.
170
* @dw_cnt: Count in dwords.
171
* @rd_buff: Buffer to copy the data from dram.
172
*
173
* Return:
174
*	Status.
175
*
176
* Dram read routine.
177
*/
178
BC_STATUS crystalhd_link_mem_rd(struct crystalhd_hw *hw, uint32_t start_off,
179
								uint32_t dw_cnt, uint32_t *rd_buff)
180
{
181
	uint32_t ix = 0;
182
183
	if (!hw || !rd_buff) {
184
		printk(KERN_ERR "%s: Invalid arg\n", __func__);
185
		return BC_STS_INV_ARG;
186
	}
187
	for (ix = 0; ix < dw_cnt; ix++)
188
		rd_buff[ix] = crystalhd_link_dram_rd(hw, (start_off + (ix * 4)));
189
190
	return BC_STS_SUCCESS;
191
}
192
193
/**
194
* crystalhd_link_mem_wr - Write data to DRAM area.
195
* @adp: Adapter instance
196
* @start_off: Start offset.
197
* @dw_cnt: Count in dwords.
198
* @wr_buff: Data Buffer to be written.
199
*
200
* Return:
201
*	Status.
202
*
203
* Dram write routine.
204
*/
205
BC_STATUS crystalhd_link_mem_wr(struct crystalhd_hw *hw, uint32_t start_off,
206
						uint32_t dw_cnt, uint32_t *wr_buff)
207
{
208
	uint32_t ix = 0;
209
210
	if (!hw || !wr_buff) {
211
		printk(KERN_ERR "%s: Invalid arg\n", __func__);
212
		return BC_STS_INV_ARG;
213
	}
214
215
	for (ix = 0; ix < dw_cnt; ix++)
216
		crystalhd_link_dram_wr(hw, (start_off + (ix * 4)), wr_buff[ix]);
217
218
	return BC_STS_SUCCESS;
219
}
220
221
void crystalhd_link_enable_uarts(struct crystalhd_hw *hw)
222
{
223
	hw->pfnWriteDevRegister(hw->adp, UartSelectA, BSVS_UART_STREAM);
224
	hw->pfnWriteDevRegister(hw->adp, UartSelectB, BSVS_UART_DEC_OUTER);
225
}
226
227
void crystalhd_link_start_dram(struct crystalhd_hw *hw)
228
{
229
	hw->pfnWriteDevRegister(hw->adp, SDRAM_PARAM, ((40 / 5 - 1) <<  0) |
230
#if 0
231
	 tras (40ns tras)/(5ns period) -1 ((15/5 - 1) <<  4) | /* trcd */
232
#endif
233
		      ((15 / 5 - 1) <<  7) |	/* trp */
234
		      ((10 / 5 - 1) << 10) |	/* trrd */
235
		      ((15 / 5 + 1) << 12) |	/* twr */
236
		      ((2 + 1) << 16) |		/* twtr */
237
		      ((70 / 5 - 2) << 19) |	/* trfc */
238
		      (0 << 23));
239
240
	hw->pfnWriteDevRegister(hw->adp, SDRAM_PRECHARGE, 0);
241
	hw->pfnWriteDevRegister(hw->adp, SDRAM_EXT_MODE, 2);
242
	hw->pfnWriteDevRegister(hw->adp, SDRAM_MODE, 0x132);
243
	hw->pfnWriteDevRegister(hw->adp, SDRAM_PRECHARGE, 0);
244
	hw->pfnWriteDevRegister(hw->adp, SDRAM_REFRESH, 0);
245
	hw->pfnWriteDevRegister(hw->adp, SDRAM_REFRESH, 0);
246
	hw->pfnWriteDevRegister(hw->adp, SDRAM_MODE, 0x32);
247
	/* setting the refresh rate here */
248
	hw->pfnWriteDevRegister(hw->adp, SDRAM_REF_PARAM, ((1 << 12) | 96));
249
}
250
251
252
bool crystalhd_link_bring_out_of_rst(struct crystalhd_hw *hw)
253
{
254
	union link_misc_perst_deco_ctrl rst_deco_cntrl;
255
	union link_misc_perst_clk_ctrl rst_clk_cntrl;
256
	uint32_t temp;
257
258
	/*
259
	 * Link clocks: MISC_PERST_CLOCK_CTRL Clear PLL power down bit,
260
	 * delay to allow PLL to lock Clear alternate clock, stop clock bits
261
	 */
262
	rst_clk_cntrl.whole_reg = hw->pfnReadFPGARegister(hw->adp, MISC_PERST_CLOCK_CTRL);
263
	rst_clk_cntrl.pll_pwr_dn = 0;
264
	hw->pfnWriteFPGARegister(hw->adp, MISC_PERST_CLOCK_CTRL, rst_clk_cntrl.whole_reg);
265
	msleep_interruptible(50);
266
267
	rst_clk_cntrl.whole_reg = hw->pfnReadFPGARegister(hw->adp, MISC_PERST_CLOCK_CTRL);
268
	rst_clk_cntrl.stop_core_clk = 0;
269
	rst_clk_cntrl.sel_alt_clk = 0;
270
271
	hw->pfnWriteFPGARegister(hw->adp, MISC_PERST_CLOCK_CTRL, rst_clk_cntrl.whole_reg);
272
	msleep_interruptible(50);
273
274
	/*
275
	 * Bus Arbiter Timeout: GISB_ARBITER_TIMER
276
	 * Set internal bus arbiter timeout to 40us based on core clock speed
277
	 * (63MHz * 40us = 0x9D8)
278
	 */
279
	hw->pfnWriteFPGARegister(hw->adp, GISB_ARBITER_TIMER, 0x9D8);
280
281
	/*
282
	 * Decoder clocks: MISC_PERST_DECODER_CTRL
283
	 * Enable clocks while 7412 reset is asserted, delay
284
	 * De-assert 7412 reset
285
	 */
286
	rst_deco_cntrl.whole_reg = hw->pfnReadFPGARegister(hw->adp, MISC_PERST_DECODER_CTRL);
287
	rst_deco_cntrl.stop_bcm_7412_clk = 0;
288
	rst_deco_cntrl.bcm7412_rst = 1;
289
	hw->pfnWriteFPGARegister(hw->adp, MISC_PERST_DECODER_CTRL, rst_deco_cntrl.whole_reg);
290
	msleep_interruptible(50);
291
292
	rst_deco_cntrl.whole_reg = hw->pfnReadFPGARegister(hw->adp, MISC_PERST_DECODER_CTRL);
293
	rst_deco_cntrl.bcm7412_rst = 0;
294
	hw->pfnWriteFPGARegister(hw->adp, MISC_PERST_DECODER_CTRL, rst_deco_cntrl.whole_reg);
295
	msleep_interruptible(50);
296
297
	/* Disable OTP_CONTENT_MISC to 0 to disable all secure modes */
298
	hw->pfnWriteFPGARegister(hw->adp, OTP_CONTENT_MISC, 0);
299
300
	/* Clear bit 29 of 0x404 */
301
	temp = hw->pfnReadFPGARegister(hw->adp, PCIE_TL_TRANSACTION_CONFIGURATION);
302
	temp &= ~BC_BIT(29);
303
	hw->pfnWriteFPGARegister(hw->adp, PCIE_TL_TRANSACTION_CONFIGURATION, temp);
304
305
	/* 2.5V regulator must be set to 2.6 volts (+6%) */
306
	hw->pfnWriteFPGARegister(hw->adp, MISC_PERST_VREG_CTRL, 0xF3);
307
308
	return true;
309
}
310
311
bool crystalhd_link_put_in_reset(struct crystalhd_hw *hw)
312
{
313
	union link_misc_perst_deco_ctrl rst_deco_cntrl;
314
	union link_misc_perst_clk_ctrl  rst_clk_cntrl;
315
	uint32_t                  temp;
316
317
	/*
318
	 * Decoder clocks: MISC_PERST_DECODER_CTRL
319
	 * Assert 7412 reset, delay
320
	 * Assert 7412 stop clock
321
	 */
322
	rst_deco_cntrl.whole_reg = hw->pfnReadFPGARegister(hw->adp, MISC_PERST_DECODER_CTRL);
323
	rst_deco_cntrl.stop_bcm_7412_clk = 1;
324
	hw->pfnWriteFPGARegister(hw->adp, MISC_PERST_DECODER_CTRL, rst_deco_cntrl.whole_reg);
325
	msleep_interruptible(50);
326
327
	/* Bus Arbiter Timeout: GISB_ARBITER_TIMER
328
	 * Set internal bus arbiter timeout to 40us based on core clock speed
329
	 * (6.75MHZ * 40us = 0x10E)
330
	 */
331
	hw->pfnWriteFPGARegister(hw->adp, GISB_ARBITER_TIMER, 0x10E);
332
333
	/* Link clocks: MISC_PERST_CLOCK_CTRL
334
	 * Stop core clk, delay
335
	 * Set alternate clk, delay, set PLL power down
336
	 */
337
	rst_clk_cntrl.whole_reg = hw->pfnReadFPGARegister(hw->adp, MISC_PERST_CLOCK_CTRL);
338
	rst_clk_cntrl.stop_core_clk = 1;
339
	rst_clk_cntrl.sel_alt_clk = 1;
340
	hw->pfnWriteFPGARegister(hw->adp, MISC_PERST_CLOCK_CTRL, rst_clk_cntrl.whole_reg);
341
	msleep_interruptible(50);
342
343
	rst_clk_cntrl.whole_reg = hw->pfnReadFPGARegister(hw->adp, MISC_PERST_CLOCK_CTRL);
344
	rst_clk_cntrl.pll_pwr_dn = 1;
345
	hw->pfnWriteFPGARegister(hw->adp, MISC_PERST_CLOCK_CTRL, rst_clk_cntrl.whole_reg);
346
347
	/*
348
	 * Read and restore the Transaction Configuration Register
349
	 * after core reset
350
	 */
351
	temp = hw->pfnReadFPGARegister(hw->adp, PCIE_TL_TRANSACTION_CONFIGURATION);
352
353
	/*
354
	 * Link core soft reset: MISC3_RESET_CTRL
355
	 * - Write BIT[0]=1 and read it back for core reset to take place
356
	 */
357
	hw->pfnWriteFPGARegister(hw->adp, MISC3_RESET_CTRL, 1);
358
	rst_deco_cntrl.whole_reg = hw->pfnReadFPGARegister(hw->adp, MISC3_RESET_CTRL);
359
	msleep_interruptible(50);
360
361
	/* restore the transaction configuration register */
362
	hw->pfnWriteFPGARegister(hw->adp, PCIE_TL_TRANSACTION_CONFIGURATION, temp);
363
364
	return true;
365
}
366
367
void crystalhd_link_disable_interrupts(struct crystalhd_hw *hw)
368
{
369
	union intr_mask_reg   intr_mask;
370
	intr_mask.whole_reg = hw->pfnReadFPGARegister(hw->adp, INTR_INTR_MSK_STS_REG);
371
	intr_mask.mask_pcie_err = 1;
372
	intr_mask.mask_pcie_rbusmast_err = 1;
373
	intr_mask.mask_pcie_rgr_bridge   = 1;
374
	intr_mask.mask_rx_done = 1;
375
	intr_mask.mask_rx_err  = 1;
376
	intr_mask.mask_tx_done = 1;
377
	intr_mask.mask_tx_err  = 1;
378
	hw->pfnWriteFPGARegister(hw->adp, INTR_INTR_MSK_SET_REG, intr_mask.whole_reg);
379
380
	return;
381
}
382
383
void crystalhd_link_enable_interrupts(struct crystalhd_hw *hw)
384
{
385
	union intr_mask_reg   intr_mask;
386
	intr_mask.whole_reg = hw->pfnReadFPGARegister(hw->adp, INTR_INTR_MSK_STS_REG);
387
	intr_mask.mask_pcie_err = 1;
388
	intr_mask.mask_pcie_rbusmast_err = 1;
389
	intr_mask.mask_pcie_rgr_bridge   = 1;
390
	intr_mask.mask_rx_done = 1;
391
	intr_mask.mask_rx_err  = 1;
392
	intr_mask.mask_tx_done = 1;
393
	intr_mask.mask_tx_err  = 1;
394
	hw->pfnWriteFPGARegister(hw->adp, INTR_INTR_MSK_CLR_REG, intr_mask.whole_reg);
395
396
	return;
397
}
398
399
void crystalhd_link_clear_errors(struct crystalhd_hw *hw)
400
{
401
	uint32_t reg;
402
403
	/* Writing a 1 to a set bit clears that bit */
404
	reg = hw->pfnReadFPGARegister(hw->adp, MISC1_Y_RX_ERROR_STATUS);
405
	if (reg)
406
		hw->pfnWriteFPGARegister(hw->adp, MISC1_Y_RX_ERROR_STATUS, reg);
407
408
	reg = hw->pfnReadFPGARegister(hw->adp, MISC1_UV_RX_ERROR_STATUS);
409
	if (reg)
410
		hw->pfnWriteFPGARegister(hw->adp, MISC1_UV_RX_ERROR_STATUS, reg);
411
412
	reg = hw->pfnReadFPGARegister(hw->adp, MISC1_TX_DMA_ERROR_STATUS);
413
	if (reg)
414
		hw->pfnWriteFPGARegister(hw->adp, MISC1_TX_DMA_ERROR_STATUS, reg);
415
}
416
417
void crystalhd_link_clear_interrupts(struct crystalhd_hw *hw)
418
{
419
	uint32_t intr_sts =  hw->pfnReadFPGARegister(hw->adp, INTR_INTR_STATUS);
420
421
	if (intr_sts) {
422
		hw->pfnWriteFPGARegister(hw->adp, INTR_INTR_CLR_REG, intr_sts);
423
424
		/* Write End Of Interrupt for PCIE */
425
		hw->pfnWriteFPGARegister(hw->adp, INTR_EOI_CTRL, 1);
426
	}
427
}
428
429
void crystalhd_link_soft_rst(struct crystalhd_hw *hw)
430
{
431
	uint32_t val;
432
433
	/* Assert c011 soft reset*/
434
	hw->pfnWriteDevRegister(hw->adp, DecHt_HostSwReset, 0x00000001);
435
	msleep_interruptible(50);
436
437
	/* Release c011 soft reset*/
438
	hw->pfnWriteDevRegister(hw->adp, DecHt_HostSwReset, 0x00000000);
439
440
	/* Disable Stuffing..*/
441
	val = hw->pfnReadFPGARegister(hw->adp, MISC2_GLOBAL_CTRL);
442
	val |= BC_BIT(8);
443
	hw->pfnWriteFPGARegister(hw->adp, MISC2_GLOBAL_CTRL, val);
444
}
445
446
bool crystalhd_link_load_firmware_config(struct crystalhd_hw *hw)
447
{
448
	uint32_t i = 0, reg;
449
450
	hw->pfnWriteFPGARegister(hw->adp, DCI_DRAM_BASE_ADDR, (BC_DRAM_FW_CFG_ADDR >> 19));
451
452
	hw->pfnWriteFPGARegister(hw->adp, AES_CMD, 0);
453
	hw->pfnWriteFPGARegister(hw->adp, AES_CONFIG_INFO, (BC_DRAM_FW_CFG_ADDR & 0x7FFFF));
454
	hw->pfnWriteFPGARegister(hw->adp, AES_CMD, 0x1);
455
456
	for (i = 0; i < 100; ++i) {
457
		reg = hw->pfnReadFPGARegister(hw->adp, AES_STATUS);
458
		if (reg & 0x1)
459
			return true;
460
		msleep_interruptible(10);
461
	}
462
463
	return false;
464
}
465
466
467
bool crystalhd_link_start_device(struct crystalhd_hw *hw)
468
{
469
	uint32_t dbg_options, glb_cntrl = 0, reg_pwrmgmt = 0;
470
	struct device *dev;
471
472
	if (!hw)
473
		return -EINVAL;
474
475
	dev = &hw->adp->pdev->dev;
476
477
	dev_dbg(dev, "Starting Crystal HD BCM70012 Device\n");
478
479
	if (!crystalhd_link_bring_out_of_rst(hw)) {
480
		dev_err(dev, "Failed To Bring BCM70012 Out Of Reset\n");
481
		return false;
482
	}
483
484
	crystalhd_link_disable_interrupts(hw);
485
486
	crystalhd_link_clear_errors(hw);
487
488
	crystalhd_link_clear_interrupts(hw);
489
490
	crystalhd_link_enable_interrupts(hw);
491
492
	/* Enable the option for getting the total no. of DWORDS
493
	 * that have been transfered by the RXDMA engine
494
	 */
495
	dbg_options = hw->pfnReadFPGARegister(hw->adp, MISC1_DMA_DEBUG_OPTIONS_REG);
496
	dbg_options |= 0x10;
497
	hw->pfnWriteFPGARegister(hw->adp, MISC1_DMA_DEBUG_OPTIONS_REG, dbg_options);
498
499
	/* Enable PCI Global Control options */
500
	glb_cntrl = hw->pfnReadFPGARegister(hw->adp, MISC2_GLOBAL_CTRL);
501
	glb_cntrl |= 0x100;
502
	glb_cntrl |= 0x8000;
503
	hw->pfnWriteFPGARegister(hw->adp, MISC2_GLOBAL_CTRL, glb_cntrl);
504
505
	crystalhd_link_enable_interrupts(hw);
506
507
	crystalhd_link_soft_rst(hw);
508
	crystalhd_link_start_dram(hw);
509
	crystalhd_link_enable_uarts(hw);
510
511
	/* Disable L1 ASPM while video is playing as this causes performance problems otherwise */
512
	reg_pwrmgmt = hw->pfnReadFPGARegister(hw->adp, PCIE_DLL_DATA_LINK_CONTROL);
513
	reg_pwrmgmt &= ~ASPM_L1_ENABLE;
514
515
	hw->pfnWriteFPGARegister(hw->adp, PCIE_DLL_DATA_LINK_CONTROL, reg_pwrmgmt);
516
517
	return true;
518
}
519
520
bool crystalhd_link_stop_device(struct crystalhd_hw *hw)
521
{
522
	uint32_t reg;
523
	BC_STATUS sts;
524
525
	dev_dbg(&hw->adp->pdev->dev, "Stopping Crystal HD BCM70012 Device\n");
526
	sts = crystalhd_link_put_ddr2sleep(hw);
527
	if (sts != BC_STS_SUCCESS) {
528
		dev_err(&hw->adp->pdev->dev, "Failed to Put DDR To Sleep!!\n");
529
		return BC_STS_ERROR;
530
	}
531
532
	/* Clear and disable interrupts */
533
	crystalhd_link_disable_interrupts(hw);
534
	crystalhd_link_clear_errors(hw);
535
	crystalhd_link_clear_interrupts(hw);
536
537
	if (!crystalhd_link_put_in_reset(hw))
538
		dev_err(&hw->adp->pdev->dev, "Failed to Put Link To Reset State\n");
539
540
	reg = hw->pfnReadFPGARegister(hw->adp, PCIE_DLL_DATA_LINK_CONTROL);
541
	reg |= ASPM_L1_ENABLE;
542
	hw->pfnWriteFPGARegister(hw->adp, PCIE_DLL_DATA_LINK_CONTROL, reg);
543
544
	/* Set PCI Clk Req */
545
	reg = hw->pfnReadFPGARegister(hw->adp, PCIE_CLK_REQ_REG);
546
	reg |= PCI_CLK_REQ_ENABLE;
547
	hw->pfnWriteFPGARegister(hw->adp, PCIE_CLK_REQ_REG, reg);
548
549
	return true;
550
}
551
552
uint32_t link_GetPicInfoLineNum(struct crystalhd_dio_req *dio, uint8_t *base)
553
{
554
	uint32_t PicInfoLineNum = 0;
555
556
	if (dio->uinfo.b422mode == MODE422_YUY2) {
557
		PicInfoLineNum = ((uint32_t)(*(base + 6)) & 0xff)
558
			| (((uint32_t)(*(base + 4)) << 8)  & 0x0000ff00)
559
			| (((uint32_t)(*(base + 2)) << 16) & 0x00ff0000)
560
			| (((uint32_t)(*(base + 0)) << 24) & 0xff000000);
561
	} else if (dio->uinfo.b422mode == MODE422_UYVY) {
562
		PicInfoLineNum = ((uint32_t)(*(base + 7)) & 0xff)
563
			| (((uint32_t)(*(base + 5)) << 8)  & 0x0000ff00)
564
			| (((uint32_t)(*(base + 3)) << 16) & 0x00ff0000)
565
			| (((uint32_t)(*(base + 1)) << 24) & 0xff000000);
566
	} else {
567
		PicInfoLineNum = ((uint32_t)(*(base + 3)) & 0xff)
568
			| (((uint32_t)(*(base + 2)) << 8)  & 0x0000ff00)
569
			| (((uint32_t)(*(base + 1)) << 16) & 0x00ff0000)
570
			| (((uint32_t)(*(base + 0)) << 24) & 0xff000000);
571
	}
572
573
	return PicInfoLineNum;
574
}
575
576
uint32_t link_GetMode422Data(struct crystalhd_dio_req *dio,
577
			       PBC_PIC_INFO_BLOCK pPicInfoLine, int type)
578
{
579
	int i;
580
	uint32_t offset = 0, val = 0;
581
	uint8_t *tmp;
582
	tmp = (uint8_t *)&val;
583
584
	if (type == 1)
585
		offset = OFFSETOF(BC_PIC_INFO_BLOCK, picture_meta_payload);
586
	else if (type == 2)
587
		offset = OFFSETOF(BC_PIC_INFO_BLOCK, height);
588
	else
589
		offset = 0;
590
591
	if (dio->uinfo.b422mode == MODE422_YUY2) {
592
		for (i = 0; i < 4; i++)
593
			((uint8_t*)tmp)[i] =
594
				((uint8_t*)pPicInfoLine)[(offset + i) * 2];
595
	} else if (dio->uinfo.b422mode == MODE422_UYVY) {
596
		for (i = 0; i < 4; i++)
597
			((uint8_t*)tmp)[i] =
598
				((uint8_t*)pPicInfoLine)[(offset + i) * 2 + 1];
599
	}
600
601
	return val;
602
}
603
604
uint32_t link_GetMetaDataFromPib(struct crystalhd_dio_req *dio,
605
				   PBC_PIC_INFO_BLOCK pPicInfoLine)
606
{
607
	uint32_t picture_meta_payload = 0;
608
609
	if (dio->uinfo.b422mode)
610
		picture_meta_payload = link_GetMode422Data(dio, pPicInfoLine, 1);
611
	else
612
		picture_meta_payload = pPicInfoLine->picture_meta_payload;
613
614
	return BC_SWAP32(picture_meta_payload);
615
}
616
617
uint32_t link_GetHeightFromPib(struct crystalhd_dio_req *dio,
618
				 PBC_PIC_INFO_BLOCK pPicInfoLine)
619
{
620
	uint32_t height = 0;
621
622
	if (dio->uinfo.b422mode)
623
		height = link_GetMode422Data(dio, pPicInfoLine, 2);
624
	else
625
		height = pPicInfoLine->height;
626
627
	return BC_SWAP32(height);
628
}
629
630
/* This function cannot be called from ISR context since it uses APIs that can sleep */
631
bool link_GetPictureInfo(struct crystalhd_hw *hw, uint32_t picHeight, uint32_t picWidth, struct crystalhd_dio_req *dio,
632
			   uint32_t *PicNumber, uint64_t *PicMetaData)
633
{
634
	uint32_t PicInfoLineNum = 0, HeightInPib = 0, offset = 0, size = 0;
635
	PBC_PIC_INFO_BLOCK pPicInfoLine = NULL;
636
	uint32_t pic_number = 0;
637
	uint8_t *tmp = (uint8_t *)&pic_number;
638
	int i;
639
	unsigned long res = 0;
640
641
	dev_dbg(&hw->adp->pdev->dev, "getting Picture Info\n");
642
643
	*PicNumber = 0;
644
	*PicMetaData = 0;
645
646
	if (!dio || !picWidth)
647
		goto getpictureinfo_err_nosem;
648
649
/*	if(down_interruptible(&hw->fetch_sem)) */
650
/*		goto getpictureinfo_err_nosem; */
651
652
	dio->pib_va = kmalloc(2 * sizeof(BC_PIC_INFO_BLOCK) + 16, GFP_KERNEL); /* since copy_from_user can sleep anyway */
653
	if(dio->pib_va == NULL)
654
		goto getpictureinfo_err;
655
656
	res = copy_from_user(dio->pib_va, (void *)dio->uinfo.xfr_buff, 8);
657
	if (res != 0)
658
		goto getpictureinfo_err;
659
660
	/*
661
	 * -- Ajitabh[01-16-2009]: Strictly check against done size.
662
	 * -- we have seen that the done size sometimes comes less without
663
	 * -- any error indicated to the driver. So we change the limit
664
	 * -- to check against the done size rather than the full buffer size
665
	 * -- this way we will always make sure that the PIB is recieved by
666
	 * -- the driver.
667
	 */
668
	/* Limit = Base + pRxDMAReq->RxYDMADesc.RxBuffSz; */
669
	/* Limit = Base + (pRxDMAReq->RxYDoneSzInDword * 4); */
670
/*	Limit = dio->uinfo.xfr_buff + dio->uinfo.xfr_len; */
671
672
	PicInfoLineNum = link_GetPicInfoLineNum(dio, dio->pib_va);
673
	if (PicInfoLineNum > 1092) {
674
		dev_dbg(&hw->adp->pdev->dev, "Invalid Line Number[%x]\n", (int)PicInfoLineNum);
675
		goto getpictureinfo_err;
676
	}
677
678
	/*
679
	 * -- Ajitabh[01-16-2009]: Added the check for validating the
680
	 * -- PicInfoLine Number. This function is only called for link so we
681
	 * -- do not have to check for height+1 or (Height+1)/2 as we are doing
682
	 * -- in DIL. In DIL we need that because for flea firmware is padding
683
	 * -- the data to make it 16 byte aligned. This Validates the reception
684
	 * -- of PIB itself.
685
	 */
686
	if (picHeight) {
687
		if ((PicInfoLineNum != picHeight) &&
688
		    (PicInfoLineNum != picHeight/2)) {
689
			dev_dbg(&hw->adp->pdev->dev, "PicInfoLineNum[%d] != PICHeight "
690
				"Or PICHeight/2 [%d]\n",
691
				(int)PicInfoLineNum, picHeight);
692
			goto getpictureinfo_err;
693
		}
694
	}
695
696
	/* calc pic info line offset */
697
	if (dio->uinfo.b422mode) {
698
		size = 2 * sizeof(BC_PIC_INFO_BLOCK);
699
		offset = (PicInfoLineNum * picWidth * 2) + 8;
700
	} else {
701
		size = sizeof(BC_PIC_INFO_BLOCK);
702
		offset = (PicInfoLineNum * picWidth) + 4;
703
	}
704
705
	res = copy_from_user(dio->pib_va, (void *)(dio->uinfo.xfr_buff+offset), size);
706
	if (res != 0)
707
		goto getpictureinfo_err;
708
	pPicInfoLine = (PBC_PIC_INFO_BLOCK)(dio->pib_va);
709
710
/*	if (((uint8_t *)pPicInfoLine < Base) || */
711
/*	    ((uint8_t *)pPicInfoLine > Limit)) { */
712
/*		dev_err(dev, "Base Limit Check Failed for Extracting " */
713
/*			"the PIB\n"); */
714
/*		goto getpictureinfo_err; */
715
/*	} */
716
717
	/*
718
	 * -- Ajitabh[01-16-2009]:
719
	 * We have seen that the data gets shifted for some repeated frames.
720
	 * To detect those we use PicInfoLineNum and compare it with height.
721
	 */
722
723
	HeightInPib = link_GetHeightFromPib(dio, pPicInfoLine);
724
	if ((PicInfoLineNum != HeightInPib) &&
725
	    (PicInfoLineNum != HeightInPib / 2)) {
726
		printk("Height Match Failed: HeightInPIB[%d] "
727
			"PicInfoLineNum[%d]\n",
728
			(int)HeightInPib, (int)PicInfoLineNum);
729
		goto getpictureinfo_err;
730
	}
731
732
	/* get pic meta data from pib */
733
	*PicMetaData = link_GetMetaDataFromPib(dio, pPicInfoLine);
734
	/* get pic number from pib */
735
	/* calc pic info line offset */
736
	if (dio->uinfo.b422mode)
737
		offset = (PicInfoLineNum * picWidth * 2);
738
	else
739
		offset = (PicInfoLineNum * picWidth);
740
741
	res = copy_from_user(dio->pib_va, (void *)(dio->uinfo.xfr_buff+offset), 12);
742
	if (res != 0)
743
		goto getpictureinfo_err;
744
745
	if (dio->uinfo.b422mode == MODE422_YUY2) {
746
		for (i = 0; i < 4; i++)
747
			((uint8_t *)tmp)[i] = ((uint8_t *)dio->pib_va)[i * 2];
748
	} else if (dio->uinfo.b422mode == MODE422_UYVY) {
749
		for (i = 0; i < 4; i++)
750
			((uint8_t *)tmp)[i] = ((uint8_t *)dio->pib_va)[(i * 2) + 1];
751
	} else
752
		pic_number = *(uint32_t *)(dio->pib_va);
753
754
	*PicNumber =  BC_SWAP32(pic_number);
755
756
	if(dio->pib_va)
757
		kfree(dio->pib_va);
758
759
/*	up(&hw->fetch_sem); */
760
761
	return true;
762
763
getpictureinfo_err:
764
/*	up(&hw->fetch_sem); */
765
766
getpictureinfo_err_nosem:
767
	if(dio->pib_va)
768
		kfree(dio->pib_va);
769
	*PicNumber = 0;
770
	*PicMetaData = 0;
771
772
	return false;
773
}
774
775
uint32_t link_GetRptDropParam(struct crystalhd_hw *hw, uint32_t picHeight, uint32_t picWidth, void* pRxDMAReq)
776
{
777
	uint32_t PicNumber = 0, result = 0;
778
	uint64_t PicMetaData = 0;
779
780
	if(link_GetPictureInfo(hw, picHeight, picWidth, ((struct crystalhd_rx_dma_pkt *)pRxDMAReq)->dio_req,
781
				&PicNumber, &PicMetaData))
782
		result = PicNumber;
783
784
	return result;
785
}
786
787
/*
788
* This function gets the next picture metadata payload
789
* from the decoded picture in ReadyQ (if there was any)
790
* and returns it. THIS IS ONLY USED FOR LINK.
791
*/
792
bool crystalhd_link_peek_next_decoded_frame(struct crystalhd_hw *hw,
793
					  uint64_t *meta_payload, uint32_t *picNumFlags,
794
					  uint32_t PicWidth)
795
{
796
	uint32_t PicNumber = 0;
797
	unsigned long flags = 0;
798
	struct crystalhd_dioq *ioq;
799
	struct crystalhd_elem *tmp;
800
	struct crystalhd_rx_dma_pkt *rpkt;
801
802
	*meta_payload = 0;
803
804
	ioq = hw->rx_rdyq;
805
	spin_lock_irqsave(&ioq->lock, flags);
806
807
	if ((ioq->count > 0) && (ioq->head != (struct crystalhd_elem *)&ioq->head)) {
808
		tmp = ioq->head;
809
		spin_unlock_irqrestore(&ioq->lock, flags);
810
		rpkt = (struct crystalhd_rx_dma_pkt *)tmp->data;
811
		if (rpkt) {
812
			/* We are in process context here and have to check if we have repeated pictures */
813
			/* Drop repeated pictures or garbabge pictures here */
814
			/* This is because if we advertize a valid picture here, but later drop it */
815
			/* It will cause single threaded applications to hang, or errors in applications that expect */
816
			/* pictures not to be dropped once we have advertized their availability */
817
818
			/* If format change packet, then return with out checking anything */
819
			if (!(rpkt->flags & (COMP_FLAG_PIB_VALID | COMP_FLAG_FMT_CHANGE))) {
820
				link_GetPictureInfo(hw, hw->PICHeight, hw->PICWidth, rpkt->dio_req,
821
									&PicNumber, meta_payload);
822
				if(!PicNumber || (PicNumber == hw->LastPicNo) || (PicNumber == hw->LastTwoPicNo)) {
823
					/* discard picture */
824
					if(PicNumber != 0) {
825
						hw->LastTwoPicNo = hw->LastPicNo;
826
						hw->LastPicNo = PicNumber;
827
					}
828
					rpkt = crystalhd_dioq_fetch(hw->rx_rdyq);
829
					if (rpkt) {
830
						crystalhd_dioq_add(hw->rx_freeq, rpkt, false, rpkt->pkt_tag);
831
						rpkt = NULL;
832
					}
833
					*meta_payload = 0;
834
				}
835
				return true;
836
				/* Do not update the picture numbers here since they will be updated on the actual fetch of a valid picture */
837
			}
838
			else
839
				return false; /* don't use the meta_payload information */
840
		}
841
		else
842
			return false;
843
	}
844
	spin_unlock_irqrestore(&ioq->lock, flags);
845
846
	return false;
847
}
848
849
bool crystalhd_link_check_input_full(struct crystalhd_hw *hw,
850
				   uint32_t needed_sz, uint32_t *empty_sz,
851
				   bool b_188_byte_pkts, uint8_t *flags)
852
{
853
	uint32_t base, end, writep, readp;
854
	uint32_t cpbSize, cpbFullness, fifoSize;
855
856
	if (*flags & 0x02) { /* ASF Bit is set */
857
		base   = hw->pfnReadDevRegister(hw->adp, REG_Dec_TsAudCDB2Base);
858
		end    = hw->pfnReadDevRegister(hw->adp, REG_Dec_TsAudCDB2End);
859
		writep = hw->pfnReadDevRegister(hw->adp, REG_Dec_TsAudCDB2Wrptr);
860
		readp  = hw->pfnReadDevRegister(hw->adp, REG_Dec_TsAudCDB2Rdptr);
861
	} else if (b_188_byte_pkts) { /*Encrypted 188 byte packets*/
862
		base   = hw->pfnReadDevRegister(hw->adp, REG_Dec_TsUser0Base);
863
		end    = hw->pfnReadDevRegister(hw->adp, REG_Dec_TsUser0End);
864
		writep = hw->pfnReadDevRegister(hw->adp, REG_Dec_TsUser0Wrptr);
865
		readp  = hw->pfnReadDevRegister(hw->adp, REG_Dec_TsUser0Rdptr);
866
	} else {
867
		base   = hw->pfnReadDevRegister(hw->adp, REG_DecCA_RegCinBase);
868
		end    = hw->pfnReadDevRegister(hw->adp, REG_DecCA_RegCinEnd);
869
		writep = hw->pfnReadDevRegister(hw->adp, REG_DecCA_RegCinWrPtr);
870
		readp  = hw->pfnReadDevRegister(hw->adp, REG_DecCA_RegCinRdPtr);
871
	}
872
873
	cpbSize = end - base;
874
	if (writep >= readp)
875
		cpbFullness = writep - readp;
876
	else
877
		cpbFullness = (end - base) - (readp - writep);
878
879
	fifoSize = cpbSize - cpbFullness;
880
881
882
	if (fifoSize < BC_INFIFO_THRESHOLD)
883
	{
884
		*empty_sz = 0;
885
		return true;
886
	}
887
888
	if (needed_sz > (fifoSize - BC_INFIFO_THRESHOLD))
889
	{
890
		*empty_sz = 0;
891
		return true;
892
	}
893
	*empty_sz = fifoSize - BC_INFIFO_THRESHOLD;
894
895
	return false;
896
}
897
898
bool crystalhd_link_tx_list0_handler(struct crystalhd_hw *hw, uint32_t err_sts)
899
{
900
	uint32_t err_mask, tmp;
901
902
	err_mask = MISC1_TX_DMA_ERROR_STATUS_TX_L0_DESC_TX_ABORT_ERRORS_MASK |
903
		MISC1_TX_DMA_ERROR_STATUS_TX_L0_DMA_DATA_TX_ABORT_ERRORS_MASK |
904
		MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_MASK;
905
906
	if (!(err_sts & err_mask))
907
		return false;
908
909
	dev_err(&hw->adp->pdev->dev, "Error on Tx-L0 %x\n", err_sts);
910
911
	tmp = err_mask;
912
913
	if (err_sts & MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_MASK)
914
		tmp &= ~MISC1_TX_DMA_ERROR_STATUS_TX_L0_FIFO_FULL_ERRORS_MASK;
915
916
	if (tmp) {
917
		/* reset list index.*/
918
		hw->tx_list_post_index = 0;
919
	}
920
921
	tmp = err_sts & err_mask;
922
	hw->pfnWriteFPGARegister(hw->adp, MISC1_TX_DMA_ERROR_STATUS, tmp);
923
924
	return true;
925
}
926
927
bool crystalhd_link_tx_list1_handler(struct crystalhd_hw *hw, uint32_t err_sts)
928
{
929
	uint32_t err_mask, tmp;
930
931
	err_mask = MISC1_TX_DMA_ERROR_STATUS_TX_L1_DESC_TX_ABORT_ERRORS_MASK |
932
		MISC1_TX_DMA_ERROR_STATUS_TX_L1_DMA_DATA_TX_ABORT_ERRORS_MASK |
933
		MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_MASK;
934
935
	if (!(err_sts & err_mask))
936
		return false;
937
938
	dev_err(&hw->adp->pdev->dev, "Error on Tx-L1 %x\n", err_sts);
939
940
	tmp = err_mask;
941
942
	if (err_sts & MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_MASK)
943
		tmp &= ~MISC1_TX_DMA_ERROR_STATUS_TX_L1_FIFO_FULL_ERRORS_MASK;
944
945
	if (tmp) {
946
		/* reset list index.*/
947
		hw->tx_list_post_index = 0;
948
	}
949
950
	tmp = err_sts & err_mask;
951
	hw->pfnWriteFPGARegister(hw->adp, MISC1_TX_DMA_ERROR_STATUS, tmp);
952
953
	return true;
954
}
955
956
void crystalhd_link_tx_isr(struct crystalhd_hw *hw, uint32_t int_sts)
957
{
958
	uint32_t err_sts;
959
960
	if (int_sts & INTR_INTR_STATUS_L0_TX_DMA_DONE_INTR_MASK)
961
		crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 0,
962
					   BC_STS_SUCCESS);
963
964
	if (int_sts & INTR_INTR_STATUS_L1_TX_DMA_DONE_INTR_MASK)
965
		crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 1,
966
					     BC_STS_SUCCESS);
967
968
	if (!(int_sts & (INTR_INTR_STATUS_L0_TX_DMA_ERR_INTR_MASK |
969
			 INTR_INTR_STATUS_L1_TX_DMA_ERR_INTR_MASK)))
970
		/* No error mask set.. */
971
		return;
972
973
	/* Handle Tx errors. */
974
	err_sts = hw->pfnReadFPGARegister(hw->adp, MISC1_TX_DMA_ERROR_STATUS);
975
976
	if (crystalhd_link_tx_list0_handler(hw, err_sts))
977
		crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 0,
978
					     BC_STS_ERROR);
979
980
	if (crystalhd_link_tx_list1_handler(hw, err_sts))
981
		crystalhd_hw_tx_req_complete(hw, hw->tx_ioq_tag_seed + 1,
982
					     BC_STS_ERROR);
983
984
	hw->stats.tx_errors++;
985
}
986
987
void crystalhd_link_start_tx_dma_engine(struct crystalhd_hw *hw, uint8_t list_id, addr_64 desc_addr)
988
{
989
	uint32_t dma_cntrl;
990
	uint32_t first_desc_u_addr, first_desc_l_addr;
991
992
	if (list_id == 0) {
993
		first_desc_u_addr = MISC1_TX_FIRST_DESC_U_ADDR_LIST0;
994
		first_desc_l_addr = MISC1_TX_FIRST_DESC_L_ADDR_LIST0;
995
	} else {
996
		first_desc_u_addr = MISC1_TX_FIRST_DESC_U_ADDR_LIST1;
997
		first_desc_l_addr = MISC1_TX_FIRST_DESC_L_ADDR_LIST1;
998
	}
999
1000
	dma_cntrl = hw->pfnReadFPGARegister(hw->adp,MISC1_TX_SW_DESC_LIST_CTRL_STS);
1001
	if (!(dma_cntrl & DMA_START_BIT)) {
1002
		dma_cntrl |= DMA_START_BIT;
1003
		hw->pfnWriteFPGARegister(hw->adp, MISC1_TX_SW_DESC_LIST_CTRL_STS,
1004
			       dma_cntrl);
1005
	}
1006
1007
	hw->pfnWriteFPGARegister(hw->adp, first_desc_u_addr, desc_addr.high_part);
1008
1009
	hw->pfnWriteFPGARegister(hw->adp, first_desc_l_addr, desc_addr.low_part | 0x01);
1010
						/* Be sure we set the valid bit ^^^^ */
1011
	return;
1012
}
1013
1014
/* _CHECK_THIS_
1015
 *
1016
 * Verify if the Stop generates a completion interrupt or not.
1017
 * if it does not generate an interrupt, then add polling here.
1018
 */
1019
BC_STATUS crystalhd_link_stop_tx_dma_engine(struct crystalhd_hw *hw)
1020
{
1021
	struct device *dev;
1022
	uint32_t dma_cntrl, cnt = 30;
1023
	uint32_t l1 = 1, l2 = 1;
1024
1025
	dma_cntrl = hw->pfnReadFPGARegister(hw->adp, MISC1_TX_SW_DESC_LIST_CTRL_STS);
1026
1027
	dev = &hw->adp->pdev->dev;
1028
1029
	dev_dbg(dev, "Stopping TX DMA Engine..\n");
1030
1031
	if (!(dma_cntrl & DMA_START_BIT)) {
1032
		hw->tx_list_post_index = 0;
1033
		dev_dbg(dev, "Already Stopped\n");
1034
		return BC_STS_SUCCESS;
1035
	}
1036
1037
	crystalhd_link_disable_interrupts(hw);
1038
1039
	/* Issue stop to HW */
1040
	dma_cntrl &= ~DMA_START_BIT;
1041
	hw->pfnWriteFPGARegister(hw->adp, MISC1_TX_SW_DESC_LIST_CTRL_STS, dma_cntrl);
1042
1043
	dev_dbg(dev, "Cleared the DMA Start bit\n");
1044
1045
	/* Poll for 3seconds (30 * 100ms) on both the lists..*/
1046
	while ((l1 || l2) && cnt) {
1047
1048
		if (l1) {
1049
			l1 = hw->pfnReadFPGARegister(hw->adp,
1050
				MISC1_TX_FIRST_DESC_L_ADDR_LIST0);
1051
			l1 &= DMA_START_BIT;
1052
		}
1053
1054
		if (l2) {
1055
			l2 = hw->pfnReadFPGARegister(hw->adp,
1056
				MISC1_TX_FIRST_DESC_L_ADDR_LIST1);
1057
			l2 &= DMA_START_BIT;
1058
		}
1059
1060
		msleep_interruptible(100);
1061
1062
		cnt--;
1063
	}
1064
1065
	if (!cnt) {
1066
		dev_err(dev, "Failed to stop TX DMA.. l1 %d, l2 %d\n", l1, l2);
1067
		crystalhd_link_enable_interrupts(hw);
1068
		return BC_STS_ERROR;
1069
	}
1070
1071
	hw->tx_list_post_index = 0;
1072
	dev_dbg(dev, "stopped TX DMA..\n");
1073
	crystalhd_link_enable_interrupts(hw);
1074
1075
	return BC_STS_SUCCESS;
1076
}
1077
1078
uint32_t crystalhd_link_get_pib_avail_cnt(struct crystalhd_hw *hw)
1079
{
1080
	/*
1081
	* Position of the PIB Entries can be found at
1082
	* 0th and the 1st location of the Circular list.
1083
	*/
1084
	uint32_t Q_addr;
1085
	uint32_t pib_cnt, r_offset, w_offset;
1086
1087
	Q_addr = hw->pib_del_Q_addr;
1088
1089
	/* Get the Read Pointer */
1090
	crystalhd_link_mem_rd(hw, Q_addr, 1, &r_offset);
1091
1092
	/* Get the Write Pointer */
1093
	crystalhd_link_mem_rd(hw, Q_addr + sizeof(uint32_t), 1, &w_offset);
1094
1095
	if (r_offset == w_offset)
1096
		return 0;	/* Queue is empty */
1097
1098
	if (w_offset > r_offset)
1099
		pib_cnt = w_offset - r_offset;
1100
	else
1101
		pib_cnt = (w_offset + MAX_PIB_Q_DEPTH) -
1102
			  (r_offset + MIN_PIB_Q_DEPTH);
1103
1104
	if (pib_cnt > MAX_PIB_Q_DEPTH) {
1105
		dev_err(&hw->adp->pdev->dev, "Invalid PIB Count (%u)\n", pib_cnt);
1106
		return 0;
1107
	}
1108
1109
	return pib_cnt;
1110
}
1111
1112
uint32_t crystalhd_link_get_addr_from_pib_Q(struct crystalhd_hw *hw)
1113
{
1114
	uint32_t Q_addr;
1115
	uint32_t addr_entry, r_offset, w_offset;
1116
1117
	Q_addr = hw->pib_del_Q_addr;
1118
1119
	/* Get the Read Pointer 0Th Location is Read Pointer */
1120
	crystalhd_link_mem_rd(hw, Q_addr, 1, &r_offset);
1121
1122
	/* Get the Write Pointer 1st Location is Write pointer */
1123
	crystalhd_link_mem_rd(hw, Q_addr + sizeof(uint32_t), 1, &w_offset);
1124
1125
	/* Queue is empty */
1126
	if (r_offset == w_offset)
1127
		return 0;
1128
1129
	if ((r_offset < MIN_PIB_Q_DEPTH) || (r_offset >= MAX_PIB_Q_DEPTH))
1130
		return 0;
1131
1132
	/* Get the Actual Address of the PIB */
1133
	crystalhd_link_mem_rd(hw, Q_addr + (r_offset * sizeof(uint32_t)),
1134
		       1, &addr_entry);
1135
1136
	/* Increment the Read Pointer */
1137
	r_offset++;
1138
1139
	if (MAX_PIB_Q_DEPTH == r_offset)
1140
		r_offset = MIN_PIB_Q_DEPTH;
1141
1142
	/* Write back the read pointer to It's Location */
1143
	crystalhd_link_mem_wr(hw, Q_addr, 1, &r_offset);
1144
1145
	return addr_entry;
1146
}
1147
1148
bool crystalhd_link_rel_addr_to_pib_Q(struct crystalhd_hw *hw, uint32_t addr_to_rel)
1149
{
1150
	uint32_t Q_addr;
1151
	uint32_t r_offset, w_offset, n_offset;
1152
1153
	Q_addr = hw->pib_rel_Q_addr;
1154
1155
	/* Get the Read Pointer */
1156
	crystalhd_link_mem_rd(hw, Q_addr, 1, &r_offset);
1157
1158
	/* Get the Write Pointer */
1159
	crystalhd_link_mem_rd(hw, Q_addr + sizeof(uint32_t), 1, &w_offset);
1160
1161
	if ((r_offset < MIN_PIB_Q_DEPTH) ||
1162
	    (r_offset >= MAX_PIB_Q_DEPTH))
1163
		return false;
1164
1165
	n_offset = w_offset + 1;
1166
1167
	if (MAX_PIB_Q_DEPTH == n_offset)
1168
		n_offset = MIN_PIB_Q_DEPTH;
1169
1170
	if (r_offset == n_offset)
1171
		return false; /* should never happen */
1172
1173
	/* Write the DRAM ADDR to the Queue at Next Offset */
1174
	crystalhd_link_mem_wr(hw, Q_addr + (w_offset * sizeof(uint32_t)),
1175
		       1, &addr_to_rel);
1176
1177
	/* Put the New value of the write pointer in Queue */
1178
	crystalhd_link_mem_wr(hw, Q_addr + sizeof(uint32_t), 1, &n_offset);
1179
1180
	return true;
1181
}
1182
1183
void link_cpy_pib_to_app(struct C011_PIB *src_pib, BC_PIC_INFO_BLOCK *dst_pib)
1184
{
1185
	if (!src_pib || !dst_pib) {
1186
		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
1187
		return;
1188
	}
1189
1190
	dst_pib->timeStamp		= 0;
1191
	dst_pib->picture_number		= src_pib->ppb.picture_number;
1192
	dst_pib->width			= src_pib->ppb.width;
1193
	dst_pib->height			= src_pib->ppb.height;
1194
	dst_pib->chroma_format		= src_pib->ppb.chroma_format;
1195
	dst_pib->pulldown		= src_pib->ppb.pulldown;
1196
	dst_pib->flags			= src_pib->ppb.flags;
1197
	dst_pib->sess_num		= src_pib->ptsStcOffset;
1198
	dst_pib->aspect_ratio		= src_pib->ppb.aspect_ratio;
1199
	dst_pib->colour_primaries	= src_pib->ppb.colour_primaries;
1200
	dst_pib->picture_meta_payload	= src_pib->ppb.picture_meta_payload;
1201
	dst_pib->frame_rate		= src_pib->resolution ;
1202
	return;
1203
}
1204
1205
void crystalhd_link_proc_pib(struct crystalhd_hw *hw)
1206
{
1207
	unsigned int cnt;
1208
	struct C011_PIB src_pib;
1209
	uint32_t pib_addr, pib_cnt;
1210
	BC_PIC_INFO_BLOCK *AppPib;
1211
	struct crystalhd_rx_dma_pkt *rx_pkt = NULL;
1212
1213
	pib_cnt = crystalhd_link_get_pib_avail_cnt(hw);
1214
1215
	if (!pib_cnt)
1216
		return;
1217
1218
	for (cnt = 0; cnt < pib_cnt; cnt++) {
1219
		pib_addr = crystalhd_link_get_addr_from_pib_Q(hw);
1220
		crystalhd_link_mem_rd(hw, pib_addr, sizeof(struct C011_PIB) / 4,
1221
				 (uint32_t *)&src_pib);
1222
1223
		if (src_pib.bFormatChange) {
1224
			rx_pkt = (struct crystalhd_rx_dma_pkt *)
1225
					crystalhd_dioq_fetch(hw->rx_freeq);
1226
			if (!rx_pkt)
1227
				return;
1228
1229
			rx_pkt->flags = 0;
1230
			rx_pkt->flags |= COMP_FLAG_PIB_VALID |
1231
					 COMP_FLAG_FMT_CHANGE;
1232
			AppPib = &rx_pkt->pib;
1233
			link_cpy_pib_to_app(&src_pib, AppPib);
1234
1235
			hw->PICHeight = rx_pkt->pib.height;
1236
			if (rx_pkt->pib.width > 1280)
1237
				hw->PICWidth = 1920;
1238
			else if (rx_pkt->pib.width > 720)
1239
				hw->PICWidth = 1280;
1240
			else
1241
				hw->PICWidth = 720;
1242
1243
			dev_info(&hw->adp->pdev->dev,
1244
				"[FMT CH] PIB:%x %x %x %x %x %x %x %x %x %x\n",
1245
				rx_pkt->pib.picture_number,
1246
				rx_pkt->pib.aspect_ratio,
1247
				rx_pkt->pib.chroma_format,
1248
				rx_pkt->pib.colour_primaries,
1249
				rx_pkt->pib.frame_rate,
1250
				rx_pkt->pib.height,
1251
				rx_pkt->pib.width,
1252
				rx_pkt->pib.n_drop,
1253
				rx_pkt->pib.pulldown,
1254
				rx_pkt->pib.ycom);
1255
1256
			crystalhd_dioq_add(hw->rx_rdyq, (void *)rx_pkt,
1257
					   true, rx_pkt->pkt_tag);
1258
1259
		}
1260
1261
		crystalhd_link_rel_addr_to_pib_Q(hw, pib_addr);
1262
	}
1263
}
1264
1265
void crystalhd_link_start_rx_dma_engine(struct crystalhd_hw *hw)
1266
{
1267
	uint32_t        dma_cntrl;
1268
1269
	dma_cntrl = hw->pfnReadFPGARegister(hw->adp, MISC1_Y_RX_SW_DESC_LIST_CTRL_STS);
1270
	if (!(dma_cntrl & DMA_START_BIT)) {
1271
		dma_cntrl |= DMA_START_BIT;
1272
		hw->pfnWriteFPGARegister(hw->adp, MISC1_Y_RX_SW_DESC_LIST_CTRL_STS,
1273
				 dma_cntrl);
1274
	}
1275
1276
	dma_cntrl = hw->pfnReadFPGARegister(hw->adp, MISC1_UV_RX_SW_DESC_LIST_CTRL_STS);
1277
	if (!(dma_cntrl & DMA_START_BIT)) {
1278
		dma_cntrl |= DMA_START_BIT;
1279
		hw->pfnWriteFPGARegister(hw->adp, MISC1_UV_RX_SW_DESC_LIST_CTRL_STS,
1280
				 dma_cntrl);
1281
	}
1282
1283
	return;
1284
}
1285
1286
void crystalhd_link_stop_rx_dma_engine(struct crystalhd_hw *hw)
1287
{
1288
	struct device *dev = &hw->adp->pdev->dev;
1289
	uint32_t dma_cntrl = 0, count = 30;
1290
	uint32_t l0y = 1, l0uv = 1, l1y = 1, l1uv = 1;
1291
1292
	dma_cntrl = hw->pfnReadFPGARegister(hw->adp, MISC1_Y_RX_SW_DESC_LIST_CTRL_STS);
1293
	if ((dma_cntrl & DMA_START_BIT)) {
1294
		dma_cntrl &= ~DMA_START_BIT;
1295
		hw->pfnWriteFPGARegister(hw->adp, MISC1_Y_RX_SW_DESC_LIST_CTRL_STS,
1296
				 dma_cntrl);
1297
	}
1298
1299
	dma_cntrl = hw->pfnReadFPGARegister(hw->adp, MISC1_UV_RX_SW_DESC_LIST_CTRL_STS);
1300
	if ((dma_cntrl & DMA_START_BIT)) {
1301
		dma_cntrl &= ~DMA_START_BIT;
1302
		hw->pfnWriteFPGARegister(hw->adp, MISC1_UV_RX_SW_DESC_LIST_CTRL_STS,
1303
				 dma_cntrl);
1304
	}
1305
1306
	/* Poll for 3seconds (30 * 100ms) on both the lists..*/
1307
	while ((l0y || l0uv || l1y || l1uv) && count) {
1308
1309
		if (l0y) {
1310
			l0y = hw->pfnReadFPGARegister(hw->adp,
1311
				MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0);
1312
			l0y &= DMA_START_BIT;
1313
			if (!l0y)
1314
				hw->rx_list_sts[0] &= ~rx_waiting_y_intr;
1315
		}
1316
1317
		if (l1y) {
1318
			l1y = hw->pfnReadFPGARegister(hw->adp,
1319
				MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1);
1320
			l1y &= DMA_START_BIT;
1321
			if (!l1y)
1322
				hw->rx_list_sts[1] &= ~rx_waiting_y_intr;
1323
		}
1324
1325
		if (l0uv) {
1326
			l0uv = hw->pfnReadFPGARegister(hw->adp,
1327
				MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0);
1328
			l0uv &= DMA_START_BIT;
1329
			if (!l0uv)
1330
				hw->rx_list_sts[0] &= ~rx_waiting_uv_intr;
1331
		}
1332
1333
		if (l1uv) {
1334
			l1uv = hw->pfnReadFPGARegister(hw->adp,
1335
				MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1);
1336
			l1uv &= DMA_START_BIT;
1337
			if (!l1uv)
1338
				hw->rx_list_sts[1] &= ~rx_waiting_uv_intr;
1339
		}
1340
		msleep_interruptible(100);
1341
		count--;
1342
	}
1343
1344
	hw->rx_list_post_index = 0;
1345
1346
	dev_dbg(dev, "Capture Stop: %d List0:Sts:%x List1:Sts:%x\n",
1347
		count, hw->rx_list_sts[0], hw->rx_list_sts[1]);
1348
}
1349
1350
BC_STATUS crystalhd_link_hw_prog_rxdma(struct crystalhd_hw *hw,
1351
					 struct crystalhd_rx_dma_pkt *rx_pkt)
1352
{
1353
	struct device *dev;
1354
	uint32_t y_low_addr_reg, y_high_addr_reg;
1355
	uint32_t uv_low_addr_reg, uv_high_addr_reg;
1356
	addr_64 desc_addr;
1357
	unsigned long flags;
1358
1359
	if (!hw || !rx_pkt) {
1360
		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
1361
		return BC_STS_INV_ARG;
1362
	}
1363
1364
	dev = &hw->adp->pdev->dev;
1365
1366
	if (hw->rx_list_post_index >= DMA_ENGINE_CNT) {
1367
		dev_err(dev, "List Out Of bounds %x\n", hw->rx_list_post_index);
1368
		return BC_STS_INV_ARG;
1369
	}
1370
1371
	spin_lock_irqsave(&hw->rx_lock, flags);
1372
	if (hw->rx_list_sts[hw->rx_list_post_index]) {
1373
		spin_unlock_irqrestore(&hw->rx_lock, flags);
1374
		return BC_STS_BUSY;
1375
	}
1376
1377
	if (!hw->rx_list_post_index) {
1378
		y_low_addr_reg   = MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST0;
1379
		y_high_addr_reg  = MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST0;
1380
		uv_low_addr_reg  = MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST0;
1381
		uv_high_addr_reg = MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST0;
1382
	} else {
1383
		y_low_addr_reg   = MISC1_Y_RX_FIRST_DESC_L_ADDR_LIST1;
1384
		y_high_addr_reg  = MISC1_Y_RX_FIRST_DESC_U_ADDR_LIST1;
1385
		uv_low_addr_reg  = MISC1_UV_RX_FIRST_DESC_L_ADDR_LIST1;
1386
		uv_high_addr_reg = MISC1_UV_RX_FIRST_DESC_U_ADDR_LIST1;
1387
	}
1388
	rx_pkt->pkt_tag = hw->rx_pkt_tag_seed + hw->rx_list_post_index;
1389
	hw->rx_list_sts[hw->rx_list_post_index] |= rx_waiting_y_intr;
1390
	if (rx_pkt->uv_phy_addr)
1391
		hw->rx_list_sts[hw->rx_list_post_index] |= rx_waiting_uv_intr;
1392
	hw->rx_list_post_index = (hw->rx_list_post_index + 1) % DMA_ENGINE_CNT;
1393
1394
	crystalhd_dioq_add(hw->rx_actq, (void *)rx_pkt, false, rx_pkt->pkt_tag);
1395
1396
	crystalhd_link_start_rx_dma_engine(hw);
1397
	/* Program the Y descriptor */
1398
	desc_addr.full_addr = rx_pkt->desc_mem.phy_addr;
1399
	hw->pfnWriteFPGARegister(hw->adp, y_high_addr_reg, desc_addr.high_part);
1400
	hw->pfnWriteFPGARegister(hw->adp, y_low_addr_reg, desc_addr.low_part | 0x01);
1401
1402
	if (rx_pkt->uv_phy_addr) {
1403
		/* Program the UV descriptor */
1404
		desc_addr.full_addr = rx_pkt->uv_phy_addr;
1405
		hw->pfnWriteFPGARegister(hw->adp, uv_high_addr_reg, desc_addr.high_part);
1406
		hw->pfnWriteFPGARegister(hw->adp, uv_low_addr_reg, desc_addr.low_part | 0x01);
1407
	}
1408
1409
	spin_unlock_irqrestore(&hw->rx_lock, flags);
1410
1411
	return BC_STS_SUCCESS;
1412
}
1413
1414
BC_STATUS crystalhd_link_hw_post_cap_buff(struct crystalhd_hw *hw,
1415
					  struct crystalhd_rx_dma_pkt *rx_pkt)
1416
{
1417
	BC_STATUS sts = crystalhd_link_hw_prog_rxdma(hw, rx_pkt);
1418
1419
	if (sts == BC_STS_BUSY)
1420
		crystalhd_dioq_add(hw->rx_freeq, (void *)rx_pkt,
1421
				 false, rx_pkt->pkt_tag);
1422
1423
	return sts;
1424
}
1425
1426
void crystalhd_link_get_dnsz(struct crystalhd_hw *hw, uint32_t list_index,
1427
			     uint32_t *y_dw_dnsz, uint32_t *uv_dw_dnsz)
1428
{
1429
	uint32_t y_dn_sz_reg, uv_dn_sz_reg;
1430
1431
	if (!list_index) {
1432
		y_dn_sz_reg  = MISC1_Y_RX_LIST0_CUR_BYTE_CNT;
1433
		uv_dn_sz_reg = MISC1_UV_RX_LIST0_CUR_BYTE_CNT;
1434
	} else {
1435
		y_dn_sz_reg  = MISC1_Y_RX_LIST1_CUR_BYTE_CNT;
1436
		uv_dn_sz_reg = MISC1_UV_RX_LIST1_CUR_BYTE_CNT;
1437
	}
1438
1439
	*y_dw_dnsz  = hw->pfnReadFPGARegister(hw->adp, y_dn_sz_reg);
1440
	*uv_dw_dnsz = hw->pfnReadFPGARegister(hw->adp, uv_dn_sz_reg);
1441
}
1442
1443
/*
1444
 * This function should be called only after making sure that the two DMA
1445
 * lists are free. This function does not check if DMA's are active, before
1446
 * turning off the DMA.
1447
 */
1448
void crystalhd_link_hw_finalize_pause(struct crystalhd_hw *hw)
1449
{
1450
	uint32_t dma_cntrl;
1451
1452
	hw->stop_pending = 0;
1453
1454
	dma_cntrl = hw->pfnReadFPGARegister(hw->adp, MISC1_Y_RX_SW_DESC_LIST_CTRL_STS);
1455
	if (dma_cntrl & DMA_START_BIT) {
1456
		dma_cntrl &= ~DMA_START_BIT;
1457
		hw->pfnWriteFPGARegister(hw->adp, MISC1_Y_RX_SW_DESC_LIST_CTRL_STS,
1458
				 dma_cntrl);
1459
	}
1460
1461
	dma_cntrl = hw->pfnReadFPGARegister(hw->adp, MISC1_UV_RX_SW_DESC_LIST_CTRL_STS);
1462
	if (dma_cntrl & DMA_START_BIT) {
1463
		dma_cntrl &= ~DMA_START_BIT;
1464
		hw->pfnWriteFPGARegister(hw->adp, MISC1_UV_RX_SW_DESC_LIST_CTRL_STS,
1465
				 dma_cntrl);
1466
	}
1467
	hw->rx_list_post_index = 0;
1468
1469
/*	aspm = crystalhd_reg_rd(hw->adp, PCIE_DLL_DATA_LINK_CONTROL); */
1470
/*	aspm |= ASPM_L1_ENABLE; */
1471
/*	dev_info(&hw->adp->pdev->dev, "aspm on\n"); */
1472
/*	crystalhd_reg_wr(hw->adp, PCIE_DLL_DATA_LINK_CONTROL, aspm); */
1473
}
1474
1475
bool crystalhd_link_rx_list0_handler(struct crystalhd_hw *hw,
1476
				       uint32_t int_sts,
1477
				       uint32_t y_err_sts,
1478
				       uint32_t uv_err_sts)
1479
{
1480
	uint32_t tmp;
1481
	enum list_sts tmp_lsts;
1482
1483
	if (!(y_err_sts & GET_Y0_ERR_MSK) && !(uv_err_sts & GET_UV0_ERR_MSK))
1484
		return false;
1485
1486
	tmp_lsts = hw->rx_list_sts[0];
1487
1488
	/* Y0 - DMA */
1489
	tmp = y_err_sts & GET_Y0_ERR_MSK;
1490
	if (int_sts & INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_MASK)
1491
		hw->rx_list_sts[0] &= ~rx_waiting_y_intr;
1492
1493
	if (y_err_sts & MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK) {
1494
		hw->rx_list_sts[0] &= ~rx_waiting_y_intr;
1495
		tmp &= ~MISC1_Y_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK;
1496
	}
1497
1498
	if (y_err_sts & MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK) {
1499
		hw->rx_list_sts[0] &= ~rx_y_mask;
1500
		hw->rx_list_sts[0] |= rx_y_error;
1501
		tmp &= ~MISC1_Y_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK;
1502
	}
1503
1504
	if (tmp) {
1505
		hw->rx_list_sts[0] &= ~rx_y_mask;
1506
		hw->rx_list_sts[0] |= rx_y_error;
1507
		hw->rx_list_post_index = 0;
1508
	}
1509
1510
	/* UV0 - DMA */
1511
	tmp = uv_err_sts & GET_UV0_ERR_MSK;
1512
	if (int_sts & INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_MASK)
1513
		hw->rx_list_sts[0] &= ~rx_waiting_uv_intr;
1514
1515
	if (uv_err_sts & MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK) {
1516
		hw->rx_list_sts[0] &= ~rx_waiting_uv_intr;
1517
		tmp &= ~MISC1_UV_RX_ERROR_STATUS_RX_L0_UNDERRUN_ERROR_MASK;
1518
	}
1519
1520
	if (uv_err_sts & MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK) {
1521
		hw->rx_list_sts[0] &= ~rx_uv_mask;
1522
		hw->rx_list_sts[0] |= rx_uv_error;
1523
		tmp &= ~MISC1_UV_RX_ERROR_STATUS_RX_L0_FIFO_FULL_ERRORS_MASK;
1524
	}
1525
1526
	if (tmp) {
1527
		hw->rx_list_sts[0] &= ~rx_uv_mask;
1528
		hw->rx_list_sts[0] |= rx_uv_error;
1529
		hw->rx_list_post_index = 0;
1530
	}
1531
1532
	if (y_err_sts & GET_Y0_ERR_MSK) {
1533
		tmp = y_err_sts & GET_Y0_ERR_MSK;
1534
		hw->pfnWriteFPGARegister(hw->adp, MISC1_Y_RX_ERROR_STATUS, tmp);
1535
	}
1536
1537
	if (uv_err_sts & GET_UV0_ERR_MSK) {
1538
		tmp = uv_err_sts & GET_UV0_ERR_MSK;
1539
		hw->pfnWriteFPGARegister(hw->adp, MISC1_UV_RX_ERROR_STATUS, tmp);
1540
	}
1541
1542
	return (tmp_lsts != hw->rx_list_sts[0]);
1543
}
1544
1545
bool crystalhd_link_rx_list1_handler(struct crystalhd_hw *hw,
1546
				       uint32_t int_sts, uint32_t y_err_sts,
1547
				       uint32_t uv_err_sts)
1548
{
1549
	uint32_t tmp;
1550
	enum list_sts tmp_lsts;
1551
1552
	if (!(y_err_sts & GET_Y1_ERR_MSK) && !(uv_err_sts & GET_UV1_ERR_MSK))
1553
		return false;
1554
1555
	tmp_lsts = hw->rx_list_sts[1];
1556
1557
	/* Y1 - DMA */
1558
	tmp = y_err_sts & GET_Y1_ERR_MSK;
1559
	if (int_sts & INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_MASK)
1560
		hw->rx_list_sts[1] &= ~rx_waiting_y_intr;
1561
1562
	if (y_err_sts & MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK) {
1563
		hw->rx_list_sts[1] &= ~rx_waiting_y_intr;
1564
		tmp &= ~MISC1_Y_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK;
1565
	}
1566
1567
	if (y_err_sts & MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK) {
1568
		/* Add retry-support..*/
1569
		hw->rx_list_sts[1] &= ~rx_y_mask;
1570
		hw->rx_list_sts[1] |= rx_y_error;
1571
		tmp &= ~MISC1_Y_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK;
1572
	}
1573
1574
	if (tmp) {
1575
		hw->rx_list_sts[1] &= ~rx_y_mask;
1576
		hw->rx_list_sts[1] |= rx_y_error;
1577
		hw->rx_list_post_index = 0;
1578
	}
1579
1580
	/* UV1 - DMA */
1581
	tmp = uv_err_sts & GET_UV1_ERR_MSK;
1582
	if (int_sts & INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_MASK)
1583
		hw->rx_list_sts[1] &= ~rx_waiting_uv_intr;
1584
1585
	if (uv_err_sts & MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK) {
1586
		hw->rx_list_sts[1] &= ~rx_waiting_uv_intr;
1587
		tmp &= ~MISC1_UV_RX_ERROR_STATUS_RX_L1_UNDERRUN_ERROR_MASK;
1588
	}
1589
1590
	if (uv_err_sts & MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK) {
1591
		/* Add retry-support*/
1592
		hw->rx_list_sts[1] &= ~rx_uv_mask;
1593
		hw->rx_list_sts[1] |= rx_uv_error;
1594
		tmp &= ~MISC1_UV_RX_ERROR_STATUS_RX_L1_FIFO_FULL_ERRORS_MASK;
1595
	}
1596
1597
	if (tmp) {
1598
		hw->rx_list_sts[1] &= ~rx_uv_mask;
1599
		hw->rx_list_sts[1] |= rx_uv_error;
1600
		hw->rx_list_post_index = 0;
1601
	}
1602
1603
	if (y_err_sts & GET_Y1_ERR_MSK) {
1604
		tmp = y_err_sts & GET_Y1_ERR_MSK;
1605
		hw->pfnWriteFPGARegister(hw->adp, MISC1_Y_RX_ERROR_STATUS, tmp);
1606
	}
1607
1608
	if (uv_err_sts & GET_UV1_ERR_MSK) {
1609
		tmp = uv_err_sts & GET_UV1_ERR_MSK;
1610
		hw->pfnWriteFPGARegister(hw->adp, MISC1_UV_RX_ERROR_STATUS, tmp);
1611
	}
1612
1613
	return (tmp_lsts != hw->rx_list_sts[1]);
1614
}
1615
1616
void crystalhd_link_rx_isr(struct crystalhd_hw *hw, uint32_t intr_sts)
1617
{
1618
	unsigned long flags;
1619
	uint32_t i, list_avail = 0;
1620
	BC_STATUS comp_sts = BC_STS_NO_DATA;
1621
	uint32_t y_err_sts, uv_err_sts, y_dn_sz = 0, uv_dn_sz = 0;
1622
	bool ret = 0;
1623
1624
	if (!hw) {
1625
		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
1626
		return;
1627
	}
1628
1629
	if (!(intr_sts & GET_RX_INTR_MASK))
1630
		return;
1631
1632
	y_err_sts = hw->pfnReadFPGARegister(hw->adp, MISC1_Y_RX_ERROR_STATUS);
1633
	uv_err_sts = hw->pfnReadFPGARegister(hw->adp, MISC1_UV_RX_ERROR_STATUS);
1634
1635
	for (i = 0; i < DMA_ENGINE_CNT; i++) {
1636
		/* Update States..*/
1637
		spin_lock_irqsave(&hw->rx_lock, flags);
1638
		if (i == 0)
1639
			ret = crystalhd_link_rx_list0_handler(hw, intr_sts, y_err_sts, uv_err_sts);
1640
		else
1641
			ret = crystalhd_link_rx_list1_handler(hw, intr_sts, y_err_sts, uv_err_sts);
1642
		if (ret) {
1643
			switch (hw->rx_list_sts[i]) {
1644
			case sts_free:
1645
				comp_sts = BC_STS_SUCCESS;
1646
				list_avail = 1;
1647
				hw->stats.rx_success++;
1648
				break;
1649
			case rx_y_error:
1650
			case rx_uv_error:
1651
			case rx_sts_error:
1652
				/* We got error on both or Y or uv. */
1653
				hw->stats.rx_errors++;
1654
				hw->pfnHWGetDoneSize(hw, i, &y_dn_sz, &uv_dn_sz);
1655
				dev_info(&hw->adp->pdev->dev, "list_index:%x "
1656
					"rx[%d] rxtot[%d] Y:%x UV:%x Int:%x YDnSz:%x "
1657
					"UVDnSz:%x\n", i, hw->stats.rx_errors,
1658
					hw->stats.rx_errors + hw->stats.rx_success,
1659
					y_err_sts, uv_err_sts, intr_sts,
1660
					y_dn_sz, uv_dn_sz);
1661
				hw->rx_list_sts[i] = sts_free;
1662
				comp_sts = BC_STS_ERROR;
1663
				break;
1664
			default:
1665
				/* Wait for completion..*/
1666
				comp_sts = BC_STS_NO_DATA;
1667
				break;
1668
			}
1669
		}
1670
		spin_unlock_irqrestore(&hw->rx_lock, flags);
1671
1672
		/* handle completion...*/
1673
		if (comp_sts != BC_STS_NO_DATA) {
1674
			crystalhd_rx_pkt_done(hw, i, comp_sts);
1675
			comp_sts = BC_STS_NO_DATA;
1676
		}
1677
	}
1678
1679
	if (list_avail) {
1680
		if (hw->stop_pending) {
1681
			if ((hw->rx_list_sts[0] == sts_free) &&
1682
			    (hw->rx_list_sts[1] == sts_free))
1683
				crystalhd_link_hw_finalize_pause(hw);
1684
		} else {
1685
			if(!hw->hw_pause_issued)
1686
				crystalhd_hw_start_capture(hw);
1687
		}
1688
	}
1689
}
1690
1691
BC_STATUS crystalhd_link_hw_pause(struct crystalhd_hw *hw, bool state)
1692
{
1693
	uint32_t pause = 0;
1694
	BC_STATUS sts = BC_STS_SUCCESS;
1695
1696
	if(state) {
1697
		pause = 1;
1698
		hw->stats.pause_cnt++;
1699
		hw->stop_pending = 1;
1700
		hw->pfnWriteDevRegister(hw->adp, HW_PauseMbx, pause);
1701
1702
		if ((hw->rx_list_sts[0] == sts_free) &&
1703
			(hw->rx_list_sts[1] == sts_free))
1704
			crystalhd_link_hw_finalize_pause(hw);
1705
	} else {
1706
		pause = 0;
1707
		hw->stop_pending = 0;
1708
		sts = crystalhd_hw_start_capture(hw);
1709
		hw->pfnWriteDevRegister(hw->adp, HW_PauseMbx, pause);
1710
	}
1711
	return sts;
1712
}
1713
1714
BC_STATUS crystalhd_link_fw_cmd_post_proc(struct crystalhd_hw *hw,
1715
					  BC_FW_CMD *fw_cmd)
1716
{
1717
	BC_STATUS sts = BC_STS_SUCCESS;
1718
	struct DecRspChannelStartVideo *st_rsp = NULL;
1719
1720
	switch (fw_cmd->cmd[0]) {
1721
	case eCMD_C011_DEC_CHAN_START_VIDEO:
1722
		st_rsp = (struct DecRspChannelStartVideo *)fw_cmd->rsp;
1723
		hw->pib_del_Q_addr = st_rsp->picInfoDeliveryQ;
1724
		hw->pib_rel_Q_addr = st_rsp->picInfoReleaseQ;
1725
		dev_dbg(&hw->adp->pdev->dev, "DelQAddr:%x RelQAddr:%x\n",
1726
		       hw->pib_del_Q_addr, hw->pib_rel_Q_addr);
1727
		break;
1728
	case eCMD_C011_INIT:
1729
		if (!(crystalhd_link_load_firmware_config(hw))) {
1730
			dev_err(&hw->adp->pdev->dev, "Invalid Params\n");
1731
			sts = BC_STS_FW_AUTH_FAILED;
1732
		}
1733
		break;
1734
	default:
1735
		break;
1736
	}
1737
	return sts;
1738
}
1739
1740
BC_STATUS crystalhd_link_put_ddr2sleep(struct crystalhd_hw *hw)
1741
{
1742
	uint32_t reg;
1743
	union link_misc_perst_decoder_ctrl rst_cntrl_reg;
1744
1745
	/* Pulse reset pin of 7412 (MISC_PERST_DECODER_CTRL) */
1746
	rst_cntrl_reg.whole_reg = hw->pfnReadDevRegister(hw->adp, MISC_PERST_DECODER_CTRL);
1747
1748
	rst_cntrl_reg.bcm_7412_rst = 1;
1749
	hw->pfnWriteDevRegister(hw->adp, MISC_PERST_DECODER_CTRL, rst_cntrl_reg.whole_reg);
1750
	msleep_interruptible(50);
1751
1752
	rst_cntrl_reg.bcm_7412_rst = 0;
1753
	hw->pfnWriteDevRegister(hw->adp, MISC_PERST_DECODER_CTRL, rst_cntrl_reg.whole_reg);
1754
1755
	/* Close all banks, put DDR in idle */
1756
	hw->pfnWriteDevRegister(hw->adp, SDRAM_PRECHARGE, 0);
1757
1758
	/* Set bit 25 (drop CKE pin of DDR) */
1759
	reg = hw->pfnReadDevRegister(hw->adp, SDRAM_PARAM);
1760
	reg |= 0x02000000;
1761
	hw->pfnWriteDevRegister(hw->adp, SDRAM_PARAM, reg);
1762
1763
	/* Reset the audio block */
1764
	hw->pfnWriteDevRegister(hw->adp, AUD_DSP_MISC_SOFT_RESET, 0x1);
1765
1766
	/* Power down Raptor PLL */
1767
	reg = hw->pfnReadDevRegister(hw->adp, DecHt_PllCCtl);
1768
	reg |= 0x00008000;
1769
	hw->pfnWriteDevRegister(hw->adp, DecHt_PllCCtl, reg);
1770
1771
	/* Power down all Audio PLL */
1772
	hw->pfnWriteDevRegister(hw->adp, AIO_MISC_PLL_RESET, 0x1);
1773
1774
	/* Power down video clock (75MHz) */
1775
	reg = hw->pfnReadDevRegister(hw->adp, DecHt_PllECtl);
1776
	reg |= 0x00008000;
1777
	hw->pfnWriteDevRegister(hw->adp, DecHt_PllECtl, reg);
1778
1779
	/* Power down video clock (75MHz) */
1780
	reg = hw->pfnReadDevRegister(hw->adp, DecHt_PllDCtl);
1781
	reg |= 0x00008000;
1782
	hw->pfnWriteDevRegister(hw->adp, DecHt_PllDCtl, reg);
1783
1784
	/* Power down core clock (200MHz) */
1785
	reg = hw->pfnReadDevRegister(hw->adp, DecHt_PllACtl);
1786
	reg |= 0x00008000;
1787
	hw->pfnWriteDevRegister(hw->adp, DecHt_PllACtl, reg);
1788
1789
	/* Power down core clock (200MHz) */
1790
	reg = hw->pfnReadDevRegister(hw->adp, DecHt_PllBCtl);
1791
	reg |= 0x00008000;
1792
	hw->pfnWriteDevRegister(hw->adp, DecHt_PllBCtl, reg);
1793
1794
	return BC_STS_SUCCESS;
1795
}
1796
1797
/************************************************
1798
**
1799
*************************************************/
1800
1801
BC_STATUS crystalhd_link_download_fw(struct crystalhd_hw *hw,
1802
				uint8_t *buffer, uint32_t sz)
1803
{
1804
	struct device *dev;
1805
	uint32_t reg_data, cnt, *temp_buff;
1806
	uint32_t fw_sig_len = 36;
1807
	uint32_t dram_offset = BC_FWIMG_ST_ADDR, sig_reg;
1808
1809
	if (!hw || !buffer || !sz) {
1810
		printk(KERN_ERR "%s: Invalid Params\n", __func__);
1811
		return BC_STS_INV_ARG;
1812
	}
1813
1814
	dev = &hw->adp->pdev->dev;
1815
1816
	dev_dbg(dev, "%s entered\n", __func__);
1817
1818
	reg_data = hw->pfnReadFPGARegister(hw->adp, OTP_CMD);
1819
	if (!(reg_data & 0x02)) {
1820
		dev_err(dev, "Invalid hw config.. otp not programmed\n");
1821
		return BC_STS_ERROR;
1822
	}
1823
1824
	reg_data = 0;
1825
	hw->pfnWriteFPGARegister(hw->adp, DCI_CMD, 0);
1826
	reg_data |= BC_BIT(0);
1827
	hw->pfnWriteFPGARegister(hw->adp, DCI_CMD, reg_data);
1828
1829
	reg_data = 0;
1830
	cnt = 1000;
1831
	msleep_interruptible(10);
1832
1833
	while (reg_data != BC_BIT(4)) {
1834
		reg_data = hw->pfnReadFPGARegister(hw->adp, DCI_STATUS);
1835
		reg_data &= BC_BIT(4);
1836
		if (--cnt == 0) {
1837
			dev_err(dev, "Firmware Download RDY Timeout.\n");
1838
			return BC_STS_TIMEOUT;
1839
		}
1840
	}
1841
1842
	msleep_interruptible(10);
1843
	/*  Load the FW to the FW_ADDR field in the DCI_FIRMWARE_ADDR */
1844
	hw->pfnWriteFPGARegister(hw->adp, DCI_FIRMWARE_ADDR, dram_offset);
1845
	temp_buff = (uint32_t *)buffer;
1846
	for (cnt = 0; cnt < (sz - fw_sig_len); cnt += 4) {
1847
		hw->pfnWriteFPGARegister(hw->adp, DCI_DRAM_BASE_ADDR, (dram_offset >> 19));
1848
		hw->pfnWriteFPGARegister(hw->adp, DCI_FIRMWARE_DATA, *temp_buff);
1849
		dram_offset += 4;
1850
		temp_buff++;
1851
	}
1852
	msleep_interruptible(10);
1853
1854
	temp_buff++;
1855
1856
	sig_reg = (uint32_t)DCI_SIGNATURE_DATA_7;
1857
	for (cnt = 0; cnt < 8; cnt++) {
1858
		uint32_t swapped_data = *temp_buff;
1859
		swapped_data = cpu_to_be32(swapped_data);
1860
		hw->pfnWriteFPGARegister(hw->adp, sig_reg, swapped_data);
1861
		sig_reg -= 4;
1862
		temp_buff++;
1863
	}
1864
	msleep_interruptible(10);
1865
1866
	reg_data = 0;
1867
	reg_data |= BC_BIT(1);
1868
	hw->pfnWriteFPGARegister(hw->adp, DCI_CMD, reg_data);
1869
	msleep_interruptible(10);
1870
1871
	reg_data = 0;
1872
	reg_data = hw->pfnReadFPGARegister(hw->adp, DCI_STATUS);
1873
1874
	if ((reg_data & BC_BIT(9)) == BC_BIT(9)) {
1875
		cnt = 1000;
1876
		while ((reg_data & BC_BIT(0)) != BC_BIT(0)) {
1877
			reg_data = hw->pfnReadFPGARegister(hw->adp, DCI_STATUS);
1878
			reg_data &= BC_BIT(0);
1879
			if (!(--cnt))
1880
				break;
1881
			msleep_interruptible(10);
1882
		}
1883
		reg_data = 0;
1884
		reg_data = hw->pfnReadFPGARegister(hw->adp, DCI_CMD);
1885
		reg_data |= BC_BIT(4);
1886
		hw->pfnWriteFPGARegister(hw->adp, DCI_CMD, reg_data);
1887
1888
	} else {
1889
		dev_err(dev, "F/w Signature mismatch\n");
1890
		return BC_STS_FW_AUTH_FAILED;
1891
	}
1892
1893
	dev_dbg(dev, "Firmware Downloaded Successfully\n");
1894
1895
	/* Load command response addresses */
1896
	hw->fwcmdPostAddr = TS_Host2CpuSnd;
1897
	hw->fwcmdPostMbox = Hst2CpuMbx1;
1898
	hw->fwcmdRespMbox = Cpu2HstMbx1;
1899
1900
	return BC_STS_SUCCESS;;
1901
}
1902
1903
BC_STATUS crystalhd_link_do_fw_cmd(struct crystalhd_hw *hw, BC_FW_CMD *fw_cmd)
1904
{
1905
	struct device *dev;
1906
	uint32_t cnt = 0, cmd_res_addr;
1907
	uint32_t *cmd_buff, *res_buff;
1908
	wait_queue_head_t fw_cmd_event;
1909
	int rc = 0;
1910
	BC_STATUS sts;
1911
	unsigned long flags;
1912
1913
	crystalhd_create_event(&fw_cmd_event);
1914
1915
	if (!hw || !fw_cmd) {
1916
		printk(KERN_ERR "%s: Invalid Arguments\n", __func__);
1917
		return BC_STS_INV_ARG;
1918
	}
1919
1920
	dev = &hw->adp->pdev->dev;
1921
1922
	dev_dbg(dev, "%s entered\n", __func__);
1923
1924
	cmd_buff = fw_cmd->cmd;
1925
	res_buff = fw_cmd->rsp;
1926
1927
	if (!cmd_buff || !res_buff) {
1928
		dev_err(dev, "Invalid Parameters for F/W Command\n");
1929
		return BC_STS_INV_ARG;
1930
	}
1931
1932
	hw->fwcmd_evt_sts = 0;
1933
	hw->pfw_cmd_event = &fw_cmd_event;
1934
1935
	spin_lock_irqsave(&hw->lock, flags);
1936
1937
	/*Write the command to the memory*/
1938
	hw->pfnDevDRAMWrite(hw, hw->fwcmdPostAddr, FW_CMD_BUFF_SZ, cmd_buff);
1939
1940
	/*Memory Read for memory arbitrator flush*/
1941
	hw->pfnDevDRAMRead(hw, hw->fwcmdPostAddr, 1, &cnt);
1942
1943
	/* Write the command address to mailbox */
1944
	hw->pfnWriteDevRegister(hw->adp, hw->fwcmdPostMbox, hw->fwcmdPostAddr);
1945
1946
	spin_unlock_irqrestore(&hw->lock, flags);
1947
1948
	msleep_interruptible(50);
1949
1950
	/* FW commands should complete even if we got a signal from the upper layer */
1951
	crystalhd_wait_on_event(&fw_cmd_event, hw->fwcmd_evt_sts,
1952
				20000, rc, true);
1953
1954
	if (!rc) {
1955
		sts = BC_STS_SUCCESS;
1956
	} else if (rc == -EBUSY) {
1957
		dev_err(dev, "Firmware command T/O\n");
1958
		sts = BC_STS_TIMEOUT;
1959
	} else if (rc == -EINTR) {
1960
		dev_err(dev, "FwCmd Wait Signal int - Should never happen\n");
1961
		sts = BC_STS_IO_USER_ABORT;
1962
	} else {
1963
		dev_err(dev, "FwCmd IO Error.\n");
1964
		sts = BC_STS_IO_ERROR;
1965
	}
1966
1967
	if (sts != BC_STS_SUCCESS) {
1968
		dev_err(dev, "FwCmd Failed.\n");
1969
		return sts;
1970
	}
1971
1972
	spin_lock_irqsave(&hw->lock, flags);
1973
1974
	/*Get the Responce Address*/
1975
	cmd_res_addr = hw->pfnReadDevRegister(hw->adp, hw->fwcmdRespMbox);
1976
1977
	/*Read the Response*/
1978
	hw->pfnDevDRAMRead(hw, cmd_res_addr, FW_CMD_BUFF_SZ, res_buff);
1979
1980
	spin_unlock_irqrestore(&hw->lock, flags);
1981
1982
	if (res_buff[2] != C011_RET_SUCCESS) {
1983
		dev_err(dev, "res_buff[2] != C011_RET_SUCCESS\n");
1984
		return BC_STS_FW_CMD_ERR;
1985
	}
1986
1987
	sts = crystalhd_link_fw_cmd_post_proc(hw, fw_cmd);
1988
	if (sts != BC_STS_SUCCESS)
1989
		dev_err(dev, "crystalhd_fw_cmd_post_proc Failed.\n");
1990
1991
	return sts;
1992
}
1993
1994
bool crystalhd_link_hw_interrupt_handle(struct crystalhd_adp *adp, struct crystalhd_hw *hw)
1995
{
1996
	uint32_t intr_sts = 0;
1997
	uint32_t deco_intr = 0;
1998
	bool rc = false;
1999
2000
	if (!adp || !hw->dev_started)
2001
		return rc;
2002
2003
	hw->stats.num_interrupts++;
2004
2005
	deco_intr = hw->pfnReadDevRegister(hw->adp, Stream2Host_Intr_Sts);
2006
	intr_sts  = hw->pfnReadFPGARegister(hw->adp, INTR_INTR_STATUS);
2007
2008
	if (intr_sts) {
2009
		/* let system know we processed interrupt..*/
2010
		rc = true;
2011
		hw->stats.dev_interrupts++;
2012
	}
2013
2014
	if (deco_intr && (deco_intr != 0xdeaddead)) {
2015
2016
		if (deco_intr & 0x80000000) {
2017
			/*Set the Event and the status flag*/
2018
			if (hw->pfw_cmd_event) {
2019
				hw->fwcmd_evt_sts = 1;
2020
				crystalhd_set_event(hw->pfw_cmd_event);
2021
			}
2022
		}
2023
2024
		if (deco_intr & BC_BIT(1))
2025
			crystalhd_link_proc_pib(hw);
2026
2027
		hw->pfnWriteDevRegister(hw->adp, Stream2Host_Intr_Sts, deco_intr);
2028
		hw->pfnWriteDevRegister(hw->adp, Stream2Host_Intr_Sts, 0);
2029
		rc = 1;
2030
	}
2031
2032
	/* Rx interrupts */
2033
	crystalhd_link_rx_isr(hw, intr_sts);
2034
2035
	/* Tx interrupts*/
2036
	crystalhd_link_tx_isr(hw, intr_sts);
2037
2038
	/* Clear interrupts */
2039
	if (rc) {
2040
		if (intr_sts)
2041
			hw->pfnWriteFPGARegister(hw->adp, INTR_INTR_CLR_REG, intr_sts);
2042
2043
		hw->pfnWriteFPGARegister(hw->adp, INTR_EOI_CTRL, 1);
2044
	}
2045
2046
	return rc;
2047
}
2048
2049
/* Dummy private function */
2050
void crystalhd_link_notify_fll_change(struct crystalhd_hw *hw, bool bCleanupContext)
2051
{
2052
	return;
2053
}
2054
2055
bool crystalhd_link_notify_event(struct crystalhd_hw *hw, enum BRCM_EVENT EventCode)
2056
{
2057
	return true;
2058
}
(-)crystalhd~/crystalhd_linkfuncs.h (+228 lines)
Line 0 Link Here
1
/***************************************************************************
2
 * Copyright (c) 2005-2009, Broadcom Corporation.
3
 *
4
 *  Name: crystalhd_linkfuncs . h
5
 *
6
 *  Description:
7
 *		BCM70012 Linux driver hardware layer.
8
 *
9
 *  HISTORY:
10
 *
11
 **********************************************************************
12
 * This file is part of the crystalhd device driver.
13
 *
14
 * This driver is free software; you can redistribute it and/or modify
15
 * it under the terms of the GNU General Public License as published by
16
 * the Free Software Foundation, version 2 of the License.
17
 *
18
 * This driver is distributed in the hope that it will be useful,
19
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
20
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
21
 * GNU General Public License for more details.
22
 *
23
 * You should have received a copy of the GNU General Public License
24
 * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
25
 **********************************************************************/
26
27
#ifndef _CRYSTALHD_LINKFUNCS_H_
28
#define _CRYSTALHD_LINKFUNCS_H_
29
30
#define ASPM_L1_ENABLE		(BC_BIT(27))
31
32
/*************************************************
33
  7412 Decoder  Registers.
34
**************************************************/
35
#define FW_CMD_BUFF_SZ		64
36
#define TS_Host2CpuSnd		0x00000100
37
#define HW_PauseMbx		0x00000300
38
#define Hst2CpuMbx1		0x00100F00
39
#define Cpu2HstMbx1		0x00100F04
40
#define MbxStat1		0x00100F08
41
#define Stream2Host_Intr_Sts	0x00100F24
42
#define C011_RET_SUCCESS	0x0	/* Reutrn status of firmware command. */
43
44
/* TS input status register */
45
#define TS_StreamAFIFOStatus	0x0010044C
46
#define TS_StreamBFIFOStatus	0x0010084C
47
48
/*UART Selection definitions*/
49
#define UartSelectA		0x00100300
50
#define UartSelectB		0x00100304
51
52
#define BSVS_UART_DEC_NONE	0x00
53
#define BSVS_UART_DEC_OUTER	0x01
54
#define BSVS_UART_DEC_INNER	0x02
55
#define BSVS_UART_STREAM	0x03
56
57
/* Code-In fifo */
58
#define REG_DecCA_RegCinCTL	0xa00
59
#define REG_DecCA_RegCinBase	0xa0c
60
#define REG_DecCA_RegCinEnd	0xa10
61
#define REG_DecCA_RegCinWrPtr	0xa04
62
#define REG_DecCA_RegCinRdPtr	0xa08
63
64
#define REG_Dec_TsUser0Base	0x100864
65
#define REG_Dec_TsUser0Rdptr	0x100868
66
#define REG_Dec_TsUser0Wrptr	0x10086C
67
#define REG_Dec_TsUser0End	0x100874
68
69
/* ASF Case ...*/
70
#define REG_Dec_TsAudCDB2Base	0x10036c
71
#define REG_Dec_TsAudCDB2Rdptr  0x100378
72
#define REG_Dec_TsAudCDB2Wrptr  0x100374
73
#define REG_Dec_TsAudCDB2End	0x100370
74
75
/* DRAM bringup Registers */
76
#define SDRAM_PARAM		0x00040804
77
#define SDRAM_PRECHARGE		0x000408B0
78
#define SDRAM_EXT_MODE		0x000408A4
79
#define SDRAM_MODE		0x000408A0
80
#define SDRAM_REFRESH		0x00040890
81
#define SDRAM_REF_PARAM		0x00040808
82
83
#define DecHt_PllACtl		0x34000C
84
#define DecHt_PllBCtl		0x340010
85
#define DecHt_PllCCtl		0x340014
86
#define DecHt_PllDCtl		0x340034
87
#define DecHt_PllECtl		0x340038
88
#define AUD_DSP_MISC_SOFT_RESET	0x00240104
89
#define AIO_MISC_PLL_RESET	0x0026000C
90
#define PCIE_CLK_REQ_REG	0xDC
91
#define	PCI_CLK_REQ_ENABLE	(BC_BIT(8))
92
93
/*************************************************
94
  F/W Copy engine definitions..
95
**************************************************/
96
#define BC_FWIMG_ST_ADDR	0x00000000
97
98
#define DecHt_HostSwReset	0x340000
99
#define BC_DRAM_FW_CFG_ADDR	0x001c2000
100
101
union intr_mask_reg {
102
	struct {
103
		uint32_t	mask_tx_done:1;
104
		uint32_t	mask_tx_err:1;
105
		uint32_t	mask_rx_done:1;
106
		uint32_t	mask_rx_err:1;
107
		uint32_t	mask_pcie_err:1;
108
		uint32_t	mask_pcie_rbusmast_err:1;
109
		uint32_t	mask_pcie_rgr_bridge:1;
110
		uint32_t	reserved:25;
111
	};
112
113
	uint32_t	whole_reg;
114
115
};
116
117
union link_misc_perst_deco_ctrl {
118
	struct {
119
		uint32_t	bcm7412_rst:1;		/* 1 -> BCM7412 is held in reset. Reset value 1.*/
120
		uint32_t	reserved0:3;		/* Reserved.No Effect*/
121
		uint32_t	stop_bcm_7412_clk:1;	/* 1 ->Stops branch of 27MHz clk used to clk BCM7412*/
122
		uint32_t	reserved1:27;		/* Reseved. No Effect*/
123
	};
124
125
	uint32_t	whole_reg;
126
127
};
128
129
union link_misc_perst_clk_ctrl {
130
	struct {
131
		uint32_t	sel_alt_clk:1;	  /* When set, selects a 6.75MHz clock as the source of core_clk */
132
		uint32_t	stop_core_clk:1;  /* When set, stops the branch of core_clk that is not needed for low power operation */
133
		uint32_t	pll_pwr_dn:1;	  /* When set, powers down the main PLL. The alternate clock bit should be set
134
						     to select an alternate clock before setting this bit.*/
135
		uint32_t	reserved0:5;	  /* Reserved */
136
		uint32_t	pll_mult:8;	  /* This setting controls the multiplier for the PLL. */
137
		uint32_t	pll_div:4;	  /* This setting controls the divider for the PLL. */
138
		uint32_t	reserved1:12;	  /* Reserved */
139
	};
140
141
	uint32_t	whole_reg;
142
143
};
144
145
146
union link_misc_perst_decoder_ctrl {
147
	struct {
148
		uint32_t	bcm_7412_rst:1; /* 1 -> BCM7412 is held in reset. Reset value 1.*/
149
		uint32_t	res0:3; /* Reserved.No Effect*/
150
		uint32_t	stop_7412_clk:1; /* 1 ->Stops branch of 27MHz clk used to clk BCM7412*/
151
		uint32_t	res1:27; /* Reseved. No Effect */
152
	};
153
154
	uint32_t	whole_reg;
155
156
};
157
158
/* DMA engine register BIT mask wrappers.. */
159
#define DMA_START_BIT		MISC1_TX_SW_DESC_LIST_CTRL_STS_TX_DMA_RUN_STOP_MASK
160
161
#define GET_RX_INTR_MASK (INTR_INTR_STATUS_L1_UV_RX_DMA_ERR_INTR_MASK |		\
162
			  INTR_INTR_STATUS_L1_UV_RX_DMA_DONE_INTR_MASK |	\
163
			  INTR_INTR_STATUS_L1_Y_RX_DMA_ERR_INTR_MASK |		\
164
			  INTR_INTR_STATUS_L1_Y_RX_DMA_DONE_INTR_MASK |		\
165
			  INTR_INTR_STATUS_L0_UV_RX_DMA_ERR_INTR_MASK |		\
166
			  INTR_INTR_STATUS_L0_UV_RX_DMA_DONE_INTR_MASK |	\
167
			  INTR_INTR_STATUS_L0_Y_RX_DMA_ERR_INTR_MASK |		\
168
			  INTR_INTR_STATUS_L0_Y_RX_DMA_DONE_INTR_MASK)
169
170
uint32_t link_dec_reg_rd(struct crystalhd_adp *adp, uint32_t reg_off);
171
void link_dec_reg_wr(struct crystalhd_adp *adp, uint32_t reg_off, uint32_t val);
172
uint32_t crystalhd_link_reg_rd(struct crystalhd_adp *adp, uint32_t reg_off);
173
void crystalhd_link_reg_wr(struct crystalhd_adp *adp, uint32_t reg_off, uint32_t val);
174
uint32_t crystalhd_link_dram_rd(struct crystalhd_hw *hw, uint32_t mem_off);
175
void crystalhd_link_dram_wr(struct crystalhd_hw *hw, uint32_t mem_off, uint32_t val);
176
BC_STATUS crystalhd_link_mem_rd(struct crystalhd_hw *hw, uint32_t start_off, uint32_t dw_cnt, uint32_t *rd_buff);
177
BC_STATUS crystalhd_link_mem_wr(struct crystalhd_hw *hw, uint32_t start_off, uint32_t dw_cnt, uint32_t *wr_buff);
178
void crystalhd_link_enable_uarts(struct crystalhd_hw *hw);
179
void crystalhd_link_start_dram(struct crystalhd_hw *hw);
180
bool crystalhd_link_bring_out_of_rst(struct crystalhd_hw *hw);
181
bool crystalhd_link_put_in_reset(struct crystalhd_hw *hw);
182
void crystalhd_link_disable_interrupts(struct crystalhd_hw *hw);
183
void crystalhd_link_enable_interrupts(struct crystalhd_hw *hw);
184
void crystalhd_link_clear_errors(struct crystalhd_hw *hw);
185
void crystalhd_link_clear_interrupts(struct crystalhd_hw *hw);
186
void crystalhd_link_soft_rst(struct crystalhd_hw *hw);
187
bool crystalhd_link_load_firmware_config(struct crystalhd_hw *hw);
188
bool crystalhd_link_start_device(struct crystalhd_hw *hw);
189
bool crystalhd_link_stop_device(struct crystalhd_hw *hw);
190
uint32_t link_GetPicInfoLineNum(struct crystalhd_dio_req *dio, uint8_t *base);
191
uint32_t link_GetMode422Data(struct crystalhd_dio_req *dio, PBC_PIC_INFO_BLOCK pPicInfoLine, int type);
192
uint32_t link_GetMetaDataFromPib(struct crystalhd_dio_req *dio,	PBC_PIC_INFO_BLOCK pPicInfoLine);
193
uint32_t link_GetHeightFromPib(struct crystalhd_dio_req *dio, PBC_PIC_INFO_BLOCK pPicInfoLine);
194
bool link_GetPictureInfo(struct crystalhd_hw *hw, uint32_t picHeight, uint32_t picWidth, struct crystalhd_dio_req *dio,
195
								uint32_t *PicNumber, uint64_t *PicMetaData);
196
uint32_t link_GetRptDropParam(struct crystalhd_hw *hw, uint32_t picHeight, uint32_t picWidth, void *pRxDMAReq);
197
bool crystalhd_link_peek_next_decoded_frame(struct crystalhd_hw *hw, uint64_t *meta_payload, uint32_t *picNumFlags, uint32_t PicWidth);
198
bool crystalhd_link_check_input_full(struct crystalhd_hw *hw, uint32_t needed_sz, uint32_t *empty_sz,
199
									 bool b_188_byte_pkts, uint8_t *flags);
200
bool crystalhd_link_tx_list0_handler(struct crystalhd_hw *hw, uint32_t err_sts);
201
bool crystalhd_link_tx_list1_handler(struct crystalhd_hw *hw, uint32_t err_sts);
202
void crystalhd_link_tx_isr(struct crystalhd_hw *hw, uint32_t int_sts);
203
void crystalhd_link_start_tx_dma_engine(struct crystalhd_hw *hw, uint8_t list_id, addr_64 desc_addr);
204
BC_STATUS crystalhd_link_stop_tx_dma_engine(struct crystalhd_hw *hw);
205
uint32_t crystalhd_link_get_pib_avail_cnt(struct crystalhd_hw *hw);
206
uint32_t crystalhd_link_get_addr_from_pib_Q(struct crystalhd_hw *hw);
207
bool crystalhd_link_rel_addr_to_pib_Q(struct crystalhd_hw *hw, uint32_t addr_to_rel);
208
void link_cpy_pib_to_app(struct C011_PIB *src_pib, BC_PIC_INFO_BLOCK *dst_pib);
209
void crystalhd_link_proc_pib(struct crystalhd_hw *hw);
210
void crystalhd_link_start_rx_dma_engine(struct crystalhd_hw *hw);
211
void crystalhd_link_stop_rx_dma_engine(struct crystalhd_hw *hw);
212
BC_STATUS crystalhd_link_hw_prog_rxdma(struct crystalhd_hw *hw, struct crystalhd_rx_dma_pkt *rx_pkt);
213
BC_STATUS crystalhd_link_hw_post_cap_buff(struct crystalhd_hw *hw, struct crystalhd_rx_dma_pkt *rx_pkt);
214
void crystalhd_link_get_dnsz(struct crystalhd_hw *hw, uint32_t list_index,
215
									uint32_t *y_dw_dnsz, uint32_t *uv_dw_dnsz);
216
void crystalhd_link_hw_finalize_pause(struct crystalhd_hw *hw);
217
bool crystalhd_link_rx_list0_handler(struct crystalhd_hw *hw,uint32_t int_sts,uint32_t y_err_sts,uint32_t uv_err_sts);
218
bool crystalhd_link_rx_list1_handler(struct crystalhd_hw *hw,uint32_t int_sts,uint32_t y_err_sts,uint32_t uv_err_sts);
219
void crystalhd_link_rx_isr(struct crystalhd_hw *hw, uint32_t intr_sts);
220
BC_STATUS crystalhd_link_hw_pause(struct crystalhd_hw *hw, bool state);
221
BC_STATUS crystalhd_link_fw_cmd_post_proc(struct crystalhd_hw *hw, BC_FW_CMD *fw_cmd);
222
BC_STATUS crystalhd_link_put_ddr2sleep(struct crystalhd_hw *hw);
223
BC_STATUS crystalhd_link_download_fw(struct crystalhd_hw* hw, uint8_t* buffer, uint32_t sz);
224
BC_STATUS crystalhd_link_do_fw_cmd(struct crystalhd_hw *hw, BC_FW_CMD *fw_cmd);
225
bool crystalhd_link_hw_interrupt_handle(struct crystalhd_adp *adp, struct crystalhd_hw *hw);
226
void crystalhd_link_notify_fll_change(struct crystalhd_hw *hw, bool bCleanupContext);
227
bool crystalhd_link_notify_event(struct crystalhd_hw *hw, enum BRCM_EVENT EventCode);
228
#endif
(-)crystalhd~/crystalhd_lnx.c (-200 / +281 lines)
Lines 15-32 Link Here
15
  along with this driver.  If not, see <http://www.gnu.org/licenses/>.
15
  along with this driver.  If not, see <http://www.gnu.org/licenses/>.
16
***************************************************************************/
16
***************************************************************************/
17
17
18
#include "crystalhd.h"
18
#include <linux/version.h>
19
19
20
#include <linux/mutex.h>
20
#include "crystalhd_lnx.h"
21
#include <linux/slab.h>
22
21
23
24
static DEFINE_MUTEX(chd_dec_mutex);
25
static struct class *crystalhd_class;
22
static struct class *crystalhd_class;
26
23
27
static struct crystalhd_adp *g_adp_info;
24
static struct crystalhd_adp *g_adp_info;
28
25
26
extern int bc_get_userhandle_count(struct crystalhd_cmd *ctx);
27
28
struct device *chddev(void)
29
{
30
	return &g_adp_info->pdev->dev;
31
}
32
33
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
34
loff_t noop_llseek(struct file *file, loff_t offset, int origin)
35
{
36
	return file->f_pos;
37
}
38
#endif
39
40
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 18)
29
static irqreturn_t chd_dec_isr(int irq, void *arg)
41
static irqreturn_t chd_dec_isr(int irq, void *arg)
42
#else
43
static irqreturn_t chd_dec_isr(int irq, void *arg, struct pt_regs *r)
44
#endif
30
{
45
{
31
	struct crystalhd_adp *adp = (struct crystalhd_adp *) arg;
46
	struct crystalhd_adp *adp = (struct crystalhd_adp *) arg;
32
	int rc = 0;
47
	int rc = 0;
Lines 41-60 static int chd_dec_enable_int(struct cry Link Here
41
	int rc = 0;
56
	int rc = 0;
42
57
43
	if (!adp || !adp->pdev) {
58
	if (!adp || !adp->pdev) {
44
		BCMLOG_ERR("Invalid arg!!\n");
59
		printk(KERN_ERR "%s: Invalid arg\n", __func__);
45
		return -EINVAL;
60
		return -EINVAL;
46
	}
61
	}
47
62
48
	if (adp->pdev->msi_enabled)
63
	rc = pci_enable_msi(adp->pdev);
49
		adp->msi = 1;
64
	if(rc != 0)
65
		dev_err(&adp->pdev->dev, "MSI request failed..\n");
50
	else
66
	else
51
		adp->msi = pci_enable_msi(adp->pdev);
67
		adp->msi = 1;
52
68
53
	rc = request_irq(adp->pdev->irq, chd_dec_isr, IRQF_SHARED,
69
	rc = request_irq(adp->pdev->irq, chd_dec_isr, IRQF_SHARED,
54
			 adp->name, (void *)adp);
70
			 adp->name, (void *)adp);
55
	if (rc) {
71
56
		BCMLOG_ERR("Interrupt request failed..\n");
72
	if (rc != 0) {
57
		pci_disable_msi(adp->pdev);
73
		dev_err(&adp->pdev->dev, "Interrupt request failed..\n");
74
		if(adp->msi) {
75
			pci_disable_msi(adp->pdev);
76
			adp->msi = 0;
77
		}
58
	}
78
	}
59
79
60
	return rc;
80
	return rc;
Lines 63-86 static int chd_dec_enable_int(struct cry Link Here
63
static int chd_dec_disable_int(struct crystalhd_adp *adp)
83
static int chd_dec_disable_int(struct crystalhd_adp *adp)
64
{
84
{
65
	if (!adp || !adp->pdev) {
85
	if (!adp || !adp->pdev) {
66
		BCMLOG_ERR("Invalid arg!!\n");
86
		printk(KERN_ERR "%s: Invalid arg\n", __func__);
67
		return -EINVAL;
87
		return -EINVAL;
68
	}
88
	}
69
89
70
	free_irq(adp->pdev->irq, adp);
90
	free_irq(adp->pdev->irq, adp);
71
91
72
	if (adp->msi)
92
	if (adp->msi) {
73
		pci_disable_msi(adp->pdev);
93
		pci_disable_msi(adp->pdev);
94
		adp->msi = 0;
95
	}
74
96
75
	return 0;
97
	return 0;
76
}
98
}
77
99
78
static struct
100
crystalhd_ioctl_data *chd_dec_alloc_iodata(struct crystalhd_adp *adp, bool isr)
79
crystalhd_ioctl_data *chd_dec_alloc_iodata(struct crystalhd_adp *adp,
80
					   bool isr)
81
{
101
{
82
	unsigned long flags = 0;
102
	unsigned long flags = 0;
83
	struct crystalhd_ioctl_data *temp;
103
	crystalhd_ioctl_data *temp;
84
104
85
	if (!adp)
105
	if (!adp)
86
		return NULL;
106
		return NULL;
Lines 97-104 crystalhd_ioctl_data *chd_dec_alloc_ioda Link Here
97
	return temp;
117
	return temp;
98
}
118
}
99
119
100
static void chd_dec_free_iodata(struct crystalhd_adp *adp,
120
void chd_dec_free_iodata(struct crystalhd_adp *adp, crystalhd_ioctl_data *iodata,
101
				struct crystalhd_ioctl_data *iodata, bool isr)
121
			 bool isr)
102
{
122
{
103
	unsigned long flags = 0;
123
	unsigned long flags = 0;
104
124
Lines 111-123 static void chd_dec_free_iodata(struct c Link Here
111
	spin_unlock_irqrestore(&adp->lock, flags);
131
	spin_unlock_irqrestore(&adp->lock, flags);
112
}
132
}
113
133
114
static inline int crystalhd_user_data(unsigned long ud, void *dr,
134
static inline int crystalhd_user_data(unsigned long ud, void *dr, int size, int set)
115
			 int size, int set)
116
{
135
{
117
	int rc;
136
	int rc;
118
137
119
	if (!ud || !dr) {
138
	if (!ud || !dr) {
120
		BCMLOG_ERR("Invalid arg\n");
139
		dev_err(chddev(), "%s: Invalid arg\n", __func__);
121
		return -EINVAL;
140
		return -EINVAL;
122
	}
141
	}
123
142
Lines 127-153 static inline int crystalhd_user_data(un Link Here
127
		rc = copy_from_user(dr, (void *)ud, size);
146
		rc = copy_from_user(dr, (void *)ud, size);
128
147
129
	if (rc) {
148
	if (rc) {
130
		BCMLOG_ERR("Invalid args for command\n");
149
		dev_err(chddev(), "Invalid args for command\n");
131
		rc = -EFAULT;
150
		rc = -EFAULT;
132
	}
151
	}
133
152
134
	return rc;
153
	return rc;
135
}
154
}
136
155
137
static int chd_dec_fetch_cdata(struct crystalhd_adp *adp,
156
static int chd_dec_fetch_cdata(struct crystalhd_adp *adp, crystalhd_ioctl_data *io,
138
	 struct crystalhd_ioctl_data *io, uint32_t m_sz, unsigned long ua)
157
			       uint32_t m_sz, unsigned long ua)
139
{
158
{
140
	unsigned long ua_off;
159
	unsigned long ua_off;
141
	int rc = 0;
160
	int rc = 0;
142
161
143
	if (!adp || !io || !ua || !m_sz) {
162
	if (!adp || !io || !ua || !m_sz) {
144
		BCMLOG_ERR("Invalid Arg!!\n");
163
		dev_err(chddev(), "Invalid Arg!!\n");
145
		return -EINVAL;
164
		return -EINVAL;
146
	}
165
	}
147
166
148
	io->add_cdata = vmalloc(m_sz);
167
	io->add_cdata = vmalloc(m_sz);
149
	if (!io->add_cdata) {
168
	if (!io->add_cdata) {
150
		BCMLOG_ERR("kalloc fail for sz:%x\n", m_sz);
169
		dev_err(chddev(), "kalloc fail for sz:%x\n", m_sz);
151
		return -ENOMEM;
170
		return -ENOMEM;
152
	}
171
	}
153
172
Lines 155-163 static int chd_dec_fetch_cdata(struct cr Link Here
155
	ua_off = ua + sizeof(io->udata);
174
	ua_off = ua + sizeof(io->udata);
156
	rc = crystalhd_user_data(ua_off, io->add_cdata, io->add_cdata_sz, 0);
175
	rc = crystalhd_user_data(ua_off, io->add_cdata, io->add_cdata_sz, 0);
157
	if (rc) {
176
	if (rc) {
158
		BCMLOG_ERR("failed to pull add_cdata sz:%x ua_off:%x\n",
177
		dev_err(chddev(), "failed to pull add_cdata sz:%x "
159
			   io->add_cdata_sz, (unsigned int)ua_off);
178
			"ua_off:%x\n", io->add_cdata_sz,
160
		vfree(io->add_cdata);
179
			(unsigned int)ua_off);
180
		kfree(io->add_cdata);
161
		io->add_cdata = NULL;
181
		io->add_cdata = NULL;
162
		return -ENODATA;
182
		return -ENODATA;
163
	}
183
	}
Lines 166-178 static int chd_dec_fetch_cdata(struct cr Link Here
166
}
186
}
167
187
168
static int chd_dec_release_cdata(struct crystalhd_adp *adp,
188
static int chd_dec_release_cdata(struct crystalhd_adp *adp,
169
			 struct crystalhd_ioctl_data *io, unsigned long ua)
189
				 crystalhd_ioctl_data *io, unsigned long ua)
170
{
190
{
171
	unsigned long ua_off;
191
	unsigned long ua_off;
172
	int rc;
192
	int rc;
173
193
174
	if (!adp || !io || !ua) {
194
	if (!adp || !io || !ua) {
175
		BCMLOG_ERR("Invalid Arg!!\n");
195
		dev_err(chddev(), "Invalid Arg!!\n");
176
		return -EINVAL;
196
		return -EINVAL;
177
	}
197
	}
178
198
Lines 181-189 static int chd_dec_release_cdata(struct Link Here
181
		rc = crystalhd_user_data(ua_off, io->add_cdata,
201
		rc = crystalhd_user_data(ua_off, io->add_cdata,
182
					io->add_cdata_sz, 1);
202
					io->add_cdata_sz, 1);
183
		if (rc) {
203
		if (rc) {
184
			BCMLOG_ERR(
204
			dev_err(chddev(), "failed to push add_cdata sz:%x "
185
				"failed to push add_cdata sz:%x ua_off:%x\n",
205
				"ua_off:%x\n", io->add_cdata_sz,
186
				 io->add_cdata_sz, (unsigned int)ua_off);
206
				(unsigned int)ua_off);
187
			return -ENODATA;
207
			return -ENODATA;
188
		}
208
		}
189
	}
209
	}
Lines 197-216 static int chd_dec_release_cdata(struct Link Here
197
}
217
}
198
218
199
static int chd_dec_proc_user_data(struct crystalhd_adp *adp,
219
static int chd_dec_proc_user_data(struct crystalhd_adp *adp,
200
				  struct crystalhd_ioctl_data *io,
220
				  crystalhd_ioctl_data *io,
201
				  unsigned long ua, int set)
221
				  unsigned long ua, int set)
202
{
222
{
203
	int rc;
223
	int rc;
204
	uint32_t m_sz = 0;
224
	uint32_t m_sz = 0;
205
225
206
	if (!adp || !io || !ua) {
226
	if (!adp || !io || !ua) {
207
		BCMLOG_ERR("Invalid Arg!!\n");
227
		dev_err(chddev(), "Invalid Arg!!\n");
208
		return -EINVAL;
228
		return -EINVAL;
209
	}
229
	}
210
230
211
	rc = crystalhd_user_data(ua, &io->udata, sizeof(io->udata), set);
231
	rc = crystalhd_user_data(ua, &io->udata, sizeof(io->udata), set);
212
	if (rc) {
232
	if (rc) {
213
		BCMLOG_ERR("failed to %s iodata\n", (set ? "set" : "get"));
233
		dev_err(chddev(), "failed to %s iodata\n",
234
			(set ? "set" : "get"));
214
		return rc;
235
		return rc;
215
	}
236
	}
216
237
Lines 235-246 static int chd_dec_api_cmd(struct crysta Link Here
235
			   uint32_t uid, uint32_t cmd, crystalhd_cmd_proc func)
256
			   uint32_t uid, uint32_t cmd, crystalhd_cmd_proc func)
236
{
257
{
237
	int rc;
258
	int rc;
238
	struct crystalhd_ioctl_data *temp;
259
	crystalhd_ioctl_data *temp;
239
	enum BC_STATUS sts = BC_STS_SUCCESS;
260
	BC_STATUS sts = BC_STS_SUCCESS;
240
261
241
	temp = chd_dec_alloc_iodata(adp, 0);
262
	temp = chd_dec_alloc_iodata(adp, 0);
242
	if (!temp) {
263
	if (!temp) {
243
		BCMLOG_ERR("Failed to get iodata..\n");
264
		dev_err(chddev(), "Failed to get iodata..\n");
244
		return -EINVAL;
265
		return -EINVAL;
245
	}
266
	}
246
267
Lines 249-324 static int chd_dec_api_cmd(struct crysta Link Here
249
270
250
	rc = chd_dec_proc_user_data(adp, temp, ua, 0);
271
	rc = chd_dec_proc_user_data(adp, temp, ua, 0);
251
	if (!rc) {
272
	if (!rc) {
252
		sts = func(&adp->cmds, temp);
273
		if(func == NULL)
274
			sts = BC_STS_PWR_MGMT; /* Can only happen when we are in suspend state */
275
		else
276
			sts = func(&adp->cmds, temp);
253
		if (sts == BC_STS_PENDING)
277
		if (sts == BC_STS_PENDING)
254
			sts = BC_STS_NOT_IMPL;
278
			sts = BC_STS_NOT_IMPL;
255
		temp->udata.RetSts = sts;
279
		temp->udata.RetSts = sts;
256
		rc = chd_dec_proc_user_data(adp, temp, ua, 1);
280
		rc = chd_dec_proc_user_data(adp, temp, ua, 1);
257
	}
281
	}
258
282
259
	chd_dec_free_iodata(adp, temp, 0);
283
	if (temp) {
284
		chd_dec_free_iodata(adp, temp, 0);
285
		temp = NULL;
286
	}
260
287
261
	return rc;
288
	return rc;
262
}
289
}
263
290
264
/* API interfaces */
291
/* API interfaces */
265
static long chd_dec_ioctl(struct file *fd, unsigned int cmd, unsigned long ua)
292
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
293
static int chd_dec_ioctl(struct inode *in, struct file *fd,
294
			 unsigned int cmd, unsigned long ua)
295
#else
296
static long chd_dec_ioctl(struct file *fd,
297
			  unsigned int cmd, unsigned long ua)
298
#endif
266
{
299
{
267
	struct crystalhd_adp *adp = chd_get_adp();
300
	struct crystalhd_adp *adp = chd_get_adp();
301
	struct device *dev = &adp->pdev->dev;
268
	crystalhd_cmd_proc cproc;
302
	crystalhd_cmd_proc cproc;
269
	struct crystalhd_user *uc;
303
	struct crystalhd_user *uc;
270
	int ret;
304
305
	dev_dbg(dev, "Entering %s\n", __func__);
271
306
272
	if (!adp || !fd) {
307
	if (!adp || !fd) {
273
		BCMLOG_ERR("Invalid adp\n");
308
		dev_err(chddev(), "Invalid adp\n");
274
		return -EINVAL;
309
		return -EINVAL;
275
	}
310
	}
276
311
277
	uc = fd->private_data;
312
	uc = fd->private_data;
278
	if (!uc) {
313
	if (!uc) {
279
		BCMLOG_ERR("Failed to get uc\n");
314
		dev_err(chddev(), "Failed to get uc\n");
280
		return -ENODATA;
315
		return -ENODATA;
281
	}
316
	}
282
317
283
	mutex_lock(&chd_dec_mutex);
284
	cproc = crystalhd_get_cmd_proc(&adp->cmds, cmd, uc);
318
	cproc = crystalhd_get_cmd_proc(&adp->cmds, cmd, uc);
285
	if (!cproc) {
319
	if (!cproc && !(adp->cmds.state & BC_LINK_SUSPEND)) {
286
		BCMLOG_ERR("Unhandled command: %d\n", cmd);
320
		dev_err(chddev(), "Unhandled command: %d\n", cmd);
287
		mutex_unlock(&chd_dec_mutex);
288
		return -EINVAL;
321
		return -EINVAL;
289
	}
322
	}
290
323
291
	ret = chd_dec_api_cmd(adp, ua, uc->uid, cmd, cproc);
324
	return chd_dec_api_cmd(adp, ua, uc->uid, cmd, cproc);
292
	mutex_unlock(&chd_dec_mutex);
293
	return ret;
294
}
325
}
295
326
296
static int chd_dec_open(struct inode *in, struct file *fd)
327
static int chd_dec_open(struct inode *in, struct file *fd)
297
{
328
{
298
	struct crystalhd_adp *adp = chd_get_adp();
329
	struct crystalhd_adp *adp = chd_get_adp();
330
	struct device *dev = &adp->pdev->dev;
299
	int rc = 0;
331
	int rc = 0;
300
	enum BC_STATUS sts = BC_STS_SUCCESS;
332
	BC_STATUS sts = BC_STS_SUCCESS;
301
	struct crystalhd_user *uc = NULL;
333
	struct crystalhd_user *uc = NULL;
302
334
335
	dev_dbg(dev, "Entering %s\n", __func__);
303
	if (!adp) {
336
	if (!adp) {
304
		BCMLOG_ERR("Invalid adp\n");
337
		dev_err(dev, "Invalid adp\n");
305
		return -EINVAL;
338
		return -EINVAL;
306
	}
339
	}
307
340
308
	if (adp->cfg_users >= BC_LINK_MAX_OPENS) {
341
	if (adp->cfg_users >= BC_LINK_MAX_OPENS) {
309
		BCMLOG(BCMLOG_INFO, "Already in use.%d\n", adp->cfg_users);
342
		dev_info(dev, "Already in use.%d\n", adp->cfg_users);
310
		return -EBUSY;
343
		return -EBUSY;
311
	}
344
	}
312
345
313
	sts = crystalhd_user_open(&adp->cmds, &uc);
346
	sts = crystalhd_user_open(&adp->cmds, &uc);
314
	if (sts != BC_STS_SUCCESS) {
347
	if (sts != BC_STS_SUCCESS) {
315
		BCMLOG_ERR("cmd_user_open - %d\n", sts);
348
		dev_err(dev, "cmd_user_open - %d\n", sts);
316
		rc = -EBUSY;
349
		rc = -EBUSY;
317
	}
350
	}
318
351
	else {
319
	adp->cfg_users++;
352
		adp->cfg_users++;
320
353
		fd->private_data = uc;
321
	fd->private_data = uc;
354
	}
322
355
323
	return rc;
356
	return rc;
324
}
357
}
Lines 326-363 static int chd_dec_open(struct inode *in Link Here
326
static int chd_dec_close(struct inode *in, struct file *fd)
359
static int chd_dec_close(struct inode *in, struct file *fd)
327
{
360
{
328
	struct crystalhd_adp *adp = chd_get_adp();
361
	struct crystalhd_adp *adp = chd_get_adp();
362
	struct device *dev = &adp->pdev->dev;
363
	struct crystalhd_cmd *ctx = &adp->cmds;
329
	struct crystalhd_user *uc;
364
	struct crystalhd_user *uc;
365
	uint32_t mode;
330
366
367
	dev_dbg(dev, "Entering %s\n", __func__);
331
	if (!adp) {
368
	if (!adp) {
332
		BCMLOG_ERR("Invalid adp\n");
369
		dev_err(dev, "Invalid adp\n");
333
		return -EINVAL;
370
		return -EINVAL;
334
	}
371
	}
335
372
336
	uc = fd->private_data;
373
	uc = fd->private_data;
337
	if (!uc) {
374
	if (!uc) {
338
		BCMLOG_ERR("Failed to get uc\n");
375
		dev_err(dev, "Failed to get uc\n");
339
		return -ENODATA;
376
		return -ENODATA;
340
	}
377
	}
341
378
342
	crystalhd_user_close(&adp->cmds, uc);
379
	/* Check and close only if we have not flush/closed before */
380
	/* This is needed because release is not guarenteed to be called immediately on close,
381
	 * if duplicate file handles exist due to fork etc. This causes problems with close and re-open
382
	 of the device immediately */
383
384
	if(uc->in_use) {
385
		mode = uc->mode;
386
387
		ctx->user[uc->uid].mode = DTS_MODE_INV;
388
		ctx->user[uc->uid].in_use = 0;
389
390
		dev_info(chddev(), "Closing user[%x] handle with mode %x\n", uc->uid, mode);
391
392
		if (((mode & 0xFF) == DTS_DIAG_MODE) ||
393
			((mode & 0xFF) == DTS_PLAYBACK_MODE) ||
394
			((bc_get_userhandle_count(ctx) == 0) && (ctx->hw_ctx != NULL))) {
395
			ctx->cin_wait_exit = 1;
396
			ctx->pwr_state_change = BC_HW_RUNNING;
397
			/* Stop the HW Capture just in case flush did not get called before stop */
398
			/* And only if we had actually started it */
399
			if(ctx->hw_ctx->rx_freeq != NULL) {
400
				crystalhd_hw_stop_capture(ctx->hw_ctx, true);
401
				crystalhd_hw_free_dma_rings(ctx->hw_ctx);
402
			}
403
			if(ctx->adp->fill_byte_pool)
404
				crystalhd_destroy_dio_pool(ctx->adp);
405
			if(ctx->adp->elem_pool_head)
406
				crystalhd_delete_elem_pool(ctx->adp);
407
			ctx->state = BC_LINK_INVALID;
408
			crystalhd_hw_close(ctx->hw_ctx, ctx->adp);
409
			kfree(ctx->hw_ctx);
410
			ctx->hw_ctx = NULL;
411
		}
343
412
344
	adp->cfg_users--;
413
		uc->in_use = 0;
414
415
		if(adp->cfg_users > 0)
416
			adp->cfg_users--;
417
	}
345
418
346
	return 0;
419
	return 0;
347
}
420
}
348
421
349
static const struct file_operations chd_dec_fops = {
422
static const struct file_operations chd_dec_fops = {
350
	.owner   = THIS_MODULE,
423
	.owner		= THIS_MODULE,
351
	.unlocked_ioctl = chd_dec_ioctl,
424
#if LINUX_VERSION_CODE < KERNEL_VERSION(2, 6, 35)
352
	.open    = chd_dec_open,
425
	.ioctl		= chd_dec_ioctl,
353
	.release = chd_dec_close,
426
#else
354
	.llseek = noop_llseek,
427
	.unlocked_ioctl	= chd_dec_ioctl,
428
#endif
429
	.open		= chd_dec_open,
430
	.release	= chd_dec_close,
431
	.llseek		= noop_llseek,
355
};
432
};
356
433
357
static int chd_dec_init_chdev(struct crystalhd_adp *adp)
434
static int chd_dec_init_chdev(struct crystalhd_adp *adp)
358
{
435
{
359
	struct crystalhd_ioctl_data *temp;
436
	struct device *xdev = &adp->pdev->dev;
360
	struct device *dev;
437
	struct device *dev;
438
	crystalhd_ioctl_data *temp;
361
	int rc = -ENODEV, i = 0;
439
	int rc = -ENODEV, i = 0;
362
440
363
	if (!adp)
441
	if (!adp)
Lines 366-372 static int chd_dec_init_chdev(struct cry Link Here
366
	adp->chd_dec_major = register_chrdev(0, CRYSTALHD_API_NAME,
444
	adp->chd_dec_major = register_chrdev(0, CRYSTALHD_API_NAME,
367
					     &chd_dec_fops);
445
					     &chd_dec_fops);
368
	if (adp->chd_dec_major < 0) {
446
	if (adp->chd_dec_major < 0) {
369
		BCMLOG_ERR("Failed to create config dev\n");
447
		dev_err(xdev, "Failed to create config dev\n");
370
		rc = adp->chd_dec_major;
448
		rc = adp->chd_dec_major;
371
		goto fail;
449
		goto fail;
372
	}
450
	}
Lines 374-404 static int chd_dec_init_chdev(struct cry Link Here
374
	/* register crystalhd class */
452
	/* register crystalhd class */
375
	crystalhd_class = class_create(THIS_MODULE, "crystalhd");
453
	crystalhd_class = class_create(THIS_MODULE, "crystalhd");
376
	if (IS_ERR(crystalhd_class)) {
454
	if (IS_ERR(crystalhd_class)) {
377
		rc = PTR_ERR(crystalhd_class);
455
		dev_err(xdev, "failed to create class\n");
378
		BCMLOG_ERR("failed to create class\n");
456
		goto fail;
379
		goto class_create_fail;
380
	}
457
	}
381
458
382
	dev = device_create(crystalhd_class, NULL,
459
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 25)
383
			 MKDEV(adp->chd_dec_major, 0), NULL, "crystalhd");
460
	dev = device_create(crystalhd_class, NULL, MKDEV(adp->chd_dec_major, 0),
461
			    NULL, "crystalhd");
462
#else
463
	dev = device_create(crystalhd_class, NULL, MKDEV(adp->chd_dec_major, 0),
464
			    "crystalhd");
465
#endif
384
	if (IS_ERR(dev)) {
466
	if (IS_ERR(dev)) {
385
		rc = PTR_ERR(dev);
467
		dev_err(xdev, "failed to create device\n");
386
		BCMLOG_ERR("failed to create device\n");
387
		goto device_create_fail;
468
		goto device_create_fail;
388
	}
469
	}
389
470
390
	rc = crystalhd_create_elem_pool(adp, BC_LINK_ELEM_POOL_SZ);
471
/*	rc = crystalhd_create_elem_pool(adp, BC_LINK_ELEM_POOL_SZ); */
391
	if (rc) {
472
/*	if (rc) { */
392
		BCMLOG_ERR("failed to create device\n");
473
/*		dev_err(xdev, "failed to create device\n"); */
393
		goto elem_pool_fail;
474
/*		goto elem_pool_fail; */
394
	}
475
/*	} */
395
476
396
	/* Allocate general purpose ioctl pool. */
477
	/* Allocate general purpose ioctl pool. */
397
	for (i = 0; i < CHD_IODATA_POOL_SZ; i++) {
478
	for (i = 0; i < CHD_IODATA_POOL_SZ; i++) {
398
		temp = kzalloc(sizeof(struct crystalhd_ioctl_data),
479
		temp = kzalloc(sizeof(crystalhd_ioctl_data), GFP_KERNEL);
399
					 GFP_KERNEL);
400
		if (!temp) {
480
		if (!temp) {
401
			BCMLOG_ERR("ioctl data pool kzalloc failed\n");
481
			dev_err(xdev, "ioctl data pool kzalloc failed\n");
402
			rc = -ENOMEM;
482
			rc = -ENOMEM;
403
			goto kzalloc_fail;
483
			goto kzalloc_fail;
404
		}
484
		}
Lines 409-428 static int chd_dec_init_chdev(struct cry Link Here
409
	return 0;
489
	return 0;
410
490
411
kzalloc_fail:
491
kzalloc_fail:
412
	crystalhd_delete_elem_pool(adp);
492
	/*crystalhd_delete_elem_pool(adp); */
413
elem_pool_fail:
493
/*elem_pool_fail: */
414
	device_destroy(crystalhd_class, MKDEV(adp->chd_dec_major, 0));
494
	device_destroy(crystalhd_class, MKDEV(adp->chd_dec_major, 0));
415
device_create_fail:
495
device_create_fail:
416
	class_destroy(crystalhd_class);
496
	class_destroy(crystalhd_class);
417
class_create_fail:
418
	unregister_chrdev(adp->chd_dec_major, CRYSTALHD_API_NAME);
419
fail:
497
fail:
420
	return rc;
498
	return rc;
421
}
499
}
422
500
423
static void chd_dec_release_chdev(struct crystalhd_adp *adp)
501
static void chd_dec_release_chdev(struct crystalhd_adp *adp)
424
{
502
{
425
	struct crystalhd_ioctl_data *temp = NULL;
503
	crystalhd_ioctl_data *temp = NULL;
426
	if (!adp)
504
	if (!adp)
427
		return;
505
		return;
428
506
Lines 430-436 static void chd_dec_release_chdev(struct Link Here
430
		/* unregister crystalhd class */
508
		/* unregister crystalhd class */
431
		device_destroy(crystalhd_class, MKDEV(adp->chd_dec_major, 0));
509
		device_destroy(crystalhd_class, MKDEV(adp->chd_dec_major, 0));
432
		unregister_chrdev(adp->chd_dec_major, CRYSTALHD_API_NAME);
510
		unregister_chrdev(adp->chd_dec_major, CRYSTALHD_API_NAME);
433
		BCMLOG(BCMLOG_INFO, "released api device - %d\n",
511
		dev_info(chddev(), "released api device - %d\n",
434
		       adp->chd_dec_major);
512
		       adp->chd_dec_major);
435
		class_destroy(crystalhd_class);
513
		class_destroy(crystalhd_class);
436
	}
514
	}
Lines 442-499 static void chd_dec_release_chdev(struct Link Here
442
		kfree(temp);
520
		kfree(temp);
443
	} while (temp);
521
	} while (temp);
444
522
445
	crystalhd_delete_elem_pool(adp);
523
	/*crystalhd_delete_elem_pool(adp); */
446
}
524
}
447
525
448
static int chd_pci_reserve_mem(struct crystalhd_adp *pinfo)
526
static int chd_pci_reserve_mem(struct crystalhd_adp *pinfo)
449
{
527
{
528
	struct device *dev = &pinfo->pdev->dev;
450
	int rc;
529
	int rc;
451
	unsigned long bar2 = pci_resource_start(pinfo->pdev, 2);
452
	uint32_t mem_len   = pci_resource_len(pinfo->pdev, 2);
453
	unsigned long bar0 = pci_resource_start(pinfo->pdev, 0);
454
	uint32_t i2o_len   = pci_resource_len(pinfo->pdev, 0);
455
530
456
	BCMLOG(BCMLOG_SSTEP, "bar2:0x%lx-0x%08x  bar0:0x%lx-0x%08x\n",
531
	uint32_t bar0		= pci_resource_start(pinfo->pdev, 0);
457
	       bar2, mem_len, bar0, i2o_len);
532
	uint32_t i2o_len	= pci_resource_len(pinfo->pdev, 0);
458
533
459
	rc = check_mem_region(bar2, mem_len);
534
	uint32_t bar2		= pci_resource_start(pinfo->pdev, 2);
535
	uint32_t mem_len	= pci_resource_len(pinfo->pdev, 2);
536
537
	dev_dbg(dev, "bar0:0x%x-0x%08x  bar2:0x%x-0x%08x\n",
538
	        bar0, i2o_len, bar2, mem_len);
539
540
	/* bar-0 */
541
	rc = check_mem_region(bar0, i2o_len);
460
	if (rc) {
542
	if (rc) {
461
		BCMLOG_ERR("No valid mem region...\n");
543
		printk(KERN_ERR "No valid mem region...\n");
462
		return -ENOMEM;
544
		return -ENOMEM;
463
	}
545
	}
464
546
465
	pinfo->addr = ioremap_nocache(bar2, mem_len);
547
	pinfo->i2o_addr = ioremap_nocache(bar0, i2o_len);
466
	if (!pinfo->addr) {
548
	if (!pinfo->i2o_addr) {
467
		BCMLOG_ERR("Failed to remap mem region...\n");
549
		printk(KERN_ERR "Failed to remap i2o region...\n");
468
		return -ENOMEM;
550
		return -ENOMEM;
469
	}
551
	}
470
552
471
	pinfo->pci_mem_start = bar2;
553
	pinfo->pci_i2o_start = bar0;
472
	pinfo->pci_mem_len   = mem_len;
554
	pinfo->pci_i2o_len   = i2o_len;
473
555
474
	rc = check_mem_region(bar0, i2o_len);
556
	/* bar-2 */
557
	rc = check_mem_region(bar2, mem_len);
475
	if (rc) {
558
	if (rc) {
476
		BCMLOG_ERR("No valid mem region...\n");
559
		printk(KERN_ERR "No valid mem region...\n");
477
		return -ENOMEM;
560
		return -ENOMEM;
478
	}
561
	}
479
562
480
	pinfo->i2o_addr = ioremap_nocache(bar0, i2o_len);
563
	pinfo->mem_addr = ioremap_nocache(bar2, mem_len);
481
	if (!pinfo->i2o_addr) {
564
	if (!pinfo->mem_addr) {
482
		BCMLOG_ERR("Failed to remap mem region...\n");
565
		printk(KERN_ERR "Failed to remap mem region...\n");
483
		return -ENOMEM;
566
		return -ENOMEM;
484
	}
567
	}
485
568
486
	pinfo->pci_i2o_start = bar0;
569
	pinfo->pci_mem_start = bar2;
487
	pinfo->pci_i2o_len   = i2o_len;
570
	pinfo->pci_mem_len   = mem_len;
488
571
572
	/* pdev */
489
	rc = pci_request_regions(pinfo->pdev, pinfo->name);
573
	rc = pci_request_regions(pinfo->pdev, pinfo->name);
490
	if (rc < 0) {
574
	if (rc < 0) {
491
		BCMLOG_ERR("Region request failed: %d\n", rc);
575
		printk(KERN_ERR "Region request failed: %d\n", rc);
492
		return rc;
576
		return rc;
493
	}
577
	}
494
578
495
	BCMLOG(BCMLOG_SSTEP, "Mapped addr:0x%08lx  i2o_addr:0x%08lx\n",
579
	dev_dbg(dev, "i2o_addr:0x%08lx   Mapped addr:0x%08lx  \n",
496
	       (unsigned long)pinfo->addr, (unsigned long)pinfo->i2o_addr);
580
	        (unsigned long)pinfo->i2o_addr, (unsigned long)pinfo->mem_addr);
497
581
498
	return 0;
582
	return 0;
499
}
583
}
Lines 503-510 static void chd_pci_release_mem(struct c Link Here
503
	if (!pinfo)
587
	if (!pinfo)
504
		return;
588
		return;
505
589
506
	if (pinfo->addr)
590
	if (pinfo->mem_addr)
507
		iounmap(pinfo->addr);
591
		iounmap(pinfo->mem_addr);
508
592
509
	if (pinfo->i2o_addr)
593
	if (pinfo->i2o_addr)
510
		iounmap(pinfo->i2o_addr);
594
		iounmap(pinfo->i2o_addr);
Lines 516-532 static void chd_pci_release_mem(struct c Link Here
516
static void chd_dec_pci_remove(struct pci_dev *pdev)
600
static void chd_dec_pci_remove(struct pci_dev *pdev)
517
{
601
{
518
	struct crystalhd_adp *pinfo;
602
	struct crystalhd_adp *pinfo;
519
	enum BC_STATUS sts = BC_STS_SUCCESS;
603
	BC_STATUS sts = BC_STS_SUCCESS;
520
604
521
	pinfo = pci_get_drvdata(pdev);
605
	dev_dbg(chddev(), "Entering %s\n", __func__);
606
607
	pinfo = (struct crystalhd_adp *) pci_get_drvdata(pdev);
522
	if (!pinfo) {
608
	if (!pinfo) {
523
		BCMLOG_ERR("could not get adp\n");
609
		dev_err(chddev(), "could not get adp\n");
524
		return;
610
		return;
525
	}
611
	}
526
612
527
	sts = crystalhd_delete_cmd_context(&pinfo->cmds);
613
	sts = crystalhd_delete_cmd_context(&pinfo->cmds);
528
	if (sts != BC_STS_SUCCESS)
614
	if (sts != BC_STS_SUCCESS)
529
		BCMLOG_ERR("cmd delete :%d\n", sts);
615
		dev_err(chddev(), "cmd delete :%d\n", sts);
530
616
531
	chd_dec_release_chdev(pinfo);
617
	chd_dec_release_chdev(pinfo);
532
618
Lines 542-567 static void chd_dec_pci_remove(struct pc Link Here
542
static int chd_dec_pci_probe(struct pci_dev *pdev,
628
static int chd_dec_pci_probe(struct pci_dev *pdev,
543
			     const struct pci_device_id *entry)
629
			     const struct pci_device_id *entry)
544
{
630
{
631
	struct device *dev = &pdev->dev;
545
	struct crystalhd_adp *pinfo;
632
	struct crystalhd_adp *pinfo;
546
	int rc;
633
	int rc;
547
	enum BC_STATUS sts = BC_STS_SUCCESS;
634
	BC_STATUS sts = BC_STS_SUCCESS;
548
635
549
	BCMLOG(BCMLOG_DBG, "PCI_INFO: Vendor:0x%04x Device:0x%04x s_vendor:0x%04x s_device: 0x%04x\n",
636
	dev_info(dev, "Starting Device:0x%04x\n", pdev->device);
550
	       pdev->vendor, pdev->device, pdev->subsystem_vendor,
551
	       pdev->subsystem_device);
552
637
553
	pinfo = kzalloc(sizeof(struct crystalhd_adp), GFP_KERNEL);
638
	pinfo = kzalloc(sizeof(struct crystalhd_adp), GFP_KERNEL);
554
	if (!pinfo) {
639
	if (!pinfo) {
555
		BCMLOG_ERR("Failed to allocate memory\n");
640
		dev_err(dev, "%s: Failed to allocate memory\n", __func__);
556
		return -ENOMEM;
641
		rc = -ENOMEM;
642
		goto out;
557
	}
643
	}
558
644
559
	pinfo->pdev = pdev;
645
	pinfo->pdev = pdev;
560
646
561
	rc = pci_enable_device(pdev);
647
	rc = pci_enable_device(pdev);
562
	if (rc) {
648
	if (rc) {
563
		BCMLOG_ERR("Failed to enable PCI device\n");
649
		dev_err(dev, "%s: Failed to enable PCI device\n", __func__);
564
		goto err;
650
		goto free_priv;
565
	}
651
	}
566
652
567
	snprintf(pinfo->name, sizeof(pinfo->name), "crystalhd_pci_e:%d:%d:%d",
653
	snprintf(pinfo->name, sizeof(pinfo->name), "crystalhd_pci_e:%d:%d:%d",
Lines 570-579 static int chd_dec_pci_probe(struct pci_ Link Here
570
656
571
	rc = chd_pci_reserve_mem(pinfo);
657
	rc = chd_pci_reserve_mem(pinfo);
572
	if (rc) {
658
	if (rc) {
573
		BCMLOG_ERR("Failed to setup memory regions.\n");
659
		dev_err(dev, "%s: Failed to set up memory regions.\n",
574
		pci_disable_device(pdev);
660
			__func__);
575
		rc = -ENOMEM;
661
		goto disable_device;
576
		goto err;
577
	}
662
	}
578
663
579
	pinfo->present	= 1;
664
	pinfo->present	= 1;
Lines 583-595 static int chd_dec_pci_probe(struct pci_ Link Here
583
	spin_lock_init(&pinfo->lock);
668
	spin_lock_init(&pinfo->lock);
584
669
585
	/* setup api stuff.. */
670
	/* setup api stuff.. */
586
	chd_dec_init_chdev(pinfo);
671
	rc = chd_dec_init_chdev(pinfo);
672
	if (rc)
673
		goto release_mem;
674
587
	rc = chd_dec_enable_int(pinfo);
675
	rc = chd_dec_enable_int(pinfo);
588
	if (rc) {
676
	if (rc) {
589
		BCMLOG_ERR("_enable_int err:%d\n", rc);
677
		dev_err(dev, "%s: _enable_int err:%d\n", __func__, rc);
590
		pci_disable_device(pdev);
678
		goto cleanup_chdev;
591
		rc = -ENODEV;
592
		goto err;
593
	}
679
	}
594
680
595
	/* Set dma mask... */
681
	/* Set dma mask... */
Lines 600-617 static int chd_dec_pci_probe(struct pci_ Link Here
600
		pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
686
		pci_set_consistent_dma_mask(pdev, DMA_BIT_MASK(32));
601
		pinfo->dmabits = 32;
687
		pinfo->dmabits = 32;
602
	} else {
688
	} else {
603
		BCMLOG_ERR("Unabled to setup DMA %d\n", rc);
689
		dev_err(dev, "%s: Unabled to setup DMA %d\n", __func__, rc);
604
		pci_disable_device(pdev);
605
		rc = -ENODEV;
690
		rc = -ENODEV;
606
		goto err;
691
		goto cleanup_int;
607
	}
692
	}
608
693
609
	sts = crystalhd_setup_cmd_context(&pinfo->cmds, pinfo);
694
	sts = crystalhd_setup_cmd_context(&pinfo->cmds, pinfo);
610
	if (sts != BC_STS_SUCCESS) {
695
	if (sts != BC_STS_SUCCESS) {
611
		BCMLOG_ERR("cmd setup :%d\n", sts);
696
		dev_err(dev, "%s: cmd setup :%d\n", __func__, sts);
612
		pci_disable_device(pdev);
613
		rc = -ENODEV;
697
		rc = -ENODEV;
614
		goto err;
698
		goto cleanup_int;
615
	}
699
	}
616
700
617
	pci_set_master(pdev);
701
	pci_set_master(pdev);
Lines 620-654 static int chd_dec_pci_probe(struct pci_ Link Here
620
704
621
	g_adp_info = pinfo;
705
	g_adp_info = pinfo;
622
706
623
	return 0;
707
out:
624
625
err:
626
	kfree(pinfo);
627
	return rc;
708
	return rc;
709
cleanup_int:
710
	chd_dec_disable_int(pinfo);
711
cleanup_chdev:
712
	chd_dec_release_chdev(pinfo);
713
release_mem:
714
	chd_pci_release_mem(pinfo);
715
disable_device:
716
	pci_disable_device(pdev);
717
free_priv:
718
	kfree(pdev);
719
	goto out;
628
}
720
}
629
721
630
#ifdef CONFIG_PM
722
int chd_dec_pci_suspend(struct pci_dev *pdev, pm_message_t state)
631
static int chd_dec_pci_suspend(struct pci_dev *pdev, pm_message_t state)
632
{
723
{
633
	struct crystalhd_adp *adp;
724
	struct crystalhd_adp *adp;
634
	struct crystalhd_ioctl_data *temp;
725
	struct device *dev = &pdev->dev;
635
	enum BC_STATUS sts = BC_STS_SUCCESS;
726
	crystalhd_ioctl_data *temp;
727
	BC_STATUS sts = BC_STS_SUCCESS;
636
728
637
	adp = pci_get_drvdata(pdev);
729
	adp = (struct crystalhd_adp *)pci_get_drvdata(pdev);
638
	if (!adp) {
730
	if (!adp) {
639
		BCMLOG_ERR("could not get adp\n");
731
		dev_err(dev, "%s: could not get adp\n", __func__);
640
		return -ENODEV;
732
		return -ENODEV;
641
	}
733
	}
642
734
643
	temp = chd_dec_alloc_iodata(adp, false);
735
	temp = chd_dec_alloc_iodata(adp, false);
644
	if (!temp) {
736
	if (!temp) {
645
		BCMLOG_ERR("could not get ioctl data\n");
737
		dev_err(dev, "could not get ioctl data\n");
646
		return -ENODEV;
738
		return -ENODEV;
647
	}
739
	}
648
740
649
	sts = crystalhd_suspend(&adp->cmds, temp);
741
	sts = crystalhd_suspend(&adp->cmds, temp);
650
	if (sts != BC_STS_SUCCESS) {
742
	if (sts != BC_STS_SUCCESS) {
651
		BCMLOG_ERR("BCM70012 Suspend %d\n", sts);
743
		dev_err(dev, "Crystal HD Suspend %d\n", sts);
744
		chd_dec_free_iodata(adp, temp, false);
652
		return -ENODEV;
745
		return -ENODEV;
653
	}
746
	}
654
747
Lines 662-676 static int chd_dec_pci_suspend(struct pc Link Here
662
	return 0;
755
	return 0;
663
}
756
}
664
757
665
static int chd_dec_pci_resume(struct pci_dev *pdev)
758
int chd_dec_pci_resume(struct pci_dev *pdev)
666
{
759
{
667
	struct crystalhd_adp *adp;
760
	struct crystalhd_adp *adp;
668
	enum BC_STATUS sts = BC_STS_SUCCESS;
761
	struct device *dev = &pdev->dev;
762
	BC_STATUS sts = BC_STS_SUCCESS;
669
	int rc;
763
	int rc;
670
764
671
	adp = pci_get_drvdata(pdev);
765
	adp = (struct crystalhd_adp *)pci_get_drvdata(pdev);
672
	if (!adp) {
766
	if (!adp) {
673
		BCMLOG_ERR("could not get adp\n");
767
		dev_err(dev, "%s: could not get adp\n", __func__);
674
		return -ENODEV;
768
		return -ENODEV;
675
	}
769
	}
676
770
Lines 679-685 static int chd_dec_pci_resume(struct pci Link Here
679
773
680
	/* device's irq possibly is changed, driver should take care */
774
	/* device's irq possibly is changed, driver should take care */
681
	if (pci_enable_device(pdev)) {
775
	if (pci_enable_device(pdev)) {
682
		BCMLOG_ERR("Failed to enable PCI device\n");
776
		dev_err(dev, "Failed to enable PCI device\n");
683
		return 1;
777
		return 1;
684
	}
778
	}
685
779
Lines 687-745 static int chd_dec_pci_resume(struct pci Link Here
687
781
688
	rc = chd_dec_enable_int(adp);
782
	rc = chd_dec_enable_int(adp);
689
	if (rc) {
783
	if (rc) {
690
		BCMLOG_ERR("_enable_int err:%d\n", rc);
784
		dev_err(dev, "_enable_int err:%d\n", rc);
691
		pci_disable_device(pdev);
785
		pci_disable_device(pdev);
692
		return -ENODEV;
786
		return -ENODEV;
693
	}
787
	}
694
788
695
	sts = crystalhd_resume(&adp->cmds);
789
	sts = crystalhd_resume(&adp->cmds);
696
	if (sts != BC_STS_SUCCESS) {
790
	if (sts != BC_STS_SUCCESS) {
697
		BCMLOG_ERR("BCM70012 Resume %d\n", sts);
791
		dev_err(dev, "Crystal HD Resume %d\n", sts);
698
		pci_disable_device(pdev);
792
		pci_disable_device(pdev);
699
		return -ENODEV;
793
		return -ENODEV;
700
	}
794
	}
701
795
702
	return 0;
796
	return 0;
703
}
797
}
704
#endif
705
798
706
static const struct pci_device_id chd_dec_pci_id_table[] = {
799
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 24)
800
static DEFINE_PCI_DEVICE_TABLE(chd_dec_pci_id_table) = {
707
	{ PCI_VDEVICE(BROADCOM, 0x1612), 8 },
801
	{ PCI_VDEVICE(BROADCOM, 0x1612), 8 },
802
	{ PCI_VDEVICE(BROADCOM, 0x1615), 8 },
803
	{ 0, },
804
};
805
#else
806
static struct pci_device_id chd_dec_pci_id_table[] = {
807
/*	vendor, device, subvendor, subdevice, class, classmask, driver_data */
808
	{ 0x14e4, 0x1612, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 },
809
	{ 0x14e4, 0x1615, PCI_ANY_ID, PCI_ANY_ID, 0, 0, 8 },
708
	{ 0, },
810
	{ 0, },
709
};
811
};
812
#endif
710
MODULE_DEVICE_TABLE(pci, chd_dec_pci_id_table);
813
MODULE_DEVICE_TABLE(pci, chd_dec_pci_id_table);
711
814
712
static struct pci_driver bc_chd_70012_driver = {
815
static struct pci_driver bc_chd_driver = {
713
	.name     = "Broadcom 70012 Decoder",
816
	.name     = "crystalhd",
714
	.probe    = chd_dec_pci_probe,
817
	.probe    = chd_dec_pci_probe,
715
	.remove   = chd_dec_pci_remove,
818
	.remove   = chd_dec_pci_remove,
716
	.id_table = chd_dec_pci_id_table,
819
	.id_table = chd_dec_pci_id_table,
717
#ifdef CONFIG_PM
718
	.suspend  = chd_dec_pci_suspend,
820
	.suspend  = chd_dec_pci_suspend,
719
	.resume   = chd_dec_pci_resume
821
	.resume   = chd_dec_pci_resume
720
#endif
721
};
822
};
722
823
723
void chd_set_log_level(struct crystalhd_adp *adp, char *arg)
724
{
725
	if ((!arg) || (strlen(arg) < 3))
726
		g_linklog_level = BCMLOG_ERROR | BCMLOG_DATA;
727
	else if (!strncmp(arg, "sstep", 5))
728
		g_linklog_level = BCMLOG_INFO | BCMLOG_DATA | BCMLOG_DBG |
729
				  BCMLOG_SSTEP | BCMLOG_ERROR;
730
	else if (!strncmp(arg, "info", 4))
731
		g_linklog_level = BCMLOG_ERROR | BCMLOG_DATA | BCMLOG_INFO;
732
	else if (!strncmp(arg, "debug", 5))
733
		g_linklog_level = BCMLOG_ERROR | BCMLOG_DATA | BCMLOG_INFO |
734
				  BCMLOG_DBG;
735
	else if (!strncmp(arg, "pball", 5))
736
		g_linklog_level = 0xFFFFFFFF & ~(BCMLOG_SPINLOCK);
737
	else if (!strncmp(arg, "silent", 6))
738
		g_linklog_level = 0;
739
	else
740
		g_linklog_level = 0;
741
}
742
743
struct crystalhd_adp *chd_get_adp(void)
824
struct crystalhd_adp *chd_get_adp(void)
744
{
825
{
745
	return g_adp_info;
826
	return g_adp_info;
Lines 749-762 static int __init chd_dec_module_init(vo Link Here
749
{
830
{
750
	int rc;
831
	int rc;
751
832
752
	chd_set_log_level(NULL, "debug");
833
	printk(KERN_DEBUG "Loading crystalhd v%d.%d.%d\n",
753
	BCMLOG(BCMLOG_DATA, "Loading crystalhd %d.%d.%d\n",
754
	       crystalhd_kmod_major, crystalhd_kmod_minor, crystalhd_kmod_rev);
834
	       crystalhd_kmod_major, crystalhd_kmod_minor, crystalhd_kmod_rev);
755
835
756
	rc = pci_register_driver(&bc_chd_70012_driver);
836
	rc = pci_register_driver(&bc_chd_driver);
757
837
758
	if (rc < 0)
838
	if (rc < 0)
759
		BCMLOG_ERR("Could not find any devices. err:%d\n", rc);
839
		printk(KERN_ERR "%s: Could not find any devices. err:%d\n",
840
		       __func__, rc);
760
841
761
	return rc;
842
	return rc;
762
}
843
}
Lines 764-773 module_init(chd_dec_module_init); Link Here
764
845
765
static void __exit chd_dec_module_cleanup(void)
846
static void __exit chd_dec_module_cleanup(void)
766
{
847
{
767
	BCMLOG(BCMLOG_DATA, "unloading crystalhd %d.%d.%d\n",
848
	printk(KERN_DEBUG "Unloading crystalhd %d.%d.%d\n",
768
	       crystalhd_kmod_major, crystalhd_kmod_minor, crystalhd_kmod_rev);
849
	       crystalhd_kmod_major, crystalhd_kmod_minor, crystalhd_kmod_rev);
769
850
770
	pci_unregister_driver(&bc_chd_70012_driver);
851
	pci_unregister_driver(&bc_chd_driver);
771
}
852
}
772
module_exit(chd_dec_module_cleanup);
853
module_exit(chd_dec_module_cleanup);
773
854
Lines 775-778 MODULE_AUTHOR("Naren Sankar <nsankar@bro Link Here
775
MODULE_AUTHOR("Prasad Bolisetty <prasadb@broadcom.com>");
856
MODULE_AUTHOR("Prasad Bolisetty <prasadb@broadcom.com>");
776
MODULE_DESCRIPTION(CRYSTAL_HD_NAME);
857
MODULE_DESCRIPTION(CRYSTAL_HD_NAME);
777
MODULE_LICENSE("GPL");
858
MODULE_LICENSE("GPL");
778
MODULE_ALIAS("bcm70012");
859
MODULE_ALIAS("crystalhd");
(-)crystalhd~/crystalhd_lnx.h (-12 / +13 lines)
Lines 1-7 Link Here
1
/***************************************************************************
1
/***************************************************************************
2
 * Copyright (c) 2005-2009, Broadcom Corporation.
2
 * Copyright (c) 2005-2009, Broadcom Corporation.
3
 *
3
 *
4
 *  Name: crystalhd_lnx . h
4
 *  Name: crystalhd_lnx . c
5
 *
5
 *
6
 *  Description:
6
 *  Description:
7
 *		BCM70012 Linux driver
7
 *		BCM70012 Linux driver
Lines 37-42 Link Here
37
#include <linux/delay.h>
37
#include <linux/delay.h>
38
#include <linux/fb.h>
38
#include <linux/fb.h>
39
#include <linux/pci.h>
39
#include <linux/pci.h>
40
#include <linux/init.h>
40
#include <linux/interrupt.h>
41
#include <linux/interrupt.h>
41
#include <linux/pagemap.h>
42
#include <linux/pagemap.h>
42
#include <linux/vmalloc.h>
43
#include <linux/vmalloc.h>
Lines 44-54 Link Here
44
#include <linux/io.h>
45
#include <linux/io.h>
45
#include <asm/irq.h>
46
#include <asm/irq.h>
46
#include <asm/pgtable.h>
47
#include <asm/pgtable.h>
48
/*#include <asm/system.h>*/
47
#include <linux/uaccess.h>
49
#include <linux/uaccess.h>
48
50
49
#include "crystalhd.h"
51
#include "crystalhd_cmds.h"
50
52
51
#define CRYSTAL_HD_NAME		"Broadcom Crystal HD Decoder (BCM70012) Driver"
53
#define CRYSTAL_HD_NAME "Broadcom Crystal HD Decoder Driver"
52
54
53
/* OS specific PCI information structure and adapter information. */
55
/* OS specific PCI information structure and adapter information. */
54
struct crystalhd_adp {
56
struct crystalhd_adp {
Lines 57-68 struct crystalhd_adp { Link Here
57
	struct pci_dev		*pdev;
59
	struct pci_dev		*pdev;
58
60
59
	unsigned long		pci_mem_start;
61
	unsigned long		pci_mem_start;
60
	uint32_t		pci_mem_len;
62
	uint32_t			pci_mem_len;
61
	void			*addr;
63
	void				*mem_addr;
62
64
63
	unsigned long		pci_i2o_start;
65
	unsigned long		pci_i2o_start;
64
	uint32_t		pci_i2o_len;
66
	uint32_t			pci_i2o_len;
65
	void			*i2o_addr;
67
	void				*i2o_addr;
66
68
67
	unsigned int		drv_data;
69
	unsigned int		drv_data;
68
	unsigned int		dmabits;	/* 32 | 64 */
70
	unsigned int		dmabits;	/* 32 | 64 */
Lines 73-83 struct crystalhd_adp { Link Here
73
	spinlock_t		lock;
75
	spinlock_t		lock;
74
76
75
	/* API Related */
77
	/* API Related */
76
	int		chd_dec_major;
78
	int			chd_dec_major;
77
	unsigned int		cfg_users;
79
	unsigned int		cfg_users;
78
80
79
	struct crystalhd_ioctl_data	*idata_free_head; /* ioctl data pool */
81
	crystalhd_ioctl_data	*idata_free_head;	/* ioctl data pool */
80
	struct crystalhd_elem	*elem_pool_head; /* Queue element pool */
82
	struct crystalhd_elem	*elem_pool_head;	/* Queue element pool */
81
83
82
	struct crystalhd_cmd	cmds;
84
	struct crystalhd_cmd	cmds;
83
85
Lines 87-93 struct crystalhd_adp { Link Here
87
89
88
90
89
struct crystalhd_adp *chd_get_adp(void);
91
struct crystalhd_adp *chd_get_adp(void);
90
void chd_set_log_level(struct crystalhd_adp *adp, char *arg);
92
struct device *chddev(void);
91
93
92
#endif
94
#endif
93
(-)crystalhd~/crystalhd_misc.c (-256 / +162 lines)
Lines 24-54 Link Here
24
 * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
24
 * along with this driver.  If not, see <http://www.gnu.org/licenses/>.
25
 **********************************************************************/
25
 **********************************************************************/
26
26
27
#include "crystalhd.h"
27
#include <linux/device.h>
28
#include <linux/version.h>
28
29
29
#include <linux/slab.h>
30
#include "crystalhd_lnx.h"
31
#include "crystalhd_misc.h"
30
32
31
uint32_t g_linklog_level;
33
/* Some HW specific code defines */
32
34
extern uint32_t link_GetRptDropParam(struct crystalhd_hw *hw, uint32_t picHeight, uint32_t picWidth, void *);
33
static inline uint32_t crystalhd_dram_rd(struct crystalhd_adp *adp,
35
extern uint32_t flea_GetRptDropParam(struct crystalhd_hw *hw, void *);
34
					 uint32_t mem_off)
35
{
36
	crystalhd_reg_wr(adp, DCI_DRAM_BASE_ADDR, (mem_off >> 19));
37
	return bc_dec_reg_rd(adp, (0x00380000 | (mem_off & 0x0007FFFF)));
38
}
39
40
static inline void crystalhd_dram_wr(struct crystalhd_adp *adp,
41
					 uint32_t mem_off, uint32_t val)
42
{
43
	crystalhd_reg_wr(adp, DCI_DRAM_BASE_ADDR, (mem_off >> 19));
44
	bc_dec_reg_wr(adp, (0x00380000 | (mem_off & 0x0007FFFF)), val);
45
}
46
47
static inline enum BC_STATUS bc_chk_dram_range(struct crystalhd_adp *adp,
48
					 uint32_t start_off, uint32_t cnt)
49
{
50
	return BC_STS_SUCCESS;
51
}
52
36
53
static struct crystalhd_dio_req *crystalhd_alloc_dio(struct crystalhd_adp *adp)
37
static struct crystalhd_dio_req *crystalhd_alloc_dio(struct crystalhd_adp *adp)
54
{
38
{
Lines 56-62 static struct crystalhd_dio_req *crystal Link Here
56
	struct crystalhd_dio_req *temp = NULL;
40
	struct crystalhd_dio_req *temp = NULL;
57
41
58
	if (!adp) {
42
	if (!adp) {
59
		BCMLOG_ERR("Invalid Arg!!\n");
43
		printk(KERN_ERR "%s: Invalid arg\n", __func__);
60
		return temp;
44
		return temp;
61
	}
45
	}
62
46
Lines 69-76 static struct crystalhd_dio_req *crystal Link Here
69
	return temp;
53
	return temp;
70
}
54
}
71
55
72
static void crystalhd_free_dio(struct crystalhd_adp *adp,
56
static void crystalhd_free_dio(struct crystalhd_adp *adp, struct crystalhd_dio_req *dio)
73
					 struct crystalhd_dio_req *dio)
74
{
57
{
75
	unsigned long flags = 0;
58
	unsigned long flags = 0;
76
59
Lines 92-110 static struct crystalhd_elem *crystalhd_ Link Here
92
	struct crystalhd_elem *temp = NULL;
75
	struct crystalhd_elem *temp = NULL;
93
76
94
	if (!adp)
77
	if (!adp)
78
	{
79
		printk(KERN_ERR "%s: Invalid args\n", __func__);
95
		return temp;
80
		return temp;
81
	}
96
	spin_lock_irqsave(&adp->lock, flags);
82
	spin_lock_irqsave(&adp->lock, flags);
97
	temp = adp->elem_pool_head;
83
	temp = adp->elem_pool_head;
98
	if (temp) {
84
	if (temp) {
99
		adp->elem_pool_head = adp->elem_pool_head->flink;
85
		adp->elem_pool_head = adp->elem_pool_head->flink;
100
		memset(temp, 0, sizeof(*temp));
86
		memset(temp, 0, sizeof(*temp));
101
	}
87
	}
88
102
	spin_unlock_irqrestore(&adp->lock, flags);
89
	spin_unlock_irqrestore(&adp->lock, flags);
103
90
104
	return temp;
91
	return temp;
105
}
92
}
106
static void crystalhd_free_elem(struct crystalhd_adp *adp,
93
static void crystalhd_free_elem(struct crystalhd_adp *adp, struct crystalhd_elem *elem)
107
					 struct crystalhd_elem *elem)
108
{
94
{
109
	unsigned long flags = 0;
95
	unsigned long flags = 0;
110
96
Lines 119-286 static void crystalhd_free_elem(struct c Link Here
119
static inline void crystalhd_set_sg(struct scatterlist *sg, struct page *page,
105
static inline void crystalhd_set_sg(struct scatterlist *sg, struct page *page,
120
				  unsigned int len, unsigned int offset)
106
				  unsigned int len, unsigned int offset)
121
{
107
{
108
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 23)
122
	sg_set_page(sg, page, len, offset);
109
	sg_set_page(sg, page, len, offset);
110
#else
111
	sg->page       = page;
112
	sg->offset     = offset;
113
	sg->length     = len;
114
#endif
123
#ifdef CONFIG_X86_64
115
#ifdef CONFIG_X86_64
124
	sg->dma_length = len;
116
	sg->dma_length = len;
125
#endif
117
#endif
126
}
118
}
127
119
128
static inline void crystalhd_init_sg(struct scatterlist *sg,
120
static inline void crystalhd_init_sg(struct scatterlist *sg, unsigned int entries)
129
					 unsigned int entries)
130
{
121
{
131
	/* http://lkml.org/lkml/2007/11/27/68 */
122
	/* http://lkml.org/lkml/2007/11/27/68 */
123
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 23)
132
	sg_init_table(sg, entries);
124
	sg_init_table(sg, entries);
125
#endif
133
}
126
}
134
127
135
/*========================== Extern ========================================*/
128
/*========================== Extern ========================================*/
136
/**
129
/**
137
 * bc_dec_reg_rd - Read 7412's device register.
138
 * @adp: Adapter instance
139
 * @reg_off: Register offset.
140
 *
141
 * Return:
142
 *	32bit value read
143
 *
144
 * 7412's device register read routine. This interface use
145
 * 7412's device access range mapped from BAR-2 (4M) of PCIe
146
 * configuration space.
147
 */
148
uint32_t bc_dec_reg_rd(struct crystalhd_adp *adp, uint32_t reg_off)
149
{
150
	if (!adp || (reg_off > adp->pci_mem_len)) {
151
		BCMLOG_ERR("dec_rd_reg_off outof range: 0x%08x\n", reg_off);
152
		return 0;
153
	}
154
155
	return readl(adp->addr + reg_off);
156
}
157
158
/**
159
 * bc_dec_reg_wr - Write 7412's device register
160
 * @adp: Adapter instance
161
 * @reg_off: Register offset.
162
 * @val: Dword value to be written.
163
 *
164
 * Return:
165
 *	none.
166
 *
167
 * 7412's device register write routine. This interface use
168
 * 7412's device access range mapped from BAR-2 (4M) of PCIe
169
 * configuration space.
170
 */
171
void bc_dec_reg_wr(struct crystalhd_adp *adp, uint32_t reg_off, uint32_t val)
172
{
173
	if (!adp || (reg_off > adp->pci_mem_len)) {
174
		BCMLOG_ERR("dec_wr_reg_off outof range: 0x%08x\n", reg_off);
175
		return;
176
	}
177
	writel(val, adp->addr + reg_off);
178
	udelay(8);
179
}
180
181
/**
182
 * crystalhd_reg_rd - Read Link's device register.
183
 * @adp: Adapter instance
184
 * @reg_off: Register offset.
185
 *
186
 * Return:
187
 *	32bit value read
188
 *
189
 * Link device register  read routine. This interface use
190
 * Link's device access range mapped from BAR-1 (64K) of PCIe
191
 * configuration space.
192
 *
193
 */
194
uint32_t crystalhd_reg_rd(struct crystalhd_adp *adp, uint32_t reg_off)
195
{
196
	if (!adp || (reg_off > adp->pci_i2o_len)) {
197
		BCMLOG_ERR("link_rd_reg_off outof range: 0x%08x\n", reg_off);
198
		return 0;
199
	}
200
	return readl(adp->i2o_addr + reg_off);
201
}
202
203
/**
204
 * crystalhd_reg_wr - Write Link's device register
205
 * @adp: Adapter instance
206
 * @reg_off: Register offset.
207
 * @val: Dword value to be written.
208
 *
209
 * Return:
210
 *	none.
211
 *
212
 * Link device register  write routine. This interface use
213
 * Link's device access range mapped from BAR-1 (64K) of PCIe
214
 * configuration space.
215
 *
216
 */
217
void crystalhd_reg_wr(struct crystalhd_adp *adp, uint32_t reg_off,
218
					 uint32_t val)
219
{
220
	if (!adp || (reg_off > adp->pci_i2o_len)) {
221
		BCMLOG_ERR("link_wr_reg_off outof range: 0x%08x\n", reg_off);
222
		return;
223
	}
224
	writel(val, adp->i2o_addr + reg_off);
225
}
226
227
/**
228
 * crystalhd_mem_rd - Read data from 7412's DRAM area.
229
 * @adp: Adapter instance
230
 * @start_off: Start offset.
231
 * @dw_cnt: Count in dwords.
232
 * @rd_buff: Buffer to copy the data from dram.
233
 *
234
 * Return:
235
 *	Status.
236
 *
237
 * 7412's Dram read routine.
238
 */
239
enum BC_STATUS crystalhd_mem_rd(struct crystalhd_adp *adp, uint32_t start_off,
240
			 uint32_t dw_cnt, uint32_t *rd_buff)
241
{
242
	uint32_t ix = 0;
243
244
	if (!adp || !rd_buff ||
245
	    (bc_chk_dram_range(adp, start_off, dw_cnt) != BC_STS_SUCCESS)) {
246
		BCMLOG_ERR("Invalid arg\n");
247
		return BC_STS_INV_ARG;
248
	}
249
	for (ix = 0; ix < dw_cnt; ix++)
250
		rd_buff[ix] = crystalhd_dram_rd(adp, (start_off + (ix * 4)));
251
252
	return BC_STS_SUCCESS;
253
}
254
255
/**
256
 * crystalhd_mem_wr - Write data to 7412's DRAM area.
257
 * @adp: Adapter instance
258
 * @start_off: Start offset.
259
 * @dw_cnt: Count in dwords.
260
 * @wr_buff: Data Buffer to be written.
261
 *
262
 * Return:
263
 *	Status.
264
 *
265
 * 7412's Dram write routine.
266
 */
267
enum BC_STATUS crystalhd_mem_wr(struct crystalhd_adp *adp, uint32_t start_off,
268
			 uint32_t dw_cnt, uint32_t *wr_buff)
269
{
270
	uint32_t ix = 0;
271
272
	if (!adp || !wr_buff ||
273
	    (bc_chk_dram_range(adp, start_off, dw_cnt) != BC_STS_SUCCESS)) {
274
		BCMLOG_ERR("Invalid arg\n");
275
		return BC_STS_INV_ARG;
276
	}
277
278
	for (ix = 0; ix < dw_cnt; ix++)
279
		crystalhd_dram_wr(adp, (start_off + (ix * 4)), wr_buff[ix]);
280
281
	return BC_STS_SUCCESS;
282
}
283
/**
284
 * crystalhd_pci_cfg_rd - PCIe config read
130
 * crystalhd_pci_cfg_rd - PCIe config read
285
 * @adp: Adapter instance
131
 * @adp: Adapter instance
286
 * @off: PCI config space offset.
132
 * @off: PCI config space offset.
Lines 290-305 enum BC_STATUS crystalhd_mem_wr(struct c Link Here
290
 * Return:
136
 * Return:
291
 *	Status.
137
 *	Status.
292
 *
138
 *
293
 * Get value from Link's PCIe config space.
139
 * Get value from PCIe config space.
294
 */
140
 */
295
enum BC_STATUS crystalhd_pci_cfg_rd(struct crystalhd_adp *adp, uint32_t off,
141
BC_STATUS crystalhd_pci_cfg_rd(struct crystalhd_adp *adp, uint32_t off,
296
			     uint32_t len, uint32_t *val)
142
			     uint32_t len, uint32_t *val)
297
{
143
{
298
	enum BC_STATUS sts = BC_STS_SUCCESS;
144
	BC_STATUS sts = BC_STS_SUCCESS;
299
	int rc = 0;
145
	int rc = 0;
300
146
301
	if (!adp || !val) {
147
	if (!adp || !val) {
302
		BCMLOG_ERR("Invalid arg\n");
148
		printk(KERN_ERR "%s: Invalid arg\n", __func__);
303
		return BC_STS_INV_ARG;
149
		return BC_STS_INV_ARG;
304
	}
150
	}
305
151
Lines 316-323 enum BC_STATUS crystalhd_pci_cfg_rd(stru Link Here
316
	default:
162
	default:
317
		rc = -EINVAL;
163
		rc = -EINVAL;
318
		sts = BC_STS_INV_ARG;
164
		sts = BC_STS_INV_ARG;
319
		BCMLOG_ERR("Invalid len:%d\n", len);
165
		dev_err(&adp->pdev->dev, "Invalid len:%d\n", len);
320
	}
166
	};
321
167
322
	if (rc && (sts == BC_STS_SUCCESS))
168
	if (rc && (sts == BC_STS_SUCCESS))
323
		sts = BC_STS_ERROR;
169
		sts = BC_STS_ERROR;
Lines 337-350 enum BC_STATUS crystalhd_pci_cfg_rd(stru Link Here
337
 *
183
 *
338
 * Set value to Link's PCIe config space.
184
 * Set value to Link's PCIe config space.
339
 */
185
 */
340
enum BC_STATUS crystalhd_pci_cfg_wr(struct crystalhd_adp *adp, uint32_t off,
186
BC_STATUS crystalhd_pci_cfg_wr(struct crystalhd_adp *adp, uint32_t off,
341
			     uint32_t len, uint32_t val)
187
			     uint32_t len, uint32_t val)
342
{
188
{
343
	enum BC_STATUS sts = BC_STS_SUCCESS;
189
	BC_STATUS sts = BC_STS_SUCCESS;
344
	int rc = 0;
190
	int rc = 0;
345
191
346
	if (!adp || !val) {
192
	if (!adp || !val) {
347
		BCMLOG_ERR("Invalid arg\n");
193
		printk(KERN_ERR "%s: Invalid arg\n", __func__);
348
		return BC_STS_INV_ARG;
194
		return BC_STS_INV_ARG;
349
	}
195
	}
350
196
Lines 361-368 enum BC_STATUS crystalhd_pci_cfg_wr(stru Link Here
361
	default:
207
	default:
362
		rc = -EINVAL;
208
		rc = -EINVAL;
363
		sts = BC_STS_INV_ARG;
209
		sts = BC_STS_INV_ARG;
364
		BCMLOG_ERR("Invalid len:%d\n", len);
210
		dev_err(&adp->pdev->dev, "Invalid len:%d\n", len);
365
	}
211
	};
366
212
367
	if (rc && (sts == BC_STS_SUCCESS))
213
	if (rc && (sts == BC_STS_SUCCESS))
368
		sts = BC_STS_ERROR;
214
		sts = BC_STS_ERROR;
Lines 389-395 void *bc_kern_dma_alloc(struct crystalhd Link Here
389
	void *temp = NULL;
235
	void *temp = NULL;
390
236
391
	if (!adp || !sz || !phy_addr) {
237
	if (!adp || !sz || !phy_addr) {
392
		BCMLOG_ERR("Invalid Arg..\n");
238
		printk(KERN_ERR "%s: Invalid arg\n", __func__);
393
		return temp;
239
		return temp;
394
	}
240
	}
395
241
Lines 415-421 void bc_kern_dma_free(struct crystalhd_a Link Here
415
		      dma_addr_t phy_addr)
261
		      dma_addr_t phy_addr)
416
{
262
{
417
	if (!adp || !ka || !sz || !phy_addr) {
263
	if (!adp || !ka || !sz || !phy_addr) {
418
		BCMLOG_ERR("Invalid Arg..\n");
264
		printk(KERN_ERR "%s: Invalid arg\n", __func__);
419
		return;
265
		return;
420
	}
266
	}
421
267
Lines 435-448 void bc_kern_dma_free(struct crystalhd_a Link Here
435
 * Initialize Generic DIO queue to hold any data. Callback
281
 * Initialize Generic DIO queue to hold any data. Callback
436
 * will be used to free elements while deleting the queue.
282
 * will be used to free elements while deleting the queue.
437
 */
283
 */
438
enum BC_STATUS crystalhd_create_dioq(struct crystalhd_adp *adp,
284
BC_STATUS crystalhd_create_dioq(struct crystalhd_adp *adp,
439
			      struct crystalhd_dioq **dioq_hnd,
285
			      struct crystalhd_dioq **dioq_hnd,
440
			      crystalhd_data_free_cb cb, void *cbctx)
286
			      crystalhd_data_free_cb cb, void *cbctx)
441
{
287
{
442
	struct crystalhd_dioq *dioq = NULL;
288
	struct crystalhd_dioq *dioq = NULL;
443
289
444
	if (!adp || !dioq_hnd) {
290
	if (!adp || !dioq_hnd) {
445
		BCMLOG_ERR("Invalid arg!!\n");
291
		printk(KERN_ERR "%s: Invalid arg\n", __func__);
446
		return BC_STS_INV_ARG;
292
		return BC_STS_INV_ARG;
447
	}
293
	}
448
294
Lines 476-483 enum BC_STATUS crystalhd_create_dioq(str Link Here
476
 * by calling the call back provided during creation.
322
 * by calling the call back provided during creation.
477
 *
323
 *
478
 */
324
 */
479
void crystalhd_delete_dioq(struct crystalhd_adp *adp,
325
void crystalhd_delete_dioq(struct crystalhd_adp *adp, struct crystalhd_dioq *dioq)
480
			 struct crystalhd_dioq *dioq)
481
{
326
{
482
	void *temp;
327
	void *temp;
483
328
Lines 505-524 void crystalhd_delete_dioq(struct crysta Link Here
505
 *
350
 *
506
 * Insert new element to Q tail.
351
 * Insert new element to Q tail.
507
 */
352
 */
508
enum BC_STATUS crystalhd_dioq_add(struct crystalhd_dioq *ioq, void *data,
353
BC_STATUS crystalhd_dioq_add(struct crystalhd_dioq *ioq, void *data,
509
			   bool wake, uint32_t tag)
354
			   bool wake, uint32_t tag)
510
{
355
{
511
	unsigned long flags = 0;
356
	unsigned long flags = 0;
512
	struct crystalhd_elem *tmp;
357
	struct crystalhd_elem *tmp;
513
358
514
	if (!ioq || (ioq->sig != BC_LINK_DIOQ_SIG) || !data) {
359
	if (!ioq || (ioq->sig != BC_LINK_DIOQ_SIG) || !data) {
515
		BCMLOG_ERR("Invalid arg!!\n");
360
		dev_err(chddev(), "%s: Invalid arg\n", __func__);
516
		return BC_STS_INV_ARG;
361
		return BC_STS_INV_ARG;
517
	}
362
	}
518
363
519
	tmp = crystalhd_alloc_elem(ioq->adp);
364
	tmp = crystalhd_alloc_elem(ioq->adp);
520
	if (!tmp) {
365
	if (!tmp) {
521
		BCMLOG_ERR("No free elements.\n");
366
		dev_err(chddev(), "%s: No free elements.\n", __func__);
522
		return BC_STS_INSUFF_RES;
367
		return BC_STS_INSUFF_RES;
523
	}
368
	}
524
369
Lines 555-561 void *crystalhd_dioq_fetch(struct crysta Link Here
555
	void *data = NULL;
400
	void *data = NULL;
556
401
557
	if (!ioq || (ioq->sig != BC_LINK_DIOQ_SIG)) {
402
	if (!ioq || (ioq->sig != BC_LINK_DIOQ_SIG)) {
558
		BCMLOG_ERR("Invalid arg!!\n");
403
		dev_err(chddev(), "%s: Invalid arg\n", __func__);
404
		if(!ioq)
405
			dev_err(chddev(), "ioq not initialized\n");
406
		else
407
			dev_err(chddev(), "ioq invalid signature\n");
559
		return data;
408
		return data;
560
	}
409
	}
561
410
Lines 593-599 void *crystalhd_dioq_find_and_fetch(stru Link Here
593
	void *data = NULL;
442
	void *data = NULL;
594
443
595
	if (!ioq || (ioq->sig != BC_LINK_DIOQ_SIG)) {
444
	if (!ioq || (ioq->sig != BC_LINK_DIOQ_SIG)) {
596
		BCMLOG_ERR("Invalid arg!!\n");
445
		dev_err(chddev(), "%s: Invalid arg\n", __func__);
597
		return data;
446
		return data;
598
	}
447
	}
599
448
Lines 630-668 void *crystalhd_dioq_find_and_fetch(stru Link Here
630
 * Return element from head if Q is not empty. Wait for new element
479
 * Return element from head if Q is not empty. Wait for new element
631
 * if Q is empty for Timeout seconds.
480
 * if Q is empty for Timeout seconds.
632
 */
481
 */
633
void *crystalhd_dioq_fetch_wait(struct crystalhd_dioq *ioq, uint32_t to_secs,
482
void *crystalhd_dioq_fetch_wait(struct crystalhd_hw *hw, uint32_t to_secs, uint32_t *sig_pend)
634
			      uint32_t *sig_pend)
635
{
483
{
484
	struct device *dev = chddev();
636
	unsigned long flags = 0;
485
	unsigned long flags = 0;
637
	int rc = 0, count;
486
	int rc = 0;
638
	void *tmp = NULL;
487
488
	struct crystalhd_rx_dma_pkt *r_pkt = NULL;
489
	struct crystalhd_dioq *ioq = hw->rx_rdyq;
490
	uint32_t picYcomp = 0;
491
492
	unsigned long fetchTimeout = jiffies + msecs_to_jiffies(to_secs * 1000);
639
493
640
	if (!ioq || (ioq->sig != BC_LINK_DIOQ_SIG) || !to_secs || !sig_pend) {
494
	if (!ioq || (ioq->sig != BC_LINK_DIOQ_SIG) || !to_secs || !sig_pend) {
641
		BCMLOG_ERR("Invalid arg!!\n");
495
		dev_err(dev, "%s: Invalid arg\n", __func__);
642
		return tmp;
496
		return r_pkt;
643
	}
497
	}
644
498
645
	count = to_secs;
646
	spin_lock_irqsave(&ioq->lock, flags);
499
	spin_lock_irqsave(&ioq->lock, flags);
647
	while ((ioq->count == 0) && count) {
500
	while (!time_after_eq(jiffies, fetchTimeout)) {
648
		spin_unlock_irqrestore(&ioq->lock, flags);
501
		if(ioq->count == 0) {
649
502
			spin_unlock_irqrestore(&ioq->lock, flags);
650
		crystalhd_wait_on_event(&ioq->event,
503
			crystalhd_wait_on_event(&ioq->event, (ioq->count > 0),
651
				 (ioq->count > 0), 1000, rc, 0);
504
					250, rc, false);
505
		}
506
		else
507
			spin_unlock_irqrestore(&ioq->lock, flags);
652
		if (rc == 0) {
508
		if (rc == 0) {
653
			goto out;
509
			/* Found a packet. Check if it is a repeated picture or not */
510
			/* Drop the picture if it is a repeated picture */
511
			/* Lock against checks from get status calls */
512
			if(down_interruptible(&hw->fetch_sem))
513
				goto sem_error;
514
			r_pkt = crystalhd_dioq_fetch(ioq);
515
			/* If format change packet, then return with out checking anything */
516
			if (r_pkt->flags & (COMP_FLAG_PIB_VALID | COMP_FLAG_FMT_CHANGE))
517
				goto sem_rel_return;
518
			if (hw->adp->pdev->device == BC_PCI_DEVID_LINK) {
519
				picYcomp = link_GetRptDropParam(hw, hw->PICHeight, hw->PICWidth, (void *)r_pkt);
520
			}
521
			else {
522
				/* For Flea, we don't have the width and height handy since they */
523
				/* come in the PIB in the picture, so this function will also */
524
				/* populate the width and height */
525
				picYcomp = flea_GetRptDropParam(hw, (void *)r_pkt);
526
				/* For flea it is the above function that indicated format change */
527
				if(r_pkt->flags & (COMP_FLAG_PIB_VALID | COMP_FLAG_FMT_CHANGE))
528
					goto sem_rel_return;
529
			}
530
			if(!picYcomp || (picYcomp == hw->LastPicNo) ||
531
				(picYcomp == hw->LastTwoPicNo)) {
532
				/*Discard picture */
533
				if(picYcomp != 0) {
534
					hw->LastTwoPicNo = hw->LastPicNo;
535
					hw->LastPicNo = picYcomp;
536
				}
537
				crystalhd_dioq_add(hw->rx_freeq, r_pkt, false, r_pkt->pkt_tag);
538
				r_pkt = NULL;
539
				up(&hw->fetch_sem);
540
			} else {
541
				if(hw->adp->pdev->device == BC_PCI_DEVID_LINK) {
542
					if((picYcomp - hw->LastPicNo) > 1) {
543
						dev_info(dev, "MISSING %u PICTURES\n", (picYcomp - hw->LastPicNo));
544
					}
545
				}
546
				hw->LastTwoPicNo = hw->LastPicNo;
547
				hw->LastPicNo = picYcomp;
548
				goto sem_rel_return;
549
			}
654
		} else if (rc == -EINTR) {
550
		} else if (rc == -EINTR) {
655
			BCMLOG(BCMLOG_INFO, "Cancelling fetch wait\n");
656
			*sig_pend = 1;
551
			*sig_pend = 1;
657
			return tmp;
552
			return r_pkt;
658
		}
553
		}
659
		spin_lock_irqsave(&ioq->lock, flags);
554
		spin_lock_irqsave(&ioq->lock, flags);
660
		count--;
661
	}
555
	}
556
	dev_info(dev, "FETCH TIMEOUT\n");
662
	spin_unlock_irqrestore(&ioq->lock, flags);
557
	spin_unlock_irqrestore(&ioq->lock, flags);
663
558
	return r_pkt;
664
out:
559
sem_error:
665
	return crystalhd_dioq_fetch(ioq);
560
	return NULL;
561
sem_rel_return:
562
	up(&hw->fetch_sem);
563
	return r_pkt;
666
}
564
}
667
565
668
/**
566
/**
Lines 681-717 out: Link Here
681
 * This routine maps user address and lock pages for DMA.
579
 * This routine maps user address and lock pages for DMA.
682
 *
580
 *
683
 */
581
 */
684
enum BC_STATUS crystalhd_map_dio(struct crystalhd_adp *adp, void *ubuff,
582
BC_STATUS crystalhd_map_dio(struct crystalhd_adp *adp, void *ubuff,
685
			  uint32_t ubuff_sz, uint32_t uv_offset,
583
			  uint32_t ubuff_sz, uint32_t uv_offset,
686
			  bool en_422mode, bool dir_tx,
584
			  bool en_422mode, bool dir_tx,
687
			  struct crystalhd_dio_req **dio_hnd)
585
			  struct crystalhd_dio_req **dio_hnd)
688
{
586
{
587
	struct device *dev;
689
	struct crystalhd_dio_req	*dio;
588
	struct crystalhd_dio_req	*dio;
690
	/* FIXME: jarod: should some of these
589
	uint32_t start = 0, end = 0, count = 0;
691
	 unsigned longs be uint32_t or uintptr_t? */
590
	uint32_t spsz = 0;
692
	unsigned long start = 0, end = 0, uaddr = 0, count = 0;
591
	unsigned long uaddr = 0, uv_start = 0;
693
	unsigned long spsz = 0, uv_start = 0;
694
	int i = 0, rw = 0, res = 0, nr_pages = 0, skip_fb_sg = 0;
592
	int i = 0, rw = 0, res = 0, nr_pages = 0, skip_fb_sg = 0;
695
593
696
	if (!adp || !ubuff || !ubuff_sz || !dio_hnd) {
594
	if (!adp || !ubuff || !ubuff_sz || !dio_hnd) {
697
		BCMLOG_ERR("Invalid arg\n");
595
		printk(KERN_ERR "%s: Invalid arg\n", __func__);
698
		return BC_STS_INV_ARG;
596
		return BC_STS_INV_ARG;
699
	}
597
	}
598
599
	dev = &adp->pdev->dev;
600
700
	/* Compute pages */
601
	/* Compute pages */
701
	uaddr = (unsigned long)ubuff;
602
	uaddr = (unsigned long)ubuff;
702
	count = (unsigned long)ubuff_sz;
603
	count = ubuff_sz;
703
	end = (uaddr + count + PAGE_SIZE - 1) >> PAGE_SHIFT;
604
	end = (uaddr + count + PAGE_SIZE - 1) >> PAGE_SHIFT;
704
	start = uaddr >> PAGE_SHIFT;
605
	start = uaddr >> PAGE_SHIFT;
705
	nr_pages = end - start;
606
	nr_pages = end - start;
706
607
707
	if (!count || ((uaddr + count) < uaddr)) {
608
	if (!count || ((uaddr + count) < uaddr)) {
708
		BCMLOG_ERR("User addr overflow!!\n");
609
		dev_err(dev, "User addr overflow!!\n");
709
		return BC_STS_INV_ARG;
610
		return BC_STS_INV_ARG;
710
	}
611
	}
711
612
712
	dio = crystalhd_alloc_dio(adp);
613
	dio = crystalhd_alloc_dio(adp);
713
	if (!dio) {
614
	if (!dio) {
714
		BCMLOG_ERR("dio pool empty..\n");
615
		dev_err(dev, "dio pool empty..\n");
715
		return BC_STS_INSUFF_RES;
616
		return BC_STS_INSUFF_RES;
716
	}
617
	}
717
618
Lines 724-740 enum BC_STATUS crystalhd_map_dio(struct Link Here
724
	}
625
	}
725
626
726
	if (nr_pages > dio->max_pages) {
627
	if (nr_pages > dio->max_pages) {
727
		BCMLOG_ERR("max_pages(%d) exceeded(%d)!!\n",
628
		dev_err(dev, "max_pages(%d) exceeded(%d)!!\n",
728
			   dio->max_pages, nr_pages);
629
			dio->max_pages, nr_pages);
729
		crystalhd_unmap_dio(adp, dio);
630
		crystalhd_unmap_dio(adp, dio);
730
		return BC_STS_INSUFF_RES;
631
		return BC_STS_INSUFF_RES;
731
	}
632
	}
732
633
733
	if (uv_offset) {
634
	if (uv_offset) {
734
		uv_start = (uaddr + (unsigned long)uv_offset)  >> PAGE_SHIFT;
635
		uv_start = (uaddr + uv_offset)  >> PAGE_SHIFT;
735
		dio->uinfo.uv_sg_ix = uv_start - start;
636
		dio->uinfo.uv_sg_ix = uv_start - start;
736
		dio->uinfo.uv_sg_off = ((uaddr + (unsigned long)uv_offset) &
637
		dio->uinfo.uv_sg_off = ((uaddr + uv_offset) & ~PAGE_MASK);
737
					 ~PAGE_MASK);
738
	}
638
	}
739
639
740
	dio->fb_size = ubuff_sz & 0x03;
640
	dio->fb_size = ubuff_sz & 0x03;
Lines 743-751 enum BC_STATUS crystalhd_map_dio(struct Link Here
743
				     (void *)(uaddr + count - dio->fb_size),
643
				     (void *)(uaddr + count - dio->fb_size),
744
				     dio->fb_size);
644
				     dio->fb_size);
745
		if (res) {
645
		if (res) {
746
			BCMLOG_ERR("failed %d to copy %u fill bytes from %p\n",
646
			dev_err(dev, "failed %d to copy %u fill bytes from %p\n",
747
				   res, dio->fb_size,
647
				res, dio->fb_size,
748
				   (void *)(uaddr + count-dio->fb_size));
648
				(void *)(uaddr + count-dio->fb_size));
749
			crystalhd_unmap_dio(adp, dio);
649
			crystalhd_unmap_dio(adp, dio);
750
			return BC_STS_INSUFF_RES;
650
			return BC_STS_INSUFF_RES;
751
		}
651
		}
Lines 759-765 enum BC_STATUS crystalhd_map_dio(struct Link Here
759
	/* Save for release..*/
659
	/* Save for release..*/
760
	dio->sig = crystalhd_dio_locked;
660
	dio->sig = crystalhd_dio_locked;
761
	if (res < nr_pages) {
661
	if (res < nr_pages) {
762
		BCMLOG_ERR("get pages failed: %d-%d\n", nr_pages, res);
662
		dev_err(dev, "get pages failed: %d-%d\n", nr_pages, res);
763
		dio->page_cnt = res;
663
		dio->page_cnt = res;
764
		crystalhd_unmap_dio(adp, dio);
664
		crystalhd_unmap_dio(adp, dio);
765
		return BC_STS_ERROR;
665
		return BC_STS_ERROR;
Lines 772-780 enum BC_STATUS crystalhd_map_dio(struct Link Here
772
	if (nr_pages > 1) {
672
	if (nr_pages > 1) {
773
		dio->sg[0].length = PAGE_SIZE - dio->sg[0].offset;
673
		dio->sg[0].length = PAGE_SIZE - dio->sg[0].offset;
774
674
675
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 23)
775
#ifdef CONFIG_X86_64
676
#ifdef CONFIG_X86_64
776
		dio->sg[0].dma_length = dio->sg[0].length;
677
		dio->sg[0].dma_length = dio->sg[0].length;
777
#endif
678
#endif
679
#endif
778
		count -= dio->sg[0].length;
680
		count -= dio->sg[0].length;
779
		for (i = 1; i < nr_pages; i++) {
681
		for (i = 1; i < nr_pages; i++) {
780
			if (count < 4) {
682
			if (count < 4) {
Lines 794-807 enum BC_STATUS crystalhd_map_dio(struct Link Here
794
		} else {
696
		} else {
795
			dio->sg[0].length = count - dio->fb_size;
697
			dio->sg[0].length = count - dio->fb_size;
796
		}
698
		}
699
#if LINUX_VERSION_CODE > KERNEL_VERSION(2, 6, 23)
797
#ifdef CONFIG_X86_64
700
#ifdef CONFIG_X86_64
798
		dio->sg[0].dma_length = dio->sg[0].length;
701
		dio->sg[0].dma_length = dio->sg[0].length;
799
#endif
702
#endif
703
#endif
800
	}
704
	}
801
	dio->sg_cnt = pci_map_sg(adp->pdev, dio->sg,
705
	dio->sg_cnt = pci_map_sg(adp->pdev, dio->sg,
802
				 dio->page_cnt, dio->direction);
706
				 dio->page_cnt, dio->direction);
803
	if (dio->sg_cnt <= 0) {
707
	if (dio->sg_cnt <= 0) {
804
		BCMLOG_ERR("sg map %d-%d\n", dio->sg_cnt, dio->page_cnt);
708
		dev_err(dev, "sg map %d-%d\n", dio->sg_cnt, dio->page_cnt);
805
		crystalhd_unmap_dio(adp, dio);
709
		crystalhd_unmap_dio(adp, dio);
806
		return BC_STS_ERROR;
710
		return BC_STS_ERROR;
807
	}
711
	}
Lines 830-843 enum BC_STATUS crystalhd_map_dio(struct Link Here
830
 *
734
 *
831
 * This routine is to unmap the user buffer pages.
735
 * This routine is to unmap the user buffer pages.
832
 */
736
 */
833
enum BC_STATUS crystalhd_unmap_dio(struct crystalhd_adp *adp,
737
BC_STATUS crystalhd_unmap_dio(struct crystalhd_adp *adp, struct crystalhd_dio_req *dio)
834
				 struct crystalhd_dio_req *dio)
835
{
738
{
836
	struct page *page = NULL;
739
	struct page *page = NULL;
837
	int j = 0;
740
	int j = 0;
838
741
839
	if (!adp || !dio) {
742
	if (!adp || !dio) {
840
		BCMLOG_ERR("Invalid arg\n");
743
		printk(KERN_ERR "%s: Invalid arg\n", __func__);
841
		return BC_STS_INV_ARG;
744
		return BC_STS_INV_ARG;
842
	}
745
	}
843
746
Lines 853-860 enum BC_STATUS crystalhd_unmap_dio(struc Link Here
853
		}
756
		}
854
	}
757
	}
855
	if (dio->sig == crystalhd_dio_sg_mapped)
758
	if (dio->sig == crystalhd_dio_sg_mapped)
856
		pci_unmap_sg(adp->pdev, dio->sg, dio->page_cnt,
759
		pci_unmap_sg(adp->pdev, dio->sg, dio->page_cnt, dio->direction);
857
			 dio->direction);
858
760
859
	crystalhd_free_dio(adp, dio);
761
	crystalhd_free_dio(adp, dio);
860
762
Lines 874-893 enum BC_STATUS crystalhd_unmap_dio(struc Link Here
874
 */
776
 */
875
int crystalhd_create_dio_pool(struct crystalhd_adp *adp, uint32_t max_pages)
777
int crystalhd_create_dio_pool(struct crystalhd_adp *adp, uint32_t max_pages)
876
{
778
{
779
	struct device *dev;
877
	uint32_t asz = 0, i = 0;
780
	uint32_t asz = 0, i = 0;
878
	uint8_t	*temp;
781
	uint8_t	*temp;
879
	struct crystalhd_dio_req *dio;
782
	struct crystalhd_dio_req *dio;
880
783
881
	if (!adp || !max_pages) {
784
	if (!adp || !max_pages) {
882
		BCMLOG_ERR("Invalid Arg!!\n");
785
		printk(KERN_ERR "%s: Invalid arg\n", __func__);
883
		return -EINVAL;
786
		return -EINVAL;
884
	}
787
	}
885
788
789
	dev = &adp->pdev->dev;
790
886
	/* Get dma memory for fill byte handling..*/
791
	/* Get dma memory for fill byte handling..*/
887
	adp->fill_byte_pool = pci_pool_create("crystalhd_fbyte",
792
	adp->fill_byte_pool = pci_pool_create("crystalhd_fbyte",
888
					      adp->pdev, 8, 8, 0);
793
					      adp->pdev, 8, 8, 0);
889
	if (!adp->fill_byte_pool) {
794
	if (!adp->fill_byte_pool) {
890
		BCMLOG_ERR("failed to create fill byte pool\n");
795
		dev_err(dev, "failed to create fill byte pool\n");
891
		return -ENOMEM;
796
		return -ENOMEM;
892
	}
797
	}
893
798
Lines 895-907 int crystalhd_create_dio_pool(struct cry Link Here
895
	asz =  (sizeof(*dio->pages) * max_pages) +
800
	asz =  (sizeof(*dio->pages) * max_pages) +
896
	       (sizeof(*dio->sg) * max_pages) + sizeof(*dio);
801
	       (sizeof(*dio->sg) * max_pages) + sizeof(*dio);
897
802
898
	BCMLOG(BCMLOG_DBG, "Initializing Dio pool %d %d %x %p\n",
803
	dev_dbg(dev, "Initializing Dio pool %d %d %x %p\n",
899
	       BC_LINK_SG_POOL_SZ, max_pages, asz, adp->fill_byte_pool);
804
		BC_LINK_SG_POOL_SZ, max_pages, asz, adp->fill_byte_pool);
900
805
901
	for (i = 0; i < BC_LINK_SG_POOL_SZ; i++) {
806
	for (i = 0; i < BC_LINK_SG_POOL_SZ; i++) {
902
		temp = kzalloc(asz, GFP_KERNEL);
807
		temp = kzalloc(asz, GFP_KERNEL);
903
		if ((temp) == NULL) {
808
		if ((temp) == NULL) {
904
			BCMLOG_ERR("Failed to alloc %d mem\n", asz);
809
			dev_err(dev, "Failed to alloc %d mem\n", asz);
905
			return -ENOMEM;
810
			return -ENOMEM;
906
		}
811
		}
907
812
Lines 914-920 int crystalhd_create_dio_pool(struct cry Link Here
914
		dio->fb_va = pci_pool_alloc(adp->fill_byte_pool, GFP_KERNEL,
819
		dio->fb_va = pci_pool_alloc(adp->fill_byte_pool, GFP_KERNEL,
915
					    &dio->fb_pa);
820
					    &dio->fb_pa);
916
		if (!dio->fb_va) {
821
		if (!dio->fb_va) {
917
			BCMLOG_ERR("fill byte alloc failed.\n");
822
			dev_err(dev, "fill byte alloc failed.\n");
918
			return -ENOMEM;
823
			return -ENOMEM;
919
		}
824
		}
920
825
Lines 939-945 void crystalhd_destroy_dio_pool(struct c Link Here
939
	int count = 0;
844
	int count = 0;
940
845
941
	if (!adp) {
846
	if (!adp) {
942
		BCMLOG_ERR("Invalid Arg!!\n");
847
		printk(KERN_ERR "%s: Invalid arg\n", __func__);
943
		return;
848
		return;
944
	}
849
	}
945
850
Lines 959-965 void crystalhd_destroy_dio_pool(struct c Link Here
959
		adp->fill_byte_pool = NULL;
864
		adp->fill_byte_pool = NULL;
960
	}
865
	}
961
866
962
	BCMLOG(BCMLOG_DBG, "Released dio pool %d\n", count);
867
	dev_dbg(&adp->pdev->dev, "Released dio pool %d\n", count);
963
}
868
}
964
869
965
/**
870
/**
Lines 985-996 int crystalhd_create_elem_pool(struct cr Link Here
985
	for (i = 0; i < pool_size; i++) {
890
	for (i = 0; i < pool_size; i++) {
986
		temp = kzalloc(sizeof(*temp), GFP_KERNEL);
891
		temp = kzalloc(sizeof(*temp), GFP_KERNEL);
987
		if (!temp) {
892
		if (!temp) {
988
			BCMLOG_ERR("kalloc failed\n");
893
			dev_err(&adp->pdev->dev, "kzalloc failed\n");
989
			return -ENOMEM;
894
			return -ENOMEM;
990
		}
895
		}
991
		crystalhd_free_elem(adp, temp);
896
		crystalhd_free_elem(adp, temp);
992
	}
897
	}
993
	BCMLOG(BCMLOG_DBG, "allocated %d elem\n", pool_size);
898
	dev_dbg(&adp->pdev->dev, "allocated %d elem\n", pool_size);
994
	return 0;
899
	return 0;
995
}
900
}
996
901
Lines 1019-1043 void crystalhd_delete_elem_pool(struct c Link Here
1019
		}
924
		}
1020
	} while (temp);
925
	} while (temp);
1021
926
1022
	BCMLOG(BCMLOG_DBG, "released %d elem\n", dbg_cnt);
927
	dev_dbg(&adp->pdev->dev, "released %d elem\n", dbg_cnt);
1023
}
928
}
1024
929
1025
/*================ Debug support routines.. ================================*/
930
/*================ Debug support routines.. ================================*/
1026
void crystalhd_show_buffer(uint32_t off, uint8_t *buff, uint32_t dwcount)
931
void crystalhd_show_buffer(uint32_t off, uint8_t *buff, uint32_t dwcount)
1027
{
932
{
933
	struct device *dev = chddev();
1028
	uint32_t i, k = 1;
934
	uint32_t i, k = 1;
1029
935
1030
	for (i = 0; i < dwcount; i++) {
936
	for (i = 0; i < dwcount; i++) {
1031
		if (k == 1)
937
		if (k == 1)
1032
			BCMLOG(BCMLOG_DATA, "0x%08X : ", off);
938
			dev_dbg(dev, "0x%08X : ", off);
1033
939
1034
		BCMLOG(BCMLOG_DATA, " 0x%08X ", *((uint32_t *)buff));
940
		dev_dbg(dev, " 0x%08X ", *((uint32_t *)buff));
1035
941
1036
		buff += sizeof(uint32_t);
942
		buff += sizeof(uint32_t);
1037
		off  += sizeof(uint32_t);
943
		off  += sizeof(uint32_t);
1038
		k++;
944
		k++;
1039
		if ((i == dwcount - 1) || (k > 4)) {
945
		if ((i == dwcount - 1) || (k > 4)) {
1040
			BCMLOG(BCMLOG_DATA, "\n");
946
			dev_dbg(dev, "\n");
1041
			k = 1;
947
			k = 1;
1042
		}
948
		}
1043
	}
949
	}
(-)crystalhd~/crystalhd_misc.h (-91 / +42 lines)
Lines 28-35 Link Here
28
#ifndef _CRYSTALHD_MISC_H_
28
#ifndef _CRYSTALHD_MISC_H_
29
#define _CRYSTALHD_MISC_H_
29
#define _CRYSTALHD_MISC_H_
30
30
31
#include "crystalhd.h"
32
33
#include <linux/module.h>
31
#include <linux/module.h>
34
#include <linux/kernel.h>
32
#include <linux/kernel.h>
35
#include <linux/errno.h>
33
#include <linux/errno.h>
Lines 37-46 Link Here
37
#include <linux/ioctl.h>
35
#include <linux/ioctl.h>
38
#include <linux/dma-mapping.h>
36
#include <linux/dma-mapping.h>
39
#include <linux/sched.h>
37
#include <linux/sched.h>
38
/*#include <asm/system.h>*/
40
#include "bc_dts_glob_lnx.h"
39
#include "bc_dts_glob_lnx.h"
40
#include "crystalhd_hw.h"
41
41
42
/* Global log level variable defined in crystal_misc.c file */
42
/* forward declare */
43
extern uint32_t g_linklog_level;
43
struct crystalhd_hw;
44
44
45
/* Global element pool for all Queue management.
45
/* Global element pool for all Queue management.
46
 * TX: Active = BC_TX_LIST_CNT, Free = BC_TX_LIST_CNT.
46
 * TX: Active = BC_TX_LIST_CNT, Free = BC_TX_LIST_CNT.
Lines 55-61 extern uint32_t g_linklog_level; Link Here
55
/* Scatter Gather memory pool size for Tx and Rx */
55
/* Scatter Gather memory pool size for Tx and Rx */
56
#define BC_LINK_SG_POOL_SZ    (BC_TX_LIST_CNT + BC_RX_LIST_CNT)
56
#define BC_LINK_SG_POOL_SZ    (BC_TX_LIST_CNT + BC_RX_LIST_CNT)
57
57
58
enum crystalhd_dio_sig {
58
enum _crystalhd_dio_sig {
59
	crystalhd_dio_inv = 0,
59
	crystalhd_dio_inv = 0,
60
	crystalhd_dio_locked,
60
	crystalhd_dio_locked,
61
	crystalhd_dio_sg_mapped,
61
	crystalhd_dio_sg_mapped,
Lines 78-104 struct crystalhd_dio_user_info { Link Here
78
};
78
};
79
79
80
struct crystalhd_dio_req {
80
struct crystalhd_dio_req {
81
	uint32_t			sig;
81
	uint32_t						sig;
82
	uint32_t			max_pages;
82
	uint32_t						max_pages;
83
	struct page			**pages;
83
	struct page						**pages;
84
	struct scatterlist		*sg;
84
	struct scatterlist				*sg;
85
	int				sg_cnt;
85
	int								sg_cnt;
86
	int				page_cnt;
86
	int								page_cnt;
87
	int				direction;
87
	int								direction;
88
	struct crystalhd_dio_user_info	uinfo;
88
	struct crystalhd_dio_user_info	uinfo;
89
	void				*fb_va;
89
	void							*fb_va;
90
	uint32_t			fb_size;
90
	uint32_t						fb_size;
91
	dma_addr_t			fb_pa;
91
	dma_addr_t						fb_pa;
92
	struct crystalhd_dio_req	*next;
92
	void							*pib_va; /* pointer to temporary buffer to extract metadata */
93
	struct crystalhd_dio_req		*next;
93
};
94
};
94
95
95
#define BC_LINK_DIOQ_SIG	(0x09223280)
96
#define BC_LINK_DIOQ_SIG	(0x09223280)
96
97
97
struct crystalhd_elem {
98
struct crystalhd_elem {
98
	struct crystalhd_elem	*flink;
99
	struct crystalhd_elem		*flink;
99
	struct crystalhd_elem	*blink;
100
	struct crystalhd_elem		*blink;
100
	void			*data;
101
	void				*data;
101
	uint32_t		tag;
102
	uint32_t			tag;
102
};
103
};
103
104
104
typedef void (*crystalhd_data_free_cb)(void *context, void *data);
105
typedef void (*crystalhd_data_free_cb)(void *context, void *data);
Lines 106-113 typedef void (*crystalhd_data_free_cb)(v Link Here
106
struct crystalhd_dioq {
107
struct crystalhd_dioq {
107
	uint32_t		sig;
108
	uint32_t		sig;
108
	struct crystalhd_adp	*adp;
109
	struct crystalhd_adp	*adp;
109
	struct crystalhd_elem		*head;
110
	struct crystalhd_elem	*head;
110
	struct crystalhd_elem		*tail;
111
	struct crystalhd_elem	*tail;
111
	uint32_t		count;
112
	uint32_t		count;
112
	spinlock_t		lock;
113
	spinlock_t		lock;
113
	wait_queue_head_t	event;
114
	wait_queue_head_t	event;
Lines 116-142 struct crystalhd_dioq { Link Here
116
};
117
};
117
118
118
typedef void (*hw_comp_callback)(struct crystalhd_dio_req *,
119
typedef void (*hw_comp_callback)(struct crystalhd_dio_req *,
119
				 wait_queue_head_t *event, enum BC_STATUS sts);
120
				 wait_queue_head_t *event, BC_STATUS sts);
120
121
121
/*========= Decoder (7412) register access routines.================= */
122
/*========== PCIe Config access routines.================*/
122
uint32_t bc_dec_reg_rd(struct crystalhd_adp *, uint32_t);
123
BC_STATUS crystalhd_pci_cfg_rd(struct crystalhd_adp *, uint32_t, uint32_t, uint32_t *);
123
void bc_dec_reg_wr(struct crystalhd_adp *, uint32_t, uint32_t);
124
BC_STATUS crystalhd_pci_cfg_wr(struct crystalhd_adp *, uint32_t, uint32_t, uint32_t);
124
125
/*========= Link (70012) register access routines.. =================*/
126
uint32_t crystalhd_reg_rd(struct crystalhd_adp *, uint32_t);
127
void crystalhd_reg_wr(struct crystalhd_adp *, uint32_t, uint32_t);
128
129
/*========= Decoder (7412) memory access routines..=================*/
130
enum BC_STATUS crystalhd_mem_rd(struct crystalhd_adp *,
131
			 uint32_t, uint32_t, uint32_t *);
132
enum BC_STATUS crystalhd_mem_wr(struct crystalhd_adp *,
133
			 uint32_t, uint32_t, uint32_t *);
134
135
/*==========Link (70012) PCIe Config access routines.================*/
136
enum BC_STATUS crystalhd_pci_cfg_rd(struct crystalhd_adp *,
137
			 uint32_t, uint32_t, uint32_t *);
138
enum BC_STATUS crystalhd_pci_cfg_wr(struct crystalhd_adp *,
139
			 uint32_t, uint32_t, uint32_t);
140
125
141
/*========= Linux Kernel Interface routines. ======================= */
126
/*========= Linux Kernel Interface routines. ======================= */
142
void *bc_kern_dma_alloc(struct crystalhd_adp *, uint32_t, dma_addr_t *);
127
void *bc_kern_dma_alloc(struct crystalhd_adp *, uint32_t, dma_addr_t *);
Lines 147-157 void bc_kern_dma_free(struct crystalhd_a Link Here
147
#define crystalhd_wait_on_event(ev, condition, timeout, ret, nosig)	\
132
#define crystalhd_wait_on_event(ev, condition, timeout, ret, nosig)	\
148
do {									\
133
do {									\
149
	DECLARE_WAITQUEUE(entry, current);				\
134
	DECLARE_WAITQUEUE(entry, current);				\
150
	unsigned long end = jiffies + ((timeout * HZ) / 1000);		\
135
	unsigned long end = jiffies + msecs_to_jiffies(timeout);		\
151
		ret = 0;						\
136
		ret = 0;						\
152
	add_wait_queue(ev, &entry);					\
137
	add_wait_queue(ev, &entry);					\
153
	for (;;) {							\
138
	for (;;) {									\
154
		__set_current_state(TASK_INTERRUPTIBLE);		\
139
		set_current_state(TASK_INTERRUPTIBLE);		\
155
		if (condition) {					\
140
		if (condition) {					\
156
			break;						\
141
			break;						\
157
		}							\
142
		}							\
Lines 165-232 do { \ Link Here
165
			break;						\
150
			break;						\
166
		}							\
151
		}							\
167
	}								\
152
	}								\
168
	__set_current_state(TASK_RUNNING);				\
153
	set_current_state(TASK_RUNNING);				\
169
	remove_wait_queue(ev, &entry);					\
154
	remove_wait_queue(ev, &entry);					\
170
} while (0)
155
} while (0)
171
156
172
/*================ Direct IO mapping routines ==================*/
157
/*================ Direct IO mapping routines ==================*/
173
extern int crystalhd_create_dio_pool(struct crystalhd_adp *, uint32_t);
158
extern int crystalhd_create_dio_pool(struct crystalhd_adp *, uint32_t);
174
extern void crystalhd_destroy_dio_pool(struct crystalhd_adp *);
159
extern void crystalhd_destroy_dio_pool(struct crystalhd_adp *);
175
extern enum BC_STATUS crystalhd_map_dio(struct crystalhd_adp *, void *,
160
extern BC_STATUS crystalhd_map_dio(struct crystalhd_adp *, void *, uint32_t,
176
		 uint32_t, uint32_t, bool, bool, struct crystalhd_dio_req**);
161
				   uint32_t, bool, bool, struct crystalhd_dio_req**);
177
162
178
extern enum BC_STATUS crystalhd_unmap_dio(struct crystalhd_adp *,
163
extern BC_STATUS crystalhd_unmap_dio(struct crystalhd_adp *, struct crystalhd_dio_req*);
179
					 struct crystalhd_dio_req*);
164
#define crystalhd_get_sgle_paddr(_dio, _ix) (cpu_to_le64(sg_dma_address(&_dio->sg[_ix])))
180
#define crystalhd_get_sgle_paddr(_dio, _ix) (sg_dma_address(&_dio->sg[_ix]))
165
#define crystalhd_get_sgle_len(_dio, _ix) (cpu_to_le32(sg_dma_len(&_dio->sg[_ix])))
181
#define crystalhd_get_sgle_len(_dio, _ix) (sg_dma_len(&_dio->sg[_ix]))
182
166
183
/*================ General Purpose Queues ==================*/
167
/*================ General Purpose Queues ==================*/
184
extern enum BC_STATUS crystalhd_create_dioq(struct crystalhd_adp *,
168
extern BC_STATUS crystalhd_create_dioq(struct crystalhd_adp *, struct crystalhd_dioq **, crystalhd_data_free_cb , void *);
185
		 struct crystalhd_dioq **, crystalhd_data_free_cb , void *);
169
extern void crystalhd_delete_dioq(struct crystalhd_adp *, struct crystalhd_dioq *);
186
extern void crystalhd_delete_dioq(struct crystalhd_adp *,
170
extern BC_STATUS crystalhd_dioq_add(struct crystalhd_dioq *ioq, void *data, bool wake, uint32_t tag);
187
		 struct crystalhd_dioq *);
188
extern enum BC_STATUS crystalhd_dioq_add(struct crystalhd_dioq *ioq,
189
		 void *data, bool wake, uint32_t tag);
190
extern void *crystalhd_dioq_fetch(struct crystalhd_dioq *ioq);
171
extern void *crystalhd_dioq_fetch(struct crystalhd_dioq *ioq);
191
extern void *crystalhd_dioq_find_and_fetch(struct crystalhd_dioq *ioq,
172
extern void *crystalhd_dioq_find_and_fetch(struct crystalhd_dioq *ioq, uint32_t tag);
192
		 uint32_t tag);
173
extern void *crystalhd_dioq_fetch_wait(struct crystalhd_hw *hw, uint32_t to_secs, uint32_t *sig_pend);
193
extern void *crystalhd_dioq_fetch_wait(struct crystalhd_dioq *ioq,
194
		 uint32_t to_secs, uint32_t *sig_pend);
195
174
196
#define crystalhd_dioq_count(_ioq)	((_ioq) ? _ioq->count : 0)
175
#define crystalhd_dioq_count(_ioq)	((_ioq) ? _ioq->count : 0)
197
176
198
extern int crystalhd_create_elem_pool(struct crystalhd_adp *, uint32_t);
177
extern int crystalhd_create_elem_pool(struct crystalhd_adp *, uint32_t);
199
extern void crystalhd_delete_elem_pool(struct crystalhd_adp *);
178
extern void crystalhd_delete_elem_pool(struct crystalhd_adp *);
200
179
201
202
/*================ Debug routines/macros .. ================================*/
180
/*================ Debug routines/macros .. ================================*/
203
extern void crystalhd_show_buffer(uint32_t off, uint8_t *buff,
181
extern void crystalhd_show_buffer(uint32_t off, uint8_t *buff, uint32_t dwcount);
204
		 uint32_t dwcount);
205
206
enum _chd_log_levels {
207
	BCMLOG_ERROR		= 0x80000000,	/* Don't disable this option */
208
	BCMLOG_DATA		= 0x40000000,	/* Data, enable by default */
209
	BCMLOG_SPINLOCK		= 0x20000000,	/* Special case for Spin locks*/
210
211
	/* Following are allowed only in debug mode */
212
	BCMLOG_INFO		= 0x00000001,	/* Generic informational */
213
	BCMLOG_DBG		= 0x00000002,	/* First level Debug info */
214
	BCMLOG_SSTEP		= 0x00000004,	/* Stepping information */
215
};
216
217
218
#define BCMLOG(trace, fmt, args...)	\
219
do {					\
220
	if (g_linklog_level & trace)	\
221
		printk(fmt, ##args);	\
222
} while (0)
223
224
225
#define BCMLOG_ERR(fmt, args...)				\
226
do {								\
227
	if (g_linklog_level & BCMLOG_ERROR)			\
228
		printk(KERN_ERR "*ERR*:%s:%d: "fmt,		\
229
				__FILE__, __LINE__, ##args);	\
230
} while (0)
231
182
232
#endif
183
#endif
(-)crystalhd~/DriverFwShare.h (+95 lines)
Line 0 Link Here
1
#ifndef _DRIVER_FW_SHARE_
2
#define _DRIVER_FW_SHARE_
3
4
#ifndef USE_MULTI_DECODE_DEFINES
5
#define HOST_TO_FW_PIC_DEL_INFO_ADDR		0x400	/*Original single Decode Offset*/
6
#else
7
#if 0
8
#define HOST_TO_FW_PIC_DEL_INFO_ADDR		0x200	/*New offset that we plan to use eventually*/
9
#endif
10
#define HOST_TO_FW_PIC_DEL_INFO_ADDR		0x400	/*This is just for testing..remove this once tested */
11
#endif
12
13
14
/*
15
 * The TX address does not change between the
16
 * single decode and multiple decode.
17
 */
18
#define TX_BUFF_UPDATE_ADDR					0x300	/*This is relative to BORCH */
19
20
typedef
21
struct
22
_PIC_DELIVERY_HOST_INFO_
23
{
24
/*
25
-- The list ping-pong code is already there in the driver
26
-- to save from re-inventing the code, the driver will indicate
27
-- to firmware on which list the command should be posted.
28
 */
29
	unsigned int ListIndex;
30
	unsigned int HostDescMemLowAddr_Y;
31
	unsigned int HostDescMemHighAddr_Y;
32
	unsigned int HostDescMemLowAddr_UV;
33
	unsigned int HostDescMemHighAddr_UV;
34
	unsigned int RxSeqNumber;
35
	unsigned int ChannelID;
36
	unsigned int Reserved[1];
37
}PIC_DELIVERY_HOST_INFO,
38
*PPIC_DELIVERY_HOST_INFO;
39
40
/*
41
-- We write the driver's FLL to this memory location.
42
-- This is the array for FLL of all the channels.
43
*/
44
#define HOST_TO_FW_FLL_ADDR			(HOST_TO_FW_PIC_DEL_INFO_ADDR + sizeof(PIC_DELIVERY_HOST_INFO))
45
46
47
typedef enum _DRIVER_FW_FLAGS_{
48
	DFW_FLAGS_CLEAR			=0,
49
	DFW_FLAGS_TX_ABORT		=BC_BIT(0),	/*Firmware is stopped and will not give anymore buffers. */
50
	DFW_FLAGS_WRAP			=BC_BIT(1)	/*Instruct the Firmware to WRAP the input buffer pointer */
51
}DRIVER_FW_FLAGS;
52
53
typedef struct
54
_TX_INPUT_BUFFER_INFO_
55
{
56
	unsigned int DramBuffAdd;			/* Address of the DRAM buffer where the data can be pushed*/
57
	unsigned int DramBuffSzInBytes;		/* Size of the available DRAM buffer, in bytes*/
58
	unsigned int HostXferSzInBytes;		/* Actual Transfer Done By Host, In Bytes*/
59
	unsigned int Flags;					/* DRIVER_FW_FLAGS Written By Firmware to handle Stop of TX*/
60
	unsigned int SeqNum;				/* Sequence number of the tranfer that is done. Read-Modify-Write*/
61
	unsigned int ChannelID;				/* To which Channel this buffer belongs to*/
62
	unsigned int Reserved[2];
63
}TX_INPUT_BUFFER_INFO,
64
*PTX_INPUT_BUFFER_INFO;
65
66
67
/*
68
-- Out of band firmware handshake.
69
=====================================
70
-- The driver writes the SCRATCH-8 register with a Error code.
71
-- The driver then writes a mailbox register with 0x01.
72
-- The driver then polls for the ACK. This ack is if the value of the SCRATCH-8 becomes zero.
73
*/
74
75
#define OOB_ERR_CODE_BASE		70015
76
typedef enum _OUT_OF_BAND_ERR_CODE_
77
{
78
	OOB_INVALID				= 0,
79
	OOB_CODE_ACK			= OOB_ERR_CODE_BASE,
80
	OOB_CODE_STOPRX			= OOB_ERR_CODE_BASE + 1,
81
}OUT_OF_BAND_ERR_CODE;
82
83
84
#define OOB_CMD_RESPONSE_REGISTER		BCHP_ARMCR4_BRIDGE_REG_SCRATCH_8
85
#define OOB_PCI_TO_ARM_MBOX				BCHP_ARMCR4_BRIDGE_REG_MBOX_ARM3
86
#define TX_BUFFER_AVAILABLE_INTR		BCHP_ARMCR4_BRIDGE_REG_MBOX_PCI3
87
#define HEART_BEAT_REGISTER				BCHP_ARMCR4_BRIDGE_REG_SCRATCH_1
88
#define HEART_BEAT_POLL_CNT				5
89
90
91
#define FLEA_WORK_AROUND_SIG			0xF1EA
92
#define RX_PIC_Q_STS_WRKARND			BC_BIT(0)
93
#define RX_DRAM_WRITE_WRKARND			BC_BIT(1)
94
#define RX_MBOX_WRITE_WRKARND			BC_BIT(2)
95
#endif
(-)crystalhd~/FleaDefs.h (+188 lines)
Line 0 Link Here
1
#ifndef _FLEA_DEFS_
2
#define _FLEA_DEFS_
3
4
/*
5
* Include a whole bunch of RDB files for register definitions
6
*/
7
#include "bcm_70015_regs.h"
8
9
/* Assume we have 64MB DRam */
10
#define FLEA_TOTAL_DRAM_SIZE		64*1024*1024
11
#define FLEA_GISB_DIRECT_BASE		0x50
12
13
/*- These definition of the ADDRESS and DATA
14
  - Registers are not there in RDB.
15
 */
16
#define FLEA_GISB_INDIRECT_ADDRESS	0xFFF8
17
#define FLEA_GISB_INDIRECT_DATA		0xFFFC
18
19
/*
20
 * POLL count for Flea.
21
 */
22
#define FLEA_MAX_POLL_CNT		1000
23
24
/*
25
 -- Flea Firmware Signature length (128 bit)
26
 */
27
#define FLEA_FW_SIG_LEN_IN_BYTES	16
28
#define LENGTH_FIELD_SIZE			4
29
#define FLEA_FW_SIG_LEN_IN_DWORD	(FLEA_FW_SIG_LEN_IN_BYTES/4)
30
#define FW_DOWNLOAD_START_ADDR		0
31
32
/*
33
 * Some macros to ease the bit specification from RDB
34
 */
35
#define SCRAM_KEY_DONE_INT_BIT	BC_BIT(BCHP_WRAP_MISC_INTR2_CPU_STATUS_SCRM_KEY_DONE_INTR_SHIFT)
36
#define BOOT_VER_DONE_BIT		BC_BIT(BCHP_WRAP_MISC_INTR2_CPU_STATUS_BOOT_VER_DONE_INTR_SHIFT)
37
#define BOOT_VER_FAIL_BIT		BC_BIT(BCHP_WRAP_MISC_INTR2_CPU_STATUS_BOOT_VER_FAIL_INTR_SHIFT)
38
#define SHARF_ERR_INTR			BC_BIT(BCHP_WRAP_MISC_INTR2_CPU_STATUS_SHARF_ERR_INTR_SHIFT)
39
#define SCRUB_ENABLE_BIT		BC_BIT(BCHP_SCRUB_CTRL_SCRUB_ENABLE_SCRUB_EN_SHIFT)
40
#define DRAM_SCRAM_ENABLE_BIT	BC_BIT(BCHP_SCRUB_CTRL_SCRUB_ENABLE_DSCRAM_EN_SHIFT)
41
#define ARM_RUN_REQ_BIT			BC_BIT(BCHP_ARMCR4_BRIDGE_REG_BRIDGE_CTL_arm_run_request_SHIFT)
42
#define GetScrubEndAddr(_Sz)	((FW_DOWNLOAD_START_ADDR + (_Sz - FLEA_FW_SIG_LEN_IN_BYTES -LENGTH_FIELD_SIZE-1))& (BCHP_SCRUB_CTRL_BORCH_END_ADDRESS_BORCH_END_ADDR_MASK))
43
44
/*
45
-- Firmware Command Interface Definitions.
46
-- We use BCHP_ARMCR4_BRIDGE_REG_MBOX_PCI1 as host to FW mailbox.
47
-- We use BCHP_ARMCR4_BRIDGE_REG_MBOX_ARM1 as FW to Host mailbox.
48
*/
49
50
/* Address where the command parameters are written. */
51
#define DDRADDR_4_FWCMDS		0x100
52
53
/* */
54
/* mailbox used for passing the FW Command address (DDR address) to */
55
/* firmware. */
56
/* */
57
#define FW_CMD_POST_MBOX		BCHP_ARMCR4_BRIDGE_REG_MBOX_ARM1
58
59
/* Once we get a firmware command done interrupt, */
60
/* we will need to get the address of the response. */
61
/* This mailbox is written by FW before asserting the */
62
/* firmware command done interrupt. */
63
#define FW_CMD_RES_MBOX			BCHP_ARMCR4_BRIDGE_REG_MBOX_PCI1
64
65
/*
66
-- RxDMA Picture QStatus Mailbox.
67
-- RxDMA Picture Post Mailbox. < Write DDR address to this mailbox >
68
 */
69
#define RX_DMA_PIC_QSTS_MBOX		BCHP_ARMCR4_BRIDGE_REG_MBOX_PCI2
70
#define RX_POST_MAILBOX				BCHP_ARMCR4_BRIDGE_REG_MBOX_ARM2
71
#define RX_POST_CONFIRM_SCRATCH		BCHP_ARMCR4_BRIDGE_REG_SCRATCH_5
72
#define RX_START_SEQ_NUMBER			1
73
#define INDICATE_TX_DONE_REG		BCHP_ARMCR4_BRIDGE_REG_SCRATCH_9
74
75
/*
76
-- At the end of the picture frame there is the Link's Y0 data
77
-- and there is Width data. The driver will copy this 32 bit data to Y[0]
78
-- location. This makes the Flea PIB compatible with Link.
79
-- Also note that Flea is capable of putting out the odd size picture widths
80
-- so the PicWidth field is the actual picture width of the picture. In link
81
-- We were only getting 1920,1280 or 720 as picture widths.
82
*/
83
#define PIC_PIB_DATA_OFFSET_FROM_END	4
84
#define PIC_PIB_DATA_SIZE_IN_BYTES		4	/*The data that use to be in Y[0] component */
85
#define PIC_WIDTH_OFFSET_FROM_END		8	/*Width information for the driver. */
86
#define PIC_WIDTH_DATA_SIZE_IN_BYTES	4	/*Width information for the driver. */
87
88
/*
89
-- The format change PIB comes in a dummy frame now.
90
-- The Width field has the format change flag (bit-31) which
91
-- the driver uses to detect the format change now.
92
*/
93
#define PIB_FORMAT_CHANGE_BIT			BC_BIT(31)
94
#define PIB_EOS_DETECTED_BIT			BC_BIT(30)
95
96
#define FLEA_DECODE_ERROR_FLAG			0x800
97
98
/*
99
-- Interrupt Mask, Set and Clear registers are exactly
100
-- same as the interrupt status register. We will
101
-- Use the following union for all the registers.
102
*/
103
104
union FLEA_INTR_BITS_COMMON
105
{
106
	struct
107
	{
108
		uint32_t	L0TxDMADone:1;		/* Bit-0 */
109
		uint32_t	L0TxDMAErr:1;		/* Bit-1 */
110
		uint32_t	L0YRxDMADone:1;		/* Bit-2 */
111
		uint32_t	L0YRxDMAErr:1;		/* Bit-3 */
112
		uint32_t	L0UVRxDMADone:1;	/* Bit-4 */
113
		uint32_t	L0UVRxDMAErr:1;		/* Bit-5 */
114
		uint32_t	Reserved1:2;		/* Bit-6-7 */
115
		uint32_t	L1TxDMADone:1;		/* Bit-8 */
116
		uint32_t	L1TxDMAErr:1;		/* Bit-9 */
117
		uint32_t	L1YRxDMADone:1;		/* Bit-10 */
118
		uint32_t	L1YRxDMAErr:1;		/* Bit-11 */
119
		uint32_t	L1UVRxDMADone:1;	/* Bit-12 */
120
		uint32_t	L1UVRxDMAErr:1;		/* Bit-13 */
121
		uint32_t	Reserved2:2;		/* Bit-14-15 */
122
		uint32_t	ArmMbox0Int:1;		/* Bit-16 */
123
		uint32_t	ArmMbox1Int:1;		/* Bit-17 */
124
		uint32_t	ArmMbox2Int:1;		/* Bit-18 */
125
		uint32_t	ArmMbox3Int:1;		/* Bit-19 */
126
		uint32_t	Reserved3:4;		/* Bit-20-23 */
127
		uint32_t	PcieTgtUrAttn:1;	/* Bit-24 */
128
		uint32_t	PcieTgtCaAttn:1;	/* Bit-25 */
129
		uint32_t	HaltIntr:1;			/* Bit-26 */
130
		uint32_t	Reserved4:5;			/* Bit-27-31 */
131
	};
132
133
	 uint32_t	WholeReg;
134
};
135
136
/*
137
================================================================
138
-- Flea power state machine
139
-- FLEA_PS_NONE
140
--	Enter to this state when system boots up and device is not open.
141
-- FLEA_PS_ACTIVE:
142
--	1. Set when the device is started and FW downloaded.
143
--	2. We come to this state from FLEA_PS_LP_COMPLETE when
144
--		2.a Free list length becomes greater than X. [Same As Internal Pause Sequence]
145
--		2.b There is a firmware command issued.
146
--  3. We come to this state from FLEA_PS_LP_PENDING when
147
--		3.a Free list length becomes greater than X. [Same As Internal Pause Sequence]
148
--		3.b There is a firmware command Issued.
149
-- FLEA_PS_LP_PENDING
150
--	1. Enter to this state from FLEA_PS_ACTIVE
151
--		1.a FLL becomes greater less than Y[Same as Internal Resume].
152
-- FLEA_PS_LP_COMPLETE
153
--	1. Enter in to this state from FLEA_PS_LP_PENDING
154
--		1.a There are no Pending TX, RX, and FW Command.
155
--	2. Enter to This state when the handle is closed.
156
--  3. Enter to this state From ACTIVE
157
--		3.a FLL < Y.
158
--		3.b There is no TX,RX and FW pending.
159
--  4. Enter this state when RX is not running, either before it is started or after it is stopped.
160
=================================================================
161
*/
162
163
enum FLEA_POWER_STATES {
164
	FLEA_PS_NONE=0,
165
	FLEA_PS_STOPPED,
166
	FLEA_PS_ACTIVE,
167
	FLEA_PS_LP_PENDING,
168
	FLEA_PS_LP_COMPLETE
169
};
170
171
enum FLEA_STATE_CH_EVENT {
172
	FLEA_EVT_NONE=0,
173
	FLEA_EVT_START_DEVICE,
174
	FLEA_EVT_STOP_DEVICE,
175
	FLEA_EVT_FLL_CHANGE,
176
	FLEA_EVT_FW_CMD_POST,
177
	FLEA_EVT_CMD_COMP
178
};
179
180
#define TEST_BIT(_value_,_bit_number_)	(_value_ & (0x00000001 << _bit_number_))
181
182
#define CLEAR_BIT(_value_,_bit_number_)\
183
{_value_ = _value_ & (~(0x00000001 << _bit_number_));}
184
185
#define SET_BIT(_value_,_bit_number_)\
186
{_value_ |=  (0x01 << _bit_number_);}
187
188
#endif
(-)crystalhd~/Makefile (+3 lines)
Lines 3-6 obj-$(CONFIG_CRYSTALHD) += crystalhd.o Link Here
3
crystalhd-y		:= crystalhd_cmds.o	\
3
crystalhd-y		:= crystalhd_cmds.o	\
4
			   crystalhd_hw.o	\
4
			   crystalhd_hw.o	\
5
			   crystalhd_lnx.o	\
5
			   crystalhd_lnx.o	\
6
			   crystalhd_linkfuncs.o \
7
			   crystalhd_fleafuncs.o \
8
			   crystalhd_flea_ddr.o \
6
			   crystalhd_misc.o
9
			   crystalhd_misc.o

Return to bug 29116