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

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

?? sysscsi.c

?? VxWorkS下 MV2604的BSP源代碼
?? C
?? 第 1 頁 / 共 2 頁
字號:
/* sysScsi.c - Motorola MVME2600 series SCSI-2 initialization for sysLib.c *//* Copyright 1984-1998 Wind River Systems, Inc. *//* Copyright 1996,1997,1998 Motorola, Inc., All Rights Reserved */#include "copyright_wrs.h"/*modification history--------------------01l,14apr98,ms_  merged Motorola mv2700 support01k,13jan98,srr  updated copyright dates to 1998.01j,09jul97,tb   added support for ncr875 and secondary SCSI.01i,18sep97,dds  added feature to enable wide SCSI.01h,09jul97,mas  added support for SCSI I/O routines sysScsiInByte() and		 sysScsiOutByte(); ncr810DelayCount now set to NCR810_DELAY_MULT		 (SPR 8842).01g,09may97,mas  added extended VME support, secondary SCSI and use of global		 ncr810PciMemOffset and PCI2DRAM_BASE_ADRS define (SPR 8410).		 added NCR810_DELAY_MULT (SPR 8430).01f,11apr97,mas  changed sysScsiInit() to use pciIomapLib.c functions(SPR 8226).01e,06mar97,dds  SPR 7996/8091: made fixes to configure scsi devices.01d,03jan97,wlf  doc: cleanup.01c,02jan97,dat  added sysScsiConfig sample code, fixed mod history01b,17dec96,mas  renamed INSTRUCTIONS -> NCR810_INSTRUCTIONS (SPR 7649).01a,29nov95,mot  written (ver 01d, mv1600/sysScsi.c)*//* DescriptionThis file contains the sysScsiInit() and related routines necessary forinitializing the SCSI subsystem. It also contains BSP-specific SCSI I/O routines required by the ncr810 driver.The constant PCI2DRAM_BASE_ADRS must be defined in the BSP.*/#ifdef	INCLUDE_SCSI/* includes */#ifdef	INCLUDE_SCSI2#include "drv/scsi/ncr810.h"#else#error INCLUDE_SCSI2 must be defined for use with this driver.#endif /* INCLUDE_SCSI2 */#include "tapeFsLib.h"/* external declarations */extern int   ncr810PciMemOffset;extern int   ncr810DelayCount;extern ULONG NCR810_INSTRUCTIONS;extern ULONG ncr810Wait[];extern BOOL  scsiDebug;extern void  eieioExecute();extern void  vxEieio ();extern UCHAR sysInByte (ULONG);extern void  sysOutByte (ULONG,UCHAR);#ifdef  INCLUDE_SECONDARY_SCSI/* global declarations */SCSI_CTRL * pSysScsiCtrl2;#endif  /* INCLUDE_SECONDARY_SCSI *//* function declarations */LOCAL void swapScript (UINT32 * start, UINT32 * end);/********************************************************************************* sysScsiInit - initialize an on-board SCSI port** This routine creates and initializes an NCR 53C8\f2xx\f1 SCSI I/O* processor (SIOP) structure, enabling use of the on-board SCSI port.  It* connects the proper interrupt service routine to the desired vector, and* enables the interrupt at the desired level.** RETURNS: OK, or ERROR if the SIOP structure cannot be created, the* controller cannot be initialized, valid values cannot be set up in the* SIOP registers, or the interrupt service routine cannot be connected.*/ STATUS sysScsiInit ()    {    int                   pciBusNo;    int                   pciDevNo;    int                   pciFuncNo;    UINT16                devType;#ifdef  INCLUDE_SECONDARY_SCSI    UINT16                devType2;#endif	/* INCLUDE_SECONDARY_SCSI */    static BOOL 	  firstTime = TRUE;    /* Local structure(s) with a prefill for ncr825SetHwRegister */    static NCR810_HW_REGS hwRegs  = MV2600_SIOP_HW_REGS;#ifdef  INCLUDE_SECONDARY_SCSI    static NCR810_HW_REGS hwRegs2 = MV2600_SIOP_HW_REGS;#endif  /* INCLUDE_SECONDARY_SCSI */    /* Set CPU <-> PCI address offset */    ncr810PciMemOffset = PCI2DRAM_BASE_ADRS;    /*      * Since the PCI bus is little endian, and the PPC CPU's are big endian,     * the ncr8xx scripts need to be byte swapped in memory. However, they     * should only be swapped the first time that sysScsiInit() is invoked.     */    if (firstTime)	{        swapScript ((UINT32 *) &ncr810Wait, (UINT32 *) 		    ((UINT32) &ncr810Wait + 		     (UINT32)(NCR810_INSTRUCTIONS * 8)));	firstTime = FALSE;	}    /* Try to automatically configure the correct type of NCR8XX controller. */    if (pciFindDevice ((PCI_ID_SCSI & 0xFFFF), ((PCI_ID_SCSI >> 16) & 0xFFFF),                       0, &pciBusNo, &pciDevNo, &pciFuncNo) != ERROR)        {	/* Get Device ID */	pciConfigInWord (pciBusNo, pciDevNo, pciFuncNo, PCI_CFG_DEVICE_ID, &devType);	SCSI_DEBUG_MSG ("Found Primary SCSI Controller - Dev/Ven ID = 0x%x\n", PCI_ID_SCSI,0,0,0,0,0);	}    else 	{	logMsg ("SCSI controller not found\n", 0, 0, 0, 0, 0, 0);        return (ERROR);	}#ifndef SCSI_WIDE_ENABLE    devType = NCR810_DEVICE_ID;#endif    ncr810DelayCount = NCR810_DELAY_MULT;    /* Create the SCSI controller */    if ((pSysScsiCtrl = (SCSI_CTRL *) ncr810CtrlCreate 					  (					  (UINT8 *) SCSI_BASE_ADRS,					  (UINT)    NCR810_40MHZ,					            devType      					  )) == NULL)        {        return (ERROR);        }     /* connect the SCSI controller's interrupt service routine */     if (intConnect (INUM_TO_IVEC (SCSI_INT_VEC),                    ncr810Intr, (int) pSysScsiCtrl) == ERROR)        {        return (ERROR);        }     /* Enable SCSI interrupts */    intEnable (SCSI_INT_LVL);    /* initialise SCSI controller with default parameters (user tuneable) */     if (ncr810CtrlInit ((NCR_810_SCSI_CTRL *)pSysScsiCtrl, 			SCSI_DEF_CTRL_BUS_ID) == ERROR)        return (ERROR);#if (USER_D_CACHE_MODE &  CACHE_SNOOP_ENABLE)    scsiCacheSnoopEnable ((SCSI_CTRL *) pSysScsiCtrl);#else     scsiCacheSnoopDisable ((SCSI_CTRL *) pSysScsiCtrl);#endif    /*     * Set the good value in the registers of the SIOP coupled     * with the hardware implementation     */    if (ncr810SetHwRegister ((NCR_810_SCSI_CTRL *)pSysScsiCtrl, &hwRegs) 	== ERROR)        return(ERROR);#ifdef  INCLUDE_SECONDARY_SCSI     if (pciFindDevice ((PCI_ID_SEC_SCSI & 0xFFFF),			    ((PCI_ID_SEC_SCSI >> 16) & 0xFFFF), 0, &pciBusNo,			    &pciDevNo, &pciFuncNo) != ERROR)        {	/* Get Device ID */	pciConfigInWord (pciBusNo, pciDevNo, pciFuncNo, PCI_CFG_DEVICE_ID, &devType2);	SCSI_DEBUG_MSG ("Found Secondary SCSI Controller - Dev/Ven ID = 0x%x\n", PCI_ID_SCSI,0,0,0,0,0);	}    else 	{	logMsg ("Secondary SCSI controller not found\n", 0, 0, 0, 0, 0, 0);        return (ERROR);	}#ifndef SCSI_WIDE_ENABLE    devType2 = NCR810_DEVICE_ID;#endif    ncr810DelayCount = (sysGetBusSpd () * NCR810_DELAY_MULT);    /* Create the SCSI controller */     if ((pSysScsiCtrl2 = (SCSI_CTRL *) ncr810CtrlCreate                                          (                                          (UINT8 *) SCSI_BASE_ADRS2,                                          (UINT)    NCR810_40MHZ,                                                    devType2                                          )) == NULL)        {        return (ERROR);        }     /* connect the SCSI controller's interrupt service routine */     if (intConnect (INUM_TO_IVEC (SCSI_INT_VEC2),                    ncr810Intr, (int) pSysScsiCtrl2) == ERROR)        {        return (ERROR);        }     /* Enable SCSI interrupts */     intEnable (PMC_INT_LVL3);     /* initialise SCSI controller with default parameters (user tuneable) */     if (ncr810CtrlInit ((NCR_810_SCSI_CTRL *)pSysScsiCtrl2,                        SCSI_DEF_CTRL_BUS_ID) == ERROR)        return (ERROR);  #if (USER_D_CACHE_MODE &  CACHE_SNOOP_ENABLE)     scsiCacheSnoopEnable ((SCSI_CTRL *) pSysScsiCtrl2); #else     scsiCacheSnoopDisable ((SCSI_CTRL *) pSysScsiCtrl2); #endif     /*     * Set the good value in the registers of the SIOP coupled     * with the hardware implementation     */     if (ncr810SetHwRegister ((NCR_810_SCSI_CTRL *)pSysScsiCtrl2, &hwRegs2)        == ERROR)        return(ERROR); #endif  /* INCLUDE_SECONDARY_SCSI */    /* Include tape support if configured in config.h */ #ifdef  INCLUDE_TAPEFS    tapeFsInit ();                     /* initialise tapeFs */#endif  /* INCLUDE_TAPEFS */     return (OK);    }/********************************************************************************* swapScript - byte swaps the 32 bit NCR8XX scripts** This routine byte swaps 4 byte (32 bit) long scripts instructions due to* the fact that the PPC processor is big endian and the PCI SCSI device is* little endian. ** The two parameters supplied <start> and <end> denote the start of scripts* in memory and the end of the scripts in memory. Note that both these* values are assumed to be on 4 byte boundaries. It is further assumed that* the instructions are located in a writable area of memory.** RETURNS: N/A*/LOCAL void swapScript     (    UINT32 * start,    UINT32 * end    )    {    int size;    UINT32 i;    UINT32 val;    /* determine the size (length) of the scripts */    size = (int) end - (int) start;    if (size % 4)	printf ("Incorrect length (start - end) mod 4 != 0 size: %d\n", size);    /* swap each 4 byte word in memory */    for (i=0; i < (size/4); i ++)	{	val = BYTE_SWAP_32_BIT ( (UINT32) *((UINT32 *) (start + i)) );        *((UINT32 *) start + i) = val;	}    }/********************************************************************************* inOrderExecute - enforce in-order execution of PowerPC accesses** This routine enforces in-order execution of register accesses to the SCSI* I/O processor (SIOP).  It is invoked by the SCSI-2 driver, and is a* wrapper to a PowerPC assembler instruction.** RETURNS: N/A.*/void inOrderExecute ()    {    vxEieio ();  /* defined in vxALib.s */    }/* Data for example code in sysScsiConfig, modify as needed */

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
洋洋av久久久久久久一区| 亚洲欧洲成人自拍| 欧美亚洲综合一区| 色综合久久88色综合天天免费| 波多野结衣中文字幕一区| 成人免费三级在线| 色妹子一区二区| 日本伦理一区二区| 欧美午夜不卡在线观看免费| 欧美丝袜丝nylons| 日韩三级在线观看| xnxx国产精品| 成人免费在线视频| 亚洲午夜精品一区二区三区他趣| 亚洲成人在线免费| 久久99久久久久| 成人午夜激情影院| 欧美视频一区二区三区在线观看| 日韩视频在线一区二区| 国产日韩精品视频一区| 自拍偷拍亚洲激情| 日本不卡免费在线视频| 国产精品一区二区果冻传媒| 色综合网色综合| 欧美区在线观看| 久久久av毛片精品| 亚洲免费在线观看视频| 日本亚洲一区二区| www.欧美亚洲| 欧美剧情片在线观看| 久久久欧美精品sm网站| 亚洲综合一区在线| 国产不卡一区视频| 欧美精品视频www在线观看| 26uuu久久综合| 亚洲成精国产精品女| 国产成人免费视频精品含羞草妖精| 97精品国产露脸对白| 欧美一级二级在线观看| 国产精品初高中害羞小美女文| 日韩综合在线视频| 91视频在线看| 国产午夜亚洲精品午夜鲁丝片| 亚洲一二三区视频在线观看| 在线观看免费一区| 久久久久久久久一| 日韩av网站在线观看| 91视频免费播放| 国产亚洲精品福利| 青青草原综合久久大伊人精品| 国产成人亚洲综合色影视| 欧美高清视频www夜色资源网| 国产精品乱码一区二区三区软件| 日韩**一区毛片| 欧美在线视频全部完| 国产精品精品国产色婷婷| 久久99国产乱子伦精品免费| 日本电影欧美片| 国产精品久久久久久久久动漫 | 成人丝袜18视频在线观看| 欧美高清视频在线高清观看mv色露露十八| 国产精品午夜电影| 国产一区二区三区黄视频 | 69堂国产成人免费视频| 亚洲男人天堂一区| 91在线观看视频| 国产欧美一区二区精品忘忧草| 久久 天天综合| 日韩欧美一区在线| 麻豆精品精品国产自在97香蕉| 欧美日韩一区二区三区视频| 一区二区三区四区中文字幕| 91在线视频观看| 亚洲免费毛片网站| 色国产综合视频| 亚洲精品国产成人久久av盗摄| 色综合天天综合网天天狠天天| 国产精品久久久久影院亚瑟| 岛国精品一区二区| 欧美韩日一区二区三区| 国产成人av一区二区| 欧美国产成人精品| 91色综合久久久久婷婷| 一区二区三区精品在线| 欧美日韩亚洲不卡| 日本麻豆一区二区三区视频| 欧美大度的电影原声| 久草在线在线精品观看| 国产亚洲欧洲997久久综合| 丁香激情综合国产| 亚洲人妖av一区二区| 欧美图片一区二区三区| 免费日本视频一区| 国产精品亲子伦对白| 99久久夜色精品国产网站| 亚洲国产中文字幕在线视频综合| 欧美日韩亚洲丝袜制服| 激情国产一区二区| 国产精品电影一区二区三区| 欧美日韩精品专区| 国产一区日韩二区欧美三区| 国产精品亲子伦对白| 欧美婷婷六月丁香综合色| 久久狠狠亚洲综合| 免费在线观看日韩欧美| 精品不卡在线视频| 成人av免费在线| 日韩av一级电影| 国产精品久久一级| 日韩一区二区视频在线观看| 成人在线综合网| 亚洲国产aⅴ天堂久久| 久久精品男人的天堂| 欧洲亚洲精品在线| 国产999精品久久久久久绿帽| 一区二区欧美精品| 国产亚洲短视频| 日韩一级大片在线观看| 99热精品国产| 伦理电影国产精品| 亚洲与欧洲av电影| 国产精品美女www爽爽爽| 3751色影院一区二区三区| 波多野结衣一区二区三区| 免费在线观看成人| 一区二区三区加勒比av| 国产女人aaa级久久久级| 欧美一区二区三区在线观看视频| 成人精品一区二区三区四区| 久久精品72免费观看| 亚洲一区二区三区三| 欧美激情综合在线| www国产成人| 欧美一级免费观看| 欧美精品一二三区| 欧美日韩精品综合在线| 色域天天综合网| 91在线国内视频| 成人免费毛片嘿嘿连载视频| 精品一区二区日韩| 蜜桃一区二区三区在线| 亚洲午夜激情网站| 亚洲午夜激情网页| 一区二区三区四区蜜桃| 亚洲精品一二三| 一区二区三区欧美| 亚洲乱码国产乱码精品精小说| 中文字幕一区日韩精品欧美| 国产精品无人区| 国产精品国产三级国产有无不卡| 久久精品日产第一区二区三区高清版 | www.欧美日韩国产在线| 懂色av一区二区三区免费看| 国产成人日日夜夜| 高清免费成人av| 波多野结衣亚洲| 91麻豆蜜桃一区二区三区| 日本韩国视频一区二区| 欧美视频在线播放| 欧美一级片免费看| 久久久www免费人成精品| 亚洲国产高清aⅴ视频| 国产精品女同互慰在线看| 中文字幕综合网| 亚洲国产毛片aaaaa无费看| 丝袜a∨在线一区二区三区不卡| 日本不卡123| 国产一区二区成人久久免费影院| 国产精品一级黄| 99精品国产热久久91蜜凸| 欧美性生活一区| 日韩一区二区精品在线观看| 久久亚洲捆绑美女| 亚洲精品欧美激情| 亚洲国产精品综合小说图片区| 丝袜诱惑亚洲看片| 国产高清一区日本| 91成人在线观看喷潮| 欧美一区二区三区四区视频| 国产亚洲精品aa午夜观看| 一区二区三区在线观看欧美| 欧美亚洲高清一区| 精品国产乱码久久久久久牛牛| 中文一区一区三区高中清不卡| 亚洲第一会所有码转帖| 黄色资源网久久资源365| 成人av在线电影| 日韩三级电影网址| 亚洲美女少妇撒尿| 激情深爱一区二区| 欧美影视一区二区三区| 久久一二三国产| 午夜欧美2019年伦理| 国产sm精品调教视频网站| 欧美日韩国产在线观看| 中文字幕免费观看一区| 日本美女一区二区三区| 色欧美日韩亚洲| 国产女人aaa级久久久级| 日本美女一区二区三区|