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

? 歡迎來到蟲蟲下載站! | ?? 資源下載 ?? 資源專輯 ?? 關(guān)于我們
? 蟲蟲下載站

?? syspci.c

?? mpc5200 for bsp,it is have passed built.
?? C
字號(hào):
/* sysPci.c - Motorola 5200 PCI support *//* includes */#include "vxWorks.h"#include "logLib.h"#include "taskLib.h"#include "config.h"#ifdef  INCLUDE_PCI/* typedefs *//* local */#if defined(IS_ICECUBE) || defined (IS_ICECUBE_OLD)|| defined(IS_LITE5200B)LOCAL void *vectorTbl[] = { IV_IRQ0 };#elif defined(IS_CP2)LOCAL void *vectorTbl[] = { IV_IRQ0, IV_IRQ1, IV_IRQ2, IV_IRQ3 };#else# error#endif/* include source file */#include "drv/pci/pciConfigLib.h"#include "pci/pciConfigLib.c" /* PCI config space access */#include "pci/pciConfigShow.c" /* display of PCI config space */#if 0#ifdef INCLUDE_SHOW_ROUTINES#include "pci/pciConfigShow.c" /* display of PCI config space */#endif /* INCLUDE_SHOW_ROUTINES */#endif/* defines */#define PCICDR		((volatile UINT32 *)(CPU_PCI_IO_ADRS))/* forward declarations */LOCAL STATUS sysPciSpecialCycle (int busNo, UINT32 message);LOCAL STATUS sysPciConfigRead (int busNo, int deviceNo, int funcNo, int offset, int width, void * pData);LOCAL STATUS sysPciConfigWrite (int busNo, int deviceNo, int funcNo, int offset, int width, ULONG data);STATUS sysPciInit (void);/************************************************************************* sysPciSpecialCycle - generate a special cycle with a message** This routine generates a special cycle with a message.** NOMANUAL** RETURNS: OK*/LOCAL STATUS sysPciSpecialCycle    (    int		busNo,    UINT32	message    )    {    int deviceNo	= 0x0000001f;    int funcNo		= 0x00000007;    if (busNo != 0)	return ERROR;    *PCICAR = pciConfigBdfPack (busNo, deviceNo, funcNo) | 0x80000000;    PCI_OUT_LONG (PCICDR, message);    *PCICAR = 0;    return (OK);    }/************************************************************************* sysPciIntAck - generate an interrupt acknowlege  ** This routine generates an interrupt acknowledge ** NOMANUAL** RETURNS: OK*/int sysPciIntAck    (    int		busNo    )    {    int deviceNo	= 0x0000001f;    int funcNo		= 0x00000007;    int result;    if (busNo != 0)	return ERROR;    *PCICAR = pciConfigBdfPack (busNo, deviceNo, funcNo) | 0x80000000;    result = PCI_IN_LONG (PCICDR);    *PCICAR = 0;    return (result);    }/************************************************************************* sysPciConfigRead - read from the PCI configuration space** This routine reads either a byte, word or a long word specified by* the argument <width>, from the PCI configuration space* This routine works around a problem in the hardware which hangs* PCI bus if device no 12 is accessed from the PCI configuration space.** RETURNS: OK, or ERROR if this library is not initialized** SEE ALSO: sysPciConfigWrite()*/LOCAL STATUS sysPciConfigRead    (    int	busNo,    /* bus number */    int	deviceNo, /* device number */    int	funcNo,	  /* function number */    int	offset,	  /* offset into the configuration space */    int width,	  /* width to be read */    void * pData /* data read from the offset */    )    {    UINT8  retValByte = 0;    UINT16 retValWord = 0;    UINT32 retValLong = 0;    STATUS retStat = ERROR;    int status;#if 0	int key;    int oldMask;#endif    switch (width)        {        case 1:	/* byte */#if 0    	    oldMask = *PCIICR; *PCIICR  &= ~PCIICR_IAE;#endif            *PCICAR = pciConfigBdfPack (busNo, deviceNo, funcNo) | (offset & 0xfc) | 0x80000000;            retValByte = PCI_IN_BYTE (PCICDR + (offset & 0x3));            *PCICAR = 0;    	    status = *PCIISR;    	    *PCIISR = PCIISR_IA; /* clear */#if 0    	    *PCIICR = oldMask;#endif            *((UINT8 *)pData) = retValByte;	    retStat = ((status & PCIISR_IA) ? ERROR : OK);            break;        case 2: /* word */#if 0    	    oldMask = *PCIICR; *PCIICR  &= ~PCIICR_IAE; #endif            *PCICAR = pciConfigBdfPack (busNo, deviceNo, funcNo) | (offset & 0xfc) | 0x80000000;	    retValWord = PCI_IN_WORD (PCICDR + (offset & 0x2));            *PCICAR = 0;    	    status = *PCIISR;    	    *PCIISR = PCIISR_IA; /* clear */#if 0    	    *PCIICR = oldMask;#endif            *((UINT16 *)pData) = retValWord;	    retStat = ((status & PCIISR_IA) ? ERROR : OK);	    break;        case 4: /* long */#if 0    	    oldMask = *PCIICR; *PCIICR  &= ~PCIICR_IAE; #endif            *PCICAR = pciConfigBdfPack (busNo, deviceNo, funcNo) | (offset & 0xfc) | 0x80000000;	    retValLong = PCI_IN_LONG (PCICDR);            *PCICAR = 0;    	    status = *PCIISR;    	    *PCIISR = PCIISR_IA; /* clear */#if 0    	    *PCIICR = oldMask;#endif            *((UINT32 *)pData) = retValLong;	    retStat = ((status & PCIISR_IA) ? ERROR : OK);            break;        default:            retStat = ERROR;            break;        }    return retStat;    }/************************************************************************* sysPciConfigWrite - write to the PCI configuration space** This routine writes either a byte, word or a long word specified by* the argument <width>, to the PCI configuration space* This routine works around a problem in the hardware which hangs* PCI bus if device no 12 is accessed from the PCI configuration space.** RETURNS: OK, or ERROR if this library is not initialized** SEE ALSO: sysPciConfigRead()*/LOCAL STATUS sysPciConfigWrite    (    int	  busNo,    /* bus number */    int	  deviceNo, /* device number */    int	  funcNo,   /* function number */    int	  offset,   /* offset into the configuration space */    int   width,    /* width to write */    ULONG data	    /* data to write */    )    {    UINT32 status = OK;#if 0    int key;    int oldMask;#endif    if ((busNo == 0) && (deviceNo == 12))        return (ERROR);    switch (width)        {        case 1:	/* byte */#if 0    	    oldMask = *PCIICR; *PCIICR  &= ~PCIICR_IAE; #endif            *PCICAR = pciConfigBdfPack (busNo, deviceNo, funcNo) | (offset & 0xfc) | 0x80000000;	    PCI_OUT_BYTE ((PCICDR + (offset & 0x3)), data);            *PCICAR = 0;    	    status = *PCIISR;    	    *PCIISR = PCIISR_IA; /* clear */#if 0    	    *PCIICR = oldMask;#endif            break;        case 2: /* word */#if 0    	    oldMask = *PCIICR; *PCIICR  &= ~PCIICR_IAE; #endif            *PCICAR = pciConfigBdfPack (busNo, deviceNo, funcNo) | (offset & 0xfc) | 0x80000000;	    PCI_OUT_WORD ((PCICDR + (offset & 0x2)), data);            *PCICAR = 0;    	    status = *PCIISR;    	    *PCIISR = PCIISR_IA; /* clear */#if 0    	    *PCIICR = oldMask;#endif	    break;        case 4: /* long */#if 0    	    oldMask = *PCIICR; *PCIICR  &= ~PCIICR_IAE; #endif            *PCICAR = pciConfigBdfPack (busNo, deviceNo, funcNo) | (offset & 0xfc) | 0x80000000;	    PCI_OUT_LONG (PCICDR, data);            *PCICAR = 0;    	    status = *PCIISR;    	    *PCIISR = PCIISR_IA; /* clear */#if 0    	    *PCIICR = oldMask;#endif            break;        default:            return (ERROR);              }    return ((status & PCIISR_IA) ? ERROR : OK);    }void setInitiatorWindow (int nr, UINT32 cpuBase, UINT32 busBase, UINT32 size, UINT8 mode){	UINT32 cpu, bus, mask, btarValue;		if ((cpuBase & 0x00ffffff) != 0)		return;			if ((busBase & 0x00ffffff) != 0)		return;			cpu = cpuBase >> 24;	bus = busBase >> 24;	mask = (size >> 24) - 1;	btarValue = cpu<<24|mask<<16|bus<<8;        switch (nr) {    case 0:    	*PCIIW0BTAR = btarValue;		EIEIO;    	*PCIIWCR &= 0xf0ffffff;    	*PCIIWCR |= mode<<24;		EIEIO;    	break;    case 1:    	*PCIIW1BTAR = btarValue;		EIEIO;    	*PCIIWCR &= 0xfff0ffff;    	*PCIIWCR |= mode<<16;		EIEIO;    	break;    case 2:    	*PCIIW2BTAR = btarValue;		EIEIO;    	*PCIIWCR &= 0xfffff0ff;    	*PCIIWCR |= mode<<8;		EIEIO;    	break;    default:    	return;    }}  /************************************************************************* sysPciInit - PCI Configuration Library Initialization* * This routine initialize the PCI configuration library.** RETURNS: None*/STATUS sysPciInit    (    void    )    {    STATUS retVal;    int i;    /* set GPIO correctly -> enable PCI */   /* *GPIO_STD_PORTCFG &= ~GPIO_STD_PC_PCI_DISABLED; */	*GPIO_STD_PORTCFG &= ~0x8000;    /* MPC5200 is the PCI bus master */    *PCISCR |= PCISCR_B;    /* Set latency timer (minimum time the bus master can keep the bus after starting a        transaction */    *PCICR1 &= ~PCICR1_LAT_MASK;    *PCICR1 |= PCI_LAT_TIMER<<PCICR1_LAT_SHIFT;    EIEIO;    /* m5200 as target */#if (BUS_PCI_SLV_MEM_LOCAL_A & 0x0003FFFF)#   error#endif#if (BUS_PCI_SLV_MEM_LOCAL_A & 0x3FFFFFF)#   error#endif#if (CPU_PCI_SLV_MEM_LOCAL_A & 0x0003FFFF)#   error#endif#if (CPU_PCI_SLV_MEM_LOCAL_B & 0x3FFFFFFF)#   error#endif    *PCIBAR0   = BUS_PCI_SLV_MEM_LOCAL_A;    *PCIBAR1   = BUS_PCI_SLV_MEM_LOCAL_B;    *PCITBATR0 = CPU_PCI_SLV_MEM_LOCAL_A | 1; 	/* set address and enable */    *PCITBATR1 = CPU_PCI_SLV_MEM_LOCAL_B | 1; 	/* set address and enable */    /* m5200 as master */        /* Initiator 0 for 32 bit prefetch memory */    setInitiatorWindow (0, CPU_PCI_MEM_ADRS, BUS_PCI_MEM_ADRS, PCI_MEM_SIZE, PCIIWCR_ENABLE|PCIIWCR_MEM|PCIIWCR_READ_MULTI);    /* Initiator 1 for IO */    setInitiatorWindow (1, CPU_PCI_IO_ADRS, BUS_PCI_IO_ADRS, PCI_IO_SIZE, PCIIWCR_ENABLE|PCIIWCR_IO);    /* Initiator 2 for 32 bit non-prefetch memory */    setInitiatorWindow (2, CPU_PCI_NO_PRE_MEM_ADRS, BUS_PCI_NO_PRE_MEM_ADRS, PCI_NO_PRE_MEM_SIZE, PCIIWCR_ENABLE|PCIIWCR_MEM|PCIIWCR_READ_SINGLE);    /* mask interrupts here, retry count 256 */        *PCIICR = 0x000000FF;		/* disable CPU interrupt */        /* clear any pending int */        *PCIISR = PCIISR_RE|PCIISR_IA|PCIISR_TA;        /* disable config space IO */    *PCICAR = 0;    /* clear pending errors, mask interrupts, deassert reset */    *PCIGSCR = PCIGSCR_BM|PCIGSCR_PE|PCIGSCR_SE;    *PCIARB = PCIARB_RESET; /* reset arbiter */    for (i=0; i<100000;i++) ;    *PCIARB = 0;#if defined(IS_LITE5200B) 	/* LITE5200B used : /IRQ0 & /IRQ1 */    	*ICTL_EEETR &= ~((UINT32)(ICTL_EEETR_MEE|ICTL_EEETR_ETYPE0_MASK|ICTL_EEETR_ETYPE1_MASK));    	*ICTL_EEETR |= (ICTL_EEETR_ETYPE0_LEVEL_LO|ICTL_EEETR_MEE|ICTL_EEETR_ETYPE1_LEVEL_LO);#endif    retVal = pciConfigLibInit (PCI_MECHANISM_0, 		               (ULONG) sysPciConfigRead,                               (ULONG) sysPciConfigWrite,                               (ULONG) sysPciSpecialCycle);    return retVal;    }void pciInt(){    UINT32 status1 = *PCIGSCR;    UINT32 status2 = *PCIISR;        *PCIGSCR |= status1; /* clear events */    *PCIISR |= status2; /* clear events */    if ((status1 & PCIGSCR_BM) != 0)    {	/* Broken master detected */        logMsg ("PCI Error: broken master detected\n",1,2,3,4,5,6);	    }    if ((status1 & PCIGSCR_PE) != 0)    {	/* Parity error detected */        logMsg ("PCI Error: parity error\n",1,2,3,4,5,6);	    }    if ((status1 & PCIGSCR_SE) != 0)    {	/* System error detected */        logMsg ("PCI Error: system error\n",1,2,3,4,5,6);	    }    if ((status2 & PCIISR_RE) != 0)    {	/* Retry error */        logMsg ("PCI Error: retry count exceeded\n",1,2,3,4,5,6);	    }    if ((status2 & PCIISR_IA) != 0)    {	/* Initiator abort */        logMsg ("PCI Error: initiator aborted due to timeout\n",1,2,3,4,5,6);	    }        if ((status2 & PCIISR_TA) != 0)    {	/* Target abort */        logMsg ("PCI Error: target abort\n",1,2,3,4,5,6);    }}STATUS sysPciInit2    (    void    )    {    intConnect (IV_PCI_CTL, pciInt, 0);    intEnable (INUM_PCI_CTL);    *PCIICR  |= PCIICR_REE|PCIICR_IAE|PCIICR_TAE;    *PCIGSCR = PCIGSCR_BME|PCIGSCR_PEE|PCIGSCR_SEE;    return OK;    }void *sysPciVectorMap(int pciIntLine){    /* adjust interrupts value */    if (pciIntLine >= NELEMENTS(vectorTbl))	{	return (NULL);	}    return vectorTbl[pciIntLine];		}#endif /* INCLUDE_PCI */

?? 快捷鍵說明

復(fù)制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號(hào) Ctrl + =
減小字號(hào) Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
国产精品123区| 国产精品1区2区| 久久久www成人免费无遮挡大片| av亚洲精华国产精华精| 秋霞电影一区二区| 一区二区三区四区五区视频在线观看 | 日本午夜精品一区二区三区电影| 国产日韩欧美麻豆| 欧美精品在线观看一区二区| 国产福利一区在线| 日本在线不卡视频| 午夜一区二区三区在线观看| 亚洲欧洲另类国产综合| 亚洲精品在线免费播放| 欧美日韩成人综合天天影院| 色婷婷精品久久二区二区蜜臂av | 国产精一区二区三区| 天天综合色天天| 一二三四社区欧美黄| 国产精品乱码妇女bbbb| 久久久久久综合| 欧美一级艳片视频免费观看| 在线精品观看国产| 色狠狠色噜噜噜综合网| 99re视频精品| 99麻豆久久久国产精品免费| 波多野结衣一区二区三区 | 欧美精品久久一区| 欧美视频中文一区二区三区在线观看| 成人a级免费电影| 成人性视频网站| 粉嫩绯色av一区二区在线观看 | 欧美中文字幕一区二区三区| 91香蕉视频在线| 97久久超碰国产精品电影| 成人黄色国产精品网站大全在线免费观看 | 337p亚洲精品色噜噜狠狠| 精品视频一区三区九区| 欧美日韩高清一区二区不卡| 欧美日韩成人一区二区| 3751色影院一区二区三区| 日韩欧美黄色影院| 精品成人在线观看| 国产欧美一区二区三区鸳鸯浴 | 亚洲小少妇裸体bbw| 一区二区三区免费在线观看| 亚洲午夜av在线| 免费人成在线不卡| 精品亚洲成av人在线观看| 国产一区二区三区电影在线观看| 国产精品一二三四区| 成人av在线一区二区三区| jizz一区二区| 在线观看三级视频欧美| 51精品视频一区二区三区| 91精品视频网| 国产色一区二区| 日韩伦理av电影| 亚洲高清视频在线| 日本中文在线一区| 国产精品中文字幕欧美| 91视频一区二区三区| 欧洲av一区二区嗯嗯嗯啊| 欧美一区二区视频免费观看| 久久久亚洲精品一区二区三区 | 久久亚洲精华国产精华液 | 一区二区三区资源| 三级精品在线观看| 国产精品 日产精品 欧美精品| 成人aaaa免费全部观看| 欧美日韩三级一区二区| 久久这里只有精品6| 亚洲精选视频免费看| 日韩福利电影在线观看| 国产jizzjizz一区二区| 欧美亚男人的天堂| 久久久99久久精品欧美| 一区二区三区国产豹纹内裤在线| 美国毛片一区二区| 91麻豆国产自产在线观看| 日韩午夜精品电影| 国产精品久久久久久久浪潮网站| 亚洲超丰满肉感bbw| 高清日韩电视剧大全免费| 欧美婷婷六月丁香综合色| 亚洲精品一区二区三区在线观看| 一级日本不卡的影视| 国产一区二区三区蝌蚪| 欧美男男青年gay1069videost| 国产清纯美女被跳蛋高潮一区二区久久w | 精品亚洲成a人| 91黄色小视频| 久久日韩粉嫩一区二区三区| 夜夜精品视频一区二区| 国产精品1区2区3区在线观看| 欧美日韩不卡视频| 亚洲日本免费电影| 国产呦精品一区二区三区网站| 在线国产电影不卡| 国产精品麻豆视频| 国产伦精一区二区三区| 欧美福利电影网| 亚洲免费视频成人| 国产高清在线观看免费不卡| 日韩一级免费一区| 亚洲午夜电影在线| 色吧成人激情小说| 亚洲国产成人自拍| 国产在线视频一区二区三区| 777xxx欧美| 一区二区三区在线播放| 91在线视频免费观看| 日本一区二区视频在线观看| 欧美a一区二区| 欧美一区在线视频| 天堂成人免费av电影一区| 一本色道久久综合狠狠躁的推荐| 国产欧美视频一区二区三区| 国内一区二区在线| 精品国产乱码久久久久久蜜臀| 日韩精品一区第一页| 欧美视频一区二区三区在线观看| 亚洲人123区| 9l国产精品久久久久麻豆| 亚洲国产精品精华液2区45| 国产成人精品免费一区二区| 久久精品综合网| 国产成人av自拍| 日本一区二区视频在线| 成人午夜视频在线| 日本一区二区三区四区在线视频| 黄网站免费久久| 久久久亚洲国产美女国产盗摄 | 欧美日韩高清一区| 亚洲韩国精品一区| 欧美日韩国产大片| 免费成人在线网站| 26uuu欧美日本| 国产精品一区二区视频| 国产精品视频麻豆| 91麻豆产精品久久久久久| 日韩毛片一二三区| 精品视频免费看| 日本视频免费一区| 精品美女被调教视频大全网站| 国产一区二区三区在线观看免费 | 亚洲激情六月丁香| 欧洲一区二区三区在线| 亚洲成在人线免费| 日韩视频123| 国产精品一卡二卡| 成人免费一区二区三区在线观看| 色av综合在线| 午夜欧美电影在线观看| 欧美va亚洲va| 成人性生交大合| 亚洲午夜久久久久久久久久久| 51久久夜色精品国产麻豆| 国产麻豆精品视频| 中文字幕一区二区三区不卡| 在线看一区二区| 久久超级碰视频| 中文字幕一区二区三区四区不卡 | 久久精品亚洲麻豆av一区二区| 成人午夜伦理影院| 亚洲国产一区视频| 精品99999| 色婷婷av一区二区三区gif | 免费高清在线一区| 亚洲国产精品成人久久综合一区 | 国产精品乱人伦中文| 欧美日韩一区在线| 国产一区二区不卡老阿姨| 亚洲你懂的在线视频| 日韩午夜激情免费电影| www.视频一区| 捆绑变态av一区二区三区| 最新热久久免费视频| 欧美一级日韩免费不卡| 99久久精品免费| 美女在线观看视频一区二区| 国产精品不卡在线观看| 欧美一区二区三区视频| 99精品1区2区| 精品一区二区三区视频| 亚洲欧美一区二区不卡| 精品国产污污免费网站入口| 色系网站成人免费| 国产中文字幕精品| 亚洲不卡一区二区三区| 国产精品色哟哟网站| 日韩欧美一区中文| 一本一道综合狠狠老| 国产精品资源在线| 免费观看91视频大全| 亚洲网友自拍偷拍| 中文字幕亚洲成人| 久久久久久影视| 日韩美女视频在线| 欧美日本高清视频在线观看|