21 Oct, 2013

4 commits

  • This parameter will later be used to verify OTG ports.

    Signed-off-by: Troy Kisky

    Troy Kisky
     
  • This will be used by usb_lowlevel_init so it will
    no longer be used by only board specific functions.

    Move definition of enum usb_init_type higher in file
    so that it will be available for usb_low_level_init.

    Signed-off-by: Troy Kisky

    Troy Kisky
     
  • This commit unifies board-specific USB initialization implementations
    under one symbol (usb_board_init), declaration of which is available in
    usb.h.

    New API allows selective initialization of USB controllers whenever needed.

    Signed-off-by: Mateusz Zalega
    Signed-off-by: Kyungmin Park
    Reviewed-by: Lukasz Majewski
    Cc: Marek Vasut
    Cc: Lukasz Majewski

    Mateusz Zalega
     
  • This adds stack layer for eXtensible Host Controller Interface
    which facilitates use of USB 3.0 in host mode.

    Adapting xHCI host controller driver in linux-kernel
    by Sarah Sharp to needs in u-boot.

    Initial porting from Linux kernel version 3.4, with following
    top commit history of drivers/usb/host/xhci* :
    cf84055 xHCI: Cleanup isoc transfer ring when TD length mismatch found

    This adds the basic xHCI host controller driver with bare minimum
    features:
    - Control/Bulk transfer support has been added with required
    infrastructure for necessary xHC data structures.
    - Stream protocol hasn't been supported yet.
    - No support for quirky devices has been added.

    Signed-off-by: Vikas C Sajjan
    Signed-off-by: Julius Werner
    Signed-off-by: Vivek Gautam
    Cc: Simon Glass
    Cc: Minkyu Kang
    Cc: Dan Murphy
    Cc: Marek Vasut

    Vivek Gautam
     

27 Aug, 2013

1 commit

  • The existing USB configuration parsing code relies on the descriptors'
    own length values when reading through the configuration blob. Since the
    size of those descriptors is always well-defined, we should rather use
    the known sizes instead of trusting device-provided values to be
    correct. Also adds some safety to potential out-of-order descriptors.

    Change-Id: I16f69dfdd6793aa0fe930b5148d4521f3e5c3090
    Signed-off-by: Julius Werner

    Julius Werner
     

24 Jul, 2013

1 commit


06 May, 2013

4 commits


17 Dec, 2012

1 commit


20 Nov, 2012

1 commit

  • Linux usb/ch9.h seems to have all the same information (and more)
    as usbdescriptors.h so use the former instead of the later one.

    As a consequense of this change USB_SPEED_* values don't correspond
    directly to EHCI speed encoding anymore, I've added necessary
    recoding in EHCI driver. Also there is no point to put speed into
    pipe anymore so it's removed and a bunch of host drivers fixed to
    look at usb_device->speed instead.

    Old usbdescriptors.h included is not removed as it seems to be
    used by old USB device code.

    This makes usb.h and usbdevice.h incompatible. Fortunately the
    only place that tries to include both are the old MUSB code and
    it needs usb.h only for USB_DMA_MINALIGN used in aligned attribute
    on musb_regs structure but this attribute seems to be unneeded
    (old MUSB code doesn't support any DMA at all).

    Signed-off-by: Ilya Yanok

    Ilya Yanok
     

22 Oct, 2012

1 commit

  • When a USB configuration descriptor was larger than our USB buffer
    (512 bytes), we were skipping the full descriptor reading but then we
    were still parsing and using it, triggering memory corruptions.
    Now in that case, it just skips this device enumeration and displays the
    appropriate message to the user, so he can fix the buffer if he wants.

    This bug was triggered by some UVC webcams which have very large
    configuration descriptors (e.g. a couple of kB) describing all their
    supported video encodings.

    Signed-off-by: Vincent Palatin
    Acked-by: Simon Glass

    Vincent Palatin
     

16 Oct, 2012

2 commits


18 Jul, 2012

2 commits


20 May, 2012

2 commits

  • 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
     
  • Building usb for Blackfin boards fails as we get linux/compiler.h
    included which expands the "noinline" inside of the attribute and
    we get attribute(attribute(noinline)).

    Explicitly use the helper define to avoid this.

    Signed-off-by: Mike Frysinger

    Mike Frysinger
     

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

3 commits


17 Dec, 2011

1 commit

  • In 9792987721c7980453fe6447c3fa6593b44f8458 Stefan describes a usecase
    where the previous behavior of leaving wMaxPacketSize be unaligned
    caused fatal problems. The initial fix for this problem was incomplete
    however as it showed another cases of non-aligned access that previously
    worked implicitly. This switches to making sure that all access of
    wMaxPacketSize are done via (get|put)_unaligned.

    In order to maintain a level of readability to the code in some cases
    we now use a variable for the value of wMaxPacketSize and in others, a
    macro.

    Cc: Minkyu Kang
    Cc: Remy Bohmer

    OpenRISC:
    Tested-by: Stefan Kristiansson

    Beagleboard xM, Pandaboard run-tested, s5p_goni build-tested.
    Signed-off-by: Tom Rini

    Tom Rini
     

16 Nov, 2011

1 commit

  • The problem was that the code, when the function was compiled with -Os, was
    misgenerated. As in the function description, this is likely another
    manifestation of the bug in GCC.

    Signed-off-by: Marek Vasut
    Cc: Wolfgang Denk
    Cc: Remy Bohmer

    Marek Vasut
     

28 Oct, 2011

1 commit

  • usb.c: In function ‘usb_parse_config’:
    usb.c:331:17: warning: variable ‘ch’ set but not used
    [-Wunused-but-set-variable]
    usb.c: In function ‘usb_hub_port_connect_change’:
    usb.c:1123:29: warning: variable ‘portchange’ set but not used
    [-Wunused-but-set-variable]
    usb.c: In function ‘usb_hub_configure’:
    usb.c:1183:25: warning: variable ‘hubsts’ set but not used
    [-Wunused-but-set-variable]

    Signed-off-by: Marek Vasut
    Cc: Wolfgang Denk
    Cc: Simon Glass
    Cc: Mike Frysinger

    Marek Vasut
     

10 Oct, 2011

1 commit

  • Fix:
    usb.c: In function 'usb_parse_config':
    usb.c:331:17: warning: variable 'ch' set but not used [-Wunused-but-set-variable]
    usb.c: In function 'usb_hub_port_connect_change':
    usb.c:1123:29: warning: variable 'portchange' set but not used [-Wunused-but-set-variable]
    usb.c: In function 'usb_hub_configure':
    usb.c:1183:25: warning: variable 'hubsts' set but not used [-Wunused-but-set-variable]

    Signed-off-by: Wolfgang Denk
    Cc: Remy Bohmer
    Acked-by: Remy Bohmer

    Wolfgang Denk
     

05 Oct, 2011

1 commit

  • This reverts commit 60ce53cf9f408d9ad721f8e7a87d6a564e6d5bac.

    The commit causes build breakage for a number of boards. This results
    from the fact that now the arguments of debug() actually get
    referenced (even if there is hope that the compiler will optimize
    away the debug() call). The obvious fix to that probem (change the
    code to always declare the referenced variables and data structures)
    increases the code size, and was this rejected. So it was decided to
    revert this commit until a better solution is found.

    Wolfgang Denk
     

02 Oct, 2011

1 commit

  • Fix the following gcc4.6 problems:

    cmd_date.c: In function ‘do_date’:
    cmd_date.c:50:6: warning: variable ‘old_bus’ set but not used
    [-Wunused-but-set-variable]
    asix.c: In function ‘asix_init’:
    asix.c:317:6: warning: variable ‘rx_ctl’ set but not used
    [-Wunused-but-set-variable]
    usb.c: In function ‘usb_parse_config’:
    usb.c:331:17: warning: variable ‘ch’ set but not used
    [-Wunused-but-set-variable]
    usb.c: In function ‘usb_hub_port_connect_change’:
    usb.c:1123:29: warning: variable ‘portchange’ set but not used
    [-Wunused-but-set-variable]
    usb.c: In function ‘usb_hub_configure’:
    usb.c:1183:25: warning: variable ‘hubsts’ set but not used
    [-Wunused-but-set-variable]
    usb_storage.c: In function ‘usb_stor_CB_reset’:
    usb_storage.c:466:6: warning: variable ‘result’ set but not used
    [-Wunused-but-set-variable]

    Signed-off-by: Marek Vasut

    Marek Vasut
     

09 Aug, 2011

2 commits


20 Feb, 2011

1 commit

  • 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
     

05 Feb, 2011

2 commits


04 Feb, 2010

1 commit


20 Dec, 2009

1 commit

  • 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