[Skiboot] [PATCH v7 00/17] PCI Slot Management
Gavin Shan
gwshan at linux.vnet.ibm.com
Thu Jun 4 16:18:52 AEST 2015
The series of patches intend to support PCI slots for various tasks like
retrieving PCI slot status, PCI slot reset, and PCI slot hotplug. The
design is highlighted as below:
* Each PHB is expected to have one associated "PHB" slot, which is
created by platform.
* Each PCI slot is created by platform as well, which might inherit
some properties from PHB slot.
* Currently, Firenze is the only one platform that populates PCI slots.
* Each PCI slot has couple of callbacks implemented to support various
functions it should support in pci-slot.c, which can be overrided by
platforms to have their own particular behaviour or PCI slot properties.
* The PCI slot functionality is implemented with state machine, which
is inherited from Ben's original code to support PHBs. The PCI slots
allowed to be overrided by platforms as well.
* When removing or adding adapter to one particular PCI slot, the device
nodes tied through the PCI slot will be removed or added (after rescanning).
All device-tree changes is formated as message sent to OS, which needs
those inforamtion to populate pci_dn and eeh_dev.
=========
Changelog
=========
v7:
* Introduce global counter for device-tree and individual device-node,
which helps to trace the dynamic changes to the device-tree as
suggested by Ben.
* opal_get_overlay_dt() introduced to retrieve last change to the
device-tree. Which will be used by Linux's OF overlay to patch
kernel's device-tree dynamically.
v6:
* Rebased to commit 0d275bc ("Fix boot-tests for BMC machines due to FSP
password in dotfile").
* Remove SDC/SDL check when sending I2C data to slave.
* Allow to change the default I2C request timeout, instead of disabling it.
* Split PCI slot core to two files (pci-slot.c and pcie-slot.c).
* PHB slot is created by default. It's not created by individual platforms
any more.
* Use flat device-tree blob to convey device sub-tree. The original one
based on strings has been dropped.
* Merged PATCH[v5 12/15] ("PCI: Reinitialize devices on slot reset") to
PATCH[v5 7/15] ("core/pci: PCI slot management core").
* Commit log cleanup.
v5:
* Fix I2C issues caused by wrong I2C master frequency.
* Fix reserved PE# when unmapping RID on PHB3.
* Add logic to support PCI hotplug: When one adapter is removed from the
slot, the power supply and the device nodes tied through the slot will
be cut off. When adding one adapter to PCI slot, the PCI bus leading
from the slot will be rescanned. On any PCI topology changes, the device
tree changes will be sent to OS for updating.
* Refactor the PCI slot states and remove unnecessary ones.
Gavin Shan (17):
platforms/firenze: Fix I2C clock source frequency
hw/p8-i2c: Speed up SMBUS_WRITE
hw/p8-i2c: Allow to set timeout
core/device: Introduce device node counter
core/fdt: Refactor FDT
include: Remove device_tree.h
hw/phb3: Fix reserved PE# for RID unmapping
core/pci: Allow iteration on specified devices
core/pci: Trace device tree node from PCI device
core/pci: PCI slot management core
hw/p5ioc: Support PHB slot
hw/p7ioc: Support PHB slot
hw/phb3: Support PHB slot
platforms/ibm-fsp: Support PCI slot
core/pci: PCI slot
core/opal: Switch to PCI slot
doc: PCI slot
core/Makefile.inc | 4 +-
core/device.c | 17 +
core/fdt.c | 164 ++++--
core/init.c | 3 +-
core/pci-opal.c | 168 ++++--
core/pci-slot.c | 308 +++++++++++
core/pci.c | 336 ++++++------
core/pcie-slot.c | 509 +++++++++++++++++
doc/pci-slot-properties.txt | 17 -
doc/pci-slot.txt | 87 +++
hdata/fsp.c | 1 -
hdata/memory.c | 1 -
hdata/spira.c | 19 +
hdata/spira.h | 8 +-
hw/p5ioc2-phb.c | 372 ++-----------
hw/p7ioc-phb.c | 1155 ++++++++++++++++-----------------------
hw/p8-i2c.c | 36 +-
hw/phb3.c | 699 ++++++++++-------------
include/device.h | 4 +
include/device_tree.h | 35 --
include/i2c.h | 9 +
include/opal-api.h | 7 +-
include/p5ioc2.h | 9 +-
include/p7ioc.h | 48 +-
include/pci-slot.h | 245 +++++++++
include/pci.h | 165 +-----
include/phb3.h | 52 +-
include/platform.h | 3 +-
include/skiboot.h | 3 +-
platforms/ibm-fsp/Makefile.inc | 3 +-
platforms/ibm-fsp/apollo-pci.c | 94 ++++
platforms/ibm-fsp/apollo.c | 23 +-
platforms/ibm-fsp/firenze-pci.c | 1055 +++++++++++++++++++++++++++++++++++
platforms/ibm-fsp/firenze.c | 217 +-------
platforms/ibm-fsp/ibm-fsp.h | 13 +
platforms/ibm-fsp/lxvpd.c | 383 ++++++++-----
platforms/ibm-fsp/lxvpd.h | 35 +-
37 files changed, 3981 insertions(+), 2326 deletions(-)
create mode 100644 core/pci-slot.c
create mode 100644 core/pcie-slot.c
delete mode 100644 doc/pci-slot-properties.txt
create mode 100644 doc/pci-slot.txt
delete mode 100644 include/device_tree.h
create mode 100644 include/pci-slot.h
create mode 100644 platforms/ibm-fsp/apollo-pci.c
create mode 100644 platforms/ibm-fsp/firenze-pci.c
--
2.1.0
More information about the Skiboot
mailing list