* [U-Boot] [PATCH] powerpc/85xx: enanle USB2 gadget mode for corenet ds board
@ 2011-07-14 2:42 Shaohui Xie
2011-07-14 12:59 ` Kumar Gala
0 siblings, 1 reply; 3+ messages in thread
From: Shaohui Xie @ 2011-07-14 2:42 UTC (permalink / raw)
To: u-boot
Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
---
arch/powerpc/cpu/mpc8xxx/fdt.c | 3 ++-
board/freescale/corenet_ds/corenet_ds.c | 1 +
include/configs/corenet_ds.h | 2 ++
3 files changed, 5 insertions(+), 1 deletions(-)
diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c
index d9e3e7e..60cb210 100644
--- a/arch/powerpc/cpu/mpc8xxx/fdt.c
+++ b/arch/powerpc/cpu/mpc8xxx/fdt.c
@@ -164,7 +164,8 @@ void fdt_fixup_dr_usb(void *blob, bd_t *bd)
if (mode_idx < 0 && phy_idx < 0)
printf("WARNING: invalid phy or mode\n");
} else {
- break;
+ if (i > CONFIG_SYS_USB_DEVICE)
+ break;
}
}
if (!usb1_defined) {
diff --git a/board/freescale/corenet_ds/corenet_ds.c b/board/freescale/corenet_ds/corenet_ds.c
index cf9b7b8..b1e7823 100644
--- a/board/freescale/corenet_ds/corenet_ds.c
+++ b/board/freescale/corenet_ds/corenet_ds.c
@@ -236,6 +236,7 @@ void ft_board_setup(void *blob, bd_t *bd)
#endif
fdt_fixup_liodn(blob);
+ fdt_fixup_dr_usb(blob, bd);
}
int board_eth_init(bd_t *bis)
diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
index c9cc22a..2c86ba3 100644
--- a/include/configs/corenet_ds.h
+++ b/include/configs/corenet_ds.h
@@ -580,6 +580,8 @@
#define CONFIG_USB_EHCI_FSL
#define CONFIG_EHCI_HCD_INIT_AFTER_RESET
#define CONFIG_CMD_EXT2
+#define CONFIG_HAS_FSL_DR_USB
+#define CONFIG_SYS_USB_DEVICE 2
#define CONFIG_MMC
--
1.6.4
^ permalink raw reply related [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] powerpc/85xx: enanle USB2 gadget mode for corenet ds board
2011-07-14 2:42 [U-Boot] [PATCH] powerpc/85xx: enanle USB2 gadget mode for corenet ds board Shaohui Xie
@ 2011-07-14 12:59 ` Kumar Gala
2011-07-15 3:13 ` Xie Shaohui-B21989
0 siblings, 1 reply; 3+ messages in thread
From: Kumar Gala @ 2011-07-14 12:59 UTC (permalink / raw)
To: u-boot
1. fix commit message 'enanle' -> enable
2. add some details about how this change addresses the issue in commit message
- k
On Jul 13, 2011, at 9:42 PM, Shaohui Xie wrote:
> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
> ---
> arch/powerpc/cpu/mpc8xxx/fdt.c | 3 ++-
> board/freescale/corenet_ds/corenet_ds.c | 1 +
> include/configs/corenet_ds.h | 2 ++
> 3 files changed, 5 insertions(+), 1 deletions(-)
>
> diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c b/arch/powerpc/cpu/mpc8xxx/fdt.c
> index d9e3e7e..60cb210 100644
> --- a/arch/powerpc/cpu/mpc8xxx/fdt.c
> +++ b/arch/powerpc/cpu/mpc8xxx/fdt.c
> @@ -164,7 +164,8 @@ void fdt_fixup_dr_usb(void *blob, bd_t *bd)
> if (mode_idx < 0 && phy_idx < 0)
> printf("WARNING: invalid phy or mode\n");
> } else {
> - break;
> + if (i > CONFIG_SYS_USB_DEVICE)
> + break;
> }
I'm not sure that CONFIG_SYS_USB_DEVICE is the right way / #define to use for this purpose.
Do we need the 'else' clause at all?
> }
> if (!usb1_defined) {
> diff --git a/board/freescale/corenet_ds/corenet_ds.c b/board/freescale/corenet_ds/corenet_ds.c
> index cf9b7b8..b1e7823 100644
> --- a/board/freescale/corenet_ds/corenet_ds.c
> +++ b/board/freescale/corenet_ds/corenet_ds.c
> @@ -236,6 +236,7 @@ void ft_board_setup(void *blob, bd_t *bd)
> #endif
>
> fdt_fixup_liodn(blob);
> + fdt_fixup_dr_usb(blob, bd);
> }
>
> int board_eth_init(bd_t *bis)
> diff --git a/include/configs/corenet_ds.h b/include/configs/corenet_ds.h
> index c9cc22a..2c86ba3 100644
> --- a/include/configs/corenet_ds.h
> +++ b/include/configs/corenet_ds.h
> @@ -580,6 +580,8 @@
> #define CONFIG_USB_EHCI_FSL
> #define CONFIG_EHCI_HCD_INIT_AFTER_RESET
> #define CONFIG_CMD_EXT2
> +#define CONFIG_HAS_FSL_DR_USB
> +#define CONFIG_SYS_USB_DEVICE 2
>
> #define CONFIG_MMC
>
> --
> 1.6.4
>
>
> _______________________________________________
> U-Boot mailing list
> U-Boot at lists.denx.de
> http://lists.denx.de/mailman/listinfo/u-boot
^ permalink raw reply [flat|nested] 3+ messages in thread
* [U-Boot] [PATCH] powerpc/85xx: enanle USB2 gadget mode for corenet ds board
2011-07-14 12:59 ` Kumar Gala
@ 2011-07-15 3:13 ` Xie Shaohui-B21989
0 siblings, 0 replies; 3+ messages in thread
From: Xie Shaohui-B21989 @ 2011-07-15 3:13 UTC (permalink / raw)
To: u-boot
>Subject: Re: [U-Boot] [PATCH] powerpc/85xx: enanle USB2 gadget mode for
>corenet ds board
>
>1. fix commit message 'enanle' -> enable 2. add some details about how
>this change addresses the issue in commit message
>
[Xie Shaohui] OK, Thanks.
>On Jul 13, 2011, at 9:42 PM, Shaohui Xie wrote:
>
>> Signed-off-by: Shaohui Xie <Shaohui.Xie@freescale.com>
>> ---
>> arch/powerpc/cpu/mpc8xxx/fdt.c | 3 ++-
>> board/freescale/corenet_ds/corenet_ds.c | 1 +
>> include/configs/corenet_ds.h | 2 ++
>> 3 files changed, 5 insertions(+), 1 deletions(-)
>>
>> diff --git a/arch/powerpc/cpu/mpc8xxx/fdt.c
>> b/arch/powerpc/cpu/mpc8xxx/fdt.c index d9e3e7e..60cb210 100644
>> --- a/arch/powerpc/cpu/mpc8xxx/fdt.c
>> +++ b/arch/powerpc/cpu/mpc8xxx/fdt.c
>> @@ -164,7 +164,8 @@ void fdt_fixup_dr_usb(void *blob, bd_t *bd)
>> if (mode_idx < 0 && phy_idx < 0)
>> printf("WARNING: invalid phy or mode\n");
>> } else {
>> - break;
>> + if (i > CONFIG_SYS_USB_DEVICE)
>> + break;
>> }
>
>I'm not sure that CONFIG_SYS_USB_DEVICE is the right way / #define to use
>for this purpose.
>
[Xie Shaohui] I'm not sure about this too. The CONFIG_SYS_USB_DEVICE is used to tell driver
How many USB controllers the board has, then the driver will not break until it scanned all the controllers.
>Do we need the 'else' clause at all?
>
[Xie Shaohui] There is a macro USB_MAX_DEVICE which is defined in include/usb.h, it's value is 32,
Without else, driver will scan 32 times in 'hwconfig' looking for 'usbx' (x->1..32).
Best Regards,
Shaohui Xie
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2011-07-15 3:13 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-07-14 2:42 [U-Boot] [PATCH] powerpc/85xx: enanle USB2 gadget mode for corenet ds board Shaohui Xie
2011-07-14 12:59 ` Kumar Gala
2011-07-15 3:13 ` Xie Shaohui-B21989
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.