亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關于我們
? 蟲蟲下載站

?? usbpcistub.c

?? WINDRIVER MCP750 BSP
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* usbPciStub.c - System-specific PCI Functions *//* Copyright 1999-2002 Wind River Systems, Inc. *//*Modification history--------------------01k,20mar02,mil  Changed prototypes that cause USB attach failure. (SPR #74545)01j,04dec01,mil  Added support for mcpn750 and cleaned up compiler warnings.01i,17jul01,wef  moved pci stubs from comps/src into the bsp and changed name 		 from stub<arch>UsbPciLib.c to usbPciStub.c01h,17may00,wef  created for ppc bsps from usbPciStub.c in T301g,17apr00,wef  in executing 01f, some lines were left out.  replaced them01f,10apr00,wef  change usrUsbPciLib.c to bsp specific stubs to 		 remove bsp dependency01e,08mar00,rcb  Correct prototype for usbPciMemioOffset()...		 was incorrectly called usbPciMemOffset().01d,07mar00,rcb  Add support for MIPS R5000 platform.01c,10dec99,rcb  Add definition for usbPciMemioOffset().  Add conditional		 code to differentiate mcp750 and mtx604.01b,05dec99,rcb  Add code in usbPciIntConnect() and usbPciIntRestore() to		 maintain usage counts for each interrupt number.  This allows		 multiple callers to share a single interrupt.01a,31may99,rcb  First.*//*DESCRIPTIONThis file defines platform-independent functions accessing PCI bus capabilities.  These functions allow PCI device drivers to be written independent of the underlying O/S's PCI access mechanisms.The name of each function in this group begins with "usb" to represent"Device Driver Services."*//* Includes */#include "vxWorks.h"#include "string.h"#include "sysLib.h"#include "cacheLib.h"#include "iv.h"#include "intLib.h"#include "drv/pci/pciConfigLib.h"       /* VxWorks PCI funcs */#include "usb/usbPlatform.h"            /* Basic definitions */#include "usb/usbPciLib.h"              /* Our API *//* Power PC 604 (mcp750/mcpn750 & mtx604) *//* Mappings for I/O and memory address translation (values from [bsp].h) */#define PCI_IO_OFFSET           ISA_MSTR_IO_LOCAL#define PCI_MEM_OFFSET          PCI2DRAM_BASE_ADRS#define PCI_MEMIO_OFFSET        PCI_MSTR_MEMIO_LOCAL -  PCI_MSTR_MEMIO_BUS/* The mcp750 doesn't define sysInWord, sysInLong, sysOutWord, and * sysOutLong.	It includes the following entry points instead for which * there is no vxWorks function prototype.  We include the following * definitions in order to suppress compiler warnings. */IMPORT UINT16 sysIn16  (UINT16 *);IMPORT UINT32 sysIn32  (UINT32 *);IMPORT void   sysOut16 (UINT16 *, UINT16);IMPORT void   sysOut32 (UINT32 *, UINT32);/* Map the "standard" vxworks I/O functions to the mcp750 equivalents */#define sysInWord(p)	 (USHORT)sysIn16(  (UINT16 *) (p) )#define sysInLong(p)	 (UINT32)sysIn32(  (UINT32 *) (p) )#define sysOutWord(p,d)          sysOut16( (UINT16 *) (p), (UINT16) (d) )#define sysOutLong(p,d)          sysOut32( (UINT32 *) (p), (UINT32) (d) )/* Interrupt enable/disable */#if defined(MCP750) || defined(MCPN750)#define INTERRUPT_BASE	ISA_INTERRUPT_BASE#else	#define INTERRUPT_BASE	EXT_INTERRUPT_BASE#endif  /* MCP750 || MCPN750 */#define IVEC(i)	 INUM_TO_IVEC ((int) ((i) + INTERRUPT_BASE))#define INT_CONNECT(intNo, func, param) \    intConnect (IVEC (intNo), (VOIDFUNCPTR) func, (int) param)#define INT_DISCONNECT(intNo, func, param)#define INT_ENABLE(i)	intEnable ((i) + INTERRUPT_BASE)#define INT_DISABLE(i)	intDisable ((i) + INTERRUPT_BASE)/* Map I/O functions to underlying system functions. */#define	OUR_PCI_IN_BYTE(a)		sysInByte ((a) + PCI_IO_OFFSET)#define	OUR_PCI_IN_WORD(a)		sysInWord ((a) + PCI_IO_OFFSET)#define	OUR_PCI_IN_DWORD(a)		sysInLong ((a) + PCI_IO_OFFSET)#define	OUR_PCI_OUT_BYTE(a,v)	sysOutByte ((a) + PCI_IO_OFFSET, (v))#define	OUR_PCI_OUT_WORD(a,v)	sysOutWord ((a) + PCI_IO_OFFSET, (v))#define	OUR_PCI_OUT_DWORD(a,v)	sysOutLong ((a) + PCI_IO_OFFSET, (v))/* code tracks usage count for interrupts 0..MAX_INT_NO-1. */#define MAX_INT_NO		16/* locals */LOCAL UINT16 intUsage [MAX_INT_NO] = {0};/***************************************************************************** usbPciClassFind - Locates PCI devices by class.** A caller uses this function to locate a PCI device by its PCI class.* The caller must specify the <pciClass>, <subClass>, and <pgmIf> for the* device being sought.	The function returns the first matching device* for <index> = 0, the second for <index> = 1, and so forth.  The* bus number, device number, and function number for the matching device * are returned in the <pBusNo>, <pDeviceNo>, and <pFuncNo> buffers provided * by the caller. *** RETURNS: TRUE if matching device found*	   FALSE if device not found*/BOOL usbPciClassFind    (    UINT8 pciClass,		/* PCI device class */    UINT8 subClass,		/* PCI device sub-class */    UINT8 pgmIf,		/* Programming interface */    UINT16 index,		/* Caller wants nth matching dev */    pUINT8 pBusNo,		/* Bus number of matching dev */    pUINT8 pDeviceNo,		/* Device number of matching dev */    pUINT8 pFuncNo		/* Function number of matching dev */    )    {    int intBusNo;		/* VxWorks returns "int" values */    int intDeviceNo;    int intFuncNo;        /* Use the VxWorks PCI config. library to find a device within the    specified class. */    if (pciFindClass ((pciClass << 16) | (subClass << 8) | pgmIf, index,	&intBusNo, &intDeviceNo, &intFuncNo) != OK)	{	return FALSE;	}    else	{	if (pBusNo) *pBusNo = (UINT8) intBusNo;	if (pDeviceNo) *pDeviceNo = (UINT8) intDeviceNo;	if (pFuncNo) *pFuncNo = (UINT8) intFuncNo;	}    return TRUE;    }/***************************************************************************** usbPciByteGet - Returns a UINT8 configuration value** This function returns the UINT8 value at offset <regOffset> from * the PCI configuration space of the device identified by <busNo>, * <deviceNo>, and <funcNo>.** RETURNS: UINT8 value read from device configuration space*/UINT8 usbPciByteGet     (    UINT8 busNo,		/* Bus number of device */    UINT8 deviceNo,		/* Device number of device */    UINT8 funcNo,		/* Function number of device */    UINT16 regOffset		/* Offset into PCI config space */    )    {    UINT8 value;    if (pciConfigInByte (busNo, deviceNo, funcNo, regOffset, &value) != OK)	return 0;    return value;    }/***************************************************************************** usbPciWordGet - Returns a UINT16 configuration value** This function returns the UINT16 value at offset <regOffset> from * the PCI configuration space of the device identified by <busNo>, * <deviceNo>, and <funcNo>.** NOTE: This function adjusts for big vs. little endian environments.** RETURNS: UINT16 value read from device configuration space*/UINT32 usbPciWordGet    (    UINT8 busNo,		/* Bus number of device */    UINT8 deviceNo,		/* Device number of device */    UINT8 funcNo,		/* Function number of device */    UINT16 regOffset		/* Offset into PCI config space */    )    {    UINT16 value;    if (pciConfigInWord (busNo, deviceNo, funcNo, regOffset, &value) != OK)	return 0;    return value;    }/***************************************************************************** usbPciDwordGet - Returns a UINT32 configuration value** This function returns the UINT32 value at offset <regOffset> from * the PCI configuration space of the device identified by <busNo>, * <deviceNo>, and <funcNo>.** NOTE: This function adjusts for big vs. little endian environments.** RETURNS: UINT32 value read from device configuration space*/UINT32 usbPciDwordGet    (    UINT8 busNo,		/* Bus number of device */    UINT8 deviceNo,		/* Device number of device */    UINT8 funcNo,		/* Function number of device */    UINT16 regOffset		/* Offset into PCI config space */    )    {    UINT32 value;    if (pciConfigInLong (busNo, deviceNo, funcNo, regOffset, &value) != OK)	return 0;    return value;    }/***************************************************************************** usbPciConfigHeaderGet - Reads a device's PCI configuration header** This function reads the PCI configuration header for the device* identified by <busNo>, <deviceNo>, and <funcNo>.  The configuration* header is stored in the <pCfgHdr> buffer provided by the caller.** This function initializes the <pCfgHdr> structure to zeros.  Any * fields which cannot be read from the device's configuration header * will remain zero upon return.  This function does not attempt to read* fields defined as "reserved" in the PCI configuration header.** RETURNS: N/A*/VOID usbPciConfigHeaderGet    (    UINT8 busNo,		/* Bus number of device */    UINT8 deviceNo,		/* Device number of device */    UINT8 funcNo,		/* Function number of device */    pPCI_CFG_HEADER pCfgHdr	/* Buffer provided by caller */    )    {    int i;    /* Do nothing if CfgHdr is NULL */    if (pCfgHdr == NULL)	return;    /* Initialize the buffer to zeros. */    memset (pCfgHdr, 0, sizeof (*pCfgHdr));    /* Read and store each field in the PCI configuration header. */    pCfgHdr->vendorId	= usbPciWordGet (busNo, deviceNo, funcNo, PCI_CFG_VENDOR_ID);    pCfgHdr->deviceId	= usbPciWordGet (busNo, deviceNo, funcNo, PCI_CFG_DEVICE_ID);    pCfgHdr->command	= usbPciWordGet (busNo, deviceNo, funcNo, PCI_CFG_COMMAND);    pCfgHdr->status	= usbPciWordGet (busNo, deviceNo, funcNo, PCI_CFG_STATUS);    pCfgHdr->revisionId = usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_REVISION);    pCfgHdr->pgmIf	= usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_PROGRAMMING_IF);    pCfgHdr->subClass	= usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_SUBCLASS);    pCfgHdr->pciClass	= usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_CLASS);    pCfgHdr->cacheLineSize = usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_CACHE_LINE_SIZE);    pCfgHdr->latencyTimer = usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_LATENCY_TIMER);    pCfgHdr->headerType = usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_HEADER_TYPE);    pCfgHdr->bist	= usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_BIST);    for (i = 0; i < PCI_CFG_NUM_BASE_REG; i++)	pCfgHdr->baseReg [i] = usbPciDwordGet (busNo, deviceNo, funcNo, 	    PCI_CFG_BASE_ADDRESS_0 + i * sizeof (UINT32));    pCfgHdr->romBase	= usbPciDwordGet (busNo, deviceNo, funcNo, PCI_CFG_EXPANSION_ROM);    pCfgHdr->intLine	= usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_DEV_INT_LINE);    pCfgHdr->intPin	= usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_DEV_INT_PIN);    pCfgHdr->minGrant	= usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_MIN_GRANT);    pCfgHdr->maxLatency = usbPciByteGet (busNo, deviceNo, funcNo, PCI_CFG_MAX_LATENCY);    }

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国内精品写真在线观看| 国产成人亚洲综合a∨婷婷| 久久精品国产**网站演员| av综合在线播放| 26uuuu精品一区二区| 一区二区三区不卡视频| 成人毛片老司机大片| 精品第一国产综合精品aⅴ| 亚洲成av人片在线| 91免费精品国自产拍在线不卡| 欧美一级黄色大片| 亚洲国产成人av网| 99久久综合99久久综合网站| 久久这里只精品最新地址| 手机精品视频在线观看| 在线亚洲人成电影网站色www| 欧美激情一区二区在线| 国内精品在线播放| 精品国产伦理网| 精品一区二区免费视频| 欧美精品一二三| 五月天中文字幕一区二区| 在线免费精品视频| 一级精品视频在线观看宜春院 | 亚洲成av人片一区二区三区| 99久久综合精品| 一区在线观看免费| 福利一区二区在线| 国产精品久久久久久福利一牛影视| 国产一区91精品张津瑜| 精品av久久707| 国产一区二区三区四| 欧美精品一区男女天堂| 精品亚洲免费视频| 亚洲精品一区二区三区福利| 国产又黄又大久久| 久久久噜噜噜久噜久久综合| 国产91精品一区二区麻豆亚洲| 中文av一区特黄| 91老师国产黑色丝袜在线| 亚洲精品一二三四区| 欧美日韩一区二区在线观看视频| 五月激情六月综合| 精品裸体舞一区二区三区| 麻豆精品久久精品色综合| 日韩一区二区免费电影| 国产精品一区二区视频| 国产精品免费人成网站| 色婷婷亚洲精品| 琪琪久久久久日韩精品| 国产日韩欧美综合一区| 日本韩国一区二区| 青娱乐精品视频| 久久久www成人免费毛片麻豆 | 亚洲天堂福利av| 在线免费观看日本一区| 久久精品国产99久久6| 国产精品福利一区二区三区| 欧美日韩午夜影院| 国产高清久久久久| 亚洲亚洲精品在线观看| 精品美女一区二区三区| 91丨九色丨尤物| 麻豆视频观看网址久久| 国产精品成人在线观看| 91麻豆精品国产91久久久使用方法 | 亚洲特黄一级片| 欧美一卡二卡三卡四卡| 成人av手机在线观看| 日韩高清在线一区| 136国产福利精品导航| 91精品国产色综合久久| 9l国产精品久久久久麻豆| 青青草97国产精品免费观看无弹窗版| 国产精品久久久爽爽爽麻豆色哟哟| 欧洲精品视频在线观看| 国产一区二区三区在线观看精品| 亚洲女厕所小便bbb| 免费久久精品视频| 日韩亚洲欧美一区| 国产综合色产在线精品| 亚洲欧美电影一区二区| 欧美大片免费久久精品三p| 成人免费高清在线观看| 日韩不卡一二三区| 中文字幕一区av| 91精品国产入口| 99久久久国产精品| 麻豆91在线播放免费| 一区二区三区在线视频观看| 欧美激情一区二区三区| 精品91自产拍在线观看一区| 91精品国产91综合久久蜜臀| 一本一道久久a久久精品综合蜜臀| 国产一二精品视频| 日精品一区二区三区| 亚洲亚洲精品在线观看| 亚洲激情图片一区| 中文字幕一区二区三区不卡| 国产亚洲女人久久久久毛片| 717成人午夜免费福利电影| 911精品国产一区二区在线| 成人激情图片网| 国产成人精品在线看| 裸体歌舞表演一区二区| 日韩精品成人一区二区在线| 亚洲综合一区二区三区| 国产精品久久久久aaaa| 国产精品欧美久久久久一区二区| 久久久亚洲高清| 精品国产一区二区三区不卡| 精品国产区一区| 久久精品在这里| 精品国产精品网麻豆系列| 日韩精品专区在线| 欧美大胆一级视频| 久久精品视频在线免费观看| 国产欧美一区二区精品婷婷| 国产精品久久影院| 中文字幕一区二区三区在线不卡| 亚洲视频一区二区在线观看| 夜夜精品视频一区二区| 亚洲成人综合在线| 日韩成人一区二区| 正在播放一区二区| 欧美性大战久久久| 3d成人h动漫网站入口| 69av一区二区三区| 日韩免费一区二区| 久久久久久久综合狠狠综合| 久久这里只有精品视频网| 久久新电视剧免费观看| 国产精品视频一二| 亚洲激情图片一区| 日韩精品乱码av一区二区| 日本aⅴ免费视频一区二区三区| 另类欧美日韩国产在线| 国产黄色91视频| 色哟哟精品一区| 日韩一区二区三区av| 中文字幕高清一区| 亚洲午夜精品在线| 久久精品国产亚洲高清剧情介绍| 国产成人无遮挡在线视频| 色婷婷国产精品久久包臀| 欧美一区二区三区成人| 欧美精品一区二区久久婷婷| 亚洲欧美日韩国产另类专区| 日韩不卡免费视频| av中文字幕一区| 日韩免费看网站| 一区二区三区日韩欧美精品| 久久电影网电视剧免费观看| eeuss影院一区二区三区| 欧美高清你懂得| 中文字幕不卡在线播放| 日韩精品色哟哟| av电影在线观看一区| 日韩欧美国产综合在线一区二区三区| 国产精品久久影院| 紧缚奴在线一区二区三区| 91农村精品一区二区在线| 26uuu另类欧美| 午夜精品aaa| 91蜜桃网址入口| xfplay精品久久| 视频一区中文字幕| 一本高清dvd不卡在线观看| 337p日本欧洲亚洲大胆精品| 亚洲高清久久久| 成人免费看片app下载| 欧美一区二区视频在线观看| 亚洲欧美日韩在线不卡| 国产精品一区二区在线播放| 欧美一区二视频| 午夜精品爽啪视频| 91老师国产黑色丝袜在线| 亚洲国产高清在线观看视频| 久久激情综合网| 日韩女同互慰一区二区| 污片在线观看一区二区| 色婷婷精品久久二区二区蜜臀av | 一本久道中文字幕精品亚洲嫩| 久久久亚洲高清| 精品伊人久久久久7777人| 制服.丝袜.亚洲.另类.中文| 亚洲午夜私人影院| 色狠狠av一区二区三区| 国产精品丝袜黑色高跟| 国产成人福利片| 久久久99精品免费观看| 黄色小说综合网站| 欧美xxxxx牲另类人与| 奇米精品一区二区三区在线观看 | 亚洲国产乱码最新视频| 不卡视频一二三四| 久久九九国产精品| 成人一区二区三区在线观看| 欧美国产精品专区| av电影在线观看一区|