From e6b5d60de0ec1d88854025c1dc433c1c2f694b29 Mon Sep 17 00:00:00 2001 From: Oliver O'Halloran Date: Thu, 31 Aug 2017 13:48:50 +1000 Subject: 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 Signed-off-by: Stewart Smith --- platforms/astbmc/witherspoon.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-) (limited to 'platforms') 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); -- cgit v1.1