summaryrefslogtreecommitdiffstats
path: root/src/usr/i2c/i2c.C
diff options
context:
space:
mode:
authorChristian Geddes <crgeddes@us.ibm.com>2019-07-30 15:34:28 -0500
committerDaniel M Crowell <dcrowell@us.ibm.com>2019-08-01 16:50:52 -0500
commited0430e908b272919b9bb5ac48bc8d9314b81238 (patch)
treea2447c3eb2f637262f3aaa8a7c83286dad3dc3df /src/usr/i2c/i2c.C
parent7e05c2e69bf8e9c94b7ab0da63b62546fe79796e (diff)
downloadtalos-hostboot-ed0430e908b272919b9bb5ac48bc8d9314b81238.tar.gz
talos-hostboot-ed0430e908b272919b9bb5ac48bc8d9314b81238.zip
OR mux select with the "enable" bit 0b1000 when making selection
During simics bringup we figured out that the mux selects needed to be between 8-15. We learned during bringup this is because the real 0-7 select needs to be OR'ed with the enable bit for the model of mux. This commit does the ORing correctly and subtracts 8 from all of the muxSelects used in the simics xml so we match what the MRW is doing. Change-Id: I45faab455afdfc63ac05fc2637890f9d0137a444 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/81397 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Reviewed-by: Matt Derksen <mderkse1@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Roland Veloz <rveloz@us.ibm.com> Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr/i2c/i2c.C')
-rwxr-xr-xsrc/usr/i2c/i2c.C15
1 files changed, 13 insertions, 2 deletions
diff --git a/src/usr/i2c/i2c.C b/src/usr/i2c/i2c.C
index bf0560e73..226b96acf 100755
--- a/src/usr/i2c/i2c.C
+++ b/src/usr/i2c/i2c.C
@@ -1293,11 +1293,22 @@ errlHndl_t i2cAccessMux( TARGETING::Target* i_masterTarget,
if (! (l_i2cMuxTarget->tryGetAttr<TARGETING::ATTR_FAPI_I2C_CONTROL_INFO>(l_muxData)) )
{
TRACFCOMP(g_trac_i2c,
- "i2cAccessMux(): get attributes failed");
+ "i2cAccessMux(): getting ATTR_FAPI_I2C_CONTROL_INFO failed");
break;
}
- uint8_t l_muxSelector = i_i2cMuxBusSelector;
+ TARGETING::ATTR_MODEL_type l_muxModel;
+ if (! (l_i2cMuxTarget->tryGetAttr<TARGETING::ATTR_MODEL>(l_muxModel)) )
+ {
+ TRACFCOMP(g_trac_i2c,
+ "i2cAccessMux(): getting ATTR_MODEL failed");
+ break;
+ }
+
+ assert(l_muxModel == TARGETING::MODEL_PCA9847, "Invalid model of mux detected");
+ const uint8_t PCA9847_ENABLE_BIT = 8;
+
+ uint8_t l_muxSelector = i_i2cMuxBusSelector | PCA9847_ENABLE_BIT;
uint8_t *l_ptrMuxSelector = &l_muxSelector;
size_t l_muxSelectorSize = sizeof(l_muxSelector);
OpenPOWER on IntegriCloud