21 Oct, 2013
4 commits
-
This parameter will later be used to verify OTG ports.
Signed-off-by: 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
-
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 -
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 foundThis 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
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
24 Jul, 2013
1 commit
-
Signed-off-by: Wolfgang Denk
[trini: Fixup common/cmd_io.c]
Signed-off-by: Tom Rini
06 May, 2013
4 commits
-
This adds usb framework support for super-speed usb, which will
further facilitate to add stack support for xHCI.Signed-off-by: Vikas C Sajjan
Signed-off-by: Vivek Gautam -
Fetch the device class into usb device's dwcriptors,
so that the host controller's driver can use this info
to differentiate between HUB and DEVICE.Signed-off-by: Amar
-
Some cleanup in usb framework, nothing much on feature side.
Signed-off-by: Vikas C Sajjan
Signed-off-by: Vivek Gautam -
USB_PRINTF, USB_HUB_PRINTF, USB_STOR_PRINTF, USB_KBD_PRINTF
are nothing but conditional debug prints, depending on DEBUG.
So better remove them and use debug() simply.Signed-off-by: Vivek Gautam
17 Dec, 2012
1 commit
-
If probe of a newly connected device fails for some reason, clean up
the allocated entry in usb_dev array.Signed-off-by: Milind Choudhary
Signed-off-by: Simon Glass
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
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
16 Oct, 2012
2 commits
-
Allows to initialize more than one USB controller at once.
v2: print message when controller stop fails
Signed-off-by: Lucas Stach
Reviewed-by: Marek Vasut -
Carry an index in the lowlevel usb functions to make specify the
respective usb controller.Also pass through an controller struct from lowlevel_init to the
creation of the root usb device of this controller.Signed-off-by: Lucas Stach
Reviewed-by: Marek Vasut
18 Jul, 2012
2 commits
-
Return values of submit_{control,bulk}_msg() functions
should be checked to detect possible error.Signed-off-by: Ilya Yanok
-
usb_get_descriptor passes it's buffer argument directly to
usb_control_msg() so it has to be properly aligned/padded.Signed-off-by: Ilya Yanok
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 -
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
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 1Signed-off-by: Mike Frysinger
Acked-by: Marek Vasut
03 Mar, 2012
3 commits
-
Signed-off-by: Marek Vasut
Cc: Remy Bohmer
Acked-by: Mike Frysinger -
Signed-off-by: Marek Vasut
Cc: Remy Bohmer
Acked-by: Mike Frysinger -
Signed-off-by: Marek Vasut
Cc: Remy Bohmer
Acked-by: Mike Frysinger
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 BohmerOpenRISC:
Tested-by: Stefan KristianssonBeagleboard xM, Pandaboard run-tested, s5p_goni build-tested.
Signed-off-by: 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
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
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
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.
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
09 Aug, 2011
2 commits
-
Signed-off-by: Marek Vasut
-
Signed-off-by: Marek Vasut
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
05 Feb, 2011
2 commits
-
While debugging some USB stuff, I've first missed that there are actually
two defines necessary to get usefull output. The one needed to get debug output
for the communication with HUBs was burried somewhere deep inside the code.Change that so that a #define DEBUG is enough while still leaving the possibility
to reduce unwanted debug output.Signed-off-by: Alexander Holler
-
I currently don't know if the error could have other consequences
than a wrong output when turning debug on.Signed-off-by: Alexander Holler
04 Feb, 2010
1 commit
-
This patch changes usb_control_msg back to the state prior to commit
48867208444cb2a82e2af9c3249e90b7ed4a1751.The USB driver ISR routine may update the status.
Signed-off-by: Daniel Hellstrom
20 Dec, 2009
1 commit
-
The header files usb.h and usbdescriptors.h have the same nameed
structure definitions forusb_config_descriptor
usb_interface_descriptor
usb_endpoint_descriptor
usb_device_descriptor
usb_string_descriptorThese are out right duplicates in usb.h
usb_device_descriptor
usb_string_descriptorThis 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_descriptorThe 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_interfaceFor 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
29 Jan, 2009
4 commits
-
We should check the return of usb_new_device() so that if no USB device is
found, we print out the right message rather than always saying "new usb
device found".Signed-off-by: Bryan Wu
Signed-off-by: Mike Frysinger
Signed-off-by: Remy Bohmer -
With this patch the USB related connection speed output ("usb tree" command and
debug output) is now high-speed enabled.This patch also fixes a compilation warning when debugging is enabled.
Signed-off-by: Stefan Roese
Signed-off-by: Remy Bohmer -
USB changes the speed according to the port status
Signed-off-by: Michael Trimarchi
Signed-off-by: Remy Bohmer -
Prepare USB layer for ehci support
Signed-off-by: Michael Trimarchi
Signed-off-by: Remy Böhmer