summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAndres Lugo-Reyes <aalugore@us.ibm.com>2017-07-21 17:56:02 -0500
committerMartha Broyles <mbroyles@us.ibm.com>2017-07-26 13:50:23 -0400
commit579fd543e9d698dc3932e8f72b166233f8baa773 (patch)
tree7f577ea3112983922da35ae1ac9494e02e4a288b
parenta84955963839b3a035dd339d3ba13e0acb88547a (diff)
downloadtalos-occ-579fd543e9d698dc3932e8f72b166233f8baa773.tar.gz
talos-occ-579fd543e9d698dc3932e8f72b166233f8baa773.zip
WOF: Check OPPB to see if wof is enabled
-If OPPB determines wof is disabled, suppress all wof related error logs Change-Id: Ib353256512dc313716ab732bacf4d16b7eaf55ca CQ:SW396068 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43571 Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com> Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com> Reviewed-by: Martha Broyles <mbroyles@us.ibm.com>
-rwxr-xr-xsrc/occ_405/main.c13
-rw-r--r--src/occ_405/wof/wof.c26
-rw-r--r--src/occ_405/wof/wof.h1
3 files changed, 34 insertions, 6 deletions
diff --git a/src/occ_405/main.c b/src/occ_405/main.c
index 307db17..f7784e6 100755
--- a/src/occ_405/main.c
+++ b/src/occ_405/main.c
@@ -1052,6 +1052,19 @@ bool read_oppb_params()
break;
}
+ // Confirm whether we have wof support
+ if(!(G_oppb.wof.wof_enabled))
+ {
+ MAIN_TRAC_INFO("OPPB has WOF disabled.(%d)",
+ G_oppb.wof.wof_enabled);
+ set_clear_wof_disabled( SET, WOF_RC_OPPB_WOF_DISABLED );
+ }
+ else
+ {
+ MAIN_TRAC_INFO("OPPB has WOF enabled(%d)",
+ G_oppb.wof.wof_enabled);
+ }
+
} while (0);
if (l_reasonCode)
diff --git a/src/occ_405/wof/wof.c b/src/occ_405/wof/wof.c
index 3114480..f9a3fbe 100644
--- a/src/occ_405/wof/wof.c
+++ b/src/occ_405/wof/wof.c
@@ -1291,10 +1291,10 @@ void set_clear_wof_disabled( uint8_t i_action,
// Set the bit
g_wof->wof_disabled |= i_bit_mask;
-
- // If OCC has not yet been enabled through TMGT/HTMGT, skip
+ // If OCC has not yet been enabled through TMGT/HTMGT/OPPB, skip
// error log
- if( g_wof->wof_disabled & WOF_RC_OCC_WOF_DISABLED )
+ if( (g_wof->wof_disabled & WOF_RC_OCC_WOF_DISABLED) ||
+ (g_wof->wof_disabled & WOF_RC_OPPB_WOF_DISABLED) )
{
INTR_TRAC_ERR("OCC encountered a WOF error before TMGT/HTMGT"
" enabled it. wof_disabled = 0x%08x",
@@ -1340,6 +1340,7 @@ void set_clear_wof_disabled( uint8_t i_action,
l_errl = amec_set_freq_range(CURRENT_MODE());
if(l_errl)
{
+ INTR_TRAC_ERR("WOF: amec_set_freq_range reported an error");
commitErrl( &l_errl);
}
}
@@ -1351,10 +1352,23 @@ void set_clear_wof_disabled( uint8_t i_action,
g_wof->wof_disabled &= ~i_bit_mask;
// If TMGT/HTMGT is enabling WOF, check for any previous
- // errors and log if they exist.
- if( i_bit_mask == WOF_RC_OCC_WOF_DISABLED )
+ // errors and log if they exist and if they
+ // should log an error.
+ if( (i_bit_mask == WOF_RC_OCC_WOF_DISABLED) ||
+ (i_bit_mask == WOF_RC_OPPB_WOF_DISABLED) )
{
- if( g_wof->wof_disabled )
+
+ uint32_t disabled_mask = WOF_RC_OCC_WOF_DISABLED |
+ WOF_RC_OPPB_WOF_DISABLED;
+
+ // If OPPB or (H)TMGT still say wof is disabled, don't log
+ // any errors if the other is still set.
+ if( g_wof->wof_disabled & disabled_mask )
+ {
+ break;
+ }
+ // Log any lingering errors.
+ else if( g_wof->wof_disabled & ERRL_RETURN_CODES )
{
l_logError = true;
}
diff --git a/src/occ_405/wof/wof.h b/src/occ_405/wof/wof.h
index cc719e1..01162c4 100644
--- a/src/occ_405/wof/wof.h
+++ b/src/occ_405/wof/wof.h
@@ -64,6 +64,7 @@
#define WOF_RC_DRIVER_WOF_DISABLED 0x00008000
#define WOF_RC_UTURBO_IS_ZERO 0x00010000
#define WOF_RC_OCC_WOF_DISABLED 0x00020000
+#define WOF_RC_OPPB_WOF_DISABLED 0x00040000
//***************************************************************************
// Temp space used to save hard coded addresses
OpenPOWER on IntegriCloud