From 5c2fff9cbcee866dcf0ec4530cc4e0a8bef87c37 Mon Sep 17 00:00:00 2001 From: Simon Glass Date: Mon, 13 Jun 2011 10:50:03 -0700 Subject: fdt: tegra2: Use aliases to select USB ports USB port numbering was previously ad-hoc according to the position of the ports in the FDT file. This change defines aliases to control this explicitly: usb0, usb1, ... BUG=chromium-os:11623 TEST=usb start; run usb_boot Change-Id: Ifed6e1e9e21750bd0edf5d2bddc4afd3468ad7f4 Reviewed-on: http://gerrit.chromium.org/gerrit/2538 Tested-by: Simon Glass Reviewed-by: Anton Staaf --- board/nvidia/common/usb.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) (limited to 'board') diff --git a/board/nvidia/common/usb.c b/board/nvidia/common/usb.c index 1838b0f4385..1153f69d0bb 100644 --- a/board/nvidia/common/usb.c +++ b/board/nvidia/common/usb.c @@ -388,12 +388,12 @@ int board_usb_init(const void *blob) #ifdef CONFIG_OF_CONTROL struct fdt_usb config; int clk_done = 0; - int node = 0; + int node, upto = 0; unsigned osc_freq = clock_get_rate(CLOCK_ID_OSC); do { - node = fdt_decode_next_compatible(blob, node, - COMPAT_NVIDIA_TEGRA250_USB); + node = fdt_decode_next_alias(blob, "usb", + COMPAT_NVIDIA_TEGRA250_USB, &upto); if (node < 0) break; if (fdt_decode_usb(blob, node, osc_freq, &config)) -- cgit v1.2.3