[Skiboot] [RFC PATCH 18/23] hw/phb4: Enable DLP Trace in phb4_init_hw()
Oliver O'Halloran
oohall at gmail.com
Thu Aug 1 16:21:24 AEST 2019
On Wed, 2019-07-31 at 21:30 +0200, Frederic Barrat wrote:
>
> Le 03/04/2019 à 11:09, Oliver O'Halloran a écrit :
> > 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);
> > + }
> > +
> > +
>
> Is this even needed? It seems to be done on the first call to
> phb4_link_tracing()
It's done in phb4_link_tracing() now. When I wrote this series it was
done here in the freset handler with the idea being that we want to
enable tracing as early as possible so we don't miss any state
transitions. I did some testing when I moved the enable into
phb4_link_tracing() and didn't see any difference in the results so
this patch can probably be dropped.
>
> Fred
>
> > PHBDBG(p, "Initialization complete\n");
> >
> > return;
> >
More information about the Skiboot
mailing list