[PATCH 1/6] Start split out of common open firmware code

Loeliger Jon-LOELIGER jdl at freescale.com
Wed Apr 25 00:47:10 EST 2007


 
> > +int of_n_addr_cells(struct device_node *np)
> > +{
> > +	const int *ip;
> > +
> > +	do {
> > +		if (np->parent)
> > +			np = np->parent;
> > +		ip = of_get_property(np, "#address-cells", NULL);
> > +		if (ip)
> > +			return *ip;
> > +	} while (np->parent);
> > +	/* No #address-cells property for the root node */
> > +	return OF_ROOT_NODE_ADDR_CELLS_DEFAULT;
> > +}
> > +EXPORT_SYMBOL(of_n_addr_cells);
> 
> While I realise your patch is just moving stuff around,
> can this be fixed please?  A missing "#address-cells"
> property means "two cells", not "inherit from parent".
> The few platforms with a broken tree should just be
> fixed (patch the tree in the bootwrapper, or perhaps
> _do_ use this workaround, but only on the affected
> platforms).
> 
> > +int of_n_size_cells(struct device_node *np)
> 
> Same here (the default is one cell though).

Agreed.  We actually discussed this quite some time ago.

Thanks,
jdl

PS -- Any fixes for the DTC would be welcomed patches too! :-)



More information about the Linuxppc-dev mailing list