📄 ixf_api_d.h
字号:
/*
*---------------------------------------------------------------------------
*
* I N T E L P R O P R I E T A R Y
*
* COPYRIGHT (c) 2001 BY INTEL CORPORATION. ALL RIGHTS
* RESERVED. NO PART OF THIS PROGRAM OR PUBLICATION MAY
* BE REPRODUCED, TRANSMITTED, TRANSCRIBED, STORED IN A
* RETRIEVAL SYSTEM, OR TRANSLATED INTO ANY LANGUAGE OR COMPUTER
* LANGUAGE IN ANY FORM OR BY ANY MEANS, ELECTRONIC, MECHANICAL,
* MAGNETIC, OPTICAL, CHEMICAL, MANUAL, OR OTHERWISE, WITHOUT
* THE PRIOR WRITTEN PERMISSION OF :
*
* INTEL CORPORATION
*
* 2200 MISSION COLLEGE BLVD
*
* SANTA CLARA, CALIFORNIA 95052-8119
*
*---------------------------------------------------------------------------
*
*
* AUTHOR: $Author: lagarwal $
* DATE: $Date: 2003/07/22 18:53:57 $
* LAST MODIFIED: $Modtime: 5/17/02 1:45p $
* REV#: $Revision: 1.2 $
* LOGFILE: $Logfile: /Embedded/source/drivers/ixf/ixf_api_d.h $
* WORKFILE: $Workfile: ixf_api_d.h $
*
* --------------------------------------------------------------------------
* Project: OCD API
*
* Purpose: This file defines types that are common to all OCD API modules
*
* Notes:
*
* --------------------------------------------------------------------------
* CompilerFlags:
* --------------------------------------------------------------------------
* --------------------------------------------------------------------------
* $Log: ixf_api_d.h,v $
* Revision 1.2 2003/07/22 18:53:57 lagarwal
* no message
*
* Revision 1.1.1.1 2002/11/15 17:51:12 lagarwal
* rename dir
*
* Revision 1.4 2002/09/09 21:49:20 cmah1
* no message
*
* Revision 1.2 2002/07/08 14:13:28 machambe
* no message
*
*
* 43 5/17/02 2:23p Machambe
* Adding IXF_INIT_DATA_DELIMITER
*
* 42 5/16/02 3:43p Machambe
* Adding ATM and TRANSPARENT modes
*
* 41 5/01/02 4:16p Pkjain2
*
* 40 4/18/02 4:47p Machambe
* Adding Reset type to support ixf6048
*
* 39 4/16/02 2:43p Jaalliso
* Renaming IXF_API_XGMAC_BASE
*
* 38 4/15/02 4:54p Jaalliso
* Removing GFP_MODE enum
*
* 37 4/05/02 12:33p Machambe
* Adding ATM enum counters
*
* 36 2/12/02 11:11a Jaalliso
* Renaming SIF loopback enums to be more generic
*
* 35 2/11/02 4:07p Srodrig1
*
* 34 2/08/02 12:45p Jaalliso
* Adding line loopback modes to bb_TestType_e
*
* 33 2/07/02 4:38p Jaalliso
* Adding modes to bb_OperMode_e
*
* 32 2/06/02 4:17p Srodrig1
*
* 31 1/30/02 10:38a Machambe
*
* 30 1/29/02 2:41p Skadrix
*
* 29 1/29/02 12:55p Skadrix
* Added Test Types in bb_TestType_e
*
* 28 1/25/02 11:04a Srodrig1
*
* 27 1/16/02 4:28p Skadrix
* Added new counter type
* bb_ALL_16121_COUNTERS
*
* 26 1/14/02 10:20a Srodrig1
*
* 25 1/10/02 2:45p Rcordova
* Added Reset options used in hailey Chip
*
* 24 1/09/02 2:19p Srodrig1
*
* 23 1/02/02 6:25p Rcordova
*
* 22 1/02/02 6:20p Rcordova
* Added PathOhByteAndSrc Struct and changed union generic for struct
* generic (added also Source parameter)
*
* 21 12/12/01 3:49p Srodrig1
*
* 20 12/06/01 4:32p Jaalliso
* Taking out AlarmCallBack type
*
* 19 12/06/01 2:12p Jaalliso
* Toke out bb_WordSize_t
*
* 18 12/05/01 9:34a Machambe
* Moving Error Codes over to common_def.h
*
* 17 12/05/01 9:30a Rsood
* Added APS block
*
* 16 12/04/01 1:38p Jaalliso
* Split out common_types.h and common_def.h
*
* 15 12/03/01 4:12p Pkjain2
*
* 14 11/19/01 2:11p Srodrig1
*
* 13 11/18/01 10:49p Machambe
*
* 12 11/16/01 8:45p Pkjain2
*
* 11 11/16/01 11:31a Machambe
*
* 10 11/15/01 6:40p Machambe
*
* 9 11/14/01 9:32a Pkjain2
*
* 8 11/10/01 11:26a Pkjain2
*
* 7 11/06/01 2:01p Pkjain2
*
* 6 11/02/01 5:10p Pkjain2
*
* 5 9/12/01 12:01p Srodrig1
*
* 4 8/08/01 3:51p Rfranz
* Moved more definitions from bb_util and oht_data
*
* 3 7/27/01 4:05p Rfranz
* Calypso sonet api module compiles without warnings or errors. (initial
* test compile)
*
* 2 7/27/01 2:11p Rfranz
* Check in before first attempt to compile
*
* 1 7/18/01 11:16a Rfranz
* Intitial checkin
*
* --------------------------------------------------------------------------
*/
#ifndef __IXF_API_D_H__
#define __IXF_API_D_H__
/* Delimiter to mark the end of an InitRegTable_t */
#define IXF_INIT_DATA_DELIMITER 0xA5A5
/* Set and clr bit macros used by amazon and eiffel */
#define SetBit(Reg, Bit) ((Reg) = (Bit | Reg))
#define ClrBit(Reg, Bit) ((Reg) = (~(Bit) & Reg))
#define IXF_BIT(bitShift) (0x1 << bitShift)
#define IXF_API_SONET_BASE 0x0100
#define IXF_API_POS_BASE 0x0200
#define IXF_API_SPI4_BASE 0x0300
#define IXF_API_ETHER_BASE 0x0400
#define IXF_API_PCS_BASE 0x0500
#define IXF_API_GFP_BASE 0x0600
#define IXF_API_ATM_BASE 0x0700
typedef enum /* Identifies signal type */
{
STS_TYPE,
STM_TYPE
} bb_SignalType_e;
typedef enum /* Identifies the two sides of a chip */
{
LINE,
SYSTEM,
BOTH_SIDES
} bb_ChipSide_t;
typedef enum /* Identifies the different flows of a chip */
{
RX,
TX,
BOTH_FLOWS
} bb_ChipFlow_t;
typedef enum /* Identifies the different paths of a chip */
{
INGRESS,
EGRESS,
BOTH_PATHS
} bb_ChipPath_t;
typedef enum
{
ixf_eSONET,
ixf_eSPI4,
ixf_ePCS,
ixf_eETHERNET,
ixf_ePOS,
ixf_eGFP,
ixf_eOIF,
ixf_eAPS,
ixf_XGMAC
} bb_eChipBlock_t;
typedef struct /* Used as a generic parameter for many API routines */
{
struct /* Denotes which block of the chip (chipSection_t) */
{
ulong block;
bb_ChipSide_t side;
bb_ChipFlow_t flow;
bb_ChipPath_t path;
} block;
union u_group /* Denotes the section within the block */
{
unsigned short group;
unsigned short channel;
unsigned short tributary;
} group;
union u_indirect /* Denotes a location within the group */
{
uchar slot;
} indirect;
struct /* Misc. variables used for varies function parameters */
{
ushort source;
uchar autoIncrement;
uchar bitOrBlock;
uchar flag;
} generic;
ulong value;
} bb_ChipSegment_t;
typedef struct /* Complete Data for a Chip */
{
bb_RegPointer_type BaseAddress; /* Base Address of chip */
bb_ChipType_e ChipType; /* Type of Chip */
void* pChipCfg; /* Pointer to Chip Specific Configuration */
void* pAlarmCfg; /* Pointer to Chip Specific Alarm Config */
void* funcPtr; /* Pointer to the chip's api func's */
} bb_ChipData_t;
/***********************************************************************
* Chip Information
**********************************************************************/
typedef struct /* Information set by the hardware */
{
uchar ChipVersion; /* Chip Version */
ushort ChipId; /* Chip ID */
} bb_ChipInfo_t;
typedef enum
{
TEST_LOOPBACKS,
TEST_OHT,
TEST_SDH,
TEST_PTRS,
TEST_PRBS,
bb_SYSTEM_LOCAL_LOOPBACK,
bb_SYSTEM_REMOTE_LOOPBACK,
bb_SPI4_TX_LOCK_DIS,
bb_SPI4_TX_FIFO_STATUS,
bb_LINE_LOCAL_LOOPBACK,
bb_LINE_REMOTE_LOOPBACK,
bb_APS_INTF_LOCAL,
bb_APS_INTF_REMOTE,
} bb_TestType_e;
/***********************************************************************
* Data for Functions which get or set the Operation Mode(s)
**********************************************************************/
typedef enum /* Operational Modes */
{
/* Op Modes for Chip: */
bb_CHIP_OFFLINE, /* All I/O busses & Interrupts disabled */
bb_CHIP_ONLINE, /* Operational: Traffic & Interrupts enabled */
/* Extra Operational Mode for an OHT Chip: */
bb_OHT_CHIP_TEST, /* OHT Chip in test mode */
/* Operational Modes for an ATM or POS Channel: */
bb_ATM_POS_CHAN_HALT, /* Traffic gracefully stopped; I/O enabled */
bb_ATM_POS_CHAN_ONLINE, /* Channel Operational: Traffic enabled */
bb_ATM_POS_CHAN_TEST /* Channel Operational, in Test Mode */
} bb_OpMode_e;
/* Identifies the Type of Alarm Condition or Status Change */
typedef enum
{
bb_6051_OHT_ALARM,
bb_6048_OHT_ALARM,
bb_6048_UTOPIA_ALARM,
bb_6048_ATM_ALARM,
bb_6048_POS_ALARM,
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -