diff options
author | Frederic Barrat <fbarrat@linux.vnet.ibm.com> | 2017-06-06 16:59:45 +0200 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-06-07 19:56:47 +1000 |
commit | 5201e811bd19eebc3fbeaa11c75fed12bc8c31fe (patch) | |
tree | 2bf3001be6348c30d88511cf7c2e1fd704af6411 /core/pci.c | |
parent | b0809b89ecdf430c9f6e0272fb4cf0dc01a4989d (diff) | |
download | skiboot-5201e811bd19eebc3fbeaa11c75fed12bc8c31fe.zip skiboot-5201e811bd19eebc3fbeaa11c75fed12bc8c31fe.tar.gz skiboot-5201e811bd19eebc3fbeaa11c75fed12bc8c31fe.tar.bz2 |
phb4: Activate shared PCI slot on witherspoon
Witherspoon systems come with a 'shared' PCI slot: physically, it
looks like a x16 slot, but it's actually two x8 slots connected to two
PHBs of two different chips. Taking advantage of it requires some
logic on the PCI adapter. Only the Mellanox CX5 adapter is known to
support it at the time of this writing.
This patch enables support for the shared slot on witherspoon if a x16
adapter is detected. Each x8 slot has a presence bit, so both bits
need to be set for the activation to take place. Slot sharing is
activated through a gpio.
Note that there's no easy way to be sure that the card is indeed a
shared-slot compatible PCI adapter and not a normal x16 card. Plugging
a normal x16 adapter on the shared slot should be avoided on
witherspoon, as the link won't train on the second slot, resulting in
a timeout and a longer boot time. Only the first slot is usable and
the x16 adapter will end up using only half the lines.
If the PCI card plugged on the physical slot is only x8 (or less),
then the presence bit of the second slot is not set, so this patch
does nothing. The x8 (or less) adapter should work like on any other
physical slot.
Signed-off-by: Frederic Barrat <fbarrat@linux.vnet.ibm.com>
[stewart@linux.vnet.ibm.com: re-org code, move into platform file]
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core/pci.c')
-rw-r--r-- | core/pci.c | 3 |
1 files changed, 3 insertions, 0 deletions
@@ -1651,6 +1651,9 @@ void pci_init_slots(void) } } + if (platform.pre_pci_fixup) + platform.pre_pci_fixup(); + prlog(PR_NOTICE, "PCI: Resetting PHBs...\n"); pci_do_jobs(pci_reset_phb); |