📄 diag.h
字号:
/*
*-------------------------------------------------------------------------------
*
* I N T E L P R O P R I E T A R Y
*
* COPYRIGHT (c) 2002 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
*
* ------------------------------------------------------------------------------
*/
#if !defined(__DIAG_H__)
#define __DIAG_H__
#if defined(__cplusplus)
extern "C"
{
#endif /* end defined(__cplusplus) */
#include "type.h"
/**
* Pre-processor symbol and macro definitions.
*
*/
#if defined(DEBUG)
#define MSG(A,B,C,D) eprintf(A,B,C,D)
#else
#define MSG(A,B,C,D)
#endif
#define PTLONE 1
#define MEDIA_SLOWPORT_BASE (0xC4000000 + 0x2000000) // 0xC6000000
#define REGMAP_BASE MEDIA_SLOWPORT_BASE
#define REGMAP_BASE_SF (MEDIA_SLOWPORT_BASE + 0x800000)
#define PTLONE_DEVID 0x6
#define TBD 0x1
#define TX_PACKET_COUNT TBD
#define SEND_FRAME_FLAG_BASE TBD
#define SEND_FRAME_FLAG_VAL 0xFFFF
#define FRAME64_FLAG 0x1111
#define CRC_FLAG 0x2222
#define NOCRC_FLAG 0x3333
#define SHORT_FLAG 0x4444
#define FRAME160_FLAG 0x5555
#define EGRESS 0xFFFF
#define INGRESS 0xAAAA
#define SYS_IMAGE 0x1
#define POS_IMAGE 0x2
#define LR_IMAGE 0x3
#define PORTSZ 0x80
#define START_MAC_TEST_BIT 32
/* yet to finalize the scratch location */
#define START_TEST_OFFSET TBD
#define TEST_TYPE_OFFSET TBD
#define DRAM_BASE_TX_FRAME 0x1000000
#define DRAM_BASE_RX_FRAME 0x2000000
#define SCRATCH_ADDR_OFF 0x200
#define RX_SRAM_BASE 0x400000
/* This is the bit no. in the mailox used to indicate the microcode
image that is to be downloaded.
*/
#define POS_BIT 7
#define PKTCOUNT_ADDR TBD /* This is the packet count address,
updated by the rx/tx engines */
#define NUM_FRAMES 10 /* this is the no. of frames used per test */
#define LOOP 5 /* No. of frames sent out from Xscale */
#define PACKET_SIZE 64
#define TIMEOUT 15 /* duration for which master poll's on slave's mailbox */
#define PTLONE_MEDIA_LOOPBACK_TX_ME 0
#define PTLONE_MEDIA_LOOPBACK_RX_ME 0
#define INVALID_PARAMETERS 0xEE
/**** to be undefined for MPHY mode **/
//#define SPHY4x8
/**
* Type definitions.
*/
typedef struct _ConfigData {
UINT32 reg_addr; /* register offset */
UINT32 config_val; /* data value to be set in register */
short flag; /* flag = 0 => per port reg.
flag = 1 => global reg. */
} configData;
/**
* Prototypes for interface functions.
*/
/**
* Exported variables.
*/
#if defined(__cplusplus)
}
#endif /* end defined(__cplusplus) */
#endif /* end !defined(__DIAG_H__) */
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -