1*1a59d1b8SThomas Gleixner /* SPDX-License-Identifier: GPL-2.0-or-later */ 2384740dcSRalf Baechle /* ********************************************************************* 3384740dcSRalf Baechle * SB1250 Board Support Package 4384740dcSRalf Baechle * 5384740dcSRalf Baechle * Register Definitions File: sb1250_regs.h 6384740dcSRalf Baechle * 7384740dcSRalf Baechle * This module contains the addresses of the on-chip peripherals 8384740dcSRalf Baechle * on the SB1250. 9384740dcSRalf Baechle * 10384740dcSRalf Baechle * SB1250 specification level: 01/02/2002 11384740dcSRalf Baechle * 12384740dcSRalf Baechle ********************************************************************* 13384740dcSRalf Baechle * 14384740dcSRalf Baechle * Copyright 2000,2001,2002,2003 15384740dcSRalf Baechle * Broadcom Corporation. All rights reserved. 16384740dcSRalf Baechle * 17384740dcSRalf Baechle ********************************************************************* */ 18384740dcSRalf Baechle 19384740dcSRalf Baechle 20384740dcSRalf Baechle #ifndef _SB1250_REGS_H 21384740dcSRalf Baechle #define _SB1250_REGS_H 22384740dcSRalf Baechle 23a1ce3928SDavid Howells #include <asm/sibyte/sb1250_defs.h> 24384740dcSRalf Baechle 25384740dcSRalf Baechle 26384740dcSRalf Baechle /* ********************************************************************* 27384740dcSRalf Baechle * Some general notes: 28384740dcSRalf Baechle * 29384740dcSRalf Baechle * For the most part, when there is more than one peripheral 30384740dcSRalf Baechle * of the same type on the SOC, the constants below will be 31384740dcSRalf Baechle * offsets from the base of each peripheral. For example, 32384740dcSRalf Baechle * the MAC registers are described as offsets from the first 33384740dcSRalf Baechle * MAC register, and there will be a MAC_REGISTER() macro 34384740dcSRalf Baechle * to calculate the base address of a given MAC. 35384740dcSRalf Baechle * 36384740dcSRalf Baechle * The information in this file is based on the SB1250 SOC 37384740dcSRalf Baechle * manual version 0.2, July 2000. 38384740dcSRalf Baechle ********************************************************************* */ 39384740dcSRalf Baechle 40384740dcSRalf Baechle 41384740dcSRalf Baechle /* ********************************************************************* 42384740dcSRalf Baechle * Memory Controller Registers 43384740dcSRalf Baechle ********************************************************************* */ 44384740dcSRalf Baechle 45384740dcSRalf Baechle /* 46384740dcSRalf Baechle * XXX: can't remove MC base 0 if 112x, since it's used by other macros, 47384740dcSRalf Baechle * since there is one reg there (but it could get its addr/offset constant). 48384740dcSRalf Baechle */ 49384740dcSRalf Baechle 50384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE_1250_112x /* This MC only on 1250 & 112x */ 51384740dcSRalf Baechle #define A_MC_BASE_0 0x0010051000 52384740dcSRalf Baechle #define A_MC_BASE_1 0x0010052000 53384740dcSRalf Baechle #define MC_REGISTER_SPACING 0x1000 54384740dcSRalf Baechle 55384740dcSRalf Baechle #define A_MC_BASE(ctlid) ((ctlid)*MC_REGISTER_SPACING+A_MC_BASE_0) 56384740dcSRalf Baechle #define A_MC_REGISTER(ctlid, reg) (A_MC_BASE(ctlid)+(reg)) 57384740dcSRalf Baechle 58384740dcSRalf Baechle #define R_MC_CONFIG 0x0000000100 59384740dcSRalf Baechle #define R_MC_DRAMCMD 0x0000000120 60384740dcSRalf Baechle #define R_MC_DRAMMODE 0x0000000140 61384740dcSRalf Baechle #define R_MC_TIMING1 0x0000000160 62384740dcSRalf Baechle #define R_MC_TIMING2 0x0000000180 63384740dcSRalf Baechle #define R_MC_CS_START 0x00000001A0 64384740dcSRalf Baechle #define R_MC_CS_END 0x00000001C0 65384740dcSRalf Baechle #define R_MC_CS_INTERLEAVE 0x00000001E0 66384740dcSRalf Baechle #define S_MC_CS_STARTEND 16 67384740dcSRalf Baechle 68384740dcSRalf Baechle #define R_MC_CSX_BASE 0x0000000200 69384740dcSRalf Baechle #define R_MC_CSX_ROW 0x0000000000 /* relative to CSX_BASE, above */ 70384740dcSRalf Baechle #define R_MC_CSX_COL 0x0000000020 /* relative to CSX_BASE, above */ 71384740dcSRalf Baechle #define R_MC_CSX_BA 0x0000000040 /* relative to CSX_BASE, above */ 72384740dcSRalf Baechle #define MC_CSX_SPACING 0x0000000060 /* relative to CSX_BASE, above */ 73384740dcSRalf Baechle 74384740dcSRalf Baechle #define R_MC_CS0_ROW 0x0000000200 75384740dcSRalf Baechle #define R_MC_CS0_COL 0x0000000220 76384740dcSRalf Baechle #define R_MC_CS0_BA 0x0000000240 77384740dcSRalf Baechle #define R_MC_CS1_ROW 0x0000000260 78384740dcSRalf Baechle #define R_MC_CS1_COL 0x0000000280 79384740dcSRalf Baechle #define R_MC_CS1_BA 0x00000002A0 80384740dcSRalf Baechle #define R_MC_CS2_ROW 0x00000002C0 81384740dcSRalf Baechle #define R_MC_CS2_COL 0x00000002E0 82384740dcSRalf Baechle #define R_MC_CS2_BA 0x0000000300 83384740dcSRalf Baechle #define R_MC_CS3_ROW 0x0000000320 84384740dcSRalf Baechle #define R_MC_CS3_COL 0x0000000340 85384740dcSRalf Baechle #define R_MC_CS3_BA 0x0000000360 86384740dcSRalf Baechle #define R_MC_CS_ATTR 0x0000000380 87384740dcSRalf Baechle #define R_MC_TEST_DATA 0x0000000400 88384740dcSRalf Baechle #define R_MC_TEST_ECC 0x0000000420 89384740dcSRalf Baechle #define R_MC_MCLK_CFG 0x0000000500 90384740dcSRalf Baechle 91384740dcSRalf Baechle #endif /* 1250 & 112x */ 92384740dcSRalf Baechle 93384740dcSRalf Baechle /* ********************************************************************* 94384740dcSRalf Baechle * L2 Cache Control Registers 95384740dcSRalf Baechle ********************************************************************* */ 96384740dcSRalf Baechle 97384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE_1250_112x /* This L2C only on 1250/112x */ 98384740dcSRalf Baechle 99384740dcSRalf Baechle #define A_L2_READ_TAG 0x0010040018 100384740dcSRalf Baechle #define A_L2_ECC_TAG 0x0010040038 101384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) 102384740dcSRalf Baechle #define A_L2_READ_MISC 0x0010040058 103384740dcSRalf Baechle #endif /* 1250 PASS3 || 112x PASS1 */ 104384740dcSRalf Baechle #define A_L2_WAY_DISABLE 0x0010041000 105384740dcSRalf Baechle #define A_L2_MAKEDISABLE(x) (A_L2_WAY_DISABLE | (((~(x))&0x0F) << 8)) 106384740dcSRalf Baechle #define A_L2_MGMT_TAG_BASE 0x00D0000000 107384740dcSRalf Baechle 108384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) 109384740dcSRalf Baechle #define A_L2_CACHE_DISABLE 0x0010042000 110384740dcSRalf Baechle #define A_L2_MAKECACHEDISABLE(x) (A_L2_CACHE_DISABLE | (((x)&0x0F) << 8)) 111384740dcSRalf Baechle #define A_L2_MISC_CONFIG 0x0010043000 112384740dcSRalf Baechle #endif /* 1250 PASS2 || 112x PASS1 */ 113384740dcSRalf Baechle 114384740dcSRalf Baechle /* Backward-compatibility definitions. */ 115384740dcSRalf Baechle /* XXX: discourage people from using these constants. */ 116384740dcSRalf Baechle #define A_L2_READ_ADDRESS A_L2_READ_TAG 117384740dcSRalf Baechle #define A_L2_EEC_ADDRESS A_L2_ECC_TAG 118384740dcSRalf Baechle 119384740dcSRalf Baechle #endif 120384740dcSRalf Baechle 121384740dcSRalf Baechle 122384740dcSRalf Baechle /* ********************************************************************* 123384740dcSRalf Baechle * PCI Interface Registers 124384740dcSRalf Baechle ********************************************************************* */ 125384740dcSRalf Baechle 126384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE_1250_112x /* This PCI/HT only on 1250/112x */ 127384740dcSRalf Baechle #define A_PCI_TYPE00_HEADER 0x00DE000000 128384740dcSRalf Baechle #define A_PCI_TYPE01_HEADER 0x00DE000800 129384740dcSRalf Baechle #endif 130384740dcSRalf Baechle 131384740dcSRalf Baechle 132384740dcSRalf Baechle /* ********************************************************************* 133384740dcSRalf Baechle * Ethernet DMA and MACs 134384740dcSRalf Baechle ********************************************************************* */ 135384740dcSRalf Baechle 136384740dcSRalf Baechle #define A_MAC_BASE_0 0x0010064000 137384740dcSRalf Baechle #define A_MAC_BASE_1 0x0010065000 138384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE_CHIP(1250) 139384740dcSRalf Baechle #define A_MAC_BASE_2 0x0010066000 140384740dcSRalf Baechle #endif /* 1250 */ 141384740dcSRalf Baechle 142384740dcSRalf Baechle #define MAC_SPACING 0x1000 143384740dcSRalf Baechle #define MAC_DMA_TXRX_SPACING 0x0400 144384740dcSRalf Baechle #define MAC_DMA_CHANNEL_SPACING 0x0100 145384740dcSRalf Baechle #define DMA_RX 0 146384740dcSRalf Baechle #define DMA_TX 1 147384740dcSRalf Baechle #define MAC_NUM_DMACHAN 2 /* channels per direction */ 148384740dcSRalf Baechle 149384740dcSRalf Baechle /* XXX: not correct; depends on SOC type. */ 150384740dcSRalf Baechle #define MAC_NUM_PORTS 3 151384740dcSRalf Baechle 152384740dcSRalf Baechle #define A_MAC_CHANNEL_BASE(macnum) \ 153384740dcSRalf Baechle (A_MAC_BASE_0 + \ 154384740dcSRalf Baechle MAC_SPACING*(macnum)) 155384740dcSRalf Baechle 156384740dcSRalf Baechle #define A_MAC_REGISTER(macnum,reg) \ 157384740dcSRalf Baechle (A_MAC_BASE_0 + \ 158384740dcSRalf Baechle MAC_SPACING*(macnum) + (reg)) 159384740dcSRalf Baechle 160384740dcSRalf Baechle 161384740dcSRalf Baechle #define R_MAC_DMA_CHANNELS 0x800 /* Relative to A_MAC_CHANNEL_BASE */ 162384740dcSRalf Baechle 163384740dcSRalf Baechle #define A_MAC_DMA_CHANNEL_BASE(macnum, txrx, chan) \ 164384740dcSRalf Baechle ((A_MAC_CHANNEL_BASE(macnum)) + \ 165384740dcSRalf Baechle R_MAC_DMA_CHANNELS + \ 166384740dcSRalf Baechle (MAC_DMA_TXRX_SPACING*(txrx)) + \ 167384740dcSRalf Baechle (MAC_DMA_CHANNEL_SPACING*(chan))) 168384740dcSRalf Baechle 169384740dcSRalf Baechle #define R_MAC_DMA_CHANNEL_BASE(txrx, chan) \ 170384740dcSRalf Baechle (R_MAC_DMA_CHANNELS + \ 171384740dcSRalf Baechle (MAC_DMA_TXRX_SPACING*(txrx)) + \ 172384740dcSRalf Baechle (MAC_DMA_CHANNEL_SPACING*(chan))) 173384740dcSRalf Baechle 174384740dcSRalf Baechle #define A_MAC_DMA_REGISTER(macnum, txrx, chan, reg) \ 175384740dcSRalf Baechle (A_MAC_DMA_CHANNEL_BASE(macnum, txrx, chan) + \ 176384740dcSRalf Baechle (reg)) 177384740dcSRalf Baechle 178384740dcSRalf Baechle #define R_MAC_DMA_REGISTER(txrx, chan, reg) \ 179384740dcSRalf Baechle (R_MAC_DMA_CHANNEL_BASE(txrx, chan) + \ 180384740dcSRalf Baechle (reg)) 181384740dcSRalf Baechle 182384740dcSRalf Baechle /* 183384740dcSRalf Baechle * DMA channel registers, relative to A_MAC_DMA_CHANNEL_BASE 184384740dcSRalf Baechle */ 185384740dcSRalf Baechle 186384740dcSRalf Baechle #define R_MAC_DMA_CONFIG0 0x00000000 187384740dcSRalf Baechle #define R_MAC_DMA_CONFIG1 0x00000008 188384740dcSRalf Baechle #define R_MAC_DMA_DSCR_BASE 0x00000010 189384740dcSRalf Baechle #define R_MAC_DMA_DSCR_CNT 0x00000018 190384740dcSRalf Baechle #define R_MAC_DMA_CUR_DSCRA 0x00000020 191384740dcSRalf Baechle #define R_MAC_DMA_CUR_DSCRB 0x00000028 192384740dcSRalf Baechle #define R_MAC_DMA_CUR_DSCRADDR 0x00000030 193384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) 194384740dcSRalf Baechle #define R_MAC_DMA_OODPKTLOST_RX 0x00000038 /* rx only */ 195384740dcSRalf Baechle #endif /* 1250 PASS3 || 112x PASS1 */ 196384740dcSRalf Baechle 197384740dcSRalf Baechle /* 198384740dcSRalf Baechle * RMON Counters 199384740dcSRalf Baechle */ 200384740dcSRalf Baechle 201384740dcSRalf Baechle #define R_MAC_RMON_TX_BYTES 0x00000000 202384740dcSRalf Baechle #define R_MAC_RMON_COLLISIONS 0x00000008 203384740dcSRalf Baechle #define R_MAC_RMON_LATE_COL 0x00000010 204384740dcSRalf Baechle #define R_MAC_RMON_EX_COL 0x00000018 205384740dcSRalf Baechle #define R_MAC_RMON_FCS_ERROR 0x00000020 206384740dcSRalf Baechle #define R_MAC_RMON_TX_ABORT 0x00000028 207384740dcSRalf Baechle /* Counter #6 (0x30) now reserved */ 208384740dcSRalf Baechle #define R_MAC_RMON_TX_BAD 0x00000038 209384740dcSRalf Baechle #define R_MAC_RMON_TX_GOOD 0x00000040 210384740dcSRalf Baechle #define R_MAC_RMON_TX_RUNT 0x00000048 211384740dcSRalf Baechle #define R_MAC_RMON_TX_OVERSIZE 0x00000050 212384740dcSRalf Baechle #define R_MAC_RMON_RX_BYTES 0x00000080 213384740dcSRalf Baechle #define R_MAC_RMON_RX_MCAST 0x00000088 214384740dcSRalf Baechle #define R_MAC_RMON_RX_BCAST 0x00000090 215384740dcSRalf Baechle #define R_MAC_RMON_RX_BAD 0x00000098 216384740dcSRalf Baechle #define R_MAC_RMON_RX_GOOD 0x000000A0 217384740dcSRalf Baechle #define R_MAC_RMON_RX_RUNT 0x000000A8 218384740dcSRalf Baechle #define R_MAC_RMON_RX_OVERSIZE 0x000000B0 219384740dcSRalf Baechle #define R_MAC_RMON_RX_FCS_ERROR 0x000000B8 220384740dcSRalf Baechle #define R_MAC_RMON_RX_LENGTH_ERROR 0x000000C0 221384740dcSRalf Baechle #define R_MAC_RMON_RX_CODE_ERROR 0x000000C8 222384740dcSRalf Baechle #define R_MAC_RMON_RX_ALIGN_ERROR 0x000000D0 223384740dcSRalf Baechle 224384740dcSRalf Baechle /* Updated to spec 0.2 */ 225384740dcSRalf Baechle #define R_MAC_CFG 0x00000100 226384740dcSRalf Baechle #define R_MAC_THRSH_CFG 0x00000108 227384740dcSRalf Baechle #define R_MAC_VLANTAG 0x00000110 228384740dcSRalf Baechle #define R_MAC_FRAMECFG 0x00000118 229384740dcSRalf Baechle #define R_MAC_EOPCNT 0x00000120 230384740dcSRalf Baechle #define R_MAC_FIFO_PTRS 0x00000128 231384740dcSRalf Baechle #define R_MAC_ADFILTER_CFG 0x00000200 232384740dcSRalf Baechle #define R_MAC_ETHERNET_ADDR 0x00000208 233384740dcSRalf Baechle #define R_MAC_PKT_TYPE 0x00000210 234384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) 235384740dcSRalf Baechle #define R_MAC_ADMASK0 0x00000218 236384740dcSRalf Baechle #define R_MAC_ADMASK1 0x00000220 237384740dcSRalf Baechle #endif /* 1250 PASS3 || 112x PASS1 || 1480 */ 238384740dcSRalf Baechle #define R_MAC_HASH_BASE 0x00000240 239384740dcSRalf Baechle #define R_MAC_ADDR_BASE 0x00000280 240384740dcSRalf Baechle #define R_MAC_CHLO0_BASE 0x00000300 241384740dcSRalf Baechle #define R_MAC_CHUP0_BASE 0x00000320 242384740dcSRalf Baechle #define R_MAC_ENABLE 0x00000400 243384740dcSRalf Baechle #define R_MAC_STATUS 0x00000408 244384740dcSRalf Baechle #define R_MAC_INT_MASK 0x00000410 245384740dcSRalf Baechle #define R_MAC_TXD_CTL 0x00000420 246384740dcSRalf Baechle #define R_MAC_MDIO 0x00000428 247384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) 248384740dcSRalf Baechle #define R_MAC_STATUS1 0x00000430 249384740dcSRalf Baechle #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ 250384740dcSRalf Baechle #define R_MAC_DEBUG_STATUS 0x00000448 251384740dcSRalf Baechle 252384740dcSRalf Baechle #define MAC_HASH_COUNT 8 253384740dcSRalf Baechle #define MAC_ADDR_COUNT 8 254384740dcSRalf Baechle #define MAC_CHMAP_COUNT 4 255384740dcSRalf Baechle 256384740dcSRalf Baechle 257384740dcSRalf Baechle /* ********************************************************************* 258384740dcSRalf Baechle * DUART Registers 259384740dcSRalf Baechle ********************************************************************* */ 260384740dcSRalf Baechle 261384740dcSRalf Baechle 262384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE_1250_112x /* This MC only on 1250 & 112x */ 263384740dcSRalf Baechle #define R_DUART_NUM_PORTS 2 264384740dcSRalf Baechle 265384740dcSRalf Baechle #define A_DUART 0x0010060000 266384740dcSRalf Baechle 267384740dcSRalf Baechle #define DUART_CHANREG_SPACING 0x100 268384740dcSRalf Baechle 269384740dcSRalf Baechle #define A_DUART_CHANREG(chan, reg) \ 270384740dcSRalf Baechle (A_DUART + DUART_CHANREG_SPACING * ((chan) + 1) + (reg)) 271384740dcSRalf Baechle #endif /* 1250 & 112x */ 272384740dcSRalf Baechle 273384740dcSRalf Baechle #define R_DUART_MODE_REG_1 0x000 274384740dcSRalf Baechle #define R_DUART_MODE_REG_2 0x010 275384740dcSRalf Baechle #define R_DUART_STATUS 0x020 276384740dcSRalf Baechle #define R_DUART_CLK_SEL 0x030 277384740dcSRalf Baechle #define R_DUART_CMD 0x050 278384740dcSRalf Baechle #define R_DUART_RX_HOLD 0x060 279384740dcSRalf Baechle #define R_DUART_TX_HOLD 0x070 280384740dcSRalf Baechle 281384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) 282384740dcSRalf Baechle #define R_DUART_FULL_CTL 0x040 283384740dcSRalf Baechle #define R_DUART_OPCR_X 0x080 284384740dcSRalf Baechle #define R_DUART_AUXCTL_X 0x090 285384740dcSRalf Baechle #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ 286384740dcSRalf Baechle 287384740dcSRalf Baechle 288384740dcSRalf Baechle /* 289384740dcSRalf Baechle * The IMR and ISR can't be addressed with A_DUART_CHANREG, 290384740dcSRalf Baechle * so use these macros instead. 291384740dcSRalf Baechle */ 292384740dcSRalf Baechle 293384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE_1250_112x /* This MC only on 1250 & 112x */ 294384740dcSRalf Baechle #define DUART_IMRISR_SPACING 0x20 295384740dcSRalf Baechle #define DUART_INCHNG_SPACING 0x10 296384740dcSRalf Baechle 297384740dcSRalf Baechle #define A_DUART_CTRLREG(reg) \ 298384740dcSRalf Baechle (A_DUART + DUART_CHANREG_SPACING * 3 + (reg)) 299384740dcSRalf Baechle 300384740dcSRalf Baechle #define R_DUART_IMRREG(chan) \ 301384740dcSRalf Baechle (R_DUART_IMR_A + (chan) * DUART_IMRISR_SPACING) 302384740dcSRalf Baechle #define R_DUART_ISRREG(chan) \ 303384740dcSRalf Baechle (R_DUART_ISR_A + (chan) * DUART_IMRISR_SPACING) 304384740dcSRalf Baechle #define R_DUART_INCHREG(chan) \ 305384740dcSRalf Baechle (R_DUART_IN_CHNG_A + (chan) * DUART_INCHNG_SPACING) 306384740dcSRalf Baechle 307384740dcSRalf Baechle #define A_DUART_IMRREG(chan) A_DUART_CTRLREG(R_DUART_IMRREG(chan)) 308384740dcSRalf Baechle #define A_DUART_ISRREG(chan) A_DUART_CTRLREG(R_DUART_ISRREG(chan)) 309384740dcSRalf Baechle #define A_DUART_INCHREG(chan) A_DUART_CTRLREG(R_DUART_INCHREG(chan)) 310384740dcSRalf Baechle #endif /* 1250 & 112x */ 311384740dcSRalf Baechle 312384740dcSRalf Baechle #define R_DUART_AUX_CTRL 0x010 313384740dcSRalf Baechle #define R_DUART_ISR_A 0x020 314384740dcSRalf Baechle #define R_DUART_IMR_A 0x030 315384740dcSRalf Baechle #define R_DUART_ISR_B 0x040 316384740dcSRalf Baechle #define R_DUART_IMR_B 0x050 317384740dcSRalf Baechle #define R_DUART_OUT_PORT 0x060 318384740dcSRalf Baechle #define R_DUART_OPCR 0x070 319384740dcSRalf Baechle #define R_DUART_IN_PORT 0x080 320384740dcSRalf Baechle 321384740dcSRalf Baechle #define R_DUART_SET_OPR 0x0B0 322384740dcSRalf Baechle #define R_DUART_CLEAR_OPR 0x0C0 323384740dcSRalf Baechle #define R_DUART_IN_CHNG_A 0x0D0 324384740dcSRalf Baechle #define R_DUART_IN_CHNG_B 0x0E0 325384740dcSRalf Baechle 326384740dcSRalf Baechle 327384740dcSRalf Baechle /* 328384740dcSRalf Baechle * These constants are the absolute addresses. 329384740dcSRalf Baechle */ 330384740dcSRalf Baechle 331384740dcSRalf Baechle #define A_DUART_MODE_REG_1_A 0x0010060100 332384740dcSRalf Baechle #define A_DUART_MODE_REG_2_A 0x0010060110 333384740dcSRalf Baechle #define A_DUART_STATUS_A 0x0010060120 334384740dcSRalf Baechle #define A_DUART_CLK_SEL_A 0x0010060130 335384740dcSRalf Baechle #define A_DUART_CMD_A 0x0010060150 336384740dcSRalf Baechle #define A_DUART_RX_HOLD_A 0x0010060160 337384740dcSRalf Baechle #define A_DUART_TX_HOLD_A 0x0010060170 338384740dcSRalf Baechle 339384740dcSRalf Baechle #define A_DUART_MODE_REG_1_B 0x0010060200 340384740dcSRalf Baechle #define A_DUART_MODE_REG_2_B 0x0010060210 341384740dcSRalf Baechle #define A_DUART_STATUS_B 0x0010060220 342384740dcSRalf Baechle #define A_DUART_CLK_SEL_B 0x0010060230 343384740dcSRalf Baechle #define A_DUART_CMD_B 0x0010060250 344384740dcSRalf Baechle #define A_DUART_RX_HOLD_B 0x0010060260 345384740dcSRalf Baechle #define A_DUART_TX_HOLD_B 0x0010060270 346384740dcSRalf Baechle 347384740dcSRalf Baechle #define A_DUART_INPORT_CHNG 0x0010060300 348384740dcSRalf Baechle #define A_DUART_AUX_CTRL 0x0010060310 349384740dcSRalf Baechle #define A_DUART_ISR_A 0x0010060320 350384740dcSRalf Baechle #define A_DUART_IMR_A 0x0010060330 351384740dcSRalf Baechle #define A_DUART_ISR_B 0x0010060340 352384740dcSRalf Baechle #define A_DUART_IMR_B 0x0010060350 353384740dcSRalf Baechle #define A_DUART_OUT_PORT 0x0010060360 354384740dcSRalf Baechle #define A_DUART_OPCR 0x0010060370 355384740dcSRalf Baechle #define A_DUART_IN_PORT 0x0010060380 356384740dcSRalf Baechle #define A_DUART_ISR 0x0010060390 357384740dcSRalf Baechle #define A_DUART_IMR 0x00100603A0 358384740dcSRalf Baechle #define A_DUART_SET_OPR 0x00100603B0 359384740dcSRalf Baechle #define A_DUART_CLEAR_OPR 0x00100603C0 360384740dcSRalf Baechle #define A_DUART_INPORT_CHNG_A 0x00100603D0 361384740dcSRalf Baechle #define A_DUART_INPORT_CHNG_B 0x00100603E0 362384740dcSRalf Baechle 363384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) 364384740dcSRalf Baechle #define A_DUART_FULL_CTL_A 0x0010060140 365384740dcSRalf Baechle #define A_DUART_FULL_CTL_B 0x0010060240 366384740dcSRalf Baechle 367384740dcSRalf Baechle #define A_DUART_OPCR_A 0x0010060180 368384740dcSRalf Baechle #define A_DUART_OPCR_B 0x0010060280 369384740dcSRalf Baechle 370384740dcSRalf Baechle #define A_DUART_INPORT_CHNG_DEBUG 0x00100603F0 371384740dcSRalf Baechle #endif /* 1250 PASS2 || 112x PASS1 */ 372384740dcSRalf Baechle 373384740dcSRalf Baechle 374384740dcSRalf Baechle /* ********************************************************************* 375384740dcSRalf Baechle * Synchronous Serial Registers 376384740dcSRalf Baechle ********************************************************************* */ 377384740dcSRalf Baechle 378384740dcSRalf Baechle 379384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE_1250_112x /* sync serial only on 1250/112x */ 380384740dcSRalf Baechle 381384740dcSRalf Baechle #define A_SER_BASE_0 0x0010060400 382384740dcSRalf Baechle #define A_SER_BASE_1 0x0010060800 383384740dcSRalf Baechle #define SER_SPACING 0x400 384384740dcSRalf Baechle 385384740dcSRalf Baechle #define SER_DMA_TXRX_SPACING 0x80 386384740dcSRalf Baechle 387384740dcSRalf Baechle #define SER_NUM_PORTS 2 388384740dcSRalf Baechle 389384740dcSRalf Baechle #define A_SER_CHANNEL_BASE(sernum) \ 390384740dcSRalf Baechle (A_SER_BASE_0 + \ 391384740dcSRalf Baechle SER_SPACING*(sernum)) 392384740dcSRalf Baechle 393384740dcSRalf Baechle #define A_SER_REGISTER(sernum,reg) \ 394384740dcSRalf Baechle (A_SER_BASE_0 + \ 395384740dcSRalf Baechle SER_SPACING*(sernum) + (reg)) 396384740dcSRalf Baechle 397384740dcSRalf Baechle 398384740dcSRalf Baechle #define R_SER_DMA_CHANNELS 0 /* Relative to A_SER_BASE_x */ 399384740dcSRalf Baechle 400384740dcSRalf Baechle #define A_SER_DMA_CHANNEL_BASE(sernum,txrx) \ 401384740dcSRalf Baechle ((A_SER_CHANNEL_BASE(sernum)) + \ 402384740dcSRalf Baechle R_SER_DMA_CHANNELS + \ 403384740dcSRalf Baechle (SER_DMA_TXRX_SPACING*(txrx))) 404384740dcSRalf Baechle 405384740dcSRalf Baechle #define A_SER_DMA_REGISTER(sernum, txrx, reg) \ 406384740dcSRalf Baechle (A_SER_DMA_CHANNEL_BASE(sernum, txrx) + \ 407384740dcSRalf Baechle (reg)) 408384740dcSRalf Baechle 409384740dcSRalf Baechle 410384740dcSRalf Baechle /* 411384740dcSRalf Baechle * DMA channel registers, relative to A_SER_DMA_CHANNEL_BASE 412384740dcSRalf Baechle */ 413384740dcSRalf Baechle 414384740dcSRalf Baechle #define R_SER_DMA_CONFIG0 0x00000000 415384740dcSRalf Baechle #define R_SER_DMA_CONFIG1 0x00000008 416384740dcSRalf Baechle #define R_SER_DMA_DSCR_BASE 0x00000010 417384740dcSRalf Baechle #define R_SER_DMA_DSCR_CNT 0x00000018 418384740dcSRalf Baechle #define R_SER_DMA_CUR_DSCRA 0x00000020 419384740dcSRalf Baechle #define R_SER_DMA_CUR_DSCRB 0x00000028 420384740dcSRalf Baechle #define R_SER_DMA_CUR_DSCRADDR 0x00000030 421384740dcSRalf Baechle 422384740dcSRalf Baechle #define R_SER_DMA_CONFIG0_RX 0x00000000 423384740dcSRalf Baechle #define R_SER_DMA_CONFIG1_RX 0x00000008 424384740dcSRalf Baechle #define R_SER_DMA_DSCR_BASE_RX 0x00000010 425384740dcSRalf Baechle #define R_SER_DMA_DSCR_COUNT_RX 0x00000018 426384740dcSRalf Baechle #define R_SER_DMA_CUR_DSCR_A_RX 0x00000020 427384740dcSRalf Baechle #define R_SER_DMA_CUR_DSCR_B_RX 0x00000028 428384740dcSRalf Baechle #define R_SER_DMA_CUR_DSCR_ADDR_RX 0x00000030 429384740dcSRalf Baechle 430384740dcSRalf Baechle #define R_SER_DMA_CONFIG0_TX 0x00000080 431384740dcSRalf Baechle #define R_SER_DMA_CONFIG1_TX 0x00000088 432384740dcSRalf Baechle #define R_SER_DMA_DSCR_BASE_TX 0x00000090 433384740dcSRalf Baechle #define R_SER_DMA_DSCR_COUNT_TX 0x00000098 434384740dcSRalf Baechle #define R_SER_DMA_CUR_DSCR_A_TX 0x000000A0 435384740dcSRalf Baechle #define R_SER_DMA_CUR_DSCR_B_TX 0x000000A8 436384740dcSRalf Baechle #define R_SER_DMA_CUR_DSCR_ADDR_TX 0x000000B0 437384740dcSRalf Baechle 438384740dcSRalf Baechle #define R_SER_MODE 0x00000100 439384740dcSRalf Baechle #define R_SER_MINFRM_SZ 0x00000108 440384740dcSRalf Baechle #define R_SER_MAXFRM_SZ 0x00000110 441384740dcSRalf Baechle #define R_SER_ADDR 0x00000118 442384740dcSRalf Baechle #define R_SER_USR0_ADDR 0x00000120 443384740dcSRalf Baechle #define R_SER_USR1_ADDR 0x00000128 444384740dcSRalf Baechle #define R_SER_USR2_ADDR 0x00000130 445384740dcSRalf Baechle #define R_SER_USR3_ADDR 0x00000138 446384740dcSRalf Baechle #define R_SER_CMD 0x00000140 447384740dcSRalf Baechle #define R_SER_TX_RD_THRSH 0x00000160 448384740dcSRalf Baechle #define R_SER_TX_WR_THRSH 0x00000168 449384740dcSRalf Baechle #define R_SER_RX_RD_THRSH 0x00000170 450384740dcSRalf Baechle #define R_SER_LINE_MODE 0x00000178 451384740dcSRalf Baechle #define R_SER_DMA_ENABLE 0x00000180 452384740dcSRalf Baechle #define R_SER_INT_MASK 0x00000190 453384740dcSRalf Baechle #define R_SER_STATUS 0x00000188 454384740dcSRalf Baechle #define R_SER_STATUS_DEBUG 0x000001A8 455384740dcSRalf Baechle #define R_SER_RX_TABLE_BASE 0x00000200 456384740dcSRalf Baechle #define SER_RX_TABLE_COUNT 16 457384740dcSRalf Baechle #define R_SER_TX_TABLE_BASE 0x00000300 458384740dcSRalf Baechle #define SER_TX_TABLE_COUNT 16 459384740dcSRalf Baechle 460384740dcSRalf Baechle /* RMON Counters */ 461384740dcSRalf Baechle #define R_SER_RMON_TX_BYTE_LO 0x000001C0 462384740dcSRalf Baechle #define R_SER_RMON_TX_BYTE_HI 0x000001C8 463384740dcSRalf Baechle #define R_SER_RMON_RX_BYTE_LO 0x000001D0 464384740dcSRalf Baechle #define R_SER_RMON_RX_BYTE_HI 0x000001D8 465384740dcSRalf Baechle #define R_SER_RMON_TX_UNDERRUN 0x000001E0 466384740dcSRalf Baechle #define R_SER_RMON_RX_OVERFLOW 0x000001E8 467384740dcSRalf Baechle #define R_SER_RMON_RX_ERRORS 0x000001F0 468384740dcSRalf Baechle #define R_SER_RMON_RX_BADADDR 0x000001F8 469384740dcSRalf Baechle 470384740dcSRalf Baechle #endif /* 1250/112x */ 471384740dcSRalf Baechle 472384740dcSRalf Baechle /* ********************************************************************* 473384740dcSRalf Baechle * Generic Bus Registers 474384740dcSRalf Baechle ********************************************************************* */ 475384740dcSRalf Baechle 476384740dcSRalf Baechle #define IO_EXT_CFG_COUNT 8 477384740dcSRalf Baechle 478384740dcSRalf Baechle #define A_IO_EXT_BASE 0x0010061000 479384740dcSRalf Baechle #define A_IO_EXT_REG(r) (A_IO_EXT_BASE + (r)) 480384740dcSRalf Baechle 481384740dcSRalf Baechle #define A_IO_EXT_CFG_BASE 0x0010061000 482384740dcSRalf Baechle #define A_IO_EXT_MULT_SIZE_BASE 0x0010061100 483384740dcSRalf Baechle #define A_IO_EXT_START_ADDR_BASE 0x0010061200 484384740dcSRalf Baechle #define A_IO_EXT_TIME_CFG0_BASE 0x0010061600 485384740dcSRalf Baechle #define A_IO_EXT_TIME_CFG1_BASE 0x0010061700 486384740dcSRalf Baechle 487384740dcSRalf Baechle #define IO_EXT_REGISTER_SPACING 8 488384740dcSRalf Baechle #define A_IO_EXT_CS_BASE(cs) (A_IO_EXT_CFG_BASE+IO_EXT_REGISTER_SPACING*(cs)) 489384740dcSRalf Baechle #define R_IO_EXT_REG(reg, cs) ((cs)*IO_EXT_REGISTER_SPACING + (reg)) 490384740dcSRalf Baechle 491384740dcSRalf Baechle #define R_IO_EXT_CFG 0x0000 492384740dcSRalf Baechle #define R_IO_EXT_MULT_SIZE 0x0100 493384740dcSRalf Baechle #define R_IO_EXT_START_ADDR 0x0200 494384740dcSRalf Baechle #define R_IO_EXT_TIME_CFG0 0x0600 495384740dcSRalf Baechle #define R_IO_EXT_TIME_CFG1 0x0700 496384740dcSRalf Baechle 497384740dcSRalf Baechle 498384740dcSRalf Baechle #define A_IO_INTERRUPT_STATUS 0x0010061A00 499384740dcSRalf Baechle #define A_IO_INTERRUPT_DATA0 0x0010061A10 500384740dcSRalf Baechle #define A_IO_INTERRUPT_DATA1 0x0010061A18 501384740dcSRalf Baechle #define A_IO_INTERRUPT_DATA2 0x0010061A20 502384740dcSRalf Baechle #define A_IO_INTERRUPT_DATA3 0x0010061A28 503384740dcSRalf Baechle #define A_IO_INTERRUPT_ADDR0 0x0010061A30 504384740dcSRalf Baechle #define A_IO_INTERRUPT_ADDR1 0x0010061A40 505384740dcSRalf Baechle #define A_IO_INTERRUPT_PARITY 0x0010061A50 506384740dcSRalf Baechle #define A_IO_PCMCIA_CFG 0x0010061A60 507384740dcSRalf Baechle #define A_IO_PCMCIA_STATUS 0x0010061A70 508384740dcSRalf Baechle #define A_IO_DRIVE_0 0x0010061300 509384740dcSRalf Baechle #define A_IO_DRIVE_1 0x0010061308 510384740dcSRalf Baechle #define A_IO_DRIVE_2 0x0010061310 511384740dcSRalf Baechle #define A_IO_DRIVE_3 0x0010061318 512384740dcSRalf Baechle #define A_IO_DRIVE_BASE A_IO_DRIVE_0 513384740dcSRalf Baechle #define IO_DRIVE_REGISTER_SPACING 8 514384740dcSRalf Baechle #define R_IO_DRIVE(x) ((x)*IO_DRIVE_REGISTER_SPACING) 515384740dcSRalf Baechle #define A_IO_DRIVE(x) (A_IO_DRIVE_BASE + R_IO_DRIVE(x)) 516384740dcSRalf Baechle 517384740dcSRalf Baechle #define R_IO_INTERRUPT_STATUS 0x0A00 518384740dcSRalf Baechle #define R_IO_INTERRUPT_DATA0 0x0A10 519384740dcSRalf Baechle #define R_IO_INTERRUPT_DATA1 0x0A18 520384740dcSRalf Baechle #define R_IO_INTERRUPT_DATA2 0x0A20 521384740dcSRalf Baechle #define R_IO_INTERRUPT_DATA3 0x0A28 522384740dcSRalf Baechle #define R_IO_INTERRUPT_ADDR0 0x0A30 523384740dcSRalf Baechle #define R_IO_INTERRUPT_ADDR1 0x0A40 524384740dcSRalf Baechle #define R_IO_INTERRUPT_PARITY 0x0A50 525384740dcSRalf Baechle #define R_IO_PCMCIA_CFG 0x0A60 526384740dcSRalf Baechle #define R_IO_PCMCIA_STATUS 0x0A70 527384740dcSRalf Baechle 528384740dcSRalf Baechle /* ********************************************************************* 529384740dcSRalf Baechle * GPIO Registers 530384740dcSRalf Baechle ********************************************************************* */ 531384740dcSRalf Baechle 532384740dcSRalf Baechle #define A_GPIO_CLR_EDGE 0x0010061A80 533384740dcSRalf Baechle #define A_GPIO_INT_TYPE 0x0010061A88 534384740dcSRalf Baechle #define A_GPIO_INPUT_INVERT 0x0010061A90 535384740dcSRalf Baechle #define A_GPIO_GLITCH 0x0010061A98 536384740dcSRalf Baechle #define A_GPIO_READ 0x0010061AA0 537384740dcSRalf Baechle #define A_GPIO_DIRECTION 0x0010061AA8 538384740dcSRalf Baechle #define A_GPIO_PIN_CLR 0x0010061AB0 539384740dcSRalf Baechle #define A_GPIO_PIN_SET 0x0010061AB8 540384740dcSRalf Baechle 541384740dcSRalf Baechle #define A_GPIO_BASE 0x0010061A80 542384740dcSRalf Baechle 543384740dcSRalf Baechle #define R_GPIO_CLR_EDGE 0x00 544384740dcSRalf Baechle #define R_GPIO_INT_TYPE 0x08 545384740dcSRalf Baechle #define R_GPIO_INPUT_INVERT 0x10 546384740dcSRalf Baechle #define R_GPIO_GLITCH 0x18 547384740dcSRalf Baechle #define R_GPIO_READ 0x20 548384740dcSRalf Baechle #define R_GPIO_DIRECTION 0x28 549384740dcSRalf Baechle #define R_GPIO_PIN_CLR 0x30 550384740dcSRalf Baechle #define R_GPIO_PIN_SET 0x38 551384740dcSRalf Baechle 552384740dcSRalf Baechle /* ********************************************************************* 553384740dcSRalf Baechle * SMBus Registers 554384740dcSRalf Baechle ********************************************************************* */ 555384740dcSRalf Baechle 556384740dcSRalf Baechle #define A_SMB_XTRA_0 0x0010060000 557384740dcSRalf Baechle #define A_SMB_XTRA_1 0x0010060008 558384740dcSRalf Baechle #define A_SMB_FREQ_0 0x0010060010 559384740dcSRalf Baechle #define A_SMB_FREQ_1 0x0010060018 560384740dcSRalf Baechle #define A_SMB_STATUS_0 0x0010060020 561384740dcSRalf Baechle #define A_SMB_STATUS_1 0x0010060028 562384740dcSRalf Baechle #define A_SMB_CMD_0 0x0010060030 563384740dcSRalf Baechle #define A_SMB_CMD_1 0x0010060038 564384740dcSRalf Baechle #define A_SMB_START_0 0x0010060040 565384740dcSRalf Baechle #define A_SMB_START_1 0x0010060048 566384740dcSRalf Baechle #define A_SMB_DATA_0 0x0010060050 567384740dcSRalf Baechle #define A_SMB_DATA_1 0x0010060058 568384740dcSRalf Baechle #define A_SMB_CONTROL_0 0x0010060060 569384740dcSRalf Baechle #define A_SMB_CONTROL_1 0x0010060068 570384740dcSRalf Baechle #define A_SMB_PEC_0 0x0010060070 571384740dcSRalf Baechle #define A_SMB_PEC_1 0x0010060078 572384740dcSRalf Baechle 573384740dcSRalf Baechle #define A_SMB_0 0x0010060000 574384740dcSRalf Baechle #define A_SMB_1 0x0010060008 575384740dcSRalf Baechle #define SMB_REGISTER_SPACING 0x8 576384740dcSRalf Baechle #define A_SMB_BASE(idx) (A_SMB_0+(idx)*SMB_REGISTER_SPACING) 577384740dcSRalf Baechle #define A_SMB_REGISTER(idx, reg) (A_SMB_BASE(idx)+(reg)) 578384740dcSRalf Baechle 579384740dcSRalf Baechle #define R_SMB_XTRA 0x0000000000 580384740dcSRalf Baechle #define R_SMB_FREQ 0x0000000010 581384740dcSRalf Baechle #define R_SMB_STATUS 0x0000000020 582384740dcSRalf Baechle #define R_SMB_CMD 0x0000000030 583384740dcSRalf Baechle #define R_SMB_START 0x0000000040 584384740dcSRalf Baechle #define R_SMB_DATA 0x0000000050 585384740dcSRalf Baechle #define R_SMB_CONTROL 0x0000000060 586384740dcSRalf Baechle #define R_SMB_PEC 0x0000000070 587384740dcSRalf Baechle 588384740dcSRalf Baechle /* ********************************************************************* 589384740dcSRalf Baechle * Timer Registers 590384740dcSRalf Baechle ********************************************************************* */ 591384740dcSRalf Baechle 592384740dcSRalf Baechle /* 593384740dcSRalf Baechle * Watchdog timers 594384740dcSRalf Baechle */ 595384740dcSRalf Baechle 596384740dcSRalf Baechle #define A_SCD_WDOG_0 0x0010020050 597384740dcSRalf Baechle #define A_SCD_WDOG_1 0x0010020150 598384740dcSRalf Baechle #define SCD_WDOG_SPACING 0x100 599384740dcSRalf Baechle #define SCD_NUM_WDOGS 2 600384740dcSRalf Baechle #define A_SCD_WDOG_BASE(w) (A_SCD_WDOG_0+SCD_WDOG_SPACING*(w)) 601384740dcSRalf Baechle #define A_SCD_WDOG_REGISTER(w, r) (A_SCD_WDOG_BASE(w) + (r)) 602384740dcSRalf Baechle 603384740dcSRalf Baechle #define R_SCD_WDOG_INIT 0x0000000000 604384740dcSRalf Baechle #define R_SCD_WDOG_CNT 0x0000000008 605384740dcSRalf Baechle #define R_SCD_WDOG_CFG 0x0000000010 606384740dcSRalf Baechle 607384740dcSRalf Baechle #define A_SCD_WDOG_INIT_0 0x0010020050 608384740dcSRalf Baechle #define A_SCD_WDOG_CNT_0 0x0010020058 609384740dcSRalf Baechle #define A_SCD_WDOG_CFG_0 0x0010020060 610384740dcSRalf Baechle 611384740dcSRalf Baechle #define A_SCD_WDOG_INIT_1 0x0010020150 612384740dcSRalf Baechle #define A_SCD_WDOG_CNT_1 0x0010020158 613384740dcSRalf Baechle #define A_SCD_WDOG_CFG_1 0x0010020160 614384740dcSRalf Baechle 615384740dcSRalf Baechle /* 616384740dcSRalf Baechle * Generic timers 617384740dcSRalf Baechle */ 618384740dcSRalf Baechle 619384740dcSRalf Baechle #define A_SCD_TIMER_0 0x0010020070 620384740dcSRalf Baechle #define A_SCD_TIMER_1 0x0010020078 621384740dcSRalf Baechle #define A_SCD_TIMER_2 0x0010020170 622384740dcSRalf Baechle #define A_SCD_TIMER_3 0x0010020178 623384740dcSRalf Baechle #define SCD_NUM_TIMERS 4 624384740dcSRalf Baechle #define A_SCD_TIMER_BASE(w) (A_SCD_TIMER_0+0x08*((w)&1)+0x100*(((w)&2)>>1)) 625384740dcSRalf Baechle #define A_SCD_TIMER_REGISTER(w, r) (A_SCD_TIMER_BASE(w) + (r)) 626384740dcSRalf Baechle 627384740dcSRalf Baechle #define R_SCD_TIMER_INIT 0x0000000000 628384740dcSRalf Baechle #define R_SCD_TIMER_CNT 0x0000000010 629384740dcSRalf Baechle #define R_SCD_TIMER_CFG 0x0000000020 630384740dcSRalf Baechle 631384740dcSRalf Baechle #define A_SCD_TIMER_INIT_0 0x0010020070 632384740dcSRalf Baechle #define A_SCD_TIMER_CNT_0 0x0010020080 633384740dcSRalf Baechle #define A_SCD_TIMER_CFG_0 0x0010020090 634384740dcSRalf Baechle 635384740dcSRalf Baechle #define A_SCD_TIMER_INIT_1 0x0010020078 636384740dcSRalf Baechle #define A_SCD_TIMER_CNT_1 0x0010020088 637384740dcSRalf Baechle #define A_SCD_TIMER_CFG_1 0x0010020098 638384740dcSRalf Baechle 639384740dcSRalf Baechle #define A_SCD_TIMER_INIT_2 0x0010020170 640384740dcSRalf Baechle #define A_SCD_TIMER_CNT_2 0x0010020180 641384740dcSRalf Baechle #define A_SCD_TIMER_CFG_2 0x0010020190 642384740dcSRalf Baechle 643384740dcSRalf Baechle #define A_SCD_TIMER_INIT_3 0x0010020178 644384740dcSRalf Baechle #define A_SCD_TIMER_CNT_3 0x0010020188 645384740dcSRalf Baechle #define A_SCD_TIMER_CFG_3 0x0010020198 646384740dcSRalf Baechle 647384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) 648384740dcSRalf Baechle #define A_SCD_SCRATCH 0x0010020C10 649384740dcSRalf Baechle #endif /* 1250 PASS2 || 112x PASS1 */ 650384740dcSRalf Baechle 651384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) 652384740dcSRalf Baechle #define A_SCD_ZBBUS_CYCLE_COUNT 0x0010030000 653384740dcSRalf Baechle #define A_SCD_ZBBUS_CYCLE_CP0 0x0010020C00 654384740dcSRalf Baechle #define A_SCD_ZBBUS_CYCLE_CP1 0x0010020C08 655384740dcSRalf Baechle #endif 656384740dcSRalf Baechle 657384740dcSRalf Baechle /* ********************************************************************* 658384740dcSRalf Baechle * System Control Registers 659384740dcSRalf Baechle ********************************************************************* */ 660384740dcSRalf Baechle 661384740dcSRalf Baechle #define A_SCD_SYSTEM_REVISION 0x0010020000 662384740dcSRalf Baechle #define A_SCD_SYSTEM_CFG 0x0010020008 663384740dcSRalf Baechle #define A_SCD_SYSTEM_MANUF 0x0010038000 664384740dcSRalf Baechle 665384740dcSRalf Baechle /* ********************************************************************* 666384740dcSRalf Baechle * System Address Trap Registers 667384740dcSRalf Baechle ********************************************************************* */ 668384740dcSRalf Baechle 669384740dcSRalf Baechle #define A_ADDR_TRAP_INDEX 0x00100200B0 670384740dcSRalf Baechle #define A_ADDR_TRAP_REG 0x00100200B8 671384740dcSRalf Baechle #define A_ADDR_TRAP_UP_0 0x0010020400 672384740dcSRalf Baechle #define A_ADDR_TRAP_UP_1 0x0010020408 673384740dcSRalf Baechle #define A_ADDR_TRAP_UP_2 0x0010020410 674384740dcSRalf Baechle #define A_ADDR_TRAP_UP_3 0x0010020418 675384740dcSRalf Baechle #define A_ADDR_TRAP_DOWN_0 0x0010020420 676384740dcSRalf Baechle #define A_ADDR_TRAP_DOWN_1 0x0010020428 677384740dcSRalf Baechle #define A_ADDR_TRAP_DOWN_2 0x0010020430 678384740dcSRalf Baechle #define A_ADDR_TRAP_DOWN_3 0x0010020438 679384740dcSRalf Baechle #define A_ADDR_TRAP_CFG_0 0x0010020440 680384740dcSRalf Baechle #define A_ADDR_TRAP_CFG_1 0x0010020448 681384740dcSRalf Baechle #define A_ADDR_TRAP_CFG_2 0x0010020450 682384740dcSRalf Baechle #define A_ADDR_TRAP_CFG_3 0x0010020458 683384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) || SIBYTE_HDR_FEATURE_CHIP(1480) 684384740dcSRalf Baechle #define A_ADDR_TRAP_REG_DEBUG 0x0010020460 685384740dcSRalf Baechle #endif /* 1250 PASS2 || 112x PASS1 || 1480 */ 686384740dcSRalf Baechle 687384740dcSRalf Baechle #define ADDR_TRAP_SPACING 8 688384740dcSRalf Baechle #define NUM_ADDR_TRAP 4 689384740dcSRalf Baechle #define A_ADDR_TRAP_UP(n) (A_ADDR_TRAP_UP_0 + ((n) * ADDR_TRAP_SPACING)) 690384740dcSRalf Baechle #define A_ADDR_TRAP_DOWN(n) (A_ADDR_TRAP_DOWN_0 + ((n) * ADDR_TRAP_SPACING)) 691384740dcSRalf Baechle #define A_ADDR_TRAP_CFG(n) (A_ADDR_TRAP_CFG_0 + ((n) * ADDR_TRAP_SPACING)) 692384740dcSRalf Baechle 693384740dcSRalf Baechle 694384740dcSRalf Baechle /* ********************************************************************* 695384740dcSRalf Baechle * System Interrupt Mapper Registers 696384740dcSRalf Baechle ********************************************************************* */ 697384740dcSRalf Baechle 698384740dcSRalf Baechle #define A_IMR_CPU0_BASE 0x0010020000 699384740dcSRalf Baechle #define A_IMR_CPU1_BASE 0x0010022000 700384740dcSRalf Baechle #define IMR_REGISTER_SPACING 0x2000 701384740dcSRalf Baechle #define IMR_REGISTER_SPACING_SHIFT 13 702384740dcSRalf Baechle 703384740dcSRalf Baechle #define A_IMR_MAPPER(cpu) (A_IMR_CPU0_BASE+(cpu)*IMR_REGISTER_SPACING) 704384740dcSRalf Baechle #define A_IMR_REGISTER(cpu, reg) (A_IMR_MAPPER(cpu)+(reg)) 705384740dcSRalf Baechle 706384740dcSRalf Baechle #define R_IMR_INTERRUPT_DIAG 0x0010 707384740dcSRalf Baechle #define R_IMR_INTERRUPT_LDT 0x0018 708384740dcSRalf Baechle #define R_IMR_INTERRUPT_MASK 0x0028 709384740dcSRalf Baechle #define R_IMR_INTERRUPT_TRACE 0x0038 710384740dcSRalf Baechle #define R_IMR_INTERRUPT_SOURCE_STATUS 0x0040 711384740dcSRalf Baechle #define R_IMR_LDT_INTERRUPT_SET 0x0048 712384740dcSRalf Baechle #define R_IMR_LDT_INTERRUPT 0x0018 713384740dcSRalf Baechle #define R_IMR_LDT_INTERRUPT_CLR 0x0020 714384740dcSRalf Baechle #define R_IMR_MAILBOX_CPU 0x00c0 715384740dcSRalf Baechle #define R_IMR_ALIAS_MAILBOX_CPU 0x1000 716384740dcSRalf Baechle #define R_IMR_MAILBOX_SET_CPU 0x00C8 717384740dcSRalf Baechle #define R_IMR_ALIAS_MAILBOX_SET_CPU 0x1008 718384740dcSRalf Baechle #define R_IMR_MAILBOX_CLR_CPU 0x00D0 719384740dcSRalf Baechle #define R_IMR_INTERRUPT_STATUS_BASE 0x0100 720384740dcSRalf Baechle #define R_IMR_INTERRUPT_STATUS_COUNT 7 721384740dcSRalf Baechle #define R_IMR_INTERRUPT_MAP_BASE 0x0200 722384740dcSRalf Baechle #define R_IMR_INTERRUPT_MAP_COUNT 64 723384740dcSRalf Baechle 724384740dcSRalf Baechle /* 725384740dcSRalf Baechle * these macros work together to build the address of a mailbox 726384740dcSRalf Baechle * register, e.g., A_MAILBOX_REGISTER(R_IMR_MAILBOX_SET_CPU,1) 727384740dcSRalf Baechle * for mbox_0_set_cpu2 returns 0x00100240C8 728384740dcSRalf Baechle */ 729384740dcSRalf Baechle #define A_MAILBOX_REGISTER(reg,cpu) \ 730384740dcSRalf Baechle (A_IMR_CPU0_BASE + (cpu * IMR_REGISTER_SPACING) + reg) 731384740dcSRalf Baechle 732384740dcSRalf Baechle /* ********************************************************************* 733384740dcSRalf Baechle * System Performance Counter Registers 734384740dcSRalf Baechle ********************************************************************* */ 735384740dcSRalf Baechle 736384740dcSRalf Baechle #define A_SCD_PERF_CNT_CFG 0x00100204C0 737384740dcSRalf Baechle #define A_SCD_PERF_CNT_0 0x00100204D0 738384740dcSRalf Baechle #define A_SCD_PERF_CNT_1 0x00100204D8 739384740dcSRalf Baechle #define A_SCD_PERF_CNT_2 0x00100204E0 740384740dcSRalf Baechle #define A_SCD_PERF_CNT_3 0x00100204E8 741384740dcSRalf Baechle 742384740dcSRalf Baechle #define SCD_NUM_PERF_CNT 4 743384740dcSRalf Baechle #define SCD_PERF_CNT_SPACING 8 744384740dcSRalf Baechle #define A_SCD_PERF_CNT(n) (A_SCD_PERF_CNT_0+(n*SCD_PERF_CNT_SPACING)) 745384740dcSRalf Baechle 746384740dcSRalf Baechle /* ********************************************************************* 747384740dcSRalf Baechle * System Bus Watcher Registers 748384740dcSRalf Baechle ********************************************************************* */ 749384740dcSRalf Baechle 750384740dcSRalf Baechle #define A_SCD_BUS_ERR_STATUS 0x0010020880 751384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE(1250, PASS2) || SIBYTE_HDR_FEATURE(112x, PASS1) 752384740dcSRalf Baechle #define A_SCD_BUS_ERR_STATUS_DEBUG 0x00100208D0 753384740dcSRalf Baechle #define A_BUS_ERR_STATUS_DEBUG 0x00100208D0 754384740dcSRalf Baechle #endif /* 1250 PASS2 || 112x PASS1 */ 755384740dcSRalf Baechle #define A_BUS_ERR_DATA_0 0x00100208A0 756384740dcSRalf Baechle #define A_BUS_ERR_DATA_1 0x00100208A8 757384740dcSRalf Baechle #define A_BUS_ERR_DATA_2 0x00100208B0 758384740dcSRalf Baechle #define A_BUS_ERR_DATA_3 0x00100208B8 759384740dcSRalf Baechle #define A_BUS_L2_ERRORS 0x00100208C0 760384740dcSRalf Baechle #define A_BUS_MEM_IO_ERRORS 0x00100208C8 761384740dcSRalf Baechle 762384740dcSRalf Baechle /* ********************************************************************* 763384740dcSRalf Baechle * System Debug Controller Registers 764384740dcSRalf Baechle ********************************************************************* */ 765384740dcSRalf Baechle 766384740dcSRalf Baechle #define A_SCD_JTAG_BASE 0x0010000000 767384740dcSRalf Baechle 768384740dcSRalf Baechle /* ********************************************************************* 769384740dcSRalf Baechle * System Trace Buffer Registers 770384740dcSRalf Baechle ********************************************************************* */ 771384740dcSRalf Baechle 772384740dcSRalf Baechle #define A_SCD_TRACE_CFG 0x0010020A00 773384740dcSRalf Baechle #define A_SCD_TRACE_READ 0x0010020A08 774384740dcSRalf Baechle #define A_SCD_TRACE_EVENT_0 0x0010020A20 775384740dcSRalf Baechle #define A_SCD_TRACE_EVENT_1 0x0010020A28 776384740dcSRalf Baechle #define A_SCD_TRACE_EVENT_2 0x0010020A30 777384740dcSRalf Baechle #define A_SCD_TRACE_EVENT_3 0x0010020A38 778384740dcSRalf Baechle #define A_SCD_TRACE_SEQUENCE_0 0x0010020A40 779384740dcSRalf Baechle #define A_SCD_TRACE_SEQUENCE_1 0x0010020A48 780384740dcSRalf Baechle #define A_SCD_TRACE_SEQUENCE_2 0x0010020A50 781384740dcSRalf Baechle #define A_SCD_TRACE_SEQUENCE_3 0x0010020A58 782384740dcSRalf Baechle #define A_SCD_TRACE_EVENT_4 0x0010020A60 783384740dcSRalf Baechle #define A_SCD_TRACE_EVENT_5 0x0010020A68 784384740dcSRalf Baechle #define A_SCD_TRACE_EVENT_6 0x0010020A70 785384740dcSRalf Baechle #define A_SCD_TRACE_EVENT_7 0x0010020A78 786384740dcSRalf Baechle #define A_SCD_TRACE_SEQUENCE_4 0x0010020A80 787384740dcSRalf Baechle #define A_SCD_TRACE_SEQUENCE_5 0x0010020A88 788384740dcSRalf Baechle #define A_SCD_TRACE_SEQUENCE_6 0x0010020A90 789384740dcSRalf Baechle #define A_SCD_TRACE_SEQUENCE_7 0x0010020A98 790384740dcSRalf Baechle 791384740dcSRalf Baechle #define TRACE_REGISTER_SPACING 8 792384740dcSRalf Baechle #define TRACE_NUM_REGISTERS 8 793384740dcSRalf Baechle #define A_SCD_TRACE_EVENT(n) (((n) & 4) ? \ 794384740dcSRalf Baechle (A_SCD_TRACE_EVENT_4 + (((n) & 3) * TRACE_REGISTER_SPACING)) : \ 795384740dcSRalf Baechle (A_SCD_TRACE_EVENT_0 + ((n) * TRACE_REGISTER_SPACING))) 796384740dcSRalf Baechle #define A_SCD_TRACE_SEQUENCE(n) (((n) & 4) ? \ 797384740dcSRalf Baechle (A_SCD_TRACE_SEQUENCE_4 + (((n) & 3) * TRACE_REGISTER_SPACING)) : \ 798384740dcSRalf Baechle (A_SCD_TRACE_SEQUENCE_0 + ((n) * TRACE_REGISTER_SPACING))) 799384740dcSRalf Baechle 800384740dcSRalf Baechle /* ********************************************************************* 801384740dcSRalf Baechle * System Generic DMA Registers 802384740dcSRalf Baechle ********************************************************************* */ 803384740dcSRalf Baechle 804384740dcSRalf Baechle #define A_DM_0 0x0010020B00 805384740dcSRalf Baechle #define A_DM_1 0x0010020B20 806384740dcSRalf Baechle #define A_DM_2 0x0010020B40 807384740dcSRalf Baechle #define A_DM_3 0x0010020B60 808384740dcSRalf Baechle #define DM_REGISTER_SPACING 0x20 809384740dcSRalf Baechle #define DM_NUM_CHANNELS 4 810384740dcSRalf Baechle #define A_DM_BASE(idx) (A_DM_0 + ((idx) * DM_REGISTER_SPACING)) 811384740dcSRalf Baechle #define A_DM_REGISTER(idx, reg) (A_DM_BASE(idx) + (reg)) 812384740dcSRalf Baechle 813384740dcSRalf Baechle #define R_DM_DSCR_BASE 0x0000000000 814384740dcSRalf Baechle #define R_DM_DSCR_COUNT 0x0000000008 815384740dcSRalf Baechle #define R_DM_CUR_DSCR_ADDR 0x0000000010 816384740dcSRalf Baechle #define R_DM_DSCR_BASE_DEBUG 0x0000000018 817384740dcSRalf Baechle 818384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) 819384740dcSRalf Baechle #define A_DM_PARTIAL_0 0x0010020ba0 820384740dcSRalf Baechle #define A_DM_PARTIAL_1 0x0010020ba8 821384740dcSRalf Baechle #define A_DM_PARTIAL_2 0x0010020bb0 822384740dcSRalf Baechle #define A_DM_PARTIAL_3 0x0010020bb8 823384740dcSRalf Baechle #define DM_PARTIAL_REGISTER_SPACING 0x8 824384740dcSRalf Baechle #define A_DM_PARTIAL(idx) (A_DM_PARTIAL_0 + ((idx) * DM_PARTIAL_REGISTER_SPACING)) 825384740dcSRalf Baechle #endif /* 1250 PASS3 || 112x PASS1 */ 826384740dcSRalf Baechle 827384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE(1250, PASS3) || SIBYTE_HDR_FEATURE(112x, PASS1) 828384740dcSRalf Baechle #define A_DM_CRC_0 0x0010020b80 829384740dcSRalf Baechle #define A_DM_CRC_1 0x0010020b90 830384740dcSRalf Baechle #define DM_CRC_REGISTER_SPACING 0x10 831384740dcSRalf Baechle #define DM_CRC_NUM_CHANNELS 2 832384740dcSRalf Baechle #define A_DM_CRC_BASE(idx) (A_DM_CRC_0 + ((idx) * DM_CRC_REGISTER_SPACING)) 833384740dcSRalf Baechle #define A_DM_CRC_REGISTER(idx, reg) (A_DM_CRC_BASE(idx) + (reg)) 834384740dcSRalf Baechle 835384740dcSRalf Baechle #define R_CRC_DEF_0 0x00 836384740dcSRalf Baechle #define R_CTCP_DEF_0 0x08 837384740dcSRalf Baechle #endif /* 1250 PASS3 || 112x PASS1 */ 838384740dcSRalf Baechle 839384740dcSRalf Baechle /* ********************************************************************* 840384740dcSRalf Baechle * Physical Address Map 841384740dcSRalf Baechle ********************************************************************* */ 842384740dcSRalf Baechle 843384740dcSRalf Baechle #if SIBYTE_HDR_FEATURE_1250_112x 844384740dcSRalf Baechle #define A_PHYS_MEMORY_0 _SB_MAKE64(0x0000000000) 845384740dcSRalf Baechle #define A_PHYS_MEMORY_SIZE _SB_MAKE64((256*1024*1024)) 846384740dcSRalf Baechle #define A_PHYS_SYSTEM_CTL _SB_MAKE64(0x0010000000) 847384740dcSRalf Baechle #define A_PHYS_IO_SYSTEM _SB_MAKE64(0x0010060000) 848384740dcSRalf Baechle #define A_PHYS_GENBUS _SB_MAKE64(0x0010090000) 849384740dcSRalf Baechle #define A_PHYS_GENBUS_END _SB_MAKE64(0x0040000000) 850384740dcSRalf Baechle #define A_PHYS_LDTPCI_IO_MATCH_BYTES_32 _SB_MAKE64(0x0040000000) 851384740dcSRalf Baechle #define A_PHYS_LDTPCI_IO_MATCH_BITS_32 _SB_MAKE64(0x0060000000) 852384740dcSRalf Baechle #define A_PHYS_MEMORY_1 _SB_MAKE64(0x0080000000) 853384740dcSRalf Baechle #define A_PHYS_MEMORY_2 _SB_MAKE64(0x0090000000) 854384740dcSRalf Baechle #define A_PHYS_MEMORY_3 _SB_MAKE64(0x00C0000000) 855384740dcSRalf Baechle #define A_PHYS_L2_CACHE_TEST _SB_MAKE64(0x00D0000000) 856384740dcSRalf Baechle #define A_PHYS_LDT_SPECIAL_MATCH_BYTES _SB_MAKE64(0x00D8000000) 857384740dcSRalf Baechle #define A_PHYS_LDTPCI_IO_MATCH_BYTES _SB_MAKE64(0x00DC000000) 858384740dcSRalf Baechle #define A_PHYS_LDTPCI_CFG_MATCH_BYTES _SB_MAKE64(0x00DE000000) 859384740dcSRalf Baechle #define A_PHYS_LDT_SPECIAL_MATCH_BITS _SB_MAKE64(0x00F8000000) 860384740dcSRalf Baechle #define A_PHYS_LDTPCI_IO_MATCH_BITS _SB_MAKE64(0x00FC000000) 861384740dcSRalf Baechle #define A_PHYS_LDTPCI_CFG_MATCH_BITS _SB_MAKE64(0x00FE000000) 862384740dcSRalf Baechle #define A_PHYS_MEMORY_EXP _SB_MAKE64(0x0100000000) 863384740dcSRalf Baechle #define A_PHYS_MEMORY_EXP_SIZE _SB_MAKE64((508*1024*1024*1024)) 864384740dcSRalf Baechle #define A_PHYS_LDT_EXP _SB_MAKE64(0x8000000000) 865384740dcSRalf Baechle #define A_PHYS_PCI_FULLACCESS_BYTES _SB_MAKE64(0xF000000000) 866384740dcSRalf Baechle #define A_PHYS_PCI_FULLACCESS_BITS _SB_MAKE64(0xF100000000) 867384740dcSRalf Baechle #define A_PHYS_RESERVED _SB_MAKE64(0xF200000000) 868384740dcSRalf Baechle #define A_PHYS_RESERVED_SPECIAL_LDT _SB_MAKE64(0xFD00000000) 869384740dcSRalf Baechle 870384740dcSRalf Baechle #define A_PHYS_L2CACHE_WAY_SIZE _SB_MAKE64(0x0000020000) 871384740dcSRalf Baechle #define PHYS_L2CACHE_NUM_WAYS 4 872384740dcSRalf Baechle #define A_PHYS_L2CACHE_TOTAL_SIZE _SB_MAKE64(0x0000080000) 873384740dcSRalf Baechle #define A_PHYS_L2CACHE_WAY0 _SB_MAKE64(0x00D0180000) 874384740dcSRalf Baechle #define A_PHYS_L2CACHE_WAY1 _SB_MAKE64(0x00D01A0000) 875384740dcSRalf Baechle #define A_PHYS_L2CACHE_WAY2 _SB_MAKE64(0x00D01C0000) 876384740dcSRalf Baechle #define A_PHYS_L2CACHE_WAY3 _SB_MAKE64(0x00D01E0000) 877384740dcSRalf Baechle #endif 878384740dcSRalf Baechle 879384740dcSRalf Baechle 880384740dcSRalf Baechle #endif 881