summaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorDoug Gilbert <dgilbert@us.ibm.com>2016-11-22 11:13:04 -0600
committerSachin Gupta <sgupta2m@in.ibm.com>2017-01-03 22:10:56 -0500
commit45b1578c1eb188d7874b1f4e7dbab48ca61f2437 (patch)
tree2e585075c4a126ca10fb48da30ec363057d9d9b7 /src
parentb89ea0f1b898995a3fdb3a9199f551b7a93eda5e (diff)
downloadtalos-sbe-45b1578c1eb188d7874b1f4e7dbab48ca61f2437.tar.gz
talos-sbe-45b1578c1eb188d7874b1f4e7dbab48ca61f2437.zip
PK Support for 1.125 timebase scale
Change-Id: I11b399cb2ab86d1113713c8c0ed6a40e8f0504e1 RTC:165134 Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/32919 Tested-by: Jenkins Server <pfd-jenkins+hostboot@us.ibm.com> Tested-by: PPE CI <ppe-ci+hostboot@us.ibm.com> Reviewed-by: Sachin Gupta <sgupta2m@in.ibm.com> Reviewed-by: Gregory S. Still <stillgs@us.ibm.com> Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/32921 Reviewed-by: Hostboot Team <hostboot@us.ibm.com> Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Diffstat (limited to 'src')
-rw-r--r--src/import/chips/p9/procedures/ppe/pk/kernel/pk_init.c18
1 files changed, 12 insertions, 6 deletions
diff --git a/src/import/chips/p9/procedures/ppe/pk/kernel/pk_init.c b/src/import/chips/p9/procedures/ppe/pk/kernel/pk_init.c
index 0681987d..d2220946 100644
--- a/src/import/chips/p9/procedures/ppe/pk/kernel/pk_init.c
+++ b/src/import/chips/p9/procedures/ppe/pk/kernel/pk_init.c
@@ -5,7 +5,7 @@
/* */
/* OpenPOWER sbe Project */
/* */
-/* Contributors Listed Below - COPYRIGHT 2015,2016 */
+/* Contributors Listed Below - COPYRIGHT 2015,2017 */
/* [+] International Business Machines Corp. */
/* */
/* */
@@ -52,23 +52,29 @@ uint8_t __pk_timebase_rshift = 32;
void pk_set_timebase_rshift(uint32_t timebase_freq_hz)
{
- //Use 1.0 scale if less than halfway between 1.0 and 1.25
- if(timebase_freq_hz <= (PK_BASE_FREQ_HZ + (PK_BASE_FREQ_HZ >> 3)))
+ //Use 1.0 scale if less than or equal to 1.0625 * base frequency
+ if(timebase_freq_hz <= (PK_BASE_FREQ_HZ + (PK_BASE_FREQ_HZ >> 4)))
{
__pk_timebase_rshift = 32;
}
- //use 1.25 scale if less than halfway between 1.25 and 1.5
+ //use 1.125 scale if between 1.0625 and 1.1875 * base frequency
+ else if(timebase_freq_hz <= (PK_BASE_FREQ_HZ + (PK_BASE_FREQ_HZ >> 4) + (PK_BASE_FREQ_HZ >> 3)))
+ {
+ __pk_timebase_rshift = 3;
+ }
+
+ //use 1.25 scale if between 1,1875 and 1.375 * base frequency
else if(timebase_freq_hz <= (PK_BASE_FREQ_HZ + (PK_BASE_FREQ_HZ >> 3) + (PK_BASE_FREQ_HZ >> 2)))
{
__pk_timebase_rshift = 2;
}
- //use 1.5 scale if less than halfway between 1.5 and 2.0
+ //use 1.5 scale if between 1.375 and 1.75 * base frequency
else if(timebase_freq_hz <= (PK_BASE_FREQ_HZ + (PK_BASE_FREQ_HZ >> 2) + (PK_BASE_FREQ_HZ >> 1)))
{
__pk_timebase_rshift = 1;
}
- //use 2.0 scale if greater than 1.5
+ //use 2.0 scale if greater than 1.75 * base frequency
else
{
__pk_timebase_rshift = 0;
OpenPOWER on IntegriCloud