]> git.kernelconcepts.de Git - karo-tx-uboot.git/blobdiff - board/freescale/p1_p2_rdb_pc/p1_p2_rdb_pc.c
powerpc/p2020rdb: fix the FDT_ERR_NOTFOUND issue
[karo-tx-uboot.git] / board / freescale / p1_p2_rdb_pc / p1_p2_rdb_pc.c
index 3f47cfbb82aa3e9b2b547a31feaa0ea39d18f44b..61b7a91333faf1beb07f981822c8fd76325bf6a2 100644 (file)
@@ -428,8 +428,13 @@ int ft_board_setup(void *blob, bd_t *bd)
 {
        phys_addr_t base;
        phys_size_t size;
+#if defined(CONFIG_P1020RDB_PD) || defined(CONFIG_P1020RDB_PC)
        const char *soc_usb_compat = "fsl-usb2-dr";
-       int err, usb1_off, usb2_off;
+       int usb_err, usb1_off, usb2_off;
+#endif
+#if defined(CONFIG_SDCARD) || defined(CONFIG_SPIFLASH)
+       int err;
+#endif
 
        ft_cpu_setup(blob, bd);
 
@@ -473,6 +478,7 @@ int ft_board_setup(void *blob, bd_t *bd)
        }
 #endif
 
+#if defined(CONFIG_P1020RDB_PD) || defined(CONFIG_P1020RDB_PC)
 /* Delete USB2 node as it is muxed with eLBC */
        usb1_off = fdt_node_offset_by_compatible(blob, -1,
                soc_usb_compat);
@@ -488,11 +494,12 @@ int ft_board_setup(void *blob, bd_t *bd)
                       soc_usb_compat);
                return usb2_off;
        }
-       err = fdt_del_node(blob, usb2_off);
-       if (err < 0) {
+       usb_err = fdt_del_node(blob, usb2_off);
+       if (usb_err < 0) {
                printf("WARNING: could not remove %s\n", soc_usb_compat);
-               return err;
+               return usb_err;
        }
+#endif
 
        return 0;
 }