* [U-Boot] [PATCH] fsl/usb: Fix phy type for Second USB controller
@ 2013-12-19 5:38 Nikhil Badola
2014-04-23 22:30 ` York Sun
0 siblings, 1 reply; 2+ messages in thread
From: Nikhil Badola @ 2013-12-19 5:38 UTC (permalink / raw)
To: u-boot
Set correct phy_type value for second USB controller.
This is required for supporting SOCs having 2 USB controllers
working simultaneously, one with UTMI phy and other with ULPI phy
Signed-off-by: Nikhil Badola <B46172@freescale.com>
---
drivers/usb/host/ehci-fsl.c | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c
index 45e5d6a..0d19daa 100644
--- a/drivers/usb/host/ehci-fsl.c
+++ b/drivers/usb/host/ehci-fsl.c
@@ -41,11 +41,14 @@ int ehci_hcd_init(int index, enum usb_init_type init,
struct usb_ehci *ehci = NULL;
const char *phy_type = NULL;
size_t len;
+ char current_usb_controller[5];
#ifdef CONFIG_SYS_FSL_USB_INTERNAL_UTMI_PHY
char usb_phy[5];
usb_phy[0] = '\0';
#endif
+ memset(current_usb_controller, '\0', 5);
+ snprintf(current_usb_controller, 4, "usb%d", index+1);
switch (index) {
case 0:
@@ -70,8 +73,9 @@ int ehci_hcd_init(int index, enum usb_init_type init,
out_be32(&ehci->snoop2, 0x80000000 | SNOOP_SIZE_2GB);
/* Init phy */
- if (hwconfig_sub("usb1", "phy_type"))
- phy_type = hwconfig_subarg("usb1", "phy_type", &len);
+ if (hwconfig_sub(current_usb_controller, "phy_type"))
+ phy_type = hwconfig_subarg(current_usb_controller,
+ "phy_type", &len);
else
phy_type = getenv("usb_phy_type");
--
1.7.11.7
^ permalink raw reply related [flat|nested] 2+ messages in thread
* [U-Boot] [PATCH] fsl/usb: Fix phy type for Second USB controller
2013-12-19 5:38 [U-Boot] [PATCH] fsl/usb: Fix phy type for Second USB controller Nikhil Badola
@ 2014-04-23 22:30 ` York Sun
0 siblings, 0 replies; 2+ messages in thread
From: York Sun @ 2014-04-23 22:30 UTC (permalink / raw)
To: u-boot
On 12/18/2013 09:38 PM, Nikhil Badola wrote:
> Set correct phy_type value for second USB controller.
> This is required for supporting SOCs having 2 USB controllers
> working simultaneously, one with UTMI phy and other with ULPI phy
>
> Signed-off-by: Nikhil Badola <B46172@freescale.com>
> ---
Applied to u-boot-mpc85xx/master, thanks.
York
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2014-04-23 22:30 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2013-12-19 5:38 [U-Boot] [PATCH] fsl/usb: Fix phy type for Second USB controller Nikhil Badola
2014-04-23 22:30 ` York Sun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox