Home | History | Annotate | Line # | Download | only in ibm4xx
ibm405gp.h revision 1.5.4.2
      1  1.5.4.2  nathanw /*	$NetBSD: ibm405gp.h,v 1.5.4.2 2002/08/13 02:18:46 nathanw Exp $	*/
      2  1.5.4.2  nathanw 
      3  1.5.4.2  nathanw /*
      4  1.5.4.2  nathanw  * Copyright 2001 Wasabi Systems, Inc.
      5  1.5.4.2  nathanw  * All rights reserved.
      6  1.5.4.2  nathanw  *
      7  1.5.4.2  nathanw  * Written by Simon Burge and Eduardo Horvath for Wasabi Systems, Inc.
      8  1.5.4.2  nathanw  *
      9  1.5.4.2  nathanw  * Redistribution and use in source and binary forms, with or without
     10  1.5.4.2  nathanw  * modification, are permitted provided that the following conditions
     11  1.5.4.2  nathanw  * are met:
     12  1.5.4.2  nathanw  * 1. Redistributions of source code must retain the above copyright
     13  1.5.4.2  nathanw  *    notice, this list of conditions and the following disclaimer.
     14  1.5.4.2  nathanw  * 2. Redistributions in binary form must reproduce the above copyright
     15  1.5.4.2  nathanw  *    notice, this list of conditions and the following disclaimer in the
     16  1.5.4.2  nathanw  *    documentation and/or other materials provided with the distribution.
     17  1.5.4.2  nathanw  * 3. All advertising materials mentioning features or use of this software
     18  1.5.4.2  nathanw  *    must display the following acknowledgement:
     19  1.5.4.2  nathanw  *      This product includes software developed for the NetBSD Project by
     20  1.5.4.2  nathanw  *      Wasabi Systems, Inc.
     21  1.5.4.2  nathanw  * 4. The name of Wasabi Systems, Inc. may not be used to endorse
     22  1.5.4.2  nathanw  *    or promote products derived from this software without specific prior
     23  1.5.4.2  nathanw  *    written permission.
     24  1.5.4.2  nathanw  *
     25  1.5.4.2  nathanw  * THIS SOFTWARE IS PROVIDED BY WASABI SYSTEMS, INC. ``AS IS'' AND
     26  1.5.4.2  nathanw  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED
     27  1.5.4.2  nathanw  * TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
     28  1.5.4.2  nathanw  * PURPOSE ARE DISCLAIMED.  IN NO EVENT SHALL WASABI SYSTEMS, INC
     29  1.5.4.2  nathanw  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     30  1.5.4.2  nathanw  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     31  1.5.4.2  nathanw  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     32  1.5.4.2  nathanw  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     33  1.5.4.2  nathanw  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     34  1.5.4.2  nathanw  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     35  1.5.4.2  nathanw  * POSSIBILITY OF SUCH DAMAGE.
     36  1.5.4.2  nathanw  */
     37  1.5.4.2  nathanw 
     38  1.5.4.2  nathanw #ifndef _IBM4XX_IBM405GP_H_
     39  1.5.4.2  nathanw #define	_IBM4XX_IBM405GP_H_
     40  1.5.4.2  nathanw 
     41  1.5.4.2  nathanw /*
     42  1.5.4.2  nathanw  * Memory and PCI addresses
     43  1.5.4.2  nathanw  */
     44  1.5.4.2  nathanw 
     45  1.5.4.2  nathanw /* Local Memory and Peripherals */
     46  1.5.4.2  nathanw #define	LOCAL_MEM_START		0x00000000
     47  1.5.4.2  nathanw #define	LOCAL_MEM_END		0x7fffffff
     48  1.5.4.2  nathanw 
     49  1.5.4.2  nathanw /* PCI Memory - 1.625GB */
     50  1.5.4.2  nathanw #define	PCI_MEM_START		0x80000000
     51  1.5.4.2  nathanw #define	PCI_MEM_END		0xe7ffffff
     52  1.5.4.2  nathanw 
     53  1.5.4.2  nathanw /* PCI I/O - PCI I/O accesses from 0 to 64kB-1 (64kB) */
     54  1.5.4.2  nathanw #define	PCI_IO_LOW_START	0xe8000000
     55  1.5.4.2  nathanw #define	PCI_IO_LOW_END		0xe800ffff
     56  1.5.4.2  nathanw 
     57  1.5.4.2  nathanw /* PCI I/O - PCI I/O accesses from 8MB to 64MB-1 (56MB) */
     58  1.5.4.2  nathanw #define	PCI_IO_HIGH_START	0xe8800000
     59  1.5.4.2  nathanw #define	PCI_IO_HIGH_END		0xebffffff
     60  1.5.4.2  nathanw 
     61  1.5.4.2  nathanw /* PCI Configuaration Registers */
     62  1.5.4.2  nathanw #define	PCIC0_BASE		0xeec00000
     63  1.5.4.2  nathanw #define	PCIC0_CFGADDR		0x00
     64  1.5.4.2  nathanw #define	PCIC0_CFGDATA		0x04
     65  1.5.4.2  nathanw 
     66  1.5.4.2  nathanw #define	PCIC0_VENDID		0x00
     67  1.5.4.2  nathanw #define	PCIC0_DEVID		0x02
     68  1.5.4.2  nathanw #define	PCIC0_CMD		0x04
     69  1.5.4.2  nathanw #define	PCIC0_STATUS		0x06
     70  1.5.4.2  nathanw #define	PCIC0_REVID		0x08
     71  1.5.4.2  nathanw #define	PCIC0_CLS		0x09
     72  1.5.4.2  nathanw #define	PCIC0_CACHELS		0x0c
     73  1.5.4.2  nathanw #define	PCIC0_LATTIM		0x0d
     74  1.5.4.2  nathanw #define	PCIC0_HDTYPE		0x0e
     75  1.5.4.2  nathanw #define	PCIC0_BIST		0x0f
     76  1.5.4.2  nathanw #define	PCIC0_BAR0		0x10
     77  1.5.4.2  nathanw #define	PCIC0_BAR1		0x14		/* PCI name */
     78  1.5.4.2  nathanw #define	PCIC0_PTM1BAR		PCIC0_BAR1	/* 405GP name */
     79  1.5.4.2  nathanw #define	PCIC0_BAR2		0x18		/* PCI name */
     80  1.5.4.2  nathanw #define	PCIC0_PTM2BAR		PCIC0_BAR2	/* 405GP name */
     81  1.5.4.2  nathanw #define	PCIC0_BAR3		0x1C
     82  1.5.4.2  nathanw #define	PCIC0_BAR4		0x20
     83  1.5.4.2  nathanw #define	PCIC0_BAR5		0x24
     84  1.5.4.2  nathanw #define	PCIC0_SBSYSVID		0x2c
     85  1.5.4.2  nathanw #define	PCIC0_SBSYSID		0x2e
     86  1.5.4.2  nathanw #define	PCIC0_CAP		0x34
     87  1.5.4.2  nathanw #define	PCIC0_INTLN		0x3c
     88  1.5.4.2  nathanw #define	PCIC0_INTPN		0x3d
     89  1.5.4.2  nathanw #define	PCIC0_MINGNT		0x3e
     90  1.5.4.2  nathanw #define	PCIC0_MAXLTNCY		0x3f
     91  1.5.4.2  nathanw 
     92  1.5.4.2  nathanw #define	PCIC0_ICS		0x44	/* 405GP specific parameters */
     93  1.5.4.2  nathanw #define	PCIC0_ERREN		0x48
     94  1.5.4.2  nathanw #define	PCIC0_ERRSTS		0x49
     95  1.5.4.2  nathanw #define	PCIC0_BRDGOPT1		0x4a
     96  1.5.4.2  nathanw #define	PCIC0_PLBBESR0		0x4c
     97  1.5.4.2  nathanw #define	PCIC0_PLBBESR1		0x50
     98  1.5.4.2  nathanw #define	PCIC0_PLBBEAR		0x54
     99  1.5.4.2  nathanw #define	PCIC0_CAPID		0x58
    100  1.5.4.2  nathanw #define	PCIC0_NEXTIPTR		0x59
    101  1.5.4.2  nathanw #define	PCIC0_PMC		0x5a
    102  1.5.4.2  nathanw #define	PCIC0_PMCSR		0x5c
    103  1.5.4.2  nathanw #define	PCIC0_PMCSRBSE		0x5e
    104  1.5.4.2  nathanw #define	PCIC0_DATA		0x5f
    105  1.5.4.2  nathanw #define	PCIC0_BRDGOPT2		0x60
    106  1.5.4.2  nathanw #define	PCIC0_PMSCRR		0x64
    107  1.5.4.2  nathanw 
    108  1.5.4.2  nathanw 
    109  1.5.4.2  nathanw /* PCI Interrupt Acknowledge (read: 0xeed00000 0xeed00003 - 4 bytes) */
    110  1.5.4.2  nathanw #define	PCIIA0			0xeed00000
    111  1.5.4.2  nathanw 
    112  1.5.4.2  nathanw /* PCI Special Cycle (write: 0xeed00000 0xeed00003 - 4 bytes) */
    113  1.5.4.2  nathanw #define	PCISC0			0xeed00000
    114  1.5.4.2  nathanw 
    115  1.5.4.2  nathanw /* PCI Bridge Local Configuation Registers (0xef400000 0xef40003f - 64 bytes) */
    116  1.5.4.2  nathanw #define	PCIL0_BASE		0xef400000
    117  1.5.4.2  nathanw #define	PCIL0_PMM0LA		0x00	/* PCI Master Map 0: Local Address */
    118  1.5.4.2  nathanw #define	PCIL0_PMM0MA		0x04	/*		     Mask/Attribute */
    119  1.5.4.2  nathanw #define	PCIL0_PMM0PCILA		0x08	/*		     PCI Low Address */
    120  1.5.4.2  nathanw #define	PCIL0_PMM0PCIHA		0x0c	/*		     PCI High Address */
    121  1.5.4.2  nathanw #define	PCIL0_PMM1LA		0x10
    122  1.5.4.2  nathanw #define	PCIL0_PMM1MA		0x14
    123  1.5.4.2  nathanw #define	PCIL0_PMM1PCILA		0x18
    124  1.5.4.2  nathanw #define	PCIL0_PMM1PCIHA		0x1c
    125  1.5.4.2  nathanw #define	PCIL0_PMM2LA		0x20
    126  1.5.4.2  nathanw #define	PCIL0_PMM2MA		0x24
    127  1.5.4.2  nathanw #define	PCIL0_PMM2PCILA		0x28
    128  1.5.4.2  nathanw #define	PCIL0_PMM2PCIHA		0x2c
    129  1.5.4.2  nathanw #define	PCIL0_PTM1MS		0x30
    130  1.5.4.2  nathanw #define	PCIL0_PTM1LA		0x34
    131  1.5.4.2  nathanw #define	PCIL0_PTM2MS		0x38
    132  1.5.4.2  nathanw #define	PCIL0_PTM2LA		0x3c
    133  1.5.4.2  nathanw 
    134  1.5.4.2  nathanw /*
    135  1.5.4.2  nathanw  * Internal Peripherals
    136  1.5.4.2  nathanw  */
    137  1.5.4.2  nathanw 
    138  1.5.4.2  nathanw /* UART0 Registers */
    139  1.5.4.2  nathanw #define	UART0_BASE		0xef600300
    140  1.5.4.2  nathanw #define	UART0_RBR		0x00	/* R    Receiver Buffer Register */
    141  1.5.4.2  nathanw #define	UART0_THR		0x00	/*   W  Transmitter Holding Register */
    142  1.5.4.2  nathanw #define	UART0_IER		0x01	/* R/W  Interrupt Enable Register */
    143  1.5.4.2  nathanw #define	UART0_IIR		0x02	/* R    Interrupt Identification Register */
    144  1.5.4.2  nathanw #define	UART0_FCR		0x02	/*   W  FIFO Control Register */
    145  1.5.4.2  nathanw #define	UART0_LCR		0x03	/* R/W  Line Control Register */
    146  1.5.4.2  nathanw #define	UART0_MCR		0x04	/* R/W  Modem Control Register */
    147  1.5.4.2  nathanw #define	UART0_LSR		0x05	/* R/W  Line Status Register */
    148  1.5.4.2  nathanw #define	UART0_MSR		0x06	/* R/W  Modem Status Register */
    149  1.5.4.2  nathanw #define	UART0_SCR		0x07	/* R/W  Scratch Register */
    150  1.5.4.2  nathanw #define	UART0_DLL		0x00	/* R/W* Divisor Latch (LSB) */
    151  1.5.4.2  nathanw #define	UART0_DLM		0x01	/* R/W* Divisor Latch (MSB) */
    152  1.5.4.2  nathanw 
    153  1.5.4.2  nathanw /* UART1 Registers */
    154  1.5.4.2  nathanw #define	UART1_BASE		0xef600400
    155  1.5.4.2  nathanw #define	UART1_RBR		UART0_RBR /* R    Receiver Buffer Register */
    156  1.5.4.2  nathanw #define	UART1_THR		UART0_THR /*   W  Transmitter Holding Register */
    157  1.5.4.2  nathanw #define	UART1_IER		UART0_IER /* R/W  Interrupt Enable Register */
    158  1.5.4.2  nathanw #define	UART1_IIR		UART0_IIR /* R    Interrupt Identification Register */
    159  1.5.4.2  nathanw #define	UART1_FCR		UART0_FCR /*   W  FIFO Control Register */
    160  1.5.4.2  nathanw #define	UART1_LCR		UART0_LCR /* R/W  Line Control Register */
    161  1.5.4.2  nathanw #define	UART1_MCR		UART0_MCR /* R/W  Modem Control Register */
    162  1.5.4.2  nathanw #define	UART1_LSR		UART0_LSR /* R/W  Line Status Register */
    163  1.5.4.2  nathanw #define	UART1_MSR		UART0_MSR /* R/W  Modem Status Register */
    164  1.5.4.2  nathanw #define	UART1_SCR		UART0_SCR /* R/W  Scratch Register */
    165  1.5.4.2  nathanw #define	UART1_DLL		UART0_DLL /* R/W* Divisor Latch (LSB) */
    166  1.5.4.2  nathanw #define	UART1_DLM		UART0_DLM /* R/W* Divisor Latch (MSB) */
    167  1.5.4.2  nathanw 
    168  1.5.4.2  nathanw /* IIC Registers */
    169  1.5.4.2  nathanw #define	IIC0_BASE		0xef600500
    170  1.5.4.2  nathanw #define	IIC0_MDBUF		0x00	/* Master Data Buffer */
    171  1.5.4.2  nathanw #define	IIC0_SDBUF		0x02	/* Slave Data Buffer */
    172  1.5.4.2  nathanw #define	IIC0_LMADR		0x04	/* Low Master Address */
    173  1.5.4.2  nathanw #define	IIC0_HMADR		0x05	/* High Master Address */
    174  1.5.4.2  nathanw #define	IIC0_CNTL		0x06	/* Control */
    175  1.5.4.2  nathanw #define	IIC0_MDCNTL		0x07	/* Mode Control */
    176  1.5.4.2  nathanw #define	IIC0_STS		0x08	/* Status */
    177  1.5.4.2  nathanw #define	IIC0_EXTSTS		0x09	/* Extended Status */
    178  1.5.4.2  nathanw #define	IIC0_LSADR		0x0a	/* Low Slave Address */
    179  1.5.4.2  nathanw #define	IIC0_HSADR		0x0b	/* High Slave Address */
    180  1.5.4.2  nathanw #define	IIC0_CLKDIV		0x0c	/* Clock Divide */
    181  1.5.4.2  nathanw #define	IIC0_INTRMSK		0x0d	/* Interrupt Mask */
    182  1.5.4.2  nathanw #define	IIC0_XFRCNT		0x0e	/* Transfer Count */
    183  1.5.4.2  nathanw #define	IIC0_XTCNTLSS		0x0f	/* Extended Control and Slave Status */
    184  1.5.4.2  nathanw #define	IIC0_DIRECTCNTL		0x10	/* Direct Control */
    185  1.5.4.2  nathanw 
    186  1.5.4.2  nathanw /* OPB Arbiter Registers */
    187  1.5.4.2  nathanw #define	OPBA0_BASE		0xef600600
    188  1.5.4.2  nathanw #define	OPBA0_PR		0x00	/* Priority Register */
    189  1.5.4.2  nathanw #define	OPBA0_CR		0x01	/* Control Register */
    190  1.5.4.2  nathanw 
    191  1.5.4.2  nathanw /* GPIO Registers */
    192  1.5.4.2  nathanw #define	GPIO0_BASE		0xef600700
    193  1.5.4.2  nathanw #define	GPIO0_OR		0x00	/* Output */
    194  1.5.4.2  nathanw #define	GPIO0_TCR		0x04	/* Three-State Control */
    195  1.5.4.2  nathanw #define	GPIO0_ODR		0x18	/* Open Drain */
    196  1.5.4.2  nathanw #define	GPIO0_IR		0x1c	/* Input */
    197  1.5.4.2  nathanw 
    198  1.5.4.2  nathanw /* Ethernet MAC Registers */
    199  1.5.4.2  nathanw #define	EMAC0_BASE		0xef600800
    200  1.5.4.2  nathanw 
    201  1.5.4.2  nathanw #define	EMAC0_MR0		0x00	/* Mode Register 0 */
    202  1.5.4.2  nathanw #define	  MR0_RXI		  0x80000000	/* Receive MAC Idle */
    203  1.5.4.2  nathanw #define	  MR0_TXI		  0x40000000	/* Transmit MAC Idle */
    204  1.5.4.2  nathanw #define	  MR0_SRST		  0x20000000	/* Soft Reset */
    205  1.5.4.2  nathanw #define	  MR0_TXE		  0x10000000	/* Transmit MAC Enable */
    206  1.5.4.2  nathanw #define	  MR0_RXE		  0x08000000	/* Receive MAC Enable */
    207  1.5.4.2  nathanw #define	  MR0_WKE		  0x04000000	/* Wake-up Enable */
    208  1.5.4.2  nathanw 
    209  1.5.4.2  nathanw #define	EMAC0_MR1		0x04	/* Mode Register 1 */
    210  1.5.4.2  nathanw #define	  MR1_FDE		  0x80000000	/* Full-Duplex Enable */
    211  1.5.4.2  nathanw #define	  MR1_ILE		  0x40000000	/* Internal Loop-back Enable */
    212  1.5.4.2  nathanw #define	  MR1_VLE		  0x20000000	/* VLAN Enable */
    213  1.5.4.2  nathanw #define	  MR1_EIFC		  0x10000000	/* Enable Integrated Flow Control */
    214  1.5.4.2  nathanw #define	  MR1_APP		  0x08000000	/* Allow Pause Packet */
    215  1.5.4.2  nathanw #define	  MR1_IST		  0x01000000	/* Ignore SQE Test */
    216  1.5.4.2  nathanw #define	  MR1_MF_MASK		  0x00c00000	/* Medium Frequency mask */
    217  1.5.4.2  nathanw #define	  MR1_MF_10MBS		  0x00000000	/* 10MB/sec */
    218  1.5.4.2  nathanw #define	  MR1_MF_100MBS		  0x00400000	/* 100MB/sec */
    219  1.5.4.2  nathanw #define	  MR1_RFS_MASK		  0x00300000	/* Receive FIFO size */
    220  1.5.4.2  nathanw #define	  MR1_RFS_512		  0x00000000	/* 512 bytes */
    221  1.5.4.2  nathanw #define	  MR1_RFS_1KB		  0x00100000	/* 1kByte */
    222  1.5.4.2  nathanw #define	  MR1_RFS_2KB		  0x00200000	/* 2kByte */
    223  1.5.4.2  nathanw #define	  MR1_RFS_4KB		  0x00300000	/* 4kByte */
    224  1.5.4.2  nathanw #define	  MR1_TFS_MASK		  0x000c0000	/* Transmit FIFO size */
    225  1.5.4.2  nathanw #define	  MR1_TFS_1KB		  0x00040000	/* 1kByte */
    226  1.5.4.2  nathanw #define	  MR1_TFS_2KB		  0x00080000	/* 2kByte */
    227  1.5.4.2  nathanw #define	  MR1_TR0_MASK		  0x00018000	/* Transmit Request 0 */
    228  1.5.4.2  nathanw #define	  MR1_TR0_SINGLE	  0x00000000	/* Single Packet mode */
    229  1.5.4.2  nathanw #define	  MR1_TR0_MULTIPLE	  0x00008000	/* Multiple Packet mode */
    230  1.5.4.2  nathanw #define	  MR1_TR0_DEPENDANT	  0x00010000	/* Dependent Mode */
    231  1.5.4.2  nathanw #define	  MR1_TR1_MASK		  0x00006000	/* Transmit Request 1 */
    232  1.5.4.2  nathanw #define	  MR1_TR1_SINGLE	  0x00000000	/* Single Packet mode */
    233  1.5.4.2  nathanw #define	  MR1_TR1_MULTIPLE	  0x00002000	/* Multiply Packet mode */
    234  1.5.4.2  nathanw #define	  MR1_TR1_DEPENDANT	  0x00004000	/* Dependent Mode */
    235  1.5.4.2  nathanw 
    236  1.5.4.2  nathanw #define	EMAC0_TMR0		0x08	/* Transmit Mode Register 0 */
    237  1.5.4.2  nathanw #define	  TMR0_GNP0		  0x80000000	/* Get New Packet for Channel 0 */
    238  1.5.4.2  nathanw #define	  TMR0_GNP1		  0x40000000	/* Get New Packet for Channel 1 */
    239  1.5.4.2  nathanw #define	  TMR0_GNPD		  0x20000000	/* Get New Packet for Dependent mode */
    240  1.5.4.2  nathanw #define	  TMR0_FC_MASK		  0x10000000	/* First Channel */
    241  1.5.4.2  nathanw #define	  TMR0_FC_CHAN0		  0x00000000	/* Channel 0 */
    242  1.5.4.2  nathanw #define	  TMR0_FC_CHAN1		  0x10000000	/* Channel 1 */
    243  1.5.4.2  nathanw 
    244  1.5.4.2  nathanw #define	EMAC0_TMR1		0x0c	/* Transmit Mode Register 1 */
    245  1.5.4.2  nathanw #define	  TMR1_TLR_MASK		  0xf8000000	/* Transmit Low Request */
    246  1.5.4.2  nathanw #define	  TMR1_TLR_SHIFT	  27
    247  1.5.4.2  nathanw #define	  TMR1_TUR_MASK		  0x00ff0000	/* Transmit Urgent Request */
    248  1.5.4.2  nathanw #define	  TMR1_TUR_SHIFT	  16
    249  1.5.4.2  nathanw 
    250  1.5.4.2  nathanw #define	EMAC0_RMR		0x10	/* Receive Mode Register */
    251  1.5.4.2  nathanw #define	  RMR_SP		  0x80000000	/* Strip Padding */
    252  1.5.4.2  nathanw #define	  RMR_SFCS		  0x40000000	/* Strip FCS */
    253  1.5.4.2  nathanw #define	  RMR_RRP		  0x20000000	/* Receive Runt Packets */
    254  1.5.4.2  nathanw #define	  RMR_RFP		  0x10000000	/* Receive FCS Packets */
    255  1.5.4.2  nathanw #define	  RMR_ROP		  0x08000000	/* Receive Oversize Packets */
    256  1.5.4.2  nathanw #define	  RMR_RPIR		  0x04000000	/* Receive Packets with In Range Error */
    257  1.5.4.2  nathanw #define	  RMR_PPP		  0x02000000	/* Propagate Pause Packet */
    258  1.5.4.2  nathanw #define	  RMR_PME		  0x01000000	/* Promiscuous Mode Enable */
    259  1.5.4.2  nathanw #define	  RMR_PMME		  0x00800000	/* Promiscuous Multicast Mode Enable */
    260  1.5.4.2  nathanw #define	  RMR_IAE		  0x00400000	/* Individual Address Enable */
    261  1.5.4.2  nathanw #define	  RMR_MIAE		  0x00200000	/* Multiple Individual Address Enable */
    262  1.5.4.2  nathanw #define	  RMR_BAE		  0x00100000	/* Broadcast Address Enable */
    263  1.5.4.2  nathanw #define	  RMR_MAE		  0x00080000	/* Multicast Address Enable */
    264  1.5.4.2  nathanw 
    265  1.5.4.2  nathanw #define	EMAC0_ISR		0x14	/* Interrupt Status Register */
    266  1.5.4.2  nathanw #define	  ISR_OVR		  0x02000000	/* Overrun Error */
    267  1.5.4.2  nathanw #define	  ISR_PP		  0x01000000	/* Pause Packet */
    268  1.5.4.2  nathanw #define	  ISR_BP		  0x00800000	/* Bad Packet */
    269  1.5.4.2  nathanw #define	  ISR_RP		  0x00400000	/* Runt Packet */
    270  1.5.4.2  nathanw #define	  ISR_SE		  0x00200000	/* Short Event */
    271  1.5.4.2  nathanw #define	  ISR_ALE		  0x00100000	/* Alignment Error */
    272  1.5.4.2  nathanw #define	  ISR_BFCS		  0x00080000	/* Bad FCS */
    273  1.5.4.2  nathanw #define	  ISR_PTLE		  0x00040000	/* Packet Too Long Error */
    274  1.5.4.2  nathanw #define	  ISR_ORE		  0x00020000	/* Out of Range Error */
    275  1.5.4.2  nathanw #define	  ISR_IRE		  0x00010000	/* In Range Error */
    276  1.5.4.2  nathanw #define	  ISR_DBDM		  0x00000200	/* Dead Bit Dependent Mode */
    277  1.5.4.2  nathanw #define	  ISR_DB0		  0x00000100	/* Dead Bit 0 */
    278  1.5.4.2  nathanw #define	  ISR_SE0		  0x00000080	/* SQE Error 0 */
    279  1.5.4.2  nathanw #define	  ISR_TE0		  0x00000040	/* Transmit Error 0 */
    280  1.5.4.2  nathanw #define	  ISR_DB1		  0x00000020	/* Dead Bit 1 */
    281  1.5.4.2  nathanw #define	  ISR_SE1		  0x00000010	/* SQE Error 1 */
    282  1.5.4.2  nathanw #define	  ISR_TE1		  0x00000008	/* Transmit Error 1 */
    283  1.5.4.2  nathanw #define	  ISR_MOS		  0x00000002	/* MMA Operation Succeeded */
    284  1.5.4.2  nathanw #define	  ISR_MOF		  0x00000001	/* MMA Operation Failed */
    285  1.5.4.2  nathanw 
    286  1.5.4.2  nathanw #define	EMAC0_ISER		0x18	/* Interrupt Status Enable Register */
    287  1.5.4.2  nathanw #define	  ISER_OVR		  ISR_OVR
    288  1.5.4.2  nathanw #define	  ISER_PP		  ISR_PP
    289  1.5.4.2  nathanw #define	  ISER_BP		  ISR_BP
    290  1.5.4.2  nathanw #define	  ISER_RP		  ISR_RP
    291  1.5.4.2  nathanw #define	  ISER_SE		  ISR_SE
    292  1.5.4.2  nathanw #define	  ISER_ALE		  ISR_ALE
    293  1.5.4.2  nathanw #define	  ISER_BFCS		  ISR_BFCS
    294  1.5.4.2  nathanw #define	  ISER_PTLE		  ISR_PTLE
    295  1.5.4.2  nathanw #define	  ISER_ORE		  ISR_ORE
    296  1.5.4.2  nathanw #define	  ISER_IRE		  ISR_IRE
    297  1.5.4.2  nathanw #define	  ISER_DBDM		  ISR_DBDM
    298  1.5.4.2  nathanw #define	  ISER_DB0		  ISR_DB0
    299  1.5.4.2  nathanw #define	  ISER_SE0		  ISR_SE0
    300  1.5.4.2  nathanw #define	  ISER_TE0		  ISR_TE0
    301  1.5.4.2  nathanw #define	  ISER_DB1		  ISR_DB1
    302  1.5.4.2  nathanw #define	  ISER_SE1		  ISR_SE1
    303  1.5.4.2  nathanw #define	  ISER_TE1		  ISR_TE1
    304  1.5.4.2  nathanw #define	  ISER_MOS		  ISR_MOS
    305  1.5.4.2  nathanw #define	  ISER_MOF		  ISR_MOF
    306  1.5.4.2  nathanw 
    307  1.5.4.2  nathanw #define	EMAC0_IAHR		0x1c	/* Individual Address High Register */
    308  1.5.4.2  nathanw #define	EMAC0_IALR		0x20	/* Individual Address Low Register */
    309  1.5.4.2  nathanw #define	EMAC0_VTPID		0x24	/* VLAN TPID Register */
    310  1.5.4.2  nathanw #define	EMAC0_VTCI		0x28	/* VLAN TCI Register */
    311  1.5.4.2  nathanw #define	EMAC0_PTR		0x2c	/* Pause Timer Register */
    312  1.5.4.2  nathanw #define	EMAC0_IAHT1		0x30	/* Individual Address Hash Table 1 */
    313  1.5.4.2  nathanw #define	EMAC0_IAHT2		0x34	/* Individual Address Hash Table 2 */
    314  1.5.4.2  nathanw #define	EMAC0_IAHT3		0x38	/* Individual Address Hash Table 3 */
    315  1.5.4.2  nathanw #define	EMAC0_IAHT4		0x3c	/* Individual Address Hash Table 4 */
    316  1.5.4.2  nathanw #define	EMAC0_GAHT1		0x40	/* Group Address Hash Table 1 */
    317  1.5.4.2  nathanw #define	EMAC0_GAHT2		0x44	/* Group Address Hash Table 2 */
    318  1.5.4.2  nathanw #define	EMAC0_GAHT3		0x48	/* Group Address Hash Table 3 */
    319  1.5.4.2  nathanw #define	EMAC0_GAHT4		0x4c	/* Group Address Hash Table 4 */
    320  1.5.4.2  nathanw #define	EMAC0_LSAH		0x50	/* Last Source Address High */
    321  1.5.4.2  nathanw #define	EMAC0_LSAL		0x54	/* Last Source Address Low */
    322  1.5.4.2  nathanw #define	EMAC0_IPGVR		0x58	/* Inter-Packet Gap Value Register */
    323  1.5.4.2  nathanw 
    324  1.5.4.2  nathanw #define	EMAC0_STACR		0x5c	/* STA Control Register */
    325  1.5.4.2  nathanw #define	  STACR_PHYD		  0xffff0000	/* PHY data mask */
    326  1.5.4.2  nathanw #define	  STACR_PHYDSHIFT	  16
    327  1.5.4.2  nathanw #define	  STACR_OC		  0x00008000	/* operation complete */
    328  1.5.4.2  nathanw #define	  STACR_PHYE		  0x00004000	/* PHY error */
    329  1.5.4.2  nathanw #define	  STACR_WRITE		  0x00002000	/* STA command - write */
    330  1.5.4.2  nathanw #define	  STACR_READ		  0x00001000	/* STA command - read */
    331  1.5.4.2  nathanw #define	  STACR_OPBC_MASK	  0x00000c00	/* OPB bus clock freq mask */
    332  1.5.4.2  nathanw #define	  STACR_OPBC_50MHZ	  0x00000000	/* OPB bus clock freq -  50MHz */
    333  1.5.4.2  nathanw #define	  STACR_OPBC_66MHZ	  0x00000400	/* OPB bus clock freq -  66MHz */
    334  1.5.4.2  nathanw #define	  STACR_OPBC_83MHZ	  0x00000800	/* OPB bus clock freq -  83MHz */
    335  1.5.4.2  nathanw #define	  STACR_OPBC_100MHZ	  0x00000c00	/* OPB bus clock freq - 100MHz */
    336  1.5.4.2  nathanw #define	  STACR_PCDA		  0x000003e0	/* PHY cmd dest address mask */
    337  1.5.4.2  nathanw #define	  STACR_PCDASHIFT	  5
    338  1.5.4.2  nathanw #define	  STACR_PRA		  0x0000001f	/* PHY register address mask */
    339  1.5.4.2  nathanw #define	  STACR_PRASHIFT	  0
    340  1.5.4.2  nathanw 
    341  1.5.4.2  nathanw #define	EMAC0_TRTR		0x60	/* Transmit Request Threshold Register */
    342  1.5.4.2  nathanw #define	  TRTR_64		  0x00000000	/* 64 bytes */
    343  1.5.4.2  nathanw #define	  TRTR_128		  0x08000000	/* 128 bytes */
    344  1.5.4.2  nathanw #define	  TRTR_192		  0x10000000	/* 192 bytes */
    345  1.5.4.2  nathanw #define	  TRTR_256		  0x18000000	/* 256 bytes */
    346  1.5.4.2  nathanw /* ... and so on +64 until ... */
    347  1.5.4.2  nathanw #define	  TRTR_2048		  0xf8000000	/* 2048 bytes */
    348  1.5.4.2  nathanw 
    349  1.5.4.2  nathanw #define	EMAC0_RWMR		0x64	/* Receive Low/High Water Mark Register */
    350  1.5.4.2  nathanw #define	  RWMR_RLWM_MASK	  0xff800000	/* Receive Low Water Mark */
    351  1.5.4.2  nathanw #define	  RWMR_RLWM_SHIFT	    23
    352  1.5.4.2  nathanw #define	  RWMR_RHWM_MASK	  0x0000ff80	/* Receive High Water Mark */
    353  1.5.4.2  nathanw #define	  RWMR_RHWM_SHIFT	    7
    354  1.5.4.2  nathanw 
    355  1.5.4.2  nathanw #define	EMAC0_OCTX		0x68	/* Number of Octets Transmitted */
    356  1.5.4.2  nathanw #define	EMAC0_OCRX		0x6c	/* Number of Octets Received */
    357  1.5.4.2  nathanw 
    358  1.5.4.2  nathanw 
    359  1.5.4.2  nathanw /* Expansion ROM - 254MB */
    360  1.5.4.2  nathanw #define	EXPANSION_ROM_START	0xf0000000
    361  1.5.4.2  nathanw #define	EXPANSION_ROM_END	0xffdfffff
    362  1.5.4.2  nathanw 
    363  1.5.4.2  nathanw /* Boot ROM - 2MB */
    364  1.5.4.2  nathanw #define	BOOT_ROM_START		0xffe00000
    365  1.5.4.2  nathanw #define	BOOT_ROM_END		0xffffffff
    366  1.5.4.2  nathanw 
    367  1.5.4.2  nathanw #ifndef _LOCORE
    368  1.5.4.2  nathanw void galaxy_show_pci_map(void);
    369  1.5.4.2  nathanw void galaxy_setup_pci(void);
    370  1.5.4.2  nathanw #endif /* _LOCORE */
    371  1.5.4.2  nathanw #endif	/* _IBM4XX_IBM405GP_H_ */
    372