This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Problem with am335x gadget usb driver

recently,I am porting the kernel to am335x-evm on the sdk7.0

I want to porting a USB gadget driver,so I configure the kernel as:

<*> Support for Host-side USB
[ ] USB verbose debug messages
[*] USB announce new devices
*** Miscellaneous USB options ***
[*] Enable USB persist by default
[ ] Dynamic USB minor allocation
[*] OTG support
[ ] Rely on OTG Targeted Peripherals List
[ ] Disable external hubs
<*> USB Monitor
< > Support WUSB Cable Based Association (CBA)
*** USB Host Controller Drivers ***
< > Cypress C67x00 HCD support
< > xHCI HCD (USB 3.0) support
< > EHCI HCD (USB 2.0) support
< > OXU210HP HCD support
< > ISP116X HCD support
< > ISP 1760 HCD support
< > ISP1362 HCD support
< > FUSBH200 HCD support
< > FOTG210 HCD support
< > OHCI HCD (USB 1.1) support
< > UHCI HCD (most Intel and VIA) support
< > SL811HS HCD support
< > R8A66597 HCD support
[ ] HCD test mode support
<*> Inventra Highspeed Dual Role Controller (TI, ADI, ...)
MUSB Mode Selection (Dual Role mode) --->
<*> Platform Glue Layer (TI DSPS platforms) --->
<*> Enable support for AM335x devices
MUSB DMA mode (Disable DMA (always use PIO)) --->
...
<*> USB Mass Storage support
...
<*> USB Gadget Support --->


But when the kernel start,It print
Error:Driver 'am335x-usb-childs' is already registered aborting...

eveytime I add the option "<*> Enable support for AM335x devices",it print 

Error:Driver 'am335x-usb-childs' is already registered aborting...

But I need this option to support my usb gadget driver.

  • I will forward this to the USB experts.

  • Jinlong,

    It seems you are trying to build all USB drivers into kernel. Have you first tried to use the default kernel config in SDK7.0 to see if usb works for you?

    When build all USB drivers into kernel

    1. change options in device drivers --> USB support to <*>

    2. change the gadget driver of your choice to <*>

    3. you also need patch #1 in http://processors.wiki.ti.com/index.php/Sitara_Linux_SDK_MUSB_Issues

  • Bin Liu

    Thanks for your answer!

    I have try with the default config,and the usb1 work perfectly as USB host!

    But, with the default config my gadget driver I built into kernel don't work anyway! and my code abort at:

    usb_gadget_probe_driver(...)

    {

        ...

        list_for_each_entry(udc, &udc_list, list){

        }

        ...

    }

    no udc found at all!! and it return directly.

    I need the usb1 work as host and the usb0 work as a gadget, so I config the kernel as above (#1)

    with myself config my gadget driver work well at first, but after a while it abort with a kernel message:

    "Error:Driver 'am335x-usb-childs' is already registered aborting..."

    "musb_hdrc: exports duplicate symbol musb_babble_reinit (owned by kernel)"

    So I remove my gadget driver, biuld the kernel with myself config, these error message also printed.