On 29/09/15 10:37, Laurent Vivier wrote: > > > On 29/09/2015 07:18, David Gibson wrote: >> On Thu, Sep 24, 2015 at 12:27:39PM +0200, Laurent Vivier wrote: ... >>> - /* NOTE: this is normally generated by firmware via >>> path/unit name, - * but in our case we must set it manually >>> since it does not get - * processed by OF beforehand - >>> */ - _FDT(fdt_setprop_string(fdt, offset, "name", "pci")); + >>> _FDT(fdt_setprop_string(fdt, offset, "name", + >>> pci_find_device_name((ccode >> 16) & 0xff, + >>> (ccode >> 8) & 0xff, + >>> ccode & 0xff))); > >> Heh. This isn't wrong, but there's a non-obvious wrinkle as to >> why. Generally flattened trees shouldn't require the 'name' >> property (the consumer is supposed to infer that from the node >> name). However, since this may also be used to generate tree >> fragments which get passed through the PAPR dynamic reconfiguration >> interface, and that *does* expect the name property to be passed >> through. > > In fact, this is also the behavior of SLOF.
Well, SLOF builds an Open Firmware device tree (not a flattened device tree), thus the "name" property is always required there. Thomas
signature.asc
Description: OpenPGP digital signature