diff options
author | Gavin Shan <gwshan@linux.vnet.ibm.com> | 2016-10-20 14:17:18 +1100 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2016-10-24 12:17:43 +1100 |
commit | 0074e3d9446e7174a2bff8562241f5cb9eee547e (patch) | |
tree | 1dfcc9e2519aea4d21d78e83d86d6581f9aa9b56 /hw/phb3.c | |
parent | 18d590eee08be63b5971a4e2a80d571c86b3a305 (diff) | |
download | blackbird-skiboot-0074e3d9446e7174a2bff8562241f5cb9eee547e.tar.gz blackbird-skiboot-0074e3d9446e7174a2bff8562241f5cb9eee547e.zip |
pci: Remove obsoleted PCI slot pfreset() operation
PCI slot pfreset() operation is obsoleted as nobody uses it. This
removes it and the related PCI slot states. No functional changes
introduced.
Signed-off-by: Gavin Shan <gwshan@linux.vnet.ibm.com>
Acked-by: Russell Currey <ruscur@russell.cc>
Reviewed-by: Andrew Donnellan <andrew.donnellan@au1.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/phb3.c')
-rw-r--r-- | hw/phb3.c | 31 |
1 files changed, 15 insertions, 16 deletions
@@ -2261,7 +2261,7 @@ static int64_t phb3_hreset(struct pci_slot *slot) return OPAL_HARDWARE; } -static int64_t phb3_pfreset(struct pci_slot *slot) +static int64_t phb3_freset(struct pci_slot *slot) { struct phb3 *p = phb_to_phb3(slot->phb); uint8_t presence = 1; @@ -2269,48 +2269,48 @@ static int64_t phb3_pfreset(struct pci_slot *slot) switch(slot->state) { case PHB3_SLOT_NORMAL: - PHBDBG(p, "PFRESET: Starts\n"); + PHBDBG(p, "FRESET: Starts\n"); /* Nothing to do without adapter connected */ if (slot->ops.get_presence_state) slot->ops.get_presence_state(slot, &presence); if (!presence) { - PHBDBG(p, "PFRESET: No device\n"); + PHBDBG(p, "FRESET: No device\n"); return OPAL_SUCCESS; } - PHBDBG(p, "PFRESET: Prepare for link down\n"); - slot->retry_state = PHB3_SLOT_PFRESET_START; + PHBDBG(p, "FRESET: Prepare for link down\n"); + slot->retry_state = PHB3_SLOT_FRESET_START; if (slot->ops.prepare_link_change) slot->ops.prepare_link_change(slot, false); /* fall through */ - case PHB3_SLOT_PFRESET_START: + case PHB3_SLOT_FRESET_START: if (!p->skip_perst) { - PHBDBG(p, "PFRESET: Assert\n"); + PHBDBG(p, "FRESET: Assert\n"); reg = in_be64(p->regs + PHB_RESET); reg &= ~0x2000000000000000ul; out_be64(p->regs + PHB_RESET, reg); pci_slot_set_state(slot, - PHB3_SLOT_PFRESET_ASSERT_DELAY); + PHB3_SLOT_FRESET_ASSERT_DELAY); return pci_slot_set_sm_timeout(slot, secs_to_tb(1)); } /* To skip the assert during boot time */ - PHBDBG(p, "PFRESET: Assert skipped\n"); - pci_slot_set_state(slot, PHB3_SLOT_PFRESET_ASSERT_DELAY); + PHBDBG(p, "FRESET: Assert skipped\n"); + pci_slot_set_state(slot, PHB3_SLOT_FRESET_ASSERT_DELAY); p->skip_perst = false; /* fall through */ - case PHB3_SLOT_PFRESET_ASSERT_DELAY: - PHBDBG(p, "PFRESET: Deassert\n"); + case PHB3_SLOT_FRESET_ASSERT_DELAY: + PHBDBG(p, "FRESET: Deassert\n"); reg = in_be64(p->regs + PHB_RESET); reg |= 0x2000000000000000ul; out_be64(p->regs + PHB_RESET, reg); pci_slot_set_state(slot, - PHB3_SLOT_PFRESET_DEASSERT_DELAY); + PHB3_SLOT_FRESET_DEASSERT_DELAY); /* CAPP FPGA requires 1s to flash before polling link */ return pci_slot_set_sm_timeout(slot, secs_to_tb(1)); - case PHB3_SLOT_PFRESET_DEASSERT_DELAY: + case PHB3_SLOT_FRESET_DEASSERT_DELAY: pci_slot_set_state(slot, PHB3_SLOT_LINK_START); return slot->ops.poll_link(slot); default: @@ -2595,8 +2595,7 @@ static struct pci_slot *phb3_slot_create(struct phb *phb) slot->ops.prepare_link_change = phb3_prepare_link_change; slot->ops.poll_link = phb3_poll_link; slot->ops.hreset = phb3_hreset; - slot->ops.freset = phb3_pfreset; - slot->ops.pfreset = phb3_pfreset; + slot->ops.freset = phb3_freset; slot->ops.creset = phb3_creset; return slot; |