IMX6DL PCIE can not read mem space

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

IMX6DL PCIE can not read mem space

2,026 Views
sbuul
Contributor I

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()

Labels (1)
0 Kudos
Reply
5 Replies

1,868 Views
jimmychan
NXP TechSupport
NXP TechSupport

which version of bsp are you using?

0 Kudos
Reply

1,868 Views
sbuul
Contributor I

we use 4.9.88

0 Kudos
Reply

1,868 Views
jimmychan
NXP TechSupport
NXP TechSupport

could you try the newer version of BSP? (e.g. L4.14.98_2.3.0)

0 Kudos
Reply

1,868 Views
sbuul
Contributor I

now we use 4.1.15 , it's work fine!

0 Kudos
Reply

1,868 Views
sbuul
Contributor I

怎么没有人帮忙提点一下呀?

0 Kudos
Reply