We use imx6dl as PCIE RC mode , the pmc-24dsi12 as EP side.
At x86 system , it diver OK. the same divers we used in imx6dl , but there have some problem:
The PCIE can link up , and read config is ok , the device ID is OK , and read BAR addr is OK.
but when use ioremap() to convert BAR addr as virtual addr , and use readl() to read the virtual addr , the result is always 0.
1、开机启动时pcie的信息
pci 0000:02:00.0: BAR 0: assigned [mem 0x01100000-0x011000ff]
pci 0000:02:00.0: BAR 1: assigned [io 0x1000-0x10ff]
pci 0000:02:00.0: BAR 2: assigned [mem 0x01100100-0x011001ff]
2、lspci命令查询
00:00.0 PCI bridge: Device 16c3:abcd (rev 01)
01:00.0 PCI bridge: Tundra Semiconductor Corp. Device 8111 (rev 02)
02:00.0 Signal processing controller: PLX Technology, Inc. PCI9080 32-bit; 33MHz PCI <-> IOBus Bridge (rev 03)
3、pcie 24dsi采集卡驱动的内存映射
BAR0: Reg 0x01100000, Map mem, Adrs 0x01100000, Size 256, vaddr 0xC0A41000, Access RO
BAR1: Reg 0x00001000, Map I/O, Adrs 0x00001000, Size 256, vaddr 0x1000, Access RO
BAR2: Reg 0x01100100, Map mem, Adrs 0x01100100, Size 256, vaddr 0xC0A49100, Access RW
4、驱动内存访问
Mem Mx u32: rx 00000000, M 0000000F, V 0000000C, tx 0000000C: va 0xC0A4106C
读取0xC0A4106C的值为00000000
读取调用函数readl()
which version of bsp are you using?
we use 4.9.88
could you try the newer version of BSP? (e.g. L4.14.98_2.3.0)
now we use 4.1.15 , it's work fine!
怎么没有人帮忙提点一下呀?