Kumar, This past summer I proposed some restructuring of the EHCI driver to allow for OTG drivers that use EHCI for host mode. It would also handle your situation. Instead of including other *.c files into ehci-hcd.c the C files would be included into the platform specific file. So for example ehci-pci.c would include the other ehci C files that it needed (including ehci-hcd.c). Not only would this allow for EHCI in an OTG core and non-PCI EHCI but it would also allow an EHCI driver to replace any of the C files such as ehci-mem.c.
Best Regards, Craig Nadler Kumar Gala wrote: > > On Mar 23, 2006, at 7:11 PM, Craig W. Nadler wrote: > >> Kumar, >> >> If I understand you correctly you have both an embedded/localbus EHCI >> core and EHCI on the PCI bus. If this is the case then you could clone >> ehci-hcd.c and use it as the basis for a driver for the embedded EHCI >> core. Instead of including ehci-pci.c in the cloned code you would >> include the platform specific code for your embedded EHCI. You would >> need to change the "Kconfig" file and "makefile" in drivers/usb/ host to >> compile the module for the embedded EHCI under a different name. > > > Thanks. I was looking for a solution that we could push upstream. I > can handle hacking it so it builds :) > > One possiblity would be to move the code related to module_init/ > module_exit into their own files that get build as separate objects > from ehci-hcd.c. > >>> I was trying to build the USB EHCI host controller support as modules >>> for a PowerPC 834x which also has an embedded EHCI (and PCI enabled). >>> >>> I get the following build error: >>> >>> In file included from drivers/usb/host/ehci-hcd.c:895: >>> drivers/usb/host/ehci-fsl.c:365: error: redefinition of '__inittest' >>> drivers/usb/host/ehci-pci.c:363: error: previous definition of >>> '__inittest' was here >>> drivers/usb/host/ehci-fsl.c:365: error: redefinition of 'init_module' >>> drivers/usb/host/ehci-pci.c:363: error: previous definition of >>> 'init_module' was here >>> drivers/usb/host/ehci-fsl.c:365: error: redefinition of 'init_module' >>> drivers/usb/host/ehci-pci.c:363: error: previous definition of >>> 'init_module' was here >>> drivers/usb/host/ehci-fsl.c:366: error: redefinition of '__exittest' >>> drivers/usb/host/ehci-pci.c:369: error: previous definition of >>> '__exittest' was here >>> drivers/usb/host/ehci-fsl.c:366: error: redefinition of >>> 'cleanup_module' >>> drivers/usb/host/ehci-pci.c:369: error: previous definition of >>> 'cleanup_module' was here >>> drivers/usb/host/ehci-fsl.c:366: error: redefinition of >>> 'cleanup_module' >>> drivers/usb/host/ehci-pci.c:369: error: previous definition of >>> 'cleanup_module' was here >>> >>> Which makes sense based on how ehci-hcd.c includes "ehci-fsl.c" and >>> "ehci-pci.c". I was wondering if there were an thoughts on how to >>> address this so I can build as a module.. >>> >>> - kumar >> > > > ------------------------------------------------------- This SF.Net email is sponsored by xPML, a groundbreaking scripting language that extends applications into web and mobile media. Attend the live webcast and join the prime developer group breaking into this new coding territory! http://sel.as-us.falkag.net/sel?cmd=lnk&kid=110944&bid=241720&dat=121642 _______________________________________________ linux-usb-devel@lists.sourceforge.net To unsubscribe, use the last form field at: https://lists.sourceforge.net/lists/listinfo/linux-usb-devel