[U-Boot] [PATCH 29/31] powerpc/usb: Fix usb device-tree fix-up
York Sun
yorksun at freescale.com
Fri Mar 22 18:29:27 CET 2013
From: Ramneek Mehresh <ramneek.mehresh at freescale.com>
Fix USB device-tree fixup to properly handle device-tree fixup and
print appropriate message when wrong/junk "dr_mode" or "phy_type"
are mentioned in hwconfig string
Signed-off-by: Ramneek Mehresh <ramneek.mehresh at freescale.com>
---
arch/powerpc/cpu/mpc8xxx/fdt.c | 6 ++++++
1 file changed, 6 insertions(+)
diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c
index 2847094..413e184 100644
--- a/arch/powerpc/cpu/mpc8xxx/fdt.c
+++ b/arch/powerpc/cpu/mpc8xxx/fdt.c
@@ -167,6 +167,12 @@ void fdt_fixup_dr_usb(void *blob, bd_t *bd)
}
}
+ if (mode_idx < 0 || phy_idx < 0) {
+ printf("WARNING: wrong usb mode/phy"
+ " defined!!\n");
+ return;
+ }
+
dr_mode_type = modes[mode_idx];
dr_phy_type = phys[phy_idx];
--
1.7.9.5
More information about the U-Boot
mailing list