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
已解决! 转到解答。
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
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!
-----------------------------------------------------------------------------------------------------------------------
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