diff options
Diffstat (limited to 'src/occ_405/amec/amec_amester.c')
-rwxr-xr-x | src/occ_405/amec/amec_amester.c | 28 |
1 files changed, 25 insertions, 3 deletions
diff --git a/src/occ_405/amec/amec_amester.c b/src/occ_405/amec/amec_amester.c index 2bee6a6..55a9cca 100755 --- a/src/occ_405/amec/amec_amester.c +++ b/src/occ_405/amec/amec_amester.c @@ -5,7 +5,7 @@ /* */ /* OpenPOWER OnChipController Project */ /* */ -/* Contributors Listed Below - COPYRIGHT 2011,2017 */ +/* Contributors Listed Below - COPYRIGHT 2011,2018 */ /* [+] International Business Machines Corp. */ /* */ /* */ @@ -276,7 +276,18 @@ static uint8_t amester_get_sensor_info( uint8_t* o_resp, uint16_t* io_resp_lengt break; } - *((uint32_t *)o_resp) = l_sensorInfo.sensor.scalefactor; + if( (MEM_TYPE_NIMBUS == G_sysConfigData.mem_type) && + ( ((i_sensor >= MRDM0) && + (i_sensor <= MRDM7)) || + ((i_sensor >= MWRM0) && + (i_sensor <= MWRM7)) ) ) + { + *((uint32_t *)o_resp) = AMEFP(64, -5); + } + else + { + *((uint32_t *)o_resp) = l_sensorInfo.sensor.scalefactor; + } *io_resp_length = l_length; break; } @@ -308,7 +319,18 @@ static uint8_t amester_get_sensor_info( uint8_t* o_resp, uint16_t* io_resp_lengt *((uint32_t *)dest) = l_sensorInfo.sensor.freq; dest+= 4; - *((uint32_t *)dest) = l_sensorInfo.sensor.scalefactor; + if( (MEM_TYPE_NIMBUS == G_sysConfigData.mem_type) && + ( ((i_sensor >= MRDM0) && + (i_sensor <= MRDM7)) || + ((i_sensor >= MWRM0) && + (i_sensor <= MWRM7)) ) ) + { + *((uint32_t *)dest) = AMEFP(64, -5); + } + else + { + *((uint32_t *)dest) = l_sensorInfo.sensor.scalefactor; + } dest+= 4; *io_resp_length = (uint8_t) ((uint32_t)dest - (uint32_t)o_resp); |