[Skiboot] [PATCH v5 00/15] PCI Slot Management
gwshan at linux.vnet.ibm.com
Mon Apr 27 16:26:18 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.
* 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 (15):
platforms/firenze: Fix I2C clock source frequency
hw/p8-i2c: Speed up SMBUS_WRITE
hw/p8-i2c: Allow to disable timeout
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: Refactor PCI stuff
PCI: Reinitialize devices on slot reset
core/pci: PCI slot
core/opal: Switch to PCI slot
doc: PCI slot
core/Makefile.inc | 2 +-
core/pci-opal.c | 168 ++++--
core/pci-slot.c | 914 +++++++++++++++++++++++++++++++
core/pci.c | 336 ++++++------
doc/pci-slot-properties.txt | 17 -
doc/pci-slot.txt | 87 +++
hdata/spira.c | 19 +
hdata/spira.h | 8 +-
hw/p5ioc2-phb.c | 367 ++-----------
hw/p7ioc-phb.c | 1149 ++++++++++++++++-----------------------
hw/p8-i2c.c | 42 +-
hw/phb3.c | 695 ++++++++++-------------
include/i2c.h | 9 +
include/opal-api.h | 6 +-
include/p5ioc2.h | 10 +-
include/p7ioc.h | 49 +-
include/pci-slot.h | 251 +++++++++
include/pci.h | 164 +-----
include/phb3.h | 53 +-
include/platform.h | 3 +-
platforms/ibm-fsp/Makefile.inc | 3 +-
platforms/ibm-fsp/apollo-pci.c | 98 ++++
platforms/ibm-fsp/apollo.c | 23 +-
platforms/ibm-fsp/firenze-pci.c | 1043 +++++++++++++++++++++++++++++++++++
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 +-
28 files changed, 3929 insertions(+), 2235 deletions(-)
create mode 100644 core/pci-slot.c
delete mode 100644 doc/pci-slot-properties.txt
create mode 100644 doc/pci-slot.txt
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
More information about the Skiboot