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 /hw | |
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 'hw')
-rw-r--r-- | hw/phb4.c | 2 |
1 files changed, 1 insertions, 1 deletions
@@ -3290,7 +3290,7 @@ static void phb4_create(struct dt_node *np) /* We register the PHB before we initialize it so we * get a useful OPAL ID for it */ - pci_register_phb(&p->phb, p->chip_id * 6 + p->index); //6 PHBs per chip? + pci_register_phb(&p->phb, phb4_get_opal_id(p->chip_id, p->index)); /* Create slot structure */ slot = phb4_slot_create(&p->phb); |