usb: chipidea: add host role
This adds EHCI host support to the chipidea driver. We want it to be part of the hdrc driver and not a standalone (sub-)driver module, as the structure of ehci-hcd.c suggests, so for chipidea controller we hack it to not provide platform-related code, but only the ehci hcd. The ehci-platform driver won't work for us here too, because the controller uses the same registers for both device and host mode and also otg-related bits, so it's not really possible to put ehci registers into a separate resource. This is not a pretty solution, but the alternative is exporting symbols from the chipidea driver to a ehci-chipidea driver and doing all the module refcounting. Signed-off-by: Alexander Shishkin <alexander.shishkin@linux.intel.com> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
This commit is contained in:

committed by
Greg Kroah-Hartman

parent
758fc9860c
commit
eb70e5ab8f
@@ -1246,6 +1246,13 @@ static int ehci_get_frame (struct usb_hcd *hcd)
|
||||
}
|
||||
|
||||
/*-------------------------------------------------------------------------*/
|
||||
/*
|
||||
* The EHCI in ChipIdea HDRC cannot be a separate module or device,
|
||||
* because its registers (and irq) are shared between host/gadget/otg
|
||||
* functions and in order to facilitate role switching we cannot
|
||||
* give the ehci driver exclusive access to those.
|
||||
*/
|
||||
#ifndef CHIPIDEA_EHCI
|
||||
|
||||
MODULE_DESCRIPTION(DRIVER_DESC);
|
||||
MODULE_AUTHOR (DRIVER_AUTHOR);
|
||||
@@ -1504,3 +1511,4 @@ static void __exit ehci_hcd_cleanup(void)
|
||||
}
|
||||
module_exit(ehci_hcd_cleanup);
|
||||
|
||||
#endif /* CHIPIDEA_EHCI */
|
||||
|
Reference in New Issue
Block a user