diff options
author | Oliver O'Halloran <oohall@gmail.com> | 2017-08-31 13:48:50 +1000 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-09-04 20:45:35 -0500 |
commit | e6b5d60de0ec1d88854025c1dc433c1c2f694b29 (patch) | |
tree | ad06c4f4f9b8619a143a479db745ccdb5bcb7ed3 /platforms | |
parent | 9727fe384b8685270d344201f7e051475eea3a0b (diff) | |
download | skiboot-e6b5d60de0ec1d88854025c1dc433c1c2f694b29.zip skiboot-e6b5d60de0ec1d88854025c1dc433c1c2f694b29.tar.gz skiboot-e6b5d60de0ec1d88854025c1dc433c1c2f694b29.tar.bz2 |
platform/witherspoon: Remove PHB4_SHARED_SLOT_IDX_WITHERSPOON constant
PHB4_SHARED_SLOT_IDX_WITHERSPOON is the index of the PHB which the
shared slot is connected to rather than the index of the shared slot
which the name suggests. This is confusing at best so this patch
replaces the only usages of this macro with just the PHB number
and a comment.
Signed-off-by: Oliver O'Halloran <oohall@gmail.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'platforms')
-rw-r--r-- | platforms/astbmc/witherspoon.c | 10 |
1 files changed, 4 insertions, 6 deletions
diff --git a/platforms/astbmc/witherspoon.c b/platforms/astbmc/witherspoon.c index c522739..a987e90 100644 --- a/platforms/astbmc/witherspoon.c +++ b/platforms/astbmc/witherspoon.c @@ -297,8 +297,6 @@ static void dt_create_npu2(void) } } -#define PHB4_SHARED_SLOT_IDX_WITHERSPOON 3 - static bool witherspoon_probe(void) { if (!dt_node_is_compatible(dt_root, "ibm,witherspoon")) @@ -384,10 +382,10 @@ static void phb4_pre_pci_fixup_witherspoon(void) "Unexpected number of chips, skipping shared slot detection\n"); return; } - slot0 = pci_slot_find(phb4_get_opal_id(chip0->id, - PHB4_SHARED_SLOT_IDX_WITHERSPOON)); - slot1 = pci_slot_find(phb4_get_opal_id(chip1->id, - PHB4_SHARED_SLOT_IDX_WITHERSPOON)); + + /* the shared slot is connected to PHB3 on both chips */ + slot0 = pci_slot_find(phb4_get_opal_id(chip0->id, 3)); + slot1 = pci_slot_find(phb4_get_opal_id(chip1->id, 3)); if (slot0 && slot1) { if (slot0->ops.get_presence_state) slot0->ops.get_presence_state(slot0, &p0); |