Skip to content

Commit

Permalink
Use Turbo for max frequency until WOF is fully enabled
Browse files Browse the repository at this point in the history
Change-Id: Ie670ed425c580718e3b90b1cabb4417062c951f0
CQ: SW424084
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/56974
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Martha Broyles <mbroyles@us.ibm.com>
Reviewed-by: Andres A. Lugo-Reyes <aalugore@us.ibm.com>
Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com>
  • Loading branch information
cjcain committed Apr 10, 2018
1 parent 1bf5605 commit da6e77f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 14 deletions.
6 changes: 3 additions & 3 deletions src/occ_405/amec/amec_freq.c
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
/* */
/* OpenPOWER OnChipController Project */
/* */
/* Contributors Listed Below - COPYRIGHT 2011,2017 */
/* Contributors Listed Below - COPYRIGHT 2011,2018 */
/* [+] International Business Machines Corp. */
/* */
/* */
Expand Down Expand Up @@ -122,7 +122,7 @@ errlHndl_t amec_set_freq_range(const OCC_MODE i_mode)
l_freq_min = G_sysConfigData.sys_mode_freq.table[OCC_MODE_MIN_FREQUENCY];

// Set Max frequency (turbo if wof off, otherwise max possible (ultra turbo)
if( g_amec->wof.wof_disabled )
if( g_amec->wof.wof_disabled || (g_amec->wof.wof_init_state != WOF_ENABLED))
{
l_freq_max = G_sysConfigData.sys_mode_freq.table[OCC_MODE_TURBO];
}
Expand All @@ -141,7 +141,7 @@ errlHndl_t amec_set_freq_range(const OCC_MODE i_mode)
(i_mode == OCC_MODE_DYN_POWER_SAVE_FP) )
{
// clip to turbo if WOF is disabled
if( g_amec->wof.wof_disabled )
if( g_amec->wof.wof_disabled || (g_amec->wof.wof_init_state != WOF_ENABLED))
{
l_freq_max = G_sysConfigData.sys_mode_freq.table[OCC_MODE_TURBO];
}
Expand Down
2 changes: 1 addition & 1 deletion src/occ_405/occbuildname.c
Original file line number Diff line number Diff line change
Expand Up @@ -34,6 +34,6 @@ volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) =

#else

volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) = /*<BuildName>*/ "op_occ_180328a\0" /*</BuildName>*/ ;
volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) = /*<BuildName>*/ "op_occ_180409a\0" /*</BuildName>*/ ;

#endif
20 changes: 10 additions & 10 deletions src/occ_405/wof/wof.c
Original file line number Diff line number Diff line change
Expand Up @@ -383,6 +383,13 @@ void call_wof_main( void )
if( g_wof->wof_init_state == PGPE_WOF_ENABLED_NO_PREV_DATA )
{
g_wof->wof_init_state = WOF_ENABLED;
// Set the the frequency ranges
errlHndl_t l_errl = amec_set_freq_range(CURRENT_MODE());
if(l_errl)
{
INTR_TRAC_ERR("call_wof_main: amec_set_freq_range reported an error");
commitErrl( &l_errl);
}
}
}
} // >= PGPE_WOF_ENABLED_NO_PREV_DATA
Expand Down Expand Up @@ -521,7 +528,7 @@ uint8_t calc_quad_step_from_start( void )
uint32_t calc_vfrt_mainstore_addr( void )
{
// Wof tables address calculation
// (Base_addr +
// (Base_addr +
// (sizeof VFRT * (total active quads * ( (g_wof->vdn_step_from_start * vdd_size) + (g_wof->vdd_step_from_start) ) + (g_wof->quad_step_from_start))))
g_wof->vfrt_mm_offset = g_wof->vfrt_block_size *
(( g_wof->active_quads_size *
Expand Down Expand Up @@ -593,7 +600,7 @@ void copy_vfrt_to_sram_callback( void )
*
* Description: Callback function for G_wof_vfrt_req GPE request to
* confirm the new VFRT is being used by the PGPE and
* record the switch on the 405. Also updates the
* record the switch on the 405. Also updates the
* initialization
*/
void wof_vfrt_callback( void )
Expand Down Expand Up @@ -961,7 +968,7 @@ void calculate_core_leakage( void )
G_oppb.iddq.avgtemp_all_good_cores_off,
quad_v_idx,
g_wof->tempprocthrmc[core_idx],
g_wof->v_core_100uV[quad_idx])
g_wof->v_core_100uV[quad_idx])
+
(g_wof->all_cores_off_iso * G_oppb.iddq.good_normal_cores[quad_idx])
/ 24;
Expand Down Expand Up @@ -1479,13 +1486,6 @@ void set_clear_wof_disabled( uint8_t i_action,

// commit the error log
commitErrl( &l_errl );

// Set the the frequency ranges
l_errl = amec_set_freq_range(CURRENT_MODE());
if(l_errl)
{
commitErrl( &l_errl);
}
}
}
else
Expand Down

0 comments on commit da6e77f

Please sign in to comment.