Pci_register_driver(struct pci_driver *drv)
Static struct pci_driver pci_driver= {
.name = DRV_NAME,
.id_table = pci_pci_tbl,
.probe = pci_init_one,
.remove = _devexit_p(pci_remove_one),
}
l Pci配置空间
Pci_read_config_byte/word/dword(struct pci_dev *pdev,int offset,int *value)
Pci_write_config_byte/word/dword(struct pci_dev *pdev,int offset,int *value)
l Pci的I/O和内存空间
Pci_resource_start(struct pci_dev *dev,int bar) bar的范围0-5;功能:从配置区相应寄存器得到I/亏散O区域的基址
Pci_resource_length(struct pci_dev *dev,int bar)bar的范围0-5;功能:从配置区相应寄存器得销者氏到I/O区域的内存区域长度
Request_mem_fegion(io_base,length,name)申请I/O端口
Request_mem_region(io_base,length,name)释放I/O端口
Pci_enable_device启用设备的I/O
Pci_set_master设嫌辩定设备工作在总线主设备模式
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)