mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-30 08:31:03 +00:00
powerpc/mpc85xx: Fix portal setup
Missing nodes of crypto, pme, etc in device tree is not a fatal error. Setting up the qman portal should skip the missing node and continue to finish the rest. Signed-off-by: York Sun <yorksun@freescale.com> Signed-off-by: Andy Fleming <afleming@freescale.com>
This commit is contained in:
parent
0a7c5353a4
commit
e1d5a2773f
1 changed files with 22 additions and 14 deletions
|
@ -128,10 +128,6 @@ static int fdt_qportal(void *blob, int off, int id, char *name,
|
|||
|
||||
childoff = fdt_subnode_offset(blob, off, name);
|
||||
if (create) {
|
||||
if (childoff <= 0)
|
||||
childoff = fdt_add_subnode(blob, off, name);
|
||||
|
||||
if (childoff > 0) {
|
||||
char handle[64], *p;
|
||||
|
||||
strncpy(handle, name, sizeof(handle));
|
||||
|
@ -143,9 +139,21 @@ static int fdt_qportal(void *blob, int off, int id, char *name,
|
|||
*p = '\0';
|
||||
|
||||
dev_off = fdt_path_offset(blob, handle);
|
||||
/* skip this node if alias is not found */
|
||||
if (dev_off == -FDT_ERR_BADPATH)
|
||||
return 0;
|
||||
if (dev_off < 0)
|
||||
return dev_off;
|
||||
|
||||
if (childoff <= 0)
|
||||
childoff = fdt_add_subnode(blob, off, name);
|
||||
|
||||
/* need to update the dev_off after adding a subnode */
|
||||
dev_off = fdt_path_offset(blob, handle);
|
||||
if (dev_off < 0)
|
||||
return dev_off;
|
||||
|
||||
if (childoff > 0) {
|
||||
dev_handle = fdt_get_phandle(blob, dev_off);
|
||||
if (dev_handle <= 0) {
|
||||
dev_handle = fdt_alloc_phandle(blob);
|
||||
|
|
Loading…
Reference in a new issue