strip the kernel version suffix from target directories, except for brcm-2.4 (the...
[openwrt/staging/florian.git] / target / linux / amazon / files / include / asm-mips / amazon / amazon.h
1 #ifndef AMAZON_H
2 #define AMAZON_H
3 /******************************************************************************
4 Copyright (c) 2002, Infineon Technologies. All rights reserved.
5
6 No Warranty
7 Because the program is licensed free of charge, there is no warranty for
8 the program, to the extent permitted by applicable law. Except when
9 otherwise stated in writing the copyright holders and/or other parties
10 provide the program "as is" without warranty of any kind, either
11 expressed or implied, including, but not limited to, the implied
12 warranties of merchantability and fitness for a particular purpose. The
13 entire risk as to the quality and performance of the program is with
14 you. should the program prove defective, you assume the cost of all
15 necessary servicing, repair or correction.
16
17 In no event unless required by applicable law or agreed to in writing
18 will any copyright holder, or any other party who may modify and/or
19 redistribute the program as permitted above, be liable to you for
20 damages, including any general, special, incidental or consequential
21 damages arising out of the use or inability to use the program
22 (including but not limited to loss of data or data being rendered
23 inaccurate or losses sustained by you or third parties or a failure of
24 the program to operate with any other programs), even if such holder or
25 other party has been advised of the possibility of such damages.
26 ******************************************************************************/
27
28 #define amazon_readl(a) readl(((u32*)(a)))
29 #define amazon_writel(a,b) writel(a, ((u32*)(b)))
30 #define amazon_writel_masked(a,b,c) writel((readl(((u32*)(a))) & ~b) | (c & b), ((u32*)(a)))
31
32 /* check ADSL link status */
33 #define AMAZON_CHECK_LINK
34
35 /***********************************************************************/
36 /* Module : WDT register address and bits */
37 /***********************************************************************/
38
39 #define AMAZON_WDT (KSEG1+0x10100900)
40 /***********************************************************************/
41
42 /***Reset Request Register***/
43 #define AMAZON_RST_REQ ((volatile u32*)(AMAZON_WDT+ 0x0010))
44 #define AMAZON_RST_REQ_PLL (1 << 31)
45 #define AMAZON_RST_REQ_PCI_CORE (1 << 13)
46 #define AMAZON_RST_REQ_TPE (1 << 12)
47 #define AMAZON_RST_REQ_AFE (1 << 11)
48 #define AMAZON_RST_REQ_DMA (1 << 9)
49 #define AMAZON_RST_REQ_SWITCH (1 << 8)
50 #define AMAZON_RST_REQ_DFE (1 << 7)
51 #define AMAZON_RST_REQ_PHY (1 << 5)
52 #define AMAZON_RST_REQ_PCI (1 << 4)
53 #define AMAZON_RST_REQ_FPI (1 << 2)
54 #define AMAZON_RST_REQ_CPU (1 << 1)
55 #define AMAZON_RST_REQ_HRST (1 << 0)
56 #define AMAZON_RST_ALL (AMAZON_RST_REQ_PLL \
57 |AMAZON_RST_REQ_PCI_CORE \
58 |AMAZON_RST_REQ_TPE \
59 |AMAZON_RST_REQ_AFE \
60 |AMAZON_RST_REQ_DMA \
61 |AMAZON_RST_REQ_SWITCH \
62 |AMAZON_RST_REQ_DFE \
63 |AMAZON_RST_REQ_PHY \
64 |AMAZON_RST_REQ_PCI \
65 |AMAZON_RST_REQ_FPI \
66 |AMAZON_RST_REQ_CPU \
67 |AMAZON_RST_REQ_HRST)
68
69 /***Reset Status Register Power On***/
70 #define AMAZON_RST_SR ((volatile u32*)(AMAZON_WDT+ 0x0014))
71
72 /***Watchdog Timer Control Register 0***/
73 #define AMAZON_WDT_CON0 ((volatile u32*)(AMAZON_WDT+ 0x0020))
74
75 /***Watchdog Timer Control Register 1***/
76 #define AMAZON_WDT_CON1 ((volatile u32*)(AMAZON_WDT+ 0x0024))
77 #define AMAZON_WDT_CON1_WDTDR (1 << 3)
78 #define AMAZON_WDT_CON1_WDTIR (1 << 2)
79
80 /***Watchdog Timer Status Register***/
81 #define AMAZON_WDT_SR ((volatile u32*)(AMAZON_WDT+ 0x0028))
82 #define AMAZON_WDT_SR_WDTTIM(value) (((( 1 << 16) - 1) & (value)) << 16)
83 #define AMAZON_WDT_SR_WDTPR (1 << 5)
84 #define AMAZON_WDT_SR_WDTTO (1 << 4)
85 #define AMAZON_WDT_SR_WDTDS (1 << 3)
86 #define AMAZON_WDT_SR_WDTIS (1 << 2)
87 #define AMAZON_WDT_SR_WDTOE (1 << 1)
88 #define AMAZON_WDT_SR_WDTAE (1 << 0)
89
90 /***NMI Status Register***/
91 #define AMAZON_WDT_NMISR ((volatile u32*)(AMAZON_WDT+ 0x002C))
92 #define AMAZON_WDT_NMISR_NMIWDT (1 << 2)
93 #define AMAZON_WDT_NMISR_NMIPLL (1 << 1)
94 #define AMAZON_WDT_NMISR_NMIEXT (1 << 0)
95
96 #define AMAZON_WDT_RST_MON ((volatile u32*)(AMAZON_WDT+ 0x0030))
97
98 /***********************************************************************/
99 /* Module : MCD register address and bits */
100 /***********************************************************************/
101 #define AMAZON_MCD (KSEG1+0x1F106000)
102
103 /***Manufacturer Identification Register***/
104 #define AMAZON_MCD_MANID ((volatile u32*)(AMAZON_MCD+ 0x0024))
105 #define AMAZON_MCD_MANID_MANUF(value) (((( 1 << 11) - 1) & (value)) << 5)
106
107 /***Chip Identification Register***/
108 #define AMAZON_MCD_CHIPID ((volatile u32*)(AMAZON_MCD+ 0x0028))
109 #define AMAZON_MCD_CHIPID_VERSION_GET(value) (((value) >> 28) & ((1 << 4) - 1))
110 #define AMAZON_MCD_CHIPID_VERSION_SET(value) (((( 1 << 4) - 1) & (value)) << 28)
111 #define AMAZON_MCD_CHIPID_PART_NUMBER_GET(value) (((value) >> 12) & ((1 << 16) - 1))
112 #define AMAZON_MCD_CHIPID_PART_NUMBER_SET(value) (((( 1 << 16) - 1) & (value)) << 12)
113 #define AMAZON_MCD_CHIPID_MANID_GET(value) (((value) >> 1) & ((1 << 11) - 1))
114 #define AMAZON_MCD_CHIPID_MANID_SET(value) (((( 1 << 11) - 1) & (value)) << 1)
115
116 #define AMAZON_CHIPID_STANDARD 0x00EB
117 #define AMAZON_CHIPID_YANGTSE 0x00ED
118
119 /***Redesign Tracing Identification Register***/
120 #define AMAZON_MCD_RTID ((volatile u32*)(AMAZON_MCD+ 0x002C))
121 #define AMAZON_MCD_RTID_LC (1 << 15)
122 #define AMAZON_MCD_RTID_RIX(value) (((( 1 << 3) - 1) & (value)) << 0)
123
124
125 /***********************************************************************/
126 /* Module : CGU register address and bits */
127 /***********************************************************************/
128
129 #define AMAZON_CGU (KSEG1+0x1F103000)
130 /***********************************************************************/
131
132 /***CGU Clock Divider Select Register***/
133 #define AMAZON_CGU_DIV (AMAZON_CGU + 0x0000)
134 /***CGU PLL0 Status Register***/
135 #define AMAZON_CGU_PLL0SR (AMAZON_CGU + 0x0004)
136 /***CGU PLL1 Status Register***/
137 #define AMAZON_CGU_PLL1SR (AMAZON_CGU + 0x0008)
138 /***CGU Interface Clock Control Register***/
139 #define AMAZON_CGU_IFCCR (AMAZON_CGU + 0x000c)
140 /***CGU Oscillator Control Register***/
141 #define AMAZON_CGU_OSCCR (AMAZON_CGU + 0x0010)
142 /***CGU Memory Clock Delay Register***/
143 #define AMAZON_CGU_MCDEL (AMAZON_CGU + 0x0014)
144 /***CGU CPU Clock Reduction Register***/
145 #define AMAZON_CGU_CPUCRD (AMAZON_CGU + 0x0018)
146 /***CGU Test Register**/
147 #define AMAZON_CGU_TST (AMAZON_CGU + 0x003c)
148
149 /***********************************************************************/
150 /* Module : PMU register address and bits */
151 /***********************************************************************/
152
153 #define AMAZON_PMU AMAZON_CGU
154 /***********************************************************************/
155
156
157 /***PMU Power Down Control Register***/
158 #define AMAZON_PMU_PWDCR ((volatile u32*)(AMAZON_PMU+ 0x001c))
159 #define AMAZON_PMU_PWDCR_TPE (1 << 13)
160 #define AMAZON_PMU_PWDCR_PLL (1 << 12)
161 #define AMAZON_PMU_PWDCR_XTAL (1 << 11)
162 #define AMAZON_PMU_PWDCR_EBU (1 << 10)
163 #define AMAZON_PMU_PWDCR_DFE (1 << 9)
164 #define AMAZON_PMU_PWDCR_SPI (1 << 8)
165 #define AMAZON_PMU_PWDCR_UART (1 << 7)
166 #define AMAZON_PMU_PWDCR_GPT (1 << 6)
167 #define AMAZON_PMU_PWDCR_DMA (1 << 5)
168 #define AMAZON_PMU_PWDCR_PCI (1 << 4)
169 #define AMAZON_PMU_PWDCR_SW (1 << 3)
170 #define AMAZON_PMU_PWDCR_IOR (1 << 2)
171 #define AMAZON_PMU_PWDCR_FPI (1 << 1)
172 #define AMAZON_PMU_PWDCR_EPHY (1 << 0)
173
174 /***PMU Status Register***/
175 #define AMAZON_PMU_SR ((volatile u32*)(AMAZON_PMU+ 0x0020))
176 #define AMAZON_PMU_SR_TPE (1 << 13)
177 #define AMAZON_PMU_SR_PLL (1 << 12)
178 #define AMAZON_PMU_SR_XTAL (1 << 11)
179 #define AMAZON_PMU_SR_EBU (1 << 10)
180 #define AMAZON_PMU_SR_DFE (1 << 9)
181 #define AMAZON_PMU_SR_SPI (1 << 8)
182 #define AMAZON_PMU_SR_UART (1 << 7)
183 #define AMAZON_PMU_SR_GPT (1 << 6)
184 #define AMAZON_PMU_SR_DMA (1 << 5)
185 #define AMAZON_PMU_SR_PCI (1 << 4)
186 #define AMAZON_PMU_SR_SW (1 << 3)
187 #define AMAZON_PMU_SR_IOR (1 << 2)
188 #define AMAZON_PMU_SR_FPI (1 << 1)
189 #define AMAZON_PMU_SR_EPHY (1 << 0)
190
191 /***********************************************************************/
192 /* Module : BCU register address and bits */
193 /***********************************************************************/
194
195 #define AMAZON_BCU (KSEG1+0x10100000)
196 /***********************************************************************/
197
198
199 /***BCU Control Register (0010H)***/
200 #define AMAZON_BCU_CON ((volatile u32*)(AMAZON_BCU+ 0x0010))
201 #define AMAZON_BCU_CON_SPC(value) (((( 1 << 8) - 1) & (value)) << 24)
202 #define AMAZON_BCU_CON_SPE (1 << 19)
203 #define AMAZON_BCU_CON_PSE (1 << 18)
204 #define AMAZON_BCU_CON_DBG (1 << 16)
205 #define AMAZON_BCU_CON_TOUT(value) (((( 1 << 16) - 1) & (value)) << 0)
206
207 /***BCU Error Control Capture Register (0020H)***/
208 #define AMAZON_BCU_ECON ((volatile u32*)(AMAZON_BCU+ 0x0020))
209 #define AMAZON_BCU_ECON_TAG(value) (((( 1 << 4) - 1) & (value)) << 24)
210 #define AMAZON_BCU_ECON_RDN (1 << 23)
211 #define AMAZON_BCU_ECON_WRN (1 << 22)
212 #define AMAZON_BCU_ECON_SVM (1 << 21)
213 #define AMAZON_BCU_ECON_ACK(value) (((( 1 << 2) - 1) & (value)) << 19)
214 #define AMAZON_BCU_ECON_ABT (1 << 18)
215 #define AMAZON_BCU_ECON_RDY (1 << 17)
216 #define AMAZON_BCU_ECON_TOUT (1 << 16)
217 #define AMAZON_BCU_ECON_ERRCNT(value) (((( 1 << 16) - 1) & (value)) << 0)
218 #define AMAZON_BCU_ECON_OPC(value) (((( 1 << 4) - 1) & (value)) << 28)
219
220 /***BCU Error Address Capture Register (0024 H)***/
221 #define AMAZON_BCU_EADD ((volatile u32*)(AMAZON_BCU+ 0x0024))
222 #define AMAZON_BCU_EADD_FPIADR
223
224 /***BCU Error Data Capture Register (0028H)***/
225 #define AMAZON_BCU_EDAT ((volatile u32*)(AMAZON_BCU+ 0x0028))
226 #define AMAZON_BCU_EDAT_FPIDAT
227
228 /***********************************************************************/
229 /* Module : Switch register address and bits */
230 /***********************************************************************/
231
232 #define AMAZON_SWITCH (KSEG1+0x10106000)
233 /***********************************************************************/
234 #define AMAZON_SW_UN_DEST AMAZON_SWITCH+0x00 /*Unknown destination register*/
235 #define AMAZON_SW_VLAN_CTRL AMAZON_SWITCH+0x04 /*VLAN control register*/
236 #define AMAZON_SW_PS_CTL AMAZON_SWITCH+0x08 /*port status control register*/
237 #define AMAZON_SW_COS_CTL AMAZON_SWITCH+0x0c /*Cos control register*/
238 #define AMAZON_SW_VLAN_COS AMAZON_SWITCH+0x10 /*VLAN priority cos mapping register*/
239 #define AMAZON_SW_DSCP_COS3 AMAZON_SWITCH+0x14 /*DSCP cos mapping register3*/
240 #define AMAZON_SW_DSCP_COS2 AMAZON_SWITCH+0x18 /*DSCP cos mapping register2*/
241 #define AMAZON_SW_DSCP_COS1 AMAZON_SWITCH+0x1c /*DSCP cos mapping register1*/
242 #define AMAZON_SW_DSCP_COS0 AMAZON_SWITCH+0x20 /*DSCP cos mapping register*/
243 #define AMAZON_SW_ARL_CTL AMAZON_SWITCH+0x24 /*ARL control register*/
244 #define AMAZON_SW_PKT_LEN AMAZON_SWITCH+0x28 /*packet length register*/
245 #define AMAZON_SW_CPU_ACTL AMAZON_SWITCH+0x2c /*CPU control register1*/
246 #define AMAZON_SW_DATA1 AMAZON_SWITCH+0x30 /*CPU access control register1*/
247 #define AMAZON_SW_DATA2 AMAZON_SWITCH+0x34 /*CPU access control register2*/
248 #define AMAZON_SW_P2_PCTL AMAZON_SWITCH+0x38 /*Port2 control register*/
249 #define AMAZON_SW_P0_TX_CTL AMAZON_SWITCH+0x3c /*port0 TX control register*/
250 #define AMAZON_SW_P1_TX_CTL AMAZON_SWITCH+0x40 /*port 1 TX control register*/
251 #define AMAZON_SW_P0_WM AMAZON_SWITCH+0x44 /*port 0 watermark control register*/
252 #define AMAZON_SW_P1_WM AMAZON_SWITCH+0x48 /*port 1 watermark control register*/
253 #define AMAZON_SW_P2_WM AMAZON_SWITCH+0x4c /*port 2 watermark control register*/
254 #define AMAZON_SW_GBL_WM AMAZON_SWITCH+0x50 /*Global watermark register*/
255 #define AMAZON_SW_PM_CTL AMAZON_SWITCH+0x54 /*PM control register*/
256 #define AMAZON_SW_P2_CTL AMAZON_SWITCH+0x58 /*PMAC control register*/
257 #define AMAZON_SW_P2_TX_IPG AMAZON_SWITCH+0x5c /*port2 TX IPG control register*/
258 #define AMAZON_SW_P2_RX_IPG AMAZON_SWITCH+0x60 /*prot2 RX IPG control register*/
259 #define AMAZON_SW_MDIO_ACC AMAZON_SWITCH+0x64 /*MDIO access register*/
260 #define AMAZON_SW_EPHY AMAZON_SWITCH+0x68 /*Ethernet PHY register*/
261 #define AMAZON_SW_MDIO_CFG AMAZON_SWITCH+0x6c /*MDIO configuration register*/
262 #define AMAZON_SW_P0_RCV_DROP_CNT AMAZON_SWITCH+0x70 /*port0 receive drop counter */
263 #define AMAZON_SW_P0_RCV_FRAME_ERR_CNT AMAZON_SWITCH+0x74 /*port0 receive frame error conter*/
264 #define AMAZON_SW_P0_TX_COLL_CNT AMAZON_SWITCH+0x78 /*port0 transmit collision counter*/
265 #define AMAZON_SW_P0_TX_DROP_CNT AMAZON_SWITCH+0x7c /*port1 transmit drop counter*/
266 #define AMAZON_SW_P1_RCV_DROP_CNT AMAZON_SWITCH+0x80 /*port1 receive drop counter*/
267 #define AMAZON_SW_P1_RCV_FRAME_ERR_CNT AMAZON_SWITCH+0x84 /*port1 receive error counter*/
268 #define AMAZON_SW_P1_TX_COLL_CNT AMAZON_SWITCH+0x88 /*port1 transmit collision counter*/
269 #define AMAZON_SW_P1_TX_DROP_CNT AMAZON_SWITCH+0x8c /*port1 transmit drop counter*/
270
271
272
273 /***********************************************************************/
274 /* Module : SSC register address and bits */
275 /***********************************************************************/
276 #define AMAZON_SSC_BASE_ADD_0 (KSEG1+0x10100800)
277
278 /*165001:henryhsu:20050603:Source add by Bing Tao*/
279
280 /*configuration/Status Registers in Bus Clock Domain*/
281 #define AMAZON_SSC_CLC ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x0000))
282 #define AMAZON_SSC_ID ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x0008))
283 #define AMAZON_SSC_CON ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x0010))
284 #define AMAZON_SSC_STATE ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x0014))
285 #define AMAZON_SSC_WHBSTATE ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x0018))
286 #define AMAZON_SSC_TB ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x0020))
287 #define AMAZON_SSC_RB ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x0024))
288 #define AMAZON_SSC_FSTAT ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x0038))
289
290 /*Configuration/Status Registers in Kernel Clock Domain*/
291 #define AMAZON_SSC_PISEL ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x0004))
292 #define AMAZON_SSC_RXFCON ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x0030))
293 #define AMAZON_SSC_TXFCON ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x0034))
294 #define AMAZON_SSC_BR ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x0040))
295 #define AMAZON_SSC_BRSTAT ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x0044))
296 #define AMAZON_SSC_SFCON ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x0060))
297 #define AMAZON_SSC_SFSTAT ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x0064))
298 #define AMAZON_SSC_GPOCON ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x0070))
299 #define AMAZON_SSC_GPOSTAT ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x0074))
300 #define AMAZON_SSC_WHBGPOSTAT ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x0078))
301 #define AMAZON_SSC_RXREQ ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x0080))
302 #define AMAZON_SSC_RXCNT ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x0084))
303
304 /*DMA Registers in Bus Clock Domain*/
305 #define AMAZON_SSC_DMA_CON ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x00ec))
306
307 /*interrupt Node Registers in Bus Clock Domain*/
308 #define AMAZON_SSC_IRNEN ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x00F4))
309 #define AMAZON_SSC_IRNICR ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x00FC))
310 #define AMAZON_SSC_IRNCR ((volatile u32*)(AMAZON_SSC_BASE_ADD_0+0x00F8))
311
312 /*165001*/
313
314 /***********************************************************************/
315
316
317
318 /***********************************************************************/
319 /* Module : EBU register address and bits */
320 /***********************************************************************/
321
322 #define AMAZON_EBU (KSEG1+0x10105300)
323 /***********************************************************************/
324
325
326 /***EBU Clock Control Register***/
327 #define AMAZON_EBU_CLC ((volatile u32*)(AMAZON_EBU+ 0x0000))
328 #define AMAZON_EBU_CLC_DISS (1 << 1)
329 #define AMAZON_EBU_CLC_DISR (1 << 0)
330
331 /***EBU Global Control Register***/
332 #define AMAZON_EBU_CON ((volatile u32*)(AMAZON_EBU+ 0x0010))
333 #define AMAZON_EBU_CON_DTACS(value) (((( 1 << 3) - 1) & (value)) << 20)
334 #define AMAZON_EBU_CON_DTARW(value) (((( 1 << 3) - 1) & (value)) << 16)
335 #define AMAZON_EBU_CON_TOUTC(value) (((( 1 << 8) - 1) & (value)) << 8)
336 #define AMAZON_EBU_CON_ARBMODE(value) (((( 1 << 2) - 1) & (value)) << 6)
337 #define AMAZON_EBU_CON_ARBSYNC (1 << 5)
338 #define AMAZON_EBU_CON_1 (1 << 3)
339
340 /***EBU Address Select Register 0***/
341 #define AMAZON_EBU_ADDSEL0 ((volatile u32*)(AMAZON_EBU+ 0x0020))
342 #define AMAZON_EBU_ADDSEL0_BASE(value) (((( 1 << 20) - 1) & (value)) << 12)
343 #define AMAZON_EBU_ADDSEL0_MASK(value) (((( 1 << 4) - 1) & (value)) << 4)
344 #define AMAZON_EBU_ADDSEL0_MIRRORE (1 << 1)
345 #define AMAZON_EBU_ADDSEL0_REGEN (1 << 0)
346
347 /***EBU Address Select Register 1***/
348 #define AMAZON_EBU_ADDSEL1 ((volatile u32*)(AMAZON_EBU+ 0x0024))
349 #define AMAZON_EBU_ADDSEL1_BASE(value) (((( 1 << 20) - 1) & (value)) << 12)
350 #define AMAZON_EBU_ADDSEL1_MASK(value) (((( 1 << 4) - 1) & (value)) << 4)
351 #define AMAZON_EBU_ADDSEL1_MIRRORE (1 << 1)
352 #define AMAZON_EBU_ADDSEL1_REGEN (1 << 0)
353
354 /***EBU Address Select Register 2***/
355 #define AMAZON_EBU_ADDSEL2 ((volatile u32*)(AMAZON_EBU+ 0x0028))
356 #define AMAZON_EBU_ADDSEL2_BASE(value) (((( 1 << 20) - 1) & (value)) << 12)
357 #define AMAZON_EBU_ADDSEL2_MASK(value) (((( 1 << 4) - 1) & (value)) << 4)
358 #define AMAZON_EBU_ADDSEL2_MIRRORE (1 << 1)
359 #define AMAZON_EBU_ADDSEL2_REGEN (1 << 0)
360
361 /***EBU Bus Configuration Register 0***/
362 #define AMAZON_EBU_BUSCON0 ((volatile u32*)(AMAZON_EBU+ 0x0060))
363 #define AMAZON_EBU_BUSCON0_WRDIS (1 << 31)
364 #define AMAZON_EBU_BUSCON0_ALEC(value) (((( 1 << 2) - 1) & (value)) << 29)
365 #define AMAZON_EBU_BUSCON0_BCGEN(value) (((( 1 << 2) - 1) & (value)) << 27)
366 #define AMAZON_EBU_BUSCON0_AGEN(value) (((( 1 << 2) - 1) & (value)) << 24)
367 #define AMAZON_EBU_BUSCON0_CMULTR(value) (((( 1 << 2) - 1) & (value)) << 22)
368 #define AMAZON_EBU_BUSCON0_WAIT(value) (((( 1 << 2) - 1) & (value)) << 20)
369 #define AMAZON_EBU_BUSCON0_WAITINV (1 << 19)
370 #define AMAZON_EBU_BUSCON0_SETUP (1 << 18)
371 #define AMAZON_EBU_BUSCON0_PORTW(value) (((( 1 << 2) - 1) & (value)) << 16)
372 #define AMAZON_EBU_BUSCON0_WAITRDC(value) (((( 1 << 7) - 1) & (value)) << 9)
373 #define AMAZON_EBU_BUSCON0_WAITWRC(value) (((( 1 << 3) - 1) & (value)) << 6)
374 #define AMAZON_EBU_BUSCON0_HOLDC(value) (((( 1 << 2) - 1) & (value)) << 4)
375 #define AMAZON_EBU_BUSCON0_RECOVC(value) (((( 1 << 2) - 1) & (value)) << 2)
376 #define AMAZON_EBU_BUSCON0_CMULT(value) (((( 1 << 2) - 1) & (value)) << 0)
377
378 /***EBU Bus Configuration Register 1***/
379 #define AMAZON_EBU_BUSCON1 ((volatile u32*)(AMAZON_EBU+ 0x0064))
380 #define AMAZON_EBU_BUSCON1_WRDIS (1 << 31)
381 #define AMAZON_EBU_BUSCON1_ALEC(value) (((( 1 << 2) - 1) & (value)) << 29)
382 #define AMAZON_EBU_BUSCON1_BCGEN(value) (((( 1 << 2) - 1) & (value)) << 27)
383 #define AMAZON_EBU_BUSCON1_AGEN(value) (((( 1 << 2) - 1) & (value)) << 24)
384 #define AMAZON_EBU_BUSCON1_CMULTR(value) (((( 1 << 2) - 1) & (value)) << 22)
385 #define AMAZON_EBU_BUSCON1_WAIT(value) (((( 1 << 2) - 1) & (value)) << 20)
386 #define AMAZON_EBU_BUSCON1_WAITINV (1 << 19)
387 #define AMAZON_EBU_BUSCON1_SETUP (1 << 18)
388 #define AMAZON_EBU_BUSCON1_PORTW(value) (((( 1 << 2) - 1) & (value)) << 16)
389 #define AMAZON_EBU_BUSCON1_WAITRDC(value) (((( 1 << 7) - 1) & (value)) << 9)
390 #define AMAZON_EBU_BUSCON1_WAITWRC(value) (((( 1 << 3) - 1) & (value)) << 6)
391 #define AMAZON_EBU_BUSCON1_HOLDC(value) (((( 1 << 2) - 1) & (value)) << 4)
392 #define AMAZON_EBU_BUSCON1_RECOVC(value) (((( 1 << 2) - 1) & (value)) << 2)
393 #define AMAZON_EBU_BUSCON1_CMULT(value) (((( 1 << 2) - 1) & (value)) << 0)
394
395 /***EBU Bus Configuration Register 2***/
396 #define AMAZON_EBU_BUSCON2 ((volatile u32*)(AMAZON_EBU+ 0x0068))
397 #define AMAZON_EBU_BUSCON2_WRDIS (1 << 31)
398 #define AMAZON_EBU_BUSCON2_ALEC(value) (((( 1 << 2) - 1) & (value)) << 29)
399 #define AMAZON_EBU_BUSCON2_BCGEN(value) (((( 1 << 2) - 1) & (value)) << 27)
400 #define AMAZON_EBU_BUSCON2_AGEN(value) (((( 1 << 2) - 1) & (value)) << 24)
401 #define AMAZON_EBU_BUSCON2_CMULTR(value) (((( 1 << 2) - 1) & (value)) << 22)
402 #define AMAZON_EBU_BUSCON2_WAIT(value) (((( 1 << 2) - 1) & (value)) << 20)
403 #define AMAZON_EBU_BUSCON2_WAITINV (1 << 19)
404 #define AMAZON_EBU_BUSCON2_SETUP (1 << 18)
405 #define AMAZON_EBU_BUSCON2_PORTW(value) (((( 1 << 2) - 1) & (value)) << 16)
406 #define AMAZON_EBU_BUSCON2_WAITRDC(value) (((( 1 << 7) - 1) & (value)) << 9)
407 #define AMAZON_EBU_BUSCON2_WAITWRC(value) (((( 1 << 3) - 1) & (value)) << 6)
408 #define AMAZON_EBU_BUSCON2_HOLDC(value) (((( 1 << 2) - 1) & (value)) << 4)
409 #define AMAZON_EBU_BUSCON2_RECOVC(value) (((( 1 << 2) - 1) & (value)) << 2)
410 #define AMAZON_EBU_BUSCON2_CMULT(value) (((( 1 << 2) - 1) & (value)) << 0)
411
412 /***********************************************************************/
413 /* Module : SDRAM register address and bits */
414 /***********************************************************************/
415
416 #define AMAZON_SDRAM (KSEG1+0x1F800000)
417 /***********************************************************************/
418
419
420 /***MC Access Error Cause Register***/
421 #define AMAZON_SDRAM_MC_ERRCAUSE ((volatile u32*)(AMAZON_SDRAM+ 0x0010))
422 #define AMAZON_SDRAM_MC_ERRCAUSE_ERR (1 << 31)
423 #define AMAZON_SDRAM_MC_ERRCAUSE_PORT(value) (((( 1 << 4) - 1) & (value)) << 16)
424 #define AMAZON_SDRAM_MC_ERRCAUSE_CAUSE(value) (((( 1 << 2) - 1) & (value)) << 0)
425 #define AMAZON_SDRAM_MC_ERRCAUSE_Res(value) (((( 1 << NaN) - 1) & (value)) << NaN)
426
427 /***MC Access Error Address Register***/
428 #define AMAZON_SDRAM_MC_ERRADDR ((volatile u32*)(AMAZON_SDRAM+ 0x0020))
429 #define AMAZON_SDRAM_MC_ERRADDR_ADDR
430
431 /***MC I/O General Purpose Register***/
432 #define AMAZON_SDRAM_MC_IOGP ((volatile u32*)(AMAZON_SDRAM+ 0x0100))
433 #define AMAZON_SDRAM_MC_IOGP_GPR6(value) (((( 1 << 4) - 1) & (value)) << 28)
434 #define AMAZON_SDRAM_MC_IOGP_GPR5(value) (((( 1 << 4) - 1) & (value)) << 24)
435 #define AMAZON_SDRAM_MC_IOGP_GPR4(value) (((( 1 << 4) - 1) & (value)) << 20)
436 #define AMAZON_SDRAM_MC_IOGP_GPR3(value) (((( 1 << 4) - 1) & (value)) << 16)
437 #define AMAZON_SDRAM_MC_IOGP_GPR2(value) (((( 1 << 4) - 1) & (value)) << 12)
438 #define AMAZON_SDRAM_MC_IOGP_CPS (1 << 11)
439 #define AMAZON_SDRAM_MC_IOGP_CLKDELAY(value) (((( 1 << 3) - 1) & (value)) << 8)
440 #define AMAZON_SDRAM_MC_IOGP_CLKRAT(value) (((( 1 << 4) - 1) & (value)) << 4)
441 #define AMAZON_SDRAM_MC_IOGP_RDDEL(value) (((( 1 << 4) - 1) & (value)) << 0)
442
443 /***MC Self Refresh Register***/
444 #define AMAZON_SDRAM_MC_SELFRFSH ((volatile u32*)(AMAZON_SDRAM+ 0x01A0))
445 #define AMAZON_SDRAM_MC_SELFRFSH_PWDS (1 << 1)
446 #define AMAZON_SDRAM_MC_SELFRFSH_PWD (1 << 0)
447 #define AMAZON_SDRAM_MC_SELFRFSH_Res(value) (((( 1 << 30) - 1) & (value)) << 2)
448
449 /***MC Enable Register***/
450 #define AMAZON_SDRAM_MC_CTRLENA ((volatile u32*)(AMAZON_SDRAM+ 0x0110))
451 #define AMAZON_SDRAM_MC_CTRLENA_ENA (1 << 0)
452 #define AMAZON_SDRAM_MC_CTRLENA_Res(value) (((( 1 << 31) - 1) & (value)) << 1)
453
454 /***MC Mode Register Setup Code***/
455 #define AMAZON_SDRAM_MC_MRSCODE ((volatile u32*)(AMAZON_SDRAM+ 0x0120))
456 #define AMAZON_SDRAM_MC_MRSCODE_UMC(value) (((( 1 << 5) - 1) & (value)) << 7)
457 #define AMAZON_SDRAM_MC_MRSCODE_CL(value) (((( 1 << 3) - 1) & (value)) << 4)
458 #define AMAZON_SDRAM_MC_MRSCODE_WT (1 << 3)
459 #define AMAZON_SDRAM_MC_MRSCODE_BL(value) (((( 1 << 3) - 1) & (value)) << 0)
460
461 /***MC Configuration Data-word Width Register***/
462 #define AMAZON_SDRAM_MC_CFGDW ((volatile u32*)(AMAZON_SDRAM+ 0x0130))
463 #define AMAZON_SDRAM_MC_CFGDW_DW(value) (((( 1 << 4) - 1) & (value)) << 0)
464 #define AMAZON_SDRAM_MC_CFGDW_Res(value) (((( 1 << 28) - 1) & (value)) << 4)
465
466 /***MC Configuration Physical Bank 0 Register***/
467 #define AMAZON_SDRAM_MC_CFGPB0 ((volatile u32*)(AMAZON_SDRAM+ 0x140))
468 #define AMAZON_SDRAM_MC_CFGPB0_MCSEN0(value) (((( 1 << 4) - 1) & (value)) << 12)
469 #define AMAZON_SDRAM_MC_CFGPB0_BANKN0(value) (((( 1 << 4) - 1) & (value)) << 8)
470 #define AMAZON_SDRAM_MC_CFGPB0_ROWW0(value) (((( 1 << 4) - 1) & (value)) << 4)
471 #define AMAZON_SDRAM_MC_CFGPB0_COLW0(value) (((( 1 << 4) - 1) & (value)) << 0)
472 #define AMAZON_SDRAM_MC_CFGPB0_Res(value) (((( 1 << 16) - 1) & (value)) << 16)
473
474 /***MC Latency Register***/
475 #define AMAZON_SDRAM_MC_LATENCY ((volatile u32*)(AMAZON_SDRAM+ 0x0180))
476 #define AMAZON_SDRAM_MC_LATENCY_TRP(value) (((( 1 << 4) - 1) & (value)) << 16)
477 #define AMAZON_SDRAM_MC_LATENCY_TRAS(value) (((( 1 << 4) - 1) & (value)) << 12)
478 #define AMAZON_SDRAM_MC_LATENCY_TRCD(value) (((( 1 << 4) - 1) & (value)) << 8)
479 #define AMAZON_SDRAM_MC_LATENCY_TDPL(value) (((( 1 << 4) - 1) & (value)) << 4)
480 #define AMAZON_SDRAM_MC_LATENCY_TDAL(value) (((( 1 << 4) - 1) & (value)) << 0)
481 #define AMAZON_SDRAM_MC_LATENCY_Res(value) (((( 1 << 12) - 1) & (value)) << 20)
482
483 /***MC Refresh Cycle Time Register***/
484 #define AMAZON_SDRAM_MC_TREFRESH ((volatile u32*)(AMAZON_SDRAM+ 0x0190))
485 #define AMAZON_SDRAM_MC_TREFRESH_TREF(value) (((( 1 << 13) - 1) & (value)) << 0)
486 #define AMAZON_SDRAM_MC_TREFRESH_Res(value) (((( 1 << 19) - 1) & (value)) << 13)
487
488 /***********************************************************************/
489 /* Module : GPTU register address and bits */
490 /***********************************************************************/
491
492 #define AMAZON_GPTU (KSEG1+0x10100A00)
493 /***********************************************************************/
494
495
496 /***GPT Clock Control Register***/
497 #define AMAZON_GPTU_CLC ((volatile u32*)(AMAZON_GPTU+ 0x0000))
498 #define AMAZON_GPTU_CLC_RMC(value) (((( 1 << 8) - 1) & (value)) << 8)
499 #define AMAZON_GPTU_CLC_DISS (1 << 1)
500 #define AMAZON_GPTU_CLC_DISR (1 << 0)
501
502 /***GPT Timer 3 Control Register***/
503 #define AMAZON_GPTU_T3CON ((volatile u32*)(AMAZON_GPTU+ 0x0014))
504 #define AMAZON_GPTU_T3CON_T3RDIR (1 << 15)
505 #define AMAZON_GPTU_T3CON_T3CHDIR (1 << 14)
506 #define AMAZON_GPTU_T3CON_T3EDGE (1 << 13)
507 #define AMAZON_GPTU_T3CON_BPS1(value) (((( 1 << 2) - 1) & (value)) << 11)
508 #define AMAZON_GPTU_T3CON_T3OTL (1 << 10)
509 #define AMAZON_GPTU_T3CON_T3UD (1 << 7)
510 #define AMAZON_GPTU_T3CON_T3R (1 << 6)
511 #define AMAZON_GPTU_T3CON_T3M(value) (((( 1 << 3) - 1) & (value)) << 3)
512 #define AMAZON_GPTU_T3CON_T3I(value) (((( 1 << 3) - 1) & (value)) << 0)
513
514 /***GPT Write Hardware Modified Timer 3 Control Register
515 If set and clear bit are written concurrently with 1, the associated bit is not changed.***/
516 #define AMAZON_GPTU_WHBT3CON ((volatile u32*)(AMAZON_GPTU+ 0x004C))
517 #define AMAZON_GPTU_WHBT3CON_SETT3CHDIR (1 << 15)
518 #define AMAZON_GPTU_WHBT3CON_CLRT3CHDIR (1 << 14)
519 #define AMAZON_GPTU_WHBT3CON_SETT3EDGE (1 << 13)
520 #define AMAZON_GPTU_WHBT3CON_CLRT3EDGE (1 << 12)
521 #define AMAZON_GPTU_WHBT3CON_SETT3OTL (1 << 11)
522 #define AMAZON_GPTU_WHBT3CON_CLRT3OTL (1 << 10)
523
524 /***GPT Timer 2 Control Register***/
525 #define AMAZON_GPTU_T2CON ((volatile u32*)(AMAZON_GPTU+ 0x0010))
526 #define AMAZON_GPTU_T2CON_TxRDIR (1 << 15)
527 #define AMAZON_GPTU_T2CON_TxCHDIR (1 << 14)
528 #define AMAZON_GPTU_T2CON_TxEDGE (1 << 13)
529 #define AMAZON_GPTU_T2CON_TxIRDIS (1 << 12)
530 #define AMAZON_GPTU_T2CON_TxRC (1 << 9)
531 #define AMAZON_GPTU_T2CON_TxUD (1 << 7)
532 #define AMAZON_GPTU_T2CON_TxR (1 << 6)
533 #define AMAZON_GPTU_T2CON_TxM(value) (((( 1 << 3) - 1) & (value)) << 3)
534 #define AMAZON_GPTU_T2CON_TxI(value) (((( 1 << 3) - 1) & (value)) << 0)
535
536 /***GPT Timer 4 Control Register***/
537 #define AMAZON_GPTU_T4CON ((volatile u32*)(AMAZON_GPTU+ 0x0018))
538 #define AMAZON_GPTU_T4CON_TxRDIR (1 << 15)
539 #define AMAZON_GPTU_T4CON_TxCHDIR (1 << 14)
540 #define AMAZON_GPTU_T4CON_TxEDGE (1 << 13)
541 #define AMAZON_GPTU_T4CON_TxIRDIS (1 << 12)
542 #define AMAZON_GPTU_T4CON_TxRC (1 << 9)
543 #define AMAZON_GPTU_T4CON_TxUD (1 << 7)
544 #define AMAZON_GPTU_T4CON_TxR (1 << 6)
545 #define AMAZON_GPTU_T4CON_TxM(value) (((( 1 << 3) - 1) & (value)) << 3)
546 #define AMAZON_GPTU_T4CON_TxI(value) (((( 1 << 3) - 1) & (value)) << 0)
547
548 /***GPT Write HW Modified Timer 2 Control Register If set
549 and clear bit are written concurrently with 1, the associated bit is not changed.***/
550 #define AMAZON_GPTU_WHBT2CON ((volatile u32*)(AMAZON_GPTU+ 0x0048))
551 #define AMAZON_GPTU_WHBT2CON_SETTxCHDIR (1 << 15)
552 #define AMAZON_GPTU_WHBT2CON_CLRTxCHDIR (1 << 14)
553 #define AMAZON_GPTU_WHBT2CON_SETTxEDGE (1 << 13)
554 #define AMAZON_GPTU_WHBT2CON_CLRTxEDGE (1 << 12)
555
556 /***GPT Write HW Modified Timer 4 Control Register If set
557 and clear bit are written concurrently with 1, the associated bit is not changed.***/
558 #define AMAZON_GPTU_WHBT4CON ((volatile u32*)(AMAZON_GPTU+ 0x0050))
559 #define AMAZON_GPTU_WHBT4CON_SETTxCHDIR (1 << 15)
560 #define AMAZON_GPTU_WHBT4CON_CLRTxCHDIR (1 << 14)
561 #define AMAZON_GPTU_WHBT4CON_SETTxEDGE (1 << 13)
562 #define AMAZON_GPTU_WHBT4CON_CLRTxEDGE (1 << 12)
563
564 /***GPT Capture Reload Register***/
565 #define AMAZON_GPTU_CAPREL ((volatile u32*)(AMAZON_GPTU+ 0x0030))
566 #define AMAZON_GPTU_CAPREL_CAPREL(value) (((( 1 << 16) - 1) & (value)) << 0)
567
568 /***GPT Timer 2 Register***/
569 #define AMAZON_GPTU_T2 ((volatile u32*)(AMAZON_GPTU+ 0x0034))
570 #define AMAZON_GPTU_T2_TVAL(value) (((( 1 << 16) - 1) & (value)) << 0)
571
572 /***GPT Timer 3 Register***/
573 #define AMAZON_GPTU_T3 ((volatile u32*)(AMAZON_GPTU+ 0x0038))
574 #define AMAZON_GPTU_T3_TVAL(value) (((( 1 << 16) - 1) & (value)) << 0)
575
576 /***GPT Timer 4 Register***/
577 #define AMAZON_GPTU_T4 ((volatile u32*)(AMAZON_GPTU+ 0x003C))
578 #define AMAZON_GPTU_T4_TVAL(value) (((( 1 << 16) - 1) & (value)) << 0)
579
580 /***GPT Timer 5 Register***/
581 #define AMAZON_GPTU_T5 ((volatile u32*)(AMAZON_GPTU+ 0x0040))
582 #define AMAZON_GPTU_T5_TVAL(value) (((( 1 << 16) - 1) & (value)) << 0)
583
584 /***GPT Timer 6 Register***/
585 #define AMAZON_GPTU_T6 ((volatile u32*)(AMAZON_GPTU+ 0x0044))
586 #define AMAZON_GPTU_T6_TVAL(value) (((( 1 << 16) - 1) & (value)) << 0)
587
588 /***GPT Timer 6 Control Register***/
589 #define AMAZON_GPTU_T6CON ((volatile u32*)(AMAZON_GPTU+ 0x0020))
590 #define AMAZON_GPTU_T6CON_T6SR (1 << 15)
591 #define AMAZON_GPTU_T6CON_T6CLR (1 << 14)
592 #define AMAZON_GPTU_T6CON_BPS2(value) (((( 1 << 2) - 1) & (value)) << 11)
593 #define AMAZON_GPTU_T6CON_T6OTL (1 << 10)
594 #define AMAZON_GPTU_T6CON_T6UD (1 << 7)
595 #define AMAZON_GPTU_T6CON_T6R (1 << 6)
596 #define AMAZON_GPTU_T6CON_T6M(value) (((( 1 << 3) - 1) & (value)) << 3)
597 #define AMAZON_GPTU_T6CON_T6I(value) (((( 1 << 3) - 1) & (value)) << 0)
598
599 /***GPT Write HW Modified Timer 6 Control Register If set
600 and clear bit are written concurrently with 1, the associated bit is not changed.***/
601 #define AMAZON_GPTU_WHBT6CON ((volatile u32*)(AMAZON_GPTU+ 0x0054))
602 #define AMAZON_GPTU_WHBT6CON_SETT6OTL (1 << 11)
603 #define AMAZON_GPTU_WHBT6CON_CLRT6OTL (1 << 10)
604
605 /***GPT Timer 5 Control Register***/
606 #define AMAZON_GPTU_T5CON ((volatile u32*)(AMAZON_GPTU+ 0x001C))
607 #define AMAZON_GPTU_T5CON_T5SC (1 << 15)
608 #define AMAZON_GPTU_T5CON_T5CLR (1 << 14)
609 #define AMAZON_GPTU_T5CON_CI(value) (((( 1 << 2) - 1) & (value)) << 12)
610 #define AMAZON_GPTU_T5CON_T5CC (1 << 11)
611 #define AMAZON_GPTU_T5CON_CT3 (1 << 10)
612 #define AMAZON_GPTU_T5CON_T5RC (1 << 9)
613 #define AMAZON_GPTU_T5CON_T5UDE (1 << 8)
614 #define AMAZON_GPTU_T5CON_T5UD (1 << 7)
615 #define AMAZON_GPTU_T5CON_T5R (1 << 6)
616 #define AMAZON_GPTU_T5CON_T5M(value) (((( 1 << 3) - 1) & (value)) << 3)
617 #define AMAZON_GPTU_T5CON_T5I(value) (((( 1 << 3) - 1) & (value)) << 0)
618
619
620 /***********************************************************************/
621 /* Module : ASC register address and bits */
622 /***********************************************************************/
623
624 #define AMAZON_ASC (KSEG1+0x10100400)
625 /***********************************************************************/
626
627
628 /***ASC Port Input Select Register***/
629 #define AMAZON_ASC_PISEL (AMAZON_ASC+ 0x0004)
630 #define AMAZON_ASC_PISEL_RIS (1 << 0)
631
632 /***ASC Control Register***/
633 #define AMAZON_ASC_CON (AMAZON_ASC+ 0x0010)
634 #define AMAZON_ASC_CON_R (1 << 15)
635 #define AMAZON_ASC_CON_LB (1 << 14)
636 #define AMAZON_ASC_CON_BRS (1 << 13)
637 #define AMAZON_ASC_CON_ODD (1 << 12)
638 #define AMAZON_ASC_CON_FDE (1 << 11)
639 #define AMAZON_ASC_CON_OE (1 << 10)
640 #define AMAZON_ASC_CON_FE (1 << 9)
641 #define AMAZON_ASC_CON_PE (1 << 8)
642 #define AMAZON_ASC_CON_OEN (1 << 7)
643 #define AMAZON_ASC_CON_FEN (1 << 6)
644 #define AMAZON_ASC_CON_PENRXDI (1 << 5)
645 #define AMAZON_ASC_CON_REN (1 << 4)
646 #define AMAZON_ASC_CON_STP (1 << 3)
647 #define AMAZON_ASC_CON_M(value) (((( 1 << 3) - 1) & (value)) << 0)
648
649 /***ASC Write Hardware Modified Control Register***/
650 #define AMAZON_ASC_WHBCON (AMAZON_ASC+ 0x0050)
651 #define AMAZON_ASC_WHBCON_SETOE (1 << 13)
652 #define AMAZON_ASC_WHBCON_SETFE (1 << 12)
653 #define AMAZON_ASC_WHBCON_SETPE (1 << 11)
654 #define AMAZON_ASC_WHBCON_CLROE (1 << 10)
655 #define AMAZON_ASC_WHBCON_CLRFE (1 << 9)
656 #define AMAZON_ASC_WHBCON_CLRPE (1 << 8)
657 #define AMAZON_ASC_WHBCON_SETREN (1 << 5)
658 #define AMAZON_ASC_WHBCON_CLRREN (1 << 4)
659
660 /***ASC Baudrate Timer/Reload Register***/
661 #define AMAZON_ASC_BTR (AMAZON_ASC+ 0x0014)
662 #define AMAZON_ASC_BTR_BR_VALUE(value) (((( 1 << 13) - 1) & (value)) << 0)
663
664 /***ASC Fractional Divider Register***/
665 #define AMAZON_ASC_FDV (AMAZON_ASC+ 0x0018)
666 #define AMAZON_ASC_FDV_FD_VALUE(value) (((( 1 << 9) - 1) & (value)) << 0)
667
668 /***ASC IrDA Pulse Mode/Width Register***/
669 #define AMAZON_ASC_PMW (AMAZON_ASC+ 0x001C)
670 #define AMAZON_ASC_PMW_IRPW (1 << 8)
671 #define AMAZON_ASC_PMW_PW_VALUE(value) (((( 1 << 8) - 1) & (value)) << 0)
672
673 /***ASC Transmit Buffer Register***/
674 #define AMAZON_ASC_TBUF (AMAZON_ASC+ 0x0020)
675 #define AMAZON_ASC_TBUF_TD_VALUE(value) (((( 1 << 9) - 1) & (value)) << 0)
676
677 /***ASC Receive Buffer Register***/
678 #define AMAZON_ASC_RBUF (AMAZON_ASC+ 0x0024)
679 #define AMAZON_ASC_RBUF_RD_VALUE(value) (((( 1 << 9) - 1) & (value)) << 0)
680
681 /***ASC Autobaud Control Register***/
682 #define AMAZON_ASC_ABCON (AMAZON_ASC+ 0x0030)
683 #define AMAZON_ASC_ABCON_RXINV (1 << 11)
684 #define AMAZON_ASC_ABCON_TXINV (1 << 10)
685 #define AMAZON_ASC_ABCON_ABEM(value) (((( 1 << 2) - 1) & (value)) << 8)
686 #define AMAZON_ASC_ABCON_FCDETEN (1 << 4)
687 #define AMAZON_ASC_ABCON_ABDETEN (1 << 3)
688 #define AMAZON_ASC_ABCON_ABSTEN (1 << 2)
689 #define AMAZON_ASC_ABCON_AUREN (1 << 1)
690 #define AMAZON_ASC_ABCON_ABEN (1 << 0)
691
692 /***Receive FIFO Control Register***/
693 #define AMAZON_ASC_RXFCON (AMAZON_ASC+ 0x0040)
694 #define AMAZON_ASC_RXFCON_RXFITL(value) (((( 1 << 6) - 1) & (value)) << 8)
695 #define AMAZON_ASC_RXFCON_RXTMEN (1 << 2)
696 #define AMAZON_ASC_RXFCON_RXFFLU (1 << 1)
697 #define AMAZON_ASC_RXFCON_RXFEN (1 << 0)
698
699 /***Transmit FIFO Control Register***/
700 #define AMAZON_ASC_TXFCON (AMAZON_ASC+ 0x0044)
701 #define AMAZON_ASC_TXFCON_TXFITL(value) (((( 1 << 6) - 1) & (value)) << 8)
702 #define AMAZON_ASC_TXFCON_TXTMEN (1 << 2)
703 #define AMAZON_ASC_TXFCON_TXFFLU (1 << 1)
704 #define AMAZON_ASC_TXFCON_TXFEN (1 << 0)
705
706 /***FIFO Status Register***/
707 #define AMAZON_ASC_FSTAT (AMAZON_ASC+ 0x0048)
708 #define AMAZON_ASC_FSTAT_TXFFL(value) (((( 1 << 6) - 1) & (value)) << 8)
709 #define AMAZON_ASC_FSTAT_RXFFL(value) (((( 1 << 6) - 1) & (value)) << 0)
710
711 /***ASC Write HW Modified Autobaud Control Register***/
712 #define AMAZON_ASC_WHBABCON (AMAZON_ASC+ 0x0054)
713 #define AMAZON_ASC_WHBABCON_SETABEN (1 << 1)
714 #define AMAZON_ASC_WHBABCON_CLRABEN (1 << 0)
715
716 /***ASC Autobaud Status Register***/
717 #define AMAZON_ASC_ABSTAT (AMAZON_ASC+ 0x0034)
718 #define AMAZON_ASC_ABSTAT_DETWAIT (1 << 4)
719 #define AMAZON_ASC_ABSTAT_SCCDET (1 << 3)
720 #define AMAZON_ASC_ABSTAT_SCSDET (1 << 2)
721 #define AMAZON_ASC_ABSTAT_FCCDET (1 << 1)
722 #define AMAZON_ASC_ABSTAT_FCSDET (1 << 0)
723
724 /***ASC Write HW Modified Autobaud Status Register***/
725 #define AMAZON_ASC_WHBABSTAT (AMAZON_ASC+ 0x0058)
726 #define AMAZON_ASC_WHBABSTAT_SETDETWAIT (1 << 9)
727 #define AMAZON_ASC_WHBABSTAT_CLRDETWAIT (1 << 8)
728 #define AMAZON_ASC_WHBABSTAT_SETSCCDET (1 << 7)
729 #define AMAZON_ASC_WHBABSTAT_CLRSCCDET (1 << 6)
730 #define AMAZON_ASC_WHBABSTAT_SETSCSDET (1 << 5)
731 #define AMAZON_ASC_WHBABSTAT_CLRSCSDET (1 << 4)
732 #define AMAZON_ASC_WHBABSTAT_SETFCCDET (1 << 3)
733 #define AMAZON_ASC_WHBABSTAT_CLRFCCDET (1 << 2)
734 #define AMAZON_ASC_WHBABSTAT_SETFCSDET (1 << 1)
735 #define AMAZON_ASC_WHBABSTAT_CLRFCSDET (1 << 0)
736
737 /***ASC Clock Control Register***/
738 #define AMAZON_ASC_CLC (AMAZON_ASC+ 0x0000)
739 #define AMAZON_ASC_CLC_RMC(value) (((( 1 << 8) - 1) & (value)) << 8)
740 #define AMAZON_ASC_CLC_DISS (1 << 1)
741 #define AMAZON_ASC_CLC_DISR (1 << 0)
742
743 /***ASC IRNCR0 **/
744 #define AMAZON_ASC_IRNCR0 (AMAZON_ASC+ 0x00FC)
745 /***ASC IRNCR1 **/
746 #define AMAZON_ASC_IRNCR1 (AMAZON_ASC+ 0x00F8)
747 #define ASC_IRNCR_TIR 0x1
748 #define ASC_IRNCR_RIR 0x2
749 #define ASC_IRNCR_EIR 0x4
750 /***********************************************************************/
751 /* Module : DMA register address and bits */
752 /***********************************************************************/
753
754 #define AMAZON_DMA (KSEG1+0x10103000)
755 /***********************************************************************/
756 #define AMAZON_DMA_CH_ON AMAZON_DMA+0x28
757 #define AMAZON_DMA_CH_RST AMAZON_DMA+0x2c
758 #define AMAZON_DMA_CH0_ISR AMAZON_DMA+0x30
759 #define AMAZON_DMA_CH1_ISR AMAZON_DMA+0x34
760 #define AMAZON_DMA_CH2_ISR AMAZON_DMA+0x38
761 #define AMAZON_DMA_CH3_ISR AMAZON_DMA+0x3c
762 #define AMAZON_DMA_CH4_ISR AMAZON_DMA+0x40
763 #define AMAZON_DMA_CH5_ISR AMAZON_DMA+0x44
764 #define AMAZON_DMA_CH6_ISR AMAZON_DMA+0x48
765 #define AMAZON_DMA_CH7_ISR AMAZON_DMA+0x4c
766 #define AMAZON_DMA_CH8_ISR AMAZON_DMA+0x50
767 #define AMAZON_DMA_CH9_ISR AMAZON_DMA+0x54
768 #define AMAZON_DMA_CH10_ISR AMAZON_DMA+0x58
769 #define AMAZON_DMA_CH11_ISR AMAZON_DMA+0x5c
770 #define AMAZON_DMA_CH0_MSK AMAZON_DMA+0x60
771 #define AMAZON_DMA_CH1_MSK AMAZON_DMA+0x64
772 #define AMAZON_DMA_CH2_MSK AMAZON_DMA+0x68
773 #define AMAZON_DMA_CH3_MSK AMAZON_DMA+0x6c
774 #define AMAZON_DMA_CH4_MSK AMAZON_DMA+0x70
775 #define AMAZON_DMA_CH5_MSK AMAZON_DMA+0x74
776 #define AMAZON_DMA_CH6_MSK AMAZON_DMA+0x78
777 #define AMAZON_DMA_CH7_MSK AMAZON_DMA+0x7c
778 #define AMAZON_DMA_CH8_MSK AMAZON_DMA+0x80
779 #define AMAZON_DMA_CH9_MSK AMAZON_DMA+0x84
780 #define AMAZON_DMA_CH10_MSK AMAZON_DMA+0x88
781 #define AMAZON_DMA_CH11_MSK AMAZON_DMA+0x8c
782 #define AMAZON_DMA_Desc_BA AMAZON_DMA+0x90
783 #define AMAZON_DMA_CH0_DES_LEN AMAZON_DMA+0x94
784 #define AMAZON_DMA_CH1_DES_LEN AMAZON_DMA+0x98
785 #define AMAZON_DMA_CH2_DES_LEN AMAZON_DMA+0x9c
786 #define AMAZON_DMA_CH3_DES_LEN AMAZON_DMA+0xa0
787 #define AMAZON_DMA_CH4_DES_LEN AMAZON_DMA+0xa4
788 #define AMAZON_DMA_CH5_DES_LEN AMAZON_DMA+0xa8
789 #define AMAZON_DMA_CH6_DES_LEN AMAZON_DMA+0xac
790 #define AMAZON_DMA_CH7_DES_LEN AMAZON_DMA+0xb0
791 #define AMAZON_DMA_CH8_DES_LEN AMAZON_DMA+0xb4
792 #define AMAZON_DMA_CH9_DES_LEN AMAZON_DMA+0xb8
793 #define AMAZON_DMA_CH10_DES_LEN AMAZON_DMA+0xbc
794 #define AMAZON_DMA_CH11_DES_LEN AMAZON_DMA+0xc0
795 #define AMAZON_DMA_CH1_DES_OFST AMAZON_DMA+0xc4
796 #define AMAZON_DMA_CH2_DES_OFST AMAZON_DMA+0xc8
797 #define AMAZON_DMA_CH3_DES_OFST AMAZON_DMA+0xcc
798 #define AMAZON_DMA_CH4_DES_OFST AMAZON_DMA+0xd0
799 #define AMAZON_DMA_CH5_DES_OFST AMAZON_DMA+0xd4
800 #define AMAZON_DMA_CH6_DES_OFST AMAZON_DMA+0xd8
801 #define AMAZON_DMA_CH7_DES_OFST AMAZON_DMA+0xdc
802 #define AMAZON_DMA_CH8_DES_OFST AMAZON_DMA+0xe0
803 #define AMAZON_DMA_CH9_DES_OFST AMAZON_DMA+0xe4
804 #define AMAZON_DMA_CH10_DES_OFST AMAZON_DMA+0xe8
805 #define AMAZON_DMA_CH11_DES_OFST AMAZON_DMA+0xec
806 #define AMAZON_DMA_SW_BL AMAZON_DMA+0xf0
807 #define AMAZON_DMA_TPE_BL AMAZON_DMA+0xf4
808 #define AMAZON_DMA_DPlus2FPI_BL AMAZON_DMA+0xf8
809 #define AMAZON_DMA_GRX_BUF_LEN AMAZON_DMA+0xfc
810 #define AMAZON_DMA_DMA_ECON_REG AMAZON_DMA+0x100
811 #define AMAZON_DMA_POLLING_REG AMAZON_DMA+0x104
812 #define AMAZON_DMA_CH_WGT AMAZON_DMA+0x108
813 #define AMAZON_DMA_TX_WGT AMAZON_DMA+0x10c
814 #define AMAZON_DMA_DPLus2FPI_CLASS AMAZON_DMA+0x110
815 #define AMAZON_DMA_COMB_ISR AMAZON_DMA+0x114
816
817 //channel reset
818 #define SWITCH1_RST_MASK 0x83 /* Switch1 channel mask */
819 #define SWITCH2_RST_MASK 0x10C /* Switch1 channel mask */
820 #define TPE_RST_MASK 0x630 /* TPE channel mask */
821 #define DPlus2FPI_RST_MASK 0x840 /* DPlusFPI channel mask */
822
823 //ISR
824 #define DMA_ISR_RDERR 0x20
825 #define DMA_ISR_CMDCPT 0x10
826 #define DMA_ISR_CPT 0x8
827 #define DMA_ISR_DURR 0x4
828 #define DMA_ISR_EOP 0x2
829 #define DMA_DESC_BYTEOFF_SHIFT 23
830
831 #define DMA_POLLING_ENABLE 0x80000000
832 #define DMA_POLLING_CNT 0x50 /*minimum 0x10, max 0xfff0*/
833
834 /***********************************************************************/
835 /* Module : Debug register address and bits */
836 /***********************************************************************/
837
838 #define AMAZON_DEBUG (KSEG1+0x1F106000)
839 /***********************************************************************/
840
841
842 /***MCD Break System Control Register***/
843 #define AMAZON_DEBUG_MCD_BSCR ((volatile u32*)(AMAZON_DEBUG+ 0x0000))
844
845 /***PMC Performance Counter Control Register0***/
846 #define AMAZON_DEBUG_PMC_PCCR0 ((volatile u32*)(AMAZON_DEBUG+ 0x0010))
847
848 /***PMC Performance Counter Control Register1***/
849 #define AMAZON_DEBUG_PMC_PCCR1 ((volatile u32*)(AMAZON_DEBUG+ 0x0014))
850
851 /***PMC Performance Counter Register0***/
852 #define AMAZON_DEBUG_PMC_PCR0 ((volatile u32*)(AMAZON_DEBUG+ 0x0018))
853
854 /*165001:henryhsu:20050603:Source modified by Bing Tao*/
855
856 /***PMC Performance Counter Register1***/
857 //#define AMAZON_DEBUG_PMC_PCR1 ((volatile u32*)(AMAZON_DEBUG+ 0x0020))
858 #define AMAZON_DEBUG_PMC_PCR1 ((volatile u32*)(AMAZON_DEBUG+ 0x001c))
859
860 /*165001*/
861
862
863
864 /***MCD Suspend Mode Control Register***/
865 #define AMAZON_DEBUG_MCD_SMCR ((volatile u32*)(AMAZON_DEBUG+ 0x0024))
866
867 /***********************************************************************/
868 /* Module : GPIO register address and bits */
869 /***********************************************************************/
870
871 #define AMAZON_GPIO (KSEG1+0x10100B00)
872 /***********************************************************************/
873
874
875 /***Port 0 Data Output Register (0010H)***/
876 #define AMAZON_GPIO_P0_OUT ((volatile u32*)(AMAZON_GPIO+ 0x0010))
877
878 /***Port 1 Data Output Register (0040H)***/
879 #define AMAZON_GPIO_P1_OUT ((volatile u32*)(AMAZON_GPIO+ 0x0040))
880
881 /***Port 0 Data Input Register (0014H)***/
882 #define AMAZON_GPIO_P0_IN ((volatile u32*)(AMAZON_GPIO+ 0x0014))
883
884 /***Port 1 Data Input Register (0044H)***/
885 #define AMAZON_GPIO_P1_IN ((volatile u32*)(AMAZON_GPIO+ 0x0044))
886
887 /***Port 0 Direction Register (0018H)***/
888 #define AMAZON_GPIO_P0_DIR ((volatile u32*)(AMAZON_GPIO+ 0x0018))
889
890 /***Port 1 Direction Register (0048H)***/
891 #define AMAZON_GPIO_P1_DIR ((volatile u32*)(AMAZON_GPIO+ 0x0048))
892
893 /***Port 0 Alternate Function Select Register 0 (001C H) ***/
894 #define AMAZON_GPIO_P0_ALTSEL0 ((volatile u32*)(AMAZON_GPIO+ 0x001C))
895
896 /***Port 1 Alternate Function Select Register 0 (004C H) ***/
897 #define AMAZON_GPIO_P1_ALTSEL0 ((volatile u32*)(AMAZON_GPIO+ 0x004C))
898
899 /***Port 0 Alternate Function Select Register 1 (0020 H) ***/
900 #define AMAZON_GPIO_P0_ALTSEL1 ((volatile u32*)(AMAZON_GPIO+ 0x0020))
901
902 /***Port 1 Alternate Function Select Register 0 (0050 H) ***/
903 #define AMAZON_GPIO_P1_ALTSEL1 ((volatile u32*)(AMAZON_GPIO+ 0x0050))
904
905 /***Port 0 Open Drain Control Register (0024H)***/
906 #define AMAZON_GPIO_P0_OD ((volatile u32*)(AMAZON_GPIO+ 0x0024))
907
908 /***Port 1 Open Drain Control Register (0054H)***/
909 #define AMAZON_GPIO_P1_OD ((volatile u32*)(AMAZON_GPIO+ 0x0054))
910
911 /***Port 0 Input Schmitt-Trigger Off Register (0028 H) ***/
912 #define AMAZON_GPIO_P0_STOFF ((volatile u32*)(AMAZON_GPIO+ 0x0028))
913
914 /***Port 1 Input Schmitt-Trigger Off Register (0058 H) ***/
915 #define AMAZON_GPIO_P1_STOFF ((volatile u32*)(AMAZON_GPIO+ 0x0058))
916
917 /***Port 0 Pull Up/Pull Down Select Register (002C H)***/
918 #define AMAZON_GPIO_P0_PUDSEL ((volatile u32*)(AMAZON_GPIO+ 0x002C))
919
920 /***Port 1 Pull Up/Pull Down Select Register (005C H)***/
921 #define AMAZON_GPIO_P1_PUDSEL ((volatile u32*)(AMAZON_GPIO+ 0x005C))
922
923 /***Port 0 Pull Up Device Enable Register (0030 H)***/
924 #define AMAZON_GPIO_P0_PUDEN ((volatile u32*)(AMAZON_GPIO+ 0x0030))
925
926 /***Port 1 Pull Up Device Enable Register (0060 H)***/
927 #define AMAZON_GPIO_P1_PUDEN ((volatile u32*)(AMAZON_GPIO+ 0x0060))
928
929 /***********************************************************************/
930 /* Module : BIU register address and bits */
931 /***********************************************************************/
932
933 #define AMAZON_BIU (KSEG1+0x1FA80000)
934 /***********************************************************************/
935
936
937 /***BIU Identification Register***/
938 #define AMAZON_BIU_ID ((volatile u32*)(AMAZON_BIU+ 0x0000))
939 #define AMAZON_BIU_ID_ARCH (1 << 16)
940 #define AMAZON_BIU_ID_ID(value) (((( 1 << 8) - 1) & (value)) << 8)
941 #define AMAZON_BIU_ID_REV(value) (((( 1 << 8) - 1) & (value)) << 0)
942
943 /***BIU Access Error Cause Register***/
944 #define AMAZON_BIU_ERRCAUSE ((volatile u32*)(AMAZON_BIU+ 0x0100))
945 #define AMAZON_BIU_ERRCAUSE_ERR (1 << 31)
946 #define AMAZON_BIU_ERRCAUSE_PORT(value) (((( 1 << 4) - 1) & (value)) << 16)
947 #define AMAZON_BIU_ERRCAUSE_CAUSE(value) (((( 1 << 2) - 1) & (value)) << 0)
948
949 /***BIU Access Error Address Register***/
950 #define AMAZON_BIU_ERRADDR ((volatile u32*)(AMAZON_BIU+ 0x0108))
951 #define AMAZON_BIU_ERRADDR_ADDR
952
953 /***********************************************************************/
954 /* Module : ICU register address and bits */
955 /***********************************************************************/
956
957 #define AMAZON_ICU (KSEG1+0x1F101000)
958 /***********************************************************************/
959
960 /***IM0 Interrupt Status Register***/
961 #define AMAZON_ICU_IM0_ISR (AMAZON_ICU + 0x0010)
962 #define AMAZON_ICU_IM1_ISR (AMAZON_ICU + 0x0020)
963 #define AMAZON_ICU_IM2_ISR (AMAZON_ICU + 0x0030)
964 #define AMAZON_ICU_IM3_ISR (AMAZON_ICU + 0x0040)
965 #define AMAZON_ICU_IM4_ISR (AMAZON_ICU + 0x0050)
966
967 /***IM0 Interrupt Enable Register***/
968 #define AMAZON_ICU_IM0_IER (AMAZON_ICU + 0x0014)
969 #define AMAZON_ICU_IM1_IER (AMAZON_ICU + 0x0024)
970 #define AMAZON_ICU_IM2_IER (AMAZON_ICU + 0x0034)
971 #define AMAZON_ICU_IM3_IER (AMAZON_ICU + 0x0044)
972 #define AMAZON_ICU_IM4_IER (AMAZON_ICU + 0x0054)
973
974 /***IM0 Interrupt Output Status Register***/
975 #define AMAZON_ICU_IM0_IOSR (AMAZON_ICU + 0x0018)
976 #define AMAZON_ICU_IM1_IOSR (AMAZON_ICU + 0x0028)
977 #define AMAZON_ICU_IM2_IOSR (AMAZON_ICU + 0x0038)
978 #define AMAZON_ICU_IM3_IOSR (AMAZON_ICU + 0x0048)
979 #define AMAZON_ICU_IM4_IOSR (AMAZON_ICU + 0x0058)
980
981 /***IM0 Interrupt Request Set Register***/
982 #define AMAZON_ICU_IM0_IRSR (AMAZON_ICU + 0x001c)
983 #define AMAZON_ICU_IM1_IRSR (AMAZON_ICU + 0x002c)
984 #define AMAZON_ICU_IM2_IRSR (AMAZON_ICU + 0x003c)
985 #define AMAZON_ICU_IM3_IRSR (AMAZON_ICU + 0x004c)
986 #define AMAZON_ICU_IM4_IRSR (AMAZON_ICU + 0x005c)
987
988 /***Interrupt Vector Value Register***/
989 #define AMAZON_ICU_IM_VEC (AMAZON_ICU + 0x0060)
990
991 /***Interrupt Vector Value Mask***/
992 #define AMAZON_ICU_IM0_VEC_MASK 0x0000001f
993 #define AMAZON_ICU_IM1_VEC_MASK 0x000003e0
994 #define AMAZON_ICU_IM2_VEC_MASK 0x00007c00
995 #define AMAZON_ICU_IM3_VEC_MASK 0x000f8000
996 #define AMAZON_ICU_IM4_VEC_MASK 0x01f00000
997
998 /***DMA Interrupt Mask Value***/
999 #define AMAZON_DMA_H_MASK 0x00000fff
1000
1001 /***External Interrupt Control Register***/
1002 #define AMAZON_ICU_EXTINTCR (AMAZON_ICU + 0x0000)
1003 #define AMAZON_ICU_IRNICR (AMAZON_ICU + 0x0004)
1004 #define AMAZON_ICU_IRNCR (AMAZON_ICU + 0x0008)
1005 #define AMAZON_ICU_IRNEN (AMAZON_ICU + 0x000c)
1006
1007 /***********************************************************************/
1008 /* Module : PCI/Card-BUS/PC-Card register address and bits */
1009 /***********************************************************************/
1010
1011 #define AMAZON_PCI (KSEG1+0x10105400)
1012 #define AMAZON_PCI_CFG_BASE (KSEG1+0x11000000)
1013 #define AMAZON_PCI_MEM_BASE (KSEG1+0x12000000)
1014
1015 #define CLOCK_CONTROL AMAZON_PCI + 0x00000000
1016 #define ARB_CTRL_bit 1
1017 #define IDENTIFICATION AMAZON_PCI + 0x00000004
1018 #define SOFTRESET AMAZON_PCI + 0x00000010
1019 #define PCI_FPI_ERROR_ADDRESS AMAZON_PCI + 0x00000014
1020 #define FPI_PCI_ERROR_ADDRESS AMAZON_PCI + 0x00000018
1021 #define FPI_ERROR_TAG AMAZON_PCI + 0x0000001c
1022 #define IRR AMAZON_PCI + 0x00000020
1023 #define IRA_IR AMAZON_PCI + 0x00000024
1024 #define IRM AMAZON_PCI + 0x00000028
1025 #define DMA_COMPLETE_BIT 0
1026 #define PCI_POWER_CHANGE_BIT 16
1027 #define PCI_MASTER0_BROKEN_INT_BIT 24
1028 #define PCI_MASTER1_BROKEN_INT_BIT 25
1029 #define PCI_MASTER2_BROKEN_INT_BIT 26
1030 #define EOI AMAZON_PCI + 0x0000002c
1031 #define PCI_MODE AMAZON_PCI + 0x00000030
1032 #define PCI_MODE_cfgok_bit 24
1033 #define DEVICE_VENDOR_ID AMAZON_PCI + 0x00000034
1034 #define SUBSYSTEM_VENDOR_ID AMAZON_PCI + 0x00000038
1035 #define POWER_MANAGEMENT AMAZON_PCI + 0x0000003c
1036 #define CLASS_CODE1 AMAZON_PCI + 0x00000040
1037 #define BAR11_MASK AMAZON_PCI + 0x00000044
1038 #define BAR12_MASK AMAZON_PCI + 0x00000048
1039 #define BAR13_MASK AMAZON_PCI + 0x0000004c
1040 #define BAR14_MASK AMAZON_PCI + 0x00000050
1041 #define BAR15_MASK AMAZON_PCI + 0x00000054
1042 #define BAR16_MASK AMAZON_PCI + 0x00000058
1043 #define CARDBUS_CIS_POINTER1 AMAZON_PCI + 0x0000005c
1044 #define SUBSYSTEM_ID1 AMAZON_PCI + 0x00000060
1045 #define PCI_ADDRESS_MAP_11 AMAZON_PCI + 0x00000064
1046 #define PCI_ADDRESS_MAP_12 AMAZON_PCI + 0x00000068
1047 #define PCI_ADDRESS_MAP_13 AMAZON_PCI + 0x0000006c
1048 #define PCI_ADDRESS_MAP_14 AMAZON_PCI + 0x00000070
1049 #define PCI_ADDRESS_MAP_15 AMAZON_PCI + 0x00000074
1050 #define PCI_ADDRESS_MAP_16 AMAZON_PCI + 0x00000078
1051 #define FPI_SEGMENT_ENABLE AMAZON_PCI + 0x0000007c
1052 #define CLASS_CODE2 AMAZON_PCI + 0x00000080
1053 #define BAR21_MASK AMAZON_PCI + 0x00000084
1054 #define BAR22_MASK AMAZON_PCI + 0x00000088
1055 #define BAR23_MASK AMAZON_PCI + 0x0000008c
1056 #define BAR24_MASK AMAZON_PCI + 0x00000090
1057 #define BAR25_MASK AMAZON_PCI + 0x00000094
1058 #define BAR26_MASK AMAZON_PCI + 0x00000098
1059 #define CARDBUS_CIS_POINTER2 AMAZON_PCI + 0x0000009c
1060 #define SUBSYSTEM_ID2 AMAZON_PCI + 0x000000a0
1061 #define PCI_ADDRESS_MAP_21 AMAZON_PCI + 0x000000a4
1062 #define PCI_ADDRESS_MAP_22 AMAZON_PCI + 0x000000a8
1063 #define PCI_ADDRESS_MAP_23 AMAZON_PCI + 0x000000ac
1064 #define PCI_ADDRESS_MAP_24 AMAZON_PCI + 0x000000b0
1065 #define PCI_ADDRESS_MAP_25 AMAZON_PCI + 0x000000b4
1066 #define PCI_ADDRESS_MAP_26 AMAZON_PCI + 0x000000b8
1067 #define FPI_ADDRESS_MASK11LOW AMAZON_PCI + 0x000000bc
1068 #define FPI_ADDRESS_MAP_0 AMAZON_PCI + 0x000000c0
1069 #define FPI_ADDRESS_MAP_1 AMAZON_PCI + 0x000000c4
1070 #define FPI_ADDRESS_MAP_2 AMAZON_PCI + 0x000000c8
1071 #define FPI_ADDRESS_MAP_3 AMAZON_PCI + 0x000000cc
1072 #define FPI_ADDRESS_MAP_4 AMAZON_PCI + 0x000000d0
1073 #define FPI_ADDRESS_MAP_5 AMAZON_PCI + 0x000000d4
1074 #define FPI_ADDRESS_MAP_6 AMAZON_PCI + 0x000000d8
1075 #define FPI_ADDRESS_MAP_7 AMAZON_PCI + 0x000000dc
1076 #define FPI_ADDRESS_MAP_11LOW AMAZON_PCI + 0x000000e0
1077 #define FPI_ADDRESS_MAP_11HIGH AMAZON_PCI + 0x000000e4
1078 #define FPI_BURST_LENGTH AMAZON_PCI + 0x000000e8
1079 #define SET_PCI_SERR AMAZON_PCI + 0x000000ec
1080 #define DMA_FPI_START_ADDR AMAZON_PCI + 0x000000f0
1081 #define DMA_PCI_START_ADDR AMAZON_PCI + 0x000000f4
1082 #define DMA_TRANSFER_COUNT AMAZON_PCI + 0x000000f8
1083 #define DMA_CONTROL_STATUS AMAZON_PCI + 0x000000fc
1084
1085 #define EXT_PCI1_CONFIG_SPACE_BASE_ADDR AMAZON_PCI_CFG_BASE + 0x0800
1086 #define EXT_PCI2_CONFIG_SPACE_BASE_ADDR AMAZON_PCI_CFG_BASE + 0x1000
1087 #define EXT_PCI3_CONFIG_SPACE_BASE_ADDR AMAZON_PCI_CFG_BASE + 0x1800
1088 #define EXT_PCI4_CONFIG_SPACE_BASE_ADDR AMAZON_PCI_CFG_BASE + 0x2000
1089 #define EXT_PCI5_CONFIG_SPACE_BASE_ADDR AMAZON_PCI_CFG_BASE + 0x2800
1090 #define EXT_PCI6_CONFIG_SPACE_BASE_ADDR AMAZON_PCI_CFG_BASE + 0x3000
1091 #define EXT_PCI7_CONFIG_SPACE_BASE_ADDR AMAZON_PCI_CFG_BASE + 0x3800
1092 #define EXT_PCI8_CONFIG_SPACE_BASE_ADDR AMAZON_PCI_CFG_BASE + 0x4000
1093 #define EXT_PCI9_CONFIG_SPACE_BASE_ADDR AMAZON_PCI_CFG_BASE + 0x4800
1094 #define EXT_PCI10_CONFIG_SPACE_BASE_ADDR AMAZON_PCI_CFG_BASE + 0x5000
1095 #define EXT_PCI11_CONFIG_SPACE_BASE_ADDR AMAZON_PCI_CFG_BASE + 0x5800
1096 #define EXT_PCI12_CONFIG_SPACE_BASE_ADDR AMAZON_PCI_CFG_BASE + 0x6000
1097 #define EXT_PCI13_CONFIG_SPACE_BASE_ADDR AMAZON_PCI_CFG_BASE + 0x6800
1098 #define EXT_PCI14_CONFIG_SPACE_BASE_ADDR AMAZON_PCI_CFG_BASE + 0x7000
1099 #define EXT_PCI15_CONFIG_SPACE_BASE_ADDR AMAZON_PCI_CFG_BASE + 0x7800
1100 #define EXT_CARDBUS_CONFIG_SPACE_BASE_ADDR AMAZON_PCI_CFG_BASE + 0XF000
1101 #define EXT_PCI_BAR1_ADDR 0x10
1102 #define EXT_PCI_BAR2_ADDR 0x14
1103 #define EXT_PCI_BAR3_ADDR 0x18
1104 #define EXT_PCI_BAR4_ADDR 0x1C
1105 #define EXT_PCI_BAR5_ADDR 0x20
1106 #define EXT_PCI_BAR6_ADDR 0x24
1107
1108 #define DEVICE_ID_VECDOR_ID_ADDR AMAZON_PCI_CFG_BASE + 0x0
1109 #define STATUS_COMMAND_ADDR AMAZON_PCI_CFG_BASE + 0x4
1110 #define BUS_MASTER_ENABLE_BIT 2
1111 #define MEM_SPACE_ENABLE_BIT 1
1112 #define CLASS_CODE_REVISION_ADDR AMAZON_PCI_CFG_BASE + 0x8
1113 #define BIST_HEADER_TYPE_LATENCY_CAHCE_ADDR AMAZON_PCI_CFG_BASE + 0xC
1114 #define BAR1_ADDR AMAZON_PCI_CFG_BASE + 0x10
1115 #define BAR2_ADDR AMAZON_PCI_CFG_BASE + 0x14
1116 #define BAR3_ADDR AMAZON_PCI_CFG_BASE + 0x18
1117 #define BAR4_ADDR AMAZON_PCI_CFG_BASE + 0x1C
1118 #define BAR3_ADDR AMAZON_PCI_CFG_BASE + 0x18
1119 #define BAR4_ADDR AMAZON_PCI_CFG_BASE + 0x1C
1120 #define BAR5_ADDR AMAZON_PCI_CFG_BASE + 0x20
1121 #define BAR6_ADDR AMAZON_PCI_CFG_BASE + 0x24
1122 #define CARDBUS_CIS_POINTER_ADDR AMAZON_PCI_CFG_BASE + 0x28
1123 #define SUBSYSTEM_ID_VENDOR_ID_ADDR AMAZON_PCI_CFG_BASE + 0x2C
1124 #define EXPANSION_ROM_BASE_ADDR AMAZON_PCI_CFG_BASE + 0x30
1125 #define CAPABILITIES_POINTER_ADDR AMAZON_PCI_CFG_BASE + 0x34
1126 #define RESERVED_0x38 AMAZON_PCI_CFG_BASE + 0x38
1127 #define MAX_LAT_MIN_GNT_INT_PIN_LINE_ADDR AMAZON_PCI_CFG_BASE + 0x3C
1128 #define POWER_MNGT_NEXT_POINTER_CAP_ID_ADDR AMAZON_PCI_CFG_BASE + 0x40
1129 #define POWER_MANAGEMENT_CTRL_STATUS_ADDR AMAZON_PCI_CFG_BASE + 0x44
1130 #define RESERVED_0x48 AMAZON_PCI_CFG_BASE + 0x48
1131 #define RESERVED_0x4C AMAZON_PCI_CFG_BASE + 0x4C
1132 #define ERROR_ADDR_PCI_FPI_ADDR AMAZON_PCI_CFG_BASE + 0x50
1133 #define ERROR_ADdR_FPI_PCI_ADDR AMAZON_PCI_CFG_BASE + 0x54
1134 #define ERROR_TAG_FPI_PCI_ADDR AMAZON_PCI_CFG_BASE + 0x58
1135 #define PCI_ARB_CTRL_STATUS_ADDR AMAZON_PCI_CFG_BASE + 0x5C
1136 #define INTERNAL_ARB_ENABLE_BIT 0
1137 #define ARB_SCHEME_BIT 1
1138 #define PCI_MASTER0_PRIOR_2BITS 2
1139 #define PCI_MASTER1_PRIOR_2BITS 4
1140 #define PCI_MASTER2_PRIOR_2BITS 6
1141 #define PCI_MASTER0_REQ_MASK_2BITS 8
1142 #define PCI_MASTER1_REQ_MASK_2BITS 10
1143 #define PCI_MASTER2_REQ_MASK_2BITS 12
1144 #define PCI_MASTER0_GNT_MASK_2BITS 14
1145 #define PCI_MASTER1_GNT_MASK_2BITS 16
1146 #define PCI_MASTER2_GNT_MASK_2BITS 18
1147 #define FPI_PCI_INT_STATUS_ADDR AMAZON_PCI_CFG_BASE + 0x60
1148 #define FPI_PCI_INT_ACK_ADDR AMAZON_PCI_CFG_BASE + 0x64
1149 #define FPI_PCI_INT_MASK_ADDR AMAZON_PCI_CFG_BASE + 0x68
1150 #define CARDBUS_CTRL_STATUS_ADDR AMAZON_PCI_CFG_BASE + 0x6C
1151 #define CARDBUS_CFRAME_ENABLE 0
1152
1153 #define CLOCK_CONTROL_default 0x00000000
1154 #define CLOCK_CONTROL_mask 0x00000003
1155
1156 #define IDENTIFICATION_default 0x0011C002
1157 #define IDENTIFICATION_mask 0x00000000
1158
1159 #define SOFTRESET_default 0x00000000
1160 // SOFTRESET bit 0 is writable but will be reset to 0 after software reset is over
1161 #define SOFTRESET_mask 0x00000000
1162
1163 #define PCI_FPI_ERROR_ADDRESS_default 0xFFFFFFFF
1164 #define PCI_FPI_ERROR_ADDRESS_mask 0x00000000
1165
1166 #define FPI_PCI_ERROR_ADDRESS_default 0xFFFFFFFF
1167 #define FPI_PCI_ERROR_ADDRESS_mask 0x00000000
1168
1169 #define FPI_ERROR_TAG_default 0x0000000F
1170 #define FPI_ERROR_TAG_mask 0x00000000
1171
1172 #define IRR_default 0x00000000
1173 #define IRR_mask 0x07013b2F
1174
1175 #define IRA_IR_default 0x00000000
1176 #define IRA_IR_mask 0x07013b2F
1177
1178 #define IRM_default 0x00000000
1179 #define IRM_mask 0xFFFFFFFF
1180
1181 #define EOI_default 0x00000000
1182 #define EOI_mask 0x00000000
1183
1184 #define PCI_MODE_default 0x01000103
1185 #define PCI_MODE_mask 0x1107070F
1186
1187 #define DEVICE_VENDOR_ID_default 0x000C15D1
1188 #define DEVICE_VENDOR_ID_mask 0xFFFFFFFF
1189
1190 #define SUBSYSTEM_VENDOR_ID_default 0x000015D1
1191 #define SUBSYSTEM_VENDOR_ID_mask 0x0000FFFF
1192
1193 #define POWER_MANAGEMENT_default 0x0000001B
1194 #define POWER_MANAGEMENT_mask 0x0000001F
1195
1196 #define CLASS_CODE1_default 0x00028000
1197 #define CLASS_CODE1_mask 0x00FFFFFF
1198
1199 #define BAR11_MASK_default 0x0FF00008
1200 #define BAR11_MASK_mask 0x8FF00008
1201
1202 #define BAR12_MASK_default 0x80001800
1203 #define BAR12_MASK_mask 0x80001F08
1204
1205 #define BAR13_MASK_default 0x8FF00008
1206 #define BAR13_MASK_mask 0x8FF00008
1207
1208 #define BAR14_MASK_default 0x8F000000
1209 #define BAR14_MASK_mask 0x8FFFFF08
1210
1211 #define BAR15_MASK_default 0x80000000
1212 #define BAR15_MASK_mask 0x8FFFFF08
1213
1214 #define BAR16_MASK_default 0x80000001
1215 // bit 0 and bit 3 is mutually exclusive
1216 #define BAR16_MASK_mask 0x8FFFFFF9
1217
1218 #define CARDBUS_CIS_POINTER1_default 0x00000000
1219 #define CARDBUS_CIS_POINTER1_mask 0x03FFFFFF
1220
1221 #define SUBSYSTEM_ID1_default 0x0000000C
1222 #define SUBSYSTEM_ID1_mask 0x0000FFFF
1223
1224 #define PCI_ADDRESS_MAP_11_default 0x18000000
1225 #define PCI_ADDRESS_MAP_11_mask 0x7FFFFFF1
1226
1227 #define PCI_ADDRESS_MAP_12_default 0x18100000
1228 #define PCI_ADDRESS_MAP_12_mask 0x7FFFFF01
1229
1230 #define PCI_ADDRESS_MAP_13_default 0x18200000
1231 #define PCI_ADDRESS_MAP_13_mask 0x7FF00001
1232
1233 #define PCI_ADDRESS_MAP_14_default 0x70000000
1234 #define PCI_ADDRESS_MAP_14_mask 0x7FFFFF01
1235
1236 #define PCI_ADDRESS_MAP_15_default 0x00000001
1237 #define PCI_ADDRESS_MAP_15_mask 0x7FFFFF01
1238
1239 #define PCI_ADDRESS_MAP_16_default 0x60000000
1240 #define PCI_ADDRESS_MAP_16_mask 0x7FF00001
1241
1242 #define FPI_SEGMENT_ENABLE_default 0x000003FF
1243 #define FPI_SEGMENT_ENABLE_mask 0x000003FF
1244
1245 #define CLASS_CODE2_default 0x00FF0000
1246 #define CLASS_CODE2_mask 0x00FFFFFF
1247
1248 #define BAR21_MASK_default 0x80000008
1249 #define BAR21_MASK_mask 0x8FFFFFF8
1250
1251 #define BAR22_MASK_default 0x80000008
1252 #define BAR22_MASK_mask 0x80001F08
1253
1254 #define BAR23_MASK_default 0x80000008
1255 #define BAR23_MASK_mask 0x8FF00008
1256
1257 #define BAR24_MASK_default 0x8FE00000
1258 #define BAR24_MASK_mask 0x8FFFFF08
1259
1260 #define BAR25_MASK_default 0x8FFFF000
1261 #define BAR25_MASK_mask 0x8FFFFF08
1262
1263 #define BAR26_MASK_default 0x8FFFFFE1
1264 #define BAR26_MASK_mask 0x8FFFFFF1
1265
1266 #define CARDBUS_CIS_POINTER2_default 0x00000000
1267 #define CARDBUS_CIS_POINTER2_mask 0x03FFFFFF
1268
1269 #define SUBSYSTEM_ID2_default 0x0000000C
1270 #define SUBSYSTEM_ID2_mask 0x0000FFFF
1271
1272 #define PCI_ADDRESS_MAP_21_default 0x3FE00000
1273 #define PCI_ADDRESS_MAP_21_mask 0x7FFFFFF1
1274
1275 #define PCI_ADDRESS_MAP_22_default 0x68000000
1276 #define PCI_ADDRESS_MAP_22_mask 0x7FFFFF01
1277
1278 #define PCI_ADDRESS_MAP_23_default 0x20000000
1279 #define PCI_ADDRESS_MAP_23_mask 0x7FF00001
1280
1281 #define PCI_ADDRESS_MAP_24_default 0x70000001
1282 #define PCI_ADDRESS_MAP_24_mask 0x7FFFFF01
1283
1284 #define PCI_ADDRESS_MAP_25_default 0x78000001
1285 #define PCI_ADDRESS_MAP_25_mask 0x7FFFFF01
1286
1287 #define PCI_ADDRESS_MAP_26_default 0x20000000
1288 #define PCI_ADDRESS_MAP_26_mask 0x7FF00001
1289
1290 #define FPI_ADDRESS_MASK11LOW_default 0x00000000
1291 #define FPI_ADDRESS_MASK11LOW_mask 0x00070000
1292
1293 #define FPI_ADDRESS_MAP_0_default 0x00000000
1294 #define FPI_ADDRESS_MAP_0_mask 0xFFF00000
1295
1296 #define FPI_ADDRESS_MAP_1_default 0x10000000
1297 #define FPI_ADDRESS_MAP_1_mask 0xFFF00000
1298
1299 #define FPI_ADDRESS_MAP_2_default 0x20000000
1300 #define FPI_ADDRESS_MAP_2_mask 0xFFF00000
1301
1302 #define FPI_ADDRESS_MAP_3_default 0x30000000
1303 #define FPI_ADDRESS_MAP_3_mask 0xFFF00000
1304
1305 #define FPI_ADDRESS_MAP_4_default 0x40000000
1306 #define FPI_ADDRESS_MAP_4_mask 0xFFF00000
1307
1308 #define FPI_ADDRESS_MAP_5_default 0x50000000
1309 #define FPI_ADDRESS_MAP_5_mask 0xFFF00000
1310
1311 #define FPI_ADDRESS_MAP_6_default 0x60000000
1312 #define FPI_ADDRESS_MAP_6_mask 0xFFF00000
1313
1314 #define FPI_ADDRESS_MAP_7_default 0x70000000
1315 #define FPI_ADDRESS_MAP_7_mask 0xFFF00000
1316
1317 #define FPI_ADDRESS_MAP_11LOW_default 0xB0000000
1318 #define FPI_ADDRESS_MAP_11LOW_mask 0xFFFF0000
1319
1320 #define FPI_ADDRESS_MAP_11HIGH_default 0xB8000000
1321 #define FPI_ADDRESS_MAP_11HIGH_mask 0xFFF80000
1322
1323 #define FPI_BURST_LENGTH_default 0x00000000
1324 #define FPI_BURST_LENGTH_mask 0x00000303
1325
1326 #define SET_PCI_SERR_default 0x00000000
1327 #define SET_PCI_SERR_mask 0x00000000
1328
1329 #define DMA_FPI_START_ADDRESS_default 0x00000000
1330 #define DMA_FPI_START_ADDRESS_mask 0xFFFFFFFF
1331
1332 #define DMA_PCI_START_ADDRESS_default 0x00000000
1333 #define DMA_PCI_START_ADDRESS_mask 0xFFFFFFFF
1334
1335 #define DMA_TRANSFER_COUNT_default 0x00000000
1336 #define DMA_TRANSFER_COUNT_mask 0x0000FFFF
1337
1338 #define DMA_CONTROL_STATUS_default 0x00000000
1339 #define DMA_CONTROL_STATUS_mask 0x00000000 // bit 0,1 is writable
1340
1341 /***********************************************************************/
1342 #undef IKOS_MINI_BOOT //don't run a full booting
1343 #ifdef CONFIG_USE_IKOS
1344 #define CONFIG_USE_VENUS //Faster, 10M CPU and 192k baudrate
1345 #ifdef CONFIG_USE_VENUS
1346 #define IKOS_CPU_SPEED 10000000
1347 #else
1348 #define IKOS_CPU_SPEED 180000 //IKOS is slow
1349 #endif
1350 #endif //CONFIG_USE_IKOS
1351
1352 /* 165001:henryhsu:20050603:Source Modify form Bing Tao */
1353
1354 #if defined(CONFIG_NET_WIRELESS_SPURS) || defined(CONFIG_NET_WIRELESS_SPURS_MODULE)
1355 #define EBU_PCI_SOFTWARE_ARBITOR
1356 #endif
1357
1358 #define AMAZON_B11
1359 #ifdef AMAZON_B11
1360 #define SWITCH_BUF_FPI_ADDR (0x10110000)
1361 #define SWITCH_BUF_ADDR (KSEG1+SWITCH_BUF_FPI_ADDR)
1362 #define SWITCH_BUF_SIZE (0x2800)
1363 #define AMAZON_B11_CBM_QD_ADDR (SWITCH_BUF_ADDR+0x0)
1364 #define AMAZON_B11_BOND_CELL_ADDR (SWITCH_BUF_ADDR+0x000)
1365 #endif
1366 #define AMAZON_REFERENCE_BOARD
1367 //for AMAZON ATM bonding application
1368 #ifdef AMAZON_REFERENCE_BOARD
1369 #define GPIO_DETECT_LOW
1370 #else
1371 #undef GPIO_DETECT_LOW
1372 #endif
1373
1374 /* 165001 */
1375
1376 #undef AMAZON_IKOS_DEBUG_MSG
1377 #undef AMAZON_INT_DEBUG_MSG
1378 #undef AMAZON_ATM_DEBUG_MSG
1379 #undef AMAZON_DMA_DEBUG_MSG
1380 #undef AMAZON_SW_DEBUG_MSG
1381 #undef AMAZON_WDT_DEBUG_MSG
1382 #undef AMAZON_MTD_DEBUG_MSG
1383 #undef AMAZON_SSC_DEBUG_MSG
1384 #undef AMAZON_MEI_DEBUG_MSG
1385
1386 #ifdef AMAZON_IKOS_DEBUG_MSG
1387 #define AMAZON_IKOS_DMSG(fmt,args...) printk("%s:" fmt, __FUNCTION__, ##args)
1388 #else
1389 #define AMAZON_IKOS_DMSG(fmt,args...)
1390 #endif
1391
1392 #ifdef AMAZON_WDT_DEBUG_MSG
1393 #define AMAZON_WDT_DMSG(fmt, args...) printk( "%s: " fmt, __FUNCTION__ , ##args)
1394 #else
1395 #define AMAZON_WDT_DMSG(fm,args...)
1396 #endif
1397
1398 #ifdef AMAZON_SSC_DEBUG_MSG
1399 #define AMAZON_SSC_DMSG(fmt, args...) printk( "%s: " fmt, __FUNCTION__ , ##args)
1400 #else
1401 #define AMAZON_SSC_DMSG(fm,args...)
1402 #endif
1403
1404 #ifdef AMAZON_DMA_DEBUG_MSG
1405 #define AMAZON_DMA_DMSG(fmt, args...) printk( "%s: " fmt, __FUNCTION__ , ##args)
1406 #else
1407 #define AMAZON_DMA_DMSG(fm,args...)
1408 #endif
1409
1410 #ifdef AMAZON_ATM_DEBUG_MSG
1411 #define AMAZON_TPE_DMSG(fmt, args...) printk( "%s: " fmt, __FUNCTION__ , ##args)
1412 #else //not AMAZON_ATM_DEBUG
1413 #define AMAZON_TPE_DMSG(fmt, args...)
1414 #endif //AMAZON_ATM_DEBUG
1415
1416 #ifdef AMAZON_SW_DEBUG_MSG
1417 #define AMAZON_SW_DMSG(fmt,args...) printk("%s: " fmt, __FUNCTION__ , ##args)
1418 #else
1419 #define AMAZON_SW_DMSG(fmt,args...)
1420 #endif
1421
1422 #ifdef AMAZON_MTD_DEBUG_MSG
1423 #define AMAZON_MTD_DMSG(fmt,args...) printk("%s: " fmt, __FUNCTION__ , ##args)
1424 #else
1425 #define AMAZON_MTD_DMSG(fmt,args...)
1426 #endif
1427
1428 #ifdef AMAZON_INT_DEBUG_MSG
1429 #define AMAZON_INT_DMSG(x...) printk(x)
1430 #else
1431 #define AMAZON_INT_DMSG(x...)
1432 #endif
1433
1434 #ifdef AMAZON_MEI_DEBUG_MSG
1435 #define AMAZON_MEI_DMSG(fmt,args...) printk("%s:" fmt, __FUNCTION__, ##args)
1436 #else
1437 #define AMAZON_MEI_DMSG(fmt,args...)
1438 #endif
1439
1440 #endif //AMAZON_H