Message ID | 20170831034850.2569-1-oohall@gmail.com |
---|---|
State | Accepted |
Headers | show |
Series | platform/witherspoon: Remove PHB4_SHARED_SLOT_IDX_WITHERSPOON constant | expand |
Oliver O'Halloran <oohall@gmail.com> writes: > 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> > --- > platforms/astbmc/witherspoon.c | 10 ++++------ > 1 file changed, 4 insertions(+), 6 deletions(-) Thanks! Merged to master as of e6b5d60de0ec1d88854025c1dc433c1c2f694b29
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);
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> --- platforms/astbmc/witherspoon.c | 10 ++++------ 1 file changed, 4 insertions(+), 6 deletions(-)