summaryrefslogtreecommitdiffstats
path: root/src/include
diff options
context:
space:
mode:
authorChristian Geddes <crgeddes@us.ibm.com>2019-11-06 11:17:13 -0600
committerDaniel M Crowell <dcrowell@us.ibm.com>2019-11-07 23:34:48 -0600
commitc3689a69137b76f117ac9524a8f7ec189e133b04 (patch)
tree630b37a42d7041f5c27d9ae17556654c8c779f57 /src/include
parentc016e9860f3dcd56e1332ca455bad8471952c92b (diff)
downloadtalos-hostboot-c3689a69137b76f117ac9524a8f7ec189e133b04.tar.gz
talos-hostboot-c3689a69137b76f117ac9524a8f7ec189e133b04.zip
Fixes to PMIC presence detection
While performing presence detection on the PMIC targets we need to first read the parent OCMB's SPD to see what device address the PMIC is on. There was a bug where we were attempting to read the parent OCMB's spd without first checking if the OCMB is present itself. This commit adds a check to ensure we dont attempt i2c reads on devices that are not present. Also this commit adds a check to make sure we do not attempt presence detection on GEMINI ocmbs Change-Id: I999189b3b97210bb37b7ba1fdb2d86658d770e36 CQ: SW480414 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/86564 Reviewed-by: Ilya Smirnov <ismirno@us.ibm.com> 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>
Diffstat (limited to 'src/include')
-rw-r--r--src/include/usr/fapiwrap/fapiWrapif.H15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/include/usr/fapiwrap/fapiWrapif.H b/src/include/usr/fapiwrap/fapiWrapif.H
index e3a50f3b7..6a59e4c3f 100644
--- a/src/include/usr/fapiwrap/fapiWrapif.H
+++ b/src/include/usr/fapiwrap/fapiWrapif.H
@@ -60,12 +60,19 @@ namespace FAPIWRAP
* @brief This function wraps around the FAPI2 HWP "get_pmic_i2c_addr" which
* takes in a DDIMM's DDR4 SPD data and a PMIC's position relative to
* its parent OCMB's chip and returns the device address of that pmic
- * @param[in] i_spd - Binary blob containing addresses a given OCMB's PMICs
+ * This wrapper will actually lookup the SPD of a given ocmb target so
+ * the caller doesnt need to worry about it.
+ * @param[in] i_ocmbChip - Parent ocmb of the PMIC we wish to find the device addres of
* @param[in] i_pmic_id - PMIC's position relative to parent OCMB
- * @return uint8_t 0 if invalid pmic_id is passed, PMIC's devAddress otherwise
+ * @param[out]o_pmic_devAddr - If this pmic exists on the ocmb then return the device address
+ found in the SPD. Otherwise return NO_PMIC_DEV_ADDR
+ * @return errlHndl_t - nullptr if no error, otherwise contains error
*/
- uint8_t get_pmic_dev_addr( const char* i_spd,
- const uint8_t i_pmic_id);
+ errlHndl_t get_pmic_dev_addr( TARGETING::Target * i_ocmbChip,
+ const uint8_t i_pmic_id,
+ uint8_t& o_pmic_devAddr);
+
+ constexpr uint8_t NO_PMIC_DEV_ADDR = 0xFF;
}
OpenPOWER on IntegriCloud