From 8dba709a064c9a88d20942cbd1d7191f99baf2f8 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Ky=C3=B6sti=20M=C3=A4lkki?= Date: Sat, 7 Feb 2015 07:07:16 +0200 Subject: AMD cimx/sb800: Disable unused GPP ports MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit If devicetree.cb has GPP port off, really disable it before even trying to do link training. Change-Id: I810945da28d86768e88249dc4d29a50ad9f9959b Signed-off-by: Kyösti Mälkki Reviewed-on: http://review.coreboot.org/8385 Tested-by: build bot (Jenkins) Reviewed-by: Paul Menzel Reviewed-by: Felix Held Reviewed-by: Dave Frodin Reviewed-by: Alexandru Gagniuc --- src/vendorcode/amd/cimx/sb800/Gpp.c | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) (limited to 'src/vendorcode/amd/cimx/sb800/Gpp.c') diff --git a/src/vendorcode/amd/cimx/sb800/Gpp.c b/src/vendorcode/amd/cimx/sb800/Gpp.c index 6f3bb7c7b9..ae7f3cee99 100644 --- a/src/vendorcode/amd/cimx/sb800/Gpp.c +++ b/src/vendorcode/amd/cimx/sb800/Gpp.c @@ -293,7 +293,10 @@ PreInitGppLink ( // Mask out non-applicable ports according to the target link configuration mode for ( portId = 0; portId < MAX_GPP_PORTS; portId++ ) { - pConfig->PORTCONFIG[portId].PortCfg.PortPresent &= (reg32Value >> portId) & BIT0; + if (!(reg32Value & (1 << portId))) + pConfig->PORTCONFIG[portId].PortCfg.PortPresent = false; + else if (!pConfig->PORTCONFIG[portId].PortCfg.PortPresent) + reg32Value &= ~(1 << portId); } // -- cgit v1.2.3