Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 1 | /* ********************************************************************* |
| 2 | * SB1250 Board Support Package |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 3 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 4 | * Register Definitions File: sb1250_regs.h |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 5 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 6 | * This module contains the addresses of the on-chip peripherals |
| 7 | * on the SB1250. |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 8 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 9 | * SB1250 specification level: 01/02/2002 |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 10 | * |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 11 | ********************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 12 | * |
| 13 | * Copyright 2000,2001,2002,2003 |
| 14 | * Broadcom Corporation. All rights reserved. |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 15 | * |
| 16 | * This program is free software; you can redistribute it and/or |
| 17 | * modify it under the terms of the GNU General Public License as |
| 18 | * published by the Free Software Foundation; either version 2 of |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 19 | * the License, or (at your option) any later version. |
| 20 | * |
| 21 | * This program is distributed in the hope that it will be useful, |
| 22 | * but WITHOUT ANY WARRANTY; without even the implied warranty of |
| 23 | * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the |
| 24 | * GNU General Public License for more details. |
| 25 | * |
| 26 | * You should have received a copy of the GNU General Public License |
| 27 | * along with this program; if not, write to the Free Software |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 28 | * Foundation, Inc., 59 Temple Place, Suite 330, Boston, |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 29 | * MA 02111-1307 USA |
| 30 | ********************************************************************* */ |
| 31 | |
| 32 | |
| 33 | #ifndef _SB1250_REGS_H |
| 34 | #define _SB1250_REGS_H |
| 35 | |
| 36 | #include "sb1250_defs.h" |
| 37 | |
| 38 | |
| 39 | /* ********************************************************************* |
| 40 | * Some general notes: |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 41 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 42 | * For the most part, when there is more than one peripheral |
| 43 | * of the same type on the SOC, the constants below will be |
| 44 | * offsets from the base of each peripheral. For example, |
| 45 | * the MAC registers are described as offsets from the first |
| 46 | * MAC register, and there will be a MAC_REGISTER() macro |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 47 | * to calculate the base address of a given MAC. |
| 48 | * |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 49 | * The information in this file is based on the SB1250 SOC |
| 50 | * manual version 0.2, July 2000. |
| 51 | ********************************************************************* */ |
| 52 | |
| 53 | |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 54 | /* ********************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 55 | * Memory Controller Registers |
| 56 | ********************************************************************* */ |
| 57 | |
| 58 | /* |
| 59 | * XXX: can't remove MC base 0 if 112x, since it's used by other macros, |
| 60 | * since there is one reg there (but it could get its addr/offset constant). |
| 61 | */ |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 62 | |
| 63 | #if SIBYTE_HDR_FEATURE_1250_112x /* This MC only on 1250 & 112x */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 64 | #define A_MC_BASE_0 0x0010051000 |
| 65 | #define A_MC_BASE_1 0x0010052000 |
| 66 | #define MC_REGISTER_SPACING 0x1000 |
| 67 | |
| 68 | #define A_MC_BASE(ctlid) ((ctlid)*MC_REGISTER_SPACING+A_MC_BASE_0) |
| 69 | #define A_MC_REGISTER(ctlid,reg) (A_MC_BASE(ctlid)+(reg)) |
| 70 | |
| 71 | #define R_MC_CONFIG 0x0000000100 |
| 72 | #define R_MC_DRAMCMD 0x0000000120 |
| 73 | #define R_MC_DRAMMODE 0x0000000140 |
| 74 | #define R_MC_TIMING1 0x0000000160 |
| 75 | #define R_MC_TIMING2 0x0000000180 |
| 76 | #define R_MC_CS_START 0x00000001A0 |
| 77 | #define R_MC_CS_END 0x00000001C0 |
| 78 | #define R_MC_CS_INTERLEAVE 0x00000001E0 |
| 79 | #define S_MC_CS_STARTEND 16 |
| 80 | |
| 81 | #define R_MC_CSX_BASE 0x0000000200 |
| 82 | #define R_MC_CSX_ROW 0x0000000000 /* relative to CSX_BASE, above */ |
| 83 | #define R_MC_CSX_COL 0x0000000020 /* relative to CSX_BASE, above */ |
| 84 | #define R_MC_CSX_BA 0x0000000040 /* relative to CSX_BASE, above */ |
| 85 | #define MC_CSX_SPACING 0x0000000060 /* relative to CSX_BASE, above */ |
| 86 | |
| 87 | #define R_MC_CS0_ROW 0x0000000200 |
| 88 | #define R_MC_CS0_COL 0x0000000220 |
| 89 | #define R_MC_CS0_BA 0x0000000240 |
| 90 | #define R_MC_CS1_ROW 0x0000000260 |
| 91 | #define R_MC_CS1_COL 0x0000000280 |
| 92 | #define R_MC_CS1_BA 0x00000002A0 |
| 93 | #define R_MC_CS2_ROW 0x00000002C0 |
| 94 | #define R_MC_CS2_COL 0x00000002E0 |
| 95 | #define R_MC_CS2_BA 0x0000000300 |
| 96 | #define R_MC_CS3_ROW 0x0000000320 |
| 97 | #define R_MC_CS3_COL 0x0000000340 |
| 98 | #define R_MC_CS3_BA 0x0000000360 |
| 99 | #define R_MC_CS_ATTR 0x0000000380 |
| 100 | #define R_MC_TEST_DATA 0x0000000400 |
| 101 | #define R_MC_TEST_ECC 0x0000000420 |
| 102 | #define R_MC_MCLK_CFG 0x0000000500 |
| 103 | |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 104 | #endif /* 1250 & 112x */ |
| 105 | |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 106 | /* ********************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 107 | * L2 Cache Control Registers |
| 108 | ********************************************************************* */ |
| 109 | |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 110 | #if SIBYTE_HDR_FEATURE_1250_112x /* This L2C only on 1250/112x */ |
| 111 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 112 | #define A_L2_READ_TAG 0x0010040018 |
| 113 | #define A_L2_ECC_TAG 0x0010040038 |
| 114 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) |
| 115 | #define A_L2_READ_MISC 0x0010040058 |
| 116 | #endif /* 1250 PASS3 || 112x PASS1 */ |
| 117 | #define A_L2_WAY_DISABLE 0x0010041000 |
| 118 | #define A_L2_MAKEDISABLE(x) (A_L2_WAY_DISABLE | (((~(x))&0x0F) << 8)) |
| 119 | #define A_L2_MGMT_TAG_BASE 0x00D0000000 |
| 120 | |
| 121 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
| 122 | #define A_L2_CACHE_DISABLE 0x0010042000 |
| 123 | #define A_L2_MAKECACHEDISABLE(x) (A_L2_CACHE_DISABLE | (((x)&0x0F) << 8)) |
| 124 | #define A_L2_MISC_CONFIG 0x0010043000 |
| 125 | #endif /* 1250 PASS2 || 112x PASS1 */ |
| 126 | |
| 127 | /* Backward-compatibility definitions. */ |
| 128 | /* XXX: discourage people from using these constants. */ |
| 129 | #define A_L2_READ_ADDRESS A_L2_READ_TAG |
| 130 | #define A_L2_EEC_ADDRESS A_L2_ECC_TAG |
| 131 | |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 132 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 133 | |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 134 | /* ********************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 135 | * PCI Interface Registers |
| 136 | ********************************************************************* */ |
| 137 | |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 138 | #if SIBYTE_HDR_FEATURE_1250_112x /* This PCI/HT only on 1250/112x */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 139 | #define A_PCI_TYPE00_HEADER 0x00DE000000 |
| 140 | #define A_PCI_TYPE01_HEADER 0x00DE000800 |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 141 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 142 | |
| 143 | |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 144 | /* ********************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 145 | * Ethernet DMA and MACs |
| 146 | ********************************************************************* */ |
| 147 | |
| 148 | #define A_MAC_BASE_0 0x0010064000 |
| 149 | #define A_MAC_BASE_1 0x0010065000 |
| 150 | #if SIBYTE_HDR_FEATURE_CHIP(1250) |
| 151 | #define A_MAC_BASE_2 0x0010066000 |
| 152 | #endif /* 1250 */ |
| 153 | |
| 154 | #define MAC_SPACING 0x1000 |
| 155 | #define MAC_DMA_TXRX_SPACING 0x0400 |
| 156 | #define MAC_DMA_CHANNEL_SPACING 0x0100 |
| 157 | #define DMA_RX 0 |
| 158 | #define DMA_TX 1 |
| 159 | #define MAC_NUM_DMACHAN 2 /* channels per direction */ |
| 160 | |
| 161 | /* XXX: not correct; depends on SOC type. */ |
| 162 | #define MAC_NUM_PORTS 3 |
| 163 | |
| 164 | #define A_MAC_CHANNEL_BASE(macnum) \ |
| 165 | (A_MAC_BASE_0 + \ |
| 166 | MAC_SPACING*(macnum)) |
| 167 | |
| 168 | #define A_MAC_REGISTER(macnum,reg) \ |
| 169 | (A_MAC_BASE_0 + \ |
| 170 | MAC_SPACING*(macnum) + (reg)) |
| 171 | |
| 172 | |
| 173 | #define R_MAC_DMA_CHANNELS 0x800 /* Relative to A_MAC_CHANNEL_BASE */ |
| 174 | |
| 175 | #define A_MAC_DMA_CHANNEL_BASE(macnum,txrx,chan) \ |
| 176 | ((A_MAC_CHANNEL_BASE(macnum)) + \ |
| 177 | R_MAC_DMA_CHANNELS + \ |
| 178 | (MAC_DMA_TXRX_SPACING*(txrx)) + \ |
| 179 | (MAC_DMA_CHANNEL_SPACING*(chan))) |
| 180 | |
| 181 | #define R_MAC_DMA_CHANNEL_BASE(txrx,chan) \ |
| 182 | (R_MAC_DMA_CHANNELS + \ |
| 183 | (MAC_DMA_TXRX_SPACING*(txrx)) + \ |
| 184 | (MAC_DMA_CHANNEL_SPACING*(chan))) |
| 185 | |
| 186 | #define A_MAC_DMA_REGISTER(macnum,txrx,chan,reg) \ |
| 187 | (A_MAC_DMA_CHANNEL_BASE(macnum,txrx,chan) + \ |
| 188 | (reg)) |
| 189 | |
| 190 | #define R_MAC_DMA_REGISTER(txrx,chan,reg) \ |
| 191 | (R_MAC_DMA_CHANNEL_BASE(txrx,chan) + \ |
| 192 | (reg)) |
| 193 | |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 194 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 195 | * DMA channel registers, relative to A_MAC_DMA_CHANNEL_BASE |
| 196 | */ |
| 197 | |
| 198 | #define R_MAC_DMA_CONFIG0 0x00000000 |
| 199 | #define R_MAC_DMA_CONFIG1 0x00000008 |
| 200 | #define R_MAC_DMA_DSCR_BASE 0x00000010 |
| 201 | #define R_MAC_DMA_DSCR_CNT 0x00000018 |
| 202 | #define R_MAC_DMA_CUR_DSCRA 0x00000020 |
| 203 | #define R_MAC_DMA_CUR_DSCRB 0x00000028 |
| 204 | #define R_MAC_DMA_CUR_DSCRADDR 0x00000030 |
| 205 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) |
| 206 | #define R_MAC_DMA_OODPKTLOST_RX 0x00000038 /* rx only */ |
| 207 | #endif /* 1250 PASS3 || 112x PASS1 */ |
| 208 | |
| 209 | /* |
| 210 | * RMON Counters |
| 211 | */ |
| 212 | |
| 213 | #define R_MAC_RMON_TX_BYTES 0x00000000 |
| 214 | #define R_MAC_RMON_COLLISIONS 0x00000008 |
| 215 | #define R_MAC_RMON_LATE_COL 0x00000010 |
| 216 | #define R_MAC_RMON_EX_COL 0x00000018 |
| 217 | #define R_MAC_RMON_FCS_ERROR 0x00000020 |
| 218 | #define R_MAC_RMON_TX_ABORT 0x00000028 |
| 219 | /* Counter #6 (0x30) now reserved */ |
| 220 | #define R_MAC_RMON_TX_BAD 0x00000038 |
| 221 | #define R_MAC_RMON_TX_GOOD 0x00000040 |
| 222 | #define R_MAC_RMON_TX_RUNT 0x00000048 |
| 223 | #define R_MAC_RMON_TX_OVERSIZE 0x00000050 |
| 224 | #define R_MAC_RMON_RX_BYTES 0x00000080 |
| 225 | #define R_MAC_RMON_RX_MCAST 0x00000088 |
| 226 | #define R_MAC_RMON_RX_BCAST 0x00000090 |
| 227 | #define R_MAC_RMON_RX_BAD 0x00000098 |
| 228 | #define R_MAC_RMON_RX_GOOD 0x000000A0 |
| 229 | #define R_MAC_RMON_RX_RUNT 0x000000A8 |
| 230 | #define R_MAC_RMON_RX_OVERSIZE 0x000000B0 |
| 231 | #define R_MAC_RMON_RX_FCS_ERROR 0x000000B8 |
| 232 | #define R_MAC_RMON_RX_LENGTH_ERROR 0x000000C0 |
| 233 | #define R_MAC_RMON_RX_CODE_ERROR 0x000000C8 |
| 234 | #define R_MAC_RMON_RX_ALIGN_ERROR 0x000000D0 |
| 235 | |
| 236 | /* Updated to spec 0.2 */ |
| 237 | #define R_MAC_CFG 0x00000100 |
| 238 | #define R_MAC_THRSH_CFG 0x00000108 |
| 239 | #define R_MAC_VLANTAG 0x00000110 |
| 240 | #define R_MAC_FRAMECFG 0x00000118 |
| 241 | #define R_MAC_EOPCNT 0x00000120 |
| 242 | #define R_MAC_FIFO_PTRS 0x00000130 |
| 243 | #define R_MAC_ADFILTER_CFG 0x00000200 |
| 244 | #define R_MAC_ETHERNET_ADDR 0x00000208 |
| 245 | #define R_MAC_PKT_TYPE 0x00000210 |
| 246 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) |
| 247 | #define R_MAC_ADMASK0 0x00000218 |
| 248 | #define R_MAC_ADMASK1 0x00000220 |
| 249 | #endif /* 1250 PASS3 || 112x PASS1 */ |
| 250 | #define R_MAC_HASH_BASE 0x00000240 |
| 251 | #define R_MAC_ADDR_BASE 0x00000280 |
| 252 | #define R_MAC_CHLO0_BASE 0x00000300 |
| 253 | #define R_MAC_CHUP0_BASE 0x00000320 |
| 254 | #define R_MAC_ENABLE 0x00000400 |
| 255 | #define R_MAC_STATUS 0x00000408 |
| 256 | #define R_MAC_INT_MASK 0x00000410 |
| 257 | #define R_MAC_TXD_CTL 0x00000420 |
| 258 | #define R_MAC_MDIO 0x00000428 |
| 259 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
| 260 | #define R_MAC_STATUS1 0x00000430 |
| 261 | #endif /* 1250 PASS2 || 112x PASS1 */ |
| 262 | #define R_MAC_DEBUG_STATUS 0x00000448 |
| 263 | |
| 264 | #define MAC_HASH_COUNT 8 |
| 265 | #define MAC_ADDR_COUNT 8 |
| 266 | #define MAC_CHMAP_COUNT 4 |
| 267 | |
| 268 | |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 269 | /* ********************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 270 | * DUART Registers |
| 271 | ********************************************************************* */ |
| 272 | |
| 273 | |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 274 | #if SIBYTE_HDR_FEATURE_1250_112x /* This MC only on 1250 & 112x */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 275 | #define R_DUART_NUM_PORTS 2 |
| 276 | |
| 277 | #define A_DUART 0x0010060000 |
| 278 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 279 | #define DUART_CHANREG_SPACING 0x100 |
| 280 | #define A_DUART_CHANREG(chan,reg) (A_DUART + DUART_CHANREG_SPACING*(chan) + (reg)) |
| 281 | #define R_DUART_CHANREG(chan,reg) (DUART_CHANREG_SPACING*(chan) + (reg)) |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 282 | #endif /* 1250 & 112x */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 283 | |
| 284 | #define R_DUART_MODE_REG_1 0x100 |
| 285 | #define R_DUART_MODE_REG_2 0x110 |
| 286 | #define R_DUART_STATUS 0x120 |
| 287 | #define R_DUART_CLK_SEL 0x130 |
| 288 | #define R_DUART_CMD 0x150 |
| 289 | #define R_DUART_RX_HOLD 0x160 |
| 290 | #define R_DUART_TX_HOLD 0x170 |
| 291 | |
| 292 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
| 293 | #define R_DUART_FULL_CTL 0x140 |
| 294 | #define R_DUART_OPCR_X 0x180 |
| 295 | #define R_DUART_AUXCTL_X 0x190 |
| 296 | #endif /* 1250 PASS2 || 112x PASS1 */ |
| 297 | |
| 298 | |
| 299 | /* |
| 300 | * The IMR and ISR can't be addressed with A_DUART_CHANREG, |
| 301 | * so use this macro instead. |
| 302 | */ |
| 303 | |
| 304 | #define R_DUART_AUX_CTRL 0x310 |
| 305 | #define R_DUART_ISR_A 0x320 |
| 306 | #define R_DUART_IMR_A 0x330 |
| 307 | #define R_DUART_ISR_B 0x340 |
| 308 | #define R_DUART_IMR_B 0x350 |
| 309 | #define R_DUART_OUT_PORT 0x360 |
| 310 | #define R_DUART_OPCR 0x370 |
| 311 | |
| 312 | #define R_DUART_SET_OPR 0x3B0 |
| 313 | #define R_DUART_CLEAR_OPR 0x3C0 |
| 314 | |
| 315 | #define DUART_IMRISR_SPACING 0x20 |
| 316 | |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 317 | #if SIBYTE_HDR_FEATURE_1250_112x /* This MC only on 1250 & 112x */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 318 | #define R_DUART_IMRREG(chan) (R_DUART_IMR_A + (chan)*DUART_IMRISR_SPACING) |
| 319 | #define R_DUART_ISRREG(chan) (R_DUART_ISR_A + (chan)*DUART_IMRISR_SPACING) |
| 320 | |
| 321 | #define A_DUART_IMRREG(chan) (A_DUART + R_DUART_IMRREG(chan)) |
| 322 | #define A_DUART_ISRREG(chan) (A_DUART + R_DUART_ISRREG(chan)) |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 323 | #endif /* 1250 & 112x */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 324 | |
| 325 | |
| 326 | |
| 327 | |
| 328 | /* |
| 329 | * These constants are the absolute addresses. |
| 330 | */ |
| 331 | |
| 332 | #define A_DUART_MODE_REG_1_A 0x0010060100 |
| 333 | #define A_DUART_MODE_REG_2_A 0x0010060110 |
| 334 | #define A_DUART_STATUS_A 0x0010060120 |
| 335 | #define A_DUART_CLK_SEL_A 0x0010060130 |
| 336 | #define A_DUART_CMD_A 0x0010060150 |
| 337 | #define A_DUART_RX_HOLD_A 0x0010060160 |
| 338 | #define A_DUART_TX_HOLD_A 0x0010060170 |
| 339 | |
| 340 | #define A_DUART_MODE_REG_1_B 0x0010060200 |
| 341 | #define A_DUART_MODE_REG_2_B 0x0010060210 |
| 342 | #define A_DUART_STATUS_B 0x0010060220 |
| 343 | #define A_DUART_CLK_SEL_B 0x0010060230 |
| 344 | #define A_DUART_CMD_B 0x0010060250 |
| 345 | #define A_DUART_RX_HOLD_B 0x0010060260 |
| 346 | #define A_DUART_TX_HOLD_B 0x0010060270 |
| 347 | |
| 348 | #define A_DUART_INPORT_CHNG 0x0010060300 |
| 349 | #define A_DUART_AUX_CTRL 0x0010060310 |
| 350 | #define A_DUART_ISR_A 0x0010060320 |
| 351 | #define A_DUART_IMR_A 0x0010060330 |
| 352 | #define A_DUART_ISR_B 0x0010060340 |
| 353 | #define A_DUART_IMR_B 0x0010060350 |
| 354 | #define A_DUART_OUT_PORT 0x0010060360 |
| 355 | #define A_DUART_OPCR 0x0010060370 |
| 356 | #define A_DUART_IN_PORT 0x0010060380 |
| 357 | #define A_DUART_ISR 0x0010060390 |
| 358 | #define A_DUART_IMR 0x00100603A0 |
| 359 | #define A_DUART_SET_OPR 0x00100603B0 |
| 360 | #define A_DUART_CLEAR_OPR 0x00100603C0 |
| 361 | #define A_DUART_INPORT_CHNG_A 0x00100603D0 |
| 362 | #define A_DUART_INPORT_CHNG_B 0x00100603E0 |
| 363 | |
| 364 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
| 365 | #define A_DUART_FULL_CTL_A 0x0010060140 |
| 366 | #define A_DUART_FULL_CTL_B 0x0010060240 |
| 367 | |
| 368 | #define A_DUART_OPCR_A 0x0010060180 |
| 369 | #define A_DUART_OPCR_B 0x0010060280 |
| 370 | |
| 371 | #define A_DUART_INPORT_CHNG_DEBUG 0x00100603F0 |
| 372 | #endif /* 1250 PASS2 || 112x PASS1 */ |
| 373 | |
| 374 | |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 375 | /* ********************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 376 | * Synchronous Serial Registers |
| 377 | ********************************************************************* */ |
| 378 | |
| 379 | |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 380 | #if SIBYTE_HDR_FEATURE_1250_112x /* sync serial only on 1250/112x */ |
| 381 | |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 382 | #define A_SER_BASE_0 0x0010060400 |
| 383 | #define A_SER_BASE_1 0x0010060800 |
| 384 | #define SER_SPACING 0x400 |
| 385 | |
| 386 | #define SER_DMA_TXRX_SPACING 0x80 |
| 387 | |
| 388 | #define SER_NUM_PORTS 2 |
| 389 | |
| 390 | #define A_SER_CHANNEL_BASE(sernum) \ |
| 391 | (A_SER_BASE_0 + \ |
| 392 | SER_SPACING*(sernum)) |
| 393 | |
| 394 | #define A_SER_REGISTER(sernum,reg) \ |
| 395 | (A_SER_BASE_0 + \ |
| 396 | SER_SPACING*(sernum) + (reg)) |
| 397 | |
| 398 | |
| 399 | #define R_SER_DMA_CHANNELS 0 /* Relative to A_SER_BASE_x */ |
| 400 | |
| 401 | #define A_SER_DMA_CHANNEL_BASE(sernum,txrx) \ |
| 402 | ((A_SER_CHANNEL_BASE(sernum)) + \ |
| 403 | R_SER_DMA_CHANNELS + \ |
| 404 | (SER_DMA_TXRX_SPACING*(txrx))) |
| 405 | |
| 406 | #define A_SER_DMA_REGISTER(sernum,txrx,reg) \ |
| 407 | (A_SER_DMA_CHANNEL_BASE(sernum,txrx) + \ |
| 408 | (reg)) |
| 409 | |
| 410 | |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 411 | /* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 412 | * DMA channel registers, relative to A_SER_DMA_CHANNEL_BASE |
| 413 | */ |
| 414 | |
| 415 | #define R_SER_DMA_CONFIG0 0x00000000 |
| 416 | #define R_SER_DMA_CONFIG1 0x00000008 |
| 417 | #define R_SER_DMA_DSCR_BASE 0x00000010 |
| 418 | #define R_SER_DMA_DSCR_CNT 0x00000018 |
| 419 | #define R_SER_DMA_CUR_DSCRA 0x00000020 |
| 420 | #define R_SER_DMA_CUR_DSCRB 0x00000028 |
| 421 | #define R_SER_DMA_CUR_DSCRADDR 0x00000030 |
| 422 | |
| 423 | #define R_SER_DMA_CONFIG0_RX 0x00000000 |
| 424 | #define R_SER_DMA_CONFIG1_RX 0x00000008 |
| 425 | #define R_SER_DMA_DSCR_BASE_RX 0x00000010 |
| 426 | #define R_SER_DMA_DSCR_COUNT_RX 0x00000018 |
| 427 | #define R_SER_DMA_CUR_DSCR_A_RX 0x00000020 |
| 428 | #define R_SER_DMA_CUR_DSCR_B_RX 0x00000028 |
| 429 | #define R_SER_DMA_CUR_DSCR_ADDR_RX 0x00000030 |
| 430 | |
| 431 | #define R_SER_DMA_CONFIG0_TX 0x00000080 |
| 432 | #define R_SER_DMA_CONFIG1_TX 0x00000088 |
| 433 | #define R_SER_DMA_DSCR_BASE_TX 0x00000090 |
| 434 | #define R_SER_DMA_DSCR_COUNT_TX 0x00000098 |
| 435 | #define R_SER_DMA_CUR_DSCR_A_TX 0x000000A0 |
| 436 | #define R_SER_DMA_CUR_DSCR_B_TX 0x000000A8 |
| 437 | #define R_SER_DMA_CUR_DSCR_ADDR_TX 0x000000B0 |
| 438 | |
| 439 | #define R_SER_MODE 0x00000100 |
| 440 | #define R_SER_MINFRM_SZ 0x00000108 |
| 441 | #define R_SER_MAXFRM_SZ 0x00000110 |
| 442 | #define R_SER_ADDR 0x00000118 |
| 443 | #define R_SER_USR0_ADDR 0x00000120 |
| 444 | #define R_SER_USR1_ADDR 0x00000128 |
| 445 | #define R_SER_USR2_ADDR 0x00000130 |
| 446 | #define R_SER_USR3_ADDR 0x00000138 |
| 447 | #define R_SER_CMD 0x00000140 |
| 448 | #define R_SER_TX_RD_THRSH 0x00000160 |
| 449 | #define R_SER_TX_WR_THRSH 0x00000168 |
| 450 | #define R_SER_RX_RD_THRSH 0x00000170 |
| 451 | #define R_SER_LINE_MODE 0x00000178 |
| 452 | #define R_SER_DMA_ENABLE 0x00000180 |
| 453 | #define R_SER_INT_MASK 0x00000190 |
| 454 | #define R_SER_STATUS 0x00000188 |
| 455 | #define R_SER_STATUS_DEBUG 0x000001A8 |
| 456 | #define R_SER_RX_TABLE_BASE 0x00000200 |
| 457 | #define SER_RX_TABLE_COUNT 16 |
| 458 | #define R_SER_TX_TABLE_BASE 0x00000300 |
| 459 | #define SER_TX_TABLE_COUNT 16 |
| 460 | |
| 461 | /* RMON Counters */ |
| 462 | #define R_SER_RMON_TX_BYTE_LO 0x000001C0 |
| 463 | #define R_SER_RMON_TX_BYTE_HI 0x000001C8 |
| 464 | #define R_SER_RMON_RX_BYTE_LO 0x000001D0 |
| 465 | #define R_SER_RMON_RX_BYTE_HI 0x000001D8 |
| 466 | #define R_SER_RMON_TX_UNDERRUN 0x000001E0 |
| 467 | #define R_SER_RMON_RX_OVERFLOW 0x000001E8 |
| 468 | #define R_SER_RMON_RX_ERRORS 0x000001F0 |
| 469 | #define R_SER_RMON_RX_BADADDR 0x000001F8 |
| 470 | |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 471 | #endif /* 1250/112x */ |
| 472 | |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 473 | /* ********************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 474 | * Generic Bus Registers |
| 475 | ********************************************************************* */ |
| 476 | |
| 477 | #define IO_EXT_CFG_COUNT 8 |
| 478 | |
| 479 | #define A_IO_EXT_BASE 0x0010061000 |
| 480 | #define A_IO_EXT_REG(r) (A_IO_EXT_BASE + (r)) |
| 481 | |
| 482 | #define A_IO_EXT_CFG_BASE 0x0010061000 |
| 483 | #define A_IO_EXT_MULT_SIZE_BASE 0x0010061100 |
| 484 | #define A_IO_EXT_START_ADDR_BASE 0x0010061200 |
| 485 | #define A_IO_EXT_TIME_CFG0_BASE 0x0010061600 |
| 486 | #define A_IO_EXT_TIME_CFG1_BASE 0x0010061700 |
| 487 | |
| 488 | #define IO_EXT_REGISTER_SPACING 8 |
| 489 | #define A_IO_EXT_CS_BASE(cs) (A_IO_EXT_CFG_BASE+IO_EXT_REGISTER_SPACING*(cs)) |
| 490 | #define R_IO_EXT_REG(reg,cs) ((cs)*IO_EXT_REGISTER_SPACING + (reg)) |
| 491 | |
| 492 | #define R_IO_EXT_CFG 0x0000 |
| 493 | #define R_IO_EXT_MULT_SIZE 0x0100 |
| 494 | #define R_IO_EXT_START_ADDR 0x0200 |
| 495 | #define R_IO_EXT_TIME_CFG0 0x0600 |
| 496 | #define R_IO_EXT_TIME_CFG1 0x0700 |
| 497 | |
| 498 | |
| 499 | #define A_IO_INTERRUPT_STATUS 0x0010061A00 |
| 500 | #define A_IO_INTERRUPT_DATA0 0x0010061A10 |
| 501 | #define A_IO_INTERRUPT_DATA1 0x0010061A18 |
| 502 | #define A_IO_INTERRUPT_DATA2 0x0010061A20 |
| 503 | #define A_IO_INTERRUPT_DATA3 0x0010061A28 |
| 504 | #define A_IO_INTERRUPT_ADDR0 0x0010061A30 |
| 505 | #define A_IO_INTERRUPT_ADDR1 0x0010061A40 |
| 506 | #define A_IO_INTERRUPT_PARITY 0x0010061A50 |
| 507 | #define A_IO_PCMCIA_CFG 0x0010061A60 |
| 508 | #define A_IO_PCMCIA_STATUS 0x0010061A70 |
| 509 | #define A_IO_DRIVE_0 0x0010061300 |
| 510 | #define A_IO_DRIVE_1 0x0010061308 |
| 511 | #define A_IO_DRIVE_2 0x0010061310 |
| 512 | #define A_IO_DRIVE_3 0x0010061318 |
| 513 | #define A_IO_DRIVE_BASE A_IO_DRIVE_0 |
| 514 | #define IO_DRIVE_REGISTER_SPACING 8 |
| 515 | #define R_IO_DRIVE(x) ((x)*IO_DRIVE_REGISTER_SPACING) |
| 516 | #define A_IO_DRIVE(x) (A_IO_DRIVE_BASE + R_IO_DRIVE(x)) |
| 517 | |
| 518 | #define R_IO_INTERRUPT_STATUS 0x0A00 |
| 519 | #define R_IO_INTERRUPT_DATA0 0x0A10 |
| 520 | #define R_IO_INTERRUPT_DATA1 0x0A18 |
| 521 | #define R_IO_INTERRUPT_DATA2 0x0A20 |
| 522 | #define R_IO_INTERRUPT_DATA3 0x0A28 |
| 523 | #define R_IO_INTERRUPT_ADDR0 0x0A30 |
| 524 | #define R_IO_INTERRUPT_ADDR1 0x0A40 |
| 525 | #define R_IO_INTERRUPT_PARITY 0x0A50 |
| 526 | #define R_IO_PCMCIA_CFG 0x0A60 |
| 527 | #define R_IO_PCMCIA_STATUS 0x0A70 |
| 528 | |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 529 | /* ********************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 530 | * GPIO Registers |
| 531 | ********************************************************************* */ |
| 532 | |
| 533 | #define A_GPIO_CLR_EDGE 0x0010061A80 |
| 534 | #define A_GPIO_INT_TYPE 0x0010061A88 |
| 535 | #define A_GPIO_INPUT_INVERT 0x0010061A90 |
| 536 | #define A_GPIO_GLITCH 0x0010061A98 |
| 537 | #define A_GPIO_READ 0x0010061AA0 |
| 538 | #define A_GPIO_DIRECTION 0x0010061AA8 |
| 539 | #define A_GPIO_PIN_CLR 0x0010061AB0 |
| 540 | #define A_GPIO_PIN_SET 0x0010061AB8 |
| 541 | |
| 542 | #define A_GPIO_BASE 0x0010061A80 |
| 543 | |
| 544 | #define R_GPIO_CLR_EDGE 0x00 |
| 545 | #define R_GPIO_INT_TYPE 0x08 |
| 546 | #define R_GPIO_INPUT_INVERT 0x10 |
| 547 | #define R_GPIO_GLITCH 0x18 |
| 548 | #define R_GPIO_READ 0x20 |
| 549 | #define R_GPIO_DIRECTION 0x28 |
| 550 | #define R_GPIO_PIN_CLR 0x30 |
| 551 | #define R_GPIO_PIN_SET 0x38 |
| 552 | |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 553 | /* ********************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 554 | * SMBus Registers |
| 555 | ********************************************************************* */ |
| 556 | |
| 557 | #define A_SMB_XTRA_0 0x0010060000 |
| 558 | #define A_SMB_XTRA_1 0x0010060008 |
| 559 | #define A_SMB_FREQ_0 0x0010060010 |
| 560 | #define A_SMB_FREQ_1 0x0010060018 |
| 561 | #define A_SMB_STATUS_0 0x0010060020 |
| 562 | #define A_SMB_STATUS_1 0x0010060028 |
| 563 | #define A_SMB_CMD_0 0x0010060030 |
| 564 | #define A_SMB_CMD_1 0x0010060038 |
| 565 | #define A_SMB_START_0 0x0010060040 |
| 566 | #define A_SMB_START_1 0x0010060048 |
| 567 | #define A_SMB_DATA_0 0x0010060050 |
| 568 | #define A_SMB_DATA_1 0x0010060058 |
| 569 | #define A_SMB_CONTROL_0 0x0010060060 |
| 570 | #define A_SMB_CONTROL_1 0x0010060068 |
| 571 | #define A_SMB_PEC_0 0x0010060070 |
| 572 | #define A_SMB_PEC_1 0x0010060078 |
| 573 | |
| 574 | #define A_SMB_0 0x0010060000 |
| 575 | #define A_SMB_1 0x0010060008 |
| 576 | #define SMB_REGISTER_SPACING 0x8 |
| 577 | #define A_SMB_BASE(idx) (A_SMB_0+(idx)*SMB_REGISTER_SPACING) |
| 578 | #define A_SMB_REGISTER(idx,reg) (A_SMB_BASE(idx)+(reg)) |
| 579 | |
| 580 | #define R_SMB_XTRA 0x0000000000 |
| 581 | #define R_SMB_FREQ 0x0000000010 |
| 582 | #define R_SMB_STATUS 0x0000000020 |
| 583 | #define R_SMB_CMD 0x0000000030 |
| 584 | #define R_SMB_START 0x0000000040 |
| 585 | #define R_SMB_DATA 0x0000000050 |
| 586 | #define R_SMB_CONTROL 0x0000000060 |
| 587 | #define R_SMB_PEC 0x0000000070 |
| 588 | |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 589 | /* ********************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 590 | * Timer Registers |
| 591 | ********************************************************************* */ |
| 592 | |
| 593 | /* |
| 594 | * Watchdog timers |
| 595 | */ |
| 596 | |
| 597 | #define A_SCD_WDOG_0 0x0010020050 |
| 598 | #define A_SCD_WDOG_1 0x0010020150 |
| 599 | #define SCD_WDOG_SPACING 0x100 |
| 600 | #define SCD_NUM_WDOGS 2 |
| 601 | #define A_SCD_WDOG_BASE(w) (A_SCD_WDOG_0+SCD_WDOG_SPACING*(w)) |
| 602 | #define A_SCD_WDOG_REGISTER(w,r) (A_SCD_WDOG_BASE(w) + (r)) |
| 603 | |
| 604 | #define R_SCD_WDOG_INIT 0x0000000000 |
| 605 | #define R_SCD_WDOG_CNT 0x0000000008 |
| 606 | #define R_SCD_WDOG_CFG 0x0000000010 |
| 607 | |
| 608 | #define A_SCD_WDOG_INIT_0 0x0010020050 |
| 609 | #define A_SCD_WDOG_CNT_0 0x0010020058 |
| 610 | #define A_SCD_WDOG_CFG_0 0x0010020060 |
| 611 | |
| 612 | #define A_SCD_WDOG_INIT_1 0x0010020150 |
| 613 | #define A_SCD_WDOG_CNT_1 0x0010020158 |
| 614 | #define A_SCD_WDOG_CFG_1 0x0010020160 |
| 615 | |
| 616 | /* |
| 617 | * Generic timers |
| 618 | */ |
| 619 | |
| 620 | #define A_SCD_TIMER_0 0x0010020070 |
| 621 | #define A_SCD_TIMER_1 0x0010020078 |
| 622 | #define A_SCD_TIMER_2 0x0010020170 |
| 623 | #define A_SCD_TIMER_3 0x0010020178 |
| 624 | #define SCD_NUM_TIMERS 4 |
| 625 | #define A_SCD_TIMER_BASE(w) (A_SCD_TIMER_0+0x08*((w)&1)+0x100*(((w)&2)>>1)) |
| 626 | #define A_SCD_TIMER_REGISTER(w,r) (A_SCD_TIMER_BASE(w) + (r)) |
| 627 | |
| 628 | #define R_SCD_TIMER_INIT 0x0000000000 |
| 629 | #define R_SCD_TIMER_CNT 0x0000000010 |
| 630 | #define R_SCD_TIMER_CFG 0x0000000020 |
| 631 | |
| 632 | #define A_SCD_TIMER_INIT_0 0x0010020070 |
| 633 | #define A_SCD_TIMER_CNT_0 0x0010020080 |
| 634 | #define A_SCD_TIMER_CFG_0 0x0010020090 |
| 635 | |
| 636 | #define A_SCD_TIMER_INIT_1 0x0010020078 |
| 637 | #define A_SCD_TIMER_CNT_1 0x0010020088 |
| 638 | #define A_SCD_TIMER_CFG_1 0x0010020098 |
| 639 | |
| 640 | #define A_SCD_TIMER_INIT_2 0x0010020170 |
| 641 | #define A_SCD_TIMER_CNT_2 0x0010020180 |
| 642 | #define A_SCD_TIMER_CFG_2 0x0010020190 |
| 643 | |
| 644 | #define A_SCD_TIMER_INIT_3 0x0010020178 |
| 645 | #define A_SCD_TIMER_CNT_3 0x0010020188 |
| 646 | #define A_SCD_TIMER_CFG_3 0x0010020198 |
| 647 | |
| 648 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
| 649 | #define A_SCD_SCRATCH 0x0010020C10 |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 650 | #endif /* 1250 PASS2 || 112x PASS1 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 651 | |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 652 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 653 | #define A_SCD_ZBBUS_CYCLE_COUNT 0x0010030000 |
| 654 | #define A_SCD_ZBBUS_CYCLE_CP0 0x0010020C00 |
| 655 | #define A_SCD_ZBBUS_CYCLE_CP1 0x0010020C08 |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 656 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 657 | |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 658 | /* ********************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 659 | * System Control Registers |
| 660 | ********************************************************************* */ |
| 661 | |
| 662 | #define A_SCD_SYSTEM_REVISION 0x0010020000 |
| 663 | #define A_SCD_SYSTEM_CFG 0x0010020008 |
| 664 | #define A_SCD_SYSTEM_MANUF 0x0010038000 |
| 665 | |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 666 | /* ********************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 667 | * System Address Trap Registers |
| 668 | ********************************************************************* */ |
| 669 | |
| 670 | #define A_ADDR_TRAP_INDEX 0x00100200B0 |
| 671 | #define A_ADDR_TRAP_REG 0x00100200B8 |
| 672 | #define A_ADDR_TRAP_UP_0 0x0010020400 |
| 673 | #define A_ADDR_TRAP_UP_1 0x0010020408 |
| 674 | #define A_ADDR_TRAP_UP_2 0x0010020410 |
| 675 | #define A_ADDR_TRAP_UP_3 0x0010020418 |
| 676 | #define A_ADDR_TRAP_DOWN_0 0x0010020420 |
| 677 | #define A_ADDR_TRAP_DOWN_1 0x0010020428 |
| 678 | #define A_ADDR_TRAP_DOWN_2 0x0010020430 |
| 679 | #define A_ADDR_TRAP_DOWN_3 0x0010020438 |
| 680 | #define A_ADDR_TRAP_CFG_0 0x0010020440 |
| 681 | #define A_ADDR_TRAP_CFG_1 0x0010020448 |
| 682 | #define A_ADDR_TRAP_CFG_2 0x0010020450 |
| 683 | #define A_ADDR_TRAP_CFG_3 0x0010020458 |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 684 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 685 | #define A_ADDR_TRAP_REG_DEBUG 0x0010020460 |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 686 | #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 687 | |
| 688 | |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 689 | /* ********************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 690 | * System Interrupt Mapper Registers |
| 691 | ********************************************************************* */ |
| 692 | |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 693 | #if SIBYTE_HDR_FEATURE_1250_112x |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 694 | #define A_IMR_CPU0_BASE 0x0010020000 |
| 695 | #define A_IMR_CPU1_BASE 0x0010022000 |
| 696 | #define IMR_REGISTER_SPACING 0x2000 |
| 697 | #define IMR_REGISTER_SPACING_SHIFT 13 |
| 698 | |
| 699 | #define A_IMR_MAPPER(cpu) (A_IMR_CPU0_BASE+(cpu)*IMR_REGISTER_SPACING) |
| 700 | #define A_IMR_REGISTER(cpu,reg) (A_IMR_MAPPER(cpu)+(reg)) |
| 701 | |
| 702 | #define R_IMR_INTERRUPT_DIAG 0x0010 |
| 703 | #define R_IMR_INTERRUPT_MASK 0x0028 |
| 704 | #define R_IMR_INTERRUPT_TRACE 0x0038 |
| 705 | #define R_IMR_INTERRUPT_SOURCE_STATUS 0x0040 |
| 706 | #define R_IMR_LDT_INTERRUPT_SET 0x0048 |
| 707 | #define R_IMR_LDT_INTERRUPT 0x0018 |
| 708 | #define R_IMR_LDT_INTERRUPT_CLR 0x0020 |
| 709 | #define R_IMR_MAILBOX_CPU 0x00c0 |
| 710 | #define R_IMR_ALIAS_MAILBOX_CPU 0x1000 |
| 711 | #define R_IMR_MAILBOX_SET_CPU 0x00C8 |
| 712 | #define R_IMR_ALIAS_MAILBOX_SET_CPU 0x1008 |
| 713 | #define R_IMR_MAILBOX_CLR_CPU 0x00D0 |
| 714 | #define R_IMR_INTERRUPT_STATUS_BASE 0x0100 |
| 715 | #define R_IMR_INTERRUPT_STATUS_COUNT 7 |
| 716 | #define R_IMR_INTERRUPT_MAP_BASE 0x0200 |
| 717 | #define R_IMR_INTERRUPT_MAP_COUNT 64 |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 718 | #endif /* 1250/112x */ |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 719 | |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 720 | /* ********************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 721 | * System Performance Counter Registers |
| 722 | ********************************************************************* */ |
| 723 | |
| 724 | #define A_SCD_PERF_CNT_CFG 0x00100204C0 |
| 725 | #define A_SCD_PERF_CNT_0 0x00100204D0 |
| 726 | #define A_SCD_PERF_CNT_1 0x00100204D8 |
| 727 | #define A_SCD_PERF_CNT_2 0x00100204E0 |
| 728 | #define A_SCD_PERF_CNT_3 0x00100204E8 |
| 729 | |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 730 | /* ********************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 731 | * System Bus Watcher Registers |
| 732 | ********************************************************************* */ |
| 733 | |
| 734 | #define A_SCD_BUS_ERR_STATUS 0x0010020880 |
| 735 | #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) |
| 736 | #define A_SCD_BUS_ERR_STATUS_DEBUG 0x00100208D0 |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 737 | #define A_BUS_ERR_STATUS_DEBUG 0x00100208D0 |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 738 | #endif /* 1250 PASS2 || 112x PASS1 */ |
| 739 | #define A_BUS_ERR_DATA_0 0x00100208A0 |
| 740 | #define A_BUS_ERR_DATA_1 0x00100208A8 |
| 741 | #define A_BUS_ERR_DATA_2 0x00100208B0 |
| 742 | #define A_BUS_ERR_DATA_3 0x00100208B8 |
| 743 | #define A_BUS_L2_ERRORS 0x00100208C0 |
| 744 | #define A_BUS_MEM_IO_ERRORS 0x00100208C8 |
| 745 | |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 746 | /* ********************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 747 | * System Debug Controller Registers |
| 748 | ********************************************************************* */ |
| 749 | |
| 750 | #define A_SCD_JTAG_BASE 0x0010000000 |
| 751 | |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 752 | /* ********************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 753 | * System Trace Buffer Registers |
| 754 | ********************************************************************* */ |
| 755 | |
| 756 | #define A_SCD_TRACE_CFG 0x0010020A00 |
| 757 | #define A_SCD_TRACE_READ 0x0010020A08 |
| 758 | #define A_SCD_TRACE_EVENT_0 0x0010020A20 |
| 759 | #define A_SCD_TRACE_EVENT_1 0x0010020A28 |
| 760 | #define A_SCD_TRACE_EVENT_2 0x0010020A30 |
| 761 | #define A_SCD_TRACE_EVENT_3 0x0010020A38 |
| 762 | #define A_SCD_TRACE_SEQUENCE_0 0x0010020A40 |
| 763 | #define A_SCD_TRACE_SEQUENCE_1 0x0010020A48 |
| 764 | #define A_SCD_TRACE_SEQUENCE_2 0x0010020A50 |
| 765 | #define A_SCD_TRACE_SEQUENCE_3 0x0010020A58 |
| 766 | #define A_SCD_TRACE_EVENT_4 0x0010020A60 |
| 767 | #define A_SCD_TRACE_EVENT_5 0x0010020A68 |
| 768 | #define A_SCD_TRACE_EVENT_6 0x0010020A70 |
| 769 | #define A_SCD_TRACE_EVENT_7 0x0010020A78 |
| 770 | #define A_SCD_TRACE_SEQUENCE_4 0x0010020A80 |
| 771 | #define A_SCD_TRACE_SEQUENCE_5 0x0010020A88 |
| 772 | #define A_SCD_TRACE_SEQUENCE_6 0x0010020A90 |
| 773 | #define A_SCD_TRACE_SEQUENCE_7 0x0010020A98 |
| 774 | |
Ralf Baechle | 42a3b4f | 2005-09-03 15:56:17 -0700 | [diff] [blame] | 775 | /* ********************************************************************* |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 776 | * System Generic DMA Registers |
| 777 | ********************************************************************* */ |
| 778 | |
| 779 | #define A_DM_0 0x0010020B00 |
| 780 | #define A_DM_1 0x0010020B20 |
| 781 | #define A_DM_2 0x0010020B40 |
| 782 | #define A_DM_3 0x0010020B60 |
| 783 | #define DM_REGISTER_SPACING 0x20 |
| 784 | #define DM_NUM_CHANNELS 4 |
| 785 | #define A_DM_BASE(idx) (A_DM_0 + ((idx) * DM_REGISTER_SPACING)) |
| 786 | #define A_DM_REGISTER(idx,reg) (A_DM_BASE(idx) + (reg)) |
| 787 | |
| 788 | #define R_DM_DSCR_BASE 0x0000000000 |
| 789 | #define R_DM_DSCR_COUNT 0x0000000008 |
| 790 | #define R_DM_CUR_DSCR_ADDR 0x0000000010 |
| 791 | #define R_DM_DSCR_BASE_DEBUG 0x0000000018 |
| 792 | |
| 793 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) |
| 794 | #define A_DM_PARTIAL_0 0x0010020ba0 |
| 795 | #define A_DM_PARTIAL_1 0x0010020ba8 |
| 796 | #define A_DM_PARTIAL_2 0x0010020bb0 |
| 797 | #define A_DM_PARTIAL_3 0x0010020bb8 |
| 798 | #define DM_PARTIAL_REGISTER_SPACING 0x8 |
| 799 | #define A_DM_PARTIAL(idx) (A_DM_PARTIAL_0 + ((idx) * DM_PARTIAL_REGISTER_SPACING)) |
| 800 | #endif /* 1250 PASS3 || 112x PASS1 */ |
| 801 | |
| 802 | #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) |
| 803 | #define A_DM_CRC_0 0x0010020b80 |
| 804 | #define A_DM_CRC_1 0x0010020b90 |
| 805 | #define DM_CRC_REGISTER_SPACING 0x10 |
| 806 | #define DM_CRC_NUM_CHANNELS 2 |
| 807 | #define A_DM_CRC_BASE(idx) (A_DM_CRC_0 + ((idx) * DM_CRC_REGISTER_SPACING)) |
| 808 | #define A_DM_CRC_REGISTER(idx,reg) (A_DM_CRC_BASE(idx) + (reg)) |
| 809 | |
| 810 | #define R_CRC_DEF_0 0x00 |
| 811 | #define R_CTCP_DEF_0 0x08 |
| 812 | #endif /* 1250 PASS3 || 112x PASS1 */ |
| 813 | |
| 814 | /* ********************************************************************* |
| 815 | * Physical Address Map |
| 816 | ********************************************************************* */ |
| 817 | |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 818 | #if SIBYTE_HDR_FEATURE_1250_112x |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 819 | #define A_PHYS_MEMORY_0 _SB_MAKE64(0x0000000000) |
| 820 | #define A_PHYS_MEMORY_SIZE _SB_MAKE64((256*1024*1024)) |
| 821 | #define A_PHYS_SYSTEM_CTL _SB_MAKE64(0x0010000000) |
| 822 | #define A_PHYS_IO_SYSTEM _SB_MAKE64(0x0010060000) |
| 823 | #define A_PHYS_GENBUS _SB_MAKE64(0x0010090000) |
| 824 | #define A_PHYS_GENBUS_END _SB_MAKE64(0x0040000000) |
| 825 | #define A_PHYS_LDTPCI_IO_MATCH_BYTES_32 _SB_MAKE64(0x0040000000) |
| 826 | #define A_PHYS_LDTPCI_IO_MATCH_BITS_32 _SB_MAKE64(0x0060000000) |
| 827 | #define A_PHYS_MEMORY_1 _SB_MAKE64(0x0080000000) |
| 828 | #define A_PHYS_MEMORY_2 _SB_MAKE64(0x0090000000) |
| 829 | #define A_PHYS_MEMORY_3 _SB_MAKE64(0x00C0000000) |
| 830 | #define A_PHYS_L2_CACHE_TEST _SB_MAKE64(0x00D0000000) |
| 831 | #define A_PHYS_LDT_SPECIAL_MATCH_BYTES _SB_MAKE64(0x00D8000000) |
| 832 | #define A_PHYS_LDTPCI_IO_MATCH_BYTES _SB_MAKE64(0x00DC000000) |
| 833 | #define A_PHYS_LDTPCI_CFG_MATCH_BYTES _SB_MAKE64(0x00DE000000) |
| 834 | #define A_PHYS_LDT_SPECIAL_MATCH_BITS _SB_MAKE64(0x00F8000000) |
| 835 | #define A_PHYS_LDTPCI_IO_MATCH_BITS _SB_MAKE64(0x00FC000000) |
| 836 | #define A_PHYS_LDTPCI_CFG_MATCH_BITS _SB_MAKE64(0x00FE000000) |
| 837 | #define A_PHYS_MEMORY_EXP _SB_MAKE64(0x0100000000) |
| 838 | #define A_PHYS_MEMORY_EXP_SIZE _SB_MAKE64((508*1024*1024*1024)) |
| 839 | #define A_PHYS_LDT_EXP _SB_MAKE64(0x8000000000) |
| 840 | #define A_PHYS_PCI_FULLACCESS_BYTES _SB_MAKE64(0xF000000000) |
| 841 | #define A_PHYS_PCI_FULLACCESS_BITS _SB_MAKE64(0xF100000000) |
| 842 | #define A_PHYS_RESERVED _SB_MAKE64(0xF200000000) |
| 843 | #define A_PHYS_RESERVED_SPECIAL_LDT _SB_MAKE64(0xFD00000000) |
| 844 | |
| 845 | #define A_PHYS_L2CACHE_WAY_SIZE _SB_MAKE64(0x0000020000) |
| 846 | #define PHYS_L2CACHE_NUM_WAYS 4 |
| 847 | #define A_PHYS_L2CACHE_TOTAL_SIZE _SB_MAKE64(0x0000080000) |
| 848 | #define A_PHYS_L2CACHE_WAY0 _SB_MAKE64(0x00D0180000) |
| 849 | #define A_PHYS_L2CACHE_WAY1 _SB_MAKE64(0x00D01A0000) |
| 850 | #define A_PHYS_L2CACHE_WAY2 _SB_MAKE64(0x00D01C0000) |
| 851 | #define A_PHYS_L2CACHE_WAY3 _SB_MAKE64(0x00D01E0000) |
Andrew Isaacson | 4cbf2be | 2005-10-19 23:55:11 -0700 | [diff] [blame] | 852 | #endif |
Linus Torvalds | 1da177e | 2005-04-16 15:20:36 -0700 | [diff] [blame] | 853 | |
| 854 | |
| 855 | #endif |