]> git.karo-electronics.de Git - karo-tx-uboot.git/commit
dm: pci: Add support for PCI driver matching
authorSimon Glass <sjg@chromium.org>
Mon, 6 Jul 2015 22:47:44 +0000 (16:47 -0600)
committerSimon Glass <sjg@chromium.org>
Tue, 21 Jul 2015 23:39:38 +0000 (17:39 -0600)
commitaba92962498609bcfee7a2b5332aa97440179f1d
treeb6f45410c865d3b0e141ef4d01c00365b9d9e6e8
parente62b5266356ab99ac9296cf1b323d873e7dd6add
dm: pci: Add support for PCI driver matching

At present all PCI devices must be present in the device tree in order to
be used. Many or most PCI devices don't require any configuration other than
that which is done automatically by U-Boot. It is inefficent to add a node
with nothing but a compatible string in order to get a device working.

Add a mechanism whereby PCI drivers can be declared along with the device
parameters they support (vendor/device/class). When no suitable driver is
found in the device tree the list of such devices is consulted to determine
the correct driver. If this also fails, then a generic driver is used as
before.

The mechanism used is very similar to that provided by Linux and the header
file defintions are copied from Linux 4.1.

Signed-off-by: Simon Glass <sjg@chromium.org>
Reviewed-by: Joe Hershberger <joe.hershberger@ni.com>
common/cmd_tsi148.c
drivers/pci/pci-uclass.c
include/pci.h