Skip to content

Commit 6672515

Browse files
Gavin Shanmpe
authored andcommitted
PCI/hotplug: PowerPC PowerNV PCI hotplug driver
This adds standalone driver to support PCI hotplug for PowerPC PowerNV platform that runs on top of skiboot firmware. The firmware identifies hotpluggable slots and marked their device tree node with proper "ibm,slot-pluggable" and "ibm,reset-by-firmware". The driver scans device tree nodes to create/register PCI hotplug slot accordingly. The PCI slots are organized in fashion of tree, which means one PCI slot might have parent PCI slot and parent PCI slot possibly contains multiple child PCI slots. At the plugging time, the parent PCI slot is populated before its children. The child PCI slots are removed before their parent PCI slot can be removed from the system. If the skiboot firmware doesn't support slot status retrieval, the PCI slot device node shouldn't have property "ibm,reset-by-firmware". In that case, none of valid PCI slots will be detected from device tree. The skiboot firmware doesn't export the capability to access attention LEDs yet and it's something for TBD. Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com> Acked-by: Bjorn Helgaas <bhelgaas@google.com> Signed-off-by: Michael Ellerman <mpe@ellerman.id.au>
1 parent ea0d856 commit 6672515

4 files changed

Lines changed: 750 additions & 0 deletions

File tree

‎MAINTAINERS‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6857,6 +6857,7 @@ F: drivers/crypto/nx/
68576857
F: drivers/crypto/vmx/
68586858
F: drivers/net/ethernet/ibm/ibmveth.*
68596859
F: drivers/net/ethernet/ibm/ibmvnic.*
6860+
F: drivers/pci/hotplug/pnv_php.c
68606861
F: drivers/pci/hotplug/rpa*
68616862
F: drivers/scsi/ibmvscsi/
68626863
N: opal

‎drivers/pci/hotplug/Kconfig‎

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -113,6 +113,19 @@ config HOTPLUG_PCI_SHPC
113113

114114
When in doubt, say N.
115115

116+
config HOTPLUG_PCI_POWERNV
117+
tristate "PowerPC PowerNV PCI Hotplug driver"
118+
depends on PPC_POWERNV && EEH
119+
select OF_DYNAMIC
120+
help
121+
Say Y here if you run PowerPC PowerNV platform that supports
122+
PCI Hotplug
123+
124+
To compile this driver as a module, choose M here: the
125+
module will be called pnv-php.
126+
127+
When in doubt, say N.
128+
116129
config HOTPLUG_PCI_RPA
117130
tristate "RPA PCI Hotplug driver"
118131
depends on PPC_PSERIES && EEH

‎drivers/pci/hotplug/Makefile‎

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,7 @@ obj-$(CONFIG_HOTPLUG_PCI_PCIE) += pciehp.o
1414
obj-$(CONFIG_HOTPLUG_PCI_CPCI_ZT5550) += cpcihp_zt5550.o
1515
obj-$(CONFIG_HOTPLUG_PCI_CPCI_GENERIC) += cpcihp_generic.o
1616
obj-$(CONFIG_HOTPLUG_PCI_SHPC) += shpchp.o
17+
obj-$(CONFIG_HOTPLUG_PCI_POWERNV) += pnv-php.o
1718
obj-$(CONFIG_HOTPLUG_PCI_RPA) += rpaphp.o
1819
obj-$(CONFIG_HOTPLUG_PCI_RPA_DLPAR) += rpadlpar_io.o
1920
obj-$(CONFIG_HOTPLUG_PCI_SGI) += sgi_hotplug.o
@@ -50,6 +51,8 @@ ibmphp-objs := ibmphp_core.o \
5051
acpiphp-objs := acpiphp_core.o \
5152
acpiphp_glue.o
5253

54+
pnv-php-objs := pnv_php.o
55+
5356
rpaphp-objs := rpaphp_core.o \
5457
rpaphp_pci.o \
5558
rpaphp_slot.o

0 commit comments

Comments
 (0)