This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

关于pcie驱动程序问题

Other Parts Discussed in Thread: AM5726

需要用am5726与6657通过pcie进行数据交互,写了一个驱动为什么在调用pci_enable_device()函数会失败加载模块是显示

0000:01:00.0: can't enable device: BAR 0 [mem 0x00000000-0x0fffffff] not claimed

5726为RC端,6657 为EP

5726查看EP的配置空间如下:

root@am57xx-evm:/# lspci -s 01:00.0 -xxv                                        
01:00.0 Non-VGA unclassified device: Texas Instruments Device 8888 (rev 01)     
        Flags: bus master, fast devsel, latency 0                               
        Memory at <unassigned> (32-bit, non-prefetchable) [size=256M]           
        Memory at 70000000 (32-bit, non-prefetchable) [size=256M]               
        Memory at <unassigned> (32-bit, prefetchable) [size=1M]                 
        Memory at <unassigned> (32-bit, prefetchable) [size=64K]                
        Memory at <unassigned> (32-bit, prefetchable) [size=4K]                 
        Memory at <unassigned> (32-bit, prefetchable) [size=64K]                
        Capabilities: [40] Power Management version 3                           
        Capabilities: [50] MSI: Enable- Count=1/1 Maskable- 64bit+              
        Capabilities: [70] Express Endpoint, MSI 00                             
        Capabilities: [100] Advanced Error Reporting                            
00: 4c 10 88 88 46 01 10 00 01 00 00 00 10 00 00 00                             
10: 00 00 00 00 00 00 00 70 08 00 00 00 08 00 00 00                             
20: 08 00 00 00 08 00 00 00 00 00 00 00 00 00 01 00                             
30: 00 00 00 00 40 00 00 00 00 00 00 00 00 01 00 00 

感觉bar0并没有用,不知该怎么办了,请教各位大神指点,谢谢