From 0e15017d11ea9ff2dd705119feeb9ed73ed405dc Mon Sep 17 00:00:00 2001 From: Christian Geddes Date: Wed, 24 Oct 2018 10:47:24 -0500 Subject: 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 Tested-by: Hostboot CI Reviewed-by: Louis Stermole Reviewed-by: STEPHEN GLANCY Reviewed-by: Jennifer A. Stofer Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/67961 Tested-by: Jenkins OP Build CI Tested-by: Jenkins OP HW Tested-by: FSP CI Jenkins Reviewed-by: Daniel M. Crowell --- src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C') 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 #include +#include namespace mss { @@ -107,7 +108,7 @@ fapi2::ReturnCode putScom( const fapi2::buffer& 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& 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); } -- cgit v1.2.1