aboutsummaryrefslogtreecommitdiff
path: root/hw
diff options
context:
space:
mode:
authorMichael Neuling <mikey@neuling.org>2017-07-26 20:50:06 +1000
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-07-28 14:03:59 +1000
commitb7f026767be406a9ddba73f7fe58a8d318305c1c (patch)
treedde534ea99bf678a8c5302872a623d0a1167477b /hw
parent1da286b2b9e404bc03f5b92f77918a1baf853782 (diff)
downloadskiboot-b7f026767be406a9ddba73f7fe58a8d318305c1c.zip
skiboot-b7f026767be406a9ddba73f7fe58a8d318305c1c.tar.gz
skiboot-b7f026767be406a9ddba73f7fe58a8d318305c1c.tar.bz2
phb4: Simplify prepare_link_change() calls
Just call phb4_prepare_link_change() rather than going through the slot ops. Signed-off-by: Michael Neuling <mikey@neuling.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r--hw/phb4.c12
1 files changed, 4 insertions, 8 deletions
diff --git a/hw/phb4.c b/hw/phb4.c
index 12a05f4..c229dba 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -2224,8 +2224,7 @@ static int64_t phb4_retry_state(struct pci_slot *slot)
struct phb4 *p = phb_to_phb4(slot->phb);
/* Mark link as down */
- if (slot->ops.prepare_link_change)
- slot->ops.prepare_link_change(slot, false);
+ phb4_prepare_link_change(slot, false);
if (!slot->link_retries--) {
switch (slot->state) {
@@ -2408,8 +2407,7 @@ static int64_t phb4_poll_link(struct pci_slot *slot)
}
if (reg & PHB_PCIE_DLP_TL_LINKACT) {
PHBDBG(p, "LINK: Link is up\n");
- if (slot->ops.prepare_link_change)
- slot->ops.prepare_link_change(slot, true);
+ phb4_prepare_link_change(slot, true);
pci_slot_set_state(slot, PHB4_SLOT_LINK_STABLE);
slot->stable_retries = PHB4_LINK_STABLE_RETRIES;
return pci_slot_set_sm_timeout(slot, secs_to_tb(1));
@@ -2473,8 +2471,7 @@ static int64_t phb4_hreset(struct pci_slot *slot)
}
PHBDBG(p, "HRESET: Prepare for link down\n");
- if (slot->ops.prepare_link_change)
- slot->ops.prepare_link_change(slot, false);
+ phb4_prepare_link_change(slot, false);
/* fall through */
case PHB4_SLOT_HRESET_START:
PHBDBG(p, "HRESET: Assert\n");
@@ -2532,8 +2529,7 @@ static int64_t phb4_freset(struct pci_slot *slot)
PHBDBG(p, "FRESET: Prepare for link down\n");
- if (slot->ops.prepare_link_change)
- slot->ops.prepare_link_change(slot, false);
+ phb4_prepare_link_change(slot, false);
/* fall through */
case PHB4_SLOT_FRESET_START:
reg = in_be64(p->regs + PHB_PCIE_CRESET);