diff options
author | Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com> | 2017-10-18 17:19:32 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-10-18 19:22:53 -0500 |
commit | b7a10ce59358291f95aefe457034a948e0b5577f (patch) | |
tree | 1eb1c2ad4e4b9b715f272f54bf9d2bf7219bf5f8 | |
parent | 62ac7631ae266e77ed16b2e8a43412c9a5207537 (diff) | |
download | skiboot-b7a10ce59358291f95aefe457034a948e0b5577f.zip skiboot-b7a10ce59358291f95aefe457034a948e0b5577f.tar.gz skiboot-b7a10ce59358291f95aefe457034a948e0b5577f.tar.bz2 |
occ-sensors : Add OCC inband sensor region to exports
Signed-off-by: Shilpasri G Bhat <shilpa.bhat@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
-rw-r--r-- | hw/occ-sensor.c | 14 |
1 files changed, 13 insertions, 1 deletions
diff --git a/hw/occ-sensor.c b/hw/occ-sensor.c index 89f529f..1042c11 100644 --- a/hw/occ-sensor.c +++ b/hw/occ-sensor.c @@ -546,7 +546,7 @@ static const char *get_sensor_loc_string(enum occ_sensor_location loc) void occ_sensors_init(void) { struct proc_chip *chip; - struct dt_node *sg; + struct dt_node *sg, *exports; int occ_num = 0, i; /* OCC inband sensors is only supported in P9 */ @@ -633,4 +633,16 @@ void occ_sensors_init(void) occ_add_sensor_groups(sg, phandles, phcount, chip->id); free(phandles); } + + if (!occ_num) + return; + + exports = dt_find_by_path(dt_root, "/ibm,opal/firmware/exports"); + if (!exports) { + prerror("OCC: dt node /ibm,opal/firmware/exports not found\n"); + return; + } + + dt_add_property_u64s(exports, "occ_inband_sensors", occ_sensor_base, + OCC_SENSOR_DATA_BLOCK_SIZE * occ_num); } |