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

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

?? hal_x86.c

?? ISP 1761 usb host driver for linux
?? C
?? 第 1 頁 / 共 3 頁
字號:
 *              __u16 dir          ---> Direction ( Inc or Dec)
 *                      
 *  Output     int Length  ----> Number of bytes read 
 *
 *  Called by: system function 
 * 
 * 
 *--------------------------------------------------------------*/

/* Memory read function IO */
int     
isp1761_mem_write(struct isp1761_dev *dev, 
        __u32 start_add, __u32 end_add, 
        __u32 * buffer, __u32 length,
        __u16 dir)
{
    u8 *temp_base_mem = 0;
    int a = length;
    u8 *temp = (u8*)buffer;
    u8 one      =(u8 )(*buffer);
    u16 two     =(u16 )(*buffer);       
    temp_base_mem = (dev->baseaddress + start_add);

    if(a == 1){
        writeb(one,temp_base_mem);
        return 0;
    }
    if(a == 2){
        writew(two,temp_base_mem);
        return 0;
    }

    while(a>0){         
        writel(*buffer, temp_base_mem);
        temp_base_mem = temp_base_mem+4;
        start_add +=4;
        a -=4;
        if(a <= 0)
            break;
        buffer += 1;

    }
    return ((a < 0) || (a == 0))?0:(-1);

}
/*--------------------------------------------------------------*
 *  
 * Module dtatils: isp1761_check_mem_region
 *
 *  Check the memory region for Memory Mapping 
 *  Check with the system about the availability of the region,
 *  and returns success, if available.
 *
 *  Input: struct isp1761_driver *drv  --> Driver structure.
 *  
 *  Output result  
 *         
 *
 *  Called by: system function 
 * 
 * 
 *--------------------------------------------------------------*/

int isp1761_check_mem_region(struct isp1761_dev *dev)
{
    int ret;
    ret=check_mem_region(dev->start, dev->length);
    return ret;
}/* End of isp1761_check_mem_region */

/*--------------------------------------------------------------*
 *  
 * Module dtatils: isp1761_request_mem_region
 isp1761_release_mem_region
 isp1761_get_mem_params

 *
 *  If the check returns Success, we can request the region for 
 *  Memory mapping of our chip memory
 *
 *  Input: struct isp1761_driver *drv  --> Driver structure.
 *  
 *  Output result  
 *         
 *
 *  Called by: system function 
 * 
 * 
 *--------------------------------------------------------------*/

struct resource* isp1761_request_mem_region(struct isp1761_dev *dev)
{
    dev->mem_res = request_mem_region(dev->start, dev->length, "Isp1761_device");
    return dev->mem_res;
}/* End of isp1761_request_mem_region */

/* Release an already acquired memory region.
   It should be done at the rmmod of the module */
void isp1761_release_mem_region(struct isp1761_dev* dev)
{
    release_mem_region (dev->start, dev->length);
}

/* Get the start address and length of Mapped Memory */ 
void isp1761_get_mem_params(struct isp1761_dev *dev,struct isp1761_driver *drv)
{
    dev->start  =isp1761_loc_dev[drv->index].start;
    dev->length =isp1761_loc_dev[drv->index].length;
}/* End of isp1761_get_mem_params*/


/*--------------------------------------------------------------*
 *  
 * Module dtatils: isp1761_request_irq
 *
 * This function registers the ISR of driver with this driver.
 * Since there is only one interrupt line, when the first driver
 * is registerd, will call the system function request_irq. The PLX
 * bridge needs enabling of interrupt in the interrupt control register to 
 * pass the local interrupts to the PCI (cpu).
 * For later registrations will just update the variables. On ISR, this driver
 * will look for registered handlers and calls the corresponding driver's
 * ISR "handler" function with "isr_data" as parameter.
 *
 *  Input: struct 
 *              (void (*handler)(struct isp1761_dev *, void *)-->handler.
 *               isp1761_driver *drv  --> Driver structure.
 *  Output result 
 *         0= complete 
 *         1= error.
 *
 *  Called by: system function module_init 
 * 
 * 
 *--------------------------------------------------------------*/

int isp1761_request_irq(void (*handler)(struct isp1761_dev *, void *),
        struct isp1761_dev *dev, void *isr_data) 
{
    int result = 0;
    u32 intcsr = 0;
    hal_entry("%s: Entered\n",__FUNCTION__);
    hal_int("isp1761_request_irq: dev->index %x\n",dev->index);
    if(dev->index == ISP1761_DC){
        result = request_irq(dev->irq, isp1761_pci_dc_isr,
                SA_SHIRQ,
                dev->name,
                isr_data);
    }else {
        result= request_irq(dev->irq,isp1761_pci_isr,
                SA_SHIRQ,
                dev->name,
                isr_data);
    }

    /*CONFIGURE PCI/PLX interrupt*/
    intcsr = readl(iobase+0x68);
    intcsr |= 0x900;
    writel(intcsr,iobase+0x68);

    /*Interrupt handler routine*/
    dev->handler = handler;
    dev->isr_data = isr_data;
    hal_int("isp1761_request_irq: dev->handler %s\n",dev->handler);
    hal_int("isp1761_request_irq: dev->isr_data %x\n",dev->isr_data);
    hal_entry("%s: Exit\n",__FUNCTION__);
    return result;
} /* End of isp1761_request_irq */

/*--------------------------------------------------------------*
 *  
 * Module dtatils: isp1761_free_irq
 *
 * This function de-registers the ISR of driver with this driver.
 * Since there is only one interrupt line, when the last driver
 * is de-registerd, will call the system function free_irq. The PLX
 * bridge needs disabling of interrupt in the interrupt control register to 
 * block the local interrupts to the PCI (cpu).
 *
 *  Input: struct 
 *              (void (*handler)(struct isp1761_dev *, void *)-->handler.
 *               isp1761_driver *drv  --> Driver structure.
 *  Output result 
 *         0= complete 
 *         1= error.
 *
 *  Called by: system function module_init 
 * 
 * 
 *--------------------------------------------------------------*/

void isp1761_free_irq(struct isp1761_dev *dev, void *isr_data)
{
    __u32       intcsr;
    hal_int(("isp1761_free_irq(dev=%p,isr_data=%p)\n",dev,isr_data));
    free_irq(dev->irq,isr_data);
    /*disable the plx/pci interrupt*/
    intcsr = readl(iobase+0x68);
    intcsr &= ~0x900;
    writel(intcsr,iobase+0x68);

} /* isp1761_free_irq */



/* Allocate Fragmented kernel Memory */
void* isp_1761_kmalloc(size_t size,int flags)
{
    void* ret;
    ret =kmalloc(size,flags);
    return ret;
}

/* Free the memory allocated by kmalloc */
void isp_1761_kfree(const void* objp)
{
    kfree(objp);
}

/* Allocate Contiguous kernel Memory */
void* isp_1761_vmalloc(__u32 size, __u16 flags, pgprot_t prot)
{
    void* ret;
    ret =__vmalloc(size, flags, prot);
    return ret;
}

/* Free the memory allocated by vmalloc */
void isp_1761_vfree(const void* objp)
{
    kfree(objp);
}



/*--------------------------------------------------------------*
 *  
 * Module dtatils: isp1761_register_driver
 *
 * This function is used by top driver (OTG, HCD, DCD) to register
 * their communication functions (probe, remove, suspend, resume) using
 * the drv data structure.
 * This function will call the probe function of the driver if the ISP1761
 * corresponding to the driver is enabled
 *
 *  Input: struct isp1761_driver *drv  --> Driver structure.
 *  Output result 
 *         0= complete 
 *         1= error.
 *
 *  Called by: system function module_init 
 * 
 * 
 *--------------------------------------------------------------*/

int     isp1761_register_driver(struct isp1761_driver *drv) 
{
    struct isp1761_dev  *dev;
    int result;
    isp1761_id *id;

    hal_entry("%s: Entered\n",__FUNCTION__);
    info("isp1761_register_driver(drv=%p) \n",drv);

    if(!drv) return -EINVAL;
    dev = &isp1761_loc_dev[drv->index];
    if(drv->index == ISP1761_DC){/*FIX for device*/
        result = drv->probe(dev,drv->id);
    }else{              
        id = drv->id;
        if(dev->active) result = drv->probe(dev,id);
        else    result = -ENODEV;
    }

    if(result >= 0 ) {
        printk(KERN_INFO __FILE__ ": Registered Driver %s\n",
                drv->name);
        dev->driver = drv;
    }
    hal_entry("%s: Exit\n",__FUNCTION__);
    return result;
} /* End of isp1761_register_driver */


/*--------------------------------------------------------------*
 *  
 * Module dtatils: isp1761_unregister_driver
 *
 * This function is used by top driver (OTG, HCD, DCD) to de-register
 * their communication functions (probe, remove, suspend, resume) using
 * the drv data structure.
 * This function will check whether the driver is registered or not and
 * call the remove function of the driver if registered
 *
 *  Input: struct isp1761_driver *drv  --> Driver structure.
 *  Output result 
 *         0= complete 
 *         1= error.
 *
 *  Called by: system function module_init 
 * 
 * 
 *--------------------------------------------------------------*/


void    isp1761_unregister_driver(struct isp1761_driver *drv)
{
    struct isp1761_dev  *dev;
    hal_entry("%s: Entered\n",__FUNCTION__);

    info("isp1761_unregister_driver(drv=%p)\n",drv);
    dev = &isp1761_loc_dev[drv->index];
    if(dev->driver == drv) {
        /* driver registered is same as the requestig driver */
        drv->remove(dev);
        dev->driver = NULL;
        info(": De-registered Driver %s\n",
                drv->name);
        return;
    }
    hal_entry("%s: Exit\n",__FUNCTION__);
} /* End of isp1761_unregister_driver */


/*--------------------------------------------------------------*
 *               ISP1761 PCI driver interface routine.
 *--------------------------------------------------------------*/


/*--------------------------------------------------------------*
 *
 *  Module dtatils: isp1761_pci_module_init
 *
 *  This  is the module initialization function. It registers to 
 *  PCI driver for a PLX PCI bridge device. And also resets the
 *  internal data structures before registering to PCI driver.
 *
 *  Input: void 
 *  Output result 
 *         0= complete 
 *         1= error.
 *
 *  Called by: system function module_init 
 * 
 * 
 * 
 -------------------------------------------------------------------*/
static int __init isp1761_pci_module_init (void) 
{
    int result = 0;
    hal_entry("%s: Entered\n",__FUNCTION__);
    memset(isp1761_loc_dev,0,sizeof(isp1761_loc_dev));

    if((result = pci_module_init(&isp1761_pci_driver)) < 0) {
        printk("PCI Iinitialization Fail(error = %d)\n",result);
        return result;
    }
    else
        info(": %s PCI Initialization Success \n",isp1761_driver_name);
    hal_entry("%s: Exit\n",__FUNCTION__);
    return result;
}

/*--------------------------------------------------------------*
 *
 *  Module dtatils: isp1761_pci_module_cleanup
 *
 * This  is the module cleanup function. It de-registers from 
 * PCI driver and resets the internal data structures.
 *
 *  Input: void 
 *  Output void
 *
 *  Called by: system function module_cleanup 
 * 
 * 

?? 快捷鍵說明

復制代碼 Ctrl + C
搜索代碼 Ctrl + F
全屏模式 F11
切換主題 Ctrl + Shift + D
顯示快捷鍵 ?
增大字號 Ctrl + =
減小字號 Ctrl + -
亚洲欧美第一页_禁久久精品乱码_粉嫩av一区二区三区免费野_久草精品视频
免费精品视频在线| 亚洲特级片在线| 欧美中文字幕久久| 欧美亚洲综合另类| 在线观看日韩高清av| 欧美日韩一区二区三区四区五区| 91捆绑美女网站| 欧美影片第一页| 欧美精品乱人伦久久久久久| 日韩一区二区三区电影| 精品三级在线观看| 久久精品网站免费观看| 中文字幕一区日韩精品欧美| 亚洲女人****多毛耸耸8| 亚洲欧美视频在线观看视频| 午夜精品国产更新| 久久99久久精品| 不卡的看片网站| 欧美日韩一区二区三区不卡| 欧美va亚洲va| 亚洲欧美一区二区在线观看| 亚洲网友自拍偷拍| 韩国女主播成人在线| 成人亚洲一区二区一| 欧美日韩高清影院| 久久久不卡影院| 亚洲午夜在线视频| 国产成人在线视频免费播放| www.在线成人| 欧美一区日韩一区| 中文字幕一区在线观看视频| 亚洲成人免费av| 成人高清免费在线播放| 欧美精品 国产精品| 欧美激情一区二区三区在线| 性欧美大战久久久久久久久| 国产精品99久久久久久似苏梦涵| 色噜噜狠狠成人中文综合| 日韩一级二级三级精品视频| 亚洲图片激情小说| 国产精品资源站在线| 欧美日韩一级二级三级| 中文字幕av免费专区久久| 日韩福利电影在线观看| 99久久亚洲一区二区三区青草| 欧美日韩国产123区| 亚洲日本护士毛茸茸| 久久国产精品一区二区| 欧美日韩国产影片| 一区二区三区国产精品| 国产一区二区伦理| 欧美人牲a欧美精品| 亚洲私人黄色宅男| 国产91在线观看| 日韩视频国产视频| 视频一区二区不卡| 欧美无砖专区一中文字| 亚洲色欲色欲www| 国产91综合网| 国产精品网站在线| 国产成人免费在线观看| 久久新电视剧免费观看| 狂野欧美性猛交blacked| 97精品久久久午夜一区二区三区| 欧美日韩在线不卡| 国产精品第四页| 国产精品自拍av| 久久久五月婷婷| 久久99国产精品久久99| 欧美一区二区三区的| 日韩电影在线一区二区三区| 91黄色小视频| 亚洲已满18点击进入久久| 91视频一区二区| 亚洲精品视频在线观看免费| av在线不卡网| 亚洲综合色网站| 色综合久久久久久久久久久| 亚洲欧洲一区二区三区| 99精品国产视频| 亚洲日本青草视频在线怡红院| 色呦呦国产精品| 亚洲成av人在线观看| 欧美精品xxxxbbbb| 久久精品国产亚洲高清剧情介绍| 久久综合色之久久综合| 国产suv一区二区三区88区| 中文字幕av不卡| 欧美性videosxxxxx| 首页国产欧美日韩丝袜| 久久免费电影网| 99国产精品视频免费观看| 亚洲自拍偷拍图区| 日韩欧美国产三级| 成人黄色av电影| 午夜国产精品一区| 欧美不卡在线视频| 99久久免费视频.com| 亚洲不卡av一区二区三区| 日韩精品一区在线观看| 成人精品视频一区二区三区尤物| 亚洲欧美综合色| 欧美一区二区免费| 91亚洲国产成人精品一区二区三 | 欧美日韩一区高清| 蜜桃久久久久久久| 亚洲天堂免费看| 日韩一级片网址| 91麻豆福利精品推荐| 久久99国产精品久久| 亚洲欧美成人一区二区三区| 日韩一区二区三区电影| 91丨porny丨国产| 国产精一区二区三区| 一区二区三区国产豹纹内裤在线| 欧美精品一区二区精品网| 99久久综合99久久综合网站| 蜜臀av性久久久久蜜臀av麻豆| 国产精品丝袜一区| 日韩免费一区二区| 色94色欧美sute亚洲线路一ni | 91福利视频久久久久| 久久99精品久久久久久久久久久久 | 美女一区二区视频| 一区二区在线看| 国产午夜亚洲精品理论片色戒| 欧美高清性hdvideosex| 91福利资源站| 91免费视频网址| 成人一级视频在线观看| 国产综合久久久久影院| 免费在线成人网| 三级欧美在线一区| 亚洲精品成人a在线观看| 国产精品久久毛片| 久久精品男人天堂av| 日韩欧美电影在线| 91精品国产综合久久福利软件| 色琪琪一区二区三区亚洲区| 成人亚洲一区二区一| 粉嫩aⅴ一区二区三区四区| 久久99精品国产91久久来源| 麻豆久久久久久| 蜜桃av噜噜一区| 精品亚洲欧美一区| 麻豆成人综合网| 久久99精品久久久| 国产一区二区三区香蕉| 国产一区视频导航| 国产精品一区二区在线观看不卡| 日韩av电影一区| 蜜臀精品一区二区三区在线观看| 日日噜噜夜夜狠狠视频欧美人 | 久久精品亚洲精品国产欧美 | 欧美国产成人在线| 久久精品欧美一区二区三区麻豆| 久久久亚洲国产美女国产盗摄| 欧美成人性福生活免费看| 日韩精品最新网址| 精品盗摄一区二区三区| 国产亚洲精品bt天堂精选| 欧美激情一区二区三区全黄 | 欧美色图激情小说| 欧美日韩国产首页| 精品国产麻豆免费人成网站| 欧美精品一区在线观看| 国产精品免费观看视频| 亚洲激情av在线| 日韩国产欧美在线视频| 久久er99精品| av在线不卡网| 91精选在线观看| 久久人人爽爽爽人久久久| 国产三级欧美三级日产三级99 | 欧美丝袜自拍制服另类| 5858s免费视频成人| 久久综合色婷婷| 亚洲靠逼com| 日韩av一区二区在线影视| 国产老肥熟一区二区三区| 97久久超碰国产精品电影| 5月丁香婷婷综合| 中文字幕av一区二区三区| 亚洲高清免费视频| 国产一二精品视频| 色婷婷国产精品久久包臀| 日韩一区二区三区精品视频| 欧美激情一区二区三区全黄| 婷婷中文字幕一区三区| 国产91色综合久久免费分享| 91电影在线观看| 久久色在线观看| 亚洲国产精品久久久久婷婷884| 另类调教123区| 欧洲色大大久久| 久久久久久亚洲综合影院红桃| 亚洲曰韩产成在线| 粉嫩欧美一区二区三区高清影视| 欧美精品三级在线观看| 亚洲欧洲日产国产综合网|