summaryrefslogtreecommitdiffstats
path: root/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C
diff options
context:
space:
mode:
authorLouis Stermole <stermole@us.ibm.com>2019-05-14 14:13:41 -0400
committerChristian R. Geddes <crgeddes@us.ibm.com>2019-05-16 13:50:21 -0500
commit574186ea098a9e9dbb6de4ffa44e9489f3125e01 (patch)
tree6ab481db674df9009ac7bc1c0b976013c938227e /src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C
parent9870db1cf564c756304e4dad68c04b0763729738 (diff)
downloadtalos-hostboot-574186ea098a9e9dbb6de4ffa44e9489f3125e01.tar.gz
talos-hostboot-574186ea098a9e9dbb6de4ffa44e9489f3125e01.zip
Clear Explorer outbound doorbell after reading cmd response
Change-Id: I0952417923bcd1aedd1d707896e3293e30214455 Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/77351 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: Hostboot CI <hostboot-ci+hostboot@us.ibm.com> Reviewed-by: STEPHEN GLANCY <sglancy@us.ibm.com> Reviewed-by: Mark Pizzutillo <mark.pizzutillo@ibm.com> Reviewed-by: ANDRE A. MARIN <aamarin@us.ibm.com> Reviewed-by: Thi N. Tran <thi@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/77368 Tested-by: Jenkins OP Build CI <op-jenkins+hostboot@us.ibm.com> Tested-by: Jenkins OP HW <op-hw-jenkins+hostboot@us.ibm.com> Reviewed-by: Christian R. Geddes <crgeddes@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.C21
1 files changed, 21 insertions, 0 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 46a0c04b5..5f56f5242 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
@@ -502,6 +502,25 @@ fapi_try_exit:
return fapi2::current_err;
}
+///
+/// @brief Clears outbound (response ready) door bell bit
+/// @param[in] i_target the OCMB target on which to operate
+/// @return fapi2::ReturnCode. FAPI2_RC_SUCCESS if success, else error code.
+///
+fapi2::ReturnCode clear_outbound_doorbell(const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& i_target)
+{
+ fapi2::buffer<uint64_t> l_data;
+
+ // Doorbell is cleared by writing a '1' to the doorbell bit
+ l_data.setBit<EXPLR_MIPS_TO_OCMB_INTERRUPT_REGISTER1_DOORBELL>();
+
+ FAPI_DBG("%s Clearing outbound doorbell...", mss::c_str(i_target));
+ FAPI_TRY(fapi2::putScom(i_target, EXPLR_MIPS_TO_OCMB_INTERRUPT_REGISTER1, l_data));
+
+fapi_try_exit:
+ return fapi2::current_err;
+}
+
/// @brief Reads a response from the response buffer
///
/// @param[in] i_target The Explorer chip to read data from
@@ -547,6 +566,8 @@ fapi2::ReturnCode getRSP(
o_data.clear();
}
+ FAPI_TRY(clear_outbound_doorbell(i_target));
+
fapi_try_exit:
FAPI_DBG("%s Exiting with return code : 0x%08X...", mss::c_str(i_target), (uint64_t) fapi2::current_err);
return fapi2::current_err;
OpenPOWER on IntegriCloud