All of lore.kernel.org
 help / color / mirror / Atom feed
* [U-Boot] [PATCH]powerpc/usb: Fix usb device-tree fix-up
@ 2013-02-07  3:26 Ramneek Mehresh
  2013-02-07  5:20 ` Wolfgang Denk
  0 siblings, 1 reply; 2+ messages in thread
From: Ramneek Mehresh @ 2013-02-07  3:26 UTC (permalink / raw)
  To: u-boot

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>
---

 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.11.4

^ permalink raw reply related	[flat|nested] 2+ messages in thread

* [U-Boot] [PATCH]powerpc/usb: Fix usb device-tree fix-up
  2013-02-07  3:26 [U-Boot] [PATCH]powerpc/usb: Fix usb device-tree fix-up Ramneek Mehresh
@ 2013-02-07  5:20 ` Wolfgang Denk
  0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2013-02-07  5:20 UTC (permalink / raw)
  To: u-boot

Dear Ramneek Mehresh,

In message <1360207562-1784-1-git-send-email-ramneek.mehresh@freescale.com> you wrote:
> 
> +			if (mode_idx < 0 || phy_idx < 0) {
> +				printf("WARNING: wrong usb mode/phy"
> +					" defined!!\n");
> +				return;
> +			}

As you take a return here, this appears to be an ERROR rather than a
warning?

Best regards,

Wolfgang Denk

-- 
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
f u cn rd ths, itn tyg h myxbl cd.

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2013-02-07  5:20 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2013-02-07  3:26 [U-Boot] [PATCH]powerpc/usb: Fix usb device-tree fix-up Ramneek Mehresh
2013-02-07  5:20 ` Wolfgang Denk

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.