[Skiboot] [PATCH 02/11] dts: add support to read the core temperatures
Cedric Le Goater
clg at fr.ibm.com
Tue Feb 17 05:13:26 AEDT 2015
On 02/13/2015 05:22 AM, Stewart Smith wrote:
> Cédric Le Goater <clg at fr.ibm.com> writes:
>> @@ -338,8 +340,11 @@ void astbmc_early_init(void)
>> uart_init(true);
>> }
>>
>> -int64_t __attrconst astbmc_sensor_read(uint32_t sensor_hndl __unused,
>> - int token __unused, uint32_t *sensor_data __unused)
>> +int64_t astbmc_sensor_read(uint32_t sensor_hndl, int token __unused,
>> + uint32_t *sensor_data)
>> {
>> + if (sensor_is_dts(sensor_hndl))
>> + return dts_sensor_read(sensor_hndl, sensor_data);
>> +
>> return OPAL_UNSUPPORTED;
>> }
>> diff --git a/platforms/ibm-fsp/common.c b/platforms/ibm-fsp/common.c
>> index 695d8e47db7c..732759b33286 100644
>> --- a/platforms/ibm-fsp/common.c
>> +++ b/platforms/ibm-fsp/common.c
>> @@ -206,5 +208,8 @@ int64_t ibm_fsp_cec_power_down(uint64_t request)
>> int64_t ibm_fsp_sensor_read(uint32_t sensor_hndl, int token,
>> uint32_t *sensor_data)
>> {
>> + if (sensor_is_dts(sensor_hndl))
>> + return dts_sensor_read(sensor_hndl, sensor_data);
>> +
>> return fsp_opal_read_sensor(sensor_hndl, token, sensor_data);
>> }
>
> I'd prefer if we didn't end up having identical code in platform hooks.
Yes. It seemed like a good idea to split the code but the result does not
bring much. I will change that.
Thanks,
C.
More information about the Skiboot
mailing list