Skip to content
Snippets Groups Projects
Commit 0ecb15c8 authored by Nikhil Badola's avatar Nikhil Badola Committed by York Sun
Browse files

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: default avatarNikhil Badola <B46172@freescale.com>
Reviewed-by: default avatarYork Sun <yorksun@freescale.com>
parent fa08d395
No related branches found
No related tags found
No related merge requests found
...@@ -41,11 +41,14 @@ int ehci_hcd_init(int index, enum usb_init_type init, ...@@ -41,11 +41,14 @@ int ehci_hcd_init(int index, enum usb_init_type init,
struct usb_ehci *ehci = NULL; struct usb_ehci *ehci = NULL;
const char *phy_type = NULL; const char *phy_type = NULL;
size_t len; size_t len;
char current_usb_controller[5];
#ifdef CONFIG_SYS_FSL_USB_INTERNAL_UTMI_PHY #ifdef CONFIG_SYS_FSL_USB_INTERNAL_UTMI_PHY
char usb_phy[5]; char usb_phy[5];
usb_phy[0] = '\0'; usb_phy[0] = '\0';
#endif #endif
memset(current_usb_controller, '\0', 5);
snprintf(current_usb_controller, 4, "usb%d", index+1);
switch (index) { switch (index) {
case 0: case 0:
...@@ -70,8 +73,9 @@ int ehci_hcd_init(int index, enum usb_init_type init, ...@@ -70,8 +73,9 @@ int ehci_hcd_init(int index, enum usb_init_type init,
out_be32(&ehci->snoop2, 0x80000000 | SNOOP_SIZE_2GB); out_be32(&ehci->snoop2, 0x80000000 | SNOOP_SIZE_2GB);
/* Init phy */ /* Init phy */
if (hwconfig_sub("usb1", "phy_type")) if (hwconfig_sub(current_usb_controller, "phy_type"))
phy_type = hwconfig_subarg("usb1", "phy_type", &len); phy_type = hwconfig_subarg(current_usb_controller,
"phy_type", &len);
else else
phy_type = getenv("usb_phy_type"); phy_type = getenv("usb_phy_type");
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment