aboutsummaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorShilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>2017-07-28 00:45:30 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-07-28 14:53:19 +1000
commit1ded56ceb6a1c0f6e37321cbb74f4104ebfcf3fa (patch)
treecb55ab95e6deb847d25f2a658ef666b42b021438 /include
parent5bec6cdf92f984cccc09dbe57579760a6e593b79 (diff)
downloadskiboot-1ded56ceb6a1c0f6e37321cbb74f4104ebfcf3fa.zip
skiboot-1ded56ceb6a1c0f6e37321cbb74f4104ebfcf3fa.tar.gz
skiboot-1ded56ceb6a1c0f6e37321cbb74f4104ebfcf3fa.tar.bz2
sensors: occ: Add support for OCC inband sensors
Add support to parse and export OCC inband sensors which are copied by OCC to main memory in P9. Each OCC writes three buffers which includes one names buffer for sensor meta data and two buffers for sensor readings. While OCC writes to one buffer the sensor values can be read from the other buffer. The sensors are updated every 100ms. This patch adds power, temperature, current and voltage sensors to /ibm,opal/sensors device-tree node which can be exported by the ibmpowernv-hwmon driver in Linux. Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> Reviewed-by: Cédric Le Goater <clg@kaod.org> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'include')
-rw-r--r--include/sensor.h1
-rw-r--r--include/skiboot.h4
2 files changed, 5 insertions, 0 deletions
diff --git a/include/sensor.h b/include/sensor.h
index 7eb3fa5..445a6bc 100644
--- a/include/sensor.h
+++ b/include/sensor.h
@@ -53,6 +53,7 @@
*/
enum {
SENSOR_FSP = 0,
+ SENSOR_OCC = 6,
SENSOR_DTS = 7,
};
diff --git a/include/skiboot.h b/include/skiboot.h
index 1a153b0..db4ca36 100644
--- a/include/skiboot.h
+++ b/include/skiboot.h
@@ -310,4 +310,8 @@ extern int fake_nvram_info(uint32_t *total_size);
extern int fake_nvram_start_read(void *dst, uint32_t src, uint32_t len);
extern int fake_nvram_write(uint32_t offset, void *src, uint32_t size);
+/* OCC Inband Sensors */
+extern void occ_sensors_init(void);
+extern int occ_sensor_read(u32 handle, u32 *data);
+
#endif /* __SKIBOOT_H */