0001
0002
0003
0004
0005
0006
0007
0008
0009
0010
0011
0012
0013
0014
0015
0016
0017
0018
0019
0020
0021 #ifndef _ASM_MIPS_BOARDS_BONITO64_H
0022 #define _ASM_MIPS_BOARDS_BONITO64_H
0023
0024 #ifdef __ASSEMBLY__
0025
0026
0027 #define BONITO(x) (x)
0028
0029 #else
0030
0031
0032
0033
0034 extern unsigned long _pcictrl_bonito;
0035 extern unsigned long _pcictrl_bonito_pcicfg;
0036
0037 #define BONITO(x) *(volatile u32 *)(_pcictrl_bonito + (x))
0038
0039 #endif
0040
0041
0042 #define BONITO_BOOT_BASE 0x1fc00000
0043 #define BONITO_BOOT_SIZE 0x00100000
0044 #define BONITO_BOOT_TOP (BONITO_BOOT_BASE+BONITO_BOOT_SIZE-1)
0045 #define BONITO_FLASH_BASE 0x1c000000
0046 #define BONITO_FLASH_SIZE 0x03000000
0047 #define BONITO_FLASH_TOP (BONITO_FLASH_BASE+BONITO_FLASH_SIZE-1)
0048 #define BONITO_SOCKET_BASE 0x1f800000
0049 #define BONITO_SOCKET_SIZE 0x00400000
0050 #define BONITO_SOCKET_TOP (BONITO_SOCKET_BASE+BONITO_SOCKET_SIZE-1)
0051 #define BONITO_REG_BASE 0x1fe00000
0052 #define BONITO_REG_SIZE 0x00040000
0053 #define BONITO_REG_TOP (BONITO_REG_BASE+BONITO_REG_SIZE-1)
0054 #define BONITO_DEV_BASE 0x1ff00000
0055 #define BONITO_DEV_SIZE 0x00100000
0056 #define BONITO_DEV_TOP (BONITO_DEV_BASE+BONITO_DEV_SIZE-1)
0057 #define BONITO_PCILO_BASE 0x10000000
0058 #define BONITO_PCILO_SIZE 0x0c000000
0059 #define BONITO_PCILO_TOP (BONITO_PCILO_BASE+BONITO_PCILO_SIZE-1)
0060 #define BONITO_PCILO0_BASE 0x10000000
0061 #define BONITO_PCILO1_BASE 0x14000000
0062 #define BONITO_PCILO2_BASE 0x18000000
0063 #define BONITO_PCIHI_BASE 0x20000000
0064 #define BONITO_PCIHI_SIZE 0x20000000
0065 #define BONITO_PCIHI_TOP (BONITO_PCIHI_BASE+BONITO_PCIHI_SIZE-1)
0066 #define BONITO_PCIIO_BASE 0x1fd00000
0067 #define BONITO_PCIIO_SIZE 0x00100000
0068 #define BONITO_PCIIO_TOP (BONITO_PCIIO_BASE+BONITO_PCIIO_SIZE-1)
0069 #define BONITO_PCICFG_BASE 0x1fe80000
0070 #define BONITO_PCICFG_SIZE 0x00080000
0071 #define BONITO_PCICFG_TOP (BONITO_PCICFG_BASE+BONITO_PCICFG_SIZE-1)
0072
0073
0074
0075
0076 #define BONITO_PCICONFIGBASE 0x00
0077 #define BONITO_REGBASE 0x100
0078
0079
0080
0081
0082 #define BONITO_PCI_REG(x) BONITO(BONITO_PCICONFIGBASE + (x))
0083 #define BONITO_PCIDID BONITO_PCI_REG(0x00)
0084 #define BONITO_PCICMD BONITO_PCI_REG(0x04)
0085 #define BONITO_PCICLASS BONITO_PCI_REG(0x08)
0086 #define BONITO_PCILTIMER BONITO_PCI_REG(0x0c)
0087 #define BONITO_PCIBASE0 BONITO_PCI_REG(0x10)
0088 #define BONITO_PCIBASE1 BONITO_PCI_REG(0x14)
0089 #define BONITO_PCIBASE2 BONITO_PCI_REG(0x18)
0090 #define BONITO_PCIEXPRBASE BONITO_PCI_REG(0x30)
0091 #define BONITO_PCIINT BONITO_PCI_REG(0x3c)
0092
0093 #define BONITO_PCICMD_PERR_CLR 0x80000000
0094 #define BONITO_PCICMD_SERR_CLR 0x40000000
0095 #define BONITO_PCICMD_MABORT_CLR 0x20000000
0096 #define BONITO_PCICMD_MTABORT_CLR 0x10000000
0097 #define BONITO_PCICMD_TABORT_CLR 0x08000000
0098 #define BONITO_PCICMD_MPERR_CLR 0x01000000
0099 #define BONITO_PCICMD_PERRRESPEN 0x00000040
0100 #define BONITO_PCICMD_ASTEPEN 0x00000080
0101 #define BONITO_PCICMD_SERREN 0x00000100
0102 #define BONITO_PCILTIMER_BUSLATENCY 0x0000ff00
0103 #define BONITO_PCILTIMER_BUSLATENCY_SHIFT 8
0104
0105
0106
0107
0108
0109
0110
0111 #define BONITO_BONPONCFG BONITO(BONITO_REGBASE + 0x00)
0112
0113 #define BONITO_BONPONCFG_SYSCONTROLLERRD 0x00040000
0114 #define BONITO_BONPONCFG_ROMCS1SAMP 0x00020000
0115 #define BONITO_BONPONCFG_ROMCS0SAMP 0x00010000
0116 #define BONITO_BONPONCFG_CPUBIGEND 0x00004000
0117
0118 #define BONITO_BONPONCFG_BURSTORDER 0x00001000
0119
0120 #define BONITO_BONPONCFG_CPUPARITY 0x00002000
0121 #define BONITO_BONPONCFG_CPUTYPE 0x00000007
0122 #define BONITO_BONPONCFG_CPUTYPE_SHIFT 0
0123 #define BONITO_BONPONCFG_PCIRESET_OUT 0x00000008
0124 #define BONITO_BONPONCFG_IS_ARBITER 0x00000010
0125 #define BONITO_BONPONCFG_ROMBOOT 0x000000c0
0126 #define BONITO_BONPONCFG_ROMBOOT_SHIFT 6
0127
0128 #define BONITO_BONPONCFG_ROMBOOT_FLASH (0x0<<BONITO_BONPONCFG_ROMBOOT_SHIFT)
0129 #define BONITO_BONPONCFG_ROMBOOT_SOCKET (0x1<<BONITO_BONPONCFG_ROMBOOT_SHIFT)
0130 #define BONITO_BONPONCFG_ROMBOOT_SDRAM (0x2<<BONITO_BONPONCFG_ROMBOOT_SHIFT)
0131 #define BONITO_BONPONCFG_ROMBOOT_CPURESET (0x3<<BONITO_BONPONCFG_ROMBOOT_SHIFT)
0132
0133 #define BONITO_BONPONCFG_ROMCS0WIDTH 0x00000100
0134 #define BONITO_BONPONCFG_ROMCS1WIDTH 0x00000200
0135 #define BONITO_BONPONCFG_ROMCS0FAST 0x00000400
0136 #define BONITO_BONPONCFG_ROMCS1FAST 0x00000800
0137 #define BONITO_BONPONCFG_CONFIG_DIS 0x00000020
0138
0139
0140
0141
0142 #define BONITO_BONGENCFG_OFFSET 0x4
0143 #define BONITO_BONGENCFG BONITO(BONITO_REGBASE + BONITO_BONGENCFG_OFFSET)
0144
0145 #define BONITO_BONGENCFG_DEBUGMODE 0x00000001
0146 #define BONITO_BONGENCFG_SNOOPEN 0x00000002
0147 #define BONITO_BONGENCFG_CPUSELFRESET 0x00000004
0148
0149 #define BONITO_BONGENCFG_FORCE_IRQA 0x00000008
0150 #define BONITO_BONGENCFG_IRQA_ISOUT 0x00000010
0151 #define BONITO_BONGENCFG_IRQA_FROM_INT1 0x00000020
0152 #define BONITO_BONGENCFG_BYTESWAP 0x00000040
0153
0154 #define BONITO_BONGENCFG_UNCACHED 0x00000080
0155 #define BONITO_BONGENCFG_PREFETCHEN 0x00000100
0156 #define BONITO_BONGENCFG_WBEHINDEN 0x00000200
0157 #define BONITO_BONGENCFG_CACHEALG 0x00000c00
0158 #define BONITO_BONGENCFG_CACHEALG_SHIFT 10
0159 #define BONITO_BONGENCFG_PCIQUEUE 0x00001000
0160 #define BONITO_BONGENCFG_CACHESTOP 0x00002000
0161 #define BONITO_BONGENCFG_MSTRBYTESWAP 0x00004000
0162 #define BONITO_BONGENCFG_BUSERREN 0x00008000
0163 #define BONITO_BONGENCFG_NORETRYTIMEOUT 0x00010000
0164 #define BONITO_BONGENCFG_SHORTCOPYTIMEOUT 0x00020000
0165
0166
0167
0168 #define BONITO_IODEVCFG BONITO(BONITO_REGBASE + 0x08)
0169
0170
0171
0172 #define BONITO_SDCFG BONITO(BONITO_REGBASE + 0x0c)
0173
0174
0175
0176 #define BONITO_PCIMAP BONITO(BONITO_REGBASE + 0x10)
0177 #define BONITO_PCIMEMBASECFG BONITO(BONITO_REGBASE + 0x14)
0178 #define BONITO_PCIMAP_CFG BONITO(BONITO_REGBASE + 0x18)
0179
0180
0181
0182
0183
0184 #define BONITO_GPIODATA_OFFSET 0x1c
0185 #define BONITO_GPIODATA BONITO(BONITO_REGBASE + BONITO_GPIODATA_OFFSET)
0186 #define BONITO_GPIOIE BONITO(BONITO_REGBASE + 0x20)
0187
0188
0189
0190 #define BONITO_INTEDGE BONITO(BONITO_REGBASE + 0x24)
0191 #define BONITO_INTSTEER BONITO(BONITO_REGBASE + 0x28)
0192 #define BONITO_INTPOL BONITO(BONITO_REGBASE + 0x2c)
0193
0194
0195
0196 #define BONITO_INTENSET BONITO(BONITO_REGBASE + 0x30)
0197 #define BONITO_INTENCLR BONITO(BONITO_REGBASE + 0x34)
0198 #define BONITO_INTEN BONITO(BONITO_REGBASE + 0x38)
0199 #define BONITO_INTISR BONITO(BONITO_REGBASE + 0x3c)
0200
0201
0202
0203 #define BONITO_PCIMAIL0_OFFSET 0x40
0204 #define BONITO_PCIMAIL1_OFFSET 0x44
0205 #define BONITO_PCIMAIL2_OFFSET 0x48
0206 #define BONITO_PCIMAIL3_OFFSET 0x4c
0207 #define BONITO_PCIMAIL0 BONITO(BONITO_REGBASE + 0x40)
0208 #define BONITO_PCIMAIL1 BONITO(BONITO_REGBASE + 0x44)
0209 #define BONITO_PCIMAIL2 BONITO(BONITO_REGBASE + 0x48)
0210 #define BONITO_PCIMAIL3 BONITO(BONITO_REGBASE + 0x4c)
0211
0212
0213
0214
0215 #define BONITO_PCICACHECTRL BONITO(BONITO_REGBASE + 0x50)
0216 #define BONITO_PCICACHETAG BONITO(BONITO_REGBASE + 0x54)
0217
0218 #define BONITO_PCIBADADDR BONITO(BONITO_REGBASE + 0x58)
0219 #define BONITO_PCIMSTAT BONITO(BONITO_REGBASE + 0x5c)
0220
0221
0222
0223
0224
0225
0226
0227
0228
0229 #define BONITO_CONFIGBASE 0x000
0230 #define BONITO_BONITOBASE 0x100
0231 #define BONITO_LDMABASE 0x200
0232 #define BONITO_COPBASE 0x300
0233 #define BONITO_REG_BLOCKMASK 0x300
0234
0235 #define BONITO_LDMACTRL BONITO(BONITO_LDMABASE + 0x0)
0236 #define BONITO_LDMASTAT BONITO(BONITO_LDMABASE + 0x0)
0237 #define BONITO_LDMAADDR BONITO(BONITO_LDMABASE + 0x4)
0238 #define BONITO_LDMAGO BONITO(BONITO_LDMABASE + 0x8)
0239 #define BONITO_LDMADATA BONITO(BONITO_LDMABASE + 0xc)
0240
0241 #define BONITO_COPCTRL BONITO(BONITO_COPBASE + 0x0)
0242 #define BONITO_COPSTAT BONITO(BONITO_COPBASE + 0x0)
0243 #define BONITO_COPPADDR BONITO(BONITO_COPBASE + 0x4)
0244 #define BONITO_COPDADDR BONITO(BONITO_COPBASE + 0x8)
0245 #define BONITO_COPGO BONITO(BONITO_COPBASE + 0xc)
0246
0247
0248
0249
0250
0251
0252 #define BONITO_IDECOPDADDR_DMA_DADDR 0x0ffffffc
0253 #define BONITO_IDECOPDADDR_DMA_DADDR_SHIFT 2
0254 #define BONITO_IDECOPPADDR_DMA_PADDR 0xfffffffc
0255 #define BONITO_IDECOPPADDR_DMA_PADDR_SHIFT 2
0256 #define BONITO_IDECOPGO_DMA_SIZE 0x0000fffe
0257 #define BONITO_IDECOPGO_DMA_SIZE_SHIFT 0
0258 #define BONITO_IDECOPGO_DMA_WRITE 0x00010000
0259 #define BONITO_IDECOPGO_DMAWCOUNT 0x000f0000
0260 #define BONITO_IDECOPGO_DMAWCOUNT_SHIFT 16
0261
0262 #define BONITO_IDECOPCTRL_DMA_STARTBIT 0x80000000
0263 #define BONITO_IDECOPCTRL_DMA_RSTBIT 0x40000000
0264
0265
0266
0267 #define BONITO_SDCFG_AROWBITS 0x00000003
0268 #define BONITO_SDCFG_AROWBITS_SHIFT 0
0269 #define BONITO_SDCFG_ACOLBITS 0x0000000c
0270 #define BONITO_SDCFG_ACOLBITS_SHIFT 2
0271 #define BONITO_SDCFG_ABANKBIT 0x00000010
0272 #define BONITO_SDCFG_ASIDES 0x00000020
0273 #define BONITO_SDCFG_AABSENT 0x00000040
0274 #define BONITO_SDCFG_AWIDTH64 0x00000080
0275
0276 #define BONITO_SDCFG_BROWBITS 0x00000300
0277 #define BONITO_SDCFG_BROWBITS_SHIFT 8
0278 #define BONITO_SDCFG_BCOLBITS 0x00000c00
0279 #define BONITO_SDCFG_BCOLBITS_SHIFT 10
0280 #define BONITO_SDCFG_BBANKBIT 0x00001000
0281 #define BONITO_SDCFG_BSIDES 0x00002000
0282 #define BONITO_SDCFG_BABSENT 0x00004000
0283 #define BONITO_SDCFG_BWIDTH64 0x00008000
0284
0285 #define BONITO_SDCFG_EXTRDDATA 0x00010000
0286 #define BONITO_SDCFG_EXTRASCAS 0x00020000
0287 #define BONITO_SDCFG_EXTPRECH 0x00040000
0288 #define BONITO_SDCFG_EXTRASWIDTH 0x00180000
0289 #define BONITO_SDCFG_EXTRASWIDTH_SHIFT 19
0290
0291 #define BONITO_SDCFG_DRAMMODESET 0x00200000
0292
0293 #define BONITO_SDCFG_DRAMEXTREGS 0x00400000
0294 #define BONITO_SDCFG_DRAMPARITY 0x00800000
0295
0296 #define BONITO_SDCFG_DRAMBURSTLEN 0x03000000
0297 #define BONITO_SDCFG_DRAMBURSTLEN_SHIFT 24
0298 #define BONITO_SDCFG_DRAMMODESET_DONE 0x80000000
0299
0300
0301
0302
0303 #define BONITO_PCICACHECTRL_CACHECMD 0x00000007
0304 #define BONITO_PCICACHECTRL_CACHECMD_SHIFT 0
0305 #define BONITO_PCICACHECTRL_CACHECMDLINE 0x00000018
0306 #define BONITO_PCICACHECTRL_CACHECMDLINE_SHIFT 3
0307 #define BONITO_PCICACHECTRL_CMDEXEC 0x00000020
0308
0309 #define BONITO_PCICACHECTRL_IOBCCOH_PRES 0x00000100
0310 #define BONITO_PCICACHECTRL_IOBCCOH_EN 0x00000200
0311 #define BONITO_PCICACHECTRL_CPUCOH_PRES 0x00000400
0312 #define BONITO_PCICACHECTRL_CPUCOH_EN 0x00000800
0313
0314 #define BONITO_IODEVCFG_BUFFBIT_CS0 0x00000001
0315 #define BONITO_IODEVCFG_SPEEDBIT_CS0 0x00000002
0316 #define BONITO_IODEVCFG_MOREABITS_CS0 0x00000004
0317
0318 #define BONITO_IODEVCFG_BUFFBIT_CS1 0x00000008
0319 #define BONITO_IODEVCFG_SPEEDBIT_CS1 0x00000010
0320 #define BONITO_IODEVCFG_MOREABITS_CS1 0x00000020
0321
0322 #define BONITO_IODEVCFG_BUFFBIT_CS2 0x00000040
0323 #define BONITO_IODEVCFG_SPEEDBIT_CS2 0x00000080
0324 #define BONITO_IODEVCFG_MOREABITS_CS2 0x00000100
0325
0326 #define BONITO_IODEVCFG_BUFFBIT_CS3 0x00000200
0327 #define BONITO_IODEVCFG_SPEEDBIT_CS3 0x00000400
0328 #define BONITO_IODEVCFG_MOREABITS_CS3 0x00000800
0329
0330 #define BONITO_IODEVCFG_BUFFBIT_IDE 0x00001000
0331 #define BONITO_IODEVCFG_SPEEDBIT_IDE 0x00002000
0332 #define BONITO_IODEVCFG_WORDSWAPBIT_IDE 0x00004000
0333 #define BONITO_IODEVCFG_MODEBIT_IDE 0x00008000
0334 #define BONITO_IODEVCFG_DMAON_IDE 0x001f0000
0335 #define BONITO_IODEVCFG_DMAON_IDE_SHIFT 16
0336 #define BONITO_IODEVCFG_DMAOFF_IDE 0x01e00000
0337 #define BONITO_IODEVCFG_DMAOFF_IDE_SHIFT 21
0338 #define BONITO_IODEVCFG_EPROMSPLIT 0x02000000
0339
0340 #define BONITO_IODEVCFG_CPUCLOCKPERIOD 0xfc000000
0341 #define BONITO_IODEVCFG_CPUCLOCKPERIOD_SHIFT 26
0342
0343
0344
0345 #define BONITO_GPIO_GPIOW 0x000003ff
0346 #define BONITO_GPIO_GPIOW_SHIFT 0
0347 #define BONITO_GPIO_GPIOR 0x01ff0000
0348 #define BONITO_GPIO_GPIOR_SHIFT 16
0349 #define BONITO_GPIO_GPINR 0xfe000000
0350 #define BONITO_GPIO_GPINR_SHIFT 25
0351 #define BONITO_GPIO_IOW(N) (1<<(BONITO_GPIO_GPIOW_SHIFT+(N)))
0352 #define BONITO_GPIO_IOR(N) (1<<(BONITO_GPIO_GPIOR_SHIFT+(N)))
0353 #define BONITO_GPIO_INR(N) (1<<(BONITO_GPIO_GPINR_SHIFT+(N)))
0354
0355
0356 #define BONITO_ICU_MBOXES 0x0000000f
0357 #define BONITO_ICU_MBOXES_SHIFT 0
0358 #define BONITO_ICU_DMARDY 0x00000010
0359 #define BONITO_ICU_DMAEMPTY 0x00000020
0360 #define BONITO_ICU_COPYRDY 0x00000040
0361 #define BONITO_ICU_COPYEMPTY 0x00000080
0362 #define BONITO_ICU_COPYERR 0x00000100
0363 #define BONITO_ICU_PCIIRQ 0x00000200
0364 #define BONITO_ICU_MASTERERR 0x00000400
0365 #define BONITO_ICU_SYSTEMERR 0x00000800
0366 #define BONITO_ICU_DRAMPERR 0x00001000
0367 #define BONITO_ICU_RETRYERR 0x00002000
0368 #define BONITO_ICU_GPIOS 0x01ff0000
0369 #define BONITO_ICU_GPIOS_SHIFT 16
0370 #define BONITO_ICU_GPINS 0x7e000000
0371 #define BONITO_ICU_GPINS_SHIFT 25
0372 #define BONITO_ICU_MBOX(N) (1<<(BONITO_ICU_MBOXES_SHIFT+(N)))
0373 #define BONITO_ICU_GPIO(N) (1<<(BONITO_ICU_GPIOS_SHIFT+(N)))
0374 #define BONITO_ICU_GPIN(N) (1<<(BONITO_ICU_GPINS_SHIFT+(N)))
0375
0376
0377
0378 #define BONITO_PCIMAP_PCIMAP_LO0 0x0000003f
0379 #define BONITO_PCIMAP_PCIMAP_LO0_SHIFT 0
0380 #define BONITO_PCIMAP_PCIMAP_LO1 0x00000fc0
0381 #define BONITO_PCIMAP_PCIMAP_LO1_SHIFT 6
0382 #define BONITO_PCIMAP_PCIMAP_LO2 0x0003f000
0383 #define BONITO_PCIMAP_PCIMAP_LO2_SHIFT 12
0384 #define BONITO_PCIMAP_PCIMAP_2 0x00040000
0385 #define BONITO_PCIMAP_WIN(WIN, ADDR) ((((ADDR)>>26) & BONITO_PCIMAP_PCIMAP_LO0) << ((WIN)*6))
0386
0387 #define BONITO_PCIMAP_WINSIZE (1<<26)
0388 #define BONITO_PCIMAP_WINOFFSET(ADDR) ((ADDR) & (BONITO_PCIMAP_WINSIZE - 1))
0389 #define BONITO_PCIMAP_WINBASE(ADDR) ((ADDR) << 26)
0390
0391
0392
0393 #define BONITO_PCIMEMBASECFG_MASK 0xf0000000
0394 #define BONITO_PCIMEMBASECFG_MEMBASE0_MASK 0x0000001f
0395 #define BONITO_PCIMEMBASECFG_MEMBASE0_MASK_SHIFT 0
0396 #define BONITO_PCIMEMBASECFG_MEMBASE0_TRANS 0x000003e0
0397 #define BONITO_PCIMEMBASECFG_MEMBASE0_TRANS_SHIFT 5
0398 #define BONITO_PCIMEMBASECFG_MEMBASE0_CACHED 0x00000400
0399 #define BONITO_PCIMEMBASECFG_MEMBASE0_IO 0x00000800
0400
0401 #define BONITO_PCIMEMBASECFG_MEMBASE1_MASK 0x0001f000
0402 #define BONITO_PCIMEMBASECFG_MEMBASE1_MASK_SHIFT 12
0403 #define BONITO_PCIMEMBASECFG_MEMBASE1_TRANS 0x003e0000
0404 #define BONITO_PCIMEMBASECFG_MEMBASE1_TRANS_SHIFT 17
0405 #define BONITO_PCIMEMBASECFG_MEMBASE1_CACHED 0x00400000
0406 #define BONITO_PCIMEMBASECFG_MEMBASE1_IO 0x00800000
0407
0408 #define BONITO_PCIMEMBASECFG_ASHIFT 23
0409 #define BONITO_PCIMEMBASECFG_AMASK 0x007fffff
0410 #define BONITO_PCIMEMBASECFGSIZE(WIN, SIZE) (((~((SIZE)-1))>>(BONITO_PCIMEMBASECFG_ASHIFT-BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT)) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK)
0411 #define BONITO_PCIMEMBASECFGBASE(WIN, BASE) (((BASE)>>(BONITO_PCIMEMBASECFG_ASHIFT-BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS_SHIFT)) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS)
0412
0413 #define BONITO_PCIMEMBASECFG_SIZE(WIN, CFG) (((((~(CFG)) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK)) << (BONITO_PCIMEMBASECFG_ASHIFT - BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT)) | BONITO_PCIMEMBASECFG_AMASK)
0414
0415
0416 #define BONITO_PCIMEMBASECFG_ADDRMASK(WIN, CFG) ((((CFG) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK) >> BONITO_PCIMEMBASECFG_MEMBASE##WIN##_MASK_SHIFT) << BONITO_PCIMEMBASECFG_ASHIFT)
0417 #define BONITO_PCIMEMBASECFG_ADDRTRANS(WIN, CFG) ((((CFG) & BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS) >> BONITO_PCIMEMBASECFG_MEMBASE##WIN##_TRANS_SHIFT) << BONITO_PCIMEMBASECFG_ASHIFT)
0418
0419 #define BONITO_PCITOPHYS(WIN, ADDR, CFG) ( \
0420 (((ADDR) & (~(BONITO_PCIMEMBASECFG_MASK))) & (~(BONITO_PCIMEMBASECFG_ADDRMASK(WIN, CFG)))) | \
0421 (BONITO_PCIMEMBASECFG_ADDRTRANS(WIN, CFG)) \
0422 )
0423
0424
0425
0426 #define BONITO_PCICMD_MEMEN 0x00000002
0427 #define BONITO_PCICMD_MSTREN 0x00000004
0428
0429
0430 #endif