1883bd55aSPoul-Henning Kamp /*- 2*4d846d26SWarner Losh * SPDX-License-Identifier: BSD-2-Clause 383ef78beSPedro F. Giffuni * 4883bd55aSPoul-Henning Kamp * Copyright (c) 2004 John Birrell 5883bd55aSPoul-Henning Kamp * All rights reserved. 6883bd55aSPoul-Henning Kamp * 7cf7fbde4SWarner Losh * Redistribution and use in source and binary forms, with or without 8cf7fbde4SWarner Losh * modification, are permitted provided that the following conditions 9cf7fbde4SWarner Losh * are met: 10cf7fbde4SWarner Losh * 1. Redistributions of source code must retain the above copyright 11cf7fbde4SWarner Losh * notice, this list of conditions and the following disclaimer. 12cf7fbde4SWarner Losh * 2. Redistributions in binary form must reproduce the above copyright 13cf7fbde4SWarner Losh * notice, this list of conditions and the following disclaimer in the 14cf7fbde4SWarner Losh * documentation and/or other materials provided with the distribution. 15883bd55aSPoul-Henning Kamp * 16cf7fbde4SWarner Losh * THIS SOFTWARE IS PROVIDED BY AUTHOR AND CONTRIBUTORS ``AS IS'' AND 17cf7fbde4SWarner Losh * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 18cf7fbde4SWarner Losh * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 19cf7fbde4SWarner Losh * ARE DISCLAIMED. IN NO EVENT SHALL AUTHOR OR CONTRIBUTORS BE LIABLE 20cf7fbde4SWarner Losh * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 21cf7fbde4SWarner Losh * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 22cf7fbde4SWarner Losh * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 23cf7fbde4SWarner Losh * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 24cf7fbde4SWarner Losh * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 25cf7fbde4SWarner Losh * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 26cf7fbde4SWarner Losh * SUCH DAMAGE. 27cf7fbde4SWarner Losh */ 28cf7fbde4SWarner Losh 29cf7fbde4SWarner Losh /* AMD Elan SC520 Memory Mapped Configuration Region (MMCR). 30883bd55aSPoul-Henning Kamp * 31883bd55aSPoul-Henning Kamp * The layout of this structure is documented by AMD in the Elan SC520 32883bd55aSPoul-Henning Kamp * Microcontroller Register Set Manual. The field names match those 33883bd55aSPoul-Henning Kamp * described in that document. The overall structure size must be 4096 34883bd55aSPoul-Henning Kamp * bytes. Ignore fields with the 'pad' prefix - they are only present for 35883bd55aSPoul-Henning Kamp * alignment purposes. 36883bd55aSPoul-Henning Kamp */ 37883bd55aSPoul-Henning Kamp 38883bd55aSPoul-Henning Kamp #ifndef _MACHINE_ELAN_MMCR_H_ 39883bd55aSPoul-Henning Kamp #define _MACHINE_ELAN_MMCR_H_ 1 40883bd55aSPoul-Henning Kamp 41883bd55aSPoul-Henning Kamp struct elan_mmcr { 42883bd55aSPoul-Henning Kamp /* CPU */ 43883bd55aSPoul-Henning Kamp u_int16_t REVID; 44883bd55aSPoul-Henning Kamp u_int8_t CPUCTL; 45883bd55aSPoul-Henning Kamp u_int8_t pad_0x003[0xd]; 46883bd55aSPoul-Henning Kamp 47883bd55aSPoul-Henning Kamp /* SDRAM Controller */ 48883bd55aSPoul-Henning Kamp u_int16_t DRCCTL; 49883bd55aSPoul-Henning Kamp u_int16_t DRCTMCTL; 50883bd55aSPoul-Henning Kamp u_int16_t DRCCFG; 51883bd55aSPoul-Henning Kamp u_int16_t DRCBENDADR; 52883bd55aSPoul-Henning Kamp u_int8_t pad_0x01a[0x6]; 53883bd55aSPoul-Henning Kamp u_int8_t ECCCTL; 54883bd55aSPoul-Henning Kamp u_int8_t ECCSTA; 55883bd55aSPoul-Henning Kamp u_int8_t ECCCKBPOS; 56883bd55aSPoul-Henning Kamp u_int8_t ECCCKTEST; 57883bd55aSPoul-Henning Kamp u_int32_t ECCSBADD; 58883bd55aSPoul-Henning Kamp u_int32_t ECCMBADD; 59883bd55aSPoul-Henning Kamp u_int8_t pad_0x02c[0x14]; 60883bd55aSPoul-Henning Kamp 61883bd55aSPoul-Henning Kamp /* SDRAM Buffer */ 62883bd55aSPoul-Henning Kamp u_int8_t DBCTL; 63883bd55aSPoul-Henning Kamp u_int8_t pad_0x041[0xf]; 64883bd55aSPoul-Henning Kamp 65883bd55aSPoul-Henning Kamp /* ROM/Flash Controller */ 66883bd55aSPoul-Henning Kamp u_int16_t BOOTCSCTL; 67883bd55aSPoul-Henning Kamp u_int8_t pad_0x052[0x2]; 68883bd55aSPoul-Henning Kamp u_int16_t ROMCS1CTL; 69883bd55aSPoul-Henning Kamp u_int16_t ROMCS2CTL; 70883bd55aSPoul-Henning Kamp u_int8_t pad_0x058[0x8]; 71883bd55aSPoul-Henning Kamp 72883bd55aSPoul-Henning Kamp /* PCI Bus Host Bridge */ 73883bd55aSPoul-Henning Kamp u_int16_t HBCTL; 74883bd55aSPoul-Henning Kamp u_int16_t HBTGTIRQCTL; 75883bd55aSPoul-Henning Kamp u_int16_t HBTGTIRQSTA; 76883bd55aSPoul-Henning Kamp u_int16_t HBMSTIRQCTL; 77883bd55aSPoul-Henning Kamp u_int16_t HBMSTIRQSTA; 78883bd55aSPoul-Henning Kamp u_int8_t pad_0x06a[0x2]; 79883bd55aSPoul-Henning Kamp u_int32_t MSTINTADD; 80883bd55aSPoul-Henning Kamp 81883bd55aSPoul-Henning Kamp /* System Arbitration */ 82883bd55aSPoul-Henning Kamp u_int8_t SYSARBCTL; 83883bd55aSPoul-Henning Kamp u_int8_t PCIARBSTA; 84883bd55aSPoul-Henning Kamp u_int16_t SYSARBMENB; 85883bd55aSPoul-Henning Kamp u_int32_t ARBPRICTL; 86883bd55aSPoul-Henning Kamp u_int8_t pad_0x078[0x8]; 87883bd55aSPoul-Henning Kamp 88883bd55aSPoul-Henning Kamp /* System Address Mapping */ 89883bd55aSPoul-Henning Kamp u_int32_t ADDDECCTL; 90883bd55aSPoul-Henning Kamp u_int32_t WPVSTA; 91883bd55aSPoul-Henning Kamp u_int32_t PAR0; 92883bd55aSPoul-Henning Kamp u_int32_t PAR1; 93883bd55aSPoul-Henning Kamp u_int32_t PAR2; 94883bd55aSPoul-Henning Kamp u_int32_t PAR3; 95883bd55aSPoul-Henning Kamp u_int32_t PAR4; 96883bd55aSPoul-Henning Kamp u_int32_t PAR5; 97883bd55aSPoul-Henning Kamp u_int32_t PAR6; 98883bd55aSPoul-Henning Kamp u_int32_t PAR7; 99883bd55aSPoul-Henning Kamp u_int32_t PAR8; 100883bd55aSPoul-Henning Kamp u_int32_t PAR9; 101883bd55aSPoul-Henning Kamp u_int32_t PAR10; 102883bd55aSPoul-Henning Kamp u_int32_t PAR11; 103883bd55aSPoul-Henning Kamp u_int32_t PAR12; 104883bd55aSPoul-Henning Kamp u_int32_t PAR13; 105883bd55aSPoul-Henning Kamp u_int32_t PAR14; 106883bd55aSPoul-Henning Kamp u_int32_t PAR15; 107883bd55aSPoul-Henning Kamp u_int8_t pad_0x0c8[0xb38]; 108883bd55aSPoul-Henning Kamp 109883bd55aSPoul-Henning Kamp /* GP Bus Controller */ 110883bd55aSPoul-Henning Kamp u_int8_t GPECHO; 111883bd55aSPoul-Henning Kamp u_int8_t GPCSDW; 112883bd55aSPoul-Henning Kamp u_int16_t GPCSQUAL; 113883bd55aSPoul-Henning Kamp u_int8_t pad_0xc04[0x4]; 114883bd55aSPoul-Henning Kamp u_int8_t GPCSRT; 115883bd55aSPoul-Henning Kamp u_int8_t GPCSPW; 116883bd55aSPoul-Henning Kamp u_int8_t GPCSOFF; 117883bd55aSPoul-Henning Kamp u_int8_t GPRDW; 118883bd55aSPoul-Henning Kamp u_int8_t GPRDOFF; 119883bd55aSPoul-Henning Kamp u_int8_t GPWRW; 120883bd55aSPoul-Henning Kamp u_int8_t GPWROFF; 121883bd55aSPoul-Henning Kamp u_int8_t GPALEW; 122883bd55aSPoul-Henning Kamp u_int8_t GPALEOFF; 123883bd55aSPoul-Henning Kamp u_int8_t pad_0xc11[0xf]; 124883bd55aSPoul-Henning Kamp 125883bd55aSPoul-Henning Kamp /* Programmable Input/Output */ 126883bd55aSPoul-Henning Kamp u_int16_t PIOPFS15_0; 127883bd55aSPoul-Henning Kamp u_int16_t PIOPFS31_16; 128883bd55aSPoul-Henning Kamp u_int8_t CSPFS; 129883bd55aSPoul-Henning Kamp u_int8_t pad_0xc25; 130883bd55aSPoul-Henning Kamp u_int8_t CLKSEL; 131883bd55aSPoul-Henning Kamp u_int8_t pad_0xc27; 132883bd55aSPoul-Henning Kamp u_int16_t DSCTL; 133883bd55aSPoul-Henning Kamp u_int16_t PIODIR15_0; 134883bd55aSPoul-Henning Kamp u_int16_t PIODIR31_16; 135883bd55aSPoul-Henning Kamp u_int8_t pad_0xc2e[0x2]; 136883bd55aSPoul-Henning Kamp u_int16_t PIODATA15_0; 137883bd55aSPoul-Henning Kamp u_int16_t PIODATA31_16; 138883bd55aSPoul-Henning Kamp u_int16_t PIOSET15_0; 139883bd55aSPoul-Henning Kamp u_int16_t PIOSET31_16; 140883bd55aSPoul-Henning Kamp u_int16_t PIOCLR15_0; 141883bd55aSPoul-Henning Kamp u_int16_t PIOCLR31_16; 142883bd55aSPoul-Henning Kamp u_int8_t pad_0xc3c[0x24]; 143883bd55aSPoul-Henning Kamp 144883bd55aSPoul-Henning Kamp /* Software Timer */ 145883bd55aSPoul-Henning Kamp u_int16_t SWTMRMILLI; 146883bd55aSPoul-Henning Kamp u_int16_t SWTMRMICRO; 147883bd55aSPoul-Henning Kamp u_int8_t SWTMRCFG; 148883bd55aSPoul-Henning Kamp u_int8_t pad_0xc65[0xb]; 149883bd55aSPoul-Henning Kamp 150883bd55aSPoul-Henning Kamp /* General-Purpose Timers */ 151883bd55aSPoul-Henning Kamp u_int8_t GPTMRSTA; 152883bd55aSPoul-Henning Kamp u_int8_t pad_0xc71; 153883bd55aSPoul-Henning Kamp u_int16_t GPTMR0CTL; 154883bd55aSPoul-Henning Kamp u_int16_t GPTMR0CNT; 155883bd55aSPoul-Henning Kamp u_int16_t GPTMR0MAXCMPA; 156883bd55aSPoul-Henning Kamp u_int16_t GPTMR0MAXCMPB; 157883bd55aSPoul-Henning Kamp u_int16_t GPTMR1CTL; 158883bd55aSPoul-Henning Kamp u_int16_t GPTMR1CNT; 159883bd55aSPoul-Henning Kamp u_int16_t GPTMR1MAXCMPA; 160883bd55aSPoul-Henning Kamp u_int16_t GPTMR1MAXCMPB; 161883bd55aSPoul-Henning Kamp u_int16_t GPTMR2CTL; 162883bd55aSPoul-Henning Kamp u_int16_t GPTMR2CNT; 163883bd55aSPoul-Henning Kamp u_int8_t pad_0xc86[0x8]; 164883bd55aSPoul-Henning Kamp u_int16_t GPTMR2MAXCMPA; 165883bd55aSPoul-Henning Kamp u_int8_t pad_0xc90[0x20]; 166883bd55aSPoul-Henning Kamp 167883bd55aSPoul-Henning Kamp /* Watchdog Timer */ 168883bd55aSPoul-Henning Kamp u_int16_t WDTMRCTL; 169883bd55aSPoul-Henning Kamp u_int16_t WDTMRCNTL; 170883bd55aSPoul-Henning Kamp u_int16_t WDTMRCNTH; 171883bd55aSPoul-Henning Kamp u_int8_t pad_0xcb6[0xa]; 172883bd55aSPoul-Henning Kamp 173883bd55aSPoul-Henning Kamp /* UART Serial Ports */ 174883bd55aSPoul-Henning Kamp u_int8_t UART1CTL; 175883bd55aSPoul-Henning Kamp u_int8_t UART1STA; 176883bd55aSPoul-Henning Kamp u_int8_t UART1FCRSHAD; 177883bd55aSPoul-Henning Kamp u_int8_t pad_0xcc3; 178883bd55aSPoul-Henning Kamp u_int8_t UART2CTL; 179883bd55aSPoul-Henning Kamp u_int8_t UART2STA; 180883bd55aSPoul-Henning Kamp u_int8_t UART2FCRSHAD; 181883bd55aSPoul-Henning Kamp u_int8_t pad_0xcc7[0x9]; 182883bd55aSPoul-Henning Kamp 183883bd55aSPoul-Henning Kamp /* Synchronous Serial Interface */ 184883bd55aSPoul-Henning Kamp u_int8_t SSICTL; 185883bd55aSPoul-Henning Kamp u_int8_t SSIXMIT; 186883bd55aSPoul-Henning Kamp u_int8_t SSICMD; 187883bd55aSPoul-Henning Kamp u_int8_t SSISTA; 188883bd55aSPoul-Henning Kamp u_int8_t SSIRCV; 189883bd55aSPoul-Henning Kamp u_int8_t pad_0xcd5[0x2b]; 190883bd55aSPoul-Henning Kamp 191883bd55aSPoul-Henning Kamp /* Programmable Interrupt Controller */ 192883bd55aSPoul-Henning Kamp u_int8_t PICICR; 193883bd55aSPoul-Henning Kamp u_int8_t pad_0xd01; 194883bd55aSPoul-Henning Kamp u_int8_t MPICMODE; 195883bd55aSPoul-Henning Kamp u_int8_t SL1PICMODE; 196883bd55aSPoul-Henning Kamp u_int8_t SL2PICMODE; 197883bd55aSPoul-Henning Kamp u_int8_t pad_0xd05[0x3]; 198883bd55aSPoul-Henning Kamp u_int16_t SWINT16_1; 199883bd55aSPoul-Henning Kamp u_int8_t SWINT22_17; 200883bd55aSPoul-Henning Kamp u_int8_t pad_0xd0b[0x5]; 201883bd55aSPoul-Henning Kamp u_int16_t INTPINPOL; 202883bd55aSPoul-Henning Kamp u_int8_t pad_0xd12[0x2]; 203883bd55aSPoul-Henning Kamp u_int16_t PCIHOSTMAP; 204883bd55aSPoul-Henning Kamp u_int8_t pad_0xd16[0x2]; 205883bd55aSPoul-Henning Kamp u_int16_t ECCMAP; 206883bd55aSPoul-Henning Kamp u_int8_t GPTMR0MAP; 207883bd55aSPoul-Henning Kamp u_int8_t GPTMR1MAP; 208883bd55aSPoul-Henning Kamp u_int8_t GPTMR2MAP; 209883bd55aSPoul-Henning Kamp u_int8_t pad_0xd1d[0x3]; 210883bd55aSPoul-Henning Kamp u_int8_t PIT0MAP; 211883bd55aSPoul-Henning Kamp u_int8_t PIT1MAP; 212883bd55aSPoul-Henning Kamp u_int8_t PIT2MAP; 213883bd55aSPoul-Henning Kamp u_int8_t pad_0xd23[0x5]; 214883bd55aSPoul-Henning Kamp u_int8_t UART1MAP; 215883bd55aSPoul-Henning Kamp u_int8_t UART2MAP; 216883bd55aSPoul-Henning Kamp u_int8_t pad_0xd2a[0x6]; 217883bd55aSPoul-Henning Kamp u_int8_t PCIINTAMAP; 218883bd55aSPoul-Henning Kamp u_int8_t PCIINTBMAP; 219883bd55aSPoul-Henning Kamp u_int8_t PCIINTCMAP; 220883bd55aSPoul-Henning Kamp u_int8_t PCIINTDMAP; 221883bd55aSPoul-Henning Kamp u_int8_t pad_0xd34[0xc]; 222883bd55aSPoul-Henning Kamp u_int8_t DMABCINTMAP; 223883bd55aSPoul-Henning Kamp u_int8_t SSIMAP; 224883bd55aSPoul-Henning Kamp u_int8_t WDTMAP; 225883bd55aSPoul-Henning Kamp u_int8_t RTCMAP; 226883bd55aSPoul-Henning Kamp u_int8_t WPVMAP; 227883bd55aSPoul-Henning Kamp u_int8_t ICEMAP; 228883bd55aSPoul-Henning Kamp u_int8_t FERRMAP; 229883bd55aSPoul-Henning Kamp u_int8_t pad_0xd47[0x9]; 230883bd55aSPoul-Henning Kamp u_int8_t GP0IMAP; 231883bd55aSPoul-Henning Kamp u_int8_t GP1IMAP; 232883bd55aSPoul-Henning Kamp u_int8_t GP2IMAP; 233883bd55aSPoul-Henning Kamp u_int8_t GP3IMAP; 234883bd55aSPoul-Henning Kamp u_int8_t GP4IMAP; 235883bd55aSPoul-Henning Kamp u_int8_t GP5IMAP; 236883bd55aSPoul-Henning Kamp u_int8_t GP6IMAP; 237883bd55aSPoul-Henning Kamp u_int8_t GP7IMAP; 238883bd55aSPoul-Henning Kamp u_int8_t GP8IMAP; 239883bd55aSPoul-Henning Kamp u_int8_t GP9IMAP; 240883bd55aSPoul-Henning Kamp u_int8_t GP10IMAP; 241883bd55aSPoul-Henning Kamp u_int8_t pad_0xd5b[0x15]; 242883bd55aSPoul-Henning Kamp 243883bd55aSPoul-Henning Kamp /* Reset Generation */ 244883bd55aSPoul-Henning Kamp u_int8_t SYSINFO; 245883bd55aSPoul-Henning Kamp u_int8_t pad_0xd71; 246883bd55aSPoul-Henning Kamp u_int8_t RESCFG; 247883bd55aSPoul-Henning Kamp u_int8_t pad_0xd73; 248883bd55aSPoul-Henning Kamp u_int8_t RESSTA; 249883bd55aSPoul-Henning Kamp u_int8_t pad_0xd75[0xb]; 250883bd55aSPoul-Henning Kamp 251883bd55aSPoul-Henning Kamp /* GP DMA Controller */ 252883bd55aSPoul-Henning Kamp u_int8_t GPDMACTL; 253883bd55aSPoul-Henning Kamp u_int8_t GPDMAMMIO; 254883bd55aSPoul-Henning Kamp u_int16_t GPDMAEXTCHMAPA; 255883bd55aSPoul-Henning Kamp u_int16_t GPDMAEXTCHMAPB; 256883bd55aSPoul-Henning Kamp u_int8_t GPDMAEXTPG0; 257883bd55aSPoul-Henning Kamp u_int8_t GPDMAEXTPG1; 258883bd55aSPoul-Henning Kamp u_int8_t GPDMAEXTPG2; 259883bd55aSPoul-Henning Kamp u_int8_t GPDMAEXTPG3; 260883bd55aSPoul-Henning Kamp u_int8_t GPDMAEXTPG5; 261883bd55aSPoul-Henning Kamp u_int8_t GPDMAEXTPG6; 262883bd55aSPoul-Henning Kamp u_int8_t GPDMAEXTPG7; 263883bd55aSPoul-Henning Kamp u_int8_t pad_0xd8d[0x3]; 264883bd55aSPoul-Henning Kamp u_int8_t GPDMAEXTTC3; 265883bd55aSPoul-Henning Kamp u_int8_t GPDMAEXTTC5; 266883bd55aSPoul-Henning Kamp u_int8_t GPDMAEXTTC6; 267883bd55aSPoul-Henning Kamp u_int8_t GPDMAEXTTC7; 268883bd55aSPoul-Henning Kamp u_int8_t pad_0xd94[0x4]; 269883bd55aSPoul-Henning Kamp u_int8_t GPDMABCCTL; 270883bd55aSPoul-Henning Kamp u_int8_t GPDMABCSTA; 271883bd55aSPoul-Henning Kamp u_int8_t GPDMABSINTENB; 272883bd55aSPoul-Henning Kamp u_int8_t GPDMABCVAL; 273883bd55aSPoul-Henning Kamp u_int8_t pad_0xd9c[0x4]; 274883bd55aSPoul-Henning Kamp u_int16_t GPDMANXTADDL3; 275883bd55aSPoul-Henning Kamp u_int16_t GPDMANXTADDH3; 276883bd55aSPoul-Henning Kamp u_int16_t GPDMANXTADDL5; 277883bd55aSPoul-Henning Kamp u_int16_t GPDMANXTADDH5; 278883bd55aSPoul-Henning Kamp u_int16_t GPDMANXTADDL6; 279883bd55aSPoul-Henning Kamp u_int16_t GPDMANXTADDH6; 280883bd55aSPoul-Henning Kamp u_int16_t GPDMANXTADDL7; 281883bd55aSPoul-Henning Kamp u_int16_t GPDMANXTADDH7; 282883bd55aSPoul-Henning Kamp u_int16_t GPDMANXTTCL3; 283883bd55aSPoul-Henning Kamp u_int8_t GPDMANXTTCH3; 284883bd55aSPoul-Henning Kamp u_int8_t pad_0xdb3; 285883bd55aSPoul-Henning Kamp u_int16_t GPDMANXTTCL5; 286883bd55aSPoul-Henning Kamp u_int8_t GPDMANXTTCH5; 287883bd55aSPoul-Henning Kamp u_int8_t pad_0xdb7; 288883bd55aSPoul-Henning Kamp u_int16_t GPDMANXTTCL6; 289883bd55aSPoul-Henning Kamp u_int8_t GPDMANXTTCH6; 290883bd55aSPoul-Henning Kamp u_int8_t pad_0xdbb; 291883bd55aSPoul-Henning Kamp u_int16_t GPDMANXTTCL7; 292883bd55aSPoul-Henning Kamp u_int8_t GPDMANXTTCH7; 293883bd55aSPoul-Henning Kamp u_int8_t pad_0xdc0[0x240]; 294883bd55aSPoul-Henning Kamp }; 295883bd55aSPoul-Henning Kamp 296883bd55aSPoul-Henning Kamp CTASSERT(sizeof(struct elan_mmcr) == 4096); 297883bd55aSPoul-Henning Kamp 298883bd55aSPoul-Henning Kamp extern volatile struct elan_mmcr * elan_mmcr; 299883bd55aSPoul-Henning Kamp 300883bd55aSPoul-Henning Kamp #endif /* _MACHINE_ELAN_MMCR_H_ */ 301