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

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

?? i2o1.c

?? 自己修改的U-boot1.1.4For AT91RM9200DK. 請用armgcc3.3.2編譯。
?? C
?? 第 1 頁 / 共 2 頁
字號:
/********************************************************* * $Id * * copyright @ Motorola, 1999 *********************************************************/#include "i2o.h"extern unsigned int load_runtime_reg( unsigned int eumbbar, unsigned int reg );#pragma Alias( load_runtime_reg, "load_runtime_reg" );extern void store_runtime_reg( unsigned int eumbbar, unsigned int reg, unsigned int val );#pragma Alias( store_runtime_reg, "store_runtime_reg" );typedef struct _fifo_stat{    QUEUE_SIZE   qsz;    unsigned int qba;} FIFOSTAT;FIFOSTAT fifo_stat = { QSIZE_4K, 0xffffffff };/********************************************************************************** * function: I2OMsgEnable * * description: Enable the interrupt associated with in/out bound msg *              return I2OSUCCESS if no error, otherwise return I2OMSGINVALID. * *              All previously enabled interrupts are preserved. * note: * Inbound message interrupt generated by PCI master and serviced by local processor * Outbound message interrupt generated by local processor and serviced by PCI master * * local processor needs to enable its inbound interrupts it wants to handle(LOCAL) * PCI master needs to enable the outbound interrupts of devices it wants to handle(REMOTE) ************************************************************************************/I2OSTATUS I2OMsgEnable ( LOCATION loc,        /*  REMOTE/LOCAL   */			 unsigned int base,   /* pcsrbar/eumbbar */			 unsigned char n )    /* b'1' - msg 0					       * b'10'- msg 1					       * b'11'- both					       */{    unsigned int reg, val;    if ( ( n & 0x3 ) == 0 )    {	/* neither msg 0, nor msg 1 */	return I2OMSGINVALID;    }    n = (~n) & 0x3;    /* LOCATION - REMOTE : enable outbound message of device, pcsrbar as base     *            LOCAL  : enable local inbound message, eumbbar as base     */    reg = ( loc == REMOTE ? I2O_OMIMR : I2O_IMIMR );    val = load_runtime_reg( base, reg );    val &= 0xfffffffc; /* masked out the msg interrupt bits */    val |= n;          /* LSB are the one we want */    store_runtime_reg( base, reg, val );    return I2OSUCCESS;}/********************************************************************************* * function: I2OMsgDisable * * description: Disable the interrupt associated with in/out bound msg *              Other previously enabled interrupts are preserved. *              return I2OSUCCESS if no error otherwise return I2OMSGINVALID * * note: *  local processor needs to disable its inbound interrupts it is not interested(LOCAL) *  PCI master needs to disable outbound interrupts of devices it is not interested(REMOTE) *********************************************************************************/I2OSTATUS I2OMsgDisable( LOCATION loc,      /*  REMOTE/LOCAL   */			 unsigned int base, /* pcsrbar/eumbbar */			 unsigned char n )  /* b'1' - msg 0					     * b'10'- msg 1					     * b'11'- both					     */{    unsigned int reg, val;    if ( ( n & 0x3 ) == 0 )    {	/* neither msg 0, nor msg 1 */	return I2OMSGINVALID;    }    /* LOCATION - REMOTE : disable outbound message interrupt of device, pcsrbar as base     *            LOCAL  : disable local inbound message interrupt, eumbbar as base     */    reg = ( loc == REMOTE ? I2O_OMIMR : I2O_IMIMR );    val = load_runtime_reg( base, reg );    val &= 0xfffffffc; /* masked out the msg interrupt bits */    val |= ( n & 0x3 );    store_runtime_reg( base, reg, val );    return I2OSUCCESS;}/************************************************************************** * function: I2OMsgGet * * description: Local processor reads the nth Msg register from its inbound msg, *              or a PCI Master reads nth outbound msg from device * *              return I2OSUCCESS if no error, otherwise return I2OMSGINVALID. * * note: * If it is not local, pcsrbar must be passed to the function. Otherwise eumbbar is passed. * If it is remote, outbound msg on the device is read; otherwise local inbound msg is read *************************************************************************/I2OSTATUS I2OMsgGet ( LOCATION loc,             /* REMOTE/LOCAL */			 unsigned int base,        /*pcsrbar/eumbbar */			 unsigned int n,           /* 0 or 1 */			 unsigned int *msg ){    if ( n >= I2O_NUM_MSG || msg == 0 )    {	return I2OMSGINVALID;    }    if ( loc == REMOTE )    {	/* read the outbound msg of the device, pcsrbar as base */	*msg = load_runtime_reg( base, I2O_OMR0+n*I2O_REG_OFFSET );    }    else    {	/* read the inbound msg sent by PCI master, eumbbar as base */	*msg = load_runtime_reg( base, I2O_IMR0+n*I2O_REG_OFFSET );    }    return I2OSUCCESS;}/*************************************************************** * function: I2OMsgPost * * description: Kahlua  writes to its nth outbound msg register *              PCI master writes to nth inbound msg register of device * *              return I2OSUCCESS if no error, otherwise return I2OMSGINVALID. * * note: * If it is not local, pcsrbar must be passed to the function. Otherwise eumbbar is passed. * * If it is remote, inbound msg on the device is written; otherwise local outbound msg is written ***************************************************************/I2OSTATUS I2OMsgPost( LOCATION loc,             /* REMOTE/LOCAL */		      unsigned int base,        /*pcsrbar/eumbbar */		      unsigned int n,           /* 0 or 1 */		      unsigned int msg ){    if ( n >= I2O_NUM_MSG )    {	return I2OMSGINVALID;    }    if ( loc == REMOTE )    {	/* write to the inbound msg register of the device, pcsrbar as base  */	store_runtime_reg( base, I2O_IMR0+n*I2O_REG_OFFSET, msg );    }    else    {	/* write to the outbound msg register for PCI master to read, eumbbar as base */	store_runtime_reg( base, I2O_OMR0+n*I2O_REG_OFFSET, msg );    }    return I2OSUCCESS;}/*********************************************************************** * function: I2ODBEnable * * description: Local processor enables it's inbound doorbell interrupt *              PCI master enables outbound doorbell interrupt of devices *              Other previously enabled interrupts are preserved. *              Return I2OSUCCESS if no error otherwise return I2ODBINVALID * * note: * In DoorBell interrupt is generated by PCI master and serviced by local processor * Out Doorbell interrupt is generated by local processor and serviced by PCI master * * Out Doorbell interrupt is generated by local processor and serviced by PCI master * PCI master needs to enable the outbound doorbell interrupts of device it wants to handle **********************************************************************/I2OSTATUS I2ODBEnable( LOCATION loc,        /*  REMOTE/LOCAL   */		  unsigned int base,   /* pcsrbar/eumbbar */		  unsigned int in_db ) /* when LOCAL, I2O_IN_DB, MC, I2O_IN_DB|MC */{    /* LOCATION - REMOTE : PCI master initializes outbound doorbell message of device     *            LOCAL  : Kahlua initializes its inbound doorbell message     */    unsigned int val;    if ( loc == LOCAL && ( in_db & 0x3 ) == 0 )    {	return I2ODBINVALID;    }    if ( loc == REMOTE )    {	/* pcsrbar is base */	val = load_runtime_reg( base, I2O_OMIMR );	val &= 0xfffffff7;	store_runtime_reg( base, I2O_OMIMR , val );    }    else    {	/* eumbbar is base */	val = load_runtime_reg( base, I2O_IMIMR);	in_db = ( (~in_db) & 0x3 ) << 3;	val = ( val & 0xffffffe7) | in_db;	store_runtime_reg( base,  I2O_IMIMR, val );    }    return I2OSUCCESS;}/********************************************************************************** * function: I2ODBDisable * * description: local processor disables its inbound DoorBell Interrupt *              PCI master disables outbound DoorBell interrupt of device *              Other previously enabled interrupts are preserved. *              return I2OSUCCESS if no error.Otherwise return I2ODBINVALID * * note: * local processor needs to disable its inbound doorbell interrupts it is not interested * * PCI master needs to disable outbound doorbell interrupts of device it is not interested ************************************************************************************/I2OSTATUS I2ODBDisable( LOCATION loc,          /*  REMOTE/LOCAL   */			unsigned int base,     /* pcsrbar/eumbbar */			unsigned int in_db )   /* when LOCAL, I2O_IN_DB, MC, I2O_IN_DB|MC */{    /* LOCATION - REMOTE : handle device's out bound message initialization     *            LOCAL  : handle local in bound message initialization     */    unsigned int val;    if ( loc == LOCAL && ( in_db & 0x3 ) == 0 )    {	    return I2ODBINVALID;    }    if ( loc == REMOTE )    {	/* pcsrbar is the base */	val = load_runtime_reg( base, I2O_OMIMR );	val |= 0x8;	store_runtime_reg( base, I2O_OMIMR, val );    }    else    {	    val = load_runtime_reg( base, I2O_IMIMR);	    in_db = ( in_db & 0x3 ) << 3;	    val |= in_db;	    store_runtime_reg( base, I2O_IMIMR, val );    }    return I2OSUCCESS;}/********************************************************************************** * function: I2ODBGet * * description: Local processor reads its in doorbell register, *              PCI master reads the outdoorbell register of device. *              After a doorbell register is read, the whole register will be cleared. *              Otherwise, HW keeps generating interrupt. * * note: * If it is not local, pcsrbar must be passed to the function. * Otherwise eumbbar is passed. * * If it is remote, out doorbell register on the device is read. * Otherwise local in doorbell is read * * If the register is not cleared by write to it, any remaining bit of b'1's * will cause interrupt pending. *********************************************************************************/unsigned int I2ODBGet( LOCATION loc,         /*  REMOTE/LOCAL   */		       unsigned int base)    /* pcsrbar/eumbbar */{    unsigned int msg, val;    if ( loc == REMOTE )    {	/* read outbound doorbell register of device, pcsrbar is the base */	val = load_runtime_reg( base, I2O_ODBR );	msg = val & 0xe0000000;	store_runtime_reg( base, I2O_ODBR, val ); /* clear the register */    }    else    {	/* read the inbound doorbell register, eumbbar is the base */	val = load_runtime_reg( base, I2O_IDBR );	store_runtime_reg( base, I2O_IDBR, val ); /* clear the register */	msg = val;    }    return msg;}/********************************************************************** * function: I2ODBPost * * description: local processor writes to a outbound doorbell register, *              PCI master writes to the inbound doorbell register of device * * note: * If it is not local, pcsrbar must be passed to the function. * Otherwise eumbbar is passed. * * If it is remote, in doorbell register on the device is written. * Otherwise local out doorbell is written *********************************************************************/void I2ODBPost( LOCATION loc,             /*  REMOTE/LOCAL   */		unsigned int base,        /* pcsrbar/eumbbar */		unsigned int msg )        /*   in   / out    */{    if ( loc == REMOTE )    {	/* write to inbound doorbell register of device, pcsrbar is the base */	store_runtime_reg( base, I2O_IDBR, msg );    }    else    {	/* write to local outbound doorbell register, eumbbar is the base */	store_runtime_reg( base, I2O_ODBR, msg & 0x1fffffff );    }}/******************************************************************** * function: I2OOutMsgStatGet * * description: PCI master reads device's outbound msg unit interrupt status. *              Reading an interrupt status register, *              the register will be cleared. * *              The value of the status register is AND with the outbound *              interrupt mask and result is returned. * * note: * pcsrbar must be passed to the function. ********************************************************************/I2OSTATUS I2OOutMsgStatGet( unsigned int pcsrbar, I2OOMSTAT *val ){    unsigned int stat;    unsigned int mask;    if ( val == 0 )    {	    return I2OINVALID;    }    /* read device's outbound status */    stat = load_runtime_reg( pcsrbar, I2O_OMISR );    mask = load_runtime_reg( pcsrbar, I2O_OMIMR );    store_runtime_reg( pcsrbar, I2O_OMISR, stat & 0xffffffd7);    stat &= mask;    val->rsvd0 = ( stat & 0xffffffc0 ) >> 6;    val->opqi  = ( stat & 0x00000020 ) >> 5;    val->rsvd1 = ( stat & 0x00000010 ) >> 4;    val->odi   = ( stat & 0x00000008 ) >> 3;    val->rsvd2 = ( stat & 0x00000004 ) >> 2;    val->om1i  = ( stat & 0x00000002 ) >> 1;    val->om0i  = ( stat & 0x00000001 );    return I2OSUCCESS;}/******************************************************************** * function: I2OInMsgStatGet * * description: Local processor reads its inbound msg unit interrupt status. *              Reading an interrupt status register, *              the register will be cleared. * *              The inbound msg interrupt status is AND with the inbound *              msg interrupt mask and result is returned. * * note: * eumbbar must be passed to the function. ********************************************************************/I2OSTATUS I2OInMsgStatGet(unsigned int eumbbar, I2OIMSTAT *val){    unsigned int stat;    unsigned int mask;    if ( val == 0 )    {	    return I2OINVALID;    }    /* read device's outbound status */    stat = load_runtime_reg( eumbbar, I2O_OMISR );    mask = load_runtime_reg( eumbbar, I2O_OMIMR );    store_runtime_reg( eumbbar, I2O_OMISR, stat & 0xffffffe7 );    stat &= mask;    val->rsvd0 = ( stat & 0xfffffe00 ) >> 9;    val->ofoi  = ( stat & 0x00000100 ) >> 8;    val->ipoi  = ( stat & 0x00000080 ) >> 7;    val->rsvd1 = ( stat & 0x00000040 ) >> 6;    val->ipqi  = ( stat & 0x00000020 ) >> 5;    val->mci   = ( stat & 0x00000010 ) >> 4;    val->idi   = ( stat & 0x00000008 ) >> 3;    val->rsvd2 = ( stat & 0x00000004 ) >> 2;    val->im1i  = ( stat & 0x00000002 ) >> 1;    val->im0i  = ( stat & 0x00000001 );    return I2OSUCCESS;}/*********************************************************** * function: I2OFIFOInit * * description: Configure the I2O FIFO, including QBAR, *              IFHPR/IFTPR, IPHPR/IPTPR, OFHPR/OFTPR, *              OPHPR/OPTPR, MUCR. * *              return I2OSUCCESS if no error, *              otherwise return I2OQUEINVALID * * note: It is NOT this driver's responsibility of initializing *       MFA blocks, i.e., FIFO queue itself. The MFA blocks *       must be initialized before I2O unit can be used. ***********************************************************/I2OSTATUS I2OFIFOInit( unsigned int eumbbar,		       QUEUE_SIZE   sz,      /* value of CQS of MUCR */		       unsigned int qba)     /* queue base address that must be aligned at 1M */{    if ( ( qba & 0xfffff ) != 0 )    {

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
日韩一区二区三区视频在线观看| 欧美一区二区三区免费大片 | 精品视频免费在线| 老司机免费视频一区二区| 国产精品成人在线观看| 欧美一区二区三区在线观看| a亚洲天堂av| 国产资源在线一区| 婷婷开心激情综合| 中文字幕制服丝袜一区二区三区| 欧美zozo另类异族| 欧美巨大另类极品videosbest| 成人av手机在线观看| 精品一区二区在线视频| 水野朝阳av一区二区三区| 亚洲免费观看高清完整版在线观看| 久久久久久一二三区| 欧美一区在线视频| 欧美在线制服丝袜| 日本乱人伦aⅴ精品| 成人av一区二区三区| 国产a级毛片一区| 久草精品在线观看| 美女尤物国产一区| 欧美日韩美女一区二区| 99综合电影在线视频| 国产精品88av| 国产美女一区二区三区| 九九精品一区二区| 免费欧美高清视频| 五月激情六月综合| 天天色 色综合| 午夜精品福利在线| 视频一区视频二区在线观看| 亚洲国产精品综合小说图片区| 亚洲天堂中文字幕| 亚洲卡通动漫在线| 一区二区三区免费看视频| 日韩一区在线免费观看| 亚洲欧美激情一区二区| 亚洲人成在线播放网站岛国| 自拍偷拍亚洲综合| 亚洲精品大片www| 亚洲综合一区二区精品导航| 亚洲综合图片区| 亚洲成av人片在www色猫咪| 亚洲bt欧美bt精品| 日韩精品1区2区3区| 久久精品国产77777蜜臀| 精品中文av资源站在线观看| 国产麻豆成人精品| 成人小视频在线| 一本一道综合狠狠老| 欧美亚洲国产一区二区三区| 亚洲精品视频在线| 亚洲不卡av一区二区三区| 欧美aa在线视频| 国内精品嫩模私拍在线| 成人av电影在线观看| 91麻豆精东视频| 欧美精品亚洲二区| 精品噜噜噜噜久久久久久久久试看| 久久久久久一二三区| 亚洲色图第一区| 午夜精品免费在线观看| 国产一区不卡在线| 色婷婷久久综合| 欧美一级二级三级乱码| 国产欧美日本一区二区三区| 亚洲蜜桃精久久久久久久| 男人的j进女人的j一区| 国产成人综合在线观看| 91国产成人在线| 日韩免费福利电影在线观看| 国产精品入口麻豆原神| 亚洲午夜视频在线| 久久99国产精品久久99| 91色婷婷久久久久合中文| 日韩视频在线观看一区二区| 国产精品无码永久免费888| 亚洲成人www| 国产盗摄女厕一区二区三区| 欧美日韩免费一区二区三区 | 91久久人澡人人添人人爽欧美| 欧美日韩国产影片| 国产欧美1区2区3区| 亚洲福利视频一区二区| 国产**成人网毛片九色| 欧美日韩激情在线| 欧美激情一二三区| 日日嗨av一区二区三区四区| 不卡一区二区三区四区| 欧美乱熟臀69xxxxxx| 中文字幕高清一区| 蜜臀av一级做a爰片久久| 97久久精品人人澡人人爽| 精品国产乱码久久久久久久| 亚洲图片一区二区| 成人a免费在线看| 欧美电影免费观看高清完整版在| 一区二区三区91| 成人精品一区二区三区四区| 欧美一区二区三级| 亚洲精品国产无套在线观| 国产精品亚洲成人| 日韩视频一区二区| 亚洲二区视频在线| 99精品国产热久久91蜜凸| 久久夜色精品一区| 日韩二区三区四区| 亚洲欧洲日产国码二区| 韩国一区二区三区| 日韩欧美中文字幕制服| 亚洲v中文字幕| 色哟哟日韩精品| 国产精品欧美一区二区三区| 激情久久久久久久久久久久久久久久| 欧美日韩一区二区三区四区 | 性做久久久久久免费观看| 成人免费视频免费观看| 久久久综合视频| 国产最新精品免费| 日韩欧美综合一区| 麻豆精品国产传媒mv男同| 337p亚洲精品色噜噜| 亚洲一区二区三区在线看| 91麻豆国产精品久久| 国产精品黄色在线观看| 大尺度一区二区| 国产欧美精品区一区二区三区| 国产在线麻豆精品观看| 精品卡一卡二卡三卡四在线| 久久成人免费电影| 日韩欧美成人一区| 国产综合色在线视频区| 久久午夜免费电影| 国产乱人伦偷精品视频不卡| 久久日韩精品一区二区五区| 国产麻豆日韩欧美久久| 久久精品无码一区二区三区| 国产精品一区免费视频| 国产日本亚洲高清| 成人av免费在线观看| 亚洲女人****多毛耸耸8| 在线中文字幕一区二区| 午夜精品福利在线| 日韩免费福利电影在线观看| 另类中文字幕网| 国产视频一区在线观看| av亚洲产国偷v产偷v自拍| 亚洲男人天堂av| 欧美日韩一区高清| 久99久精品视频免费观看| 久久久一区二区| 丁香激情综合五月| 一区二区欧美国产| 宅男在线国产精品| 国产精品77777| 一区在线观看视频| 欧美日韩国产综合一区二区 | 天堂av在线一区| 欧美成人三级在线| 成人免费高清视频在线观看| 国产精品电影一区二区| 欧美女孩性生活视频| 久久成人精品无人区| 中日韩免费视频中文字幕| 91黄视频在线| 老司机免费视频一区二区三区| 国产在线不卡一区| 亚洲欧美在线视频| 欧美日韩国产区一| 国产精品一级片| 亚洲一区二区成人在线观看| 日韩欧美成人午夜| 一本到一区二区三区| 青青草伊人久久| 18涩涩午夜精品.www| 日韩欧美国产三级| 99re这里都是精品| 久久精品国产精品亚洲综合| 亚洲同性gay激情无套| 日韩免费电影一区| 色综合久久久久久久久久久| 久久成人免费电影| 亚洲色图第一区| 2020日本不卡一区二区视频| 在线观看网站黄不卡| 国产麻豆精品一区二区| 亚洲国产精品麻豆| 国产精品女主播在线观看| 欧美裸体一区二区三区| av影院午夜一区| 国产中文字幕精品| 亚洲va国产天堂va久久en| 国产精品欧美一级免费| 久久综合色之久久综合| 欧美日韩大陆在线| 91丝袜美女网| 丰满少妇在线播放bd日韩电影|