diff options
author | Ilya Smirnov <ismirno@us.ibm.com> | 2017-07-31 10:35:00 -0500 |
---|---|---|
committer | William A. Bryan <wilbryan@us.ibm.com> | 2017-08-21 15:09:44 -0400 |
commit | 7efcfd6eaba07fbdd3eeed455c81c34e75735dc1 (patch) | |
tree | e4118313c1ba75cc5491345cc0d9d9005d23ce67 /src/occ_gpe0/firdata | |
parent | 3b72373a3bfd5716902b48515f96faac683ef8dd (diff) | |
download | talos-occ-7efcfd6eaba07fbdd3eeed455c81c34e75735dc1.tar.gz talos-occ-7efcfd6eaba07fbdd3eeed455c81c34e75735dc1.zip |
IPL Time Checkstop Analysis Part 3: OCC bootloader and main
Change-Id: Id4d050f1d78a1921afc839c8b2b382961def64f0
RTC:155065
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/43938
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: William G. Hoffa <wghoffa@us.ibm.com>
Reviewed-by: Martha Broyles <mbroyles@us.ibm.com>
Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
Diffstat (limited to 'src/occ_gpe0/firdata')
-rw-r--r-- | src/occ_gpe0/firdata/fsi.c | 7 | ||||
-rw-r--r-- | src/occ_gpe0/firdata/lpc.c | 3 | ||||
-rw-r--r-- | src/occ_gpe0/firdata/scom_util.c | 3 |
3 files changed, 8 insertions, 5 deletions
diff --git a/src/occ_gpe0/firdata/fsi.c b/src/occ_gpe0/firdata/fsi.c index fc5ec3c..767bcf4 100644 --- a/src/occ_gpe0/firdata/fsi.c +++ b/src/occ_gpe0/firdata/fsi.c @@ -1,11 +1,11 @@ /* IBM_PROLOG_BEGIN_TAG */ /* This is an automatically generated prolog. */ /* */ -/* $Source: src/occ/firdata/fsi.C $ */ +/* $Source: src/occ_gpe0/firdata/fsi.c $ */ /* */ /* OpenPOWER OnChipController Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2015 */ +/* Contributors Listed Below - COPYRIGHT 2015,2017 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -26,6 +26,7 @@ #include <fsi.h> #include <scom_util.h> #include <native.h> +#include <gpe_util.h> #define OPB_REG_CMD 0x00020010 #define OPB_REG_STAT 0x00020011 @@ -76,7 +77,7 @@ int32_t poll_for_complete( uint32_t * o_val ) /* Check for completion. Note: not checking for FSI errors. */ if ( (read_data & OPB_STAT_BUSY) == 0 ) break; /* Not busy */ - sleep( 10000 ); /* sleep for 10,000 ns */ + busy_wait( 10 ); /* sleep for 10,000 ns */ elapsed_time_ns += 10000; } while ( elapsed_time_ns <= MAX_OPB_TIMEOUT_NS ); diff --git a/src/occ_gpe0/firdata/lpc.c b/src/occ_gpe0/firdata/lpc.c index 7b9ffca..3f9f113 100644 --- a/src/occ_gpe0/firdata/lpc.c +++ b/src/occ_gpe0/firdata/lpc.c @@ -26,6 +26,7 @@ #include <native.h> #include <lpc.h> #include <scom_util.h> +#include <gpe_util.h> #define LPCHC_FW_SPACE 0xF0000000 /**< LPC Host Controller FW Space */ #define LPCHC_MEM_SPACE 0xE0000000 /**< LPC Host Controller Mem Space */ @@ -171,7 +172,7 @@ errorHndl_t pollComplete(CommandReg_t* i_ctrl, /* Want to start out incrementing by small numbers then get bigger to avoid a really tight loop in an error case so we'll increase the wait each time through */ - sleep( LPC_POLL_INCR_NS*(++loop) ); + busy_wait( (LPC_POLL_INCR_NS*(++loop))); poll_time += LPC_POLL_INCR_NS * loop; } while ( poll_time < LPC_POLL_TIME_NS ); diff --git a/src/occ_gpe0/firdata/scom_util.c b/src/occ_gpe0/firdata/scom_util.c index 5f5656a..3f14acb 100644 --- a/src/occ_gpe0/firdata/scom_util.c +++ b/src/occ_gpe0/firdata/scom_util.c @@ -31,6 +31,7 @@ #include "scom_addr_util.h" #include <sbe_fifo.h> #include <ppe42_scom.h> +#include <gpe_util.h> enum { /*FSI addresses are byte offsets, so need to multiply by 4 @@ -452,7 +453,7 @@ int32_t SCOM_getIdScom( SCOM_Trgt_t i_trgt, uint64_t i_addr, uint32_t * o_val ) /* Jump out when done. */ if ( scomout.done ) break; - sleep( 10000 ); /* sleep for 10,000 ns */ + busy_wait( 10 ); /* sleep for 10,000 ns */ elapsed_indScom_time_ns += 10000; } while ( elapsed_indScom_time_ns <= 100000 ); /* wait for .1ms */ |