diff options
author | Christian Geddes <crgeddes@us.ibm.com> | 2019-10-16 10:10:34 -0500 |
---|---|---|
committer | William G Hoffa <wghoffa@us.ibm.com> | 2019-11-01 15:41:41 -0500 |
commit | 632582f105da7a546708c4f9705761948d7688fa (patch) | |
tree | f76238e3071d6d7b39459b17eb83796aca6c95a1 /src/usr/fapiwrap | |
parent | 3f41702fbfd6a5c4f4de9eabedf1d8acb801ae20 (diff) | |
download | blackbird-hostboot-632582f105da7a546708c4f9705761948d7688fa.tar.gz blackbird-hostboot-632582f105da7a546708c4f9705761948d7688fa.zip |
Allow dynmic i2c device addresses and set up PMIC targets to do this
Depending on which vendor made a given OCMB the i2c device address
of the PMIC targets on the OCMB will be different. To account for this
we have added a new DYNAMIC_DEVICE_ADDRESS attribute. This attribute
is filled out on the PMIC target by looking at the SPD on parent
OCMB chip. This means that we must do presence detection on the OCMB
prior to the the PMIC targets. While doing i2c operations if a given
target has the DYNAMIC_DEVICE_ADDRESS we will use that over the devAddr
in the any complex i2c attribute for that target.
Change-Id: I22a185a65c064a1514751dd5828547c57af98df1
RTC: 209714
Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/85394
Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com>
Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Daniel M Crowell <dcrowell@us.ibm.com>
Reviewed-by: Roland Veloz <rveloz@us.ibm.com>
Reviewed-by: William G Hoffa <wghoffa@us.ibm.com>
Diffstat (limited to 'src/usr/fapiwrap')
-rw-r--r-- | src/usr/fapiwrap/fapiWrap.C | 9 | ||||
-rw-r--r-- | src/usr/fapiwrap/makefile | 1 |
2 files changed, 9 insertions, 1 deletions
diff --git a/src/usr/fapiwrap/fapiWrap.C b/src/usr/fapiwrap/fapiWrap.C index dc52570e6..a65b7c233 100644 --- a/src/usr/fapiwrap/fapiWrap.C +++ b/src/usr/fapiwrap/fapiWrap.C @@ -27,7 +27,8 @@ #include <fapi2/plat_hwp_invoker.H> // FAPI_INVOKE_HWP #include <trace/interface.H> // tracing includes -#include <exp_getidec.H> // exp_getidec +#include <exp_getidec.H> // exp_getidec +#include <pmic_i2c_addr_get.H> // get_pmic_i2c_addr trace_desc_t* g_trac_fapiwrap; TRAC_INIT(&g_trac_fapiwrap, FAPIWRAP_COMP_NAME, 6*KILOBYTE, TRACE::BUFFER_SLOW); @@ -55,4 +56,10 @@ namespace FAPIWRAP return l_errl; } + + uint8_t get_pmic_dev_addr( const char* i_spd, + const uint8_t i_pmic_id) + { + return get_pmic_i2c_addr(i_spd, i_pmic_id); + } }
\ No newline at end of file diff --git a/src/usr/fapiwrap/makefile b/src/usr/fapiwrap/makefile index 61ccd9646..96d96e48b 100644 --- a/src/usr/fapiwrap/makefile +++ b/src/usr/fapiwrap/makefile @@ -38,6 +38,7 @@ EXTRAINCDIR += ${ROOTPATH}/src/import/chips/p9/procedures/hwp/ffdc/ # HWP include directories : EXTRAINCDIR += ${ROOTPATH}/src/import/chips/ocmb/explorer/procedures/hwp/memory/ +EXTRAINCDIR += ${ROOTPATH}/src/import/chips/ocmb/common/spd_access/ # HWP objects OBJS += exp_getidec.o |