aboutsummaryrefslogtreecommitdiff
path: root/hw/dts.c
diff options
context:
space:
mode:
authorPridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>2017-10-20 20:27:31 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-11-30 23:52:25 -0600
commit3e808354c311e40925bf53ed5ce9a872a5750141 (patch)
treedb88839e9e2cd4879440f67f1a2f2d53ad3a1f8b /hw/dts.c
parentc4f12c22ee95e2cdeb8f269740ecca0e8e76cbbd (diff)
downloadskiboot-3e808354c311e40925bf53ed5ce9a872a5750141.zip
skiboot-3e808354c311e40925bf53ed5ce9a872a5750141.tar.gz
skiboot-3e808354c311e40925bf53ed5ce9a872a5750141.tar.bz2
sensors: Fix dtc warning for dts sensors.
dtc complains about missing reg property when a DT node is having a unit name or address but no reg property. Example warning for core dts sensor: /ibm,opal/sensors/core-temp@5c has a unit name, but no reg property /ibm,opal/sensors/core-temp@804 has a unit name, but no reg property This patch fixes this by adding necessary properties. Signed-off-by: Pridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com> [stewart: use handle as register rather than chip id] Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/dts.c')
-rw-r--r--hw/dts.c2
1 files changed, 2 insertions, 0 deletions
diff --git a/hw/dts.c b/hw/dts.c
index d881f96..881d66e 100644
--- a/hw/dts.c
+++ b/hw/dts.c
@@ -476,6 +476,7 @@ bool dts_sensor_create_nodes(struct dt_node *sensors)
dt_add_property_cells(node, "sensor-status", handler);
dt_add_property_string(node, "sensor-type", "temp");
dt_add_property_cells(node, "ibm,pir", c->pir);
+ dt_add_property_cells(node, "reg", handler);
dt_add_property_string(node, "label", "Core");
init_timer(&c->dts_timer, dts_async_read_temp, c);
c->dts_read_in_progress = false;
@@ -504,6 +505,7 @@ bool dts_sensor_create_nodes(struct dt_node *sensors)
dt_add_property_cells(node, "sensor-status", handler);
dt_add_property_string(node, "sensor-type", "temp");
dt_add_property_cells(node, "ibm,chip-id", chip_id);
+ dt_add_property_cells(node, "reg", handler);
dt_add_property_string(node, "label", "Centaur");
}