Message ID | 20170908004605.5125-1-oohall@gmail.com |
---|---|
State | Superseded |
Headers | show |
Series | hdata: Fix /vpd dtc warnings | expand |
On 2017-09-08 06:16, Oliver O'Halloran wrote: > When dealing with HDAT generated device-trees dtc will complain loudly > about the missing reg, #size-cells and #address-cells properties of the > nodes in the /vpd hierarchy. This patch fixes these so we get a bit > more > signal and less noise from the dtc warnings. > > Signed-off-by: Oliver O'Halloran <oohall@gmail.com> > --- Hi Oliver Looks like this patch partly fixes this issue https://github.com/open-power/boston-openpower/issues/379 . Can you please have a look into it, Can you fix the remaining dtc warnings(under ibm,opal and imc nodes) as well if it easy to fix. Thanks Pridhiviraj > hdata/spira.c | 3 +++ > hdata/vpd.c | 8 ++++++++ > 2 files changed, 11 insertions(+) > > diff --git a/hdata/spira.c b/hdata/spira.c > index 95e1a016642e..291365e82c81 100644 > --- a/hdata/spira.c > +++ b/hdata/spira.c > @@ -1181,7 +1181,10 @@ static void dt_init_vpd_node(void) > > dt_vpd = dt_new(dt_root, "vpd"); > assert(dt_vpd); > + > dt_add_property_string(dt_vpd, "compatible", "ibm,opal-v3-vpd"); > + dt_add_property_cells(dt_vpd, "#address-cells", 1); > + dt_add_property_cells(dt_vpd, "#size-cells", 0); > } > > static void hostservices_parse(void) > diff --git a/hdata/vpd.c b/hdata/vpd.c > index d7d57cdad67c..9f3fe010c3e8 100644 > --- a/hdata/vpd.c > +++ b/hdata/vpd.c > @@ -405,6 +405,14 @@ static struct dt_node *dt_create_vpd_node(struct > dt_node *parent, > return NULL; > } > > + /* > + * no one is sure what this is or what it means, we're adding it here > + * to stop dtc from complaining about it. > + */ > + dt_add_property_cells(node, "reg", addr); > + dt_add_property_cells(node, "#address-cells", 1); > + dt_add_property_cells(node, "#size-cells", 0); > + > /* Add location code */ > slca_vpd_add_loc_code(node, be16_to_cpu(entry->my_index)); > /* Add FRU label */
diff --git a/hdata/spira.c b/hdata/spira.c index 95e1a016642e..291365e82c81 100644 --- a/hdata/spira.c +++ b/hdata/spira.c @@ -1181,7 +1181,10 @@ static void dt_init_vpd_node(void) dt_vpd = dt_new(dt_root, "vpd"); assert(dt_vpd); + dt_add_property_string(dt_vpd, "compatible", "ibm,opal-v3-vpd"); + dt_add_property_cells(dt_vpd, "#address-cells", 1); + dt_add_property_cells(dt_vpd, "#size-cells", 0); } static void hostservices_parse(void) diff --git a/hdata/vpd.c b/hdata/vpd.c index d7d57cdad67c..9f3fe010c3e8 100644 --- a/hdata/vpd.c +++ b/hdata/vpd.c @@ -405,6 +405,14 @@ static struct dt_node *dt_create_vpd_node(struct dt_node *parent, return NULL; } + /* + * no one is sure what this is or what it means, we're adding it here + * to stop dtc from complaining about it. + */ + dt_add_property_cells(node, "reg", addr); + dt_add_property_cells(node, "#address-cells", 1); + dt_add_property_cells(node, "#size-cells", 0); + /* Add location code */ slca_vpd_add_loc_code(node, be16_to_cpu(entry->my_index)); /* Add FRU label */
When dealing with HDAT generated device-trees dtc will complain loudly about the missing reg, #size-cells and #address-cells properties of the nodes in the /vpd hierarchy. This patch fixes these so we get a bit more signal and less noise from the dtc warnings. Signed-off-by: Oliver O'Halloran <oohall@gmail.com> --- hdata/spira.c | 3 +++ hdata/vpd.c | 8 ++++++++ 2 files changed, 11 insertions(+)