px_var.h revision 0168954460bd77d83497a4a6aa9c3f34c55dba25
/*
* 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_VAR_H
#define _SYS_PX_VAR_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* offsets of PCI address spaces from base address:
*/
#define PX_CONFIG 0x001000000ull
#define PX_A_IO 0x002000000ull
#define PX_B_IO 0x002010000ull
#define PX_A_MEMORY 0x100000000ull
#define PX_B_MEMORY 0x180000000ull
#define PX_IO_SIZE 0x000010000ull
#define PX_MEM_SIZE 0x080000000ull
/*
* The following typedef is used to represent a
* 1275 "bus-range" property of a PCI Bus node.
*/
typedef struct px_bus_range {
/*
* The following typedef is used to represent an entry in the "ranges"
* property of a device node.
*/
typedef struct px_ranges {
} px_ranges_t;
/*
* The following typedef is used to represent a
* 1275 "reg" property of a PCI nexus.
*/
typedef struct px_nexus_regspec {
typedef enum {
PX_ATTACHED = 1,
} px_state_t;
enum { PX_INTR_XBC, PX_INTR_PEC };
/*
* px soft state structure:
*
* Each px node has a px soft state structure.
*/
struct px {
/*
* State flags and mutex:
*/
/*
* Links to other state structures:
*/
/*
* px device node properties:
*/
int px_ranges_length;
int px_inos_len; /* "interrupts" length */
/* Error handling */
/* FMA */
int px_fm_cap;
/* Platform specific information */
void *px_plat_p;
/* Power Management fields */
volatile uint32_t px_lup_pending;
int px_pm_flags;
/* CPR callback id */
};
/* px soft state flag */
#define PX_SOFT_STATE_OPEN 0x01
#define PX_SOFT_STATE_OPEN_EXCL 0x02
#define PX_SOFT_STATE_CLOSED 0x04
/* px_dev_caps definition */
#define PX_BYPASS_DMA_ALLOWED 0x00000001
#define PX_HOTPLUG_CAPABLE 0x00000002
/* px_pm_flags definitions used with interrupts and FMA code */
extern void *px_state_p;
/*
* function prototypes for bus ops routines:
*/
extern int
extern int
extern int
extern int
extern int
extern int
extern int
extern int
#ifdef __cplusplus
}
#endif
#endif /* _SYS_PX_VAR_H */