[Skiboot] [PATCH 3/3] sensors: Fix dtc warning for new occ inband sensors.
Pridhiviraj Paidipeddi
ppaidipe at linux.vnet.ibm.com
Sat Oct 21 01:57:32 AEDT 2017
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 at c00004 has a unit name, but no reg property
/ibm,opal/sensors/gpu-in at c0001f has a unit name, but no reg property
/ibm,opal/sensor-groups/occ-js at 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 at linux.vnet.ibm.com>
---
hw/occ-sensor.c | 3 +++
hw/occ.c | 1 +
2 files changed, 4 insertions(+)
diff --git a/hw/occ-sensor.c b/hw/occ-sensor.c
index 1042c11..bcb7627 100644
--- a/hw/occ-sensor.c
+++ b/hw/occ-sensor.c
@@ -568,6 +568,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;
@@ -613,6 +615,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);
diff --git a/hw/occ.c b/hw/occ.c
index 6fde8b4..318e2f1 100644
--- a/hw/occ.c
+++ b/hw/occ.c
@@ -1537,6 +1537,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);
}
}
--
2.7.4
More information about the Skiboot
mailing list