19a5557flucy wang - Sun Microsystems - Beijing China/*
29a5557flucy wang - Sun Microsystems - Beijing China * CDDL HEADER START
39a5557flucy wang - Sun Microsystems - Beijing China *
49a5557flucy wang - Sun Microsystems - Beijing China * The contents of this file are subject to the terms of the
59a5557flucy wang - Sun Microsystems - Beijing China * Common Development and Distribution License (the "License").
69a5557flucy wang - Sun Microsystems - Beijing China * You may not use this file except in compliance with the License.
79a5557flucy wang - Sun Microsystems - Beijing China *
89a5557flucy wang - Sun Microsystems - Beijing China * You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
99a5557flucy wang - Sun Microsystems - Beijing China * or http://www.opensolaris.org/os/licensing.
109a5557flucy wang - Sun Microsystems - Beijing China * See the License for the specific language governing permissions
119a5557flucy wang - Sun Microsystems - Beijing China * and limitations under the License.
129a5557flucy wang - Sun Microsystems - Beijing China *
139a5557flucy wang - Sun Microsystems - Beijing China * When distributing Covered Code, include this CDDL HEADER in each
149a5557flucy wang - Sun Microsystems - Beijing China * file and include the License file at usr/src/OPENSOLARIS.LICENSE.
159a5557flucy wang - Sun Microsystems - Beijing China * If applicable, add the following below this CDDL HEADER, with the
169a5557flucy wang - Sun Microsystems - Beijing China * fields enclosed by brackets "[]" replaced with your own identifying
179a5557flucy wang - Sun Microsystems - Beijing China * information: Portions Copyright [yyyy] [name of copyright owner]
189a5557flucy wang - Sun Microsystems - Beijing China *
199a5557flucy wang - Sun Microsystems - Beijing China * CDDL HEADER END
209a5557flucy wang - Sun Microsystems - Beijing China */
219383396jing xiong ERI-SUN
229a5557flucy wang - Sun Microsystems - Beijing China/*
239a5557flucy wang - Sun Microsystems - Beijing China * Copyright 2008 NetXen, Inc.  All rights reserved.
249a5557flucy wang - Sun Microsystems - Beijing China * Use is subject to license terms.
259a5557flucy wang - Sun Microsystems - Beijing China */
269383396jing xiong ERI-SUN
279383396jing xiong ERI-SUN#ifndef _UNM_INC_H_
289383396jing xiong ERI-SUN#define	_UNM_INC_H_
299383396jing xiong ERI-SUN
309383396jing xiong ERI-SUN#ifdef __cplusplus
319383396jing xiong ERI-SUNextern "C" {
329383396jing xiong ERI-SUN#endif
339a5557flucy wang - Sun Microsystems - Beijing China
349a5557flucy wang - Sun Microsystems - Beijing China#include "nx_errorcode.h"
359a5557flucy wang - Sun Microsystems - Beijing China
369a5557flucy wang - Sun Microsystems - Beijing China#define	PREALIGN(x)
379a5557flucy wang - Sun Microsystems - Beijing China#define	POSTALIGN(x)
389a5557flucy wang - Sun Microsystems - Beijing China
399a5557flucy wang - Sun Microsystems - Beijing Chinatypedef char					__int8_t;
409a5557flucy wang - Sun Microsystems - Beijing Chinatypedef short					__int16_t;
419a5557flucy wang - Sun Microsystems - Beijing Chinatypedef int						__int32_t;
429a5557flucy wang - Sun Microsystems - Beijing Chinatypedef long long				__int64_t;
439a5557flucy wang - Sun Microsystems - Beijing Chinatypedef unsigned char			__uint8_t;
449a5557flucy wang - Sun Microsystems - Beijing Chinatypedef unsigned short			__uint16_t;
459a5557flucy wang - Sun Microsystems - Beijing Chinatypedef unsigned int			__uint32_t;
469a5557flucy wang - Sun Microsystems - Beijing Chinatypedef unsigned long long		__uint64_t;
479a5557flucy wang - Sun Microsystems - Beijing Chinatypedef __uint64_t				jiffies_t;
489a5557flucy wang - Sun Microsystems - Beijing China
499a5557flucy wang - Sun Microsystems - Beijing Chinatypedef uint8_t			u8;
509a5557flucy wang - Sun Microsystems - Beijing Chinatypedef uint8_t			U8;
519a5557flucy wang - Sun Microsystems - Beijing Chinatypedef uint16_t		U16;
529a5557flucy wang - Sun Microsystems - Beijing Chinatypedef uint32_t		u32;
539a5557flucy wang - Sun Microsystems - Beijing Chinatypedef uint32_t		U32;
549a5557flucy wang - Sun Microsystems - Beijing Chinatypedef unsigned long long	u64;
559a5557flucy wang - Sun Microsystems - Beijing Chinatypedef unsigned long long	U64;
569a5557flucy wang - Sun Microsystems - Beijing China
579a5557flucy wang - Sun Microsystems - Beijing China#define	UNUSED __attribute__((unused))
589a5557flucy wang - Sun Microsystems - Beijing China#define	NOINLINE __attribute__((noinline))
599a5557flucy wang - Sun Microsystems - Beijing China
609a5557flucy wang - Sun Microsystems - Beijing China#include "nx_hw_pci_regs.h"
619a5557flucy wang - Sun Microsystems - Beijing China
629a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CONF_X86		3
639a5557flucy wang - Sun Microsystems - Beijing China
649a5557flucy wang - Sun Microsystems - Beijing China#define	bzero(A, B)			memset((A), 0, (B))
659a5557flucy wang - Sun Microsystems - Beijing China
669a5557flucy wang - Sun Microsystems - Beijing China/*
679a5557flucy wang - Sun Microsystems - Beijing China * MAX_RCV_CTX : The number of receive contexts that are available on
689a5557flucy wang - Sun Microsystems - Beijing China * the phantom.
699a5557flucy wang - Sun Microsystems - Beijing China */
709a5557flucy wang - Sun Microsystems - Beijing China#define	MAX_RCV_CTX			1
719a5557flucy wang - Sun Microsystems - Beijing China
729a5557flucy wang - Sun Microsystems - Beijing China/* ------------------------------------------------------------------------ */
739a5557flucy wang - Sun Microsystems - Beijing China/*  CRB Hub and Agent addressing */
749a5557flucy wang - Sun Microsystems - Beijing China/* ------------------------------------------------------------------------ */
759a5557flucy wang - Sun Microsystems - Beijing China/*
769a5557flucy wang - Sun Microsystems - Beijing China *  WARNING:  pex_tgt_adr.v assumes if MSB of hub adr is set then it is an
779a5557flucy wang - Sun Microsystems - Beijing China *  ILLEGAL hub!!!!!
789a5557flucy wang - Sun Microsystems - Beijing China */
799a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_H0_CH_HUB_ADR    0x05
809a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_H1_CH_HUB_ADR    0x0E
819a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_H2_CH_HUB_ADR    0x03
829a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_H3_CH_HUB_ADR    0x01
839a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_H4_CH_HUB_ADR    0x06
849a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_H5_CH_HUB_ADR    0x07
859a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_H6_CH_HUB_ADR    0x08
869a5557flucy wang - Sun Microsystems - Beijing China/*
879a5557flucy wang - Sun Microsystems - Beijing China * WARNING:  pex_tgt_adr.v assumes if MSB of hub adr is set then it is an
889a5557flucy wang - Sun Microsystems - Beijing China * ILLEGAL hub!!!!!
899a5557flucy wang - Sun Microsystems - Beijing China */
909a5557flucy wang - Sun Microsystems - Beijing China
919a5557flucy wang - Sun Microsystems - Beijing China/*  Hub 0 */
929a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_MN_CRB_AGT_ADR   0x15
939a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_MS_CRB_AGT_ADR   0x25
949a5557flucy wang - Sun Microsystems - Beijing China
959a5557flucy wang - Sun Microsystems - Beijing China/*  Hub 1 */
969a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PS_CRB_AGT_ADR		0x73
979a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_SS_CRB_AGT_ADR		0x20
989a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_RPMX3_CRB_AGT_ADR	0x0b
999a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_QMS_CRB_AGT_ADR		0x00
1009a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_SQGS0_CRB_AGT_ADR	0x01
1019a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_SQGS1_CRB_AGT_ADR	0x02
1029a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_SQGS2_CRB_AGT_ADR	0x03
1039a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_SQGS3_CRB_AGT_ADR	0x04
1049a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_C2C0_CRB_AGT_ADR		0x58
1059a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_C2C1_CRB_AGT_ADR		0x59
1069a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_C2C2_CRB_AGT_ADR		0x5a
1079a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_RPMX2_CRB_AGT_ADR	0x0a
1089a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_RPMX4_CRB_AGT_ADR	0x0c
1099a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_RPMX7_CRB_AGT_ADR	0x0f
1109a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_RPMX9_CRB_AGT_ADR	0x12
1119a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_SMB_CRB_AGT_ADR		0x18
1129a5557flucy wang - Sun Microsystems - Beijing China
1139a5557flucy wang - Sun Microsystems - Beijing China/*  Hub 2 */
1149a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_NIU_CRB_AGT_ADR		0x31
1159a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_I2C0_CRB_AGT_ADR		0x19
1169a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_I2C1_CRB_AGT_ADR		0x29
1179a5557flucy wang - Sun Microsystems - Beijing China
1189a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_SN_CRB_AGT_ADR		0x10
1199a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_I2Q_CRB_AGT_ADR		0x20
1209a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_LPC_CRB_AGT_ADR		0x22
1219a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_ROMUSB_CRB_AGT_ADR	0x21
1229a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_QM_CRB_AGT_ADR		0x66
1239a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_SQG0_CRB_AGT_ADR		0x60
1249a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_SQG1_CRB_AGT_ADR		0x61
1259a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_SQG2_CRB_AGT_ADR		0x62
1269a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_SQG3_CRB_AGT_ADR		0x63
1279a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_RPMX1_CRB_AGT_ADR	0x09
1289a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_RPMX5_CRB_AGT_ADR	0x0d
1299a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_RPMX6_CRB_AGT_ADR	0x0e
1309a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_RPMX8_CRB_AGT_ADR	0x11
1319a5557flucy wang - Sun Microsystems - Beijing China
1329a5557flucy wang - Sun Microsystems - Beijing China/*  Hub 3 */
1339a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PH_CRB_AGT_ADR		0x1A
1349a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_SRE_CRB_AGT_ADR		0x50
1359a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_EG_CRB_AGT_ADR		0x51
1369a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_RPMX0_CRB_AGT_ADR	0x08
1379a5557flucy wang - Sun Microsystems - Beijing China
1389a5557flucy wang - Sun Microsystems - Beijing China/*  Hub 4 */
1399a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PEGN0_CRB_AGT_ADR		0x40
1409a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PEGN1_CRB_AGT_ADR		0x41
1419a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PEGN2_CRB_AGT_ADR		0x42
1429a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PEGN3_CRB_AGT_ADR		0x43
1439a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PEGNI_CRB_AGT_ADR		0x44
1449a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PEGND_CRB_AGT_ADR		0x45
1459a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PEGNC_CRB_AGT_ADR		0x46
1469a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PEGR0_CRB_AGT_ADR		0x47
1479a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PEGR1_CRB_AGT_ADR		0x48
1489a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PEGR2_CRB_AGT_ADR		0x49
1499a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PEGR3_CRB_AGT_ADR		0x4a
1509a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PEGN4_CRB_AGT_ADR		0x4b
1519a5557flucy wang - Sun Microsystems - Beijing China
1529a5557flucy wang - Sun Microsystems - Beijing China/*  Hub 5 */
1539a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PEGS0_CRB_AGT_ADR		0x40
1549a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PEGS1_CRB_AGT_ADR		0x41
1559a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PEGS2_CRB_AGT_ADR		0x42
1569a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PEGS3_CRB_AGT_ADR		0x43
1579a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PEGSI_CRB_AGT_ADR		0x44
1589a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PEGSD_CRB_AGT_ADR		0x45
1599a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PEGSC_CRB_AGT_ADR		0x46
1609a5557flucy wang - Sun Microsystems - Beijing China
1619a5557flucy wang - Sun Microsystems - Beijing China/*  Hub 6 */
1629a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CAS0_CRB_AGT_ADR 0x46
1639a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CAS1_CRB_AGT_ADR 0x47
1649a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CAS2_CRB_AGT_ADR 0x48
1659a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CAS3_CRB_AGT_ADR 0x49
1669a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_NCM_CRB_AGT_ADR  0x16
1679a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_TMR_CRB_AGT_ADR  0x17
1689a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_XDMA_CRB_AGT_ADR 0x05
1699a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_OCM0_CRB_AGT_ADR 0x06
1709a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_OCM1_CRB_AGT_ADR 0x07
1719a5557flucy wang - Sun Microsystems - Beijing China
1729a5557flucy wang - Sun Microsystems - Beijing China/*  This field defines PCI/X adr [25:20] of agents on the CRB */
1739a5557flucy wang - Sun Microsystems - Beijing China/*  */
1749a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_PH    0
1759a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_PS    1
1769a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_MN    2
1779a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_MS    3
1789a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_SRE   5
1799a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_NIU   6
1809a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_QMN   7
1819a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_SQN0  8
1829a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_SQN1  9
1839a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_SQN2  10
1849a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_SQN3  11
1859a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_QMS   12
1869a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_SQS0  13
1879a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_SQS1  14
1889a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_SQS2  15
1899a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_SQS3  16
1909a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_PGN0  17
1919a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_PGN1  18
1929a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_PGN2  19
1939a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_PGN3  20
1949a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_PGND  21
1959a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_PGNI  22
1969a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_PGS0  23
1979a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_PGS1  24
1989a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_PGS2  25
1999a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_PGS3  26
2009a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_PGSD  27
2019a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_PGSI  28
2029a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_SN    29
2039a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_EG	31
2049a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_PH2   32
2059a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_PS2   33
2069a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_CAM   34
2079a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_CAS0  35
2089a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_CAS1  36
2099a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_CAS2  37
2109a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_C2C0  38
2119a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_C2C1  39
2129a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_TIMR  40
2139a5557flucy wang - Sun Microsystems - Beijing China/* N/A: Not use in either Phantom1 or Phantom2 => use for TIMR */
2149a5557flucy wang - Sun Microsystems - Beijing China/* #define	PX_MAP_CRB_C2C2		40 */
2159a5557flucy wang - Sun Microsystems - Beijing China/* #define	PX_MAP_CRB_SS		41 */
2169a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_RPMX1 42
2179a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_RPMX2 43
2189a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_RPMX3 44
2199a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_RPMX4 45
2209a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_RPMX5 46
2219a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_RPMX6 47
2229a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_RPMX7 48
2239a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_XDMA  49
2249a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_I2Q   50
2259a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_ROMUSB	51
2269a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_CAS3  52
2279a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_RPMX0 53
2289a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_RPMX8 54
2299a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_RPMX9 55
2309a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_OCM0  56
2319a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_OCM1  57
2329a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_SMB   58
2339a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_I2C0  59
2349a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_I2C1  60
2359a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_LPC   61
2369a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_PGNC  62
2379a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_PGR0  63
2389a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_PGR1  4
2399a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_PGR2  30
2409a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_PX_MAP_CRB_PGR3  41
2419a5557flucy wang - Sun Microsystems - Beijing China
2429a5557flucy wang - Sun Microsystems - Beijing China/*  This field defines CRB adr [31:20] of the agents */
2439a5557flucy wang - Sun Microsystems - Beijing China/*  */
2449a5557flucy wang - Sun Microsystems - Beijing China
2459a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_MN	((UNM_HW_H0_CH_HUB_ADR << 7)	\
2469a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_MN_CRB_AGT_ADR)
2479a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_PH	((UNM_HW_H0_CH_HUB_ADR << 7)	\
2489a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_PH_CRB_AGT_ADR)
2499a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_MS	((UNM_HW_H0_CH_HUB_ADR << 7)	\
2509a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_MS_CRB_AGT_ADR)
2519a5557flucy wang - Sun Microsystems - Beijing China
2529a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_PS	((UNM_HW_H1_CH_HUB_ADR << 7)	\
2539a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_PS_CRB_AGT_ADR)
2549a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_SS	((UNM_HW_H1_CH_HUB_ADR << 7)	\
2559a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_SS_CRB_AGT_ADR)
2569a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_RPMX3	((UNM_HW_H1_CH_HUB_ADR << 7)	\
2579a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_RPMX3_CRB_AGT_ADR)
2589a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_QMS	((UNM_HW_H1_CH_HUB_ADR << 7)	\
2599a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_QMS_CRB_AGT_ADR)
2609a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_SQS0	((UNM_HW_H1_CH_HUB_ADR << 7)	\
2619a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_SQGS0_CRB_AGT_ADR)
2629a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_SQS1	((UNM_HW_H1_CH_HUB_ADR << 7)	\
2639a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_SQGS1_CRB_AGT_ADR)
2649a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_SQS2	((UNM_HW_H1_CH_HUB_ADR << 7)	\
2659a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_SQGS2_CRB_AGT_ADR)
2669a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_SQS3	((UNM_HW_H1_CH_HUB_ADR << 7)	\
2679a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_SQGS3_CRB_AGT_ADR)
2689a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_C2C0	((UNM_HW_H1_CH_HUB_ADR << 7)	\
2699a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_C2C0_CRB_AGT_ADR)
2709a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_C2C1	((UNM_HW_H1_CH_HUB_ADR << 7)	\
2719a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_C2C1_CRB_AGT_ADR)
2729a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_RPMX2	((UNM_HW_H1_CH_HUB_ADR << 7)	\
2739a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_RPMX2_CRB_AGT_ADR)
2749a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_RPMX4	((UNM_HW_H1_CH_HUB_ADR << 7)	\
2759a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_RPMX4_CRB_AGT_ADR)
2769a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_RPMX7	((UNM_HW_H1_CH_HUB_ADR << 7)	\
2779a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_RPMX7_CRB_AGT_ADR)
2789a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_RPMX9	((UNM_HW_H1_CH_HUB_ADR << 7)	\
2799a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_RPMX9_CRB_AGT_ADR)
2809a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_SMB	((UNM_HW_H1_CH_HUB_ADR << 7)	\
2819a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_SMB_CRB_AGT_ADR)
2829a5557flucy wang - Sun Microsystems - Beijing China
2839a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_NIU	((UNM_HW_H2_CH_HUB_ADR << 7)	\
2849a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_NIU_CRB_AGT_ADR)
2859a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_I2C0	((UNM_HW_H2_CH_HUB_ADR << 7)	\
2869a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_I2C0_CRB_AGT_ADR)
2879a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_I2C1	((UNM_HW_H2_CH_HUB_ADR << 7)	\
2889a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_I2C1_CRB_AGT_ADR)
2899a5557flucy wang - Sun Microsystems - Beijing China
2909a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_SRE	((UNM_HW_H3_CH_HUB_ADR << 7)	\
2919a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_SRE_CRB_AGT_ADR)
2929a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_EG	((UNM_HW_H3_CH_HUB_ADR << 7)	\
2939a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_EG_CRB_AGT_ADR)
2949a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_RPMX0	((UNM_HW_H3_CH_HUB_ADR << 7)	\
2959a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_RPMX0_CRB_AGT_ADR)
2969a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_QMN	((UNM_HW_H3_CH_HUB_ADR << 7)	\
2979a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_QM_CRB_AGT_ADR)
2989a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_SQN0	((UNM_HW_H3_CH_HUB_ADR << 7)	\
2999a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_SQG0_CRB_AGT_ADR)
3009a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_SQN1	((UNM_HW_H3_CH_HUB_ADR << 7)	\
3019a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_SQG1_CRB_AGT_ADR)
3029a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_SQN2	((UNM_HW_H3_CH_HUB_ADR << 7)	\
3039a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_SQG2_CRB_AGT_ADR)
3049a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_SQN3	((UNM_HW_H3_CH_HUB_ADR << 7)	\
3059a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_SQG3_CRB_AGT_ADR)
3069a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_RPMX1	((UNM_HW_H3_CH_HUB_ADR << 7)	\
3079a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_RPMX1_CRB_AGT_ADR)
3089a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_RPMX5	((UNM_HW_H3_CH_HUB_ADR << 7)	\
3099a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_RPMX5_CRB_AGT_ADR)
3109a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_RPMX6	((UNM_HW_H3_CH_HUB_ADR << 7)	\
3119a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_RPMX6_CRB_AGT_ADR)
3129a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_RPMX8	((UNM_HW_H3_CH_HUB_ADR << 7)	\
3139a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_RPMX8_CRB_AGT_ADR)
3149a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_CAS0	((UNM_HW_H3_CH_HUB_ADR << 7)	\
3159a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_CAS0_CRB_AGT_ADR)
3169a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_CAS1	((UNM_HW_H3_CH_HUB_ADR << 7)	\
3179a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_CAS1_CRB_AGT_ADR)
3189a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_CAS2	((UNM_HW_H3_CH_HUB_ADR << 7)	\
3199a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_CAS2_CRB_AGT_ADR)
3209a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_CAS3	((UNM_HW_H3_CH_HUB_ADR << 7)	\
3219a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_CAS3_CRB_AGT_ADR)
3229a5557flucy wang - Sun Microsystems - Beijing China
3239a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_PGNI	((UNM_HW_H4_CH_HUB_ADR << 7)	\
3249a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_PEGNI_CRB_AGT_ADR)
3259a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_PGND	((UNM_HW_H4_CH_HUB_ADR << 7)	\
3269a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_PEGND_CRB_AGT_ADR)
3279a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_PGN0	((UNM_HW_H4_CH_HUB_ADR << 7)	\
3289a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_PEGN0_CRB_AGT_ADR)
3299a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_PGN1	((UNM_HW_H4_CH_HUB_ADR << 7)	\
3309a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_PEGN1_CRB_AGT_ADR)
3319a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_PGN2	((UNM_HW_H4_CH_HUB_ADR << 7)	\
3329a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_PEGN2_CRB_AGT_ADR)
3339a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_PGN3	((UNM_HW_H4_CH_HUB_ADR << 7)	\
3349a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_PEGN3_CRB_AGT_ADR)
3359a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_PGN4	((UNM_HW_H4_CH_HUB_ADR << 7)	\
3369a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_PEGN4_CRB_AGT_ADR)
3379a5557flucy wang - Sun Microsystems - Beijing China
3389a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_PGNC	((UNM_HW_H4_CH_HUB_ADR << 7)	\
3399a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_PEGNC_CRB_AGT_ADR)
3409a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_PGR0	((UNM_HW_H4_CH_HUB_ADR << 7)	\
3419a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_PEGR0_CRB_AGT_ADR)
3429a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_PGR1	((UNM_HW_H4_CH_HUB_ADR << 7)	\
3439a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_PEGR1_CRB_AGT_ADR)
3449a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_PGR2	((UNM_HW_H4_CH_HUB_ADR << 7)	\
3459a5557flucy wang - Sun Microsystems - Beijing China	| UNM_HW_PEGR2_CRB_AGT_ADR)
3469a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_PGR3	((UNM_HW_H4_CH_HUB_ADR << 7)	\
3479a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_PEGR3_CRB_AGT_ADR)
3489a5557flucy wang - Sun Microsystems - Beijing China
3499a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_PGSI	((UNM_HW_H5_CH_HUB_ADR << 7)	\
3509a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_PEGSI_CRB_AGT_ADR)
3519a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_PGSD	((UNM_HW_H5_CH_HUB_ADR << 7)	\
3529a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_PEGSD_CRB_AGT_ADR)
3539a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_PGS0	((UNM_HW_H5_CH_HUB_ADR << 7)	\
3549a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_PEGS0_CRB_AGT_ADR)
3559a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_PGS1	((UNM_HW_H5_CH_HUB_ADR << 7)	\
3569a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_PEGS1_CRB_AGT_ADR)
3579a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_PGS2	((UNM_HW_H5_CH_HUB_ADR << 7)	\
3589a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_PEGS2_CRB_AGT_ADR)
3599a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_PGS3	((UNM_HW_H5_CH_HUB_ADR << 7)	\
3609a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_PEGS3_CRB_AGT_ADR)
3619a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_PGSC	((UNM_HW_H5_CH_HUB_ADR << 7)	\
3629a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_PEGSC_CRB_AGT_ADR)
3639a5557flucy wang - Sun Microsystems - Beijing China
3649a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_CAM	((UNM_HW_H6_CH_HUB_ADR << 7)	\
3659a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_NCM_CRB_AGT_ADR)
3669a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_TIMR	((UNM_HW_H6_CH_HUB_ADR << 7)	\
3679a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_TMR_CRB_AGT_ADR)
3689a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_XDMA	((UNM_HW_H6_CH_HUB_ADR << 7)	\
3699a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_XDMA_CRB_AGT_ADR)
3709a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_SN	((UNM_HW_H6_CH_HUB_ADR << 7)	\
3719a5557flucy wang - Sun Microsystems - Beijing China	| UNM_HW_SN_CRB_AGT_ADR)
3729a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_I2Q	((UNM_HW_H6_CH_HUB_ADR << 7)	\
3739a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_I2Q_CRB_AGT_ADR)
3749a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_ROMUSB	((UNM_HW_H6_CH_HUB_ADR << 7)	\
3759a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_ROMUSB_CRB_AGT_ADR)
3769a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_OCM0	((UNM_HW_H6_CH_HUB_ADR << 7)	\
3779a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_OCM0_CRB_AGT_ADR)
3789a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_OCM1	((UNM_HW_H6_CH_HUB_ADR << 7)	\
3799a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_OCM1_CRB_AGT_ADR)
3809a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_HW_CRB_HUB_AGT_ADR_LPC	((UNM_HW_H6_CH_HUB_ADR << 7)	\
3819a5557flucy wang - Sun Microsystems - Beijing China		| UNM_HW_LPC_CRB_AGT_ADR)
3829a5557flucy wang - Sun Microsystems - Beijing China
3839a5557flucy wang - Sun Microsystems - Beijing China/*
3849a5557flucy wang - Sun Microsystems - Beijing China * ROM USB CRB space is divided into 4 regions depending on decode of
3859a5557flucy wang - Sun Microsystems - Beijing China * address bits [19:16]
3869a5557flucy wang - Sun Microsystems - Beijing China */
3879a5557flucy wang - Sun Microsystems - Beijing China#define	ROMUSB_GLB			(UNM_CRB_ROMUSB + 0x00000)
3889a5557flucy wang - Sun Microsystems - Beijing China#define	ROMUSB_ROM			(UNM_CRB_ROMUSB + 0x10000)
3899a5557flucy wang - Sun Microsystems - Beijing China#define	ROMUSB_USB			(UNM_CRB_ROMUSB + 0x20000)
3909a5557flucy wang - Sun Microsystems - Beijing China#define	ROMUSB_DIRECT_ROM	(UNM_CRB_ROMUSB + 0x30000)
3919a5557flucy wang - Sun Microsystems - Beijing China#define	ROMUSB_TAP			(UNM_CRB_ROMUSB + 0x40000)
3929a5557flucy wang - Sun Microsystems - Beijing China
3939a5557flucy wang - Sun Microsystems - Beijing China/*  ROMUSB  GLB register definitions */
3949a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_CONTROL		(ROMUSB_GLB + 0x0000)
3959a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_STATUS		(ROMUSB_GLB + 0x0004)
3969a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_SW_RESET		(ROMUSB_GLB + 0x0008)
3979a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_PAD_GPIO_I	(ROMUSB_GLB + 0x000c)
3989a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_RNG_PLL_CTL	(ROMUSB_GLB + 0x0010)
3999a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_TEST_MUX_O	(ROMUSB_GLB + 0x0014)
4009a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_PLL0_CTRL	(ROMUSB_GLB + 0x0018)
4019a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_PLL1_CTRL	(ROMUSB_GLB + 0x001c)
4029a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_PLL2_CTRL	(ROMUSB_GLB + 0x0020)
4039a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_PLL3_CTRL	(ROMUSB_GLB + 0x0024)
4049a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_PLL_LOCK		(ROMUSB_GLB + 0x0028)
4059a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_EXTERN_INT	(ROMUSB_GLB + 0x002c)
4069a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_PH_RST		(ROMUSB_GLB + 0x0030)
4079a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_PS_RST		(ROMUSB_GLB + 0x0034)
4089a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_CAS_RST		(ROMUSB_GLB + 0x0038)
4099a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_MIU_RST		(ROMUSB_GLB + 0x003c)
4109a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_CRB_RST		(ROMUSB_GLB + 0x0040)
4119a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_TEST_MUX_SEL	(ROMUSB_GLB + 0x0044)
4129a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_MN_COM_A2T	(ROMUSB_GLB + 0x0050)
4139a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_REV_ID		(ROMUSB_GLB + 0x0054)
4149a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_PEGTUNE_DONE	(ROMUSB_GLB + 0x005c)
4159a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_VENDOR_DEV_ID	(ROMUSB_GLB + 0x0058)
4169a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GLB_CHIP_CLK_CTRL	(ROMUSB_GLB + 0x00a8)
4179a5557flucy wang - Sun Microsystems - Beijing China
4189a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_GPIO(n) ((n) <= 15 ? (ROMUSB_GLB + 0x60 + (4 * (n))): \
4199a5557flucy wang - Sun Microsystems - Beijing China				((n) <= 18)?(ROMUSB_GLB + 0x70 + (4 * (n))): \
4209a5557flucy wang - Sun Microsystems - Beijing China				(ROMUSB_GLB + 0x70 + (4 * (19))))
4219a5557flucy wang - Sun Microsystems - Beijing China
4229a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_ROM_CONTROL			(ROMUSB_ROM + 0x0000)
4239a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_ROM_INSTR_OPCODE		(ROMUSB_ROM + 0x0004)
4249a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_ROM_ADDRESS			(ROMUSB_ROM + 0x0008)
4259a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_ROM_WDATA			(ROMUSB_ROM + 0x000c)
4269a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_ROM_ABYTE_CNT		(ROMUSB_ROM + 0x0010)
4279a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_ROM_DUMMY_BYTE_CNT	(ROMUSB_ROM + 0x0014)
4289a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_ROM_RDATA			(ROMUSB_ROM + 0x0018)
4299a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_ROM_AGT_TAG			(ROMUSB_ROM + 0x001c)
4309a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_ROM_TIME_PARM		(ROMUSB_ROM + 0x0020)
4319a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_ROM_CLK_DIV			(ROMUSB_ROM + 0x0024)
4329a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ROMUSB_ROM_MISS_INSTR		(ROMUSB_ROM + 0x0028)
4339a5557flucy wang - Sun Microsystems - Beijing China
4349a5557flucy wang - Sun Microsystems - Beijing China/* Lock IDs for ROM lock */
4359a5557flucy wang - Sun Microsystems - Beijing China#define	ROM_LOCK_DRIVER					0x0d417340
4369a5557flucy wang - Sun Microsystems - Beijing China
4379a5557flucy wang - Sun Microsystems - Beijing China/* Lock IDs for PHY lock */
4389a5557flucy wang - Sun Microsystems - Beijing China#define	PHY_LOCK_DRIVER					0x44524956
4399a5557flucy wang - Sun Microsystems - Beijing China
4409a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_CRB_WINDOWSIZE    0x00100000    /* all are 1MB windows */
4419a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_CRB_WINDOW(A)    (UNM_PCI_CRBSPACE + (A)*UNM_PCI_CRB_WINDOWSIZE)
4429a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_C2C_0		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_C2C0)
4439a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_C2C_1		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_C2C1)
4449a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_C2C_2		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_C2C2)
4459a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_CAM		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_CAM)
4469a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_CASPER		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_CAS)
4479a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_CASPER_0	UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_CAS0)
4489a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_CASPER_1	UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_CAS1)
4499a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_CASPER_2	UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_CAS2)
4509a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_DDR_MD		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_MS)
4519a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_DDR_NET		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_MN)
4529a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_EPG			UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_EG)
4539a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_I2Q		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_I2Q)
4549a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_NIU		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_NIU)
4559a5557flucy wang - Sun Microsystems - Beijing China/* HACK upon HACK upon HACK (for PCIE builds) */
4569a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_PCIX_HOST	UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_PH)
4579a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_PCIX_HOST2	UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_PH2)
4589a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_PCIX_MD		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_PS)
4599a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_PCIE		UNM_CRB_PCIX_MD
4609a5557flucy wang - Sun Microsystems - Beijing China// window 1 pcie slot
4619a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_PCIE2		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_PS2)
4629a5557flucy wang - Sun Microsystems - Beijing China
4639a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_PEG_MD_0   UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_PGS0)
4649a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_PEG_MD_1   UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_PGS1)
4659a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_PEG_MD_2   UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_PGS2)
4669a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_PEG_MD_3   UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_PGS3)
4679a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_PEG_MD_D   UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_PGSD)
4689a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_PEG_MD_I   UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_PGSI)
4699a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_PEG_NET_0  UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_PGN0)
4709a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_PEG_NET_1  UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_PGN1)
4719a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_PEG_NET_2  UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_PGN2)
4729a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_PEG_NET_3  UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_PGN3)
4739a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_PEG_NET_D  UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_PGND)
4749a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_PEG_NET_I  UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_PGNI)
4759a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_PQM_MD		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_QMS)
4769a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_PQM_NET		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_QMN)
4779a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_QDR_MD		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_SS)
4789a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_QDR_NET		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_SN)
4799a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_ROMUSB		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_ROMUSB)
4809a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_RPMX_0		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_RPMX0)
4819a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_RPMX_1		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_RPMX1)
4829a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_RPMX_2		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_RPMX2)
4839a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_RPMX_3		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_RPMX3)
4849a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_RPMX_4		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_RPMX4)
4859a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_RPMX_5		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_RPMX5)
4869a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_RPMX_6		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_RPMX6)
4879a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_RPMX_7		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_RPMX7)
4889a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_SQM_MD_0	UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_SQS0)
4899a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_SQM_MD_1	UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_SQS1)
4909a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_SQM_MD_2	UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_SQS2)
4919a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_SQM_MD_3	UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_SQS3)
4929a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_SQM_NET_0  UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_SQN0)
4939a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_SQM_NET_1  UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_SQN1)
4949a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_SQM_NET_2  UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_SQN2)
4959a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_SQM_NET_3	UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_SQN3)
4969a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_SRE		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_SRE)
4979a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_TIMER		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_TIMR)
4989a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_XDMA		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_XDMA)
4999a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_I2C0	UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_I2C0)
5009a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_I2C1	UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_I2C1)
5019a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_OCM0	UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_OCM0)
5029a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_SMB		UNM_PCI_CRB_WINDOW(UNM_HW_PX_MAP_CRB_SMB)
5039a5557flucy wang - Sun Microsystems - Beijing China
5049a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_CRB_MAX		UNM_PCI_CRB_WINDOW(64)
5059a5557flucy wang - Sun Microsystems - Beijing China
5069a5557flucy wang - Sun Microsystems - Beijing China/*
5079a5557flucy wang - Sun Microsystems - Beijing China * ====================== BASE ADDRESSES ON-CHIP ======================
5089a5557flucy wang - Sun Microsystems - Beijing China * Base addresses of major components on-chip.
5099a5557flucy wang - Sun Microsystems - Beijing China * ====================== BASE ADDRESSES ON-CHIP ======================
5109a5557flucy wang - Sun Microsystems - Beijing China */
5119a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ADDR_DDR_NET		(0x0000000000000000ULL)
5129a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ADDR_DDR_NET_MAX	(0x000000000fffffffULL)
5139a5557flucy wang - Sun Microsystems - Beijing China
5149a5557flucy wang - Sun Microsystems - Beijing China/*
5159a5557flucy wang - Sun Microsystems - Beijing China * Imbus address bit used to indicate a host address. This bit is
5169a5557flucy wang - Sun Microsystems - Beijing China * eliminated by the pcie bar and bar select before presentation
5179a5557flucy wang - Sun Microsystems - Beijing China * over pcie.
5189a5557flucy wang - Sun Microsystems - Beijing China */
5199a5557flucy wang - Sun Microsystems - Beijing China/* host memory via IMBUS */
5209a5557flucy wang - Sun Microsystems - Beijing China#define	NX_P2_ADDR_PCIE		(0x0000000800000000ULL)
5219a5557flucy wang - Sun Microsystems - Beijing China#define	NX_P3_ADDR_PCIE		(0x0000008000000000ULL)
5229a5557flucy wang - Sun Microsystems - Beijing China
5239a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ADDR_PCIE_MAX	(0x0000000FFFFFFFFFULL)
5249a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ADDR_OCM0		(0x0000000200000000ULL)
5259a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ADDR_OCM0_MAX	(0x00000002000fffffULL)
5269a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ADDR_OCM1		(0x0000000200400000ULL)
5279a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ADDR_OCM1_MAX    (0x00000002004fffffULL)
5289a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ADDR_QDR_NET	(0x0000000300000000ULL)
5299a5557flucy wang - Sun Microsystems - Beijing China
5309a5557flucy wang - Sun Microsystems - Beijing China#define	NX_P2_ADDR_QDR_NET_MAX	(0x00000003001fffffULL)
5319a5557flucy wang - Sun Microsystems - Beijing China#define	NX_P3_ADDR_QDR_NET_MAX	(0x0000000303ffffffULL)
5329a5557flucy wang - Sun Microsystems - Beijing China/*
5339a5557flucy wang - Sun Microsystems - Beijing China * The ifdef at the bottom should go. All drivers should start using the
5349a5557flucy wang - Sun Microsystems - Beijing China * above 2 defines.
5359a5557flucy wang - Sun Microsystems - Beijing China */
5369a5557flucy wang - Sun Microsystems - Beijing China#ifdef P3
5379a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ADDR_QDR_NET_MAX	NX_P3_ADDR_QDR_NET_MAX
5389a5557flucy wang - Sun Microsystems - Beijing China#else
5399a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_ADDR_QDR_NET_MAX	NX_P2_ADDR_QDR_NET_MAX
5409a5557flucy wang - Sun Microsystems - Beijing China#endif
5419a5557flucy wang - Sun Microsystems - Beijing China
5429a5557flucy wang - Sun Microsystems - Beijing China#define	D3_CRB_REG_FUN0			(UNM_PCIX_PS_REG(0x0084))
5439a5557flucy wang - Sun Microsystems - Beijing China#define	D3_CRB_REG_FUN1			(UNM_PCIX_PS_REG(0x1084))
5449a5557flucy wang - Sun Microsystems - Beijing China#define	D3_CRB_REG_FUN2			(UNM_PCIX_PS_REG(0x2084))
5459a5557flucy wang - Sun Microsystems - Beijing China#define	D3_CRB_REG_FUN3			(UNM_PCIX_PS_REG(0x3084))
5469a5557flucy wang - Sun Microsystems - Beijing China
5479a5557flucy wang - Sun Microsystems - Beijing China
5489a5557flucy wang - Sun Microsystems - Beijing China#define	ISR_I2Q_CLR_PCI_LO		(UNM_PCIX_PS_REG(UNM_I2Q_CLR_PCI_LO))
5499a5557flucy wang - Sun Microsystems - Beijing China#define	ISR_I2Q_CLR_PCI_HI		(UNM_PCIX_PS_REG(UNM_I2Q_CLR_PCI_HI))
5509a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_ARCH_CRB_BASE   (UNM_PCI_DIRECT_CRB)
5519a5557flucy wang - Sun Microsystems - Beijing China
5529a5557flucy wang - Sun Microsystems - Beijing China/* we're mapping 128MB of mem on the PCI bus */
5539a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_MAPSIZE			128
5549a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_DDR_NET			(unsigned long)0x00000000
5559a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_DDR_NET_MAX		(unsigned long)0x01ffffff
5569a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_DDR_MD			(unsigned long)0x02000000
5579a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_DDR_MD_MAX		(unsigned long)0x03ffffff
5589a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_QDR_NET			(unsigned long)0x04000000
5599a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_QDR_NET_MAX		(unsigned long)0x043fffff
5609a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_DIRECT_CRB		(unsigned long)0x04400000
5619a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_DIRECT_CRB_MAX	(unsigned long)0x047fffff
5629a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_CAMQM			(unsigned long)0x04800000
5639a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_CAMQM_MAX		(unsigned long)0x04ffffff
5649a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_OCM0			(unsigned long)0x05000000
5659a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_OCM0_MAX		(unsigned long)0x050fffff
5669a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_OCM1			(unsigned long)0x05100000
5679a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_OCM1_MAX		(unsigned long)0x051fffff
5689a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_CRBSPACE		(unsigned long)0x06000000
5699a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_CRBSPACE_MAX	(unsigned long)0x07ffffff
5709a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_128MB_SIZE		(unsigned long)0x08000000
5719a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_32MB_SIZE		(unsigned long)0x02000000
5729a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PCI_2MB_SIZE		(unsigned long)0x00200000
5739a5557flucy wang - Sun Microsystems - Beijing China
5749a5557flucy wang - Sun Microsystems - Beijing China/*
5759a5557flucy wang - Sun Microsystems - Beijing China * The basic unit of access when reading/writing control registers.
5769a5557flucy wang - Sun Microsystems - Beijing China */
5779a5557flucy wang - Sun Microsystems - Beijing Chinatypedef	long		native_t; /* most efficient integer on h/w */
5789a5557flucy wang - Sun Microsystems - Beijing Chinatypedef	__uint64_t	unm_dataword_t; /* single word in data space */
5799a5557flucy wang - Sun Microsystems - Beijing Chinatypedef	__uint64_t	unm64ptr_t; /* a pointer that occupies 64 bits */
5809a5557flucy wang - Sun Microsystems - Beijing China#define	UNM64PTR(P)	((unm64ptr_t)((native_t)(P)))  /* convert for us */
5819a5557flucy wang - Sun Microsystems - Beijing China
5829a5557flucy wang - Sun Microsystems - Beijing Chinatypedef	__uint32_t	unm_crbword_t; /* single word in CRB space */
5839a5557flucy wang - Sun Microsystems - Beijing China
5849a5557flucy wang - Sun Microsystems - Beijing China/*
5859a5557flucy wang - Sun Microsystems - Beijing China * Definitions relating to access/control of the Network Interface Unit
5869a5557flucy wang - Sun Microsystems - Beijing China * h/w block.
5879a5557flucy wang - Sun Microsystems - Beijing China */
5889a5557flucy wang - Sun Microsystems - Beijing China/*
5899a5557flucy wang - Sun Microsystems - Beijing China * Configuration registers.
5909a5557flucy wang - Sun Microsystems - Beijing China */
5919a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_MODE				(UNM_CRB_NIU + 0x00000)
5929a5557flucy wang - Sun Microsystems - Beijing China
5939a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG_SINGLE_TERM		(UNM_CRB_NIU + 0x00004)
5949a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG_DRIVE_HI			(UNM_CRB_NIU + 0x00008)
5959a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG_DRIVE_LO			(UNM_CRB_NIU + 0x0000c)
5969a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG_DTX				(UNM_CRB_NIU + 0x00010)
5979a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG_DEQ				(UNM_CRB_NIU + 0x00014)
5989a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG_WORD_ALIGN		(UNM_CRB_NIU + 0x00018)
5999a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG_RESET			(UNM_CRB_NIU + 0x0001c)
6009a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG_POWER_DOWN		(UNM_CRB_NIU + 0x00020)
6019a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG_RESET_PLL		(UNM_CRB_NIU + 0x00024)
6029a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG_SERDES_LOOPBACK	(UNM_CRB_NIU + 0x00028)
6039a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG_DO_BYTE_ALIGN	(UNM_CRB_NIU + 0x0002c)
6049a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG_TX_ENABLE		(UNM_CRB_NIU + 0x00030)
6059a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG_RX_ENABLE		(UNM_CRB_NIU + 0x00034)
6069a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG_STATUS			(UNM_CRB_NIU + 0x00038)
6079a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG_PAUSE_THRESHOLD	(UNM_CRB_NIU + 0x0003c)
6089a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_INT_MASK			(UNM_CRB_NIU + 0x00040)
6099a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_ACTIVE_INT			(UNM_CRB_NIU + 0x00044)
6109a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_MASKABLE_INT		(UNM_CRB_NIU + 0x00048)
6119a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_TEST_MUX_CTL		(UNM_CRB_NIU + 0x00094)
6129a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG_PAUSE_CTL		(UNM_CRB_NIU + 0x00098)
6139a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG_PAUSE_LEVEL		(UNM_CRB_NIU + 0x000dc)
6149a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG_SEL				(UNM_CRB_NIU + 0x00128)
6159a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB_PAUSE_CTL		(UNM_CRB_NIU + 0x0030c)
6169a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FULL_LEVEL_XG		(UNM_CRB_NIU + 0x00450)
6179a5557flucy wang - Sun Microsystems - Beijing China
6189a5557flucy wang - Sun Microsystems - Beijing China
6199a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_RESET			(UNM_CRB_NIU + 0x0011c)
6209a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_POWER_DOWN		(UNM_CRB_NIU + 0x00120)
6219a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_RESET_PLL		(UNM_CRB_NIU + 0x00124)
6229a5557flucy wang - Sun Microsystems - Beijing China
6239a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_STRAP_VALUE_SAVE_HIGHER (UNM_CRB_NIU + 0x0004c)
6249a5557flucy wang - Sun Microsystems - Beijing China
6259a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB_SERDES_RESET (UNM_CRB_NIU + 0x00050)
6269a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB0_GMII_MODE   (UNM_CRB_NIU + 0x00054)
6279a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB0_MII_MODE    (UNM_CRB_NIU + 0x00058)
6289a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB1_GMII_MODE   (UNM_CRB_NIU + 0x0005c)
6299a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB1_MII_MODE    (UNM_CRB_NIU + 0x00060)
6309a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB2_GMII_MODE   (UNM_CRB_NIU + 0x00064)
6319a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB2_MII_MODE    (UNM_CRB_NIU + 0x00068)
6329a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB3_GMII_MODE   (UNM_CRB_NIU + 0x0006c)
6339a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB3_MII_MODE    (UNM_CRB_NIU + 0x00070)
6349a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_REMOTE_LOOPBACK (UNM_CRB_NIU + 0x00074)
6359a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB0_HALF_DUPLEX (UNM_CRB_NIU + 0x00078)
6369a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB1_HALF_DUPLEX (UNM_CRB_NIU + 0x0007c)
6379a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB2_HALF_DUPLEX (UNM_CRB_NIU + 0x00080)
6389a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB3_HALF_DUPLEX (UNM_CRB_NIU + 0x00084)
6399a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_RESET_SYS_FIFOS (UNM_CRB_NIU + 0x00088)
6409a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB_CRC_DROP		(UNM_CRB_NIU + 0x0008c)
6419a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB_DROP_WRONGADDR  (UNM_CRB_NIU + 0x00090)
6429a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_TEST_MUX_CTL    (UNM_CRB_NIU + 0x00094)
6439a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG_PAUSE_CTL    (UNM_CRB_NIU + 0x00098)
6449a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB0_PAUSE_LEVEL (UNM_CRB_NIU + 0x000cc)
6459a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB1_PAUSE_LEVEL (UNM_CRB_NIU + 0x000d0)
6469a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB2_PAUSE_LEVEL (UNM_CRB_NIU + 0x000d4)
6479a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB3_PAUSE_LEVEL (UNM_CRB_NIU + 0x000d8)
6489a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG_PAUSE_LEVEL  (UNM_CRB_NIU + 0x000dc)
6499a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FRAME_COUNT_SELECT  (UNM_CRB_NIU + 0x000ac)
6509a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FRAME_COUNT  (UNM_CRB_NIU + 0x000b0)
6519a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG_SE			(UNM_CRB_NIU + 0x00128)
6529a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FULL_LEVEL_XG   (UNM_CRB_NIU + 0x00450)
6539a5557flucy wang - Sun Microsystems - Beijing China
6549a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FC_RX_STATUS(I)	(UNM_CRB_NIU + 0x10000 + (I)*0x10000)
6559a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FC_RX_COMMA_DETECT(I)   (UNM_CRB_NIU + 0x10004 + (I)*0x10000)
6569a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FC_LASER_UNSAFE(I)	(UNM_CRB_NIU + 0x10008 + (I)*0x10000)
6579a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FC_TX_CONTROL(I)	(UNM_CRB_NIU + 0x1000c + (I)*0x10000)
6589a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FC_ON_OFFLINE_CTL(I)    (UNM_CRB_NIU + 0x10010 + (I)*0x10000)
6599a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FC_PORT_ACTIVE_STAT(I)  (UNM_CRB_NIU + 0x10014 + (I)*0x10000)
6609a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FC_PORT_INACTIVE_STAT(I)(UNM_CRB_NIU + 0x10018 + (I)*0x10000)
6619a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FC_LINK_FAILURE_CNT(I)  (UNM_CRB_NIU + 0x1001c + (I)*0x10000)
6629a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FC_LOSS_SYNC_CNT(I)	(UNM_CRB_NIU + 0x10020 + (I)*0x10000)
6639a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FC_LOSS_SIGNAL_CNT(I)   (UNM_CRB_NIU + 0x10024 + (I)*0x10000)
6649a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FC_PRIM_SEQ_ERR_CNT(I)  (UNM_CRB_NIU + 0x10028 + (I)*0x10000)
6659a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FC_INVLD_TX_WORD_CNT(I) (UNM_CRB_NIU + 0x1002c + (I)*0x10000)
6669a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FC_INVLD_CRC_CNT(I)	(UNM_CRB_NIU + 0x10030 + (I)*0x10000)
6679a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FC_RX_CELL_CNT(I)	(UNM_CRB_NIU + 0x10034 + (I)*0x10000)
6689a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FC_TX_CELL_CNT(I)	(UNM_CRB_NIU + 0x10038 + (I)*0x10000)
6699a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FC_B2B_CREDIT(I)	(UNM_CRB_NIU + 0x1003c + (I)*0x10000)
6709a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FC_LOGIN_DONE(I)	(UNM_CRB_NIU + 0x10040 + (I)*0x10000)
6719a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_FC_OPERATING_SPEED(I)	(UNM_CRB_NIU + 0x10044 + (I)*0x10000)
6729a5557flucy wang - Sun Microsystems - Beijing China
6739a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB_MAC_CONFIG_0(I)	(UNM_CRB_NIU + 0x30000 + (I)*0x10000)
6749a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB_MAC_CONFIG_1(I)	(UNM_CRB_NIU + 0x30004 + (I)*0x10000)
6759a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB_MAC_IPG_IFG(I)	(UNM_CRB_NIU + 0x30008 + (I)*0x10000)
6769a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB_HALF_DUPLEX_CTRL(I)	(UNM_CRB_NIU + 0x3000c + (I)*0x10000)
6779a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB_MAX_FRAME_SIZE(I)    (UNM_CRB_NIU + 0x30010 + (I)*0x10000)
6789a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB_TEST_REG(I)		(UNM_CRB_NIU + 0x3001c + (I)*0x10000)
6799a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB_MII_MGMT_CONFIG(I)   (UNM_CRB_NIU + 0x30020 + (I)*0x10000)
6809a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB_MII_MGMT_COMMAND(I)  (UNM_CRB_NIU + 0x30024 + (I)*0x10000)
6819a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB_MII_MGMT_ADDR(I)	(UNM_CRB_NIU + 0x30028 + (I)*0x10000)
6829a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB_MII_MGMT_CTRL(I)	(UNM_CRB_NIU + 0x3002c + (I)*0x10000)
6839a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB_MII_MGMT_STATUS(I)   (UNM_CRB_NIU + 0x30030 + (I)*0x10000)
6849a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB_MII_MGMT_INDICATE(I) (UNM_CRB_NIU + 0x30034 + (I)*0x10000)
6859a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB_INTERFACE_CTRL(I)    (UNM_CRB_NIU + 0x30038 + (I)*0x10000)
6869a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB_INTERFACE_STATUS(I)  (UNM_CRB_NIU + 0x3003c + (I)*0x10000)
6879a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB_STATION_ADDR_0(I)    (UNM_CRB_NIU + 0x30040 + (I)*0x10000)
6889a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_GB_STATION_ADDR_1(I)    (UNM_CRB_NIU + 0x30044 + (I)*0x10000)
6899a5557flucy wang - Sun Microsystems - Beijing China
6909a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_CONFIG_0	(UNM_CRB_NIU + 0x70000)
6919a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_CONFIG_1	(UNM_CRB_NIU + 0x70004)
6929a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_IPG			(UNM_CRB_NIU + 0x70008)
6939a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_STATION_ADDR_0_HI   (UNM_CRB_NIU + 0x7000c)
6949a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_STATION_ADDR_0_1    (UNM_CRB_NIU + 0x70010)
6959a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_STATION_ADDR_1_LO   (UNM_CRB_NIU + 0x70014)
6969a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_STATUS		(UNM_CRB_NIU + 0x70018)
6979a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_MAX_FRAME_SIZE	(UNM_CRB_NIU + 0x7001c)
6989a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_PAUSE_FRAME_VALUE   (UNM_CRB_NIU + 0x70020)
6999a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_TX_BYTE_CNT		(UNM_CRB_NIU + 0x70024)
7009a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_TX_FRAME_CNT	(UNM_CRB_NIU + 0x70028)
7019a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_RX_BYTE_CNT		(UNM_CRB_NIU + 0x7002c)
7029a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_RX_FRAME_CNT	(UNM_CRB_NIU + 0x70030)
7039a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_AGGR_ERROR_CNT	(UNM_CRB_NIU + 0x70034)
7049a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_MULTICAST_FRAME_CNT (UNM_CRB_NIU + 0x70038)
7059a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_UNICAST_FRAME_CNT   (UNM_CRB_NIU + 0x7003c)
7069a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_CRC_ERROR_CNT	(UNM_CRB_NIU + 0x70040)
7079a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_OVERSIZE_FRAME_ERR  (UNM_CRB_NIU + 0x70044)
7089a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_UNDERSIZE_FRAME_ERR (UNM_CRB_NIU + 0x70048)
7099a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_LOCAL_ERROR_CNT		(UNM_CRB_NIU + 0x7004c)
7109a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_REMOTE_ERROR_CNT	(UNM_CRB_NIU + 0x70050)
7119a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_CONTROL_CHAR_CNT    (UNM_CRB_NIU + 0x70054)
7129a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XGE_PAUSE_FRAME_CNT		(UNM_CRB_NIU + 0x70058)
7139a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_CONFIG_0			(UNM_CRB_NIU + 0x80000)
7149a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_CONFIG_1			(UNM_CRB_NIU + 0x80004)
7159a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_IPG					(UNM_CRB_NIU + 0x80008)
7169a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_STATION_ADDR_0_HI   (UNM_CRB_NIU + 0x8000c)
7179a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_STATION_ADDR_0_1    (UNM_CRB_NIU + 0x80010)
7189a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_STATION_ADDR_1_LO   (UNM_CRB_NIU + 0x80014)
7199a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_STATUS				(UNM_CRB_NIU + 0x80018)
7209a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_MAX_FRAME_SIZE		(UNM_CRB_NIU + 0x8001c)
7219a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_PAUSE_FRAME_VALUE   (UNM_CRB_NIU + 0x80020)
7229a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_TX_BYTE_CNT			(UNM_CRB_NIU + 0x80024)
7239a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_TX_FRAME_CNT		(UNM_CRB_NIU + 0x80028)
7249a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_RX_BYTE_CNT			(UNM_CRB_NIU + 0x8002c)
7259a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_RX_FRAME_CNT		(UNM_CRB_NIU + 0x80030)
7269a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_AGGR_ERROR_CNT		(UNM_CRB_NIU + 0x80034)
7279a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_MULTICAST_FRAME_CNT	(UNM_CRB_NIU + 0x80038)
7289a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_UNICAST_FRAME_CNT	(UNM_CRB_NIU + 0x8003c)
7299a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_CRC_ERROR_CNT		(UNM_CRB_NIU + 0x80040)
7309a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_OVERSIZE_FRAME_ERR  (UNM_CRB_NIU + 0x80044)
7319a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_UNDERSIZE_FRAME_ERR (UNM_CRB_NIU + 0x80048)
7329a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_LOCAL_ERROR_CNT		(UNM_CRB_NIU + 0x8004c)
7339a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_REMOTE_ERROR_CNT	(UNM_CRB_NIU + 0x80050)
7349a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_CONTROL_CHAR_CNT    (UNM_CRB_NIU + 0x80054)
7359a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_XG1_PAUSE_FRAME_CNT		(UNM_CRB_NIU + 0x80058)
7369a5557flucy wang - Sun Microsystems - Beijing China
7379a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_TIMER_GT_TICKCTL			(UNM_CRB_TIMER + 0x00200)
7389a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_TIMER_GLOBAL_TIMESTAMP_LO   (UNM_CRB_TIMER + 0x00220)
7399a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_TIMER_TIMESTAMP		(UNM_CRB_TIMER + 0x00208)
7409a5557flucy wang - Sun Microsystems - Beijing China
7419a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PEXQ_REQ_HDR_LO				(UNM_CRB_XDMA + 0x00110)
7429a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_PEXQ_REQ_HDR_HI				(UNM_CRB_XDMA + 0x00114)
7439a5557flucy wang - Sun Microsystems - Beijing China
7449a5557flucy wang - Sun Microsystems - Beijing China/* P3 802.3ap */
7459a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_AP_MAC_CONFIG_0(I)	(UNM_CRB_NIU + 0xa0000 + (I)*0x10000)
7469a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_AP_MAC_CONFIG_1(I)	(UNM_CRB_NIU + 0xa0004 + (I)*0x10000)
7479a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_AP_MAC_IPG_IFG(I)	(UNM_CRB_NIU + 0xa0008 + (I)*0x10000)
7489a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_AP_HALF_DUPLEX_CTRL(I)  (UNM_CRB_NIU + 0xa000c + (I)*0x10000)
7499a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_AP_MAX_FRAME_SIZE(I)    (UNM_CRB_NIU + 0xa0010 + (I)*0x10000)
7509a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_AP_TEST_REG(I)		(UNM_CRB_NIU + 0xa001c + (I)*0x10000)
7519a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_AP_MII_MGMT_CONFIG(I)   (UNM_CRB_NIU + 0xa0020 + (I)*0x10000)
7529a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_AP_MII_MGMT_COMMAND(I)  (UNM_CRB_NIU + 0xa0024 + (I)*0x10000)
7539a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_AP_MII_MGMT_ADDR(I)	(UNM_CRB_NIU + 0xa0028 + (I)*0x10000)
7549a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_AP_MII_MGMT_CTRL(I)	(UNM_CRB_NIU + 0xa002c + (I)*0x10000)
7559a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_AP_MII_MGMT_STATUS(I)   (UNM_CRB_NIU + 0xa0030 + (I)*0x10000)
7569a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_AP_MII_MGMT_INDICATE(I) (UNM_CRB_NIU + 0xa0034 + (I)*0x10000)
7579a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_AP_INTERFACE_CTRL(I)    (UNM_CRB_NIU + 0xa0038 + (I)*0x10000)
7589a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_AP_INTERFACE_STATUS(I)  (UNM_CRB_NIU + 0xa003c + (I)*0x10000)
7599a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_AP_STATION_ADDR_0(I)    (UNM_CRB_NIU + 0xa0040 + (I)*0x10000)
7609a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_AP_STATION_ADDR_1(I)    (UNM_CRB_NIU + 0xa0044 + (I)*0x10000)
7619a5557flucy wang - Sun Microsystems - Beijing China
7629a5557flucy wang - Sun Microsystems - Beijing China/*
7639a5557flucy wang - Sun Microsystems - Beijing China *   Register offsets for MN
7649a5557flucy wang - Sun Microsystems - Beijing China */
7659a5557flucy wang - Sun Microsystems - Beijing China#define	MIU_CONTROL		(0x000)
7669a5557flucy wang - Sun Microsystems - Beijing China#define	MIU_TAG			(0x004)
7679a5557flucy wang - Sun Microsystems - Beijing China#define	MIU_TEST_AGT_CTRL		(0x090)
7689a5557flucy wang - Sun Microsystems - Beijing China#define	MIU_TEST_AGT_ADDR_LO	(0x094)
7699a5557flucy wang - Sun Microsystems - Beijing China#define	MIU_TEST_AGT_ADDR_HI	(0x098)
7709a5557flucy wang - Sun Microsystems - Beijing China#define	MIU_TEST_AGT_WRDATA_LO	(0x0a0)
7719a5557flucy wang - Sun Microsystems - Beijing China#define	MIU_TEST_AGT_WRDATA_HI	(0x0a4)
7729a5557flucy wang - Sun Microsystems - Beijing China#define	MIU_TEST_AGT_WRDATA(i)	(0x0a0+(4*(i)))
7739a5557flucy wang - Sun Microsystems - Beijing China#define	MIU_TEST_AGT_RDDATA_LO	(0x0a8)
7749a5557flucy wang - Sun Microsystems - Beijing China#define	MIU_TEST_AGT_RDDATA_HI	(0x0ac)
7759a5557flucy wang - Sun Microsystems - Beijing China#define	MIU_TEST_AGT_RDDATA(i)	(0x0a8+(4*(i)))
7769a5557flucy wang - Sun Microsystems - Beijing China#define	MIU_TEST_AGT_ADDR_MASK	0xfffffff8
7779a5557flucy wang - Sun Microsystems - Beijing China#define	MIU_TEST_AGT_UPPER_ADDR(off)	(0)
7789a5557flucy wang - Sun Microsystems - Beijing China
7799a5557flucy wang - Sun Microsystems - Beijing China/* MIU_TEST_AGT_CTRL flags. work for SIU as well */
7809a5557flucy wang - Sun Microsystems - Beijing China#define	MIU_TA_CTL_START		1
7819a5557flucy wang - Sun Microsystems - Beijing China#define	MIU_TA_CTL_ENABLE		2
7829a5557flucy wang - Sun Microsystems - Beijing China#define	MIU_TA_CTL_WRITE		4
7839a5557flucy wang - Sun Microsystems - Beijing China#define	MIU_TA_CTL_BUSY			8
7849a5557flucy wang - Sun Microsystems - Beijing China
7859a5557flucy wang - Sun Microsystems - Beijing China#define	SIU_TEST_AGT_CTRL		(0x060)
7869a5557flucy wang - Sun Microsystems - Beijing China#define	SIU_TEST_AGT_ADDR_LO	(0x064)
7879a5557flucy wang - Sun Microsystems - Beijing China#define	SIU_TEST_AGT_ADDR_HI	(0x078)
7889a5557flucy wang - Sun Microsystems - Beijing China#define	SIU_TEST_AGT_WRDATA_LO	(0x068)
7899a5557flucy wang - Sun Microsystems - Beijing China#define	SIU_TEST_AGT_WRDATA_HI	(0x06c)
7909a5557flucy wang - Sun Microsystems - Beijing China#define	SIU_TEST_AGT_WRDATA(i)	(0x068+(4*(i)))
7919a5557flucy wang - Sun Microsystems - Beijing China#define	SIU_TEST_AGT_RDDATA_LO	(0x070)
7929a5557flucy wang - Sun Microsystems - Beijing China#define	SIU_TEST_AGT_RDDATA_HI	(0x074)
7939a5557flucy wang - Sun Microsystems - Beijing China#define	SIU_TEST_AGT_RDDATA(i)	(0x070+(4*(i)))
7949a5557flucy wang - Sun Microsystems - Beijing China
7959a5557flucy wang - Sun Microsystems - Beijing China#define	SIU_TEST_AGT_ADDR_MASK	0x3ffff8
7969a5557flucy wang - Sun Microsystems - Beijing China#define	SIU_TEST_AGT_UPPER_ADDR(off)	((off)>>22)
7979a5557flucy wang - Sun Microsystems - Beijing China
7989a5557flucy wang - Sun Microsystems - Beijing China/* XG Link status */
7999a5557flucy wang - Sun Microsystems - Beijing China#define	XG_LINK_UP    0x10
8009a5557flucy wang - Sun Microsystems - Beijing China
8019a5557flucy wang - Sun Microsystems - Beijing China
8029a5557flucy wang - Sun Microsystems - Beijing China/* ======================  Configuration Constants ======================== */
8039a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_PHY_WAITLEN    200000    /* 200ms delay in each loop */
8049a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_PHY_WAITMAX    50    /* 10 seconds before we give up */
8059a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_MAX_GBE_PORTS 4
8069a5557flucy wang - Sun Microsystems - Beijing China#define	UNM_NIU_MAX_XG_PORTS 2
8079a5557flucy wang - Sun Microsystems - Beijing China
8089a5557flucy wang - Sun Microsystems - Beijing Chinatypedef __uint8_t unm_ethernet_macaddr_t[6];
8099a5557flucy wang - Sun Microsystems - Beijing China
8109a5557flucy wang - Sun Microsystems - Beijing China#define	MIN_CORE_CLK_SPEED 200
8119a5557flucy wang - Sun Microsystems - Beijing China#define	MAX_CORE_CLK_SPEED 400
8129a5557flucy wang - Sun Microsystems - Beijing China#define	ACCEPTABLE_CORE_CLK_RANGE(speed)	\
8139a5557flucy wang - Sun Microsystems - Beijing China	((speed >= MIN_CORE_CLK_SPEED) && (speed <= MAX_CORE_CLK_SPEED))
8149a5557flucy wang - Sun Microsystems - Beijing China
8159a5557flucy wang - Sun Microsystems - Beijing China#define	P2_TICKS_PER_SEC    2048
8169a5557flucy wang - Sun Microsystems - Beijing China#define	P2_MIN_TICKS_PER_SEC    (P2_TICKS_PER_SEC-10)
8179a5557flucy wang - Sun Microsystems - Beijing China#define	P2_MAX_TICKS_PER_SEC    (P2_TICKS_PER_SEC+10)
8189a5557flucy wang - Sun Microsystems - Beijing China#define	CHECK_TICKS_PER_SEC(ticks)	\
8199a5557flucy wang - Sun Microsystems - Beijing China	((ticks >= P2_MIN_TICKS_PER_SEC) && (ticks <= P2_MAX_TICKS_PER_SEC))
8209a5557flucy wang - Sun Microsystems - Beijing China
8219a5557flucy wang - Sun Microsystems - Beijing China/* =============================    1GbE    =============================== */
8229a5557flucy wang - Sun Microsystems - Beijing China/* Nibble or Byte mode for phy interface (GbE mode only) */
8239a5557flucy wang - Sun Microsystems - Beijing Chinatypedef enum {
8249a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_10_100_MB = 0,
8259a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_1000_MB
8269a5557flucy wang - Sun Microsystems - Beijing China} unm_niu_gbe_ifmode_t;
8279a5557flucy wang - Sun Microsystems - Beijing China
8289a5557flucy wang - Sun Microsystems - Beijing China/* Promiscous mode options (GbE mode only) */
8299a5557flucy wang - Sun Microsystems - Beijing Chinatypedef enum {
8309a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_PROMISCOUS_MODE = 0,
8319a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_NON_PROMISCOUS_MODE
8329a5557flucy wang - Sun Microsystems - Beijing China} unm_niu_prom_mode_t;
8339a5557flucy wang - Sun Microsystems - Beijing China
8349a5557flucy wang - Sun Microsystems - Beijing China/*
8359a5557flucy wang - Sun Microsystems - Beijing China * NIU GB Drop CRC Register
8369a5557flucy wang - Sun Microsystems - Beijing China */
8379a5557flucy wang - Sun Microsystems - Beijing Chinatypedef struct {
8389a5557flucy wang - Sun Microsystems - Beijing China    unm_crbword_t
8399a5557flucy wang - Sun Microsystems - Beijing China		drop_gb0:1, /* 1:drop pkts with bad CRCs, 0:pass them on */
8409a5557flucy wang - Sun Microsystems - Beijing China		drop_gb1:1, /* 1:drop pkts with bad CRCs, 0:pass them on */
8419a5557flucy wang - Sun Microsystems - Beijing China		drop_gb2:1, /* 1:drop pkts with bad CRCs, 0:pass them on */
8429a5557flucy wang - Sun Microsystems - Beijing China		drop_gb3:1, /* 1:drop pkts with bad CRCs, 0:pass them on */
8439a5557flucy wang - Sun Microsystems - Beijing China		rsvd:28;
8449a5557flucy wang - Sun Microsystems - Beijing China} unm_niu_gb_drop_crc_t;
8459a5557flucy wang - Sun Microsystems - Beijing China
8469a5557flucy wang - Sun Microsystems - Beijing China/*
8479a5557flucy wang - Sun Microsystems - Beijing China * NIU GB GMII Mode Register (applies to GB0, GB1, GB2, GB3)
8489a5557flucy wang - Sun Microsystems - Beijing China * To change the mode, turn off the existing mode, then turn on the new mode.
8499a5557flucy wang - Sun Microsystems - Beijing China */
8509a5557flucy wang - Sun Microsystems - Beijing Chinatypedef struct {
8519a5557flucy wang - Sun Microsystems - Beijing China    unm_crbword_t
8529a5557flucy wang - Sun Microsystems - Beijing China		gmiimode:1, /* 1:GMII mode, 0:xmit clk taken from SERDES */
8539a5557flucy wang - Sun Microsystems - Beijing China		rsvd:29;
8549a5557flucy wang - Sun Microsystems - Beijing China} unm_niu_gb_gmii_mode_t;
8559a5557flucy wang - Sun Microsystems - Beijing China
8569a5557flucy wang - Sun Microsystems - Beijing China/*
8579a5557flucy wang - Sun Microsystems - Beijing China * NIU GB MII Mode Register (applies to GB0, GB1, GB2, GB3)
8589a5557flucy wang - Sun Microsystems - Beijing China * To change the mode, turn off the existing mode, then turn on the new mode.
8599a5557flucy wang - Sun Microsystems - Beijing China */
8609a5557flucy wang - Sun Microsystems - Beijing Chinatypedef struct {
8619a5557flucy wang - Sun Microsystems - Beijing China    unm_crbword_t
8629a5557flucy wang - Sun Microsystems - Beijing China		miimode:1, /* 1:MII mode, 0:xmit clk provided to SERDES */
8639a5557flucy wang - Sun Microsystems - Beijing China		rsvd:29;
8649a5557flucy wang - Sun Microsystems - Beijing China} unm_niu_gb_mii_mode_t;
8659a5557flucy wang - Sun Microsystems - Beijing China
8669a5557flucy wang - Sun Microsystems - Beijing China/*
8679a5557flucy wang - Sun Microsystems - Beijing China * NIU GB MAC Config Register 0 (applies to GB0, GB1, GB2, GB3)
8689a5557flucy wang - Sun Microsystems - Beijing China */
8699a5557flucy wang - Sun Microsystems - Beijing Chinatypedef struct {
8709a5557flucy wang - Sun Microsystems - Beijing China    unm_crbword_t
8719a5557flucy wang - Sun Microsystems - Beijing China		tx_enable:1, /* 1:enable frame xmit, 0:disable */
8729a5557flucy wang - Sun Microsystems - Beijing China		tx_synched:1, /* R/O: xmit enable synched to xmit stream */
8739a5557flucy wang - Sun Microsystems - Beijing China		rx_enable:1, /* 1:enable frame recv, 0:disable */
8749a5557flucy wang - Sun Microsystems - Beijing China		rx_synched:1, /* R/O: recv enable synched to recv stream */
8759a5557flucy wang - Sun Microsystems - Beijing China		tx_flowctl:1, /* 1:enable pause frame generation, 0:disable */
8769a5557flucy wang - Sun Microsystems - Beijing China		rx_flowctl:1, /* 1:act on recv'd pause frames, 0:ignore */
8779a5557flucy wang - Sun Microsystems - Beijing China		rsvd1:2,
8789a5557flucy wang - Sun Microsystems - Beijing China		loopback:1, /* 1:loop MAC xmits to MAC recvs, 0:normal */
8799a5557flucy wang - Sun Microsystems - Beijing China		rsvd2:7,
8809a5557flucy wang - Sun Microsystems - Beijing China		tx_reset_pb:1, /* 1:reset frame xmit protocol blk, 0:no-op */
8819a5557flucy wang - Sun Microsystems - Beijing China		rx_reset_pb:1, /* 1:reset frame recv protocol blk, 0:no-op */
8829a5557flucy wang - Sun Microsystems - Beijing China		tx_reset_mac:1, /* 1:reset data/ctl multiplexer blk, 0:no-op */
8839a5557flucy wang - Sun Microsystems - Beijing China		rx_reset_mac:1, /* 1:reset ctl frames & timers blk, 0:no-op */
8849a5557flucy wang - Sun Microsystems - Beijing China		rsvd3:11,
8859a5557flucy wang - Sun Microsystems - Beijing China		soft_reset:1; /* 1:reset the MAC and the SERDES, 0:no-op */
8869a5557flucy wang - Sun Microsystems - Beijing China} unm_niu_gb_mac_config_0_t;
8879a5557flucy wang - Sun Microsystems - Beijing China
8889a5557flucy wang - Sun Microsystems - Beijing China/*
8899a5557flucy wang - Sun Microsystems - Beijing China * NIU GB MAC Config Register 1 (applies to GB0, GB1, GB2, GB3)
8909a5557flucy wang - Sun Microsystems - Beijing China */
8919a5557flucy wang - Sun Microsystems - Beijing Chinatypedef struct {
8929a5557flucy wang - Sun Microsystems - Beijing China    unm_crbword_t
8939a5557flucy wang - Sun Microsystems - Beijing China		duplex:1, /* 1:full duplex mode, 0:half duplex */
8949a5557flucy wang - Sun Microsystems - Beijing China		crc_enable:1, /* 1:append CRC to xmit frames, 0:dont append */
8959a5557flucy wang - Sun Microsystems - Beijing China		padshort:1, /* 1:pad short frames and add CRC, 0:dont pad */
8969a5557flucy wang - Sun Microsystems - Beijing China		rsvd1:1,
8979a5557flucy wang - Sun Microsystems - Beijing China		checklength:1, /* 1:check framelen with actual, 0:dont check */
8989a5557flucy wang - Sun Microsystems - Beijing China		hugeframes:1, /* 1:allow oversize xmit frames, 0:dont allow */
8999a5557flucy wang - Sun Microsystems - Beijing China		rsvd2:2,
9009a5557flucy wang - Sun Microsystems - Beijing China		intfmode:2, /* 01:nibble (10/100), 10:byte (1000) */
9019a5557flucy wang - Sun Microsystems - Beijing China		rsvd3:2,
9029a5557flucy wang - Sun Microsystems - Beijing China		preamblelen:4, /* preamble field length in bytes, default 7 */
9039a5557flucy wang - Sun Microsystems - Beijing China		rsvd4:16;
9049a5557flucy wang - Sun Microsystems - Beijing China} unm_niu_gb_mac_config_1_t;
9059a5557flucy wang - Sun Microsystems - Beijing China
9069a5557flucy wang - Sun Microsystems - Beijing China/*
9079a5557flucy wang - Sun Microsystems - Beijing China * NIU XG Pause Ctl Register
9089a5557flucy wang - Sun Microsystems - Beijing China */
9099a5557flucy wang - Sun Microsystems - Beijing Chinatypedef struct {
9109a5557flucy wang - Sun Microsystems - Beijing China    unm_crbword_t
9119a5557flucy wang - Sun Microsystems - Beijing China		xg0_mask:1, /* 1:disable tx pause frames */
9129a5557flucy wang - Sun Microsystems - Beijing China		xg0_request:1, /* request single pause frame */
9139a5557flucy wang - Sun Microsystems - Beijing China		xg0_on_off:1, /* 1:req is pause on, 0:off */
9149a5557flucy wang - Sun Microsystems - Beijing China		xg1_mask:1, /* 1:disable tx pause frames */
9159a5557flucy wang - Sun Microsystems - Beijing China		xg1_request:1, /* request single pause frame */
9169a5557flucy wang - Sun Microsystems - Beijing China		xg1_on_off:1, /* 1:req is pause on, 0:off */
9179a5557flucy wang - Sun Microsystems - Beijing China		rsvd:26;
9189a5557flucy wang - Sun Microsystems - Beijing China} unm_niu_xg_pause_ctl_t;
9199a5557flucy wang - Sun Microsystems - Beijing China
9209a5557flucy wang - Sun Microsystems - Beijing China/*
9219a5557flucy wang - Sun Microsystems - Beijing China * NIU GBe Pause Ctl Register
9229a5557flucy wang - Sun Microsystems - Beijing China */
9239a5557flucy wang - Sun Microsystems - Beijing Chinatypedef struct {
9249a5557flucy wang - Sun Microsystems - Beijing China    unm_crbword_t
9259a5557flucy wang - Sun Microsystems - Beijing China		gb0_mask:1, /* 1:disable tx pause frames */
9269a5557flucy wang - Sun Microsystems - Beijing China		gb0_pause_req:1, /* 1: send pause on, 0: send pause off */
9279a5557flucy wang - Sun Microsystems - Beijing China		gb1_mask:1, /* 1:disable tx pause frames */
9289a5557flucy wang - Sun Microsystems - Beijing China		gb1_pause_req:1, /* 1: send pause on, 0: send pause off */
9299a5557flucy wang - Sun Microsystems - Beijing China		gb2_mask:1, /* 1:disable tx pause frames */
9309a5557flucy wang - Sun Microsystems - Beijing China		gb2_pause_req:1, /* 1: send pause on, 0: send pause off */
9319a5557flucy wang - Sun Microsystems - Beijing China		gb3_mask:1, /* 1:disable tx pause frames */
9329a5557flucy wang - Sun Microsystems - Beijing China		gb3_pause_req:1, /* 1: send pause on, 0: send pause off */
9339a5557flucy wang - Sun Microsystems - Beijing China		rsvd:24;
9349a5557flucy wang - Sun Microsystems - Beijing China} unm_niu_gb_pause_ctl_t;
9359a5557flucy wang - Sun Microsystems - Beijing China
9369a5557flucy wang - Sun Microsystems - Beijing China
9379a5557flucy wang - Sun Microsystems - Beijing China/*
9389a5557flucy wang - Sun Microsystems - Beijing China * NIU XG MAC Config Register
9399a5557flucy wang - Sun Microsystems - Beijing China */
9409a5557flucy wang - Sun Microsystems - Beijing Chinatypedef struct {
9419a5557flucy wang - Sun Microsystems - Beijing China    unm_crbword_t
9429a5557flucy wang - Sun Microsystems - Beijing China		tx_enable:1, /* 1:enable frame xmit, 0:disable */
9439a5557flucy wang - Sun Microsystems - Beijing China		rsvd1:1,
9449a5557flucy wang - Sun Microsystems - Beijing China		rx_enable:1, /* 1:enable frame recv, 0:disable */
9459a5557flucy wang - Sun Microsystems - Beijing China		rsvd2:1,
9469a5557flucy wang - Sun Microsystems - Beijing China		soft_reset:1, /* 1:reset the MAC , 0:no-op */
9479a5557flucy wang - Sun Microsystems - Beijing China		rsvd3:22,
9489a5557flucy wang - Sun Microsystems - Beijing China		xaui_framer_reset:1,
9499a5557flucy wang - Sun Microsystems - Beijing China		xaui_rx_reset:1,
9509a5557flucy wang - Sun Microsystems - Beijing China		xaui_tx_reset:1,
9519a5557flucy wang - Sun Microsystems - Beijing China		xg_ingress_afifo_reset:1,
9529a5557flucy wang - Sun Microsystems - Beijing China		xg_egress_afifo_reset:1;
9539a5557flucy wang - Sun Microsystems - Beijing China} unm_niu_xg_mac_config_0_t;
9549a5557flucy wang - Sun Microsystems - Beijing China
9559a5557flucy wang - Sun Microsystems - Beijing China/*
9569a5557flucy wang - Sun Microsystems - Beijing China * NIU GB MII Mgmt Config Register (applies to GB0, GB1, GB2, GB3)
9579a5557flucy wang - Sun Microsystems - Beijing China */
9589a5557flucy wang - Sun Microsystems - Beijing Chinatypedef struct {
9599a5557flucy wang - Sun Microsystems - Beijing China    unm_crbword_t
9609a5557flucy wang - Sun Microsystems - Beijing China		clockselect:3, /* 0:clk/4,  1:clk/4,  2:clk/6,  3:clk/8 */
9619a5557flucy wang - Sun Microsystems - Beijing China		/* 4:clk/10, 5:clk/14, 6:clk/20, 7:clk/28 */
9629a5557flucy wang - Sun Microsystems - Beijing China		rsvd1:1,
9639a5557flucy wang - Sun Microsystems - Beijing China		nopreamble:1, /* 1:suppress preamble generation, 0:normal */
9649a5557flucy wang - Sun Microsystems - Beijing China		scanauto:1, /* ???? */
9659a5557flucy wang - Sun Microsystems - Beijing China		rsvd2:25,
9669a5557flucy wang - Sun Microsystems - Beijing China		reset:1; /* 1:reset MII mgmt, 0:no-op */
9679a5557flucy wang - Sun Microsystems - Beijing China} unm_niu_gb_mii_mgmt_config_t;
9689a5557flucy wang - Sun Microsystems - Beijing China
9699a5557flucy wang - Sun Microsystems - Beijing China/*
9709a5557flucy wang - Sun Microsystems - Beijing China * NIU GB MII Mgmt Command Register (applies to GB0, GB1, GB2, GB3)
9719a5557flucy wang - Sun Microsystems - Beijing China */
9729a5557flucy wang - Sun Microsystems - Beijing Chinatypedef struct {
9739a5557flucy wang - Sun Microsystems - Beijing China    unm_crbword_t
9749a5557flucy wang - Sun Microsystems - Beijing China		read_cycle:1, /* 1:perform single read cycle, 0:no-op */
9759a5557flucy wang - Sun Microsystems - Beijing China		scan_cycle:1, /* 1:perform continuous read cycles, 0:no-op */
9769a5557flucy wang - Sun Microsystems - Beijing China		rsvd:30;
9779a5557flucy wang - Sun Microsystems - Beijing China} unm_niu_gb_mii_mgmt_command_t;
9789a5557flucy wang - Sun Microsystems - Beijing China
9799a5557flucy wang - Sun Microsystems - Beijing China/*
9809a5557flucy wang - Sun Microsystems - Beijing China * NIU GB MII Mgmt Address Register (applies to GB0, GB1, GB2, GB3)
9819a5557flucy wang - Sun Microsystems - Beijing China */
9829a5557flucy wang - Sun Microsystems - Beijing Chinatypedef struct {
9839a5557flucy wang - Sun Microsystems - Beijing China    unm_crbword_t
9849a5557flucy wang - Sun Microsystems - Beijing China		reg_addr:5, /* which mgmt register we want to talk to */
9859a5557flucy wang - Sun Microsystems - Beijing China		rsvd1:3,
9869a5557flucy wang - Sun Microsystems - Beijing China		phy_addr:5, /* which PHY to talk to (0 is reserved) */
9879a5557flucy wang - Sun Microsystems - Beijing China		rsvd:19;
9889a5557flucy wang - Sun Microsystems - Beijing China} unm_niu_gb_mii_mgmt_address_t;
9899a5557flucy wang - Sun Microsystems - Beijing China
9909a5557flucy wang - Sun Microsystems - Beijing China/*
9919a5557flucy wang - Sun Microsystems - Beijing China * NIU GB MII Mgmt Indicators Register (applies to GB0, GB1, GB2, GB3)
9929a5557flucy wang - Sun Microsystems - Beijing China * Read-only register.
9939a5557flucy wang - Sun Microsystems - Beijing China */
9949a5557flucy wang - Sun Microsystems - Beijing Chinatypedef struct {
9959a5557flucy wang - Sun Microsystems - Beijing China    unm_crbword_t
9969a5557flucy wang - Sun Microsystems - Beijing China		busy:1, /* 1:performing an MII mgmt cycle, 0:idle */
9979a5557flucy wang - Sun Microsystems - Beijing China		scanning:1, /* 1:scan operation in progress, 0:idle */
9989a5557flucy wang - Sun Microsystems - Beijing China		notvalid:1, /* 1:mgmt result data not yet valid, 0:idle */
9999a5557flucy wang - Sun Microsystems - Beijing China		rsvd:29;
10009a5557flucy wang - Sun Microsystems - Beijing China} unm_niu_gb_mii_mgmt_indicators_t;
10019a5557flucy wang - Sun Microsystems - Beijing China
10029a5557flucy wang - Sun Microsystems - Beijing China/*
10039a5557flucy wang - Sun Microsystems - Beijing China * NIU GB Station Address High Register
10049a5557flucy wang - Sun Microsystems - Beijing China * NOTE: this value is in network byte order.
10059a5557flucy wang - Sun Microsystems - Beijing China */
10069a5557flucy wang - Sun Microsystems - Beijing Chinatypedef struct {
10079a5557flucy wang - Sun Microsystems - Beijing China    unm_crbword_t
10089a5557flucy wang - Sun Microsystems - Beijing China		address:32; /* station address [47:16] */
10099a5557flucy wang - Sun Microsystems - Beijing China} unm_niu_gb_station_address_high_t;
10109a5557flucy wang - Sun Microsystems - Beijing China
10119a5557flucy wang - Sun Microsystems - Beijing China/*
10129a5557flucy wang - Sun Microsystems - Beijing China * NIU GB Station Address Low Register
10139a5557flucy wang - Sun Microsystems - Beijing China * NOTE: this value is in network byte order.
10149a5557flucy wang - Sun Microsystems - Beijing China */
10159a5557flucy wang - Sun Microsystems - Beijing Chinatypedef struct {
10169a5557flucy wang - Sun Microsystems - Beijing China    unm_crbword_t
10179a5557flucy wang - Sun Microsystems - Beijing China		rsvd:16,
10189a5557flucy wang - Sun Microsystems - Beijing China		address:16; /* station address [15:0] */
10199a5557flucy wang - Sun Microsystems - Beijing China} unm_niu_gb_station_address_low_t;
10209a5557flucy wang - Sun Microsystems - Beijing China
10219a5557flucy wang - Sun Microsystems - Beijing China/* ============================  PHY Definitions  ========================== */
10229a5557flucy wang - Sun Microsystems - Beijing China/*
10239a5557flucy wang - Sun Microsystems - Beijing China * PHY-Specific MII control/status registers.
10249a5557flucy wang - Sun Microsystems - Beijing China */
10259a5557flucy wang - Sun Microsystems - Beijing Chinatypedef enum {
10269a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_CONTROL = 0,
10279a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_STATUS = 1,
10289a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_PHY_ID_0 = 2,
10299a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_PHY_ID_1 = 3,
10309a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_AUTONEG = 4,
10319a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_LNKPART = 5,
10329a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_AUTONEG_MORE = 6,
10339a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_NEXTPAGE_XMIT = 7,
10349a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_LNKPART_NEXTPAGE = 8,
10359a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_1000BT_CONTROL = 9,
10369a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_1000BT_STATUS = 10,
10379a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_EXTENDED_STATUS = 15,
10389a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_PHY_CONTROL = 16,
10399a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_PHY_STATUS = 17,
10409a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_INT_ENABLE = 18,
10419a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_INT_STATUS = 19,
10429a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_PHY_CONTROL_MORE = 20,
10439a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_RECV_ERROR_COUNT = 21,
10449a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_LED_CONTROL = 24,
10459a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_LED_OVERRIDE = 25,
10469a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_PHY_CONTROL_MORE_YET = 26,
10479a5557flucy wang - Sun Microsystems - Beijing China    UNM_NIU_GB_MII_MGMT_ADDR_PHY_STATUS_MORE = 27
10489a5557flucy wang - Sun Microsystems - Beijing China} unm_niu_phy_register_t;
10499a5557flucy wang - Sun Microsystems - Beijing China
10509a5557flucy wang - Sun Microsystems - Beijing China/*
10519a5557flucy wang - Sun Microsystems - Beijing China * PHY-Specific Status Register (reg 17).
10529a5557flucy wang - Sun Microsystems - Beijing China */
10539a5557flucy wang - Sun Microsystems - Beijing Chinatypedef struct {
10549a5557flucy wang - Sun Microsystems - Beijing China    unm_crbword_t
10559a5557flucy wang - Sun Microsystems - Beijing China