summaryrefslogtreecommitdiffstats
path: root/src/import/chips/ocmb/explorer/procedures/hwp/memory
diff options
context:
space:
mode:
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