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.

DM365 with kernel 2.6.18 can't config USB HOST

Hi

 I'm developing USB wifi module with DM365,(kernel 2.6.18).

If I config kernel for USB Host, the kernel compiled failed. If I configured to OTG,it will works. But I need HOST only. Anybody can help me?Thank you.

Configure:


#
# USB support
#
CONFIG_USB_ARCH_HAS_HCD=y
CONFIG_USB_ARCH_HAS_OHCI=y
# CONFIG_USB_ARCH_HAS_EHCI is not set
CONFIG_USB=y
# CONFIG_USB_DEBUG is not set

#
# Miscellaneous USB options
#
CONFIG_USB_DEVICEFS=y
CONFIG_USB_DEVICE_CLASS=y
# CONFIG_USB_BANDWIDTH is not set
# CONFIG_USB_DYNAMIC_MINORS is not set
CONFIG_USB_SUSPEND=y
#CONFIG_USB_OTG is not set
#CONFIG_USB_OTG_WHITELIST is not set
# CONFIG_USB_OTG_BLACKLIST_HUB is not set


#
# USB Host Controller Drivers
#
# CONFIG_USB_ISP116X_HCD is not set
# CONFIG_USB_SL811_HCD is not set
CONFIG_USB_MUSB_HDRC=y
CONFIG_USB_MUSB_SOC=y

#
# DaVinci 644x USB support
#
CONFIG_USB_MUSB_HOST=y
#CONFIG_USB_MUSB_PERIPHERAL=y
#CONFIG_USB_MUSB_OTG=y
#CONFIG_USB_GADGET_MUSB_HDRC=y
CONFIG_USB_MUSB_HDRC_HCD=y
# CONFIG_MUSB_PIO_ONLY is not set
# CONFIG_MUSB_SCHEDULE_INTR_EP is not set
# CONFIG_USB_INVENTRA_DMA is not set
CONFIG_USB_TI_CPPI_DMA=y
# CONFIG_USB_TI_CPPI41_DMA is not set
CONFIG_USB_MUSB_LOGLEVEL=1

#
# USB Device Class drivers
#
# CONFIG_USB_ACM is not set
# CONFIG_USB_PRINTER is not set

#
# NOTE: USB_STORAGE enables SCSI, and 'SCSI disk support'
#

#
# may also be needed; see USB_STORAGE Help for more information
#
CONFIG_USB_STORAGE=y
# CONFIG_USB_STORAGE_DEBUG is not set
# CONFIG_USB_STORAGE_DATAFAB is not set
# CONFIG_USB_STORAGE_FREECOM is not set
# CONFIG_USB_STORAGE_DPCM is not set
# CONFIG_USB_STORAGE_USBAT is not set
# CONFIG_USB_STORAGE_SDDR09 is not set
# CONFIG_USB_STORAGE_SDDR55 is not set
# CONFIG_USB_STORAGE_JUMPSHOT is not set
# CONFIG_USB_STORAGE_ALAUDA is not set
# CONFIG_USB_STORAGE_ONETOUCH is not set
# CONFIG_USB_LIBUSUAL is not set

#
# USB Input Devices
#
#CONFIG_USB_HID=y //
#CONFIG_USB_HIDINPUT=y //
# CONFIG_USB_HIDINPUT_POWERBOOK is not set
# CONFIG_HID_FF is not set
#CONFIG_USB_HIDDEV=y
# CONFIG_USB_AIPTEK is not set
# CONFIG_USB_WACOM is not set
# CONFIG_USB_ACECAD is not set
# CONFIG_USB_KBTAB is not set
# CONFIG_USB_POWERMATE is not set
# CONFIG_USB_TOUCHSCREEN is not set
# CONFIG_USB_YEALINK is not set
# CONFIG_USB_XPAD is not set
# CONFIG_USB_ATI_REMOTE is not set
# CONFIG_USB_ATI_REMOTE2 is not set
# CONFIG_USB_KEYSPAN_REMOTE is not set
# CONFIG_USB_APPLETOUCH is not set


#
# USB HID Boot Protocol drivers
#
# CONFIG_USB_KBD is not set
# CONFIG_USB_MOUSE is not set
# CONFIG_USB_AIPTEK is not set
# CONFIG_USB_WACOM is not set
# CONFIG_USB_ACECAD is not set
# CONFIG_USB_KBTAB is not set
# CONFIG_USB_POWERMATE is not set
# CONFIG_USB_TOUCHSCREEN is not set
# CONFIG_USB_YEALINK is not set
# CONFIG_USB_XPAD is not set
# CONFIG_USB_ATI_REMOTE is not set
# CONFIG_USB_ATI_REMOTE2 is not set
# CONFIG_USB_KEYSPAN_REMOTE is not set
# CONFIG_USB_APPLETOUCH is not set

#
# USB Imaging devices
#
# CONFIG_USB_MDC800 is not set
# CONFIG_USB_MICROTEK is not set

#
# USB Network Adapters
#
# CONFIG_USB_CATC is not set
# CONFIG_USB_KAWETH is not set
# CONFIG_USB_PEGASUS is not set
# CONFIG_USB_RTL8150 is not set
# CONFIG_USB_USBNET is not set
CONFIG_USB_MON=y

#
# USB port drivers
#

#
# USB Serial Converter support
#
# CONFIG_USB_SERIAL is not set

#
# USB Miscellaneous drivers
#
# CONFIG_USB_EMI62 is not set
# CONFIG_USB_EMI26 is not set
# CONFIG_USB_AUERSWALD is not set
# CONFIG_USB_RIO500 is not set
# CONFIG_USB_LEGOTOWER is not set
# CONFIG_USB_LCD is not set
# CONFIG_USB_LED is not set
# CONFIG_USB_CYPRESS_CY7C63 is not set
# CONFIG_USB_CYTHERM is not set
# CONFIG_USB_PHIDGETKIT is not set
# CONFIG_USB_PHIDGETSERVO is not set
# CONFIG_USB_IDMOUSE is not set
# CONFIG_USB_APPLEDISPLAY is not set
# CONFIG_USB_LD is not set
CONFIG_USB_TEST=m

#
# USB DSL modem support
#

#
# USB Gadget Support
#
CONFIG_USB_GADGET=y
# CONFIG_USB_GADGET_DEBUG_FILES is not set
CONFIG_USB_GADGET_SELECTED=y
# CONFIG_USB_GADGET_FSL_USB2 is not set
# CONFIG_USB_GADGET_NET2280 is not set
# CONFIG_USB_GADGET_PXA2XX is not set
# CONFIG_USB_GADGET_GOKU is not set
# CONFIG_USB_GADGET_LH7A40X is not set
# CONFIG_USB_GADGET_OMAP is not set
# CONFIG_USB_GADGET_ARC is not set
# CONFIG_USB_GADGET_AT91 is not set
# CONFIG_USB_GADGET_MPC8272 is not set
# CONFIG_USB_GADGET_DWC_OTG is not set
CONFIG_USB_GADGET_DUMMY_HCD=y
CONFIG_USB_DUMMY_HCD=y
# CONFIG_USB_GADGET_MPC885ADS is not set
# CONFIG_USB_GADGET_EP88XC is not set
CONFIG_USB_GADGET_DUALSPEED=y
CONFIG_USB_MEDIA_GADGET=y
# CONFIG_USB_ZERO is not set
# CONFIG_USB_ETH is not set
# CONFIG_USB_GADGETFS is not set
# CONFIG_USB_FILE_STORAGE is not set
# CONFIG_USB_G_SERIAL is not set

compile Log:

drivers/built-in.o: In function `musb_interrupt':
rtc-davinci-dm365.c:(.text+0x920dc): undefined reference to `musb_tx_comp_backoff'.

Actually the source file(rtc-davinci-dm365.c) doesn't call "musb_tx_comp_backoff" at all.

 

  • Ray,

    do you se any issue in otg mode? there is no harm in configuring in otg mode and using for host mode alone.

    Ajay

  • Hi Ajay

       If I configure in OTG mode ,the driver can't setup. I'm using rt3370(USB WiFi module). With kernel 2.6.32, I configure in Host mode,the driver works. But all my app were built with 2.6.18,So I'm eager for help.

  • do you get any error message in otg mode? i guess you may need to port back few patches from v2.6.32 to v2.6.18

  • For Host mode

    musb_hdrc: version 6.0, cppi-dma, host, debug=0
    musb_hdrc: USB Host mode controller at fec64000 using DMA, IRQ 12
    musb_hdrc musb_hdrc: MUSB HDRC host driver
    musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
    usb usb1: configuration #1 chosen from 1 choice
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected

     

    # insmod rt3370sta.ko
    rtusb init --->
    ===>rt2870_probe()!
    --> RTMPAllocAdapterBlock


    === pAd = c393a000, size = 511016 ===

    <-- RTMPAllocAdapterBlock, Status=0
    NumEndpoints=7
    BULK IN MaxPacketSize = 512
    EP address = 0x81
    BULK OUT MaxPacketSize = 512
    EP address = 0x 1
    BULK OUT MaxPacketSize = 512
    EP address = 0x 2
    BULK OUT MaxPacketSize = 512
    EP address = 0x 3
    BULK OUT MaxPacketSize = 512
    EP address = 0x 4
    BULK OUT MaxPacketSize = 512
    EP address = 0x 5
    BULK OUT MaxPacketSize = 512
    EP address = 0x 6
    STA Driver version-2.4.0.1
    NVM is EEPROM
    Allocate a net device with private data size=0!
    Allocate net device ops success!
    The name of the new ra interface is ra0...
    RtmpOSNetDevAttach()--->
    <---RtmpOSNetDevAttach(), ret=0
    <===rt2870_probe()!
    usbcore: registered new interface driver rt2870

    For OTG mode

    musb_hdrc: version 6.0/dbg, cppi-dma, otg (peripheral+host), debug=1
    musb_hdrc: USB OTG mode controller at c401e000 using DMA, IRQ 12
    media_bind()
    musb_hdrc musb_hdrc: MUSB HDRC host driver
    musb_hdrc musb_hdrc: new USB bus registered, assigned bus number 1
    usb usb1: configuration #1 chosen from 1 choice
    hub 1-0:1.0: USB hub found
    hub 1-0:1.0: 1 port detected

     

    # insmod rt3370sta.ko
    rtusb init --->
    usbcore: registered new driver rt2870

  •  

    Can Dm365 with kernel 2.6.18 configured in USB HOST only mode?

  • I think there is some compile error due to some patches on v2.8.18. did you try to fix the compile error you reported?

    drivers/built-in.o: In function `musb_interrupt':
    rtc-davinci-dm365.c:(.text+0x920dc): undefined reference to `musb_tx_comp_backoff'.

    Ajay
  • Hi Ajay

       Yes,I think it's due to the kernel's patches.

      The compile error is strange for the file"rtc-davinci-dm365.c" didn't call "musb_tx_comp_backoff"。So I'm puzzled and has no idea how to resolve this。

  • Ray,

    Look for "musb_tx_comp_backoff" and see why it's not visible to rtc-davinci-dm365.c. You may have to add extern for this function.

    Ajay