Skip to content

Commit

Permalink
phb4: Fix PCIe GEN4 on DD2.1 and above
Browse files Browse the repository at this point in the history
In this change:
  eef0e19 PHB4: Default to PCIe GEN3 on POWER9 DD2.00

We clamped DD2.00 parts to GEN3 but unfortunately this change also
applies to DD2.1 and above.

This fixes this to only apply to DD2.00.

This also cleans up the documentation and printing.

Signed-off-by: Michael Neuling <mikey@neuling.org>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
  • Loading branch information
mikey authored and stewartsmith committed Oct 19, 2017
1 parent e2bc5cd commit 62ac763
Showing 1 changed file with 3 additions and 4 deletions.
7 changes: 3 additions & 4 deletions hw/phb4.c
Expand Up @@ -4895,14 +4895,13 @@ static void phb4_create(struct dt_node *np)
if (!phb4_read_capabilities(p))
goto failed;

/* Priority order: NVRAM -> dt -> GEN2 dd1 -> GEN4 */
/* Priority order: NVRAM -> dt -> GEN2 dd1 -> GEN3 dd2.00 -> GEN4 */
p->max_link_speed = 4;
if (p->rev == PHB4_REV_NIMBUS_DD10)
p->max_link_speed = 2;
if (p->rev == PHB4_REV_NIMBUS_DD20 && chip->ec_rev == 0) {
if (p->rev == PHB4_REV_NIMBUS_DD20 &&
chip->ec_level == 0 && chip->ec_rev == 0)
p->max_link_speed = 3;
PHBINF(p, "Default max link speed for P9 DD2.00 is GEN3\n");
}
if (dt_has_node_property(np, "ibm,max-link-speed", NULL))
p->max_link_speed = dt_prop_get_u32(np, "ibm,max-link-speed");
if (pcie_max_link_speed)
Expand Down

0 comments on commit 62ac763

Please sign in to comment.