diff options
author | William Bryan <wilbryan@us.ibm.com> | 2017-07-21 12:35:45 -0500 |
---|---|---|
committer | William A. Bryan <wilbryan@us.ibm.com> | 2017-07-21 17:07:27 -0400 |
commit | cf1a6cc0ab4e6b5203129925b1e9bb38cd0ae9aa (patch) | |
tree | cf649f181f92cea7856642b962e94eafe549893e | |
parent | cbedccff001c94de84fdc01d1ea8a38a8264598e (diff) | |
download | talos-occ-cf1a6cc0ab4e6b5203129925b1e9bb38cd0ae9aa.tar.gz talos-occ-cf1a6cc0ab4e6b5203129925b1e9bb38cd0ae9aa.zip |
busy_wait fix
Change-Id: If6c3ef7ca8a0cdb9331b95c8b37e45f092879a58
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43442
Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com>
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
-rwxr-xr-x | src/occ_405/occbuildname.c | 2 | ||||
-rw-r--r-- | src/occ_gpe0/gpe_util.c | 7 |
2 files changed, 5 insertions, 4 deletions
diff --git a/src/occ_405/occbuildname.c b/src/occ_405/occbuildname.c index ae60fe0..2681683 100755 --- a/src/occ_405/occbuildname.c +++ b/src/occ_405/occbuildname.c @@ -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_170719a\0" /*</BuildName>*/ ; +volatile const char G_occ_buildname[16] __attribute__((section(".buildname"))) = /*<BuildName>*/ "op_occ_170721a\0" /*</BuildName>*/ ; #endif diff --git a/src/occ_gpe0/gpe_util.c b/src/occ_gpe0/gpe_util.c index b2540de..61ee5e9 100644 --- a/src/occ_gpe0/gpe_util.c +++ b/src/occ_gpe0/gpe_util.c @@ -5,7 +5,7 @@ /* */ /* OpenPOWER OnChipController Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015,2016 */ +/* Contributors Listed Below - COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -151,8 +151,9 @@ void busy_wait(uint32_t i_microseconds) MFDEC(start_decrementer_value); // get the decrementer register value at the beginning current_decrementer_value = start_decrementer_value; - // multiply the delay time by the external clock frequency. - duration = i_microseconds * (G_gpe_shared_data->nest_freq_div / 1000000); + // multiply the delay time by the external clock frequency (~37.5 MHz) + duration = (i_microseconds * 37); + duration += (i_microseconds >> 1); // Calculate the decrementer register value at the end of the busy wait period end_decrementer_value = start_decrementer_value - duration; |