[U-Boot] [U-Boot-DM] FPGA driver over PCI bus

Simon Glass sjg at chromium.org
Sat Sep 3 00:52:46 CEST 2016


Hi Max,

On 1 September 2016 at 08:46, Max Ruttenberg
<mruttenberg at emutechnology.com> wrote:
>
> Hi,
>

(we should probably close down the u-boot-dm list - please use the main one)

> I'm find myself clueless in regards to writing a driver for an FPGA over a
> PCI bus. This U-Boot is running on an NXP t102xrdb board family, if that
> matters.
>
> The documentation in doc/driver-model/pci-info.txt mentions that I can use
> a macro named U_BOOT_PCI_DEVICE as alternative to listing my device in a
> device tree.
>
> I found an example of this in drivers/net/e1000.c, and I tried to follow it
> as much as was applicable (this is an ethernet driver, which my driver is
> not).
>
> But when U-Boot starts up, my "bind" function is never called, even though
> I can tell that my device with the corresponding vendor and device id is
> detected using the "pci [bus]" command.
>
> I appreciate any help I can get.

Are you starting up PCI? For example, with:

ret = uclass_get_device(UCLASS_PCI, 0, &bus);

If you are, then it should scan the bus and find and bind all the
devices, in pci_bind_bus_devices(). You can add DEBUG to the very top
of that file to see.

But if you know the device is there, you may as well create a device
tree-node for it. See chromebook_link.dts 'pci' node for an example.
Then you can request the device directly, and PCI will be started up
automatically.

Regards,
Simon


More information about the U-Boot mailing list