]> git.kernelconcepts.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)
committerLothar Waßmann <LW@KARO-electronics.de>
Wed, 9 Sep 2015 11:48:58 +0000 (13:48 +0200)
commit24b6eabbdb3d62ed52a7298b6a0da6bb373e8626
treef5fb0cde23b4a33b07b5895dde686912b396175a
parentca4945a07cea038b45034b9b531b90b0270a47da
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