summaryrefslogtreecommitdiff
path: root/arch
diff options
context:
space:
mode:
authorramneek mehresh <ramneek.mehresh@freescale.com>2013-02-17 18:23:32 +0000
committerMarek Vasut <marex@denx.de>2013-04-10 15:22:25 +0200
commitdda48e8efff878e51e986befd9c6c3780b4757a7 (patch)
tree157e15e4543f30946ed0b13f20cbd69330b865f1 /arch
parentef4e9fc6aae786eac839d989b0e647f8d2b530f4 (diff)
downloadu-boot-imx-dda48e8efff878e51e986befd9c6c3780b4757a7.zip
u-boot-imx-dda48e8efff878e51e986befd9c6c3780b4757a7.tar.gz
u-boot-imx-dda48e8efff878e51e986befd9c6c3780b4757a7.tar.bz2
powerpc/usb: Fix usb device-tree fix-up
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@freescale.com>
Diffstat (limited to 'arch')
-rw-r--r--arch/powerpc/cpu/mpc8xxx/fdt.c5
1 files changed, 5 insertions, 0 deletions
diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c
index 2847094..2db9045 100644
--- a/arch/powerpc/cpu/mpc8xxx/fdt.c
+++ b/arch/powerpc/cpu/mpc8xxx/fdt.c
@@ -167,6 +167,11 @@ void fdt_fixup_dr_usb(void *blob, bd_t *bd)
}
}
+ if (mode_idx < 0 || phy_idx < 0) {
+ puts("ERROR: wrong usb mode/phy defined!!\n");
+ return;
+ }
+
dr_mode_type = modes[mode_idx];
dr_phy_type = phys[phy_idx];