Training courses

Kernel and Embedded Linux

Bootlin training courses

Embedded Linux, kernel,
Yocto Project, Buildroot, real-time,
graphics, boot time, debugging...

Bootlin logo

Elixir Cross Referencer

  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
/* $Id: imx23_emireg.h,v 1.1 2012/11/20 19:06:13 jkunz Exp $ */

/*
 * Copyright (c) 2012 The NetBSD Foundation, Inc.
 * All rights reserved.
 *
 * This code is derived from software contributed to The NetBSD Foundation
 * by Petri Laakso.
 *
 * Redistribution and use in source and binary forms, with or without
 * modification, are permitted provided that the following conditions
 * are met:
 * 1. Redistributions of source code must retain the above copyright
 *    notice, this list of conditions and the following disclaimer.
 * 2. Redistributions in binary form must reproduce the above copyright
 *    notice, this list of conditions and the following disclaimer in the
 *    documentation and/or other materials provided with the distribution.
 *
 * THIS SOFTWARE IS PROVIDED BY THE NETBSD FOUNDATION, INC. AND CONTRIBUTORS
 * ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
 * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
 * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL THE FOUNDATION OR CONTRIBUTORS
 * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
 * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
 * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
 * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
 * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
 * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
 * POSSIBILITY OF SUCH DAMAGE.
 */

#ifndef _ARM_IMX_IMX23_EMIREG_H_
#define _ARM_IMX_IMX23_EMIREG_H_

#include <sys/cdefs.h>

#define HW_EMI_CTRL_BASE 0x80020000
#define HW_DRAM_BASE 0x800E0000

/*
 * EMI Control Register.
 */
#define HW_EMI_CTRL	0x000
#define HW_EMI_CTRL_SET	0x004
#define HW_EMI_CTRL_CLR	0x008
#define HW_EMI_CTRL_TOG	0x00C

#define HW_EMI_CTRL_SFTRST		__BIT(31)
#define HW_EMI_CTRL_RSVD6		__BIT(30)
#define HW_EMI_CTRL_TRAP_SR		__BIT(29)
#define HW_EMI_CTRL_TRAP_INIT		__BIT(28)
#define HW_EMI_CTRL_AXI_DEPTH		__BITS(27, 26)
#define HW_EMI_CTRL_DLL_SHIFT_RESET	__BIT(25)
#define HW_EMI_CTRL_DLL_RESET		__BIT(24)
#define HW_EMI_CTRL_ARB_MODE		__BITS(23, 22)
#define HW_EMI_CTRL_RSVD5		__BIT(21)
#define HW_EMI_CTRL_PORT_PRIORITY_ORDER	__BITS(20, 16)
#define HW_EMI_CTRL_RSVD4		__BIT(15)
#define HW_EMI_CTRL_PRIORITY_WRITE_ITER	__BITS(14, 12)
#define HW_EMI_CTRL_RSVD3		__BIT(11)
#define HW_EMI_CTRL_HIGH_PRIORITY_WRITE	__BITS(10, 8)
#define HW_EMI_CTRL_RSVD2		__BIT(7)
#define HW_EMI_CTRL_MEM_WIDTH		__BIT(6)
#define HW_EMI_CTRL_RSVD1		__BIT(5)
#define HW_EMI_CTRL_RESET_OUT		__BIT(4)
#define HW_EMI_CTRL_RSVD0		__BITS(3, 0)

/*
 * EMI Version Register.
 */
#define HW_EMI_VERSION	0x0F0

#define HW_EMI_VERSION_MAJOR	__BITS(31, 24)
#define HW_EMI_VERSION_MINOR	__BITS(23, 16)
#define HW_EMI_VERSION_STEP	__BITS(15, 0)

/*
 * DRAM Control Register 0.
 */
#define HW_DRAM_CTL00	0x000

#define HW_DRAM_CTL00_RSVD4			__BITS(31, 25)
#define HW_DRAM_CTL00_AHB0_W_PRIORITY		__BIT(24)
#define HW_DRAM_CTL00_RSVD3			__BITS(23, 17)
#define HW_DRAM_CTL00_AHB0_R_PRIORITY		__BIT(16)
#define HW_DRAM_CTL00_RSVD2			__BITS(15, 9)
#define HW_DRAM_CTL00_AHB0_FIFO_TYPE_REG	__BIT(8)
#define HW_DRAM_CTL00_RSVD1			__BITS(7, 1)
#define HW_DRAM_CTL00_ADDR_CMP_EN		__BIT(0)

/*
 * DRAM Control Register 1.
 */
#define HW_DRAM_CTL01	0x004

#define HW_DRAM_CTL01_RSVD4			__BITS(31, 25)
#define HW_DRAM_CTL01_AHB2_FIFO_TYPE_REG	__BIT(24)
#define HW_DRAM_CTL01_RSVD3			__BITS(23, 17)
#define HW_DRAM_CTL01_AHB1_W_PRIORITY		__BIT(16)
#define HW_DRAM_CTL01_RSVD2			__BITS(15, 9)
#define HW_DRAM_CTL01_AHB1_R_PRIORITY		__BIT(8)
#define HW_DRAM_CTL01_RSVD1			__BITS(7, 1)
#define HW_DRAM_CTL01_AHB1_FIFO_TYPE_REG	__BIT(0)

/*
 * DRAM Control Register 2.
 */
#define HW_DRAM_CTL02	0x008

#define HW_DRAM_CTL02_RSVD4			__BITS(31, 25)
#define HW_DRAM_CTL02_AHB3_R_PRIORITY		__BIT(24)
#define HW_DRAM_CTL02_RSVD3			__BITS(23, 17)
#define HW_DRAM_CTL02_AHB3_FIFO_TYPE_REG	__BIT(16)
#define HW_DRAM_CTL02_RSVD2			__BIT(15, 9)
#define HW_DRAM_CTL02_AHB2_W_PRIORITY		__BIT(8)
#define HW_DRAM_CTL02_RSVD1			__BITS(7, 1)
#define HW_DRAM_CTL02_AHB2_R_PRIORITY		__BIT(0)

/*
 * DRAM Control Register 3.
 */
#define HW_DRAM_CTL03	0x00c

#define HW_DRAM_CTL03_RSVD4		__BITS(31, 25)
#define HW_DRAM_CTL03_AUTO_REFRESH_MODE	__BIT(24)
#define HW_DRAM_CTL03_RSVD3		__BITS(23, 17)
#define HW_DRAM_CTL03_AREFRESH		__BIT(16)
#define HW_DRAM_CTL03_RSVD2		__BITS(15, 9)
#define HW_DRAM_CTL03_AP		__BIT(8)
#define HW_DRAM_CTL03_RSVD1		__BITS(7, 1)
#define HW_DRAM_CTL03_AHB3_W_PRIORITY	__BIT(0)

/*
 * DRAM Control Register 4.
 */
#define HW_DRAM_CTL04	0x010

#define HW_DRAM_CTL04_RSVD4		__BITS(31, 25)
#define HW_DRAM_CTL04_DLL_BYPASS_MODE	__BIT(24)
#define HW_DRAM_CTL04_RSVD3		__BITS(23, 17)
#define HW_DRAM_CTL04_DLLLOCKREG	__BIT(16)
#define HW_DRAM_CTL04_RSVD2		__BITS(15, 9)
#define HW_DRAM_CTL04_CONCURRENTAP	__BIT(8)
#define HW_DRAM_CTL04_RSVD1		__BITS(7, 1)
#define HW_DRAM_CTL04_BANK_SPLIT_EN	__BIT(0)

/*
 * DRAM Control Register 5.
 */
#define HW_DRAM_CTL05	0x014

#define HW_DRAM_CTL05_RSVD4		__BITS(31, 25)
#define HW_DRAM_CTL05_INTRPTREADA	__BIT(24)
#define HW_DRAM_CTL05_RSVD3		__BITS(23, 17)
#define HW_DRAM_CTL05_INTRPTAPBURST	__BIT(16)
#define HW_DRAM_CTL05_RSVD2		__BITS(15, 9)
#define HW_DRAM_CTL05_FAST_WRITE	__BIT(8)
#define HW_DRAM_CTL05_RSVD1		__BITS(7, 1)
#define HW_DRAM_CTL05_EN_LOWPOWER_MODE	__BIT(0)

/*
 * DRAM Control Register 6.
 */
#define HW_DRAM_CTL06	0x018

#define HW_DRAM_CTL06_RSVD4		__BITS(31, 25)
#define HW_DRAM_CTL06_POWER_DOWN	__BIT(24)
#define HW_DRAM_CTL06_RSVD3		__BITS(23, 17)
#define HW_DRAM_CTL06_PLACEMENT_EN	__BIT(16)
#define HW_DRAM_CTL06_RSVD2		__BITS(15, 9)
#define HW_DRAM_CTL06_NO_CMD_INIT	__BIT(8)
#define HW_DRAM_CTL06_RSVD1		__BITS(7, 1)
#define HW_DRAM_CTL06_INTRPTWRITEA	__BIT(0)

/*
 * DRAM Control Register 7.
 */
#define HW_DRAM_CTL07	0x01c

#define HW_DRAM_CTL07_RSVD4		__BITS(31, 25)
#define HW_DRAM_CTL07_RW_SAME_EN	__BIT(24)
#define HW_DRAM_CTL07_RSVD3		__BITS(23, 17)
#define HW_DRAM_CTL07_REG_DIMM_ENABLE	__BIT(16)
#define HW_DRAM_CTL07_RSVD2		__BITS(15, 9)
#define HW_DRAM_CTL07_RD2RD_TURN	__BIT(8)
#define HW_DRAM_CTL07_RSVD1		__BITS(7, 1)
#define HW_DRAM_CTL07_PRIORITY_EN	__BIT(0)

/*
 * DRAM Control Register 8.
 */
#define HW_DRAM_CTL08	0x020

#define HW_DRAM_CTL08_RSVD4		__BITS(31, 25)
#define HW_DRAM_CTL08_TRAS_LOCKOUT	__BIT(24)
#define HW_DRAM_CTL08_RSVD3		__BITS(23, 17)
#define HW_DRAM_CTL08_START		__BIT(16)
#define HW_DRAM_CTL08_RSVD2		__BITS(15, 9)
#define HW_DRAM_CTL08_SREFRESH		__BIT(8)
#define HW_DRAM_CTL08_RSVD1		__BITS(7, 1)
#define HW_DRAM_CTL08_SDR_MODE		__BIT(0)

/*
 * DRAM Control Register 9.
 */
#define HW_DRAM_CTL09	0x024

#define HW_DRAM_CTL09_RSVD4			__BITS(31, 26)
#define HW_DRAM_CTL09_OUT_OF_RANGE_TYPE		__BITS(25, 24)
#define HW_DRAM_CTL09_RSVD3			__BITS(23, 18)
#define HW_DRAM_CTL09_OUT_OF_RANGE_SOURCE_ID	__BITS(17, 16)
#define HW_DRAM_CTL09_RSVD2			__BITS(15, 9)
#define HW_DRAM_CTL09_WRITE_MODEREG		__BIT(8)
#define HW_DRAM_CTL09_RSVD1			__BITS(7, 1)
#define HW_DRAM_CTL09_WRITEINTERP		__BIT(0)

/*
 * DRAM Control Register 10.
 */
#define HW_DRAM_CTL10	0x028

#define HW_DRAM_CTL10_RSVD4		__BITS(31, 27)
#define HW_DRAM_CTL10_AGE_COUNT		__BITS(26, 24)
#define HW_DRAM_CTL10_RSVD3		__BITS(23, 19)
#define HW_DRAM_CTL10_ADDR_PINS		__BITS(18, 16)
#define HW_DRAM_CTL10_RSVD2		__BITS(15, 10)
#define HW_DRAM_CTL10_TEMRS		__BITS(9, 8)
#define HW_DRAM_CTL10_RSVD1		__BITS(7, 2)
#define HW_DRAM_CTL10_Q_FULLNESS	__BITS(1, 0)

/*
 * DRAM Control Register 11.
 */
#define HW_DRAM_CTL11	0x02c

#define HW_DRAM_CTL11_RSVD4		__BITS(31, 27)
#define HW_DRAM_CTL11_MAX_CS_REG	__BITS(26, 24)
#define HW_DRAM_CTL11_RSVD3		__BITS(23, 19)
#define HW_DRAM_CTL11_COMMAND_AGE_COUNT	__BITS(18, 16)
#define HW_DRAM_CTL11_RSVD2		__BITS(15, 11)
#define HW_DRAM_CTL11_COLUMN_SIZE	__BITS(10, 8)
#define HW_DRAM_CTL11_RSVD1		__BITS(7, 3)
#define HW_DRAM_CTL11_CASLAT		__BITS(2, 0)

/*
 * DRAM Control Register 12.
 */
#define HW_DRAM_CTL12	0x030

#define HW_DRAM_CTL12_RSVD3	__BITS(31, 27)
#define HW_DRAM_CTL12_TWR_INT	__BITS(26, 24)
#define HW_DRAM_CTL12_RSVD2	__BITS(23, 19)
#define HW_DRAM_CTL12_TRRD	__BITS(18 ,16)
#define HW_DRAM_CTL12_OBSOLETE	__BITS(15, 8)
#define HW_DRAM_CTL12_RSVD1	__BITS(7, 3)
#define HW_DRAM_CTL12_TCKE	__BITS(2, 0)

/*
 * DRAM Control Register 13.
 */
#define HW_DRAM_CTL13	0x034

#define HW_DRAM_CTL13_RSVD4		__BITS(31, 28)
#define HW_DRAM_CTL13_CASLAT_LIN_GATE	__BITS(27, 24)
#define HW_DRAM_CTL13_RSVD3		__BITS(23, 20)
#define HW_DRAM_CTL13_CASLAT_LIN	__BITS(19, 16)
#define HW_DRAM_CTL13_RSVD2		__BITS(15, 12)
#define HW_DRAM_CTL13_APREBIT		__BITS(11, 8)
#define HW_DRAM_CTL13_RSVD1		__BITS(7, 3)
#define HW_DRAM_CTL13_TWTR		__BITS(2, 0)

/*
 * DRAM Control Register 14.
 */
#define HW_DRAM_CTL14	0x038

#define HW_DRAM_CTL14_RSVD4			__BITS(31, 28)
#define HW_DRAM_CTL14_MAX_COL_REG		__BITS(27, 24)
#define HW_DRAM_CTL14_RSVD3			__BITS(23, 20)
#define HW_DRAM_CTL14_LOWPOWER_REFRESH_ENABLE	__BITS(19, 16)
#define HW_DRAM_CTL14_RSVD2			__BITS(15, 12)
#define HW_DRAM_CTL14_INITAREF			__BITS(11, 8)
#define HW_DRAM_CTL14_RSVD1			__BITS(7, 4)
#define HW_DRAM_CTL14_CS_MAP			__BITS(3, 0)

/*
 * DRAM Control Register 15.
 */
#define HW_DRAM_CTL15	0x03c

#define HW_DRAM_CTL15_RSVD4		__BITS(31, 28)
#define HW_DRAM_CTL15_TRP		__BITS(27, 24)
#define HW_DRAM_CTL15_RSVD3		__BITS(23, 20)
#define HW_DRAM_CTL15_TDAL		__BITS(19, 16)
#define HW_DRAM_CTL15_RSVD2		__BITS(15, 12)
#define HW_DRAM_CTL15_PORT_BUSY		__BITS(11, 8)
#define HW_DRAM_CTL15_RSVD1		__BITS(7, 4)
#define HW_DRAM_CTL15_MAX_ROW_REG	__BITS(3, 0)

/*
 * DRAM Control Register 16.
 */
#define HW_DRAM_CTL16	0x040

#define HW_DRAM_CTL16_RSVD4			__BITS(31, 29)
#define HW_DRAM_CTL16_TMRD			__BITS(28, 24)
#define HW_DRAM_CTL16_RSVD3			__BITS(23, 21)
#define HW_DRAM_CTL16_LOWPOWER_CONTROL		__BITS(20, 16)
#define HW_DRAM_CTL16_RSVD2			__BITS(15, 13)
#define HW_DRAM_CTL16_LOWPOWER_AUTO_ENABLE	__BITS(12, 8)
#define HW_DRAM_CTL16_RSVD1			__BITS(7, 4)
#define HW_DRAM_CTL16_INT_ACK			__BITS(3, 0)

/*
 * DRAM Control Register 17.
 */
#define HW_DRAM_CTL17	0x044

#define HW_DRAM_CTL17_DLL_START_POINT	__BITS(31, 24)
#define HW_DRAM_CTL17_DLL_LOCK		__BITS(23, 16)
#define HW_DRAM_CTL17_DLL_INCREMENT	__BITS(15, 8)
#define HW_DRAM_CTL17_RSVD1		__BITS(7, 5)
#define HW_DRAM_CTL17_TRC		__BITS(4, 0)

/*
 * DRAM Control Register 18.
 */
#define HW_DRAM_CTL18	0x048

#define HW_DRAM_CTL18_RSVD4			__BIT(31)
#define HW_DRAM_CTL18_DLL_DQS_DELAY_1		__BITS(30, 24)
#define HW_DRAM_CTL18_RSVD3			__BIT(23)
#define HW_DRAM_CTL18_DLL_DQS_DELAY_0		__BITS(22, 16)
#define HW_DRAM_CTL18_RSVD2			__BITS(15, 13)
#define HW_DRAM_CTL18_INT_STATUS		__BITS(12, 8)
#define HW_DRAM_CTL18_RSVD1			__BITS(7, 5)
#define HW_DRAM_CTL18_INT_MASK			__BITS(4, 0)

/*
 * DRAM Control Register 19.
 */
#define HW_DRAM_CTL19	0x04c

#define HW_DRAM_CTL19_DQS_OUT_SHIFT_BYPASS	__BITS(31, 24)
#define HW_DRAM_CTL19_RSVD1			__BIT(23)
#define HW_DRAM_CTL19_DQS_OUT_SHIFT		__BITS(22, 16)
#define HW_DRAM_CTL19_DLL_DQS_DELAY_BYPASS_1	__BITS(15, 8)
#define HW_DRAM_CTL19_DLL_DQS_DELAY_BYPASS_0	__BITS(7, 0)

/*
 * DRAM Control Register 20.
 */
#define HW_DRAM_CTL20	0x050

#define HW_DRAM_CTL20_TRCD_INT			__BITS(31, 24)
#define HW_DRAM_CTL20_TRAS_MIN			__BITS(23, 16)
#define HW_DRAM_CTL20_WR_DQS_SHIFT_BYPASS	__BITS(15, 8)
#define HW_DRAM_CTL20_RSVD1			__BIT(7)
#define HW_DRAM_CTL20_WR_DQS_SHIFT		__BITS(6, 0)

/*
 * DRAM Control Register 21.
 */
#define HW_DRAM_CTL21	0x054

#define HW_DRAM_CTL21_OBSOLETE			__BITS(31, 24)
#define HW_DRAM_CTL21_RSVD1			__BITS(23, 18)
#define HW_DRAM_CTL21_OUT_OF_RANGE_LENGTH	__BITS(17, 8)
#define HW_DRAM_CTL21_TRFC			__BITS(7, 0)

/*
 * DRAM Control Register 22.
 */
#define HW_DRAM_CTL22	0x058

#define HW_DRAM_CTL22_RSVD2		__BITS(31, 27)
#define HW_DRAM_CTL22_AHB0_WRCNT	__BITS(26, 16)
#define HW_DRAM_CTL22_RSVD1		__BITS(15, 11)
#define HW_DRAM_CTL22_AHB0_RDCNT	__BITS(10, 0)

/*
 * DRAM Control Register 23.
 */
#define HW_DRAM_CTL23	0x05c

#define HW_DRAM_CTL23_RSVD2		__BITS(31, 27)
#define HW_DRAM_CTL23_AHB1_WRCNT	__BITS(26, 16)
#define HW_DRAM_CTL23_RSVD1		__BITS(15, 11)
#define HW_DRAM_CTL23_AHB1_RDCNT	__BITS(10, 0)

/*
 * DRAM Control Register 24.
 */
#define HW_DRAM_CTL24	0x060

#define HW_DRAM_CTL24_RSVD2		__BITS(31, 27)
#define HW_DRAM_CTL24_AHB2_WRCNT	__BITS(26, 16)
#define HW_DRAM_CTL24_RSVD1		__BITS(15, 11)
#define HW_DRAM_CTL24_AHB2_RDCNT	__BITS(10, 0)

/*
 * DRAM Control Register 25.
 */
#define HW_DRAM_CTL25	0x064

#define HW_DRAM_CTL25_RSVD2		__BITS(31, 27)
#define HW_DRAM_CTL25_AHB3_WRCNT	__BITS(26, 16)
#define HW_DRAM_CTL25_RSVD1		__BITS(15, 11)
#define HW_DRAM_CTL25_AHB3_RDCNT	__BITS(10, 0)

/*
 * DRAM Control Register 26.
 */
#define HW_DRAM_CTL26	0x068

#define HW_DRAM_CTL26_OBSOLETE		__BITS(31, 16)
#define HW_DRAM_CTL26_RSVD1		__BITS(15, 12)
#define HW_DRAM_CTL26_TREF		__BITS(11, 0)

/*
 * DRAM Control Register 27.
 */
#define HW_DRAM_CTL27	0x06c

#define HW_DRAM_CTL27_OBSOLETE	__BITS(31, 0)

/*
 * DRAM Control Register 28.
 */
#define HW_DRAM_CTL28	0x070

#define HW_DRAM_CTL28_OBSOLETE	__BITS(31, 0)

/*
 * DRAM Control Register 29.
 */
#define HW_DRAM_CTL29	0x074

#define HW_DRAM_CTL29_LOWPOWER_INTERNAL_CNT	__BITS(31, 16)
#define HW_DRAM_CTL29_LOWPOWER_EXTERNAL_CNT	__BITS(15, 0)

/*
 * DRAM Control Register 30.
 */
#define HW_DRAM_CTL30	0x078

#define HW_DRAM_CTL30_LOWPOWER_REFRESH_HOLD	__BITS(31, 16)
#define HW_DRAM_CTL30_LOWPOWER_POWER_DOWN_CNT	__BITS(15, 0)

/*
 * DRAM Control Register 31.
 */
#define HW_DRAM_CTL31	0x07c

#define HW_DRAM_CTL31_TDLL			__BITS(31, 16)
#define HW_DRAM_CTL31_LOWPOWER_SELF_REFRESH_CNT	__BITS(15, 0)

/*
 * DRAM Control Register 32.
 */
#define HW_DRAM_CTL32	0x080

#define HW_DRAM_CTL32_TXSNR	__BITS(31, 16)
#define HW_DRAM_CTL32_TRAS_MAX	__BITS(15, 0)

/*
 * DRAM Control Register 33.
 */
#define HW_DRAM_CTL33	0x084

#define HW_DRAM_CTL33_VERSION	__BITS(31, 16)
#define HW_DRAM_CTL33_TXSR	__BITS(15, 0)

/*
 * DRAM Control Register 34.
 */
#define HW_DRAM_CTL34	0x088

#define HW_DRAM_CTL34_RSVD1	__BITS(31, 24)
#define HW_DRAM_CTL34_TINIT	__BITS(23, 0)

/*
 * DRAM Control Register 35.
 */
#define HW_DRAM_CTL35	0x08c

#define HW_DRAM_CTL35_RSVD1		__BIT(31)
#define HW_DRAM_CTL35_OUT_OF_RANGE_ADDR	__BITS(30, 0)

/*
 * DRAM Control Register 36.
 */
#define HW_DRAM_CTL36	0x090

#define HW_DRAM_CTL36_RSVD5			__BITS(31, 25)
#define HW_DRAM_CTL36_PWRUP_SREFRESH_EXIT	__BIT(24)
#define HW_DRAM_CTL36_RSVD4			__BITS(23, 17)
#define HW_DRAM_CTL36_ENABLE_QUICK_SREFRESH	__BIT(16)
#define HW_DRAM_CTL36_RSVD3			__BITS(15, 9)
#define HW_DRAM_CTL36_RSVD2			__BIT(8)
#define HW_DRAM_CTL36_RSVD1			__BITS(7, 1)
#define HW_DRAM_CTL36_ACTIVE_AGING		__BIT(0)

/*
 * DRAM Control Register 37.
 */
#define HW_DRAM_CTL37	0x094

#define HW_DRAM_CTL37_OBSOLETE		__BITS(31, 24)
#define HW_DRAM_CTL37_RSVD2		__BITS(23, 18)
#define HW_DRAM_CTL37_BUS_SHARE_TIMEOUT	__BITS(17, 8)
#define HW_DRAM_CTL37_RSVD1		__BITS(7, 1)
#define HW_DRAM_CTL37_TREF_ENABLE	__BIT(0)

/*
 * DRAM Control Register 38.
 */
#define HW_DRAM_CTL38	0x098

#define HW_DRAM_CTL38_RSVD2		__BITS(31, 29)
#define HW_DRAM_CTL38_EMRS2_DATA_0	__BITS(28, 16)
#define HW_DRAM_CTL38_RSVD1		__BITS(15, 13)
#define HW_DRAM_CTL38_EMRS1_DATA	__BITS(12, 0)

/*
 * DRAM Control Register 39.
 */
#define HW_DRAM_CTL39	0x09c

#define HW_DRAM_CTL39_RSVD2		__BITS(31, 29)
#define HW_DRAM_CTL39_EMRS2_DATA_2	__BITS(28, 16)
#define HW_DRAM_CTL39_RSVD1		__BITS(15, 13)
#define HW_DRAM_CTL39_EMRS2_DATA_1	__BITS(12, 0)

/*
 * DRAM Control Register 40.
 */
#define HW_DRAM_CTL40	0x0A0

#define HW_DRAM_CTL40_TPDEX		__BITS(31, 16)
#define HW_DRAM_CTL40_RSVD1		__BITS(15, 13)
#define HW_DRAM_CTL40_EMRS2_DATA_3	__BITS(12, 0)

#endif /* !_ARM_IMX_IMX23_EMIREG_H_ */