aboutsummaryrefslogtreecommitdiff
path: root/core
diff options
context:
space:
mode:
authorCédric Le Goater <clg@fr.ibm.com>2015-03-09 21:56:13 +0100
committerStewart Smith <stewart@linux.vnet.ibm.com>2015-03-24 18:22:55 +1100
commit2d8952a581a857f010df38422ed7803d8be64061 (patch)
treec3064c07e16f0004c25c545c105acd90939b02cc /core
parent132e593400f959074f72cf066e3e99c8cd8d7b82 (diff)
downloadskiboot-2d8952a581a857f010df38422ed7803d8be64061.zip
skiboot-2d8952a581a857f010df38422ed7803d8be64061.tar.gz
skiboot-2d8952a581a857f010df38422ed7803d8be64061.tar.bz2
dts: add support to read the core temperatures
This patch adds a new sensor family for Digital Temperature Sensors and a new resource class to capture the core temperatures. Each core has four DTS located in different zones (LSU, ISU, FXU, L3). The max of the four temperatures is computed and returned for the core as well as a global trip point value. This is based on the meltbox tool. Signed-off-by: Cédric Le Goater <clg@fr.ibm.com> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'core')
-rw-r--r--core/sensor.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/core/sensor.c b/core/sensor.c
index 2c96756..75238e0 100644
--- a/core/sensor.c
+++ b/core/sensor.c
@@ -20,12 +20,16 @@
#include <device.h>
#include <opal.h>
#include <opal-api.h>
+#include <dts.h>
struct dt_node *sensor_node;
static int64_t opal_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);
+
if (platform.sensor_read)
return platform.sensor_read(sensor_hndl, token, sensor_data);