diff options
author | Russell Currey <ruscur@russell.cc> | 2017-02-24 16:36:45 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-03-03 09:49:50 +1100 |
commit | dca7b559ba83af087114a51954910e8e4b262755 (patch) | |
tree | c341102610236e10bf358f5e37e9584b115b374d /core/pci.c | |
parent | ca2d9170822c1d6a2909ade2d131c14f165d7840 (diff) | |
download | talos-skiboot-dca7b559ba83af087114a51954910e8e4b262755.tar.gz talos-skiboot-dca7b559ba83af087114a51954910e8e4b262755.zip |
pci: Add a framework for quirks
In future we may want to be able to do fixups for specific PCI devices in
skiboot, so add a small framework for doing this.
This is not intended for the same purposes as quirks in the Linux kernel,
as the PCI devices that quirks can match for in skiboot are not properly
configured. This is intended to enable having a custom path to make
changes that don't directly interact with the PCI device, for example
adding device tree entries.
Signed-off-by: Russell Currey <ruscur@russell.cc>
Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Reviewed-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
[stewart@linux.vnet.ibm.com: fix 0 vs NULL sparse warning, (C) date]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/pci.c')
-rw-r--r-- | core/pci.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -20,6 +20,7 @@ #include <pci-cfg.h> #include <pci-iov.h> #include <pci-slot.h> +#include <pci-quirk.h> #include <timebase.h> #include <device.h> #include <fsp.h> @@ -1430,6 +1431,8 @@ static void pci_add_one_device_node(struct phb *phb, if (intpin) dt_add_property_cells(np, "interrupts", intpin); + pci_handle_quirk(phb, pd, vdid & 0xffff, vdid >> 16); + /* XXX FIXME: Add a few missing ones such as * * - devsel-speed (!express) |