[Skiboot] [PATCH 1/2] Revert "mowgli: Limit slot1 to Gen3 by default"

Lulu Su Lulu_Su at wistron.com
Wed Dec 9 19:40:53 AEDT 2020


From: LuluTHSu <Lulu_Su at wistron.com>

This reverts commit 5262cdd1b99f77bca5951fc8132f9795ef0c2b87.
When link reset/retrain, this method cannot maintain the max-link-speed limit, so remove it.

Signed-off-by: LuluTHSu <Lulu_Su at wistron.com>
---
 hw/phb4.c                 | 20 --------------------
 include/phb4.h            |  1 -
 platforms/astbmc/mowgli.c | 15 ---------------
 3 files changed, 36 deletions(-)

diff --git a/hw/phb4.c b/hw/phb4.c
index 99455d8..e7758d3 100644
--- a/hw/phb4.c
+++ b/hw/phb4.c
@@ -2991,26 +2991,6 @@ static unsigned int phb4_get_max_link_speed(struct phb4 *p, struct dt_node *np)
 	return max_link_speed;
 }
 
-/*
- * Has the same effect as the ibm,max-link-speed property.
- * i.e. sets the default link speed, while allowing NVRAM
- * overrides, etc to still take effect.
- */
-void phb4_set_dt_max_link_speed(struct phb4 *p, int new_max)
-{
-	uint64_t scr;
-	int max;
-
-	/* take into account nvram settings, etc */
-	if (pcie_max_link_speed) 
-		max = pcie_max_link_speed;
-	else 
-		max = new_max;
-	
-	scr = phb4_read_reg(p, PHB_PCIE_SCR);
-	scr = SETFIELD(PHB_PCIE_SCR_MAXLINKSPEED, scr, max);
-	phb4_write_reg(p, PHB_PCIE_SCR, scr);
-}
 
 static void phb4_assert_perst(struct pci_slot *slot, bool assert)
 {
diff --git a/include/phb4.h b/include/phb4.h
index 47a46b7..abba2d9 100644
--- a/include/phb4.h
+++ b/include/phb4.h
@@ -259,5 +259,4 @@ static inline int phb4_get_opal_id(unsigned int chip_id, unsigned int index)
 
 void phb4_pec2_dma_engine_realloc(struct phb4 *p);
 
-void phb4_set_dt_max_link_speed(struct phb4 *p, int new_max);
 #endif /* __PHB4_H */
diff --git a/platforms/astbmc/mowgli.c b/platforms/astbmc/mowgli.c
index 083255f..213d734 100644
--- a/platforms/astbmc/mowgli.c
+++ b/platforms/astbmc/mowgli.c
@@ -12,8 +12,6 @@
 #include <psi.h>
 #include <npu-regs.h>
 #include <secvar.h>
-#include <pci.h>
-#include <phb4.h>
 
 #include "astbmc.h"
 
@@ -73,18 +71,6 @@ static int mowgli_secvar_init(void)
 	return secvar_main(secboot_tpm_driver, edk2_compatible_v1);
 }
 
-/*
- * Limit PHB0/(pec0) to gen3 speeds.
- */
-static void mowgli_setup_phb(struct phb *phb, unsigned int __unused index)
-{
-	struct phb4 *p = phb_to_phb4(phb);
-
- 	if (p->pec == 0) {
-		phb4_set_dt_max_link_speed(p, 3);
-		prlog(PR_DEBUG, "Mowgli: Force the PHB%d Speed to Gen3.\n", p->pec);
-	} 
-}
 
 DECLARE_PLATFORM(mowgli) = {
 	.name			= "Mowgli",
@@ -95,7 +81,6 @@ DECLARE_PLATFORM(mowgli) = {
 	.bmc			= &bmc_plat_ast2500_openbmc,
 	.pci_get_slot_info	= slot_table_get_slot_info,
 	.pci_probe_complete	= check_all_slot_table,
-	.pci_setup_phb 		= mowgli_setup_phb,
 	.cec_power_down         = astbmc_ipmi_power_down,
 	.cec_reboot             = astbmc_ipmi_reboot,
 	.elog_commit		= ipmi_elog_commit,
-- 
2.7.4



More information about the Skiboot mailing list