summaryrefslogtreecommitdiffstats
path: root/src/import/chips/ocmb/explorer/procedures/hwp/memory
diff options
context:
space:
mode:
authorLouis Stermole <stermole@us.ibm.com>2019-06-21 15:19:05 -0400
committerChristian R. Geddes <crgeddes@us.ibm.com>2019-07-09 10:20:58 -0500
commitd6bd1b69780193308c0a8156d2c7e86f0d76ccfe (patch)
tree6bb64eed19f9ce360e5cddcb2690df50baa9b818 /src/import/chips/ocmb/explorer/procedures/hwp/memory
parentedce11bc98f220b92a9906929891ea430b77a54d (diff)
downloadtalos-hostboot-d6bd1b69780193308c0a8156d2c7e86f0d76ccfe.tar.gz
talos-hostboot-d6bd1b69780193308c0a8156d2c7e86f0d76ccfe.zip
Increase doorbell polling duration in exp_draminit
Change-Id: Icc300f35c727fd484c193388ad9e1e4394fb353f Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79343 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Mark Pizzutillo <mark.pizzutillo@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: Jennifer A Stofer <stofer@us.ibm.com> Reviewed-on: http://rchgit01.rchland.ibm.com/gerrit1/79358 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')
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_draminit.C5
-rw-r--r--src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_inband.C7
2 files changed, 11 insertions, 1 deletions
diff --git a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_draminit.C b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_draminit.C
index 1a7abba82..7f8711c3a 100644
--- a/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_draminit.C
+++ b/src/import/chips/ocmb/explorer/procedures/hwp/memory/exp_draminit.C
@@ -72,6 +72,11 @@ extern "C"
"Failed putCMD() for %s", mss::c_str(i_target) );
}
+ // Wait a bit for the command (and training) to complete
+ // Value based on initial Explorer hardware in Cronus in i2c mode.
+ // Training takes ~10ms with no trace, ~450ms with Explorer UART debug
+ FAPI_TRY( fapi2::delay( (mss::DELAY_1MS * 8), 200) );
+
// Read the response message from EXP-FW RESP buffer
{
host_fw_response_struct l_response;
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 9157b1583..e527207cd 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
@@ -538,6 +538,11 @@ fapi_try_exit:
///
fapi2::ReturnCode poll_for_response_ready(const fapi2::Target<fapi2::TARGET_TYPE_OCMB_CHIP>& i_target)
{
+ // NUM_LOOPS is based on EXP_FW_DDR_PHY_INIT command, which completes in ~10ms in HW.
+ // We initially delay 8ms, so we should only need to poll for ~2ms here.
+ // We're waiting 100us between polls, so we should only need about 20 loops here,
+ // but we make it 50 to be safe
+
constexpr uint64_t NUM_LOOPS = 50;
// So, why aren't we using the memory team's polling API?
// This is a base function that will be utilized by the platform code
@@ -552,7 +557,7 @@ fapi2::ReturnCode poll_for_response_ready(const fapi2::Target<fapi2::TARGET_TYPE
{
FAPI_TRY(fapi2::getScom(i_target, EXPLR_MIPS_TO_OCMB_INTERRUPT_REGISTER1, l_data));
l_doorbell_response = l_data.getBit<EXPLR_MIPS_TO_OCMB_INTERRUPT_REGISTER1_DOORBELL>();
- FAPI_TRY( fapi2::delay( DELAY_100NS, 200) );
+ FAPI_TRY( fapi2::delay(DELAY_100US, 200) );
}
FAPI_DBG("%s stopped on loop%u/%u data:0x%016lx %u",
OpenPOWER on IntegriCloud