aboutsummaryrefslogtreecommitdiff
path: root/hw/occ.c
diff options
context:
space:
mode:
authorPridhiviraj Paidipeddi <ppaidipe@linux.vnet.ibm.com>2017-10-20 20:27:30 +0530
committerStewart Smith <stewart@linux.vnet.ibm.com>2017-11-30 23:47:59 -0600
commitc4f12c22ee95e2cdeb8f269740ecca0e8e76cbbd (patch)
treeef807fe86d4b056b5ce4b3fac520552920a1a754 /hw/occ.c
parent360c92e6271c83ece9597c21370e9ee0704acd93 (diff)
downloadskiboot-c4f12c22ee95e2cdeb8f269740ecca0e8e76cbbd.zip
skiboot-c4f12c22ee95e2cdeb8f269740ecca0e8e76cbbd.tar.gz
skiboot-c4f12c22ee95e2cdeb8f269740ecca0e8e76cbbd.tar.bz2
hw/occ: Fix psr cpu-to-gpu sensors node dtc warning.
dtc complains about missing reg property when a DT node is having a unit name or address but no reg property. /ibm,opal/power-mgt/psr/cpu-to-gpu@0 has a unit name, but no reg property /ibm,opal/power-mgt/psr/cpu-to-gpu@100 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> Signed-off-by: Stewart Smith <stewart@linux.vnet.ibm.com>
Diffstat (limited to 'hw/occ.c')
-rw-r--r--hw/occ.c3
1 files changed, 3 insertions, 0 deletions
diff --git a/hw/occ.c b/hw/occ.c
index 8ad0dfe..51e1bbb 100644
--- a/hw/occ.c
+++ b/hw/occ.c
@@ -1444,6 +1444,8 @@ static void occ_add_psr_sensors(struct dt_node *power_mgt)
dt_add_property_string(node, "compatible",
"ibm,opal-power-shift-ratio");
+ dt_add_property_cells(node, "#address-cells", 1);
+ dt_add_property_cells(node, "#size-cells", 0);
for (i = 0; i < nr_occs; i++) {
struct dt_node *cnode;
char name[20];
@@ -1459,6 +1461,7 @@ static void occ_add_psr_sensors(struct dt_node *power_mgt)
snprintf(name, 20, "cpu_to_gpu_%d", chips[i].chip_id);
dt_add_property_string(cnode, "label", name);
dt_add_property_cells(cnode, "handle", handle);
+ dt_add_property_cells(cnode, "reg", chips[i].chip_id);
}
}