diff options
author | mbroyles <mbroyles@us.ibm.com> | 2018-03-08 09:53:50 -0600 |
---|---|---|
committer | Martha Broyles <mbroyles@us.ibm.com> | 2018-03-12 15:42:05 -0400 |
commit | c8538f3c894d5f28f688f7a081507c3ef14d6c24 (patch) | |
tree | 3e8beb661390e8fb0753884cc6ba2356d54f41b3 /src/occ_405/amec | |
parent | 768466b31e853cb11dfa90dbfc1565a21ee9646e (diff) | |
download | talos-occ-c8538f3c894d5f28f688f7a081507c3ef14d6c24.tar.gz talos-occ-c8538f3c894d5f28f688f7a081507c3ef14d6c24.zip |
Regulator N mode support
Change-Id: Ieac1aa5e608a7ff778c71363756ac6c5ddeead89
RTC: 166206
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/55252
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Douglas R. Gilbert <dgilbert@us.ibm.com>
Reviewed-by: Andres A. Lugo-Reyes <aalugore@us.ibm.com>
Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com>
Reviewed-by: Martha Broyles <mbroyles@us.ibm.com>
Diffstat (limited to 'src/occ_405/amec')
-rwxr-xr-x | src/occ_405/amec/amec_freq.c | 10 | ||||
-rw-r--r-- | src/occ_405/amec/amec_freq.h | 1 | ||||
-rw-r--r-- | src/occ_405/amec/amec_init.c | 3 | ||||
-rwxr-xr-x | src/occ_405/amec/amec_sys.h | 3 |
4 files changed, 16 insertions, 1 deletions
diff --git a/src/occ_405/amec/amec_freq.c b/src/occ_405/amec/amec_freq.c index 51b04dc..496be9f 100755 --- a/src/occ_405/amec/amec_freq.c +++ b/src/occ_405/amec/amec_freq.c @@ -159,7 +159,6 @@ errlHndl_t amec_set_freq_range(const OCC_MODE i_mode) // if (redundant ps policy is being enforced) if (G_sysConfigData.system_type.non_redund_ps == false) { - // OVERSUB is actually TURBO // check if need to lower max frequency due to being in oversubscription. 0 oversub freq means no freq limitation if( AMEC_INTF_GET_OVERSUBSCRIPTION() && (G_sysConfigData.sys_mode_freq.table[OCC_MODE_OVERSUB]) && (G_sysConfigData.sys_mode_freq.table[OCC_MODE_OVERSUB] < l_freq_max) ) @@ -310,6 +309,15 @@ void amec_slv_proc_voting_box(void) // This function implements the voting box to decide which input gets the right // to actuate the system. + // If there is an active VRM fault and a defined VRM N frequency less than max use it + if( (g_amec->sys.vrm_fault_status) && + (G_sysConfigData.sys_mode_freq.table[OCC_MODE_VRM_N]) && + (G_sysConfigData.sys_mode_freq.table[OCC_MODE_VRM_N] < l_chip_fmax) ) + { + l_chip_fmax = G_sysConfigData.sys_mode_freq.table[OCC_MODE_VRM_N]; + l_chip_reason = AMEC_VOTING_REASON_VRM_N; + } + // PPB_FMAX if(g_amec->proc[0].pwr_votes.ppb_fmax < l_chip_fmax) { diff --git a/src/occ_405/amec/amec_freq.h b/src/occ_405/amec/amec_freq.h index 2cf3c85..6d183c8 100644 --- a/src/occ_405/amec/amec_freq.h +++ b/src/occ_405/amec/amec_freq.h @@ -82,6 +82,7 @@ typedef enum AMEC_VOTING_REASON_IPS = 0x00040000, AMEC_VOTING_REASON_APSS_PMAX = 0x00080000, AMEC_VOTING_REASON_VDD_THRM = 0x00100000, + AMEC_VOTING_REASON_VRM_N = 0x00200000, }amec_freq_voting_reason_t; diff --git a/src/occ_405/amec/amec_init.c b/src/occ_405/amec/amec_init.c index e6c40f2..9f57117 100644 --- a/src/occ_405/amec/amec_init.c +++ b/src/occ_405/amec/amec_init.c @@ -341,6 +341,9 @@ void amec_init_gamec_struct(void) // update memory control registers only if new ips/default memory power control is different g_amec->sys.current_mem_pwr_ctl = MEM_PWR_CTL_NO_SUPPORT; + // Initialize to no VRM faults + g_amec->sys.vrm_fault_status = 0; + // Initialize wof_disabled g_amec->wof.wof_disabled = WOF_RC_OCC_WOF_DISABLED; diff --git a/src/occ_405/amec/amec_sys.h b/src/occ_405/amec/amec_sys.h index 2d26547..bcb11b8 100755 --- a/src/occ_405/amec/amec_sys.h +++ b/src/occ_405/amec/amec_sys.h @@ -392,6 +392,9 @@ typedef struct // Current Memory Power Control values (applied last through GPE1) uint8_t current_mem_pwr_ctl; + + // Current VRM Fault status as recieved from VRM fault config data packet + uint8_t vrm_fault_status; } amec_systemwide_t; |