On 18:31 Wed 13 Feb , Sascha Hauer wrote: > On Wed, Feb 13, 2013 at 11:06:40AM +0100, Jean-Christophe PLAGNIOL-VILLARD wrote: > > so when the first stage booloader of firmware provide the dtb > > we can use it to probe the memory > > > > also allow to print what we probe > > > > Cc: Rob Herring <rob.herring@xxxxxxxxxxx> > > Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@xxxxxxxxxxxx> > > --- > > drivers/of/base.c | 20 ++++++++++++++------ > > include/of.h | 6 ++++++ > > 2 files changed, 20 insertions(+), 6 deletions(-) > > > > diff --git a/drivers/of/base.c b/drivers/of/base.c > > index 1f32bfb..f2986ab 100644 > > --- a/drivers/of/base.c > > +++ b/drivers/of/base.c > > @@ -734,18 +734,23 @@ u64 dt_mem_next_cell(int s, const __be32 **cellp) > > return of_read_number(p, s); > > } > > > > -static int of_add_memory(struct device_node *node) > > +int of_add_memory(struct device_node *node, bool dump) > > { > > int na, nc; > > const __be32 *reg, *endp; > > int len, r = 0; > > static char str[6]; > > + struct property *type; > > + > > + type = of_find_property(node, "device_type"); > > + if (!type) > > + return -ENXIO; > > Could you add the missing check here if device_type is 'memory'? ok Best Regards, J. > > Sascha > > -- > Pengutronix e.K. | | > Industrial Linux Solutions | http://www.pengutronix.de/ | > Peiner Str. 6-8, 31137 Hildesheim, Germany | Phone: +49-5121-206917-0 | > Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 | _______________________________________________ barebox mailing list barebox@xxxxxxxxxxxxxxxxxxx http://lists.infradead.org/mailman/listinfo/barebox