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>
This commit is contained in:
ramneek mehresh 2013-02-17 18:23:32 +00:00 committed by Marek Vasut
parent ef4e9fc6aa
commit dda48e8eff
1 changed files with 5 additions and 0 deletions

View File

@ -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];