/*
* 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 2008 Sun Microsystems, Inc. All rights reserved.
* Use is subject to license terms.
*/
#ifndef _NPI_H
#define _NPI_H
#pragma ident "%Z%%M% %I% %E% SMI"
#ifdef __cplusplus
extern "C" {
#endif
#include <nxge_common_impl.h>
/* Common Block ID */
/* Common HW error code */
/* HW unable to exit from reset state. */
/* Write operation failed on indirect write. */
/* Read operation failed on indirect read. */
/* Error code boundary */
/* Common SW errors code */
#define NPI_CNT_CLR_VAL 0
/*
* Block identifier starts at bit 8.
*/
/*
* Port, channel and misc. information starts at bit 12.
*/
/*
* Software Block specific error codes start at 0x50.
*/
/*
* Hardware block specific error codes start at 0x90.
*/
/* Structures for register tracing */
typedef struct _rt_buf {
} rt_buf_t;
/*
* Control Address field format
*
* Bit 0 - 23: Address
* Bit 24 - 25: Function Number
* Bit 26 - 29: Instance Number
* Bit 31: Invalid bit
*/
typedef struct _rtrace {
} rtrace_t;
typedef struct _err_inject {
} err_inject_t;
/* Configuration options */
typedef enum config_op {
DISABLE = 0,
} config_op_t;
/* I/O options */
typedef enum io_op {
OP_SET = 0,
} io_op_t;
/* Counter options */
typedef enum counter_op {
SNAP_STICKY = 0,
} counter_op_t;
/* NPI attribute */
typedef struct _npi_attr_t {
} npi_attr_t;
/* NPI Handle */
typedef struct _npi_handle_function {
/* NPI Handle */
typedef struct _npi_handle {
void * nxgep;
} npi_handle_t;
/* NPI Counter */
typedef struct _npi_counter_t {
char *name;
/*
* Commmon definitions for NPI RXDMA and TXDMA functions.
*/
typedef struct _dma_log_page {
extern rtrace_t npi_rtracebuf;
void npi_rtrace_buf_init(rtrace_t *);
void npi_rtrace_buf_init(rtrace_t *);
char *, ...);
#ifdef NPI_DEBUG
#else
#endif
#ifdef __cplusplus
}
#endif
#endif /* _NPI_H */