]> git.dujemihanovic.xyz Git - u-boot.git/commitdiff
arm: mach-k3: Warn when node to disable is not found
authorAndrew F. Davis <afd@ti.com>
Tue, 7 Jan 2020 23:12:40 +0000 (18:12 -0500)
committerLokesh Vutla <lokeshvutla@ti.com>
Mon, 20 Jan 2020 04:40:28 +0000 (10:10 +0530)
Not finding a node that we try to disable does not always need to be
fatal to boot but should at least print out a warning. Return error
from fdt_disable_node as it did fail to disable the node, but only
warn in the case of disabling the TRNG as this will not prevent boot.

Signed-off-by: Andrew F. Davis <afd@ti.com>
Reviewed-by: Lokesh Vutla <lokeshvutla@ti.com>
Signed-off-by: Lokesh Vutla <lokeshvutla@ti.com>
arch/arm/mach-k3/common.c
board/ti/am65x/evm.c

index 50f5b81dfe5d2231727cf6628312ae70b5e7d8b8..e8b7d70e7583fc9cfca5f63f7e96a479757f5179 100644 (file)
@@ -174,8 +174,8 @@ int fdt_disable_node(void *blob, char *node_path)
 
        offs = fdt_path_offset(blob, node_path);
        if (offs < 0) {
-               debug("Node %s not found.\n", node_path);
-               return 0;
+               printf("Node %s not found.\n", node_path);
+               return offs;
        }
        ret = fdt_setprop_string(blob, offs, "status", "disabled");
        if (ret < 0) {
index 4d86757c39de6524b5afbac59701402e02bd548a..a61087942439033b070d86ff4c2cfca44a774c71 100644 (file)
@@ -105,10 +105,8 @@ int ft_board_setup(void *blob, bd_t *bd)
 #if defined(CONFIG_TI_SECURE_DEVICE)
        /* Make HW RNG reserved for secure world use */
        ret = fdt_disable_node(blob, "/interconnect@100000/trng@4e10000");
-       if (ret) {
+       if (ret)
                printf("%s: disabling TRGN failed %d\n", __func__, ret);
-               return ret;
-       }
 #endif
 
        return 0;