Home | History | Annotate | Line # | Download | only in marvell
gtpcireg.h revision 1.1
      1  1.1  matt /*	$NetBSD: gtpcireg.h,v 1.1 2003/03/05 22:08:22 matt Exp $	*/
      2  1.1  matt 
      3  1.1  matt /*
      4  1.1  matt  * Copyright (c) 2002 Allegro Networks, Inc., Wasabi Systems, Inc.
      5  1.1  matt  * All rights reserved.
      6  1.1  matt  *
      7  1.1  matt  * Redistribution and use in source and binary forms, with or without
      8  1.1  matt  * modification, are permitted provided that the following conditions
      9  1.1  matt  * are met:
     10  1.1  matt  * 1. Redistributions of source code must retain the above copyright
     11  1.1  matt  *    notice, this list of conditions and the following disclaimer.
     12  1.1  matt  * 2. Redistributions in binary form must reproduce the above copyright
     13  1.1  matt  *    notice, this list of conditions and the following disclaimer in the
     14  1.1  matt  *    documentation and/or other materials provided with the distribution.
     15  1.1  matt  * 3. All advertising materials mentioning features or use of this software
     16  1.1  matt  *    must display the following acknowledgement:
     17  1.1  matt  *      This product includes software developed for the NetBSD Project by
     18  1.1  matt  *      Allegro Networks, Inc., and Wasabi Systems, Inc.
     19  1.1  matt  * 4. The name of Allegro Networks, Inc. may not be used to endorse
     20  1.1  matt  *    or promote products derived from this software without specific prior
     21  1.1  matt  *    written permission.
     22  1.1  matt  * 5. The name of Wasabi Systems, Inc. may not be used to endorse
     23  1.1  matt  *    or promote products derived from this software without specific prior
     24  1.1  matt  *    written permission.
     25  1.1  matt  *
     26  1.1  matt  * THIS SOFTWARE IS PROVIDED BY ALLEGRO NETWORKS, INC. AND
     27  1.1  matt  * WASABI SYSTEMS, INC. ``AS IS'' AND ANY EXPRESS OR IMPLIED WARRANTIES,
     28  1.1  matt  * INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY
     29  1.1  matt  * AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED.
     30  1.1  matt  * IN NO EVENT SHALL EITHER ALLEGRO NETWORKS, INC. OR WASABI SYSTEMS, INC.
     31  1.1  matt  * BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
     32  1.1  matt  * CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
     33  1.1  matt  * SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
     34  1.1  matt  * INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
     35  1.1  matt  * CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
     36  1.1  matt  * ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
     37  1.1  matt  * POSSIBILITY OF SUCH DAMAGE.
     38  1.1  matt  */
     39  1.1  matt 
     40  1.1  matt #ifndef _DEV_GTPCIREG_H
     41  1.1  matt #define	_DEV_GTPCIREG_H
     42  1.1  matt 
     43  1.1  matt #define PCI__BIT(bit)			(1U << (bit))
     44  1.1  matt #define PCI__MASK(bit)			(PCI__BIT(bit) - 1)
     45  1.1  matt #define PCI__GEN(bus, off, num)		(((off)^((bus) << 7))+((num) << 4))
     46  1.1  matt #define	PCI__EXT(data, bit, len)	(((data) >> (bit)) & PCI__MASK(len))
     47  1.1  matt #define	PCI__CLR(data, bit, len)	((data) &= ~(PCI__MASK(len) << (bit)))
     48  1.1  matt #define	PCI__INS(bit, new)		((new) << (bit))
     49  1.1  matt 
     50  1.1  matt #define	PCI_SYNC_REG(bus)		(0xc0 | ((bus) << 3))
     51  1.1  matt 
     52  1.1  matt /*
     53  1.1  matt  * Table 185: PCI Slave ADDRess Decoding Register Map
     54  1.1  matt  */
     55  1.1  matt #define PCI_SCS0_BAR_SIZE(bus)				PCI__GEN(bus, 0x0c08, 0)
     56  1.1  matt #define PCI_SCS2_BAR_SIZE(bus)				PCI__GEN(bus, 0x0c0c, 0)
     57  1.1  matt #define PCI_CS0_BAR_SIZE(bus)				PCI__GEN(bus, 0x0c10, 0)
     58  1.1  matt #define PCI_CS3_BAR_SIZE(bus)				PCI__GEN(bus, 0x0c14, 0)
     59  1.1  matt #define PCI_SCS1_BAR_SIZE(bus)				PCI__GEN(bus, 0x0d08, 0)
     60  1.1  matt #define PCI_SCS3_BAR_SIZE(bus)				PCI__GEN(bus, 0x0d0c, 0)
     61  1.1  matt #define PCI_CS1_BAR_SIZE(bus)				PCI__GEN(bus, 0x0d10, 0)
     62  1.1  matt #define PCI_BOOTCS_BAR_SIZE(bus)			PCI__GEN(bus, 0x0d14, 0)
     63  1.1  matt #define PCI_CS2_BAR_SIZE(bus)				PCI__GEN(bus, 0x0d18, 0)
     64  1.1  matt #define PCI_P2P_MEM0_BAR_SIZE(bus)			PCI__GEN(bus, 0x0d1c, 0)
     65  1.1  matt #define PCI_P2P_MEM1_BAR_SIZE(bus)			PCI__GEN(bus, 0x0d20, 0)
     66  1.1  matt #define PCI_P2P_IO_BAR_SIZE(bus)			PCI__GEN(bus, 0x0d24, 0)
     67  1.1  matt #define PCI_CPU_BAR_SIZE(bus)				PCI__GEN(bus, 0x0d28, 0)
     68  1.1  matt #define PCI_EXPANSION_ROM_BAR_SIZE(bus)			PCI__GEN(bus, 0x0d2c, 0)
     69  1.1  matt #define PCI_DAC_SCS0_BAR_SIZE(bus)			PCI__GEN(bus, 0x0e00, 0)
     70  1.1  matt #define PCI_DAC_SCS1_BAR_SIZE(bus)			PCI__GEN(bus, 0x0e04, 0)
     71  1.1  matt #define PCI_DAC_SCS2_BAR_SIZE(bus)			PCI__GEN(bus, 0x0e08, 0)
     72  1.1  matt #define PCI_DAC_SCS3_BAR_SIZE(bus)			PCI__GEN(bus, 0x0e0c, 0)
     73  1.1  matt #define PCI_DAC_CS0_BAR_SIZE(bus)			PCI__GEN(bus, 0x0e10, 0)
     74  1.1  matt #define PCI_DAC_CS1_BAR_SIZE(bus)			PCI__GEN(bus, 0x0e14, 0)
     75  1.1  matt #define PCI_DAC_CS2_BAR_SIZE(bus)			PCI__GEN(bus, 0x0e18, 0)
     76  1.1  matt #define PCI_DAC_CS3_BAR_SIZE(bus)			PCI__GEN(bus, 0x0e1c, 0)
     77  1.1  matt #define PCI_DAC_BOOTCS_BAR_SIZE(bus)			PCI__GEN(bus, 0x0e20, 0)
     78  1.1  matt #define PCI_DAC_P2P_MEM0_BAR_SIZE(bus)			PCI__GEN(bus, 0x0e24, 0)
     79  1.1  matt #define PCI_DAC_P2P_MEM1_BAR_SIZE(bus)			PCI__GEN(bus, 0x0e28, 0)
     80  1.1  matt #define PCI_DAC_CPU_BAR_SIZE(bus)			PCI__GEN(bus, 0x0e2c, 0)
     81  1.1  matt #define PCI_BASE_ADDR_REGISTERS_ENABLE(bus)		PCI__GEN(bus, 0x0c3c, 0)
     82  1.1  matt #define PCI_SCS0_BASE_ADDR_REMAP(bus)			PCI__GEN(bus, 0x0c48, 0)
     83  1.1  matt #define PCI_SCS1_BASE_ADDR_REMAP(bus)			PCI__GEN(bus, 0x0d48, 0)
     84  1.1  matt #define PCI_SCS2_BASE_ADDR_REMAP(bus)			PCI__GEN(bus, 0x0c4c, 0)
     85  1.1  matt #define PCI_SCS3_BASE_ADDR_REMAP(bus)			PCI__GEN(bus, 0x0d4c, 0)
     86  1.1  matt #define PCI_CS0_BASE_ADDR_REMAP(bus)			PCI__GEN(bus, 0x0c50, 0)
     87  1.1  matt #define PCI_CS1_BASE_ADDR_REMAP(bus)			PCI__GEN(bus, 0x0d50, 0)
     88  1.1  matt #define PCI_CS2_BASE_ADDR_REMAP(bus)			PCI__GEN(bus, 0x0d58, 0)
     89  1.1  matt #define PCI_CS3_BASE_ADDR_REMAP(bus)			PCI__GEN(bus, 0x0c54, 0)
     90  1.1  matt #define PCI_ADDR_DECODE_CONTROL(bus)			PCI__GEN(bus, 0x0d3c, 0)
     91  1.1  matt #define PCI_BOOTCS_ADDR_REMAP(bus)			PCI__GEN(bus, 0x0d54, 0)
     92  1.1  matt #define PCI_P2P_MEM0_BASE_ADDR_REMAP_LOW(bus)		PCI__GEN(bus, 0x0d5c, 0)
     93  1.1  matt #define PCI_P2P_MEM0_BASE_ADDR_REMAP_HIGH(bus)		PCI__GEN(bus, 0x0d60, 0)
     94  1.1  matt #define PCI_P2P_MEM1_BASE_ADDR_REMAP_LOW(bus)		PCI__GEN(bus, 0x0d64, 0)
     95  1.1  matt #define PCI_P2P_MEM1_BASE_ADDR_REMAP_HIGH(bus)		PCI__GEN(bus, 0x0d68, 0)
     96  1.1  matt #define PCI_P2P_IO_BASE_ADDR_REMAP(bus)			PCI__GEN(bus, 0x0d6c, 0)
     97  1.1  matt #define PCI_CPU_BASE_ADDR_REMAP(bus)			PCI__GEN(bus, 0x0d70, 0)
     98  1.1  matt #define PCI_DAC_SCS0_BASE_ADDR_REMAP(bus)		PCI__GEN(bus, 0x0f00, 0)
     99  1.1  matt #define PCI_DAC_SCS1_BASE_ADDR_REMAP(bus)		PCI__GEN(bus, 0x0f04, 0)
    100  1.1  matt #define PCI_DAC_SCS2_BASE_ADDR_REMAP(bus)		PCI__GEN(bus, 0x0f08, 0)
    101  1.1  matt #define PCI_DAC_SCS3_BASE_ADDR_REMAP(bus)		PCI__GEN(bus, 0x0f0c, 0)
    102  1.1  matt #define PCI_DAC_CS0_BASE_ADDR_REMAP(bus)		PCI__GEN(bus, 0x0f10, 0)
    103  1.1  matt #define PCI_DAC_CS1_BASE_ADDR_REMAP(bus)		PCI__GEN(bus, 0x0f14, 0)
    104  1.1  matt #define PCI_DAC_CS2_BASE_ADDR_REMAP(bus)		PCI__GEN(bus, 0x0f18, 0)
    105  1.1  matt #define PCI_DAC_CS3_BASE_ADDR_REMAP(bus)		PCI__GEN(bus, 0x0f1c, 0)
    106  1.1  matt #define PCI_DAC_BOOTCS_BASE_ADDR_REMAP(bus)		PCI__GEN(bus, 0x0f20, 0)
    107  1.1  matt #define PCI_DAC_P2P_MEM0_BASE_ADDR_REMAP_LOW(bus)	PCI__GEN(bus, 0x0f24, 0)
    108  1.1  matt #define PCI_DAC_P2P_MEM0_BASE_ADDR_REMAP_HIGH(bus)	PCI__GEN(bus, 0x0f28, 0)
    109  1.1  matt #define PCI_DAC_P2P_MEM1_BASE_ADDR_REMAP_LOW(bus)	PCI__GEN(bus, 0x0f2c, 0)
    110  1.1  matt #define PCI_DAC_P2P_MEM1_BASE_ADDR_REMAP_HIGH(bus)	PCI__GEN(bus, 0x0f30, 0)
    111  1.1  matt #define PCI_DAC_CPU_BASE_ADDR_REMAP(bus)		PCI__GEN(bus, 0x0f34, 0)
    112  1.1  matt #define PCI_EXPANSION_ROM_BASE_ADDR_REMAP(bus)		PCI__GEN(bus, 0x0f38, 0)
    113  1.1  matt 
    114  1.1  matt /*
    115  1.1  matt  * Table 186: PCI Control Register Map
    116  1.1  matt  */
    117  1.1  matt #define PCI_COMMAND(bus)				PCI__GEN(bus, 0x0c00, 0)
    118  1.1  matt #define PCI_MODE(bus)					PCI__GEN(bus, 0x0d00, 0)
    119  1.1  matt #define PCI_TIMEOUT_RETRY(bus)				PCI__GEN(bus, 0x0c04, 0)
    120  1.1  matt #define PCI_READ_BUFFER_DISCARD_TIMER(bus)		PCI__GEN(bus, 0x0d04, 0)
    121  1.1  matt #define PCI_MSI_TRIGGER_TIMER(bus)			PCI__GEN(bus, 0x0c38, 0)
    122  1.1  matt #define PCI_ARBITER_CONTROL(bus)			PCI__GEN(bus, 0x1d00, 0)
    123  1.1  matt #define PCI_INTERFACE_XBAR_CONTROL_LOW(bus)		PCI__GEN(bus, 0x1d08, 0)
    124  1.1  matt #define PCI_INTERFACE_XBAR_CONTROL_HIGH(bus)		PCI__GEN(bus, 0x1d0c, 0)
    125  1.1  matt #define PCI_INTERFACE_XBAR_TIMEOUT(bus)			PCI__GEN(bus, 0x1d04, 0)
    126  1.1  matt #define PCI_READ_RESPONSE_XBAR_CONTROL_LOW(bus)		PCI__GEN(bus, 0x1d18, 0)
    127  1.1  matt #define PCI_READ_RESPONSE_XBAR_CONTROL_HIGH(bus)	PCI__GEN(bus, 0x1d1c, 0)
    128  1.1  matt #define PCI_SYNC_BARRIER(bus)				PCI__GEN(bus, 0x1d10, 0)
    129  1.1  matt #define PCI_P2P_CONFIGURATION(bus)			PCI__GEN(bus, 0x1d14, 0)
    130  1.1  matt #define PCI_P2P_SWAP_CONTROL(bus)			PCI__GEN(bus, 0x1d54, 0)
    131  1.1  matt #define PCI_ACCESS_CONTROL_BASE_LOW(bus, n)		PCI__GEN(bus, 0x1e00, n)
    132  1.1  matt #define PCI_ACCESS_CONTROL_BASE_HIGH(bus, n)		PCI__GEN(bus, 0x1e04, n)
    133  1.1  matt #define PCI_ACCESS_CONTROL_TOP(bus, n)			PCI__GEN(bus, 0x1e08, n)
    134  1.1  matt 
    135  1.1  matt 
    136  1.1  matt /*
    137  1.1  matt  * Table 187: PCI Snoop Control Register Map
    138  1.1  matt  */
    139  1.1  matt #define PCI_SNOOP_CONTROL_BASE_LOW(bus, n)		PCI__GEN(bus, 0x1f00, n)
    140  1.1  matt #define PCI_SNOOP_CONTROL_BASE_HIGH(bus, n)		PCI__GEN(bus, 0x1f04, n)
    141  1.1  matt #define PCI_SNOOP_CONTROL_TOP(bus, n)			PCI__GEN(bus, 0x1f08, n)
    142  1.1  matt 
    143  1.1  matt /*
    144  1.1  matt  * Table 188: PCI Configuration ACCESS_Register Map
    145  1.1  matt  */
    146  1.1  matt #define PCI_CONFIG_ADDR(bus)				PCI__GEN(bus, 0x0cf8, 0)
    147  1.1  matt #define PCI_CONFIG_DATA(bus)				PCI__GEN(bus, 0x0cfc, 0)
    148  1.1  matt #define PCI_INTR_ACK(bus)				PCI__GEN(bus, 0x0c34, 0)
    149  1.1  matt 
    150  1.1  matt /*
    151  1.1  matt  * Table 189: PCI ERROR Report Register Map
    152  1.1  matt  */
    153  1.1  matt #define PCI_SERR_MASK(bus)				PCI__GEN(bus, 0x0c28, 0)
    154  1.1  matt #define PCI_ERROR_ADDRESS_LOW(bus)			PCI__GEN(bus, 0x1d40, 0)
    155  1.1  matt #define PCI_ERROR_ADDRESS_HIGH(bus)			PCI__GEN(bus, 0x1d44, 0)
    156  1.1  matt #define PCI_ERROR_DATA_LOW(bus)				PCI__GEN(bus, 0x1d48, 0)
    157  1.1  matt #define PCI_ERROR_DATA_HIGH(bus)			PCI__GEN(bus, 0x1d4c, 0)
    158  1.1  matt #define PCI_ERROR_COMMAND(bus)				PCI__GEN(bus, 0x1d50, 0)
    159  1.1  matt #define PCI_ERROR_CAUSE(bus)				PCI__GEN(bus, 0x1d58, 0)
    160  1.1  matt #define PCI_ERROR_MASK(bus)				PCI__GEN(bus, 0x1d5c, 0)
    161  1.1  matt 
    162  1.1  matt 
    163  1.1  matt 
    164  1.1  matt /*
    165  1.1  matt  * Table 223: PCI Base Address Registers Enable
    166  1.1  matt  * If a bit is clear, the BAR is enabled.  If set, disabled.  The GT64260]
    167  1.1  matt  * prevents disabling both memory mapped and I/O mapped BARs (bits 9 and 10
    168  1.1  matt  * cannot simultaneously be set to 1).
    169  1.1  matt  */
    170  1.1  matt #define PCI_BARE_SCS0En		PCI__BIT(0)	/* SCS[0]* BAR Enable */
    171  1.1  matt #define PCI_BARE_SCS1En		PCI__BIT(1)	/* SCS[1]* BAR Enable */
    172  1.1  matt #define PCI_BARE_SCS2En		PCI__BIT(2)	/* SCS[2]* BAR Enable */
    173  1.1  matt #define PCI_BARE_SCS3En		PCI__BIT(3)	/* SCS[3]* BAR Enable */
    174  1.1  matt #define PCI_BARE_CS0En		PCI__BIT(4)	/* CS[0]* BAR Enable */
    175  1.1  matt #define PCI_BARE_CS1En		PCI__BIT(5)	/* CS[1]* BAR Enable */
    176  1.1  matt #define PCI_BARE_CS2En		PCI__BIT(6)	/* CS[2]* BAR Enable */
    177  1.1  matt #define PCI_BARE_CS3En		PCI__BIT(7)	/* CS[3]* BAR Enable */
    178  1.1  matt #define PCI_BARE_BootCSEn	PCI__BIT(8)	/* BootCS* BAR Enable */
    179  1.1  matt #define PCI_BARE_IntMemEn	PCI__BIT(9)	/* Memory Mapped Internal
    180  1.1  matt 						 * Registers BAR Enable */
    181  1.1  matt #define PCI_BARE_IntIOEn	PCI__BIT(10)	/* I/O Mapped Internal
    182  1.1  matt 						 * Registers BAR Enable */
    183  1.1  matt #define PCI_BARE_P2PMem0En	PCI__BIT(11)	/* P2P Mem0 BAR Enable */
    184  1.1  matt #define PCI_BARE_P2PMem1En	PCI__BIT(12)	/* P2P Mem1 BAR Enable */
    185  1.1  matt #define PCI_BARE_P2PIOEn	PCI__BIT(13)	/* P2P IO BAR Enable */
    186  1.1  matt #define PCI_BARE_CPUEn		PCI__BIT(14)	/* CPU BAR Enable */
    187  1.1  matt #define PCI_BARE_DSCS0En	PCI__BIT(15)	/* DAC SCS[0]* BAR Enable */
    188  1.1  matt #define PCI_BARE_DSCS1En	PCI__BIT(16)	/* DAC SCS[1]* BAR Enable */
    189  1.1  matt #define PCI_BARE_DSCS2En	PCI__BIT(17)	/* DAC SCS[2]* BAR Enable */
    190  1.1  matt #define PCI_BARE_DSCS3En	PCI__BIT(18)	/* DAC SCS[3]* BAR Enable */
    191  1.1  matt #define PCI_BARE_DCS0En		PCI__BIT(19)	/* DAC CS[0]* BAR Enable */
    192  1.1  matt #define PCI_BARE_DCS1En		PCI__BIT(20)	/* DAC CS[1]* BAR Enable */
    193  1.1  matt #define PCI_BARE_DCS2En		PCI__BIT(21)	/* DAC CS[2]* BAR Enable */
    194  1.1  matt #define PCI_BARE_DCS3En		PCI__BIT(22)	/* DAC CS[3]* BAR Enable */
    195  1.1  matt #define PCI_BARE_DBootCSEn	PCI__BIT(23)	/* DAC BootCS* BAR Enable */
    196  1.1  matt #define PCI_BARE_DP2PMem0En	PCI__BIT(24)	/* DAC P2P Mem0 BAR Enable */
    197  1.1  matt #define PCI_BARE_DP2PMem1En	PCI__BIT(25)	/* DAC P2P Mem1 BAR Enable */
    198  1.1  matt #define PCI_BARE_DCPUEn		PCI__BIT(26)	/* DAC CPU BAR Enable */
    199  1.1  matt 
    200  1.1  matt /*
    201  1.1  matt  * Table 254: PCI Address Decode Control
    202  1.1  matt  * Bits 7:4 and 31:25 are reserved
    203  1.1  matt  * 00:00 RemapWrDis		Address Remap Registers Write Disable
    204  1.1  matt  * 				0: Writes to a BAR result in updating the
    205  1.1  matt  * 				   corresponding remap register with the BAR's
    206  1.1  matt  * 				   new value.
    207  1.1  matt  * 				1: Writes to a BAR have no affect on the
    208  1.1  matt  * 				   corresponding Remap register value.
    209  1.1  matt  * 01:01 ExpRomDev		Expansion ROM Device (0: CS[3]; 1: BootCS)
    210  1.1  matt  * 02:02 VPDDev			VPD Device (0: CS[3]; 1: BootCS)
    211  1.1  matt  * 03:03 MsgAcc			Messaging registers access
    212  1.1  matt  * 				0: Messaging unit registers are accessible on
    213  1.1  matt  * 				   lowest 4Kbyte of SCS[0] BAR space.
    214  1.1  matt  * 				1: Messaging unit registers are only accessible
    215  1.1  matt  * 				   as part of the GT64260 internal space.
    216  1.1  matt  * 07:04 Reserved
    217  1.1  matt  * 24:08 VPDHighAddr		VPD High Address bits
    218  1.1  matt  * 				[31:15] of VPD the address.
    219  1.1  matt  * 31:25 Reserved
    220  1.1  matt  */
    221  1.1  matt #define	PCI_ADC_RemapWrDis		PCI__BIT(0)
    222  1.1  matt #define PCI_ADC_ExpRomDev		PCI__BIT(1)
    223  1.1  matt #define PCI_ADC_VPDDev			PCI__BIT(2)
    224  1.1  matt #define PCI_ADC_MsgAcc			PCI__BIT(3)
    225  1.1  matt #define	PCI_ADC_VPDHighAddr_GET(v)	PCI__EXT(v, 8, 16)
    226  1.1  matt 
    227  1.1  matt 
    228  1.1  matt /*
    229  1.1  matt  * Table 255: PCI Command
    230  1.1  matt  * 00:00 MByteSwap	PCI Master Byte Swap
    231  1.1  matt  *				NOTE: GT-64120 and GT-64130 compatible.
    232  1.1  matt  *			When set to 0, the GTO64260 PCI master swaps the bytes
    233  1.1  matt  *			of the incoming and outgoing PCI data (swap the 8 bytes
    234  1.1  matt  *			of a longword).
    235  1.1  matt  * 01:01 Reserved
    236  1.1  matt  * 02:02 Reserved	Must be 0.
    237  1.1  matt  * 03:03 Reserved
    238  1.1  matt  * 04:04 MWrCom		PCI Master Write Combine Enable
    239  1.1  matt  *			When set to 1, write combining is enabled.
    240  1.1  matt  * 05:05 MRdCom		PCI Master Read Combine Enable
    241  1.1  matt  *			When set to 1, read combining is enabled.
    242  1.1  matt  * 06:06 MWrTrig	PCI Master Write Trigger
    243  1.1  matt  *			0: Accesses the PCI bus only when the whole burst is
    244  1.1  matt  *			   written into the master write buffer.
    245  1.1  matt  *			1: Accesses the PCI bus when the first data is written
    246  1.1  matt  *			   into the master write buffer.
    247  1.1  matt  * 07:07 MRdTrig	PCI Master Read Trigger
    248  1.1  matt  *			0: Returns read data to the initiating unit only when
    249  1.1  matt  *			   the whole burst is written into master read buffer.
    250  1.1  matt  *			1: Returns read data to the initiating unit when the
    251  1.1  matt  *			   first read data is written into master read buffer.
    252  1.1  matt  * 08:08 MRdLine	PCI Master Memory Read Line Enable
    253  1.1  matt  *			(0: Disable; 1: Enable)
    254  1.1  matt  * 09:09 MRdMul		PCI Master Memory Read Multiple Enable
    255  1.1  matt  *			(0: Disable; 1: Enable)
    256  1.1  matt  * 10:10 MWordSwap	PCI Master Word Swap
    257  1.1  matt  *				NOTE: GT-64120 and GT-64130 compatible.
    258  1.1  matt  *			When set to 1, the GT64260 PCI master swaps the 32-bit
    259  1.1  matt  *			words of the incoming and outgoing PCI data.
    260  1.1  matt  * 11:11 SWordSwap	PCI Slave Word Swap
    261  1.1  matt  *				NOTE: GT-64120 and GT-64130 compatible.
    262  1.1  matt  *			When set to 1, the GT64260 PCI slave swaps the 32-bit
    263  1.1  matt  *			words of the incoming and outgoing PCI data.
    264  1.1  matt  * 12:12 IntBusCtl	PCI Interface Unit Internal Bus Control
    265  1.1  matt  *				NOTE: Reserved for Galileo Technology usage
    266  1.1  matt  *			0: Enable internal bus sharing between master and
    267  1.1  matt  *			   slave interfaces.
    268  1.1  matt  *			1: Disable internal bus sharing between master and
    269  1.1  matt  *			   slave interfaces.
    270  1.1  matt  * 13:13 SBDis		PCI Slave Sync Barrier Disable
    271  1.1  matt  *			When set to 1, the PCI configuration read transaction
    272  1.1  matt  *			will stop act as sync barrier transaction.
    273  1.1  matt  * 14:14 Reserved	Must be 0
    274  1.1  matt  * 15:15 MReq64		PCI Master REQ64* Enable (0: Disable; 1: Enable)
    275  1.1  matt  * 16:16 SByteSwap	PCI Slave Byte Swap
    276  1.1  matt  *				NOTE: GT-64120 and GT-64130 compatible.
    277  1.1  matt  *			When set to 0, the GT64260 PCI slave swaps the bytes of
    278  1.1  matt  *			the incoming and outgoing PCI data (swap the 8 bytes of
    279  1.1  matt  *			a long-word).
    280  1.1  matt  * 17:17 MDACEn		PCI Master DAC Enable
    281  1.1  matt  *			0: Disable (The PCI master never drives the DAC cycle)
    282  1.1  matt  *			1: Enable (In case the upper 32-bit address is not 0,
    283  1.1  matt  *			   the PCI master drives the DAC cycle)
    284  1.1  matt  * 18:18 M64Allign	PCI Master REQ64* assertion on non-aligned
    285  1.1  matt  *			0: Disable (The master asserts REQ64* only if
    286  1.1  matt  *			   the address is 64-bit aligned)
    287  1.1  matt  *			1: Enable (The master asserts REQ64* even if
    288  1.1  matt  *			   the address is not 64-bit aligned)
    289  1.1  matt  * 19:19 PErrProp	Parity/ECC Errors Propagation Enable
    290  1.1  matt  *			0: Disable (The PCI interface always drives
    291  1.1  matt  *			   correct parity on the PAR signal)
    292  1.1  matt  *			1: Enable (In case of slave read bad ECC from
    293  1.1  matt  *			   SDRAM, or master write with bad parity/ECC
    294  1.1  matt  *			   indication from the initiator, the PCI interface
    295  1.1  matt  *			   drives bad parity on the PAR signal)
    296  1.1  matt  * 20:20 SSwapEn	PCI Slave Swap Enable
    297  1.1  matt  *				NOTE: Even if the SSwapEn bit is set to 1 and
    298  1.1  matt  *				the PCI address does not match any of the
    299  1.1  matt  *				Access Control registers, slave data swapping
    300  1.1  matt  *				works according to SByteSwap and SWordSwap bits.
    301  1.1  matt  *			0: PCI slave data swapping is determined via
    302  1.1  matt  *			   SByteSwap and SWordSwap bits (bits 16 and 11),
    303  1.1  matt  *			   as in the GT-64120/130.
    304  1.1  matt  *			1: PCI slave data swapping is determined via PCISwap
    305  1.1  matt  *			   bits [25:24] in the PCI Access Control registers.
    306  1.1  matt  * 21:21 MSwapEn	PCI Master Swap Enable
    307  1.1  matt  *			0: PCI master data swapping is determined via
    308  1.1  matt  *			   MByteSwap and MWordSwap bits (bits 0 and 10),
    309  1.1  matt  *			   as in the GT-64120/130.
    310  1.1  matt  *			1: PCI master data swapping is determined via
    311  1.1  matt  *			   PCISwap bits in CPU to PCI Address Decoding
    312  1.1  matt  *			   registers.
    313  1.1  matt  * 22:22 MIntSwapEn	PCI Master Configuration Transactions Data Swap Enable
    314  1.1  matt  *				NOTE: Reserved for Galileo Technology usage.
    315  1.1  matt  *			0: Disable (The PCI master configuration transaction
    316  1.1  matt  *			   to the PCI bus is always in Little Endian convention)
    317  1.1  matt  *			1: Enable (The PCI master configuration transaction to
    318  1.1  matt  *			   the PCI bus is determined according to the setting
    319  1.1  matt  *			   of MSwapEn bit)
    320  1.1  matt  * 23:23 LBEn		PCI Loop Back Enable
    321  1.1  matt  *				NOTE: Reserved for Galileo Technology usage.
    322  1.1  matt  *			0: Disable (The PCI slave does not respond to
    323  1.1  matt  *			   transactions initiated by the PCI master)
    324  1.1  matt  *			1: Enable (The PCI slave does respond to
    325  1.1  matt  *			   transactions initiated by the PCI master,
    326  1.1  matt  *			   if targeted to the slave (address match)
    327  1.1  matt  * 26:24 SIntSwap	PCI Slave data swap control on PCI accesses to the
    328  1.1  matt  *			GT64260 internal and configuration registers.
    329  1.1  matt  *			Bits encoding are the same as bits[26:24] in PCI Access
    330  1.1  matt  *			Control registers.
    331  1.1  matt  * 27:27 Reserved	Must be 0.
    332  1.1  matt  * 31:28 Reserved	Read only.
    333  1.1  matt  */
    334  1.1  matt #define	PCI_CMD_MByteSwap	PCI__BIT(0)
    335  1.1  matt #define	PCI_CMD_MBZ0_2		PCI__BIT(2)
    336  1.1  matt #define	PCI_CMD_MWrCom		PCI__BIT(4)
    337  1.1  matt #define	PCI_CMD_MRdCom		PCI__BIT(5)
    338  1.1  matt #define	PCI_CMD_MWrTrig		PCI__BIT(6)
    339  1.1  matt #define	PCI_CMD_MRdTrig		PCI__BIT(7)
    340  1.1  matt #define	PCI_CMD_MRdLine		PCI__BIT(8)
    341  1.1  matt #define	PCI_CMD_MRdMul		PCI__BIT(9)
    342  1.1  matt #define	PCI_CMD_MWordSwap	PCI__BIT(10)
    343  1.1  matt #define	PCI_CMD_SWordSwap	PCI__BIT(11)
    344  1.1  matt #define	PCI_CMD_IntBusCtl	PCI__BIT(12)
    345  1.1  matt #define	PCI_CMD_SBDis		PCI__BIT(13)
    346  1.1  matt #define	PCI_CMD_MBZ0_14		PCI__BIT(14)
    347  1.1  matt #define	PCI_CMD_MReq64		PCI__BIT(15)
    348  1.1  matt #define	PCI_CMD_SByteSwap	PCI__BIT(16)
    349  1.1  matt #define	PCI_CMD_MDCAEn		PCI__BIT(17)
    350  1.1  matt #define	PCI_CMD_M64Allign	PCI__BIT(18)
    351  1.1  matt #define	PCI_CMD_PErrProp	PCI__BIT(19)
    352  1.1  matt #define	PCI_CMD_SSwapEn		PCI__BIT(20)
    353  1.1  matt #define	PCI_CMD_MSwapEn		PCI__BIT(21)
    354  1.1  matt #define	PCI_CMD_MIntSwapEn	PCI__BIT(22)
    355  1.1  matt #define	PCI_CMD_LBEn		PCI__BIT(23)
    356  1.1  matt #define	PCI_CMD_SIntSwap_GET(v)	PCI__EXT(v, 24, 3)
    357  1.1  matt #define	PCI_CMD_MBZ0_27		PCI__BIT(27)
    358  1.1  matt 
    359  1.1  matt 
    360  1.1  matt /*
    361  1.1  matt  * Table 256: PCI Mode
    362  1.1  matt  * 00:00 PciID		PCI Interface ID -- Read Only (PCI_0: 0x0; PCI_1: 0x1)
    363  1.1  matt  * 01:01 Reserved
    364  1.1  matt  * 02:02 Pci64		64-bit PCI Interface -- Read Only
    365  1.1  matt  *			When set to 1, the PCI interface is configured to a
    366  1.1  matt  *			64 bit interface.
    367  1.1  matt  * 07:03 Reserved
    368  1.1  matt  * 08:08 ExpRom		Expansion ROM Enable -- Read Only from PCI
    369  1.1  matt  *			When set to 1, the expansion ROM BAR is enabled.
    370  1.1  matt  * 09:09 VPD		VPD Enable -- Read Only from PCI
    371  1.1  matt  *			When set to 1, VPD is supported.
    372  1.1  matt  * 10:10 MSI		MSI Enable -- Read Only from PCI
    373  1.1  matt  *			When set to 1, MSI is supported.
    374  1.1  matt  * 11:11 PMG		Power Management Enable -- Read Only from PCI
    375  1.1  matt  *			When set to 1, PMG is supported.
    376  1.1  matt  * 12:12 HotSwap	CompactPCI Hot Swap Enable -- Read Only from PCI
    377  1.1  matt  *			When set to 1, HotSwap is supported.
    378  1.1  matt  * 13:13 BIST		BIST Enable -- Read only from PCI
    379  1.1  matt  *			If set to 1, BIST is enabled.
    380  1.1  matt  * 30:14 Reserved
    381  1.1  matt  * 31:31 PRst		PCI Interface Reset Indication -- Read Only
    382  1.1  matt  *			Set to 0 as long as the RST* pin is asserted.
    383  1.1  matt  */
    384  1.1  matt #define	PCI_MODE_PciID_GET(v)	PCI__EXT(v, 0, 1)
    385  1.1  matt #define	PCI_MODE_Pci64		PCI__BIT(2)
    386  1.1  matt #define	PCI_MODE_ExpRom		PCI__BIT(8)
    387  1.1  matt #define	PCI_MODE_VPD		PCI__BIT(9)
    388  1.1  matt #define	PCI_MODE_MSI		PCI__BIT(10)
    389  1.1  matt #define	PCI_MODE_PMG		PCI__BIT(11)
    390  1.1  matt #define	PCI_MODE_HotSwap	PCI__BIT(12)
    391  1.1  matt #define	PCI_MODE_BIST		PCI__BIT(13)
    392  1.1  matt #define	PCI_MODE_PRst		PCI__BIT(31)
    393  1.1  matt 
    394  1.1  matt /*
    395  1.1  matt  * Table 257: PCI Timeout and Retry
    396  1.1  matt  * 07:00 Timeout0	Specifies the number of PClk cycles the GT64260 slave
    397  1.1  matt  *			holds the PCI bus before terminating a transaction
    398  1.1  matt  *			with RETRY.
    399  1.1  matt  * 15:08 Timeout1	Specifies the number of PClk cycles the GT64260 slave
    400  1.1  matt  *			holds the PCI bus before terminating a transaction
    401  1.1  matt  *			with DISCONNECT.
    402  1.1  matt  * 23:16 RetryCtr	Retry Counter
    403  1.1  matt  *			Specifies the number of retries of the GT64260 Master.
    404  1.1  matt  *			The GT64260 generates an interrupt when this timer
    405  1.1  matt  *			expires.  A 0x00 value means a retry forever.
    406  1.1  matt  * 31:24 Reserved
    407  1.1  matt  */
    408  1.1  matt #define	PCI_TMORTRY_Timeout0_GET(v)	PCI__EXT(v, 0, 8)
    409  1.1  matt #define	PCI_TMORTRY_Timeout1_GET(v)	PCI__EXT(v, 8, 8)
    410  1.1  matt #define	PCI_TMORTRY_RetryCtr_GET(v)	PCI__EXT(v, 16, 8)
    411  1.1  matt 
    412  1.1  matt 
    413  1.1  matt /*
    414  1.1  matt  * Table 258: PCI Read Buffer Discard Timer
    415  1.1  matt  * 15:00 Timer		Specifies the number of PClk cycles the GT64260
    416  1.1  matt  *			slave keeps an non-accessed read buffers (non com-
    417  1.1  matt  *			pleted delayed read) before invalidating the buffer.
    418  1.1  matt  * 23:16 RdBufEn	Slave Read Buffers Enable
    419  1.1  matt  *			Each bit corresponds to one of the eight read buffers.
    420  1.1  matt  *			If set to 1, buffer is enabled.
    421  1.1  matt  * 31:24 Reserved
    422  1.1  matt  */
    423  1.1  matt #define	PCI_RdBufDisTmr_Timer_GET(v)	PCI__EXT(v, 0, 16)
    424  1.1  matt #define	PCI_RdBufDisTmr_RdBufEn_GET(v)	PCI__EXT(v, 16, 8)
    425  1.1  matt #define	PCI_RdBufDisTmr_RdBufEn0(v)	PCI__BIT(16)
    426  1.1  matt #define	PCI_RdBufDisTmr_RdBufEn1(v)	PCI__BIT(17)
    427  1.1  matt #define	PCI_RdBufDisTmr_RdBufEn2(v)	PCI__BIT(18)
    428  1.1  matt #define	PCI_RdBufDisTmr_RdBufEn3(v)	PCI__BIT(19)
    429  1.1  matt #define	PCI_RdBufDisTmr_RdBufEn4(v)	PCI__BIT(20)
    430  1.1  matt #define	PCI_RdBufDisTmr_RdBufEn5(v)	PCI__BIT(21)
    431  1.1  matt #define	PCI_RdBufDisTmr_RdBufEn6(v)	PCI__BIT(22)
    432  1.1  matt #define	PCI_RdBufDisTmr_RdBufEn7(v)	PCI__BIT(23)
    433  1.1  matt 
    434  1.1  matt /*
    435  1.1  matt  * Table 259: MSI Trigger Timer
    436  1.1  matt  * 15:00 Timer		Specifies the number of TClk cycles between consecutive
    437  1.1  matt  *			MSI requests.
    438  1.1  matt  * 31:16 Reserved
    439  1.1  matt  */
    440  1.1  matt #define	PCI_MSITrigger_Timer_GET(v)	PCI__EXT(v, 0, 16)
    441  1.1  matt 
    442  1.1  matt /*
    443  1.1  matt  * Table 260: PCI Arbiter Control
    444  1.1  matt  *	NOTE:	If HPPV (bits [28:21]) is set to 0 and PAEn is set to 1,
    445  1.1  matt  *		priority scheme is reversed. This means that high priority
    446  1.1  matt  *		requests are granted if no low priority request is pending.
    447  1.1  matt  * 00:00 Reserved	Must be 0. 0x0
    448  1.1  matt  * 01:01 BDEn		Broken Detection Enable
    449  1.1  matt  *			If set to 1, broken master detection is enabled. A mas-
    450  1.1  matt  *			ter is said to be broken if it fails to respond to grant
    451  1.1  matt  *			assertion within a window specified in BV (bits [6:3]).
    452  1.1  matt  * 02:02 PAEn		Priority Arbitration Enable
    453  1.1  matt  *			0: Low priority requests are granted only when no high
    454  1.1  matt  *			   priority request is pending
    455  1.1  matt  *			1: Weighted round robin arbitration is performed
    456  1.1  matt  *			   between high priority and low priority groups.
    457  1.1  matt  * 06:03 BV		Broken Value
    458  1.1  matt  *			This value sets the maximum number of cycles that the
    459  1.1  matt  *			arbiter waits for a PCI master to respond to its grant
    460  1.1  matt  *			assertion. If a PCI master fails to assert FRAME* within
    461  1.1  matt  *			this time, the PCI arbiter aborts the transaction and
    462  1.1  matt  *			performs a new arbitration cycle and a maskable
    463  1.1  matt  *			interrupt is generated. Must be greater than 0.
    464  1.1  matt  *			NOTE:	The PCI arbiter waits for the current
    465  1.1  matt  *				transaction to end before starting to
    466  1.1  matt  *				count the wait-for-broken cycles.
    467  1.1  matt  *			Must be greater than 1 for masters that performs address
    468  1.1  matt  *			stepping (such as the GTO 64260 PCI master), since they
    469  1.1  matt  *			require GNT* assertion for two cycles.
    470  1.1  matt  * 13:07 P[6:0]		Priority
    471  1.1  matt  *			These bits assign priority levels to the requests
    472  1.1  matt  *			connected to the PCI arbiter. When a PM bit is set to
    473  1.1  matt  *			1, priority of the associated request is high.  The
    474  1.1  matt  *			mapping between P[6:0] bits and the request/grant pairs
    475  1.1  matt  *			are as follows:
    476  1.1  matt  *			 P[0]: internal PCI master	P[1]: external REQ0/GNT0
    477  1.1  matt  *			 P[2]: external REQ1/GNT1	P[3]: external REQ2/GNT2
    478  1.1  matt  *			 P[4]: external REQ3/GNT3	P[5]: external REQ4/GNT4
    479  1.1  matt  *			 P[6]: external REQ5/GNT5
    480  1.1  matt  * 20:14 PD[6:0]	Parking Disable
    481  1.1  matt  *			Use these bits to disable parking on any of the PCI
    482  1.1  matt  *			masters.  When a PD bit is set to 1, parking on the
    483  1.1  matt  *			associated PCI master is disabled.
    484  1.1  matt  *			NOTE:	The arbiter parks on the last master granted
    485  1.1  matt  *				unless disabled through the PD bit. Also, if
    486  1.1  matt  *				PD bits are all 1, the PCI arbiter parks on
    487  1.1  matt  *				the internal PCI master.
    488  1.1  matt  * 28:21 HPPV		High Priority Preset Value
    489  1.1  matt  *			This is the preset value of the high priority counter
    490  1.1  matt  *			(High_cnt). This counter decrements each time a high
    491  1.1  matt  *			priority request is granted. When the counter reaches
    492  1.1  matt  *			zero, it reloads with this preset value.  The counter
    493  1.1  matt  *			reloads when a low priority request is granted.
    494  1.1  matt  * 30:29 Reserved
    495  1.1  matt  * 31:31 EN		Enable
    496  1.1  matt  *			Setting this bit to 1 enables operation of the arbiter.
    497  1.1  matt  */
    498  1.1  matt #define	PCI_ARBCTL_MBZ0_0		PCI__BIT(0)
    499  1.1  matt #define	PCI_ARBCTL_BDEn			PCI__BIT(1)
    500  1.1  matt #define	PCI_ARBCTL_PAEn			PCI__BIT(2)
    501  1.1  matt #define	PCI_ARBCTL_BV_GET(v)		PCI__EXT(v, 3, 4)
    502  1.1  matt #define	PCI_ARBCTL_P_GET(v)		PCI__EXT(v, 7, 7)
    503  1.1  matt #define	PCI_ARBCTL_PD_GET(v)		PCI__EXT(v, 14, 7)
    504  1.1  matt #define	PCI_ARBCTL_HPPV_GET(v)		PCI__EXT(v, 21, 7)
    505  1.1  matt #define	PCI_ARBCTL_EN			PCI__BIT(31)
    506  1.1  matt 
    507  1.1  matt #define	PCI_ARBPRI_IntPci		PCI__BIT(0)
    508  1.1  matt #define	PCI_ARBPRI_ExtReqGnt0		PCI__BIT(1)
    509  1.1  matt #define	PCI_ARBPRI_ExtReqGnt1		PCI__BIT(2)
    510  1.1  matt #define	PCI_ARBPRI_EXtReqGnt2		PCI__BIT(3)
    511  1.1  matt #define	PCI_ARBPRI_EXtReqGnt3		PCI__BIT(4)
    512  1.1  matt #define	PCI_ARBPRI_EXtReqGnt4		PCI__BIT(5)
    513  1.1  matt #define	PCI_ARBPRI_EXtReqGnt5		PCI__BIT(6)
    514  1.1  matt 
    515  1.1  matt /*
    516  1.1  matt  * Table 261: PCI Interface Crossbar Control (Low)
    517  1.1  matt  * 03:00 Arb0		Slice 0 of PCI master pizza arbiter.
    518  1.1  matt  * 07:04 Arb1		Slice 1 of PCI master pizza arbiter.
    519  1.1  matt  * 11:08 Arb2		Slice 2 of PCI master pizza arbiter.
    520  1.1  matt  * 15:12 Arb3		Slice 3 of PCI master pizza arbiter.
    521  1.1  matt  * 19:16 Arb4		Slice 4 of PCI master pizza arbiter.
    522  1.1  matt  * 23:20 Arb5		Slice 5 of PCI master pizza arbiter.
    523  1.1  matt  * 27:24 Arb6		Slice 6 of PCI master pizza arbiter.
    524  1.1  matt  * 31:28 Arb7		Slice 7 of PCI master pizza arbiter.
    525  1.1  matt  */
    526  1.1  matt #define	PCI_IFXBRCTL_GET_SLICE(v, n)	PCI__EXT(v, (n) * 4, 4)
    527  1.1  matt #define	PCI_IFXBRCTL_SET_SLICE(v, n, s)	((void)(PCI__CLR(v, (n)*4, 4),\
    528  1.1  matt 						(v) |= PCI__INS((n)*4, s)))
    529  1.1  matt 
    530  1.1  matt /*
    531  1.1  matt  * Table 262: PCI Interface Crossbar Control (High)
    532  1.1  matt  * 03:00 Arb8		Slice 8 of PCI master pizza arbiter.
    533  1.1  matt  * 07:04 Arb9		Slice 9 of PCI master pizza arbiter.
    534  1.1  matt  * 11:08 Arb10		Slice 10 of PCI master pizza arbiter.
    535  1.1  matt  * 15:12 Arb11		Slice 11 of PCI master pizza arbiter.
    536  1.1  matt  * 19:16 Arb12		Slice 12 of PCI master pizza arbiter.
    537  1.1  matt  * 23:20 Arb13		Slice 13 of PCI master pizza arbiter.
    538  1.1  matt  * 27:24 Arb14		Slice 14 of PCI master pizza arbiter.
    539  1.1  matt  * 31:28 Arb15		Slice 15 of PCI master pizza arbiter.
    540  1.1  matt  */
    541  1.1  matt #define	PCI_IFXBRCH_GET_SLICE(v, n)	PCI__EXT(v, ((n) - 8) * 4, 4)
    542  1.1  matt #define	PCI_IFXBRCH_SET_SLICE(v, n, s)	((void)(PCI__CLR(v, ((n)*-8)4, 4),\
    543  1.1  matt 						(v) |= PCI__INS(((n)-8)*4, s)))
    544  1.1  matt 
    545  1.1  matt /*
    546  1.1  matt  * Table 263: PCI Interface Crossbar Timeout
    547  1.1  matt 		(NOTE: Reserved for Galileo Technology usage.)
    548  1.1  matt  * 07:00 Timeout	Crossbar Arbiter Timeout Preset Value
    549  1.1  matt  * 15:08 Reserved
    550  1.1  matt  * 16:16 TimeoutEn	Crossbar Arbiter Timer Enable (1: Disable)
    551  1.1  matt  * 31:17 Reserved
    552  1.1  matt  */
    553  1.1  matt #define PCI_IFXBRTMO_Timeout_GET(v)	PCI__EXT(v, 0, 8)
    554  1.1  matt #define PCI_IFXBRTMO_TimeoutEn		PCI__BIT(16)
    555  1.1  matt 
    556  1.1  matt /*
    557  1.1  matt  * Table 264: PCI Read Response Crossbar Control (Low)
    558  1.1  matt  * 03:00 Arb0		Slice 0 of PCI slave pizza arbiter.
    559  1.1  matt  * 07:04 Arb1		Slice 1 of PCI slave pizza arbiter.
    560  1.1  matt  * 11:08 Arb2		Slice 2 of PCI slave pizza arbiter.
    561  1.1  matt  * 15:12 Arb3		Slice 3 of PCI slave pizza arbiter.
    562  1.1  matt  * 19:16 Arb4		Slice 4 of PCI slave pizza arbiter.
    563  1.1  matt  * 23:20 Arb5		Slice 5 of PCI slave pizza arbiter.
    564  1.1  matt  * 27:24 Arb6		Slice 6 of PCI slave pizza arbiter.
    565  1.1  matt  * 31:28 Arb7		Slice 7 of PCI slave pizza arbiter.
    566  1.1  matt  */
    567  1.1  matt #define	PCI_RRXBRCL_GET_SLICE(v, n)	PCI__EXT(v, (n) * 4, 4)
    568  1.1  matt #define	PCI_RRXBRCL_SET_SLICE(v, n, s)	((void)(PCI__CLR(v, (n)*4, 4),\
    569  1.1  matt 						(v) |= PCI__INS((n)*4, s)))
    570  1.1  matt 
    571  1.1  matt 
    572  1.1  matt /*
    573  1.1  matt  * Table 265: PCI Read Response Crossbar Control (High)
    574  1.1  matt  * 03:00 Arb8		Slice 8 of PCI slave pizza arbiter.
    575  1.1  matt  * 07:04 Arb9		Slice 9 of PCI slave pizza arbiter.
    576  1.1  matt  * 11:08 Arb10		Slice 10 of PCI slave pizza arbiter.
    577  1.1  matt  * 15:12 Arb11		Slice 11 of PCI slave pizza arbiter.
    578  1.1  matt  * 19:16 Arb12		Slice 12 of PCI slave pizza arbiter.
    579  1.1  matt  * 23:20 Arb13		Slice 13 of PCI slave pizza arbiter.
    580  1.1  matt  * 27:24 Arb14		Slice 14 of PCI slave pizza arbiter.
    581  1.1  matt  * 31:28 Arb15		Slice 15 of PCI slave pizza arbiter.
    582  1.1  matt  */
    583  1.1  matt #define	PCI_RRXBRCH_GET_SLICE(v, n)	PCI__EXT(v, ((n) - 8) * 4, 4)
    584  1.1  matt #define	PCI_RRXBRCH_SET_SLICE(v, n, s)	((void)(PCI__CLR(v, ((n)*-8)4, 4),\
    585  1.1  matt 						(v) |= PCI__INS(((n)-8)*4, s)))
    586  1.1  matt 
    587  1.1  matt /*
    588  1.1  matt  * Table 266: PCI Sync Barrier Virtual Register
    589  1.1  matt  * 31:0 SyncReg Sync Barrier Virtual Register
    590  1.1  matt  * PCI read from this register results in PCI slave sync barrier
    591  1.1  matt  * action.  The returned data is un-deterministic.  Read Only.
    592  1.1  matt  */
    593  1.1  matt 
    594  1.1  matt /*
    595  1.1  matt  * Table 267: PCI P2P Configuration
    596  1.1  matt  * 07:00 2ndBusL	Secondary PCI Interface Bus Range Lower Boundary
    597  1.1  matt  * 15:08 2ndBusH	Secondary PCI Interface Bus Range Upper Boundary
    598  1.1  matt  * 23:16 BusNum		The PCI bus number to which the PCI interface
    599  1.1  matt  *			is connected.
    600  1.1  matt  * 28:24 DevNum		The PCI interface's device number.
    601  1.1  matt  * 31:29 Reserved	Reserved.
    602  1.1  matt  */
    603  1.1  matt #define	PCI_P2PCFG_2ndBusL_GET(v)	PCI_EXT(v,  0, 8)
    604  1.1  matt #define	PCI_P2PCFG_2ndBusH_GET(v)	PCI_EXT(v,  8, 8)
    605  1.1  matt #define	PCI_P2PCFG_BusNum_GET(v)	PCI_EXT(v, 16, 8)
    606  1.1  matt #define	PCI_P2PCFG_DevNum_GET(v)	PCI_EXT(v, 24, 5)
    607  1.1  matt 
    608  1.1  matt /*
    609  1.1  matt  * Table 268: PCI P2P Swap Control
    610  1.1  matt  * 02:00 M0Sw		P2P Mem0 BAR Swap Control
    611  1.1  matt  * 03:03 M0Req64	P2P Mem0 BAR Force REQ64
    612  1.1  matt  * 06:04 M1Sw		P2P Mem1 BAR Swap Control
    613  1.1  matt  * 07:07 M1Req64	P2P Mem1 BAR Force REQ64
    614  1.1  matt  * 10:08 DM0Sw		P2P DAC Mem0 BAR Swap Control
    615  1.1  matt  * 11:11 DM0Req64	P2P DAC Mem0 BAR Force REQ64
    616  1.1  matt  * 14:12 DM1Sw		P2P DAC Mem1 BAR Swap Control
    617  1.1  matt  * 15:15 DM1Req64	P2P DAC Mem1 BAR Force REQ64
    618  1.1  matt  * 18:16 IOSw		P2P I/O BAR Swap Control
    619  1.1  matt  * 19:19 Reserved
    620  1.1  matt  * 22:20 CfgSw		P2P Configuration Swap Control
    621  1.1  matt  * 31:19 Reserved
    622  1.1  matt  */
    623  1.1  matt #define	PCI_P2PSWAP_M0Sw_GET(v)		PCI__EXT(v, 0, 3)
    624  1.1  matt #define	PCI_P2PSWAP_M0Req64		PCI__BIT(3)
    625  1.1  matt #define	PCI_P2PSWAP_M1Sw_GET(v)		PCI__EXT(v, 4, 3)
    626  1.1  matt #define	PCI_P2PSWAP_M1Req64		PCI__BIT(7)
    627  1.1  matt #define	PCI_P2PSWAP_DM0Sw_GET(v)	PCI__EXT(v, 8, 3)
    628  1.1  matt #define	PCI_P2PSWAP_DM0Req64		PCI__BIT(11)
    629  1.1  matt #define	PCI_P2PSWAP_DM1Sw_GET(v)	PCI__EXT(v, 12, 3)
    630  1.1  matt #define	PCI_P2PSWAP_DM1Req64		PCI__BIT(15)
    631  1.1  matt #define	PCI_P2PSWAP_CfgSw_GET(v)	PCI__EXT(v, 20, 3)
    632  1.1  matt 
    633  1.1  matt 
    634  1.1  matt 
    635  1.1  matt /*
    636  1.1  matt  * Table 269: PCI Access Control Base (Low)
    637  1.1  matt  * 11:00 Addr		Base Address Corresponds to address bits[31:20].
    638  1.1  matt  * 12:12 PrefetchEn	Read Prefetch Enable
    639  1.1  matt  *			0: Prefetch disabled (The PCI slave reads single words)
    640  1.1  matt  *			1: Prefetch enabled.
    641  1.1  matt  * 14:14 Reserved	 Must be 0
    642  1.1  matt  * 15:15 Reserved
    643  1.1  matt  * 16:16 RdPrefetch	PCI Read Aggressive Prefetch Enable; 0: Disable;
    644  1.1  matt  *			1: Enable (The PCI slave prefetches two
    645  1.1  matt  *			bursts in advance)
    646  1.1  matt  * 17:17 RdLinePrefetch	PCI Read Line Aggressive Prefetch Enable; 0: Disable;
    647  1.1  matt  *			1: Enable (PCI slave prefetch two bursts in advance)
    648  1.1  matt  * 18:18 RdMulPrefetch	PCI Read Multiple Aggressive Prefetch Enable
    649  1.1  matt  *			0: Disable; 1: Enable (PCI slave prefetch two bursts in
    650  1.1  matt  *			advance)
    651  1.1  matt  * 19:19 Reserved
    652  1.1  matt  * 21:20 MBurst		PCI Max Burst
    653  1.1  matt  *			Specifies the maximum burst size for a single transac-
    654  1.1  matt  *			tion between a PCI slave and the other interfaces
    655  1.1  matt  *				00 - 4 64-bit words
    656  1.1  matt  *				01 - 8 64-bit words
    657  1.1  matt  *				10 - 16 64-bit words
    658  1.1  matt  *				11 - Reserved
    659  1.1  matt  * 23:22 Reserved
    660  1.1  matt  * 25:24 PCISwap	Data Swap Control
    661  1.1  matt  *				00 - Byte Swap
    662  1.1  matt  *				01 - No swapping
    663  1.1  matt  *				10 - Both byte and word swap
    664  1.1  matt  *				11 - Word swap
    665  1.1  matt  * 26:26 Reserved	Must be 0
    666  1.1  matt  * 27:27 Reserved
    667  1.1  matt  * 28:28 AccProt	Access Protect (0: PCI access is allowed; 1; Region is
    668  1.1  matt 			not accessible from PCI)
    669  1.1  matt  * 29:29 WrProt		Write Protect (0: PCI write is allowed; 1: Region is
    670  1.1  matt  *			not writeable from PCI)
    671  1.1  matt  * 31:30 Reserved
    672  1.1  matt  */
    673  1.1  matt #define	PCI_ACCCTLBASEL_Addr_GET(v)	PCI__EXT(v, 0, 12)
    674  1.1  matt #define	PCI_ACCCTLBASEL_PrefetchEn	PCI__BIT(12)
    675  1.1  matt #define PCI_ACCCTLBASEL_MBZ0_14		PCI__BIT(14)
    676  1.1  matt #define PCI_ACCCTLBASEL_RdPrefetch	PCI__BIT(16)
    677  1.1  matt #define PCI_ACCCTLBASEL_RdLinePrefetch	PCI__BIT(17)
    678  1.1  matt #define PCI_ACCCTLBASEL_RdMulPrefetch	PCI__BIT(18)
    679  1.1  matt #define PCI_ACCCTLBASEL_WBurst		PCI__EXT(v, 20, 2)
    680  1.1  matt #define PCI_ACCCTLBASEL_PCISwap		PCI__EXT(v, 24, 2)
    681  1.1  matt #define PCI_ACCCTLBASEL_MBZ0_26		PCI__BIT(26)
    682  1.1  matt #define PCI_ACCCTLBASEL_AccProt		PCI__BIT(28)
    683  1.1  matt #define PCI_ACCCTLBASEL_WrProt		PCI__BIT(29)
    684  1.1  matt 
    685  1.1  matt #define	PCI_WBURST_4_QW			0x00
    686  1.1  matt #define	PCI_WBURST_8_QW			0x01
    687  1.1  matt #define	PCI_WBURST_16_QW		0x02
    688  1.1  matt #define	PCI_WBURST_Reserved		0x04
    689  1.1  matt 
    690  1.1  matt #define	PCI_PCISWAP_ByteSwap		0x00
    691  1.1  matt #define	PCI_PCISWAP_NoSwap		0x01
    692  1.1  matt #define	PCI_PCISWAP_ByteWordSwap	0x02
    693  1.1  matt #define	PCI_PCISWAP_WordSwap		0x04
    694  1.1  matt 
    695  1.1  matt /*
    696  1.1  matt  * Table 293: PCI Snoop Control Base (Low)
    697  1.1  matt  * 11:00 Addr		Base Address	 Corresponds to address bits[31:20].
    698  1.1  matt  * 13:12 Snoop		Snoop Type
    699  1.1  matt  * 31:14 Reserved
    700  1.1  matt  */
    701  1.1  matt #define PCI_SNOOPCTL_ADDR(v)	PCI__EXT(v, 0, 12)
    702  1.1  matt #define PCI_SNOOPCTL_TYPE(v)	PCI__EXT(v, 12, 2)
    703  1.1  matt 
    704  1.1  matt #define	PCI_SNOOP_None		0	/* no snoop */
    705  1.1  matt #define	PCI_SNOOP_WT		1	/* Snoop to WT region */
    706  1.1  matt #define	PCI_SNOOP_WB		2	/* Snoop to WB region */
    707  1.1  matt 
    708  1.1  matt 
    709  1.1  matt /*
    710  1.1  matt  * Table 305: PCI Configuration Address
    711  1.1  matt  *
    712  1.1  matt  * 07:02 RegNum		Register number.
    713  1.1  matt  * 10:08 FunctNum	Function number.
    714  1.1  matt  * 15:11 DevNum		Device number.
    715  1.1  matt  * 23:16 BusNum		Bus number.
    716  1.1  matt  * 31:31 ConfigEn	When set, an access to the Configuration Data
    717  1.1  matt  *			register is translated into a Configuration
    718  1.1  matt  *			or Special cycle on the PCI bus.
    719  1.1  matt  */
    720  1.1  matt #define	PCI_CFG_MAKE_TAG(bus, dev, fun, reg)	(PCI__BIT(31)|\
    721  1.1  matt 						 PCI__INS(16, (bus))|\
    722  1.1  matt 						 PCI__INS(11, (dev))|\
    723  1.1  matt 						 PCI__INS( 8, (fun))|\
    724  1.1  matt 						 PCI__INS( 0, (reg)))
    725  1.1  matt #define	PCI_CFG_GET_BUSNO(tag)			PCI__EXT(tag, 16, 8)
    726  1.1  matt #define	PCI_CFG_GET_DEVNO(tag)			PCI__EXT(tag, 11, 5)
    727  1.1  matt #define	PCI_CFG_GET_FUNCNO(tag)			PCI__EXT(tag,  8, 3)
    728  1.1  matt #define	PCI_CFG_GET_REGNO(tag)			PCI__EXT(tag,  0, 8)
    729  1.1  matt 
    730  1.1  matt /*
    731  1.1  matt  * Table 306: PCI Configuration Data
    732  1.1  matt  *
    733  1.1  matt  * 31:00 ConfigData	The data is transferred to/from the PCI bus when
    734  1.1  matt  *			the CPU accesses this register and the ConfigEn
    735  1.1  matt  *			bit in the Configuration Address register is set
    736  1.1  matt  *
    737  1.1  matt  * A CPU access to this register causes the GT64260 to perform a Configuration
    738  1.1  matt  * or Special cycle on the PCI bus.
    739  1.1  matt  */
    740  1.1  matt 
    741  1.1  matt 
    742  1.1  matt /*
    743  1.1  matt  * Table 307: PCI Interrupt Acknowledge (This register is READ ONLY)
    744  1.1  matt  * 31:00 IntAck		A CPU read access to this register forces an
    745  1.1  matt  *			interrupt acknowledge cycle on the PCI bus.
    746  1.1  matt  */
    747  1.1  matt 
    748  1.1  matt 
    749  1.1  matt /*
    750  1.1  matt  * Table 308: PCI SERR* Mask
    751  1.1  matt  *
    752  1.1  matt  * NOTE: The GT64260 asserts SERR* only if SERR* is enabled via the PCI Status
    753  1.1  matt  *       and Command register.
    754  1.1  matt  * If the corresponding bit is set, then asserts SERR* upon ...
    755  1.1  matt  */
    756  1.1  matt #define PCI_SERRMSK_SAPerr	PCI__BIT(0)	/* PCI slave detection of bad
    757  1.1  matt 						 * address parity. */
    758  1.1  matt #define PCI_SERRMSK_SWrPerr	PCI__BIT(1)	/* PCI slave detection of bad
    759  1.1  matt 						 * write data parity. */
    760  1.1  matt #define PCI_SERRMSK_SRdPerr	PCI__BIT(2)	/* a PERR* response to read
    761  1.1  matt 						 * data driven by the PCI
    762  1.1  matt 						 * slave. */
    763  1.1  matt #define PCI_SERRMSK_MAPerr	PCI__BIT(4)	/* a PERR* response to an
    764  1.1  matt 						 * address driven by the PCI
    765  1.1  matt 						 * master. */
    766  1.1  matt #define PCI_SERRMSK_MWrPerr	PCI__BIT(5)	/* a PERR* response to write
    767  1.1  matt 						 * data driven by the PCI
    768  1.1  matt 						 * master. */
    769  1.1  matt #define PCI_SERRMSK_MRdPerr	PCI__BIT(6)	/* bad data parity detection
    770  1.1  matt 						 * during a PCI master read
    771  1.1  matt 						 * transaction. */
    772  1.1  matt #define PCI_SERRMSK_MMabort	PCI__BIT(8)	/* a PCI master generation of
    773  1.1  matt 						 * master abort. */
    774  1.1  matt #define PCI_SERRMSK_MTabort	PCI__BIT(9)	/* a PCI master detection of
    775  1.1  matt 						 * target abort. */
    776  1.1  matt #define PCI_SERRMSK_MRetry	PCI__BIT(11)	/* a PCI master reaching retry
    777  1.1  matt 						 * counter limit. */
    778  1.1  matt #define PCI_SERRMSK_SMabort	PCI__BIT(16)	/* a PCI slave detection of
    779  1.1  matt 						 * master abort. */
    780  1.1  matt #define PCI_SERRMSK_STabort	PCI__BIT(17)	/* a PCI slave termination of
    781  1.1  matt 						 * a transaction with Target
    782  1.1  matt 						 * Abort. */
    783  1.1  matt #define PCI_SERRMSK_SAccProt	PCI__BIT(18)	/* a PCI slave access protect
    784  1.1  matt 						 * violation. */
    785  1.1  matt #define PCI_SERRMSK_SWrProt	PCI__BIT(19)	/* a PCI slave write protect
    786  1.1  matt 						 * violation. */
    787  1.1  matt #define PCI_SERRMSK_SRdBuf	PCI__BIT(20)	/* the PCI slave's read buffer,
    788  1.1  matt 						 * discard timer expires */
    789  1.1  matt #define PCI_SERRMSK_Arb		PCI__BIT(21)	/* the internal PCI arbiter
    790  1.1  matt 						 * detection of a broken PCI
    791  1.1  matt 						 * master. */
    792  1.1  matt 
    793  1.1  matt #define PCI_SERRMSK_ALL_ERRS \
    794  1.1  matt 	(PCI_SERRMSK_SAPerr|PCI_SERRMSK_SWrPerr|PCI_SERRMSK_SRdPerr \
    795  1.1  matt 	|PCI_SERRMSK_MAPerr|PCI_SERRMSK_MWrPerr|PCI_SERRMSK_MRdPerr \
    796  1.1  matt 	|PCI_SERRMSK_MMabort|PCI_SERRMSK_MTabort|PCI_SERRMSK_MRetry \
    797  1.1  matt 	|PCI_SERRMSK_SMabort|PCI_SERRMSK_STabort|PCI_SERRMSK_SAccProt \
    798  1.1  matt 	|PCI_SERRMSK_SWrProt|PCI_SERRMSK_SRdBuf|PCI_SERRMSK_Arb)
    799  1.1  matt 
    800  1.1  matt 
    801  1.1  matt 
    802  1.1  matt /*
    803  1.1  matt  * Table 309: PCI Error Address (Low) -- Read Only.
    804  1.1  matt  * 31:00 ErrAddr	PCI address bits [31:0] are latched upon an error
    805  1.1  matt  *			condition.  Upon address latch, no new addresses can
    806  1.1  matt  *			be registered (due to additional error condition) until
    807  1.1  matt  *			the register is being read.
    808  1.1  matt  */
    809  1.1  matt 
    810  1.1  matt 
    811  1.1  matt 
    812  1.1  matt /*
    813  1.1  matt  * Table 310: PCI Error Address (High)	Applicable only when running DAC cycles.
    814  1.1  matt  * 31:00 ErrAddr	PCI address bits [63:32] are latched upon
    815  1.1  matt  *			error condition.
    816  1.1  matt  *
    817  1.1  matt  * NOTE: Upon data sample, no new data is latched until the PCI Error Low
    818  1.1  matt  *       Address register is read. This means that PCI Error Low Address
    819  1.1  matt  *       register must bethe last register read by the interrupt handler.
    820  1.1  matt  */
    821  1.1  matt 
    822  1.1  matt /*
    823  1.1  matt  * Table 311: PCI Error Data (Low)
    824  1.1  matt  * 31:00 ErrData	PCI data bits [31:00] are latched upon error condition.
    825  1.1  matt  */
    826  1.1  matt 
    827  1.1  matt /*
    828  1.1  matt  * Table 312: PCI Error Data (High)	Applicable only when running
    829  1.1  matt  *					64-bit cycles.
    830  1.1  matt  * 31:00 ErrData	PCI data bits [63:32] are latched upon error condition.
    831  1.1  matt  */
    832  1.1  matt 
    833  1.1  matt /*
    834  1.1  matt  * Table 313: PCI Error Command
    835  1.1  matt  * 03:00 ErrCmd		PCI command is latched upon error condition.
    836  1.1  matt  * 07:04 Reserved
    837  1.1  matt  * 15:08 ErrBE		PCI byte enable is latched upon error condition.
    838  1.1  matt  * 16:16 ErrPAR		PCI PAR is latched upon error condition.
    839  1.1  matt  * 17:17 ErrPAR64	PCI PAR64 is latched upon error condition.
    840  1.1  matt  *			Applicable only when running 64-bit cycles.
    841  1.1  matt  * 31:18 Reserved
    842  1.1  matt  * NOTE: Upon data sample, no new data is latched until the PCI Error Low
    843  1.1  matt  * Address register is read. This means that PCI Error Low Address register
    844  1.1  matt  * must be the last register read by the interrupt handler.
    845  1.1  matt  */
    846  1.1  matt #define PCI_ERRCMD_Cmd_GET(v)		PCI__EXT(v, 0, 4)
    847  1.1  matt #define PCI_ERRCMD_ByteEn_GET(v)	PCI__EXT(v, 8, 8)
    848  1.1  matt #define	PCI_ERRCMD_PAR			PCI__BIT(16)
    849  1.1  matt #define	PCI_ERRCMD_PAR64		PCI__BIT(17)
    850  1.1  matt 
    851  1.1  matt /*
    852  1.1  matt  * Table 314: PCI Interrupt Cause
    853  1.1  matt  * 1. All bits are Clear Only. A cause bit set upon error event occurrence.
    854  1.1  matt  *    A write of 0 clears the bit. A write of 1 has no affect.
    855  1.1  matt  * 2. PCI Interrupt bits are organized in four groups:
    856  1.1  matt  *    bits[ 7: 0] for address and data parity errors,
    857  1.1  matt  *    bits[15: 8] for PCI master transaction failure (possible external
    858  1.1  matt  *		  target problem),
    859  1.1  matt  *    bits[23:16] for slave response failure (possible external master problem),
    860  1.1  matt  *    bits[26:24] for external PCI events that require CPU handle.
    861  1.1  matt  */
    862  1.1  matt #define PCI_IC_SAPerr		PCI__BIT(0)	/* The PCI slave detected
    863  1.1  matt 						 * bad address parity. */
    864  1.1  matt #define PCI_IC_SWrPerr		PCI__BIT(1)	/* The PCI slave detected
    865  1.1  matt 						 * bad write data parity. */
    866  1.1  matt #define PCI_IC_SRdPerr		PCI__BIT(2)	/* PERR* response to read
    867  1.1  matt 						 * data driven by PCI slave. */
    868  1.1  matt #define PCI_IC_MAPerr		PCI__BIT(4)	/* PERR* response to address
    869  1.1  matt 						 * driven by the PCI master. */
    870  1.1  matt #define PCI_IC_MWrPerr		PCI__BIT(5)	/* PERR* response to write data
    871  1.1  matt 						 * driven by the PCI master. */
    872  1.1  matt #define PCI_IC_MRdPerr		PCI__BIT(6)	/* Bad data parity detected
    873  1.1  matt 						 * during the PCI master read
    874  1.1  matt 						 * transaction. */
    875  1.1  matt #define PCI_IC_MMabort		PCI__BIT(8)	/* The PCI master generated
    876  1.1  matt 						 * master abort. */
    877  1.1  matt #define PCI_IC_MTabort		PCI__BIT(9)	/* The PCI master detected
    878  1.1  matt 						 * target abort. */
    879  1.1  matt #define PCI_IC_MMasterEn	PCI__BIT(10)	/* An attempt to generate a PCI
    880  1.1  matt 						 * transaction while master is
    881  1.1  matt 						 * not enabled. */
    882  1.1  matt #define PCI_IC_MRetry		PCI__BIT(11)	/* The PCI master reached
    883  1.1  matt 						 * retry counter limit. */
    884  1.1  matt #define PCI_IC_SMabort		PCI__BIT(16)	/* The PCI slave detects an il-
    885  1.1  matt 						 * legal master termination. */
    886  1.1  matt #define PCI_IC_STabort		PCI__BIT(17)	/* The PCI slave terminates a
    887  1.1  matt 						 * transaction with Target
    888  1.1  matt 						 * Abort. */
    889  1.1  matt #define PCI_IC_SAccProt		PCI__BIT(18)	/* A PCI slave access protect
    890  1.1  matt 						 * violation. */
    891  1.1  matt #define PCI_IC_SWrProt		PCI__BIT(19)	/* A PCI slave write protect
    892  1.1  matt 						 * violation. */
    893  1.1  matt #define PCI_IC_SRdBuf		PCI__BIT(20)	/* A PCI slave read buffer
    894  1.1  matt 						 * discard timer expired. */
    895  1.1  matt #define PCI_IC_Arb		PCI__BIT(21)	/* Internal PCI arbiter detec-
    896  1.1  matt 						 * tion of a broken master. */
    897  1.1  matt #define PCI_IC_BIST		PCI__BIT(24)	/* PCI BIST Interrupt */
    898  1.1  matt #define PCI_IC_PMG		PCI__BIT(25)	/* PCI Power Management
    899  1.1  matt 						 * Interrupt */
    900  1.1  matt #define PCI_IC_PRST		PCI__BIT(26)	/* PCI Reset Assert */
    901  1.1  matt 
    902  1.1  matt /*
    903  1.1  matt 31:27 Sel Specifies the error event currently being reported in the
    904  1.1  matt Error Address, Error Data, and Error Command registers.
    905  1.1  matt */
    906  1.1  matt #define PCI_IC_SEL_GET(v)	PCI__EXT((v), 27, 5)
    907  1.1  matt #define PCI_IC_SEL_SAPerr	0x00
    908  1.1  matt #define PCI_IC_SEL_SWrPerr	0x01
    909  1.1  matt #define PCI_IC_SEL_SRdPerr	0x02
    910  1.1  matt #define PCI_IC_SEL_MAPerr	0x04
    911  1.1  matt #define PCI_IC_SEL_MWrPerr	0x05
    912  1.1  matt #define PCI_IC_SEL_MRdPerr	0x06
    913  1.1  matt #define PCI_IC_SEL_MMabort	0x08
    914  1.1  matt #define PCI_IC_SEL_MTabort	0x09
    915  1.1  matt #define PCI_IC_SEL_MMasterEn	0x0a
    916  1.1  matt #define PCI_IC_SEL_MRetry	0x0b
    917  1.1  matt #define PCI_IC_SEL_SMabort	0x10
    918  1.1  matt #define PCI_IC_SEL_STabort	0x11
    919  1.1  matt #define PCI_IC_SEL_SAccProt	0x12
    920  1.1  matt #define PCI_IC_SEL_SWrProt	0x13
    921  1.1  matt #define PCI_IC_SEL_SRdBuf	0x14
    922  1.1  matt #define PCI_IC_SEL_Arb		0x15
    923  1.1  matt #define PCI_IC_SEL_BIST		0x18
    924  1.1  matt #define PCI_IC_SEL_PMG		0x19
    925  1.1  matt #define PCI_IC_SEL_PRST		0x1a
    926  1.1  matt 
    927  1.1  matt #define	PCI_IC_SEL_Strings { \
    928  1.1  matt 	"SAPerr",  "SWrPerr", "SRdPerr",   "Rsvd#03", \
    929  1.1  matt 	"MAPerr",  "MWrPerr", "MRdPerr",   "Rsvd#07", \
    930  1.1  matt 	"MMabort", "MTabort", "MMasterEn", "MRetry", \
    931  1.1  matt 	"Rsvd#0c", "Rsvd#0d", "Rsvd#0e",   "Rsvd#0f", \
    932  1.1  matt 	"SMabort", "STabort", "SAccProt",  "SWrProt", \
    933  1.1  matt 	"SRdBuf",  "Arb",     "Rsvd#16",   "Rsvd#17", \
    934  1.1  matt 	"BIST",    "PMG",     "PRST",      "Rsvd#1b", \
    935  1.1  matt 	"Rsvd#1c", "Rsvd#1d", "Rsvd#1e",   "Rsvd#1f" }
    936  1.1  matt 
    937  1.1  matt /*
    938  1.1  matt  * Table 315: PCI Error Mask
    939  1.1  matt  * If the corresponding bit is 1, that interrupt is enabled
    940  1.1  matt  * Bits 3, 7, 12:15, 22:23, 27:31 are reserved.
    941  1.1  matt  */
    942  1.1  matt #define PCI_ERRMASK_SAPErr		PCI__BIT(0)
    943  1.1  matt #define PCI_ERRMASK_SWrPErr		PCI__BIT(1)
    944  1.1  matt #define PCI_ERRMASK_SRdPErr		PCI__BIT(2)
    945  1.1  matt #define PCI_ERRMASK_MAPErr		PCI__BIT(4)
    946  1.1  matt #define PCI_ERRMASK_MWRPErr		PCI__BIT(5)
    947  1.1  matt #define PCI_ERRMASK_MRDPErr		PCI__BIT(6)
    948  1.1  matt #define PCI_ERRMASK_MMAbort		PCI__BIT(8)
    949  1.1  matt #define PCI_ERRMASK_MTAbort		PCI__BIT(9)
    950  1.1  matt #define PCI_ERRMASK_MMasterEn		PCI__BIT(10)
    951  1.1  matt #define PCI_ERRMASK_MRetry		PCI__BIT(11)
    952  1.1  matt #define PCI_ERRMASK_SMAbort		PCI__BIT(16)
    953  1.1  matt #define PCI_ERRMASK_STAbort		PCI__BIT(17)
    954  1.1  matt #define PCI_ERRMASK_SAccProt		PCI__BIT(18)
    955  1.1  matt #define PCI_ERRMASK_SWrProt		PCI__BIT(19)
    956  1.1  matt #define PCI_ERRMASK_SRdBuf		PCI__BIT(20)
    957  1.1  matt #define PCI_ERRMASK_Arb			PCI__BIT(21)
    958  1.1  matt #define PCI_ERRMASK_BIST		PCI__BIT(24)
    959  1.1  matt #define PCI_ERRMASK_PMG			PCI__BIT(25)
    960  1.1  matt #define PCI_ERRMASK_PRST		PCI__BIT(26)
    961  1.1  matt 
    962  1.1  matt #endif /* _DEV_GTPCIREG_H_ */
    963