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

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

?? i2o1.c

?? uboot for K9 AT91RM9200 學習板
?? 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一区二区三区免费野_久草精品视频
欧美夫妻性生活| 国产成人免费视| 欧美久久久久久久久中文字幕| 亚洲精品国产视频| 在线看一区二区| 婷婷开心激情综合| 日韩视频中午一区| 国产中文字幕精品| 国产精品无码永久免费888| 白白色 亚洲乱淫| 亚洲一区二区在线免费观看视频| 欧美日韩国产系列| 激情综合色丁香一区二区| 国产视频一区二区在线| 色综合天天综合网国产成人综合天 | 欧美日韩在线电影| 日本视频中文字幕一区二区三区| 久久夜色精品国产噜噜av| 成人黄色免费短视频| 亚洲自拍欧美精品| 26uuu国产电影一区二区| 成人白浆超碰人人人人| 日韩中文字幕不卡| 国产欧美一区二区三区网站 | 国产精品视频麻豆| 欧美日韩免费一区二区三区| 狠狠狠色丁香婷婷综合久久五月| 国产精品国产精品国产专区不蜜| 精品视频一区二区不卡| 激情综合五月天| 亚洲欧美日韩久久精品| 欧美大黄免费观看| 成人app软件下载大全免费| 青青草精品视频| 亚洲婷婷在线视频| 日韩精品一区二区三区三区免费 | 99久久99精品久久久久久| 调教+趴+乳夹+国产+精品| 国产日韩精品一区二区浪潮av | 亚洲午夜电影在线观看| 国产亚洲欧美一级| 欧美日韩免费观看一区二区三区 | 午夜精品福利在线| 日本一区二区久久| 日韩一级黄色片| 一本色道久久综合亚洲91| 精品一区在线看| 视频在线观看一区二区三区| 综合av第一页| 久久精品一区二区三区四区| 欧美一级在线免费| 欧美亚洲另类激情小说| 成人免费毛片片v| 久久国产精品99久久久久久老狼| 亚洲成人动漫在线观看| 亚洲女与黑人做爰| 国产精品麻豆网站| 国产亚洲精品资源在线26u| 日韩欧美视频在线| 日韩欧美国产午夜精品| 91.com视频| 欧美日韩精品欧美日韩精品一| 99国产精品久| 成人av网站在线| 国产成人av福利| 国产在线精品免费av| 免费看精品久久片| 青青草国产成人av片免费| 无码av免费一区二区三区试看| 一区二区三区精品视频在线| 玉米视频成人免费看| 亚洲美女视频一区| 亚洲精品久久嫩草网站秘色| 亚洲色图一区二区| 国产精品福利av| 亚洲欧洲日产国码二区| 国产精品第13页| 亚洲男女一区二区三区| 亚洲三级电影网站| 亚洲一区二区三区爽爽爽爽爽| 亚洲欧美一区二区三区孕妇| 亚洲丝袜精品丝袜在线| 亚洲视频免费在线观看| 亚洲男同性恋视频| 亚洲国产精品久久艾草纯爱| 亚洲午夜久久久久久久久久久| 一区二区三区欧美日韩| 一区二区久久久| 亚洲va韩国va欧美va精品| 亚洲午夜免费电影| 久久精品久久精品| 国产乱子伦一区二区三区国色天香 | 国模无码大尺度一区二区三区| 国产丶欧美丶日本不卡视频| 99视频一区二区三区| 欧美三级午夜理伦三级中视频| 欧美日韩夫妻久久| 精品成人一区二区三区四区| 中文字幕一区日韩精品欧美| 成人欧美一区二区三区1314| 亚洲国产精品自拍| 久久精品二区亚洲w码| 国产不卡免费视频| 欧美日韩中文一区| 久久免费的精品国产v∧| 亚洲欧美成人一区二区三区| 性做久久久久久久免费看| 极品美女销魂一区二区三区免费| 成人av资源下载| 欧美日韩精品一区视频| 久久嫩草精品久久久精品| 自拍偷拍亚洲激情| 蜜臀av国产精品久久久久| 丁香桃色午夜亚洲一区二区三区| 91色porny| 精品88久久久久88久久久| 亚洲欧美区自拍先锋| 青青草视频一区| 91视频你懂的| 精品福利一二区| 亚洲国产精品自拍| 成人av在线观| 精品久久久久香蕉网| 一区二区三区日韩精品| 国产丶欧美丶日本不卡视频| 欧美三级三级三级| 国产精品久久久一区麻豆最新章节| 亚洲成年人影院| 成人精品免费网站| 日韩三级视频在线观看| 亚洲激情综合网| 国产成人高清视频| 日韩欧美色电影| 亚洲一区二区三区爽爽爽爽爽| 国产91精品精华液一区二区三区 | 国产不卡在线播放| 日韩午夜激情av| 亚洲一区二区三区国产| 成人av在线网站| 久久久午夜精品理论片中文字幕| 亚洲成人1区2区| 在线免费不卡视频| 亚洲男人的天堂在线aⅴ视频| 国产精品一二三| 精品免费99久久| 日日夜夜免费精品| 欧洲国内综合视频| 亚洲精品va在线观看| 99re这里只有精品首页| 久久久亚洲午夜电影| 久热成人在线视频| 精品久久人人做人人爱| 美女一区二区久久| 91精品国产综合久久精品| 香蕉成人伊视频在线观看| 欧美曰成人黄网| 亚洲一区在线观看视频| 色婷婷久久综合| 亚洲视频免费在线观看| 97精品久久久久中文字幕| 中文字幕一区二区三区在线播放| 国产精品1区2区3区在线观看| 久久久久久黄色| 国产乱子轮精品视频| 久久久不卡网国产精品一区| 国产精品一二一区| 国产午夜一区二区三区| 成人综合日日夜夜| 中文字幕一区二区三区乱码在线 | 国产无遮挡一区二区三区毛片日本| 久久精品久久精品| 久久精品综合网| 成人激情电影免费在线观看| 中文字幕亚洲区| 色吧成人激情小说| 亚洲一区国产视频| 91.com视频| 国产在线视频不卡二| 中文字幕第一页久久| 91在线精品秘密一区二区| 亚洲欧美激情一区二区| 欧美日韩在线播放一区| 麻豆精品一区二区三区| 国产精品久久久久桃色tv| 精品国产区一区| 中文字幕一区二区三区色视频 | 国产成人精品一区二区三区网站观看| 欧美日韩国产经典色站一区二区三区| 免费三级欧美电影| 一区二区欧美在线观看| 国产拍揄自揄精品视频麻豆| 日韩一区二区三区免费观看| 在线免费一区三区| 日韩亚洲欧美一区二区三区| 中文字幕av一区二区三区高| 在线视频亚洲一区| 老司机午夜精品| 中文字幕一区二区视频| 6080日韩午夜伦伦午夜伦| 激情文学综合网|