mbox series

[0/6] PCI hotplug on Rainier (and ZZ)

Message ID 20211018123751.72794-1-fbarrat@linux.ibm.com
Headers show
Series PCI hotplug on Rainier (and ZZ) | expand

Message

Frederic Barrat Oct. 18, 2021, 12:37 p.m. UTC
This series reworks how we power on the PCI slots on Rainier, to
follow the guidelines for firmware. While at it, it also adds support
for PCI hotplug, i.e. the ability for Linux to control the power state
of each slot through the /sys interface. Finally, it fixes the same
functionality on ZZ, since it was inherited from firenze but the
interactions with the hotplug controller were never updated.

Unfortunately, the hotplug controller hardware seems to be changing
with each hardware generation, so it's not possible to have a common
implementation. Therefore the hotplug controller interactions end up
in the platform files.

I didn't try power cycling the PCI slots on reset like it was done on
firenze. It could still be done but there's some serious refactoring
needed first to have a generic reset function valid everywhere.


Frederic Barrat (6):
  i2c: Add more info to debug trace
  rainier: Remove old version of code to power on the PCI slots
  rainier: Introduce PCI hotplug controller interface
  rainier: Define PCI slot table
  zz: Rework PCI slots definition and hotplug control
  core/pci: Go through a fundamental reset on hotplug

 core/i2c.c                      |   9 +-
 core/pci-opal.c                 |  13 +-
 platforms/astbmc/astbmc.h       |   1 +
 platforms/astbmc/rainier.c      | 428 +++++++++++++++++++++++++++-----
 platforms/ibm-fsp/firenze-pci.c |   5 +-
 platforms/ibm-fsp/ibm-fsp.h     |   1 +
 platforms/ibm-fsp/zz.c          | 189 ++++++++++++++
 7 files changed, 574 insertions(+), 72 deletions(-)