18 Jul, 2012

1 commit

  • The USB spec says that 32 bytes is the minimum required alignment.
    However on some platforms we have a larger minimum requirement for cache
    coherency. In those cases, use that value rather than the USB spec
    minimum. We add a cpp check to to define USB_DMA_MINALIGN and
    make use of it in ehci-hcd.c and musb_core.h. We cannot use MAX() here
    as we are not allowed to have tests inside of align(...).

    Signed-off-by: Tom Rini
    [marek.vasut]: introduce some crazy macro voodoo
    Signed-off-by: Marek Vasut
    [ilya.yanok]: moved external buffer fixes to separate patch,
    we use {ALLOC,DEFINE}_ALIGN_BUFFER macros with alignment of USB_DMA_MINALIGN
    for qh_list, qh and qtd structures to make sure they are proper aligned
    for both controller and cache operations.
    Signed-off-by: Ilya Yanok

    Tom Rini
     

20 May, 2012

1 commit

  • This avoids cache-alignment warnings shown in console
    when a usb command is entered.

    Whenever X bytes of unaligned buffer is invalidated, arm core
    invalidates X + Y bytes as per the cache line size and throws
    these warnings.

    Signed-off-by: Puneet Saxena
    Signed-off-by: Marek Vasut

    Puneet Saxena
     

19 Mar, 2012

1 commit

  • Common code has a mdelay() func, so use that instead of the usb-specific
    wait_ms() func. This also fixes the build errors:

    ohci-hcd.c: In function 'submit_common_msg':
    /usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
    ohci-hcd.c:1519:9: sorry, unimplemented: called from here
    /usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
    ohci-hcd.c:1816:10: sorry, unimplemented: called from here
    /usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
    ohci-hcd.c:1827:10: sorry, unimplemented: called from here
    /usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
    ohci-hcd.c:1844:10: sorry, unimplemented: called from here
    /usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
    ohci-hcd.c:1563:11: sorry, unimplemented: called from here
    /usr/local/src/u-boot/blackfin/include/usb.h:202:44: sorry, unimplemented: inlining failed in call to 'wait_ms': function body not available
    ohci-hcd.c:1583:9: sorry, unimplemented: called from here
    make[1]: *** [ohci-hcd.o] Error 1

    Signed-off-by: Mike Frysinger
    Acked-by: Marek Vasut

    Mike Frysinger
     

03 Mar, 2012

2 commits


09 Aug, 2011

1 commit

  • If you take a look at 96820a35, you'll see the original timeout was
    CONFIG_SYS_HZ. Which is 1000. After the mentioned change, non-bulk timeout
    was changed to 100. This causes timeout failures on the dreamplug platform
    when trying to initialize the usb microsd reader.

    Signed-off-by: Jason Cooper
    Acked-by: Mike Frysinger

    Jason Cooper
     

20 Feb, 2011

2 commits

  • This adds support for using USB Ethernet dongles in host mode. This is just
    the framework - drivers will come later. A new config option called
    CONFIG_USB_HOST_ETHER can be defined in board config files to switch this
    on.

    The was originally written by NVIDIA and was cleaned up for release by the
    Chromium authors.

    Signed-off-by: Simon Glass

    Simon Glass
     
  • Changed both to use a common timeout for URB submission, since they were using
    different values and EHCI's was too short.

    Also fixed EHCI to actually check if urb submission succeeded, rather than
    silently continuing into the weeds.

    Change-Id: I7f71499ffaa05187d8e5618db2419e1606007b82

    Signed-off-by: Simon Glass

    Simon Glass
     

12 Aug, 2010

1 commit


28 May, 2010

1 commit

  • create_pipe() can give wrong result if an expression is passed as the 'endpoint'
    argument -- due to missing parentheses.

    Thanks to Martin Mueller for finding the bug and providing the patch.

    Signed-off-by: Sergei Shtylyov

    Sergei Shtylyov
     

09 Jan, 2010

2 commits


20 Dec, 2009

2 commits

  • This change adds the usb device support for musb.

    Omap3 platform support added at the same level as davinci.

    The interface for usbtty to use the musb device support was added.

    Verified on omap3 beagle, zoom1 and zoom2.

    Signed-off-by: Tom Rix

    Tom Rix
     
  • The header files usb.h and usbdescriptors.h have the same nameed
    structure definitions for

    usb_config_descriptor
    usb_interface_descriptor
    usb_endpoint_descriptor
    usb_device_descriptor
    usb_string_descriptor

    These are out right duplicates in usb.h

    usb_device_descriptor
    usb_string_descriptor

    This one has extra unused elements

    usb_endpoint_descriptor

    unsigned char bRefresh
    unsigned char bSynchAddress;

    These in usb.h have extra elements at the end of the usb 2.0
    specified descriptor and are used.

    usb_config_descriptor
    usb_interface_descriptor

    The change is to consolidate the definition of the descriptors
    to usbdescriptors.h. The dublicates in usb.h are removed.
    The extra element structure will have their name shorted by
    removing the '_descriptor' suffix.

    So

    usb_config_descriptor -> usb_config
    usb_interface_descriptor -> usb_interface

    For these, the common descriptor elements are accessed now
    by an element 'desc'.

    As an example

    - if (iface->bInterfaceClass != USB_CLASS_HUB)
    + if (iface->desc.bInterfaceClass != USB_CLASS_HUB)

    This has been compile tested on MAKEALL arm, ppc and mips.

    Signed-off-by: Tom Rix

    Tom Rix
     

29 Jan, 2009

4 commits


10 Dec, 2008

1 commit

  • Hi,

    I found a bug when working with the u-boot USB subsystem on IXP425 processor
    (big endian Xscale aka ARMv5).
    I recognized that the second usb_endpoint_descriptor of the attached memory
    stick was corrupted.

    The reason for this are the packed structures below (either u-boot and
    u-boot-usb):

    --------------
    /* Endpoint descriptor */
    struct usb_endpoint_descriptor {
    unsigned char bLength;
    unsigned char bDescriptorType;
    unsigned char bEndpointAddress;
    unsigned char bmAttributes;
    unsigned short wMaxPacketSize;
    unsigned char bInterval;
    unsigned char bRefresh;
    unsigned char bSynchAddress;

    } __attribute__ ((packed));
    /* Interface descriptor */
    struct usb_interface_descriptor {
    unsigned char bLength;
    unsigned char bDescriptorType;
    unsigned char bInterfaceNumber;
    unsigned char bAlternateSetting;
    unsigned char bNumEndpoints;
    unsigned char bInterfaceClass;
    unsigned char bInterfaceSubClass;
    unsigned char bInterfaceProtocol;
    unsigned char iInterface;

    unsigned char no_of_ep;
    unsigned char num_altsetting;
    unsigned char act_altsetting;
    struct usb_endpoint_descriptor ep_desc[USB_MAXENDPOINTS];
    } __attribute__ ((packed));
    ------------

    As usb_endpoint_descriptor is only 7byte in length, the start of all
    odd ep_desc[] structures is not word aligned. This makes wMaxPacketSize
    of these structures also not word aligned.

    ARMv5 Architecture however does not support non-aligned multibyte
    data type (see A2.8 of ARM Architecture Reference Manual).

    Signed-off-by: Stefan Althoefer
    Signed-off-by: Remy Böhmer

    Stefan Althoefer
     

29 Nov, 2008

1 commit


14 Oct, 2008

1 commit

  • The max packet size is encoded as 0,1,2,3 for 8,16,32,64 bytes.
    At some places directly 8,16,32,64 was used instead of the encoded
    value. Made a enum for the options to make this more clear and to help
    preventing similar errors in the future.

    After fixing this bug it became clear that another bug existed where
    the 'pipe' is and-ed with PIPE_* flags, where it should have been
    'usb_pipetype(pipe)', or even better usb_pipeint(pipe).

    Also removed the triple 'get_device_descriptor' sequence, it has no use,
    and Windows nor Linux behaves that way.
    There is also a poll going on with a timeout when usb_control_msg() fails.
    However, the poll is useless, because the flag will never be set on a error,
    because there is no code that runs in a parallel that can set this flag.
    Changed this to something more logical.

    Tested on AT91SAM9261ek and compared the flow on the USB bus to what
    Linux is doing. There is no difference anymore in the early initialisation
    sequence.

    Signed-off-by: Remy Bohmer
    Signed-off-by: Markus Klotzbuecher

    Remy Bohmer
     

07 Aug, 2008

1 commit


27 Mar, 2008

1 commit


06 Jun, 2007

1 commit

  • This patch adds USB event poll support, which could be used in usbkbd
    and other usb devices driver when the asynchronous interrupt
    processing is supported.

    Signed-off-by: Zhang Wei <wei.zhang@freescale.com

    Zhang Wei
     

03 Apr, 2007

1 commit


27 Nov, 2006

2 commits


02 Aug, 2006

1 commit


21 Jul, 2005

1 commit

  • A new, Windows compatible init sequence was also backported from Linux 2.6,
    but disabled with #undef NEW_INIT_SEQ as it wouldn't change the behaviour
    of the memopry sticks we tested. Maybe it's not relevant for mass storage
    devices. For recerence, see file common/usb.c, function usb_new_device(),
    section #ifdef NEW_INIT_SEQ.

    Wolfgang Denk
     

24 Apr, 2004

1 commit

  • sticks (including FAT / VFAT filesystem support)

    * Add SL811 Host Controller Interface driver for USB

    * Add CFG_I2C_EEPROM_ADDR_OVERFLOW desription to README

    * Patch by Pantelis Antoniou, 19 Apr 2004:
    Allow to use shell style syntax (i. e. ${var} ) with standard parser.
    Minor patches for Intracom boards.

    * Patch by Christian Pell, 19 Apr 2004:
    cleanup support for CF/IDE on PCMCIA for PXA25X

    wdenk
     

24 Feb, 2004

1 commit

  • * Cleanup compiler warnings

    * Fix problem with side effects in macros in include/usb.h

    * Patch by David Benson, 13 Nov 2003:
    bug 841358 - fix TFTP download size limit

    * Fixing bug 850768:
    improper flush_cache() in load_serial()

    * Fixing bug 834943:
    MPC8540 - missing volatile declarations

    * Patch by Stephen Williams, 09 Feb 2004:
    Add support for Xilinx SystemACE chip:
    - New files common/cmd_ace.c and include/systemace.h
    - Hook systemace support into cmd_fat and the partition manager

    * Patch by Travis Sawyer, 09 Feb 2004:
    Add bi_opbfreq & bi_iic_fast to 440GX bd_info as needed for Linux

    wdenk
     

11 Sep, 2003

1 commit


28 Jun, 2003

1 commit

  • - remove trailing white space, trailing empty lines, C++ comments, etc.
    - split cmd_boot.c (separate cmd_bdinfo.c and cmd_load.c)

    * Patches by Kenneth Johansson, 25 Jun 2003:
    - major rework of command structure
    (work done mostly by Michal Cendrowski and Joakim Kristiansen)

    wdenk
     

09 Mar, 2002

1 commit