[Skiboot] [RFC PATCH 18/23] hw/phb4: Enable DLP Trace in phb4_init_hw()

Oliver O'Halloran oohall at gmail.com
Wed Apr 3 20:09:15 AEDT 2019


Move the link trace enable out of phb4_freset() and into phb4_init_hw().
No functional changes.

Signed-off-by: Oliver O'Halloran <oohall at gmail.com>
---
 hw/phb4.c | 16 ++++++++--------
 1 file changed, 8 insertions(+), 8 deletions(-)

diff --git a/hw/phb4.c b/hw/phb4.c
index 3a6b05b4a5a6..75a1eb45a3d4 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -3013,7 +3013,6 @@ static int64_t phb4_hreset(struct pci_slot *slot)
 static int64_t phb4_freset(struct pci_slot *slot)
 {
 	struct phb4 *p = phb_to_phb4(slot->phb);
-	uint64_t reg;
 
 	switch(slot->state) {
 	case PHB4_SLOT_NORMAL:
@@ -3042,13 +3041,6 @@ static int64_t phb4_freset(struct pci_slot *slot)
 		/* fall through */
 	case PHB4_SLOT_FRESET_ASSERT_DELAY:
 
-		if (pci_tracing) {
-			/* Enable tracing */
-			reg = in_be64(p->regs + PHB_PCIE_DLP_TRWCTL);
-			out_be64(p->regs + PHB_PCIE_DLP_TRWCTL,
-				 reg | PHB_PCIE_DLP_TRWCTL_EN);
-		}
-
 		PHBDBG(p, "FRESET: Deassert\n");
 		phb4_assert_perst(slot, false);
 
@@ -5288,6 +5280,14 @@ static void phb4_init_hw(struct phb4 *p)
 	/* Mark the PHB as functional which enables all the various sequences */
 	p->broken = false;
 
+	/* Enable tracing if needed */
+	if (pci_tracing) {
+		val = in_be64(p->regs + PHB_PCIE_DLP_TRWCTL);
+		out_be64(p->regs + PHB_PCIE_DLP_TRWCTL,
+			 val | PHB_PCIE_DLP_TRWCTL_EN);
+	}
+
+
 	PHBDBG(p, "Initialization complete\n");
 
 	return;
-- 
2.20.1



More information about the Skiboot mailing list