嵌入式linux爱好者
分类: LINUX
2019-03-24 23:13:29
原文地址:任意位置访问pci设备 作者:deep_pro
while ((dev = pci_get_device(PCI_ANY_ID, PCI_ANY_ID, dev))) ide_scan_pcidev(dev);
static void check_1a(void) { struct pci_dev *ls1a = NULL; int i; ls1a = pci_get_device(0x104a,0x0000, NULL); if(ls1a==NULL) { printk("pci_get_device find ls1a error\n"); } for(i=0;i<6;i++) { printk("--- bar %d:start %x length %x flags %x \n",i,pci_resource_start(ls1a, i),pci_resource_len(ls1a, i),pci_resource_flags(ls1a, i)); } }