diff options
author | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2015-02-07 07:07:16 +0200 |
---|---|---|
committer | Kyösti Mälkki <kyosti.malkki@gmail.com> | 2015-02-14 22:37:33 +0100 |
commit | 8dba709a064c9a88d20942cbd1d7191f99baf2f8 (patch) | |
tree | e34ec24326f327c3262d3b765f3fe91bf44527ba /src | |
parent | 486c05f4bfea71b6a5cbb216272199b2ad1dca02 (diff) |
AMD cimx/sb800: Disable unused GPP ports
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 <kyosti.malkki@gmail.com>
Reviewed-on: http://review.coreboot.org/8385
Tested-by: build bot (Jenkins)
Reviewed-by: Paul Menzel <paulepanter@users.sourceforge.net>
Reviewed-by: Felix Held <felix-coreboot@felixheld.de>
Reviewed-by: Dave Frodin <dave.frodin@se-eng.com>
Reviewed-by: Alexandru Gagniuc <mr.nuke.me@gmail.com>
Diffstat (limited to 'src')
-rw-r--r-- | src/vendorcode/amd/cimx/sb800/Gpp.c | 5 |
1 files changed, 4 insertions, 1 deletions
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); } // |