px_pci.h revision cea92495d0c426c5ef0d8c45bfee626731af3b3a
/*
* CDDL HEADER START
*
* The contents of this file are subject to the terms of the
* Common Development and Distribution License (the "License").
* You may not use this file except in compliance with the License.
*
* You can obtain a copy of the license at usr/src/OPENSOLARIS.LICENSE
* See the License for the specific language governing permissions
* and limitations under the License.
*
* When distributing Covered Code, include this CDDL HEADER in each
* file and include the License file at usr/src/OPENSOLARIS.LICENSE.
* If applicable, add the following below this CDDL HEADER, with the
* fields enclosed by brackets "[]" replaced with your own identifying
* information: Portions Copyright [yyyy] [name of copyright owner]
*
* CDDL HEADER END
*/
/*
* Copyright 2006 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_PX_PCI_H
#define _SYS_PX_PCI_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Intel specific register offsets with bit definitions.
*/
#define PXB_PX_CAPABILITY_ID 0x44
#define PXB_BRIDGE_CONF 0x40
/*
* Generic - PCI Express Capability List Structure
* XXX - Should be moved to a more PCI generic location
*/
#define PX_CAP_REG 0x2
/*
* Generic - PCI Express Capabilities Register
* XXX - Should be moved to a more PCI generic location
*/
/*
*/
#define PX_PFREQ_100 0x400
#define PX_PFREQ_133 0x600
/*
* Downstream delayed transaction resource partitioning.
*/
/*
* Maximum upstream delayed transaction.
*/
#define PX_MDT_44 0x00
#define PX_MDT_11 0x01
#define PX_MDT_22 0x10
#define NUM_LOGICAL_SLOTS 32
#define PXB_RANGE_LEN 2
#define PXB_32BIT_IO 1
#define PXB_32bit_MEM 1
#define PXB_MEMGRAIN 0x100000
#define PXB_IOGRAIN 0x1000
typedef struct slot_table {
} slot_table_t;
/*
* The following typedef is used to represent an entry in the "ranges"
* property of a device node.
*/
typedef struct {
} pxb_ranges_t;
typedef struct {
/* Bridge or Switch, upstream or downstream */
int pxb_port_type;
/* Interrupt */
int pxb_htable_size; /* htable size */
int pxb_intr_count; /* Num of Intr */
int pxb_intr_type; /* (MSI | FIXED) */
/*
* HP support
*/
/* Initialization flags */
int pxb_init_flags;
/* FMA */
int pxb_fm_cap;
/* Vendor Device Id */
/*
* soft state pointer and structure template:
*/
extern void *pxb_state;
/* pxb soft states */
#define PXB_SOFT_STATE_CLOSED 0x00
#define PXB_SOFT_STATE_OPEN 0x01
#define PXB_SOFT_STATE_OPEN_EXCL 0x02
/* pxb init flags */
#define PXB_INIT_MUTEX 0x01
#define PXB_INIT_CONFIG_HANDLE 0x02
#define PXB_INIT_HTABLE 0x04
#define PXB_INIT_ALLOC 0x08
#define PXB_INIT_HANDLER 0x10
#define PXB_INIT_ENABLE 0x20
#define PXB_INIT_BLOCK 0x40
#define PXB_INIT_FM 0x80
#define PXB_VENDOR_PLX 0x10B5
#define PXB_DEVICE_PLX_8532 0x8532
#define PXB_DEVICE_PLX_8516 0x8516
#define PXB_VENDOR_SUN 0x108E
#define PXB_DEVICE_PLX_PCIX 0x9010
#define PXB_DEVICE_PLX_PCIE 0x9020
/* functionality checks */
#define PXB_MSI 1
#define PXB_LINK_INIT 2
#define PXB_HOTPLUG_MSGS 3
#ifdef BCM_SW_WORKAROUNDS
/* Workaround for address space limitation in Broadcom 5714/5715 */
#define PXB_ADDR_LIMIT_LO 0ull
#endif /* BCM_SW_WORKAROUNDS */
#ifdef __cplusplus
}
#endif
#endif /* _SYS_PX_PCI_H */