core/pci: Ignore PCI slot capability on root port
core/pci: Ignore PCI slot capability on root port

We are creating PCI slot on root port, where the PCI slot isn't
supported from hardware. For this case, we shouldn't read the PCI
slot capability from hardware. When bogus data returned from the
hardware, we will attempt to the PCI slot's power state or enable
surprise hotplug functionality. All of them can't be accomplished
without hardware support.

This leaves the PCI slot's capability list 0 if PCICAP_EXP_CAP_SLOT
isn't set in hardware (pcie_cap + 0x2). Otherwise, the PCI slot's
capability list is retrieved from hardware (pcie_cap + 0x14).

Signed-off-by: Gavin Shan <0398910e4f4970259b451f0f9d0686cc5e961b81@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <ec31ab75ddf977353c8f660f92ea8b23f64aef25@linux.vnet.ibm.com>

qemu/skiboot,stewart-ibm/skiboot,open-power/skiboot,stewart-ibm/skiboot,open-power/skiboot,legoater/skiboot,open-power/skiboot,open-power/skiboot,shenki/skiboot,shenki/skiboot,legoater/skiboot,legoater/skiboot,shenki/skiboot,qemu/skiboot,qemu/skiboot,legoater/skiboot,stewart-ibm/skiboot,shenki/skiboot,mikey/skiboot,qemu/skiboot,open-power/skiboot,mikey/skiboot,qemu/skiboot,legoater/skiboot,mikey/skiboot,shenki/skiboot