From 5225d641f4b91e9eeae9a548b74a5208d35bb16e Mon Sep 17 00:00:00 2001 From: Rahul Batra Date: Thu, 15 Jun 2017 14:08:08 -0500 Subject: PSTATE: FIT threshold set based on Nest Freq Change-Id: Ib8c413f38c661f39d3bc13a6b0e7521164ad72d1 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/41898 Reviewed-by: Douglas R. Gilbert Tested-by: Jenkins Server Reviewed-by: Gregory S. Still Reviewed-by: Jennifer A. Stofer --- .../ppe_closed/pgpe/pstate_gpe/p9_pgpe_fit.c | 32 ++++++---------------- 1 file changed, 9 insertions(+), 23 deletions(-) diff --git a/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_fit.c b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_fit.c index 8ec65ed6..9772092f 100644 --- a/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_fit.c +++ b/import/chips/p9/procedures/ppe_closed/pgpe/pstate_gpe/p9_pgpe_fit.c @@ -51,34 +51,20 @@ void p9_pgpe_fit_handler(void* arg, PkIrqId irq); //and also enable and setup the fit handler void p9_pgpe_fit_init() { -// uint16_t freq = G_gppb->nest_frequency_mhz; + uint16_t freq = G_gppb->nest_frequency_mhz; - PK_TRACE_DBG("Fit NestFreq=0x%x", G_gppb->nest_frequency_mhz); - //Set fit count threshold - //\todo Set fit_count threshold correctly RTC: 173170 - /* - G_beacon_count_threshold = (freq < 1049) ? 7 : - (freq < 1180) ? 8 : - (freq < 1311) ? 9 : - (freq < 1442) ? 10 : - (freq < 1573) ? 11 : - (freq < 1704) ? 12 : - (freq < 1835) ? 13 : - (freq < 1966) ? 14 : - (freq < 2097) ? 15 : - (freq < 2228) ? 16 : - (freq < 2359) ? 17 : - (freq < 2490) ? 18 : - (freq < 2621) ? 19 : - (freq < 2753) ? 20 : - (freq < 2884) ? 21 : - (freq < 3015) ? 22 : - (freq < 3146) ? 23 : 24;*/ + PK_TRACE_DBG("Fit NestFreq=0x%dMhz", G_gppb->nest_frequency_mhz); + //Set fit count threshold + G_beacon_count_threshold = (freq < 1573) ? 6 : + (freq < 1835) ? 7 : + (freq < 2097) ? 8 : + (freq < 2359) ? 9 : + (freq < 2621) ? 10 : 11; + PK_TRACE_DBG("Fit BeaconThr=0x%d", G_beacon_count_threshold); G_throttleCount = 0; G_beacon_count = 0; - G_beacon_count_threshold = 2; ppe42_fit_setup(p9_pgpe_fit_handler, NULL); } -- cgit v1.2.3