diff options
author | Nikhil Badola <B46172@freescale.com> | 2013-12-19 11:08:46 +0530 |
---|---|---|
committer | York Sun <yorksun@freescale.com> | 2014-04-22 17:58:45 -0700 |
commit | 0ecb15c8e98edf6a4a120eefc43bcb1e8f48d97b (patch) | |
tree | 67b9ba9c39513cd8708a7b4d9f48e6e4d2580e53 /drivers/usb | |
parent | fa08d39517773882b07965ca4330777c6d6697ae (diff) | |
download | u-boot-imx-0ecb15c8e98edf6a4a120eefc43bcb1e8f48d97b.zip u-boot-imx-0ecb15c8e98edf6a4a120eefc43bcb1e8f48d97b.tar.gz u-boot-imx-0ecb15c8e98edf6a4a120eefc43bcb1e8f48d97b.tar.bz2 |
fsl/usb: Fix phy type for Second USB controller
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>
Reviewed-by: York Sun <yorksun@freescale.com>
Diffstat (limited to 'drivers/usb')
-rw-r--r-- | drivers/usb/host/ehci-fsl.c | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-fsl.c b/drivers/usb/host/ehci-fsl.c index 1ca7cf5..3fd9e13 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"); |