Message ID | 64CA5C49A43E314D9F7DAE05370E2F7B06771049@hed-dc01.hed.local |
---|---|
State | Changes Requested |
Delegated to: | Stefano Babic |
Headers | show |
Hi Matthew, On Wed, May 20, 2015 at 4:59 PM, Matthew Starr <mstarr@hedonline.com> wrote: > I fixed the issues by switching all instances of CONFIG_MXC_USB_PORT with index in drivers/usb/host/ehci-mx5.c and CONFIG_MXC_USB_PORT is no longer used. Even if index is used in place of CONFIG_MXC_USB_PORT, if you wanted to just use port 1 you would need to populate both port 0 and 1 by setting CONFIG_USB_MAX_CONTROLLER_COUNT to 2. > > Here is the patch I made to drivers/usb/host/ehci-hcd.c to make USB client work on port 0 and USB host work on port 1 at the same time: Please send it as a formal patch to this list. Regards, Fabio Estevam
diff --git a/drivers/usb/host/ehci-mx5.c b/drivers/usb/host/ehci-mx5.c index 7566c61..f7ecff5 100644 --- a/drivers/usb/host/ehci-mx5.c +++ b/drivers/usb/host/ehci-mx5.c @@ -231,10 +231,10 @@ int ehci_hcd_init(int index, enum usb_init_type init, mdelay(1); /* Do board specific initialization */ - board_ehci_hcd_init(CONFIG_MXC_USB_PORT); + board_ehci_hcd_init(index); ehci = (struct usb_ehci *)(OTG_BASE_ADDR + - (0x200 * CONFIG_MXC_USB_PORT)); + (0x200 * index)); *hccr = (struct ehci_hccr *)((uint32_t)&ehci->caplength); *hcor = (struct ehci_hcor *)((uint32_t)*hccr + HC_LENGTH(ehci_readl(&(*hccr)->cr_capbase))); @@ -243,11 +243,11 @@ int ehci_hcd_init(int index, enum usb_init_type init, __raw_writel(CONFIG_MXC_USB_PORTSC, &ehci->portsc); setbits_le32(&ehci->portsc, USB_EN); - mxc_set_usbcontrol(CONFIG_MXC_USB_PORT, CONFIG_MXC_USB_FLAGS); + mxc_set_usbcontrol(index, CONFIG_MXC_USB_FLAGS); mdelay(10); /* Do board specific post-initialization */ - board_ehci_hcd_postinit(ehci, CONFIG_MXC_USB_PORT); + board_ehci_hcd_postinit(ehci, index); return 0; }