⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 bridge.h

📁 自己根据lkd和情境分析
💻 H
📖 第 1 页 / 共 5 页
字号:
#define berr_field	berr_un.berr_st#endif				/* LANGUAGE_C *//* * The values of these macros can and should be crosschecked * regularly against the offsets of the like-named fields * within the "bridge_t" structure above. *//* Byte offset macros for Bridge internal registers */#define BRIDGE_WID_ID		WIDGET_ID#define BRIDGE_WID_STAT		WIDGET_STATUS#define BRIDGE_WID_ERR_UPPER	WIDGET_ERR_UPPER_ADDR#define BRIDGE_WID_ERR_LOWER	WIDGET_ERR_LOWER_ADDR#define BRIDGE_WID_CONTROL	WIDGET_CONTROL#define BRIDGE_WID_REQ_TIMEOUT	WIDGET_REQ_TIMEOUT#define BRIDGE_WID_INT_UPPER	WIDGET_INTDEST_UPPER_ADDR#define BRIDGE_WID_INT_LOWER	WIDGET_INTDEST_LOWER_ADDR#define BRIDGE_WID_ERR_CMDWORD	WIDGET_ERR_CMD_WORD#define BRIDGE_WID_LLP		WIDGET_LLP_CFG#define BRIDGE_WID_TFLUSH	WIDGET_TFLUSH#define BRIDGE_WID_AUX_ERR	0x00005C	/* Aux Error Command Word */#define BRIDGE_WID_RESP_UPPER	0x000064	/* Response Buf Upper Addr */#define BRIDGE_WID_RESP_LOWER	0x00006C	/* Response Buf Lower Addr */#define BRIDGE_WID_TST_PIN_CTRL 0x000074	/* Test pin control */#define BRIDGE_DIR_MAP		0x000084	/* Direct Map reg *//* Bridge has SSRAM Parity Error and Xbridge has Map Fault here */#define BRIDGE_RAM_PERR 	0x000094	/* SSRAM Parity Error */#define BRIDGE_MAP_FAULT	0x000094	/* Map Fault */#define BRIDGE_ARB		0x0000A4	/* Arbitration Priority reg */#define BRIDGE_NIC		0x0000B4	/* Number In A Can */#define BRIDGE_BUS_TIMEOUT	0x0000C4	/* Bus Timeout Register */#define BRIDGE_PCI_BUS_TIMEOUT	BRIDGE_BUS_TIMEOUT#define BRIDGE_PCI_CFG		0x0000CC	/* PCI Type 1 Config reg */#define BRIDGE_PCI_ERR_UPPER	0x0000D4	/* PCI error Upper Addr */#define BRIDGE_PCI_ERR_LOWER	0x0000DC	/* PCI error Lower Addr */#define BRIDGE_INT_STATUS	0x000104	/* Interrupt Status */#define BRIDGE_INT_ENABLE	0x00010C	/* Interrupt Enables */#define BRIDGE_INT_RST_STAT	0x000114	/* Reset Intr Status */#define BRIDGE_INT_MODE		0x00011C	/* Interrupt Mode */#define BRIDGE_INT_DEVICE	0x000124	/* Interrupt Device */#define BRIDGE_INT_HOST_ERR	0x00012C	/* Host Error Field */#define BRIDGE_INT_ADDR0	0x000134	/* Host Address Reg */#define BRIDGE_INT_ADDR_OFF	0x000008	/* Host Addr offset (1..7) */#define BRIDGE_INT_ADDR(x)	(BRIDGE_INT_ADDR0+(x)*BRIDGE_INT_ADDR_OFF)#define BRIDGE_INT_VIEW		0x000174	/* Interrupt view */#define BRIDGE_MULTIPLE_INT	0x00017c	/* Multiple interrupt occurred */#define BRIDGE_FORCE_ALWAYS0	0x000184	/* Force an interrupt (always)*/#define BRIDGE_FORCE_ALWAYS_OFF 0x000008	/* Force Always offset */#define BRIDGE_FORCE_ALWAYS(x)  (BRIDGE_FORCE_ALWAYS0+(x)*BRIDGE_FORCE_ALWAYS_OFF)#define BRIDGE_FORCE_PIN0	0x0001c4	/* Force an interrupt */#define BRIDGE_FORCE_PIN_OFF 	0x000008	/* Force Pin offset */#define BRIDGE_FORCE_PIN(x)  (BRIDGE_FORCE_PIN0+(x)*BRIDGE_FORCE_PIN_OFF)#define BRIDGE_DEVICE0		0x000204	/* Device 0 */#define BRIDGE_DEVICE_OFF	0x000008	/* Device offset (1..7) */#define BRIDGE_DEVICE(x)	(BRIDGE_DEVICE0+(x)*BRIDGE_DEVICE_OFF)#define BRIDGE_WR_REQ_BUF0	0x000244	/* Write Request Buffer 0 */#define BRIDGE_WR_REQ_BUF_OFF	0x000008	/* Buffer Offset (1..7) */#define BRIDGE_WR_REQ_BUF(x)	(BRIDGE_WR_REQ_BUF0+(x)*BRIDGE_WR_REQ_BUF_OFF)#define BRIDGE_EVEN_RESP	0x000284	/* Even Device Response Buf */#define BRIDGE_ODD_RESP		0x00028C	/* Odd Device Response Buf */#define BRIDGE_RESP_STATUS	0x000294	/* Read Response Status reg */#define BRIDGE_RESP_CLEAR	0x00029C	/* Read Response Clear reg */#define BRIDGE_BUF_ADDR_UPPER0	0x000304#define BRIDGE_BUF_ADDR_UPPER_OFF 0x000010	/* PCI Buffer Upper Offset */#define BRIDGE_BUF_ADDR_UPPER(x) (BRIDGE_BUF_ADDR_UPPER0+(x)*BRIDGE_BUF_ADDR_UPPER_OFF)#define BRIDGE_BUF_ADDR_LOWER0	0x00030c#define BRIDGE_BUF_ADDR_LOWER_OFF 0x000010	/* PCI Buffer Upper Offset */#define BRIDGE_BUF_ADDR_LOWER(x) (BRIDGE_BUF_ADDR_LOWER0+(x)*BRIDGE_BUF_ADDR_LOWER_OFF)/*  * Performance Monitor Registers. * * The Performance registers are those registers which are associated with * monitoring the performance of PCI generated reads to the host environ * ment. Because of the size of the register file only the even registers * were instrumented. */#define BRIDGE_BUF_OFF 0x40#define BRIDGE_BUF_NEXT(base, off) (base+((off)*BRIDGE_BUF_OFF))/* * Buffer (x) Flush Count with Data Touch Register. * * This counter is incremented each time the corresponding response buffer * is flushed after at least a single data element in the buffer is used. * A word write to this address clears the count. */#define BRIDGE_BUF_0_FLUSH_TOUCH  0x000404#define BRIDGE_BUF_2_FLUSH_TOUCH  BRIDGE_BUF_NEXT(BRIDGE_BUF_0_FLUSH_TOUCH, 1)#define BRIDGE_BUF_4_FLUSH_TOUCH  BRIDGE_BUF_NEXT(BRIDGE_BUF_0_FLUSH_TOUCH, 2)#define BRIDGE_BUF_6_FLUSH_TOUCH  BRIDGE_BUF_NEXT(BRIDGE_BUF_0_FLUSH_TOUCH, 3)#define BRIDGE_BUF_8_FLUSH_TOUCH  BRIDGE_BUF_NEXT(BRIDGE_BUF_0_FLUSH_TOUCH, 4)#define BRIDGE_BUF_10_FLUSH_TOUCH  BRIDGE_BUF_NEXT(BRIDGE_BUF_0_FLUSH_TOUCH, 5)#define BRIDGE_BUF_12_FLUSH_TOUCH  BRIDGE_BUF_NEXT(BRIDGE_BUF_0_FLUSH_TOUCH, 6)#define BRIDGE_BUF_14_FLUSH_TOUCH  BRIDGE_BUF_NEXT(BRIDGE_BUF_0_FLUSH_TOUCH, 7)/* * Buffer (x) Flush Count w/o Data Touch Register * * This counter is incremented each time the corresponding response buffer * is flushed without any data element in the buffer being used. A word * write to this address clears the count. */#define BRIDGE_BUF_0_FLUSH_NOTOUCH  0x00040c#define BRIDGE_BUF_2_FLUSH_NOTOUCH  BRIDGE_BUF_NEXT(BRIDGE_BUF_0_FLUSH_NOTOUCH, 1)#define BRIDGE_BUF_4_FLUSH_NOTOUCH  BRIDGE_BUF_NEXT(BRIDGE_BUF_0_FLUSH_NOTOUCH, 2)#define BRIDGE_BUF_6_FLUSH_NOTOUCH  BRIDGE_BUF_NEXT(BRIDGE_BUF_0_FLUSH_NOTOUCH, 3)#define BRIDGE_BUF_8_FLUSH_NOTOUCH  BRIDGE_BUF_NEXT(BRIDGE_BUF_0_FLUSH_NOTOUCH, 4)#define BRIDGE_BUF_10_FLUSH_NOTOUCH  BRIDGE_BUF_NEXT(BRIDGE_BUF_0_FLUSH_NOTOUCH, 5)#define BRIDGE_BUF_12_FLUSH_NOTOUCH  BRIDGE_BUF_NEXT(BRIDGE_BUF_0_FLUSH_NOTOUCH, 6)#define BRIDGE_BUF_14_FLUSH_NOTOUCH  BRIDGE_BUF_NEXT(BRIDGE_BUF_0_FLUSH_NOTOUCH, 7)/* * Buffer (x) Request in Flight Count Register * * This counter is incremented on each bus clock while the request is in * flight. A word write to this address clears the count. */#define BRIDGE_BUF_0_INFLIGHT	 0x000414#define BRIDGE_BUF_2_INFLIGHT    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_INFLIGHT, 1)#define BRIDGE_BUF_4_INFLIGHT    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_INFLIGHT, 2)#define BRIDGE_BUF_6_INFLIGHT    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_INFLIGHT, 3)#define BRIDGE_BUF_8_INFLIGHT    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_INFLIGHT, 4)#define BRIDGE_BUF_10_INFLIGHT   BRIDGE_BUF_NEXT(BRIDGE_BUF_0_INFLIGHT, 5)#define BRIDGE_BUF_12_INFLIGHT   BRIDGE_BUF_NEXT(BRIDGE_BUF_0_INFLIGHT, 6)#define BRIDGE_BUF_14_INFLIGHT   BRIDGE_BUF_NEXT(BRIDGE_BUF_0_INFLIGHT, 7)/* * Buffer (x) Prefetch Request Count Register * * This counter is incremented each time the request using this buffer was * generated from the prefetcher. A word write to this address clears the * count. */#define BRIDGE_BUF_0_PREFETCH	 0x00041C#define BRIDGE_BUF_2_PREFETCH    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_PREFETCH, 1)#define BRIDGE_BUF_4_PREFETCH    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_PREFETCH, 2)#define BRIDGE_BUF_6_PREFETCH    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_PREFETCH, 3)#define BRIDGE_BUF_8_PREFETCH    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_PREFETCH, 4)#define BRIDGE_BUF_10_PREFETCH   BRIDGE_BUF_NEXT(BRIDGE_BUF_0_PREFETCH, 5)#define BRIDGE_BUF_12_PREFETCH   BRIDGE_BUF_NEXT(BRIDGE_BUF_0_PREFETCH, 6)#define BRIDGE_BUF_14_PREFETCH   BRIDGE_BUF_NEXT(BRIDGE_BUF_0_PREFETCH, 7)/* * Buffer (x) Total PCI Retry Count Register * * This counter is incremented each time a PCI bus retry occurs and the ad * dress matches the tag for the selected buffer. The buffer must also has * this request in-flight. A word write to this address clears the count. */#define BRIDGE_BUF_0_PCI_RETRY	 0x000424#define BRIDGE_BUF_2_PCI_RETRY    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_PCI_RETRY, 1)#define BRIDGE_BUF_4_PCI_RETRY    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_PCI_RETRY, 2)#define BRIDGE_BUF_6_PCI_RETRY    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_PCI_RETRY, 3)#define BRIDGE_BUF_8_PCI_RETRY    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_PCI_RETRY, 4)#define BRIDGE_BUF_10_PCI_RETRY   BRIDGE_BUF_NEXT(BRIDGE_BUF_0_PCI_RETRY, 5)#define BRIDGE_BUF_12_PCI_RETRY   BRIDGE_BUF_NEXT(BRIDGE_BUF_0_PCI_RETRY, 6)#define BRIDGE_BUF_14_PCI_RETRY   BRIDGE_BUF_NEXT(BRIDGE_BUF_0_PCI_RETRY, 7)/* * Buffer (x) Max PCI Retry Count Register * * This counter is contains the maximum retry count for a single request * which was in-flight for this buffer. A word write to this address * clears the count. */#define BRIDGE_BUF_0_MAX_PCI_RETRY	 0x00042C#define BRIDGE_BUF_2_MAX_PCI_RETRY    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_MAX_PCI_RETRY, 1)#define BRIDGE_BUF_4_MAX_PCI_RETRY    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_MAX_PCI_RETRY, 2)#define BRIDGE_BUF_6_MAX_PCI_RETRY    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_MAX_PCI_RETRY, 3)#define BRIDGE_BUF_8_MAX_PCI_RETRY    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_MAX_PCI_RETRY, 4)#define BRIDGE_BUF_10_MAX_PCI_RETRY   BRIDGE_BUF_NEXT(BRIDGE_BUF_0_MAX_PCI_RETRY, 5)#define BRIDGE_BUF_12_MAX_PCI_RETRY   BRIDGE_BUF_NEXT(BRIDGE_BUF_0_MAX_PCI_RETRY, 6)#define BRIDGE_BUF_14_MAX_PCI_RETRY   BRIDGE_BUF_NEXT(BRIDGE_BUF_0_MAX_PCI_RETRY, 7)/* * Buffer (x) Max Latency Count Register * * This counter is contains the maximum count (in bus clocks) for a single * request which was in-flight for this buffer. A word write to this * address clears the count. */#define BRIDGE_BUF_0_MAX_LATENCY	 0x000434#define BRIDGE_BUF_2_MAX_LATENCY    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_MAX_LATENCY, 1)#define BRIDGE_BUF_4_MAX_LATENCY    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_MAX_LATENCY, 2)#define BRIDGE_BUF_6_MAX_LATENCY    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_MAX_LATENCY, 3)#define BRIDGE_BUF_8_MAX_LATENCY    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_MAX_LATENCY, 4)#define BRIDGE_BUF_10_MAX_LATENCY   BRIDGE_BUF_NEXT(BRIDGE_BUF_0_MAX_LATENCY, 5)#define BRIDGE_BUF_12_MAX_LATENCY   BRIDGE_BUF_NEXT(BRIDGE_BUF_0_MAX_LATENCY, 6)#define BRIDGE_BUF_14_MAX_LATENCY   BRIDGE_BUF_NEXT(BRIDGE_BUF_0_MAX_LATENCY, 7)/* * Buffer (x) Clear All Register * * Any access to this register clears all the count values for the (x) * registers. */#define BRIDGE_BUF_0_CLEAR_ALL	 0x00043C#define BRIDGE_BUF_2_CLEAR_ALL    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_CLEAR_ALL, 1)#define BRIDGE_BUF_4_CLEAR_ALL    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_CLEAR_ALL, 2)#define BRIDGE_BUF_6_CLEAR_ALL    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_CLEAR_ALL, 3)#define BRIDGE_BUF_8_CLEAR_ALL    BRIDGE_BUF_NEXT(BRIDGE_BUF_0_CLEAR_ALL, 4)#define BRIDGE_BUF_10_CLEAR_ALL   BRIDGE_BUF_NEXT(BRIDGE_BUF_0_CLEAR_ALL, 5)#define BRIDGE_BUF_12_CLEAR_ALL   BRIDGE_BUF_NEXT(BRIDGE_BUF_0_CLEAR_ALL, 6)#define BRIDGE_BUF_14_CLEAR_ALL   BRIDGE_BUF_NEXT(BRIDGE_BUF_0_CLEAR_ALL, 7)/* end of Performance Monitor Registers *//* Byte offset macros for Bridge I/O space */#define BRIDGE_ATE_RAM		0x00010000	/* Internal Addr Xlat Ram */#define BRIDGE_TYPE0_CFG_DEV0	0x00020000	/* Type 0 Cfg, Device 0 */#define BRIDGE_TYPE0_CFG_SLOT_OFF	0x00001000	/* Type 0 Cfg Slot Offset (1..7) */#define BRIDGE_TYPE0_CFG_FUNC_OFF	0x00000100	/* Type 0 Cfg Func Offset (1..7) */#define BRIDGE_TYPE0_CFG_DEV(s)		(BRIDGE_TYPE0_CFG_DEV0+\					 (s)*BRIDGE_TYPE0_CFG_SLOT_OFF)#define BRIDGE_TYPE0_CFG_DEVF(s,f)	(BRIDGE_TYPE0_CFG_DEV0+\					 (s)*BRIDGE_TYPE0_CFG_SLOT_OFF+\					 (f)*BRIDGE_TYPE0_CFG_FUNC_OFF)#define BRIDGE_TYPE1_CFG	0x00028000	/* Type 1 Cfg space */#define BRIDGE_PCI_IACK		0x00030000	/* PCI Interrupt Ack */#define BRIDGE_EXT_SSRAM	0x00080000	/* Extern SSRAM (ATE) *//* Byte offset macros for Bridge device IO spaces */#define BRIDGE_DEV_CNT		8	/* Up to 8 devices per bridge */#define BRIDGE_DEVIO0		0x00200000	/* Device IO 0 Addr */#define BRIDGE_DEVIO1		0x00400000	/* Device IO 1 Addr */#define BRIDGE_DEVIO2		0x00600000	/* Device IO 2 Addr */#define BRIDGE_DEVIO_OFF	0x00100000	/* Device IO Offset (3..7) */#define BRIDGE_DEVIO_2MB	0x00200000	/* Device IO Offset (0..1) */#define BRIDGE_DEVIO_1MB	0x00100000	/* Device IO Offset (2..7) */#if	LANGUAGE_C#define BRIDGE_DEVIO(x)		((x)<=1 ? BRIDGE_DEVIO0+(x)*BRIDGE_DEVIO_2MB : BRIDGE_DEVIO2+((x)-2)*BRIDGE_DEVIO_1MB)#endif				/* LANGUAGE_C */#define BRIDGE_EXTERNAL_FLASH	0x00C00000	/* External Flash PROMS *//* ======================================================================== *    Bridge register bit field definitions *//* Widget part number of bridge */#define BRIDGE_WIDGET_PART_NUM		0xc002#define XBRIDGE_WIDGET_PART_NUM		0xd002/* Manufacturer of bridge */#define BRIDGE_WIDGET_MFGR_NUM		0x036#define XBRIDGE_WIDGET_MFGR_NUM		0x024/* Revision numbers for known [X]Bridge revisions */#define BRIDGE_REV_A			0x1#define BRIDGE_REV_B			0x2#define BRIDGE_REV_C			0x3#define	BRIDGE_REV_D			0x4#define XBRIDGE_REV_A			0x1#define XBRIDGE_REV_B			0x2/* Part + Rev numbers allows distinction and acscending sequence */#define BRIDGE_PART_REV_A	(BRIDGE_WIDGET_PART_NUM << 4 | BRIDGE_REV_A)#define BRIDGE_PART_REV_B	(BRIDGE_WIDGET_PART_NUM << 4 | BRIDGE_REV_B)#define BRIDGE_PART_REV_C	(BRIDGE_WIDGET_PART_NUM << 4 | BRIDGE_REV_C)#define	BRIDGE_PART_REV_D	(BRIDGE_WIDGET_PART_NUM << 4 | BRIDGE_REV_D)#define XBRIDGE_PART_REV_A	(XBRIDGE_WIDGET_PART_NUM << 4 | XBRIDGE_REV_A)#define XBRIDGE_PART_REV_B	(XBRIDGE_WIDGET_PART_NUM << 4 | XBRIDGE_REV_B)/* Bridge widget status register bits definition */#define BRIDGE_STAT_LLP_REC_CNT		(0xFFu << 24)#define BRIDGE_STAT_LLP_TX_CNT		(0xFF << 16)#define BRIDGE_STAT_FLASH_SELECT	(0x1 << 6)#define BRIDGE_STAT_PCI_GIO_N		(0x1 << 5)#define BRIDGE_STAT_PENDING		(0x1F << 0)/* Bridge widget control register bits definition */#define BRIDGE_CTRL_FLASH_WR_EN		(0x1ul << 31)#define BRIDGE_CTRL_EN_CLK50		(0x1 << 30)#define BRIDGE_CTRL_EN_CLK40		(0x1 << 29)#define BRIDGE_CTRL_EN_CLK33		(0x1 << 28)#define BRIDGE_CTRL_RST(n)		((n) << 24)#define BRIDGE_CTRL_RST_MASK		(BRIDGE_CTRL_RST(0xF))#define BRIDGE_CTRL_RST_PIN(x)		(BRIDGE_CTRL_RST(0x1 << (x)))#define BRIDGE_CTRL_IO_SWAP		(0x1 << 23)

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -