of/promtree: add package-to-path support to pdt

package-to-path is a PROM function which tells us the real (full) name of the
node.  This provides a hook for that in the prom ops struct, and makes use
of it in the pdt code when attempting to determine a node's name.  If the
hook is available, try using it (falling back to looking at the "name"
property if it fails).

Signed-off-by: Andres Salomon <dilinger@queued.net>
Signed-off-by: Grant Likely <grant.likely@secretlab.ca>
This commit is contained in:
Andres Salomon
2010-10-10 21:52:57 -06:00
committed by Grant Likely
parent ed41850298
commit e2f2a93b63
2 changed files with 45 additions and 1 deletions

View File

@@ -29,6 +29,9 @@ struct of_pdt_ops {
/* phandles are 0 if no child or sibling exists */
phandle (*getchild)(phandle parent);
phandle (*getsibling)(phandle node);
/* return 0 on success; fill in 'len' with number of bytes in path */
int (*pkg2path)(phandle node, char *buf, const int buflen, int *len);
};
extern void *prom_early_alloc(unsigned long size);