[Skiboot] Make slot power control usable

Oliver O'Halloran oohall at gmail.com
Wed Apr 3 20:08:57 AEDT 2019


The PCI slot state machine is primarily used to track what stage we're
up to when processing a slot reset. Unfortunately it is also used to
track where we are when powering a slot on/off which has the
unfortunate side effect of making it impossible use the
set_power_state() function genericly since you need to know what the
next state of the reset machine should be.

This series moves the power on/off state tracking into a different state
variable to allow the power control operations to be used without
knowing any other details of the slot reset operations. This is used to
implement a pci_slot_generic_freset() and conver the various
similar-but-different FRESET implementations to the generic one
so that we're limited to fixing bugs once.

Additionally this allows us to use slot power controllers on ZZ to reset
OpenCAPI devices, once I get around to writing the backend for that.

RFC since i've probably broken something along the way. Tested on a
Tuleta.




More information about the Skiboot mailing list