[Skiboot] [PATCH] platform/witherspoon: Remove PHB4_SHARED_SLOT_IDX_WITHERSPOON constant
Oliver O'Halloran
oohall at gmail.com
Thu Aug 31 13:48:50 AEST 2017
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 at gmail.com>
---
platforms/astbmc/witherspoon.c | 10 ++++------
1 file changed, 4 insertions(+), 6 deletions(-)
diff --git a/platforms/astbmc/witherspoon.c b/platforms/astbmc/witherspoon.c
index 745f38018ce9..b40382810eaa 100644
--- a/platforms/astbmc/witherspoon.c
+++ b/platforms/astbmc/witherspoon.c
@@ -333,8 +333,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"))
@@ -420,10 +418,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);
--
2.9.5
More information about the Skiboot
mailing list