* [U-Boot] [PATCH] powerpc/8xxx: Remove dependancy on <usb.h>
@ 2011-07-29 14:06 Kumar Gala
2011-07-29 20:04 ` Wolfgang Denk
0 siblings, 1 reply; 2+ messages in thread
From: Kumar Gala @ 2011-07-29 14:06 UTC (permalink / raw)
To: u-boot
We used <usb.h> for USB_MAX_DEVICE. However this we requires we actual
build in support for USB into u-boot (which should not be required for
device tree fixup).
At this time no FSL SoC that utilizies this code (83xx/85xx) has more
than 2 USB controllers. So we replace USB_MAX_DEVICE with a local
define FSL_MAX_NUM_USB_CTRLS.
If/when a device shows up with more than 2 controllers we can easily
bump this value or refactor into a proper define per SoC.
Signed-off-by: Kumar Gala <galak@kernel.crashing.org>
---
arch/powerpc/cpu/mpc8xxx/fdt.c | 7 +++----
1 files changed, 3 insertions(+), 4 deletions(-)
diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c
index 6c757f8..285051d 100644
--- a/arch/powerpc/cpu/mpc8xxx/fdt.c
+++ b/arch/powerpc/cpu/mpc8xxx/fdt.c
@@ -30,9 +30,8 @@
#include <asm/fsl_serdes.h>
#include <phy.h>
#include <hwconfig.h>
-#ifdef CONFIG_HAS_FSL_DR_USB
-#include <usb.h>
-#endif
+
+#define FSL_MAX_NUM_USB_CTRLS 2
#if defined(CONFIG_MP) && (defined(CONFIG_MPC85xx) || defined(CONFIG_MPC86xx))
static int ft_del_cpuhandle(void *blob, int cpuhandle)
@@ -135,7 +134,7 @@ void fdt_fixup_dr_usb(void *blob, bd_t *bd)
char str[5];
int i, j;
- for (i = 1; i <= USB_MAX_DEVICE; i++) {
+ for (i = 1; i <= FSL_MAX_NUM_USB_CTRLS; i++) {
int mode_idx = -1, phy_idx = -1;
sprintf(str, "%s%d", "usb", i);
if (hwconfig(str)) {
--
1.7.3.4
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] powerpc/8xxx: Remove dependancy on <usb.h>
2011-07-29 14:06 [U-Boot] [PATCH] powerpc/8xxx: Remove dependancy on <usb.h> Kumar Gala
@ 2011-07-29 20:04 ` Wolfgang Denk
0 siblings, 0 replies; 2+ messages in thread
From: Wolfgang Denk @ 2011-07-29 20:04 UTC (permalink / raw)
To: u-boot
Dear Kumar Gala,
In message <1311948372-21134-1-git-send-email-galak@kernel.crashing.org> you wrote:
> We used <usb.h> for USB_MAX_DEVICE. However this we requires we actual
> build in support for USB into u-boot (which should not be required for
> device tree fixup).
You might want to fix this sentence before committing. Thanks.
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
That Microsoft, the Trabant of the operating system world, may be
glancing over the Berlin Wall at the Audis and BMWs and Mercedes. In
their own universe Trabants and Ladas were mainstream too...
-- Evan Leibovitch
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-07-29 20:04 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-29 14:06 [U-Boot] [PATCH] powerpc/8xxx: Remove dependancy on <usb.h> Kumar Gala
2011-07-29 20:04 ` Wolfgang Denk
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox