Pcie probe problem

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Pcie probe problem

跳至解决方案
1,691 次查看
christophe
Contributor V

Hi all,

Under linux 3.0.35_4.1, a imx6q-like board is connected to a fpga with a pcie link. Pcie has been configurated like that:

iMX6 PCIe PCIe RC mode imx_pcie_pltfm_probe entering.

PCIE: imx_pcie_pltfm_probe start link up.

IMX PCIe port: link up.

PCI: bus0: Fast back to back transfers disabled

PCI: bus1: Fast back to back transfers disabled

pci 0000:00:00.0: BAR 0: assigned [mem 0x01000000-0x010fffff 64bit pref]

pci 0000:00:00.0: BAR 0: set to [mem 0x01000000-0x010fffff 64bit pref] (PCI address [0x1000000-0x10fffff])

pci 0000:00:00.0: BAR 8: assigned [mem 0x01100000-0x011fffff]

pci 0000:00:00.0: BAR 6: assigned [mem 0x01200000-0x0120ffff pref]

pci 0000:01:00.0: BAR 0: assigned [mem 0x01100000-0x011007ff]

pci 0000:01:00.0: BAR 0: set to [mem 0x01100000-0x011007ff] (PCI address [0x1100000-0x11007ff])

pci 0000:00:00.0: PCI bridge to [bus 01-01]

pci 0000:00:00.0:   bridge window [io  disabled]

pci 0000:00:00.0:   bridge window [mem 0x01100000-0x011fffff]

pci 0000:00:00.0:   bridge window [mem pref disabled]

lspci gives:

00:00.0 Class 0604: 16c3:abcd

01:00.0 Class 0580: 10ee:7011

It seems to me correct.

Now, a user device is added. Driiver is well initialized but not probed. Code in board-mx6q_sabredsd.c is like that:

static struct platform_device pcie_fpga_data =

{

    .name           = "pcie_fpga",

    .id                  = -1,

    .num_resources  = 0,

};

  /* Register device */

    platform_device_register(&pcie_fpga_data);

Is this registration correct ? we've found no example to do this and maybe there's something special to do ?

Best regards,

Christophe

标签 (1)
0 项奖励
回复
1 解答
1,330 次查看
christophe
Contributor V

Hi Platon,

Yes but do you have an example of board-mx6q_sabresd.c that will contain pci initialization. It's possible we encounter a mismatch, but before, pci initialization is not clear for us in this file.

And in board-mx6q_sabresd.c from 3.0.35_4.1, pci is not initialized by default.

Regards,

Christophe

在原帖中查看解决方案

0 项奖励
回复
3 回复数
1,330 次查看
bpe
NXP Employee
NXP Employee

My apologies for delayed response. Probing function is invoked by

pci_register_driver() when the device is available or later by the

PCI subsystem is the device is hot-plugged. Failure to enter the

probing function may indicate a mismatch in the device ID or the

device has already been claimed by another module. Anyway, stepping

through pci_register_driver() with a debugger should give some ideas.

More information can be found here:

http://www.cs.fsu.edu/~baker/devices/lxr/http/source/linux/Documentation/PCI/pci.txt

As of board-mx6q_sabresd.c, tis file contains various board-level

initialization functions which are not directly related to PCI

devices probing or registering.


Have a great day,
Platon

-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------

0 项奖励
回复
1,331 次查看
christophe
Contributor V

Hi Platon,

Yes but do you have an example of board-mx6q_sabresd.c that will contain pci initialization. It's possible we encounter a mismatch, but before, pci initialization is not clear for us in this file.

And in board-mx6q_sabresd.c from 3.0.35_4.1, pci is not initialized by default.

Regards,

Christophe

0 项奖励
回复
1,330 次查看
christophe
Contributor V

Hi all,

Could someone from Freescale gives the correct way to initialize pcie in board-mx6q_sabredsd.c ?

BR,

Christophe

0 项奖励
回复