Pcie probe problem

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

Pcie probe problem

Jump to solution
1,754 Views
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

Labels (1)
0 Kudos
Reply
1 Solution
1,393 Views
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

View solution in original post

0 Kudos
Reply
3 Replies
1,393 Views
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 Kudos
Reply
1,394 Views
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 Kudos
Reply
1,393 Views
christophe
Contributor V

Hi all,

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

BR,

Christophe

0 Kudos
Reply