summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--src/import/chips/p9/procedures/hwp/perv/p9_sbe_lpc_init.C11
-rw-r--r--src/import/chips/p9/procedures/hwp/perv/p9_sbe_lpc_init.H2
2 files changed, 13 insertions, 0 deletions
diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_sbe_lpc_init.C b/src/import/chips/p9/procedures/hwp/perv/p9_sbe_lpc_init.C
index 930fe7571..829db55e9 100644
--- a/src/import/chips/p9/procedures/hwp/perv/p9_sbe_lpc_init.C
+++ b/src/import/chips/p9/procedures/hwp/perv/p9_sbe_lpc_init.C
@@ -176,6 +176,17 @@ fapi2::ReturnCode p9_sbe_lpc_init(
FAPI_TRY(lpc_write(i_target_chip, LPCM_LPC_MASTER_TIMEOUT_REG, LPCM_LPC_MASTER_TIMEOUT_VALUE),
"Error trying to set up the LPC host controller timeout");
+ //------------------------------------------------------------------------------------------
+ //--- STEP 4: Check that everyone is happy
+ //------------------------------------------------------------------------------------------
+ FAPI_TRY(lpc_read(i_target_chip, LPCM_OPB_MASTER_STATUS_REG, l_data32),
+ "Error reading OPB master status register");
+ FAPI_ASSERT(0 == (l_data32 & LPCM_OPB_MASTER_STATUS_ERROR_BITS),
+ fapi2::LPC_OPB_ERROR().
+ set_FFDC_TARGET_CHIP(i_target_chip).
+ set_TARGET_CHIP(i_target_chip),
+ "The OPB master indicated an error after LPC setup");
+
FAPI_DBG("p9_sbe_lpc_init: Exiting ...");
fapi_try_exit:
diff --git a/src/import/chips/p9/procedures/hwp/perv/p9_sbe_lpc_init.H b/src/import/chips/p9/procedures/hwp/perv/p9_sbe_lpc_init.H
index 0c1fe9998..e68acd499 100644
--- a/src/import/chips/p9/procedures/hwp/perv/p9_sbe_lpc_init.H
+++ b/src/import/chips/p9/procedures/hwp/perv/p9_sbe_lpc_init.H
@@ -54,6 +54,8 @@ extern "C"
const uint64_t LPC_LRESET_OE = 23;
const uint64_t LPC_LRESET_OUT = 22;
const uint32_t LPC_LRESET_DELAY_NS = 200000;
+ const uint32_t LPCM_OPB_MASTER_STATUS_REG = 0xC0010000;
+ const uint32_t LPCM_OPB_MASTER_STATUS_ERROR_BITS = 0x20000FC3;
const uint32_t LPCM_OPB_MASTER_CONTROL_REG = 0xC0010008;
const uint32_t LPCM_OPB_MASTER_CONTROL_REG_TIMEOUT_ENABLE = 2;
const uint32_t LPCM_OPB_MASTER_TIMEOUT_REG = 0xC0010040;
OpenPOWER on IntegriCloud