Skip to content

Commit

Permalink
phb4: Workaround bug in spec 053
Browse files Browse the repository at this point in the history
Wait for DLP PGRESET to clear *after* lifting the PCIe core reset

Signed-off-by: Benjamin Herrenschmidt <benh@kernel.crashing.org>
Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
ozbenh authored and stewartsmith committed Jun 26, 2017
1 parent 2c76995 commit ead3caf
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions hw/phb4.c
Expand Up @@ -3544,8 +3544,7 @@ static void phb4_init_hw(struct phb4 *p, bool first_init)
in_be64(p->regs + PHB_PCIE_SCR));

/* Init_5 - Wait for DLP PGRESET to clear */
if (!phb4_wait_dlp_reset(p))
goto failed;
/* This is broken in spec 053, moving that step to after Init_16 */

/* Init_6 - deassert CFG reset */
creset = in_be64(p->regs + PHB_PCIE_CRESET);
Expand Down Expand Up @@ -3582,6 +3581,10 @@ static void phb4_init_hw(struct phb4 *p, bool first_init)
creset |= PHB_PCIE_CRESET_PIPE_N;
out_be64(p->regs + PHB_PCIE_CRESET, creset);

/* (Moved from Init_5) */
if (!phb4_wait_dlp_reset(p))
goto failed;

/* Init_17 - PHB Control */
val = PHB_CTRLR_IRQ_PGSZ_64K;
if (p->rev == PHB4_REV_NIMBUS_DD10) {
Expand Down

0 comments on commit ead3caf

Please sign in to comment.