summaryrefslogtreecommitdiffstats
path: root/src/usr
diff options
context:
space:
mode:
authorNick Bofferding <bofferdn@us.ibm.com>2018-07-19 15:34:07 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-07-24 09:26:33 -0500
commit923ed59ce8a7703b5d36abee3ada0fd4248a6178 (patch)
treeae9d51ffb2952501df29ea09fda824208b004c1f /src/usr
parentf517c6c5507ad449f37417500ad4a36f6295c4d7 (diff)
downloadtalos-hostboot-923ed59ce8a7703b5d36abee3ada0fd4248a6178.tar.gz
talos-hostboot-923ed59ce8a7703b5d36abee3ada0fd4248a6178.zip
MRW: If bus object doesn't have I2C_ADDRESS property, get it from I2C slave
This change amends the processMrw.pl script to get the I2C_ADDRESS property from the I2C slave if it is not available from the I2C bus object. Without this change, the OpenPOWER MRWs populate invalid I2C addresses in the HDAT I2C attributes, which Hostboot then ignores, resulting in OS not seeing all the I2C devices Change-Id: I6a5f1193f31b124193641174229b5f9433b41d4c CQ: SW438846 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/62968 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@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: Daniel M. Crowell <dcrowell@us.ibm.com>
Diffstat (limited to 'src/usr')
-rwxr-xr-xsrc/usr/targeting/common/processMrw.pl10
1 files changed, 10 insertions, 0 deletions
diff --git a/src/usr/targeting/common/processMrw.pl b/src/usr/targeting/common/processMrw.pl
index d52f2f4e3..beb63f542 100755
--- a/src/usr/targeting/common/processMrw.pl
+++ b/src/usr/targeting/common/processMrw.pl
@@ -2421,6 +2421,16 @@ sub processI2C
$i2c->{SOURCE},$i2c->{BUS_NUM},"I2C_ADDRESS");
}
+ # If bus doesn't have I2C_ADDRESS or default value is not set,
+ # then get it from i2c-slave, if defined.
+ if ($addr eq "")
+ {
+ if (! $targetObj->isBadAttribute($i2c->{DEST},"I2C_ADDRESS") )
+ {
+ $addr = $targetObj->getAttribute($i2c->{DEST},"I2C_ADDRESS");
+ }
+ }
+
if ($addr eq "") {$addr = "0xFF";}
if ($targetObj->isBusAttributeDefined(
OpenPOWER on IntegriCloud