1 1.17 garbled /* $NetBSD: i80321reg.h,v 1.17 2007/10/17 19:53:43 garbled Exp $ */ 2 1.1 thorpej 3 1.1 thorpej /* 4 1.1 thorpej * Copyright (c) 2002 Wasabi Systems, Inc. 5 1.1 thorpej * All rights reserved. 6 1.1 thorpej * 7 1.1 thorpej * Written by Jason R. Thorpe for Wasabi Systems, Inc. 8 1.1 thorpej * 9 1.1 thorpej * Redistribution and use in source and binary forms, with or without 10 1.1 thorpej * modification, are permitted provided that the following conditions 11 1.1 thorpej * are met: 12 1.1 thorpej * 1. Redistributions of source code must retain the above copyright 13 1.1 thorpej * notice, this list of conditions and the following disclaimer. 14 1.1 thorpej * 2. Redistributions in binary form must reproduce the above copyright 15 1.1 thorpej * notice, this list of conditions and the following disclaimer in the 16 1.1 thorpej * documentation and/or other materials provided with the distribution. 17 1.1 thorpej * 3. All advertising materials mentioning features or use of this software 18 1.1 thorpej * must display the following acknowledgement: 19 1.1 thorpej * This product includes software developed for the NetBSD Project by 20 1.1 thorpej * Wasabi Systems, Inc. 21 1.1 thorpej * 4. The name of Wasabi Systems, Inc. may not be used to endorse 22 1.1 thorpej * or promote products derived from this software without specific prior 23 1.1 thorpej * written permission. 24 1.1 thorpej * 25 1.1 thorpej * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND 26 1.1 thorpej * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED 27 1.1 thorpej * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR 28 1.1 thorpej * PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL WASABI SYSTEMS, INC 29 1.1 thorpej * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR 30 1.1 thorpej * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF 31 1.1 thorpej * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS 32 1.1 thorpej * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN 33 1.1 thorpej * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) 34 1.1 thorpej * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE 35 1.1 thorpej * POSSIBILITY OF SUCH DAMAGE. 36 1.1 thorpej */ 37 1.1 thorpej 38 1.1 thorpej #ifndef _ARM_XSCALE_I80321REG_H_ 39 1.1 thorpej #define _ARM_XSCALE_I80321REG_H_ 40 1.1 thorpej 41 1.1 thorpej /* 42 1.1 thorpej * Register definitions for the Intel 80321 (``Verde'') I/O processor, 43 1.1 thorpej * based on the XScale core. 44 1.1 thorpej */ 45 1.1 thorpej 46 1.1 thorpej /* 47 1.1 thorpej * Base i80321 memory map: 48 1.1 thorpej * 49 1.1 thorpej * 0x0000.0000 - 0x7fff.ffff ATU Outbound Direct Addressing Window 50 1.1 thorpej * 0x8000.0000 - 0x9001.ffff ATU Outbound Translation Windows 51 1.1 thorpej * 0x9002.0000 - 0xffff.dfff External Memory 52 1.1 thorpej * 0xffff.e000 - 0xffff.e8ff Peripheral Memory Mapped Registers 53 1.1 thorpej * 0xffff.e900 - 0xffff.ffff Reserved 54 1.1 thorpej */ 55 1.1 thorpej 56 1.1 thorpej #define VERDE_OUT_DIRECT_WIN_BASE 0x00000000UL 57 1.1 thorpej #define VERDE_OUT_DIRECT_WIN_SIZE 0x80000000UL 58 1.16 gavan #define VERDE_OUT_DIRECT_WIN_SKIP 0x10000000UL 59 1.1 thorpej 60 1.1 thorpej #define VERDE_OUT_XLATE_MEM_WIN_SIZE 0x04000000UL 61 1.1 thorpej #define VERDE_OUT_XLATE_IO_WIN_SIZE 0x00010000UL 62 1.1 thorpej 63 1.1 thorpej #define VERDE_OUT_XLATE_MEM_WIN0_BASE 0x80000000UL 64 1.1 thorpej #define VERDE_OUT_XLATE_MEM_WIN1_BASE 0x84000000UL 65 1.1 thorpej 66 1.1 thorpej #define VERDE_OUT_XLATE_IO_WIN0_BASE 0x90000000UL 67 1.1 thorpej 68 1.1 thorpej #define VERDE_EXTMEM_BASE 0x90020000UL 69 1.1 thorpej 70 1.1 thorpej #define VERDE_PMMR_BASE 0xffffe000UL 71 1.12 thorpej #define VERDE_PMMR_SIZE 0x00001700UL 72 1.1 thorpej 73 1.1 thorpej /* 74 1.1 thorpej * Peripheral Memory Mapped Registers. Defined as offsets 75 1.1 thorpej * from the VERDE_PMMR_BASE. 76 1.1 thorpej */ 77 1.1 thorpej #define VERDE_ATU_BASE 0x0100 78 1.1 thorpej #define VERDE_ATU_SIZE 0x0100 79 1.1 thorpej 80 1.10 briggs #define VERDE_MU_BASE 0x0300 81 1.10 briggs #define VERDE_MU_SIZE 0x0100 82 1.10 briggs 83 1.2 thorpej #define VERDE_DMA_BASE 0x0400 84 1.7 thorpej #define VERDE_DMA_BASE0 (VERDE_DMA_BASE + 0x00) 85 1.7 thorpej #define VERDE_DMA_BASE1 (VERDE_DMA_BASE + 0x40) 86 1.2 thorpej #define VERDE_DMA_SIZE 0x0100 87 1.7 thorpej #define VERDE_DMA_CHSIZE 0x0040 88 1.2 thorpej 89 1.1 thorpej #define VERDE_MCU_BASE 0x0500 90 1.1 thorpej #define VERDE_MCU_SIZE 0x0100 91 1.1 thorpej 92 1.4 thorpej #define VERDE_SSP_BASE 0x0600 93 1.10 briggs #define VERDE_SSP_SIZE 0x0080 94 1.10 briggs 95 1.10 briggs #define VERDE_PBIU_BASE 0x0680 96 1.10 briggs #define VERDE_PBIU_SIZE 0x0080 97 1.4 thorpej 98 1.3 thorpej #define VERDE_AAU_BASE 0x0800 99 1.3 thorpej #define VERDE_AAU_SIZE 0x0100 100 1.3 thorpej 101 1.10 briggs #define VERDE_I2C_BASE 0x1680 102 1.12 thorpej #define VERDE_I2C_BASE0 (VERDE_I2C_BASE + 0x00) 103 1.12 thorpej #define VERDE_I2C_BASE1 (VERDE_I2C_BASE + 0x20) 104 1.10 briggs #define VERDE_I2C_SIZE 0x0080 105 1.12 thorpej #define VERDE_I2C_CHSIZE 0x0020 106 1.10 briggs 107 1.1 thorpej /* 108 1.1 thorpej * Address Translation Unit 109 1.1 thorpej */ 110 1.1 thorpej /* 0x00 - 0x38 -- PCI configuration space header */ 111 1.1 thorpej #define ATU_IALR0 0x40 /* Inbound ATU Limit 0 */ 112 1.1 thorpej #define ATU_IATVR0 0x44 /* Inbound ATU Xlate Value 0 */ 113 1.1 thorpej #define ATU_ERLR 0x48 /* Expansion ROM Limit */ 114 1.1 thorpej #define ATU_ERTVR 0x4c /* Expansion ROM Xlate Value */ 115 1.1 thorpej #define ATU_IALR1 0x50 /* Inbound ATU Limit 1 */ 116 1.1 thorpej #define ATU_IALR2 0x54 /* Inbound ATU Limit 2 */ 117 1.1 thorpej #define ATU_IATVR2 0x58 /* Inbound ATU Xlate Value 2 */ 118 1.1 thorpej #define ATU_OIOWTVR 0x5c /* Outbound I/O Window Xlate Value */ 119 1.1 thorpej #define ATU_OMWTVR0 0x60 /* Outbound Mem Window Xlate Value 0 */ 120 1.1 thorpej #define ATU_OUMWTVR0 0x64 /* Outbound Mem Window Xlate Value 0 Upper */ 121 1.1 thorpej #define ATU_OMWTVR1 0x68 /* Outbound Mem Window Xlate Value 1 */ 122 1.1 thorpej #define ATU_OUMWTVR1 0x6c /* Outbound Mem Window Xlate Value 1 Upper */ 123 1.1 thorpej #define ATU_OUDWTVR 0x78 /* Outbound Mem Direct Xlate Value Upper */ 124 1.1 thorpej #define ATU_ATUCR 0x80 /* ATU Configuration */ 125 1.1 thorpej #define ATU_PCSR 0x84 /* PCI Configuration and Status */ 126 1.1 thorpej #define ATU_ATUISR 0x88 /* ATU Interrupt Status */ 127 1.1 thorpej #define ATU_ATUIMR 0x8c /* ATU Interrupt Mask */ 128 1.1 thorpej #define ATU_IABAR3 0x90 /* Inbound ATU Base Address 3 */ 129 1.1 thorpej #define ATU_IAUBAR3 0x94 /* Inbound ATU Base Address 3 Upper */ 130 1.1 thorpej #define ATU_IALR3 0x98 /* Inbound ATU Limit 3 */ 131 1.1 thorpej #define ATU_IATVR3 0x9c /* Inbound ATU Xlate Value 3 */ 132 1.1 thorpej #define ATU_OCCAR 0xa4 /* Outbound Configuration Cycle Address */ 133 1.1 thorpej #define ATU_OCCDR 0xac /* Outbound Configuration Cycle Data */ 134 1.1 thorpej #define ATU_MSI_PORT 0xb4 /* MSI port */ 135 1.1 thorpej #define ATU_PDSCR 0xbc /* PCI Bus Drive Strength Control */ 136 1.1 thorpej #define ATU_PCI_X_CAP_ID 0xe0 /* (1) */ 137 1.1 thorpej #define ATU_PCI_X_NEXT 0xe1 /* (1) */ 138 1.1 thorpej #define ATU_PCIXCMD 0xe2 /* PCI-X Command Register (2) */ 139 1.1 thorpej #define ATU_PCIXSR 0xe4 /* PCI-X Status Register */ 140 1.1 thorpej 141 1.1 thorpej #define ATUCR_DRC_ALIAS (1U << 19) 142 1.1 thorpej #define ATUCR_DAU2GXEN (1U << 18) 143 1.1 thorpej #define ATUCR_P_SERR_MA (1U << 16) 144 1.1 thorpej #define ATUCR_DTS (1U << 15) 145 1.1 thorpej #define ATUCR_P_SERR_DIE (1U << 9) 146 1.1 thorpej #define ATUCR_DAE (1U << 8) 147 1.1 thorpej #define ATUCR_BIST_IE (1U << 3) 148 1.1 thorpej #define ATUCR_OUT_EN (1U << 1) 149 1.1 thorpej 150 1.1 thorpej #define PCSR_DAAAPE (1U << 18) 151 1.1 thorpej #define PCSR_PCI_X_CAP (3U << 16) 152 1.1 thorpej #define PCSR_PCI_X_CAP_BORING (0 << 16) 153 1.1 thorpej #define PCSR_PCI_X_CAP_66 (1U << 16) 154 1.1 thorpej #define PCSR_PCI_X_CAP_100 (2U << 16) 155 1.1 thorpej #define PCSR_PCI_X_CAP_133 (3U << 16) 156 1.1 thorpej #define PCSR_OTQB (1U << 15) 157 1.1 thorpej #define PCSR_IRTQB (1U << 14) 158 1.1 thorpej #define PCSR_DTV (1U << 12) 159 1.1 thorpej #define PCSR_BUS66 (1U << 10) 160 1.1 thorpej #define PCSR_BUS64 (1U << 8) 161 1.1 thorpej #define PCSR_RIB (1U << 5) 162 1.1 thorpej #define PCSR_RPB (1U << 4) 163 1.1 thorpej #define PCSR_CCR (1U << 2) 164 1.1 thorpej #define PCSR_CPR (1U << 1) 165 1.1 thorpej 166 1.1 thorpej #define ATUISR_IMW1BU (1U << 14) 167 1.1 thorpej #define ATUISR_ISCEM (1U << 13) 168 1.1 thorpej #define ATUISR_RSCEM (1U << 12) 169 1.1 thorpej #define ATUISR_PST (1U << 11) 170 1.1 thorpej #define ATUISR_P_SERR_ASRT (1U << 10) 171 1.1 thorpej #define ATUISR_DPE (1U << 9) 172 1.1 thorpej #define ATUISR_BIST (1U << 8) 173 1.1 thorpej #define ATUISR_IBMA (1U << 7) 174 1.1 thorpej #define ATUISR_P_SERR_DET (1U << 4) 175 1.1 thorpej #define ATUISR_PMA (1U << 3) 176 1.1 thorpej #define ATUISR_PTAM (1U << 2) 177 1.1 thorpej #define ATUISR_PTAT (1U << 1) 178 1.1 thorpej #define ATUISR_PMPE (1U << 0) 179 1.1 thorpej 180 1.1 thorpej #define ATUIMR_IMW1BU (1U << 11) 181 1.1 thorpej #define ATUIMR_ISCEM (1U << 10) 182 1.1 thorpej #define ATUIMR_RSCEM (1U << 9) 183 1.1 thorpej #define ATUIMR_PST (1U << 8) 184 1.1 thorpej #define ATUIMR_DPE (1U << 7) 185 1.1 thorpej #define ATUIMR_P_SERR_ASRT (1U << 6) 186 1.1 thorpej #define ATUIMR_PMA (1U << 5) 187 1.1 thorpej #define ATUIMR_PTAM (1U << 4) 188 1.1 thorpej #define ATUIMR_PTAT (1U << 3) 189 1.1 thorpej #define ATUIMR_PMPE (1U << 2) 190 1.1 thorpej #define ATUIMR_IE_SERR_EN (1U << 1) 191 1.1 thorpej #define ATUIMR_ECC_TAE (1U << 0) 192 1.1 thorpej 193 1.1 thorpej #define PCIXCMD_MOST_1 (0 << 4) 194 1.1 thorpej #define PCIXCMD_MOST_2 (1 << 4) 195 1.1 thorpej #define PCIXCMD_MOST_3 (2 << 4) 196 1.1 thorpej #define PCIXCMD_MOST_4 (3 << 4) 197 1.1 thorpej #define PCIXCMD_MOST_8 (4 << 4) 198 1.1 thorpej #define PCIXCMD_MOST_12 (5 << 4) 199 1.1 thorpej #define PCIXCMD_MOST_16 (6 << 4) 200 1.1 thorpej #define PCIXCMD_MOST_32 (7 << 4) 201 1.1 thorpej #define PCIXCMD_MOST_MASK (7 << 4) 202 1.1 thorpej #define PCIXCMD_MMRBC_512 (0 << 2) 203 1.1 thorpej #define PCIXCMD_MMRBC_1024 (1 << 2) 204 1.1 thorpej #define PCIXCMD_MMRBC_2048 (2 << 2) 205 1.1 thorpej #define PCIXCMD_MMRBC_4096 (3 << 2) 206 1.1 thorpej #define PCIXCMD_MMRBC_MASK (3 << 2) 207 1.1 thorpej #define PCIXCMD_ERO (1U << 1) 208 1.1 thorpej #define PCIXCMD_DPERE (1U << 0) 209 1.1 thorpej 210 1.1 thorpej #define PCIXSR_RSCEM (1U << 29) 211 1.1 thorpej #define PCIXSR_DMCRS_MASK (7 << 26) 212 1.1 thorpej #define PCIXSR_DMOST_MASK (7 << 23) 213 1.1 thorpej #define PCIXSR_COMPLEX (1U << 20) 214 1.1 thorpej #define PCIXSR_USC (1U << 19) 215 1.1 thorpej #define PCIXSR_SCD (1U << 18) 216 1.1 thorpej #define PCIXSR_133_CAP (1U << 17) 217 1.1 thorpej #define PCIXSR_32PCI (1U << 16) /* 0 = 32, 1 = 64 */ 218 1.14 gavan #define PCIXSR_BUSNO(x) (((x) & 0xff00) >> 8) 219 1.14 gavan #define PCIXSR_DEVNO(x) (((x) & 0xf8) >> 3) 220 1.1 thorpej #define PCIXSR_FUNCNO(x) ((x) & 0x7) 221 1.1 thorpej 222 1.1 thorpej /* 223 1.1 thorpej * Memory Controller Unit 224 1.1 thorpej */ 225 1.1 thorpej #define MCU_SDIR 0x00 /* DDR SDRAM Init. Register */ 226 1.1 thorpej #define MCU_SDCR 0x04 /* DDR SDRAM Control Register */ 227 1.1 thorpej #define MCU_SDBR 0x08 /* SDRAM Base Register */ 228 1.1 thorpej #define MCU_SBR0 0x0c /* SDRAM Boundary 0 */ 229 1.1 thorpej #define MCU_SBR1 0x10 /* SDRAM Boundary 1 */ 230 1.1 thorpej #define MCU_ECCR 0x34 /* ECC Control Register */ 231 1.1 thorpej #define MCU_ELOG0 0x38 /* ECC Log 0 */ 232 1.1 thorpej #define MCU_ELOG1 0x3c /* ECC Log 1 */ 233 1.1 thorpej #define MCU_ECAR0 0x40 /* ECC address 0 */ 234 1.1 thorpej #define MCU_ECAR1 0x44 /* ECC address 1 */ 235 1.1 thorpej #define MCU_ECTST 0x48 /* ECC test register */ 236 1.1 thorpej #define MCU_MCISR 0x4c /* MCU Interrupt Status Register */ 237 1.1 thorpej #define MCU_RFR 0x50 /* Refresh Frequency Register */ 238 1.1 thorpej #define MCU_DBUDSR 0x54 /* Data Bus Pull-up Drive Strength */ 239 1.1 thorpej #define MCU_DBDDSR 0x58 /* Data Bus Pull-down Drive Strength */ 240 1.1 thorpej #define MCU_CUDSR 0x5c /* Clock Pull-up Drive Strength */ 241 1.1 thorpej #define MCU_CDDSR 0x60 /* Clock Pull-down Drive Strength */ 242 1.1 thorpej #define MCU_CEUDSR 0x64 /* Clock En Pull-up Drive Strength */ 243 1.1 thorpej #define MCU_CEDDSR 0x68 /* Clock En Pull-down Drive Strength */ 244 1.1 thorpej #define MCU_CSUDSR 0x6c /* Chip Sel Pull-up Drive Strength */ 245 1.1 thorpej #define MCU_CSDDSR 0x70 /* Chip Sel Pull-down Drive Strength */ 246 1.1 thorpej #define MCU_REUDSR 0x74 /* Rx En Pull-up Drive Strength */ 247 1.1 thorpej #define MCU_REDDSR 0x78 /* Rx En Pull-down Drive Strength */ 248 1.1 thorpej #define MCU_ABUDSR 0x7c /* Addr Bus Pull-up Drive Strength */ 249 1.1 thorpej #define MCU_ABDDSR 0x80 /* Addr Bus Pull-down Drive Strength */ 250 1.1 thorpej #define MCU_DSDR 0x84 /* Data Strobe Delay Register */ 251 1.1 thorpej #define MCU_REDR 0x88 /* Rx Enable Delay Register */ 252 1.1 thorpej 253 1.1 thorpej #define SDCR_DIMMTYPE (1U << 1) /* 0 = unbuf, 1 = reg */ 254 1.1 thorpej #define SDCR_BUSWIDTH (1U << 2) /* 0 = 64, 1 = 32 */ 255 1.1 thorpej 256 1.1 thorpej #define SBRx_TECH (1U << 31) 257 1.1 thorpej #define SBRx_BOUND 0x0000003f 258 1.1 thorpej 259 1.1 thorpej #define ECCR_SBERE (1U << 0) 260 1.1 thorpej #define ECCR_MBERE (1U << 1) 261 1.1 thorpej #define ECCR_SBECE (1U << 2) 262 1.1 thorpej #define ECCR_ECCEN (1U << 3) 263 1.1 thorpej 264 1.1 thorpej #define ELOGx_SYNDROME 0x000000ff 265 1.1 thorpej #define ELOGx_ERRTYPE (1U << 8) /* 1 = multi-bit */ 266 1.1 thorpej #define ELOGx_RW (1U << 12) /* 1 = write error */ 267 1.1 thorpej /* 268 1.1 thorpej * Dev ID Func Requester 269 1.1 thorpej * 2 0 XScale core 270 1.1 thorpej * 2 1 ATU 271 1.1 thorpej * 13 0 DMA channel 0 272 1.1 thorpej * 13 1 DMA channel 1 273 1.1 thorpej * 26 0 ATU 274 1.1 thorpej */ 275 1.1 thorpej #define ELOGx_REQ_DEV(x) (((x) >> 19) & 0x1f) 276 1.1 thorpej #define ELOGx_REQ_FUNC(x) (((x) >> 16) & 0x3) 277 1.1 thorpej 278 1.1 thorpej #define MCISR_ECC_ERR0 (1U << 0) 279 1.1 thorpej #define MCISR_ECC_ERR1 (1U << 1) 280 1.1 thorpej #define MCISR_ECC_ERRN (1U << 2) 281 1.1 thorpej 282 1.1 thorpej /* 283 1.1 thorpej * Timers 284 1.1 thorpej * 285 1.1 thorpej * The i80321 timer registers are available in both memory-mapped 286 1.1 thorpej * and coprocessor spaces. Most of the registers are read-only 287 1.1 thorpej * if memory-mapped, so we access them via coprocessor space. 288 1.1 thorpej * 289 1.1 thorpej * TMR0 cp6 c0,1 0xffffe7e0 290 1.1 thorpej * TMR1 cp6 c1,1 0xffffe7e4 291 1.1 thorpej * TCR0 cp6 c2,1 0xffffe7e8 292 1.1 thorpej * TCR1 cp6 c3,1 0xffffe7ec 293 1.1 thorpej * TRR0 cp6 c4,1 0xffffe7f0 294 1.1 thorpej * TRR1 cp6 c5,1 0xffffe7f4 295 1.1 thorpej * TISR cp6 c6,1 0xffffe7f8 296 1.1 thorpej * WDTCR cp6 c7,1 0xffffe7fc 297 1.1 thorpej */ 298 1.1 thorpej 299 1.1 thorpej #define TMRx_TC (1U << 0) 300 1.1 thorpej #define TMRx_ENABLE (1U << 1) 301 1.1 thorpej #define TMRx_RELOAD (1U << 2) 302 1.1 thorpej #define TMRx_CSEL_CORE (0 << 4) 303 1.1 thorpej #define TMRx_CSEL_CORE_div4 (1 << 4) 304 1.1 thorpej #define TMRx_CSEL_CORE_div8 (2 << 4) 305 1.1 thorpej #define TMRx_CSEL_CORE_div16 (3 << 4) 306 1.1 thorpej 307 1.1 thorpej #define TISR_TMR0 (1U << 0) 308 1.1 thorpej #define TISR_TMR1 (1U << 1) 309 1.1 thorpej 310 1.4 thorpej #define WDTCR_ENABLE1 0x1e1e1e1e 311 1.4 thorpej #define WDTCR_ENABLE2 0xe1e1e1e1 312 1.1 thorpej 313 1.1 thorpej /* 314 1.1 thorpej * Interrupt Controller Unit. 315 1.1 thorpej * 316 1.1 thorpej * INTCTL cp6 c0,0 0xffffe7d0 317 1.1 thorpej * INTSTR cp6 c4,0 0xffffe7d4 318 1.1 thorpej * IINTSRC cp6 c8,0 0xffffe7d8 319 1.1 thorpej * FINTSRC cp6 c9,0 0xffffe7dc 320 1.13 gavan * PIRSR 0xffffe1ec 321 1.1 thorpej */ 322 1.1 thorpej 323 1.13 gavan #define ICU_PIRSR 0x01ec 324 1.1 thorpej #define ICU_GPOE 0x07c4 325 1.1 thorpej #define ICU_GPID 0x07c8 326 1.1 thorpej #define ICU_GPOD 0x07cc 327 1.1 thorpej 328 1.1 thorpej /* 329 1.1 thorpej * NOTE: WE USE THE `bitXX' BITS TO INDICATE PENDING SOFTWARE 330 1.1 thorpej * INTERRUPTS. See i80321_icu.c 331 1.1 thorpej */ 332 1.1 thorpej #define ICU_INT_HPI 31 /* high priority interrupt */ 333 1.6 thorpej #define ICU_INT_XINT0 27 /* external interrupts */ 334 1.6 thorpej #define ICU_INT_XINT(x) ((x) + ICU_INT_XINT0) 335 1.1 thorpej #define ICU_INT_bit26 26 336 1.1 thorpej #define ICU_INT_SSP 25 /* SSP serial port */ 337 1.1 thorpej #define ICU_INT_MUE 24 /* msg unit error */ 338 1.1 thorpej #define ICU_INT_AAUE 23 /* AAU error */ 339 1.1 thorpej #define ICU_INT_bit22 22 340 1.1 thorpej #define ICU_INT_DMA1E 21 /* DMA Ch 1 error */ 341 1.1 thorpej #define ICU_INT_DMA0E 20 /* DMA Ch 0 error */ 342 1.1 thorpej #define ICU_INT_MCUE 19 /* memory controller error */ 343 1.1 thorpej #define ICU_INT_ATUE 18 /* ATU error */ 344 1.1 thorpej #define ICU_INT_BIUE 17 /* bus interface unit error */ 345 1.1 thorpej #define ICU_INT_PMU 16 /* XScale PMU */ 346 1.1 thorpej #define ICU_INT_PPM 15 /* peripheral PMU */ 347 1.1 thorpej #define ICU_INT_BIST 14 /* ATU Start BIST */ 348 1.1 thorpej #define ICU_INT_MU 13 /* messaging unit */ 349 1.1 thorpej #define ICU_INT_I2C1 12 /* i2c unit 1 */ 350 1.1 thorpej #define ICU_INT_I2C0 11 /* i2c unit 0 */ 351 1.1 thorpej #define ICU_INT_TMR1 10 /* timer 1 */ 352 1.1 thorpej #define ICU_INT_TMR0 9 /* timer 0 */ 353 1.1 thorpej #define ICU_INT_CPPM 8 /* core processor PMU */ 354 1.1 thorpej #define ICU_INT_AAU_EOC 7 /* AAU end-of-chain */ 355 1.1 thorpej #define ICU_INT_AAU_EOT 6 /* AAU end-of-transfer */ 356 1.1 thorpej #define ICU_INT_bit5 5 357 1.1 thorpej #define ICU_INT_bit4 4 358 1.1 thorpej #define ICU_INT_DMA1_EOC 3 /* DMA1 end-of-chain */ 359 1.1 thorpej #define ICU_INT_DMA1_EOT 2 /* DMA1 end-of-transfer */ 360 1.1 thorpej #define ICU_INT_DMA0_EOC 1 /* DMA0 end-of-chain */ 361 1.1 thorpej #define ICU_INT_DMA0_EOT 0 /* DMA0 end-of-transfer */ 362 1.1 thorpej 363 1.8 briggs #define ICU_INT_HWMASK (0xffffffff & \ 364 1.8 briggs ~((1 << ICU_INT_bit26) | \ 365 1.8 briggs (1 << ICU_INT_bit22) | \ 366 1.8 briggs (1 << ICU_INT_bit5) | \ 367 1.8 briggs (1 << ICU_INT_bit4))) 368 1.3 thorpej 369 1.3 thorpej /* 370 1.4 thorpej * SSP Serial Port 371 1.3 thorpej */ 372 1.3 thorpej 373 1.4 thorpej #define SSP_SSCR0 0x00 /* SSC control 0 */ 374 1.4 thorpej #define SSP_SSCR1 0x04 /* SSC control 1 */ 375 1.4 thorpej #define SSP_SSSR 0x08 /* SSP status */ 376 1.4 thorpej #define SSP_SSITR 0x0c /* SSP interrupt test */ 377 1.4 thorpej #define SSP_SSDR 0x10 /* SSP data */ 378 1.4 thorpej 379 1.4 thorpej #define SSP_SSCR0_DSIZE(x) ((x) - 1)/* data size: 4..16 */ 380 1.4 thorpej #define SSP_SSCR0_FRF_SPI (0 << 4) /* Motorola Serial Periph Iface */ 381 1.4 thorpej #define SSP_SSCR0_FRF_SSP (1U << 4)/* TI Sync. Serial Protocol */ 382 1.4 thorpej #define SSP_SSCR0_FRF_UWIRE (2U << 4)/* NatSemi Microwire */ 383 1.4 thorpej #define SSP_SSCR0_FRF_rsvd (3U << 4)/* reserved */ 384 1.4 thorpej #define SSP_SSCR0_ECS (1U << 6)/* external clock select */ 385 1.4 thorpej #define SSP_SSCR0_SSE (1U << 7)/* sync. serial port enable */ 386 1.4 thorpej #define SSP_SSCR0_SCR(x) ((x) << 8)/* serial clock rate */ 387 1.4 thorpej /* bit rate = 3.6864 * 10e6 / 388 1.4 thorpej (2 * (SCR + 1)) */ 389 1.4 thorpej 390 1.4 thorpej #define SSP_SSCR1_RIE (1U << 0)/* Rx FIFO interrupt enable */ 391 1.4 thorpej #define SSP_SSCR1_TIE (1U << 1)/* Tx FIFO interrupt enable */ 392 1.4 thorpej #define SSP_SSCR1_LBM (1U << 2)/* loopback mode enable */ 393 1.4 thorpej #define SSP_SSCR1_SPO (1U << 3)/* Moto SPI SSCLK pol. (1 = high) */ 394 1.4 thorpej #define SSP_SSCR1_SPH (1U << 4)/* Moto SPI SSCLK phase: 395 1.4 thorpej 0 = inactive full at start, 396 1.4 thorpej 1/2 at end of frame 397 1.4 thorpej 1 = inactive 1/2 at start, 398 1.4 thorpej full at end of frame */ 399 1.4 thorpej #define SSP_SSCR1_MWDS (1U << 5)/* Microwire data size: 400 1.4 thorpej 0 = 8 bit 401 1.4 thorpej 1 = 16 bit */ 402 1.4 thorpej #define SSP_SSCR1_TFT (((x) - 1) << 6) /* Tx FIFO threshold */ 403 1.4 thorpej #define SSP_SSCR1_RFT (((x) - 1) << 10)/* Rx FIFO threshold */ 404 1.4 thorpej #define SSP_SSCR1_EFWR (1U << 14)/* enab. FIFO write/read */ 405 1.4 thorpej #define SSP_SSCR1_STRF (1U << 15)/* FIFO write/read FIFO select: 406 1.4 thorpej 0 = Tx FIFO 407 1.4 thorpej 1 = Rx FIFO */ 408 1.4 thorpej 409 1.4 thorpej #define SSP_SSSR_TNF (1U << 2)/* Tx FIFO not full */ 410 1.4 thorpej #define SSP_SSSR_RNE (1U << 3)/* Rx FIFO not empty */ 411 1.4 thorpej #define SSP_SSSR_BSY (1U << 4)/* SSP is busy */ 412 1.4 thorpej #define SSP_SSSR_TFS (1U << 5)/* Tx FIFO service request */ 413 1.4 thorpej #define SSP_SSSR_RFS (1U << 6)/* Rx FIFO service request */ 414 1.4 thorpej #define SSP_SSSR_ROR (1U << 7)/* Rx FIFO overrun */ 415 1.4 thorpej #define SSP_SSSR_TFL(x) (((x) >> 8) & 0xf) /* Tx FIFO level */ 416 1.4 thorpej #define SSP_SSSR_RFL(x) (((x) >> 12) & 0xf)/* Rx FIFO level */ 417 1.4 thorpej 418 1.4 thorpej #define SSP_SSITR_TTFS (1U << 5)/* Test Tx FIFO service */ 419 1.4 thorpej #define SSP_SSITR_TRFS (1U << 6)/* Test Rx FIFO service */ 420 1.4 thorpej #define SSP_SSITR_TROR (1U << 7)/* Test Rx overrun */ 421 1.10 briggs 422 1.10 briggs /* 423 1.10 briggs * Peripheral Bus Interface Unit 424 1.10 briggs */ 425 1.10 briggs 426 1.10 briggs #define PBIU_PBCR 0x00 /* PBIU Control Register */ 427 1.10 briggs #define PBIU_PBBAR0 0x08 /* PBIU Base Address Register 0 */ 428 1.10 briggs #define PBIU_PBLR0 0x0c /* PBIU Limit Register 0 */ 429 1.10 briggs #define PBIU_PBBAR1 0x10 /* PBIU Base Address Register 1 */ 430 1.10 briggs #define PBIU_PBLR1 0x14 /* PBIU Limit Register 1 */ 431 1.10 briggs #define PBIU_PBBAR2 0x18 /* PBIU Base Address Register 2 */ 432 1.10 briggs #define PBIU_PBLR2 0x1c /* PBIU Limit Register 2 */ 433 1.10 briggs #define PBIU_PBBAR3 0x20 /* PBIU Base Address Register 3 */ 434 1.10 briggs #define PBIU_PBLR3 0x24 /* PBIU Limit Register 3 */ 435 1.10 briggs #define PBIU_PBBAR4 0x28 /* PBIU Base Address Register 4 */ 436 1.10 briggs #define PBIU_PBLR4 0x2c /* PBIU Limit Register 4 */ 437 1.10 briggs #define PBIU_PBBAR5 0x30 /* PBIU Base Address Register 5 */ 438 1.10 briggs #define PBIU_PBLR5 0x34 /* PBIU Limit Register 5 */ 439 1.10 briggs #define PBIU_DSCR 0x38 /* PBIU Drive Strength Control Reg. */ 440 1.10 briggs #define PBIU_MBR0 0x40 /* PBIU Memory-less Boot Reg. 0 */ 441 1.10 briggs #define PBIU_MBR1 0x60 /* PBIU Memory-less Boot Reg. 1 */ 442 1.10 briggs #define PBIU_MBR2 0x64 /* PBIU Memory-less Boot Reg. 2 */ 443 1.11 thorpej 444 1.11 thorpej #define PBIU_PBCR_PBIEN (1 << 0) 445 1.11 thorpej #define PBIU_PBCR_PBI100 (1 << 1) 446 1.11 thorpej #define PBIU_PBCR_PBI66 (2 << 1) 447 1.11 thorpej #define PBIU_PBCR_PBI33 (3 << 1) 448 1.11 thorpej #define PBIU_PBCR_PBBEN (1 << 3) 449 1.11 thorpej 450 1.11 thorpej #define PBIU_PBARx_WIDTH8 (0 << 0) 451 1.11 thorpej #define PBIU_PBARx_WIDTH16 (1 << 0) 452 1.11 thorpej #define PBIU_PBARx_WIDTH32 (2 << 0) 453 1.11 thorpej #define PBIU_PBARx_ADWAIT4 (0 << 2) 454 1.11 thorpej #define PBIU_PBARx_ADWAIT8 (1 << 2) 455 1.11 thorpej #define PBIU_PBARx_ADWAIT12 (2 << 2) 456 1.11 thorpej #define PBIU_PBARx_ADWAIT16 (3 << 2) 457 1.11 thorpej #define PBIU_PBARx_ADWAIT20 (4 << 2) 458 1.11 thorpej #define PBIU_PBARx_RCWAIT1 (0 << 6) 459 1.11 thorpej #define PBIU_PBARx_RCWAIT4 (1 << 6) 460 1.11 thorpej #define PBIU_PBARx_RCWAIT8 (2 << 6) 461 1.11 thorpej #define PBIU_PBARx_RCWAIT12 (3 << 6) 462 1.11 thorpej #define PBIU_PBARx_RCWAIT16 (4 << 6) 463 1.11 thorpej #define PBIU_PBARx_RCWAIT20 (5 << 6) 464 1.11 thorpej #define PBIU_PBARx_FWE (1 << 9) 465 1.11 thorpej #define PBIU_BASE_MASK 0xfffff000U 466 1.11 thorpej 467 1.11 thorpej #define PBIU_PBLRx_SIZE(x) (~((x) - 1)) 468 1.10 briggs 469 1.10 briggs /* 470 1.10 briggs * Messaging Unit 471 1.10 briggs */ 472 1.10 briggs #define MU_IMR0 0x0010 /* MU Inbound Message Register 0 */ 473 1.10 briggs #define MU_IMR1 0x0014 /* MU Inbound Message Register 1 */ 474 1.10 briggs #define MU_OMR0 0x0018 /* MU Outbound Message Register 0 */ 475 1.10 briggs #define MU_OMR1 0x001c /* MU Outbound Message Register 1 */ 476 1.10 briggs #define MU_IDR 0x0020 /* MU Inbound Doorbell Register */ 477 1.10 briggs #define MU_IISR 0x0024 /* MU Inbound Interrupt Status Reg */ 478 1.10 briggs #define MU_IIMR 0x0028 /* MU Inbound Interrupt Mask Reg */ 479 1.10 briggs #define MU_ODR 0x002c /* MU Outbound Doorbell Register */ 480 1.10 briggs #define MU_OISR 0x0030 /* MU Outbound Interrupt Status Reg */ 481 1.10 briggs #define MU_OIMR 0x0034 /* MU Outbound Interrupt Mask Reg */ 482 1.10 briggs #define MU_MUCR 0x0050 /* MU Configuration Register */ 483 1.10 briggs #define MU_QBAR 0x0054 /* MU Queue Base Address Register */ 484 1.10 briggs #define MU_IFHPR 0x0060 /* MU Inbound Free Head Pointer Reg */ 485 1.10 briggs #define MU_IFTPR 0x0064 /* MU Inbound Free Tail Pointer Reg */ 486 1.10 briggs #define MU_IPHPR 0x0068 /* MU Inbound Post Head Pointer Reg */ 487 1.10 briggs #define MU_IPTPR 0x006c /* MU Inbound Post Tail Pointer Reg */ 488 1.10 briggs #define MU_OFHPR 0x0070 /* MU Outbound Free Head Pointer Reg */ 489 1.10 briggs #define MU_OFTPR 0x0074 /* MU Outbound Free Tail Pointer Reg */ 490 1.10 briggs #define MU_OPHPR 0x0078 /* MU Outbound Post Head Pointer Reg */ 491 1.10 briggs #define MU_OPTPR 0x007c /* MU Outbound Post Tail Pointer Reg */ 492 1.10 briggs #define MU_IAR 0x0080 /* MU Index Address Register */ 493 1.10 briggs 494 1.10 briggs #define MU_IIMR_IRI (1 << 6) /* Index Register Interrupt */ 495 1.10 briggs #define MU_IIMR_OFQFI (1 << 5) /* Outbound Free Queue Full Int. */ 496 1.10 briggs #define MU_IIMR_IPQI (1 << 4) /* Inbound Post Queue Interrupt */ 497 1.10 briggs #define MU_IIMR_EDI (1 << 3) /* Error Doorbell Interrupt */ 498 1.10 briggs #define MU_IIMR_IDI (1 << 2) /* Inbound Doorbell Interrupt */ 499 1.10 briggs #define MU_IIMR_IM1I (1 << 1) /* Inbound Message 1 Interrupt */ 500 1.10 briggs #define MU_IIMR_IM0I (1 << 0) /* Inbound Message 0 Interrupt */ 501 1.1 thorpej 502 1.1 thorpej #endif /* _ARM_XSCALE_I80321REG_H_ */ 503