Hi, (don't top-post!!!!!) On Mon, Aug 01, 2011 at 02:27:15PM +0800, Neil Zhang wrote: > yes, I'm working on a marvell's platform and there is an otg controller. > For the otg controller, there are there drivers for host, udc and otg device. > And it will register relative devices in the process of init_machine(). > > In the probe function of host driver (named ehci-mv.c, not an open > source code, just like ehci-fsl.c), > it will call otg_get_transceiver() if CONFIG_USB_OTG is defined. > > But at this time, the otg driver has not been inited and there is no > transceiver been setted. > > I find that patch (commit id:4661ffc91befc8c5ee080720120da1d53851060a) > will let the host driver init before than otg driver and which cause > the problem I met. then you can always patch that, right ;-) BTW, your drivers should not rely on a particular linking order... I understand that with otg_transceivers the problem is a bit different because we don't have a proper PHY layer, but still. anyway, try this: diff --git a/drivers/usb/Makefile b/drivers/usb/Makefile index 30ddf8d..1c11c24 100644 --- a/drivers/usb/Makefile +++ b/drivers/usb/Makefile @@ -5,6 +5,7 @@ # Object files in subdirectories obj-$(CONFIG_USB) += core/ +obj-$(CONFIG_USB_OTG_UTILS) += otg/ obj-$(CONFIG_USB_MON) += mon/ @@ -49,5 +50,4 @@ obj-$(CONFIG_USB_SPEEDTOUCH) += atm/ obj-$(CONFIG_USB_MUSB_HDRC) += musb/ obj-$(CONFIG_USB_RENESAS_USBHS) += renesas_usbhs/ -obj-$(CONFIG_USB_OTG_UTILS) += otg/ obj-$(CONFIG_USB_GADGET) += gadget/ -- balbi
Attachment:
signature.asc
Description: Digital signature