summaryrefslogtreecommitdiffstats
path: root/src/import/chips/p9/procedures/hwp/perv/p9_sbe_fastarray_abist_catchup.C
diff options
context:
space:
mode:
authornagurram-in <nagendra.g@in.ibm.com>2016-12-08 08:55:48 -0600
committerSachin Gupta <sgupta2m@in.ibm.com>2017-02-03 02:01:43 -0500
commit7ee601b23595c384dcd8dfc061c9621d538a1750 (patch)
tree18f55a9cf5dee9614a2529505cd1456843895e0c /src/import/chips/p9/procedures/hwp/perv/p9_sbe_fastarray_abist_catchup.C
parentf34b48890a268fc9962216a34abbf4f69105cabb (diff)
downloadtalos-sbe-7ee601b23595c384dcd8dfc061c9621d538a1750.tar.gz
talos-sbe-7ee601b23595c384dcd8dfc061c9621d538a1750.zip
L2 fast array procedure
Change-Id: Ibce0d60d85f8d26a42fef85c8f3b71b42f252363 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/33589 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Reviewed-by: Shakeeb A. Pasha B K <shakeebbk@in.ibm.com> Reviewed-by: Johannes Koesters <koesters@de.ibm.com> Reviewed-by: Jennifer A. Stofer <stofer@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35793 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com>
Diffstat (limited to 'src/import/chips/p9/procedures/hwp/perv/p9_sbe_fastarray_abist_catchup.C')
-rw-r--r--src/import/chips/p9/procedures/hwp/perv/p9_sbe_fastarray_abist_catchup.C25
1 files changed, 23 insertions, 2 deletions
diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_sbe_fastarray_abist_catchup.C b/src/import/chips/p9/procedures/hwp/perv/p9_sbe_fastarray_abist_catchup.C
index af0e267b..097f4d7e 100644
--- a/src/import/chips/p9/procedures/hwp/perv/p9_sbe_fastarray_abist_catchup.C
+++ b/src/import/chips/p9/procedures/hwp/perv/p9_sbe_fastarray_abist_catchup.C
@@ -6,6 +6,7 @@
/* OpenPOWER sbe Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2016,2017 */
+/* [+] International Business Machines Corp. */
/* */
/* */
/* Licensed under the Apache License, Version 2.0 (the "License"); */
@@ -39,14 +40,34 @@
// Includes
//-----------------------------------------------------------------------------------
#include <p9_sbe_fastarray_abist_catchup.H>
+#include <p9_perv_scom_addresses.H>
+#include <p9_perv_scom_addresses_fld.H>
fapi2::ReturnCode p9_sbe_fastarray_abist_catchup(
const fapi2::Target<fapi2::TARGET_TYPE_PERV>& i_target_chiplet,
const uint32_t i_clockCycles)
{
- FAPI_INF("Start");
- FAPI_INF("End");
+ fapi2::buffer<uint64_t> l_cc_buf = i_clockCycles;
+
+ l_cc_buf.setBit<PERV_1_OPCG_REG0_GO>();
+ FAPI_TRY(fapi2::putScom(i_target_chiplet, PERV_OPCG_REG0, l_cc_buf), "Failed to clock %d array cycle(s)",
+ i_clockCycles + 1);
+
+ /* If we clocked more than a single cycle, do due diligence and wait for OPCG_DONE */
+ if( i_clockCycles )
+ {
+ do
+ {
+ FAPI_TRY(fapi2::getScom(i_target_chiplet, PERV_CPLT_STAT0, l_cc_buf), "Failed to read Chiplet Status 0 Register");
+ }
+ while (!l_cc_buf.getBit<PERV_1_CPLT_STAT0_CC_CTRL_OPCG_DONE_DC>());
+ }
+
+ return fapi2::FAPI2_RC_SUCCESS;
+
+fapi_try_exit:
return fapi2::current_err;
+
}
OpenPOWER on IntegriCloud