diff options
author | Chris Cain <cjcain@us.ibm.com> | 2017-02-06 10:04:54 -0600 |
---|---|---|
committer | Christopher J. Cain <cjcain@us.ibm.com> | 2017-02-14 12:32:31 -0500 |
commit | 1747f6fbb5ad8e61e31c4c320bbff01e5636da62 (patch) | |
tree | 25191de8d8aa007ad32a65cee1370b82d0c09899 /src/occ_gpe1/gpe1_dimm_read.c | |
parent | 9405a91ef65ac39eb27cda9c5db52c20cc4cc30b (diff) | |
download | talos-occ-1747f6fbb5ad8e61e31c4c320bbff01e5636da62.tar.gz talos-occ-1747f6fbb5ad8e61e31c4c320bbff01e5636da62.zip |
Fix DIMM temperature reads
FIFO4 register requires a 4 byte read or will hang.
OCC will request 4 byte read, but only look at first 2 for temperature.
FIFO register can only read one byte per request which is less efficient.
Change-Id: Ia0bbbc70f5b7de76f1bea64279b2ff7dd5b5a861
Reviewed-on: http://ralgit01.raleigh.ibm.com/gerrit1/35974
Tested-by: FSP CI Jenkins <fsp-CI-jenkins+hostboot@us.ibm.com>
Reviewed-by: Martha Broyles <mbroyles@us.ibm.com>
Reviewed-by: William A. Bryan <wilbryan@us.ibm.com>
Reviewed-by: Christopher J. Cain <cjcain@us.ibm.com>
Diffstat (limited to 'src/occ_gpe1/gpe1_dimm_read.c')
-rw-r--r-- | src/occ_gpe1/gpe1_dimm_read.c | 15 |
1 files changed, 6 insertions, 9 deletions
diff --git a/src/occ_gpe1/gpe1_dimm_read.c b/src/occ_gpe1/gpe1_dimm_read.c index e0ee84c..86d80b6 100644 --- a/src/occ_gpe1/gpe1_dimm_read.c +++ b/src/occ_gpe1/gpe1_dimm_read.c @@ -370,10 +370,12 @@ void dimm_initiate_read(ipc_msg_t* cmd, void* arg) if ((regValue & STATUS_ERROR_OR_COMPLETE_MASK) == STATUS_COMPLETE_MASK) { // Status register indicates no errors and last command completed. - // Write the I2C command register with a 2 byte read request + // Write the I2C command register with a 2 byte read request. + // Since FIFO4 can read 4 bytes in one operation, we will do a read of 4 bytes + // and only look at first 2 bytes. (FIFO4 will hang if only try to read 2 bytes) scomAddr = I2C_COMMAND_REG | SCOM_ENGINE_OFFSET(args->i2cEngine); - // start+address+stop + slave_address, rw=1=read, length=2 - regValue = 0xD001000200000000; + // start+address+stop + slave_address, rw=1=read, length=4 + regValue = 0xD001000400000000; regValue |= ((uint64_t)args->i2cAddr << 48); rc = putscom_abs(scomAddr, regValue); if(rc) @@ -497,12 +499,7 @@ void dimm_read_temp(ipc_msg_t* cmd, void* arg) WORD_HIGH(regValue), WORD_LOW(regValue)); gpe_set_ffdc(&(args->error), scomAddr, GPE_RC_I2C_ERROR, regValue); } - else if (regValue & PEEK_MORE_DATA) - { - // The data_request bit is non-zero, but no more data is needed! - PK_TRACE("dimm_read_temp: Got data, but more data needs access??"); - gpe_set_ffdc(&(args->error), scomAddr, GPE_RC_NOT_COMPLETE, regValue); - } + // PEEK_MORE_DATA will be set because we only read 2 of the 4 bytes (ignore this bit) } } // else, all data not available yet (NOT_COMPLETE) |