1 /* 1 2 * Bonito Register Map 3 * 4 * This file is the original bonito.h from Alg 5 * to fit into linux. 6 * 7 * Copyright (c) 1999 Algorithmics Ltd 8 * 9 * Carsten Langgaard, carstenl@mips.com 10 * Copyright (C) 2001 MIPS Technologies, Inc. 11 * 12 * Algorithmics gives permission for anyone to 13 * without any obligation or license condition 14 * this copyright message in any source redist 15 * 16 */ 17 18 /* Revision 1.48 autogenerated on 08/17/99 15: 19 /* This bonito64 version edited from bonito.h 20 21 #ifndef _ASM_MIPS_BOARDS_BONITO64_H 22 #define _ASM_MIPS_BOARDS_BONITO64_H 23 24 #ifdef __ASSEMBLY__ 25 26 /* offsets from base register */ 27 #define BONITO(x) (x) 28 29 #else 30 31 /* 32 * Algorithmics Bonito64 system controller reg 33 */ 34 extern unsigned long _pcictrl_bonito; 35 extern unsigned long _pcictrl_bonito_pcicfg; 36 37 #define BONITO(x) *(volatile u32 38 39 #endif /* __ASSEMBLY__ */ 40 41 42 #define BONITO_BOOT_BASE 0x1fc0 43 #define BONITO_BOOT_SIZE 0x0010 44 #define BONITO_BOOT_TOP (BONIT 45 #define BONITO_FLASH_BASE 0x1c00 46 #define BONITO_FLASH_SIZE 0x0300 47 #define BONITO_FLASH_TOP (BONIT 48 #define BONITO_SOCKET_BASE 0x1f80 49 #define BONITO_SOCKET_SIZE 0x0040 50 #define BONITO_SOCKET_TOP (BONIT 51 #define BONITO_REG_BASE 0x1fe0 52 #define BONITO_REG_SIZE 0x0004 53 #define BONITO_REG_TOP (BONIT 54 #define BONITO_DEV_BASE 0x1ff0 55 #define BONITO_DEV_SIZE 0x0010 56 #define BONITO_DEV_TOP (BONIT 57 #define BONITO_PCILO_BASE 0x1000 58 #define BONITO_PCILO_SIZE 0x0c00 59 #define BONITO_PCILO_TOP (BONIT 60 #define BONITO_PCILO0_BASE 0x1000 61 #define BONITO_PCILO1_BASE 0x1400 62 #define BONITO_PCILO2_BASE 0x1800 63 #define BONITO_PCIHI_BASE 0x2000 64 #define BONITO_PCIHI_SIZE 0x2000 65 #define BONITO_PCIHI_TOP (BONIT 66 #define BONITO_PCIIO_BASE 0x1fd0 67 #define BONITO_PCIIO_SIZE 0x0010 68 #define BONITO_PCIIO_TOP (BONIT 69 #define BONITO_PCICFG_BASE 0x1fe8 70 #define BONITO_PCICFG_SIZE 0x0008 71 #define BONITO_PCICFG_TOP (BONIT 72 73 74 /* Bonito Register Bases */ 75 76 #define BONITO_PCICONFIGBASE 0x00 77 #define BONITO_REGBASE 0x100 78 79 80 /* PCI Configuration Registers */ 81 82 #define BONITO_PCI_REG(x) BONITO 83 #define BONITO_PCIDID BONITO 84 #define BONITO_PCICMD BONITO 85 #define BONITO_PCICLASS BONITO 86 #define BONITO_PCILTIMER BONITO 87 #define BONITO_PCIBASE0 BONITO 88 #define BONITO_PCIBASE1 BONITO 89 #define BONITO_PCIBASE2 BONITO 90 #define BONITO_PCIEXPRBASE BONITO 91 #define BONITO_PCIINT BONITO 92 93 #define BONITO_PCICMD_PERR_CLR 0x8000 94 #define BONITO_PCICMD_SERR_CLR 0x4000 95 #define BONITO_PCICMD_MABORT_CLR 0x2000 96 #define BONITO_PCICMD_MTABORT_CLR 0x1000 97 #define BONITO_PCICMD_TABORT_CLR 0x0800 98 #define BONITO_PCICMD_MPERR_CLR 0x0100 99 #define BONITO_PCICMD_PERRRESPEN 0x0000 100 #define BONITO_PCICMD_ASTEPEN 0x0000 101 #define BONITO_PCICMD_SERREN 0x0000 102 #define BONITO_PCILTIMER_BUSLATENCY 0x0000 103 #define BONITO_PCILTIMER_BUSLATENCY_SHIFT 104 105 106 107 108 /* 1. Bonito h/w Configuration */ 109 /* Power on register */ 110 111 #define BONITO_BONPONCFG BONITO 112 113 #define BONITO_BONPONCFG_SYSCONTROLLERRD 114 #define BONITO_BONPONCFG_ROMCS1SAMP 0x0002 115 #define BONITO_BONPONCFG_ROMCS0SAMP 0x0001 116 #define BONITO_BONPONCFG_CPUBIGEND 0x0000 117 /* Added by RPF 11-9-00 */ 118 #define BONITO_BONPONCFG_BURSTORDER 0x0000 119 /* --- */ 120 #define BONITO_BONPONCFG_CPUPARITY 0x0000 121 #define BONITO_BONPONCFG_CPUTYPE 0x0000 122 #define BONITO_BONPONCFG_CPUTYPE_SHIFT 0 123 #define BONITO_BONPONCFG_PCIRESET_OUT 0x0000 124 #define BONITO_BONPONCFG_IS_ARBITER 0x0000 125 #define BONITO_BONPONCFG_ROMBOOT 0x0000 126 #define BONITO_BONPONCFG_ROMBOOT_SHIFT 6 127 128 #define BONITO_BONPONCFG_ROMBOOT_FLASH (0x0<< 129 #define BONITO_BONPONCFG_ROMBOOT_SOCKET (0x1<< 130 #define BONITO_BONPONCFG_ROMBOOT_SDRAM (0x2<< 131 #define BONITO_BONPONCFG_ROMBOOT_CPURESET 132 133 #define BONITO_BONPONCFG_ROMCS0WIDTH 0x0000 134 #define BONITO_BONPONCFG_ROMCS1WIDTH 0x0000 135 #define BONITO_BONPONCFG_ROMCS0FAST 0x0000 136 #define BONITO_BONPONCFG_ROMCS1FAST 0x0000 137 #define BONITO_BONPONCFG_CONFIG_DIS 0x0000 138 139 140 /* Other Bonito configuration */ 141 142 #define BONITO_BONGENCFG_OFFSET 0x4 143 #define BONITO_BONGENCFG BONITO 144 145 #define BONITO_BONGENCFG_DEBUGMODE 0x0000 146 #define BONITO_BONGENCFG_SNOOPEN 0x0000 147 #define BONITO_BONGENCFG_CPUSELFRESET 0x0000 148 149 #define BONITO_BONGENCFG_FORCE_IRQA 0x0000 150 #define BONITO_BONGENCFG_IRQA_ISOUT 0x0000 151 #define BONITO_BONGENCFG_IRQA_FROM_INT1 0x0000 152 #define BONITO_BONGENCFG_BYTESWAP 0x0000 153 154 #define BONITO_BONGENCFG_UNCACHED 0x0000 155 #define BONITO_BONGENCFG_PREFETCHEN 0x0000 156 #define BONITO_BONGENCFG_WBEHINDEN 0x0000 157 #define BONITO_BONGENCFG_CACHEALG 0x0000 158 #define BONITO_BONGENCFG_CACHEALG_SHIFT 10 159 #define BONITO_BONGENCFG_PCIQUEUE 0x0000 160 #define BONITO_BONGENCFG_CACHESTOP 0x0000 161 #define BONITO_BONGENCFG_MSTRBYTESWAP 0x0000 162 #define BONITO_BONGENCFG_BUSERREN 0x0000 163 #define BONITO_BONGENCFG_NORETRYTIMEOUT 0x0001 164 #define BONITO_BONGENCFG_SHORTCOPYTIMEOUT 165 166 /* 2. IO & IDE configuration */ 167 168 #define BONITO_IODEVCFG BONITO 169 170 /* 3. IO & IDE configuration */ 171 172 #define BONITO_SDCFG BONITO 173 174 /* 4. PCI address map control */ 175 176 #define BONITO_PCIMAP BONITO 177 #define BONITO_PCIMEMBASECFG BONITO 178 #define BONITO_PCIMAP_CFG BONITO 179 180 /* 5. ICU & GPIO regs */ 181 182 /* GPIO Regs - r/w */ 183 184 #define BONITO_GPIODATA_OFFSET 0x1c 185 #define BONITO_GPIODATA BONITO 186 #define BONITO_GPIOIE BONITO 187 188 /* ICU Configuration Regs - r/w */ 189 190 #define BONITO_INTEDGE BONITO 191 #define BONITO_INTSTEER BONITO 192 #define BONITO_INTPOL BONITO 193 194 /* ICU Enable Regs - IntEn & IntISR are r/o. * 195 196 #define BONITO_INTENSET BONITO 197 #define BONITO_INTENCLR BONITO 198 #define BONITO_INTEN BONITO 199 #define BONITO_INTISR BONITO 200 201 /* PCI mail boxes */ 202 203 #define BONITO_PCIMAIL0_OFFSET 0x40 204 #define BONITO_PCIMAIL1_OFFSET 0x44 205 #define BONITO_PCIMAIL2_OFFSET 0x48 206 #define BONITO_PCIMAIL3_OFFSET 0x4c 207 #define BONITO_PCIMAIL0 BONITO 208 #define BONITO_PCIMAIL1 BONITO 209 #define BONITO_PCIMAIL2 BONITO 210 #define BONITO_PCIMAIL3 BONITO 211 212 213 /* 6. PCI cache */ 214 215 #define BONITO_PCICACHECTRL BONITO 216 #define BONITO_PCICACHETAG BONITO 217 218 #define BONITO_PCIBADADDR BONITO 219 #define BONITO_PCIMSTAT BONITO 220 221 222 /* 223 #define BONITO_PCIRDPOST BONITO 224 #define BONITO_PCIDATA BONITO 225 */ 226 227 /* 7. IDE DMA & Copier */ 228 229 #define BONITO_CONFIGBASE 0x000 230 #define BONITO_BONITOBASE 0x100 231 #define BONITO_LDMABASE 0x200 232 #define BONITO_COPBASE 0x300 233 #define BONITO_REG_BLOCKMASK 0x300 234 235 #define BONITO_LDMACTRL BONITO 236 #define BONITO_LDMASTAT BONITO 237 #define BONITO_LDMAADDR BONITO 238 #define BONITO_LDMAGO BONITO 239 #define BONITO_LDMADATA BONITO 240 241 #define BONITO_COPCTRL BONITO 242 #define BONITO_COPSTAT BONITO 243 #define BONITO_COPPADDR BONITO 244 #define BONITO_COPDADDR BONITO 245 #define BONITO_COPGO BONITO 246 247 248 /* ###### Bit Definitions for individual Regis 249 250 /* Gen DMA. */ 251 252 #define BONITO_IDECOPDADDR_DMA_DADDR 0x0fff 253 #define BONITO_IDECOPDADDR_DMA_DADDR_SHIFT 254 #define BONITO_IDECOPPADDR_DMA_PADDR 0xffff 255 #define BONITO_IDECOPPADDR_DMA_PADDR_SHIFT 256 #define BONITO_IDECOPGO_DMA_SIZE 0x0000 257 #define BONITO_IDECOPGO_DMA_SIZE_SHIFT 0 258 #define BONITO_IDECOPGO_DMA_WRITE 0x0001 259 #define BONITO_IDECOPGO_DMAWCOUNT 0x000f 260 #define BONITO_IDECOPGO_DMAWCOUNT_SHIFT 16 261 262 #define BONITO_IDECOPCTRL_DMA_STARTBIT 0x8000 263 #define BONITO_IDECOPCTRL_DMA_RSTBIT 0x4000 264 265 /* DRAM - sdCfg */ 266 267 #define BONITO_SDCFG_AROWBITS 0x0000 268 #define BONITO_SDCFG_AROWBITS_SHIFT 0 269 #define BONITO_SDCFG_ACOLBITS 0x0000 270 #define BONITO_SDCFG_ACOLBITS_SHIFT 2 271 #define BONITO_SDCFG_ABANKBIT 0x0000 272 #define BONITO_SDCFG_ASIDES 0x0000 273 #define BONITO_SDCFG_AABSENT 0x0000 274 #define BONITO_SDCFG_AWIDTH64 0x0000 275 276 #define BONITO_SDCFG_BROWBITS 0x0000 277 #define BONITO_SDCFG_BROWBITS_SHIFT 8 278 #define BONITO_SDCFG_BCOLBITS 0x0000 279 #define BONITO_SDCFG_BCOLBITS_SHIFT 10 280 #define BONITO_SDCFG_BBANKBIT 0x0000 281 #define BONITO_SDCFG_BSIDES 0x0000 282 #define BONITO_SDCFG_BABSENT 0x0000 283 #define BONITO_SDCFG_BWIDTH64 0x0000 284 285 #define BONITO_SDCFG_EXTRDDATA 0x0001 286 #define BONITO_SDCFG_EXTRASCAS 0x0002 287 #define BONITO_SDCFG_EXTPRECH 0x0004 288 #define BONITO_SDCFG_EXTRASWIDTH 0x0018 289 #define BONITO_SDCFG_EXTRASWIDTH_SHIFT 19 290 /* Changed by RPF 11-9-00 */ 291 #define BONITO_SDCFG_DRAMMODESET 0x0020 292 /* --- */ 293 #define BONITO_SDCFG_DRAMEXTREGS 0x0040 294 #define BONITO_SDCFG_DRAMPARITY 0x0080 295 /* Added by RPF 11-9-00 */ 296 #define BONITO_SDCFG_DRAMBURSTLEN 0x0300 297 #define BONITO_SDCFG_DRAMBURSTLEN_SHIFT 24 298 #define BONITO_SDCFG_DRAMMODESET_DONE 0x8000 299 /* --- */ 300 301 /* PCI Cache - pciCacheCtrl */ 302 303 #define BONITO_PCICACHECTRL_CACHECMD 0x0000 304 #define BONITO_PCICACHECTRL_CACHECMD_SHIFT 305 #define BONITO_PCICACHECTRL_CACHECMDLINE 306 #define BONITO_PCICACHECTRL_CACHECMDLINE_SHIFT 307 #define BONITO_PCICACHECTRL_CMDEXEC 0x0000 308 309 #define BONITO_PCICACHECTRL_IOBCCOH_PRES 310 #define BONITO_PCICACHECTRL_IOBCCOH_EN 0x0000 311 #define BONITO_PCICACHECTRL_CPUCOH_PRES 0x0000 312 #define BONITO_PCICACHECTRL_CPUCOH_EN 0x0000 313 314 #define BONITO_IODEVCFG_BUFFBIT_CS0 0x0000 315 #define BONITO_IODEVCFG_SPEEDBIT_CS0 0x0000 316 #define BONITO_IODEVCFG_MOREABITS_CS0 0x0000 317 318 #define BONITO_IODEVCFG_BUFFBIT_CS1 0x0000 319 #define BONITO_IODEVCFG_SPEEDBIT_CS1 0x0000 320 #define BONITO_IODEVCFG_MOREABITS_CS1 0x0000 321 322 #define BONITO_IODEVCFG_BUFFBIT_CS2 0x0000 323 #define BONITO_IODEVCFG_SPEEDBIT_CS2 0x0000 324 #define BONITO_IODEVCFG_MOREABITS_CS2 0x0000 325 326 #define BONITO_IODEVCFG_BUFFBIT_CS3 0x0000 327 #define BONITO_IODEVCFG_SPEEDBIT_CS3 0x0000 328 #define BONITO_IODEVCFG_MOREABITS_CS3 0x0000 329 330 #define BONITO_IODEVCFG_BUFFBIT_IDE 0x0000 331 #define BONITO_IODEVCFG_SPEEDBIT_IDE 0x0000 332 #define BONITO_IODEVCFG_WORDSWAPBIT_IDE 0x0000 333 #define BONITO_IODEVCFG_MODEBIT_IDE 0x0000 334 #define BONITO_IODEVCFG_DMAON_IDE 0x001f 335 #define BONITO_IODEVCFG_DMAON_IDE_SHIFT 16 336 #define BONITO_IODEVCFG_DMAOFF_IDE 0x01e0 337 #define BONITO_IODEVCFG_DMAOFF_IDE_SHIFT 338 #define BONITO_IODEVCFG_EPROMSPLIT 0x0200 339 /* Added by RPF 11-9-00 */ 340 #define BONITO_IODEVCFG_CPUCLOCKPERIOD 0xfc00 341 #define BONITO_IODEVCFG_CPUCLOCKPERIOD_SHIFT 2 342 /* --- */ 343 344 /* gpio */ 345 #define BONITO_GPIO_GPIOW 0x0000 346 #define BONITO_GPIO_GPIOW_SHIFT 0 347 #define BONITO_GPIO_GPIOR 0x01ff 348 #define BONITO_GPIO_GPIOR_SHIFT 16 349 #define BONITO_GPIO_GPINR 0xfe00 350 #define BONITO_GPIO_GPINR_SHIFT 25 351 #define BONITO_GPIO_IOW(N) (1<<(B 352 #define BONITO_GPIO_IOR(N) (1<<(B 353 #define BONITO_GPIO_INR(N) (1<<(B 354 355 /* ICU */ 356 #define BONITO_ICU_MBOXES 0x0000 357 #define BONITO_ICU_MBOXES_SHIFT 0 358 #define BONITO_ICU_DMARDY 0x0000 359 #define BONITO_ICU_DMAEMPTY 0x0000 360 #define BONITO_ICU_COPYRDY 0x0000 361 #define BONITO_ICU_COPYEMPTY 0x0000 362 #define BONITO_ICU_COPYERR 0x0000 363 #define BONITO_ICU_PCIIRQ 0x0000 364 #define BONITO_ICU_MASTERERR 0x0000 365 #define BONITO_ICU_SYSTEMERR 0x0000 366 #define BONITO_ICU_DRAMPERR 0x0000 367 #define BONITO_ICU_RETRYERR 0x0000 368 #define BONITO_ICU_GPIOS 0x01ff 369 #define BONITO_ICU_GPIOS_SHIFT 16 370 #define BONITO_ICU_GPINS 0x7e00 371 #define BONITO_ICU_GPINS_SHIFT 25 372 #define BONITO_ICU_MBOX(N) (1<<(B 373 #define BONITO_ICU_GPIO(N) (1<<(B 374 #define BONITO_ICU_GPIN(N) (1<<(B 375 376 /* pcimap */ 377 378 #define BONITO_PCIMAP_PCIMAP_LO0 0x0000 379 #define BONITO_PCIMAP_PCIMAP_LO0_SHIFT 0 380 #define BONITO_PCIMAP_PCIMAP_LO1 0x0000 381 #define BONITO_PCIMAP_PCIMAP_LO1_SHIFT 6 382 #define BONITO_PCIMAP_PCIMAP_LO2 0x0003 383 #define BONITO_PCIMAP_PCIMAP_LO2_SHIFT 12 384 #define BONITO_PCIMAP_PCIMAP_2 0x0004 385 #define BONITO_PCIMAP_WIN(WIN, ADDR) ((((AD 386 387 #define BONITO_PCIMAP_WINSIZE (1<<26 388 #define BONITO_PCIMAP_WINOFFSET(ADDR) ((ADDR 389 #define BONITO_PCIMAP_WINBASE(ADDR) ((ADDR 390 391 /* pcimembaseCfg */ 392 393 #define BONITO_PCIMEMBASECFG_MASK 394 #define BONITO_PCIMEMBASECFG_MEMBASE0_MASK 395 #define BONITO_PCIMEMBASECFG_MEMBASE0_MASK_SHI 396 #define BONITO_PCIMEMBASECFG_MEMBASE0_TRANS 397 #define BONITO_PCIMEMBASECFG_MEMBASE0_TRANS_SH 398 #define BONITO_PCIMEMBASECFG_MEMBASE0_CACHED 399 #define BONITO_PCIMEMBASECFG_MEMBASE0_IO 400 401 #define BONITO_PCIMEMBASECFG_MEMBASE1_MASK 402 #define BONITO_PCIMEMBASECFG_MEMBASE1_MASK_SHI 403 #define BONITO_PCIMEMBASECFG_MEMBASE1_TRANS 404 #define BONITO_PCIMEMBASECFG_MEMBASE1_TRANS_SH 405 #define BONITO_PCIMEMBASECFG_MEMBASE1_CACHED 406 #define BONITO_PCIMEMBASECFG_MEMBASE1_IO 407 408 #define BONITO_PCIMEMBASECFG_ASHIFT 23 409 #define BONITO_PCIMEMBASECFG_AMASK 410 #define BONITO_PCIMEMBASECFGSIZE(WIN, SIZE) 411 #define BONITO_PCIMEMBASECFGBASE(WIN, BASE) 412 413 #define BONITO_PCIMEMBASECFG_SIZE(WIN, CFG) ( 414 415 416 #define BONITO_PCIMEMBASECFG_ADDRMASK(WIN, CFG 417 #define BONITO_PCIMEMBASECFG_ADDRTRANS(WIN, CF 418 419 #define BONITO_PCITOPHYS(WIN, ADDR, CFG) 420 421 422 423 424 /* PCICmd */ 425 426 #define BONITO_PCICMD_MEMEN 0x0000 427 #define BONITO_PCICMD_MSTREN 0x0000 428 429 430 #endif /* _ASM_MIPS_BOARDS_BONITO64_H */ 431
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.