summaryrefslogtreecommitdiffstats
path: root/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C
diff options
context:
space:
mode:
authorChristian Geddes <crgeddes@us.ibm.com>2018-10-24 10:47:24 -0500
committerDaniel M. Crowell <dcrowell@us.ibm.com>2018-11-05 22:11:45 -0600
commit0e15017d11ea9ff2dd705119feeb9ed73ed405dc (patch)
treecae5e4b317f5e7bdb9dd28ee272d809491622d1c /src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C
parentc826f6afcb57031ebf3a8fa948926feaf5792497 (diff)
downloadtalos-hostboot-0e15017d11ea9ff2dd705119feeb9ed73ed405dc.tar.gz
talos-hostboot-0e15017d11ea9ff2dd705119feeb9ed73ed405dc.zip
Add exp_i2c_scom driver that will be consumed by HB/SBE platforms
This commit adds a new exp_i2c_scom.H file which contains two functions, i2c_get_scom and i2c_put_scom. These functions will take in a fapi2 OCMB target, an address and a buffer that either contains scom data to write or space for scom data to be written to. The functions use the fapi2::puti2c / fapi2::geti2c interfaces to perform the scoms. Change-Id: I4de680e187258cbfc57dd71f698dc1fc8760cefb RTC:196806 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/67949 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: Louis Stermole <stermole@us.ibm.com> Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/67961 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/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C')
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C5
1 files changed, 3 insertions, 2 deletions
diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C
index a6fe8105e..4bccb489b 100644
--- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C
+++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C
@@ -38,6 +38,7 @@
#include <mmio_access.H>
#include <generic/memory/lib/utils/c_str.H>
+#include <generic/memory/lib/utils/endian_utils.H>
namespace mss
{
@@ -107,7 +108,7 @@ fapi2::ReturnCode putScom(
const fapi2::buffer<uint64_t>& i_data)
{
// Converts from the scom address to the MMIO address by shifting left by 3 bits
- uint64_t l_scomAddr = i_scomAddr << 3;
+ uint64_t l_scomAddr = i_scomAddr << OCMB_ADDR_SHIFT;
return putMMIO64(i_target, l_scomAddr, i_data);
}
@@ -350,7 +351,7 @@ fapi2::ReturnCode getScom(
fapi2::buffer<uint64_t>& o_data)
{
// Converts from the scom address to the MMIO address by shifting left by 3 bits
- uint64_t l_scomAddr = i_scomAddr << 3;
+ uint64_t l_scomAddr = i_scomAddr << OCMB_ADDR_SHIFT;
return getMMIO64(i_target, l_scomAddr, o_data);
}
OpenPOWER on IntegriCloud