[PATCH 2/4] ppc: add mpc85xx device tree fixup functions

Renaud Barbier renaud.barbier at ge.com
Mon Sep 2 12:34:11 EDT 2013


On 02/09/2013 09:49, Sascha Hauer wrote:
> Hi Renaud,
> 
> On Fri, Aug 30, 2013 at 02:34:27PM +0100, Renaud Barbier wrote:
>> > +/* These properties specify whether the hardware supports the stashing
>> > + * of buffer descriptors in L2 cache.
>> > + */
>> > +static void fdt_add_enet_stashing(void *fdt)
>> > +{
>> > +	struct device_node *node;
>> > +
>> > +	node = of_find_compatible_node(fdt, NULL, "gianfar");
>> > +	while (node) {
>> > +		of_set_property(node, "bd-stash", NULL, 0, 1);
>> > +		of_property_write_u32(node, "rx-stash-len", 96);
>> > +		of_property_write_u32(node, "rx-stash-idx", 0);
>> > +		node = of_find_compatible_node(node, NULL, "gianfar");
>> > +	}
>> > +}
> Out of curiosity, why is this dynamically added and not part of the
> static dts file?
> 

I will have to quote the original comment from U-Boot as I cannot find
a reasonable explanation why it is done this way.


Original U-boot commit:
Date:   Tue Oct 7 08:09:50 2008 -0500
Have u-boot pass stashing parameters into device tree

Some cores don't support ethernet stashing at all, and some
instances have errata.  Adds 3 properties to gianfar nodes
which support stashing.  For now, just add this support to
85xx SoCs.





More information about the barebox mailing list