/*
* 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 2001 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _SYS_SGHSC_H
#define _SYS_SGHSC_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
/*
* Serengeti CompactPCI Hot Swap Controller Driver header file. This file is
* structured in a following way: common, sghsc data (defines and structures)
* and mailbox related data (defines and structures).
*/
#include <sys/sgsbbc_mailbox.h>
/*
* sghsc node path with insert placeholders
*/
/*
* Mutex short hands
*/
(&sghsc->sghsc_mutex)
/*
* Misc definitions
*/
/* Individual events definitions */
/* Slot flags */
/* LED definitions */
/* Ring buffer size, has to be power of 2 */
/*
* Per Hot Swappable Slot info
*/
typedef struct sghsc_slot {
/*
* Mutex for each slots for state change
*/
/*
* pathname of bus node
*/
/*
* property, status, cap for each slot
*/
/*
* PCI Bus number for each slot
*/
/*
* dynamically allocated hpc_slot_ops_t
* and register slot handle
*/
/*
* Leds for each slot are not cached
*/
/*
* slot state, flags, board type
*/
} sghsc_slot_t;
/*
* Per Serenget CompactPCI HSC instance soft state structure
*/
typedef struct sghsc {
} sghsc_t;
/*
* Slot map descriptor (slot to bus segment mapping)
*/
typedef struct sdesc {
} sdesc_t;
/*
* Mailbox related data and structures
*/
/*
* Bit definition for Boat Type
*/
#define NO_BOARD_TYPE 0
/*
* Shifts definition for CPCI_GET_SLOT_STATUS
*/
#define CPCI_STAT_POWER_ON_SHIFT 0
/*
* Bit definition for CPCI_SET_SLOT_STATUS
*/
/*
* Bit definition for CPCI_SET_SLOT_STATUS_FAULT_LED
*/
/*
* Bit definition for CPCI_SET_SLOT_POWER
*/
/*
* Mailbox timeout
*/
/*
* cPCI command codes (internal)
*/
typedef struct {
typedef struct {
typedef struct sghsc_event {
int type;
int node_id;
int board;
int slot;
int info;
typedef struct sghsc_rb_head {
int put_idx;
int get_idx;
int size;
#ifdef __cplusplus
}
#endif
#endif /* _SYS_SGHSC_H */