[U-Boot] [PATCH V4 02/17] usb: ehci-mx6: add support for host mode otg port

Troy Kisky
2013-09-20T18:27:42Z

On 9/20/2013 3:51 AM, Marek Vasut wrote:
> Dear Troy Kisky,
>
>> Previously, only host1 was supported using an index of 0.
>> Now, otg has index 0, host1 is 1, host2 is 2, host3 is 3.
>> Since OTG requires usbmode to be set after reset, I added
>> a weak function ehci_hcd_init_after_reset to handle this,
>> and removed it from ehci_hcd_init. I also added a weak
>> function board_ehci_power to handle turning power on/off
>> for otg.
>>
>> Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
>>
>> ---
>> V4: new patch, replaces "usb: gadget: mv_udc: fix hardware udc address for
>> i.MX6" and has the bonus of giving OTG host mode support
>> ---
> Would it be a problem to implement this in ehci_hcd_init() call instead of
> adding a new call?
>
> Best regards,
> Marek Vasut
>

Maybe. I could try defining CONFIG_EHCI_HCD_INIT_AFTER_RESET and see if
anything breaks.
Although, I suspect the processor may hang if the clocks aren't setup
before ehci_reset.
I'll give it a try and let you know.

Thanks
Troy