summaryrefslogtreecommitdiff
path: root/src/vendorcode
diff options
context:
space:
mode:
Diffstat (limited to 'src/vendorcode')
-rw-r--r--src/vendorcode/amd/cimx/sb800/Gpp.c5
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);
}
//