diff options
author | Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> | 2017-10-20 20:27:32 +0530 |
---|---|---|
committer | Stewart Smith <stewart@linux.vnet.ibm.com> | 2017-11-30 23:52:40 -0600 |
commit | e8248d22600e421984b52f81c6da2c5a9e04a891 (patch) | |
tree | ff6e53c955c023ed5555f222b78f23480a6e7422 /hw | |
parent | 3e808354c311e40925bf53ed5ce9a872a5750141 (diff) | |
download | talos-skiboot-e8248d22600e421984b52f81c6da2c5a9e04a891.tar.gz talos-skiboot-e8248d22600e421984b52f81c6da2c5a9e04a891.zip |
sensors: Fix dtc warning for new occ inband sensors.
dtc complains about missing reg property when a DT node is having a
unit name or address but no reg property.
/ibm,opal/sensors/vrm-in@c00004 has a unit name, but no reg property
/ibm,opal/sensors/gpu-in@c0001f has a unit name, but no reg property
/ibm,opal/sensor-groups/occ-js@1c00040 has a unit name, but no reg property
This patch fixes these warnings for new occ inband sensors and also for
sensor-groups by adding necessary properties.
Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>
Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw')
-rw-r--r-- | hw/occ-sensor.c | 3 | ||||
-rw-r--r-- | hw/occ.c | 1 |
2 files changed, 4 insertions, 0 deletions
diff --git a/hw/occ-sensor.c b/hw/occ-sensor.c index 3854cc5b..cb706a55 100644 --- a/hw/occ-sensor.c +++ b/hw/occ-sensor.c @@ -573,6 +573,8 @@ void occ_sensors_init(void) return; } dt_add_property_string(sg, "compatible", "ibm,opal-sensor-group"); + dt_add_property_cells(sg, "#address-cells", 1); + dt_add_property_cells(sg, "#size-cells", 0); for_each_chip(chip) { struct occ_sensor_data_header *hb; @@ -618,6 +620,7 @@ void occ_sensors_init(void) dt_add_property_string(node, "sensor-type", type); dt_add_property_cells(node, "sensor-data", handler); + dt_add_property_cells(node, "reg", handler); handler = sensor_handler(occ_num, i, SENSOR_CSM_MAX); dt_add_property_cells(node, "sensor-data-max", handler); @@ -1539,6 +1539,7 @@ void occ_add_sensor_groups(struct dt_node *sg, u32 *phandles, int nr_phandles, dt_add_property_cells(node, "ibm,chip-id", chipid); dt_add_property(node, "sensors", phandles, nr_phandles); dt_add_property_cells(node, "ops", OPAL_SENSOR_GROUP_CLEAR); + dt_add_property_cells(node, "reg", handle); } } |