summaryrefslogtreecommitdiffstats
path: root/common/usb_hub.c
Commit message (Collapse)AuthorAgeFilesLines
* usb: Clean up newly allocated device nodes in case of configuration failureMilind Choudhary2012-12-171-0/+2
| | | | | | | | 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 <milindc@codeaurora.org> Signed-off-by: Simon Glass <sjg@chromium.org>
* usbh/ehci: Increase timeout for enumerationVipin Kumar2012-12-171-5/+28
| | | | | | | | | | | | | | | | | | | | | | | | | The current logic reads the port status just once after usb_hub_power_on and expects the portstatus and portchange to report the connection status immediately and correctly. Few pen drives are not able to report both of them immediately ie. those pens report the connection change but not the connected state after the first read. This opportunity once lost is gone for ever because the u-boot, unlike linux or any other OS, works in polling mode. This patch modifies the logic to read the port status continuously until the portstatus and portchange both report a connection change as well as a connected state or no connection change and no connection. This logic is placed in a timeout of 10 sec. At the end of it, the pen drive would have either reported a ONE or a ZERO in bit 1 of portstatus as well as portchange. It enhances the set of pen drives which can eventually be detected by u-boot Note: This 10 second timeout is based purely on several experiments done with the broken pen drives Signed-off-by: Vipin Kumar <vipin.kumar@st.com> Acked-by: Igor Grinberg <grinberg@compulab.co.il>
* usb: lowlevel interface change to support multiple controllersLucas Stach2012-10-151-1/+1
| | | | | | | | | | | 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 <dev@lynxeye.de> Reviewed-by: Marek Vasut <marex@denx.de>
* usb: do explicit unaligned accessesLucas Stach2012-09-211-5/+9
| | | | | | | | | | | | | | | usb_hub_descriptor has to be packed as it's used for communication with the device. Member wHubCharacteristics violates the natural alignment rules. Use explicit unaligned access functions for this member. Fixes ARMv7 traping while using USB. v2: fix typo found by Thomas Langer v3: rebased on top of u-boot-usb/master Signed-off-by: Lucas Stach <dev@lynxeye.de>
* USB: Align buffers at cachelinePuneet Saxena2012-05-201-13/+14
| | | | | | | | | | | | 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 <puneets@nvidia.com> Signed-off-by: Marek Vasut <marex@denx.de>
* usb: replace wait_ms() with mdelay()Mike Frysinger2012-03-191-5/+5
| | | | | | | | | | | | | | | | | | | | | | | 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 <vapier@gentoo.org> Acked-by: Marek Vasut <marex@denx.de>
* USB: relax usbcore reset timingsWolfgang Grandegger2012-03-031-1/+4
| | | | | | | | | | | | Following the corresponding Linux code, this patch relaxes reset timings waiting at least 100ms after power to the ports. There are some reports that it helps make enumeration work better on some high speed devices. Furthermore, the wait is only done once after power has been enabled on all ports. CC: Remy Bohmer <linux@bohmer.net> CC: Vincent Palatin <vpalatin@chromium.org> Signed-off-by: Wolfgang Grandegger <wg@denx.de>
* USB: Separate out USB hub driverMarek Vasut2012-03-031-0/+476
Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Remy Bohmer <linux@bohmer.net> Acked-by: Mike Frysinger <vapier@gentoo.org>
OpenPOWER on IntegriCloud