blob: ab8d9e6deba0b3b17699d3ea7187892173ba88db (
plain)
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
|
/***************************************************************************
* __________ __ ___.
* Open \______ \ ____ ____ | | _\_ |__ _______ ___
* Source | _// _ \_/ ___\| |/ /| __ \ / _ \ \/ /
* Jukebox | | ( <_> ) \___| < | \_\ ( <_> > < <
* Firmware |____|_ /\____/ \___ >__|_ \|___ /\____/__/\_ \
* \/ \/ \/ \/ \/
* This file was automatically generated by headergen, DO NOT EDIT it.
* headergen version: 2.1.7
* XML versions: stmp3600:2.4.0
*
* Copyright (C) 2013 by Amaury Pouly
*
* This program is free software; you can redistribute it and/or
* modify it under the terms of the GNU General Public License
* as published by the Free Software Foundation; either version 2
* of the License, or (at your option) any later version.
*
* This software is distributed on an "AS IS" basis, WITHOUT WARRANTY OF ANY
* KIND, either express or implied.
*
****************************************************************************/
#ifndef __HEADERGEN__STMP3600__APBH__H__
#define __HEADERGEN__STMP3600__APBH__H__
#define REGS_APBH_BASE (0x80004000)
#define REGS_APBH_VERSION "2.4.0"
/**
* Register: HW_APBH_CTRL0
* Address: 0
* SCT: yes
*/
#define HW_APBH_CTRL0 (*(volatile unsigned long *)(REGS_APBH_BASE + 0x0 + 0x0))
#define HW_APBH_CTRL0_SET (*(volatile unsigned long *)(REGS_APBH_BASE + 0x0 + 0x4))
#define HW_APBH_CTRL0_CLR (*(volatile unsigned long *)(REGS_APBH_BASE + 0x0 + 0x8))
#define HW_APBH_CTRL0_TOG (*(volatile unsigned long *)(REGS_APBH_BASE + 0x0 + 0xc))
#define BP_APBH_CTRL0_SFTRST 31
#define BM_APBH_CTRL0_SFTRST 0x80000000
#define BF_APBH_CTRL0_SFTRST(v) (((v) << 31) & 0x80000000)
#define BP_APBH_CTRL0_CLKGATE 30
#define BM_APBH_CTRL0_CLKGATE 0x40000000
#define BF_APBH_CTRL0_CLKGATE(v) (((v) << 30) & 0x40000000)
#define BP_APBH_CTRL0_RESET_CHANNEL 16
#define BM_APBH_CTRL0_RESET_CHANNEL 0xff0000
#define BV_APBH_CTRL0_RESET_CHANNEL__HWECC 0x1
#define BV_APBH_CTRL0_RESET_CHANNEL__SSP 0x2
#define BV_APBH_CTRL0_RESET_CHANNEL__SRC 0x4
#define BV_APBH_CTRL0_RESET_CHANNEL__DEST 0x8
#define BV_APBH_CTRL0_RESET_CHANNEL__ATA 0x10
#define BV_APBH_CTRL0_RESET_CHANNEL__NAND0 0x10
#define BV_APBH_CTRL0_RESET_CHANNEL__NAND1 0x20
#define BV_APBH_CTRL0_RESET_CHANNEL__NAND2 0x30
#define BV_APBH_CTRL0_RESET_CHANNEL__NAND3 0x40
#define BF_APBH_CTRL0_RESET_CHANNEL(v) (((v) << 16) & 0xff0000)
#define BF_APBH_CTRL0_RESET_CHANNEL_V(v) ((BV_APBH_CTRL0_RESET_CHANNEL__##v << 16) & 0xff0000)
#define BP_APBH_CTRL0_CLKGATE_CHANNEL 8
#define BM_APBH_CTRL0_CLKGATE_CHANNEL 0xff00
#define BV_APBH_CTRL0_CLKGATE_CHANNEL__HWECC 0x1
#define BV_APBH_CTRL0_CLKGATE_CHANNEL__SSP 0x2
#define BV_APBH_CTRL0_CLKGATE_CHANNEL__SRC 0x4
#define BV_APBH_CTRL0_CLKGATE_CHANNEL__DEST 0x8
#define BV_APBH_CTRL0_CLKGATE_CHANNEL__ATA 0x10
#define BV_APBH_CTRL0_CLKGATE_CHANNEL__NAND0 0x10
#define BV_APBH_CTRL0_CLKGATE_CHANNEL__NAND1 0x20
#define BV_APBH_CTRL0_CLKGATE_CHANNEL__NAND2 0x30
#define BV_APBH_CTRL0_CLKGATE_CHANNEL__NAND3 0x40
#define BF_APBH_CTRL0_CLKGATE_CHANNEL(v) (((v) << 8) & 0xff00)
#define BF_APBH_CTRL0_CLKGATE_CHANNEL_V(v) ((BV_APBH_CTRL0_CLKGATE_CHANNEL__##v << 8) & 0xff00)
#define BP_APBH_CTRL0_FREEZE_CHANNEL 0
#define BM_APBH_CTRL0_FREEZE_CHANNEL 0xff
#define BV_APBH_CTRL0_FREEZE_CHANNEL__HWECC 0x1
#define BV_APBH_CTRL0_FREEZE_CHANNEL__SSP 0x2
#define BV_APBH_CTRL0_FREEZE_CHANNEL__SRC 0x4
#define BV_APBH_CTRL0_FREEZE_CHANNEL__DEST 0x8
#define BV_APBH_CTRL0_FREEZE_CHANNEL__ATA 0x10
#define BV_APBH_CTRL0_FREEZE_CHANNEL__NAND0 0x10
#define BV_APBH_CTRL0_FREEZE_CHANNEL__NAND1 0x20
#define BV_APBH_CTRL0_FREEZE_CHANNEL__NAND2 0x30
#define BV_APBH_CTRL0_FREEZE_CHANNEL__NAND3 0x40
#define BF_APBH_CTRL0_FREEZE_CHANNEL(v) (((v) << 0) & 0xff)
#define BF_APBH_CTRL0_FREEZE_CHANNEL_V(v) ((BV_APBH_CTRL0_FREEZE_CHANNEL__##v << 0) & 0xff)
/**
* Register: HW_APBH_CTRL1
* Address: 0x10
* SCT: yes
*/
#define HW_APBH_CTRL1 (*(volatile unsigned long *)(REGS_APBH_BASE + 0x10 + 0x0))
#define HW_APBH_CTRL1_SET (*(volatile unsigned long *)(REGS_APBH_BASE + 0x10 + 0x4))
#define HW_APBH_CTRL1_CLR (*(volatile unsigned long *)(REGS_APBH_BASE + 0x10 + 0x8))
#define HW_APBH_CTRL1_TOG (*(volatile unsigned long *)(REGS_APBH_BASE + 0x10 + 0xc))
#define BP_APBH_CTRL1_CH_CMDCMPLT_IRQ_EN 16
#define BM_APBH_CTRL1_CH_CMDCMPLT_IRQ_EN 0xff0000
#define BF_APBH_CTRL1_CH_CMDCMPLT_IRQ_EN(v) (((v) << 16) & 0xff0000)
#define BP_APBH_CTRL1_CH_CMDCMPLT_IRQ 0
#define BM_APBH_CTRL1_CH_CMDCMPLT_IRQ 0xff
#define BF_APBH_CTRL1_CH_CMDCMPLT_IRQ(v) (((v) << 0) & 0xff)
/**
* Register: HW_APBH_DEVSEL
* Address: 0x20
* SCT: no
*/
#define HW_APBH_DEVSEL (*(volatile unsigned long *)(REGS_APBH_BASE + 0x20))
#define BP_APBH_DEVSEL_CH7 28
#define BM_APBH_DEVSEL_CH7 0xf0000000
#define BF_APBH_DEVSEL_CH7(v) (((v) << 28) & 0xf0000000)
#define BP_APBH_DEVSEL_CH6 24
#define BM_APBH_DEVSEL_CH6 0xf000000
#define BF_APBH_DEVSEL_CH6(v) (((v) << 24) & 0xf000000)
#define BP_APBH_DEVSEL_CH5 20
#define BM_APBH_DEVSEL_CH5 0xf00000
#define BF_APBH_DEVSEL_CH5(v) (((v) << 20) & 0xf00000)
#define BP_APBH_DEVSEL_CH4 16
#define BM_APBH_DEVSEL_CH4 0xf0000
#define BF_APBH_DEVSEL_CH4(v) (((v) << 16) & 0xf0000)
#define BP_APBH_DEVSEL_CH3 12
#define BM_APBH_DEVSEL_CH3 0xf000
#define BF_APBH_DEVSEL_CH3(v) (((v) << 12) & 0xf000)
#define BP_APBH_DEVSEL_CH2 8
#define BM_APBH_DEVSEL_CH2 0xf00
#define BF_APBH_DEVSEL_CH2(v) (((v) << 8) & 0xf00)
#define BP_APBH_DEVSEL_CH1 4
#define BM_APBH_DEVSEL_CH1 0xf0
#define BF_APBH_DEVSEL_CH1(v) (((v) << 4) & 0xf0)
#define BP_APBH_DEVSEL_CH0 0
#define BM_APBH_DEVSEL_CH0 0xf
#define BF_APBH_DEVSEL_CH0(v) (((v) << 0) & 0xf)
/**
* Register: HW_APBH_CHn_DEBUG2
* Address: 0x90+n*0x70
* SCT: no
*/
#define HW_APBH_CHn_DEBUG2(n) (*(volatile unsigned long *)(REGS_APBH_BASE + 0x90+(n)*0x70))
#define BP_APBH_CHn_DEBUG2_APB_BYTES 16
#define BM_APBH_CHn_DEBUG2_APB_BYTES 0xffff0000
#define BF_APBH_CHn_DEBUG2_APB_BYTES(v) (((v) << 16) & 0xffff0000)
#define BP_APBH_CHn_DEBUG2_AHB_BYTES 0
#define BM_APBH_CHn_DEBUG2_AHB_BYTES 0xffff
#define BF_APBH_CHn_DEBUG2_AHB_BYTES(v) (((v) << 0) & 0xffff)
/**
* Register: HW_APBH_CHn_CURCMDAR
* Address: 0x30+n*0x70
* SCT: no
*/
#define HW_APBH_CHn_CURCMDAR(n) (*(volatile unsigned long *)(REGS_APBH_BASE + 0x30+(n)*0x70))
#define BP_APBH_CHn_CURCMDAR_CMD_ADDR 0
#define BM_APBH_CHn_CURCMDAR_CMD_ADDR 0xffffffff
#define BF_APBH_CHn_CURCMDAR_CMD_ADDR(v) (((v) << 0) & 0xffffffff)
/**
* Register: HW_APBH_CHn_BAR
* Address: 0x60+n*0x70
* SCT: no
*/
#define HW_APBH_CHn_BAR(n) (*(volatile unsigned long *)(REGS_APBH_BASE + 0x60+(n)*0x70))
#define BP_APBH_CHn_BAR_ADDRESS 0
#define BM_APBH_CHn_BAR_ADDRESS 0xffffffff
#define BF_APBH_CHn_BAR_ADDRESS(v) (((v) << 0) & 0xffffffff)
/**
* Register: HW_APBH_CHn_CMD
* Address: 0x50+n*0x70
* SCT: no
*/
#define HW_APBH_CHn_CMD(n) (*(volatile unsigned long *)(REGS_APBH_BASE + 0x50+(n)*0x70))
#define BP_APBH_CHn_CMD_XFER_COUNT 16
#define BM_APBH_CHn_CMD_XFER_COUNT 0xffff0000
#define BF_APBH_CHn_CMD_XFER_COUNT(v) (((v) << 16) & 0xffff0000)
#define BP_APBH_CHn_CMD_CMDWORDS 12
#define BM_APBH_CHn_CMD_CMDWORDS 0xf000
#define BF_APBH_CHn_CMD_CMDWORDS(v) (((v) << 12) & 0xf000)
#define BP_APBH_CHn_CMD_WAIT4ENDCMD 7
#define BM_APBH_CHn_CMD_WAIT4ENDCMD 0x80
#define BF_APBH_CHn_CMD_WAIT4ENDCMD(v) (((v) << 7) & 0x80)
#define BP_APBH_CHn_CMD_SEMAPHORE 6
#define BM_APBH_CHn_CMD_SEMAPHORE 0x40
#define BF_APBH_CHn_CMD_SEMAPHORE(v) (((v) << 6) & 0x40)
#define BP_APBH_CHn_CMD_NANDWAIT4READY 5
#define BM_APBH_CHn_CMD_NANDWAIT4READY 0x20
#define BF_APBH_CHn_CMD_NANDWAIT4READY(v) (((v) << 5) & 0x20)
#define BP_APBH_CHn_CMD_NANDLOCK 4
#define BM_APBH_CHn_CMD_NANDLOCK 0x10
#define BF_APBH_CHn_CMD_NANDLOCK(v) (((v) << 4) & 0x10)
#define BP_APBH_CHn_CMD_IRQONCMPLT 3
#define BM_APBH_CHn_CMD_IRQONCMPLT 0x8
#define BF_APBH_CHn_CMD_IRQONCMPLT(v) (((v) << 3) & 0x8)
#define BP_APBH_CHn_CMD_CHAIN 2
#define BM_APBH_CHn_CMD_CHAIN 0x4
#define BF_APBH_CHn_CMD_CHAIN(v) (((v) << 2) & 0x4)
#define BP_APBH_CHn_CMD_COMMAND 0
#define BM_APBH_CHn_CMD_COMMAND 0x3
#define BV_APBH_CHn_CMD_COMMAND__NO_DMA_XFER 0x0
#define BV_APBH_CHn_CMD_COMMAND__DMA_WRITE 0x1
#define BV_APBH_CHn_CMD_COMMAND__DMA_READ 0x2
#define BV_APBH_CHn_CMD_COMMAND__DMA_SENSE 0x3
#define BF_APBH_CHn_CMD_COMMAND(v) (((v) << 0) & 0x3)
#define BF_APBH_CHn_CMD_COMMAND_V(v) ((BV_APBH_CHn_CMD_COMMAND__##v << 0) & 0x3)
/**
* Register: HW_APBH_CHn_NXTCMDAR
* Address: 0x40+n*0x70
* SCT: no
*/
#define HW_APBH_CHn_NXTCMDAR(n) (*(volatile unsigned long *)(REGS_APBH_BASE + 0x40+(n)*0x70))
#define BP_APBH_CHn_NXTCMDAR_CMD_ADDR 0
#define BM_APBH_CHn_NXTCMDAR_CMD_ADDR 0xffffffff
#define BF_APBH_CHn_NXTCMDAR_CMD_ADDR(v) (((v) << 0) & 0xffffffff)
/**
* Register: HW_APBH_CHn_SEMA
* Address: 0x70+n*0x70
* SCT: no
*/
#define HW_APBH_CHn_SEMA(n) (*(volatile unsigned long *)(REGS_APBH_BASE + 0x70+(n)*0x70))
#define BP_APBH_CHn_SEMA_PHORE 16
#define BM_APBH_CHn_SEMA_PHORE 0xff0000
#define BF_APBH_CHn_SEMA_PHORE(v) (((v) << 16) & 0xff0000)
#define BP_APBH_CHn_SEMA_INCREMENT_SEMA 0
#define BM_APBH_CHn_SEMA_INCREMENT_SEMA 0xff
#define BF_APBH_CHn_SEMA_INCREMENT_SEMA(v) (((v) << 0) & 0xff)
/**
* Register: HW_APBH_CHn_DEBUG1
* Address: 0x80+n*0x70
* SCT: no
*/
#define HW_APBH_CHn_DEBUG1(n) (*(volatile unsigned long *)(REGS_APBH_BASE + 0x80+(n)*0x70))
#define BP_APBH_CHn_DEBUG1_REQ 31
#define BM_APBH_CHn_DEBUG1_REQ 0x80000000
#define BF_APBH_CHn_DEBUG1_REQ(v) (((v) << 31) & 0x80000000)
#define BP_APBH_CHn_DEBUG1_BURST 30
#define BM_APBH_CHn_DEBUG1_BURST 0x40000000
#define BF_APBH_CHn_DEBUG1_BURST(v) (((v) << 30) & 0x40000000)
#define BP_APBH_CHn_DEBUG1_KICK 29
#define BM_APBH_CHn_DEBUG1_KICK 0x20000000
#define BF_APBH_CHn_DEBUG1_KICK(v) (((v) << 29) & 0x20000000)
#define BP_APBH_CHn_DEBUG1_END 28
#define BM_APBH_CHn_DEBUG1_END 0x10000000
#define BF_APBH_CHn_DEBUG1_END(v) (((v) << 28) & 0x10000000)
#define BP_APBH_CHn_DEBUG1_RSVD2 25
#define BM_APBH_CHn_DEBUG1_RSVD2 0xe000000
#define BF_APBH_CHn_DEBUG1_RSVD2(v) (((v) << 25) & 0xe000000)
#define BP_APBH_CHn_DEBUG1_NEXTCMDADDRVALID 24
#define BM_APBH_CHn_DEBUG1_NEXTCMDADDRVALID 0x1000000
#define BF_APBH_CHn_DEBUG1_NEXTCMDADDRVALID(v) (((v) << 24) & 0x1000000)
#define BP_APBH_CHn_DEBUG1_RD_FIFO_EMPTY 23
#define BM_APBH_CHn_DEBUG1_RD_FIFO_EMPTY 0x800000
#define BF_APBH_CHn_DEBUG1_RD_FIFO_EMPTY(v) (((v) << 23) & 0x800000)
#define BP_APBH_CHn_DEBUG1_RD_FIFO_FULL 22
#define BM_APBH_CHn_DEBUG1_RD_FIFO_FULL 0x400000
#define BF_APBH_CHn_DEBUG1_RD_FIFO_FULL(v) (((v) << 22) & 0x400000)
#define BP_APBH_CHn_DEBUG1_WR_FIFO_EMPTY 21
#define BM_APBH_CHn_DEBUG1_WR_FIFO_EMPTY 0x200000
#define BF_APBH_CHn_DEBUG1_WR_FIFO_EMPTY(v) (((v) << 21) & 0x200000)
#define BP_APBH_CHn_DEBUG1_WR_FIFO_FULL 20
#define BM_APBH_CHn_DEBUG1_WR_FIFO_FULL 0x100000
#define BF_APBH_CHn_DEBUG1_WR_FIFO_FULL(v) (((v) << 20) & 0x100000)
#define BP_APBH_CHn_DEBUG1_RSVD1 5
#define BM_APBH_CHn_DEBUG1_RSVD1 0xfffe0
#define BF_APBH_CHn_DEBUG1_RSVD1(v) (((v) << 5) & 0xfffe0)
#define BP_APBH_CHn_DEBUG1_STATEMACHINE 0
#define BM_APBH_CHn_DEBUG1_STATEMACHINE 0x1f
#define BV_APBH_CHn_DEBUG1_STATEMACHINE__IDLE 0x0
#define BV_APBH_CHn_DEBUG1_STATEMACHINE__REQ_CMD1 0x1
#define BV_APBH_CHn_DEBUG1_STATEMACHINE__REQ_CMD3 0x2
#define BV_APBH_CHn_DEBUG1_STATEMACHINE__REQ_CMD2 0x3
#define BV_APBH_CHn_DEBUG1_STATEMACHINE__XFER_DECODE 0x4
#define BV_APBH_CHn_DEBUG1_STATEMACHINE__REQ_WAIT 0x5
#define BV_APBH_CHn_DEBUG1_STATEMACHINE__REQ_CMD4 0x6
#define BV_APBH_CHn_DEBUG1_STATEMACHINE__PIO_REQ 0x7
#define BV_APBH_CHn_DEBUG1_STATEMACHINE__READ_FLUSH 0x8
#define BV_APBH_CHn_DEBUG1_STATEMACHINE__READ_WAIT 0x9
#define BV_APBH_CHn_DEBUG1_STATEMACHINE__WRITE 0xc
#define BV_APBH_CHn_DEBUG1_STATEMACHINE__READ_REQ 0xd
#define BV_APBH_CHn_DEBUG1_STATEMACHINE__CHECK_CHAIN 0xe
#define BV_APBH_CHn_DEBUG1_STATEMACHINE__XFER_COMPLETE 0xf
#define BV_APBH_CHn_DEBUG1_STATEMACHINE__WAIT_END 0x15
#define BV_APBH_CHn_DEBUG1_STATEMACHINE__WRITE_WAIT 0x1c
#define BV_APBH_CHn_DEBUG1_STATEMACHINE__CHECK_WAIT 0x1e
#define BF_APBH_CHn_DEBUG1_STATEMACHINE(v) (((v) << 0) & 0x1f)
#define BF_APBH_CHn_DEBUG1_STATEMACHINE_V(v) ((BV_APBH_CHn_DEBUG1_STATEMACHINE__##v << 0) & 0x1f)
#endif /* __HEADERGEN__STMP3600__APBH__H__ */
|