aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb
AgeCommit message (Collapse)AuthorFilesLines
2012-03-27USB: ehci-mx6: Add proper IO accessorsFabio Estevam1-9/+4
Add proper IO accessors for mx6 usb registers. Signed-off-by: Fabio Estevam <fabio.estevam@freescale.com> Acked-by: Stefano Babic <sbabic@denx.de> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Jason Liu <r64343@freescale.com>
2012-03-26Renamed mx28_register to mx28_register_32 to prepare for mx28_register_8Robert Delien1-4/+4
This patch renames mx28_register to mx28_register_32 in order to prepare for the introduction of an 8-bit register, mx28_register_8. Signed-off-by: Robert Delien <robert@delien.nl> Acked-by: Marek Vasut <marex@denx.de> Tested-by: Marek Vasut <marex@denx.de>
2012-03-26usb/ehci: Add USB support for the MX6QWolfgang Grandegger2-0/+206
Currently, only USB Host 1 is supported. Cc: Remy Bohmer <linux@bohmer.net> Signed-off-by: Wolfgang Grandegger <wg@denx.de>
2012-03-19USB: Armada100: EHCI Driver for Armada100 SOCsAjay Bhargav2-0/+65
This patch adds support for USB EHCI driver for Armada100 SOCs. Signed-off-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
2012-03-19USB: Armada100: Add UTMI PHY interface driverAjay Bhargav1-0/+96
This patch adds USB host controller's UTMI PHY interface driver for Armada100 SOCs. Signed-off-by: Ajay Bhargav <ajay.bhargav@einfochips.com>
2012-03-19usb:udc:samsung:fix Remove the req_config flagƁukasz Majewski1-13/+5
The dev->req_config flag was indicating that the forwarded request needs to perform the usb gadget delayed status. This is however not needed anymore, so it can be removed. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Marek Vasut <marex@denx.de>
2012-03-19USB:gadget:designware Fix memory nonalignment issueShiraz Hashim1-1/+11
While receiving packets from FIFO sometimes the buffer provided was nonaligned. Fix this by taking a temporary aligned buffer and then copying the content to nonaligned buffer. Signed-off-by: Shiraz Hashim <shiraz.hashim@st.com> Signed-off-by: Amit Virdi <amit.virdi@st.com>
2012-03-19USB:gadget:designware Make locally used functions staticAmit Virdi1-3/+3
Signed-off-by: Amit Virdi <amit.virdi@st.com>
2012-03-19USB:gadget:designware Support high speedVipin KUMAR1-0/+10
This patch adds the support for usb device high speed for designware peripheral. Signed-off-by: Vipin Kumar <vipin.kumar@st.com> Signed-off-by: Amit Virdi <amit.virdi@st.com>
2012-03-19USB:gadget:designware Device controller bugfixesVipin KUMAR1-21/+38
This patch fixes a few bugs in USB device controller driver. The fixes are as follows 1. Adding error condition checks eg. NULL return 2. Endpoint other than endpoint 0 (control endpoint) are initialized only if usb state machine reaches STATE_ADDRESSED or above 3. Zero length packet handling corrected 4. Dead code removed 5. Bulk out endpoint returns after servicing 1 interrupt and returns back to service if more interrupts are pending Signed-off-by: Vipin Kumar <vipin.kumar@st.com> Signed-off-by: Amit Virdi <amit.virdi@st.com> Acked-by: Marek Vasut <marex@denx.de>
2012-03-19USB:gadget:designware USB device controller (UDC) implementationVipin KUMAR2-30/+29
The earlier usb device controller driver was specific to spear platforms. This patch implements the usb device controller driver as a generic controller which can be reused by other platforms using this peripheral. Signed-off-by: Vipin Kumar <vipin.kumar@st.com> Signed-off-by: Amit Virdi <amit.virdi@st.com> Acked-by: Marek Vasut <marex@denx.de>
2012-03-19usb: replace wait_ms() with mdelay()Mike Frysinger4-29/+29
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>
2012-03-19usb: musb: fix printf warningMike Frysinger1-1/+1
musb_hcd.c: In function 'musb_submit_rh_msg': musb_hcd.c:827:2: warning: format '%d' expects type 'int', but argument 3 has type 'long unsigned int' Signed-off-by: Mike Frysinger <vapier@gentoo.org>
2012-03-03USB: move keyboard polling into kbd driveramartin@nvidia.com4-70/+0
This moves keyboard polling logic from USB HCD drivers into USB keyboard driver. Remove usb_event_poll() as keyboard polling was the only user of this API. With this patch USB keyboard works with EHCI controllers again. Tested on a tegra2 seaboard. Signed-off-by: Allen Martin <amartin@nvidia.com>
2012-03-03eth: remove usb-ethernet devices before re-enumerating themVincent Palatin1-2/+5
Fix the crash when running several times usb_init() with a USB ethernet device plugged. Signed-off-by: Vincent Palatin <vpalatin@chromium.org> Tested-by: Wolfgang Grandegger <wg@denx.de>
2012-02-14usb_ether: fix typoPeter Meerwald1-1/+1
Signed-off-by: Peter Meerwald <p.meerwald@bct-electronic.com> Acked-by: Mike Frysinger <vapier@gentoo.org>
2012-02-12ehci-omap: Clean up added ehci-omap.cGovindraj.R1-55/+154
Clean up added ehci-omap.c and make it generic for re-use across omap-soc having same ehci ip block. Also pass the modes to be configured from board file and configure the ports accordingly. All usb layers are not cache aligned, till then keep cache off for usb ops as ehci will use internally dma for all usb ops. * Add a generic common header ehci-omap.h having common ip block data and reg shifts. * Rename and modify ehci-omap3 to ehci.h retain only conflicting sysc reg shifts remove others and move to common header file. * pass the board data for beagle/panda accordinly to use ehci ports. Acked-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
2012-02-12ehci-omap: driver for EHCI host on OMAP3Ilya Yanok2-0/+157
Taken from Beagle code. Tested on mcx board (AM3517-based). Signed-off-by: Ilya Yanok <yanok@emcraft.com> Tested-by: Stefano Babic <sbabic@denx.de>
2012-02-12usb: ulpi: Add omap-ulpi-view port supportGovindraj.R2-0/+106
Based on discussion from this thread [1]. Adding omap-view port that helps us in using the generic ulpi framework for any ulpi phy ops using the INSNREG05_ULPI viewport reg available on omap platform. Currently ehci ports are available on omap3/4 platforms so enable the same for beagle and panda, patch is tested on the same boards. Thanks to Igor Grinberg <grinberg@compulab.co.il> for reviewing the omap-ehci patches and suggesting this approach. [1]: http://www.mail-archive.com/u-boot@lists.denx.de/msg76076.html Tested-by: Stefano Babic <sbabic@denx.de> Acked-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
2012-02-12usb: ulpi: Extend the existing ulpi framework.Govindraj.R2-41/+45
Extend the existing ulpi viewport framework to pass the port number information for any ulpi ops. Fix the usage of ulpi api's accordingly. Tested-by: Stefano Babic <sbabic@denx.de> Acked-by: Igor Grinberg <grinberg@compulab.co.il> Signed-off-by: Govindraj.R <govindraj.raja@ti.com>
2012-02-12orion5x: add USB host ehci-marvell supportAlbert ARIBAUD1-0/+5
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
2012-02-12Remove kirkwood-specifics from marvell EHCI driverAlbert ARIBAUD1-14/+17
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net>
2012-02-12Rename ehci-kirkwood as ehci-marvellAlbert ARIBAUD2-1/+1
Signed-off-by: Albert ARIBAUD <albert.u.boot@aribaud.net> Signed-off-by: Prafulla Wadaskar <prafulla@marvell.com>
2011-12-20usb: s3c_udc_otg: fix GCC 4.6 build warningsAnatolij Gustschin2-104/+114
Fix: In file included from s3c_udc_otg.c:216:0: s3c_udc_otg_xfer_dma.c: In function 'complete_tx': s3c_udc_otg_xfer_dma.c:280:33: warning: variable 'is_short' set but not used s3c_udc_otg_xfer_dma.c:280:6: warning: variable 'ep_tsr' set but not used s3c_udc_otg_xfer_dma.c: In function 's3c_udc_irq': s3c_udc_otg_xfer_dma.c:469:16: warning: variable 'flags' set but not used s3c_udc_otg_xfer_dma.c:468:18: warning: variable 'gintmsk' set but not used s3c_udc_otg_xfer_dma.c: In function 's3c_queue': s3c_udc_otg_xfer_dma.c:582:14: warning: variable 'gintsts' set but not used s3c_udc_otg_xfer_dma.c:581:16: warning: variable 'flags' set but not used s3c_udc_otg_xfer_dma.c: In function 's3c_ep0_read': s3c_udc_otg_xfer_dma.c:778:6: warning: variable 'ret' set but not used s3c_udc_otg_xfer_dma.c: In function 's3c_udc_set_halt': s3c_udc_otg_xfer_dma.c:1020:16: warning: variable 'flags' set but not used s3c_udc_otg_xfer_dma.c: In function 's3c_ep0_setup': s3c_udc_otg_xfer_dma.c:1258:13: warning: initialization from incompatible pointer type [enabled by default] s3c_udc_otg_xfer_dma.c:1239:16: warning: variable 'is_in' set but not used s3c_udc_otg_xfer_dma.c:1239:9: warning: variable 'bytes' set but not used s3c_udc_otg.c: In function 'usb_gadget_register_driver': s3c_udc_otg.c:292:16: warning: variable 'flags' set but not used s3c_udc_otg.c: In function 'usb_gadget_unregister_driver': s3c_udc_otg.c:338:16: warning: variable 'flags' set but not used s3c_udc_otg.c: In function 's3c_ep_enable': s3c_udc_otg.c:582:16: warning: variable 'flags' set but not used s3c_udc_otg.c: In function 's3c_ep_disable': s3c_udc_otg.c:646:16: warning: variable 'flags' set but not used s3c_udc_otg.c: In function 's3c_dequeue': s3c_udc_otg.c:704:16: warning: variable 'flags' set but not used Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Lukasz Majewski <l.majewski@samsung.com> Cc: Remy Bohmer <linux@bohmer.net>
2011-12-19Coding Style cleanupWolfgang Denk1-2/+0
Fix trailing white space, indentation by spaces instead of TABs, excessive blank lines, trailing blank lines. Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-12-19drivers/usb/gadget/pxa27x_udc.c: Coding Style cleanupWolfgang Denk1-3/+2
Commit bdbcdc89 "pxa: convert pxa27x_udc to use read and write functions" added a number of C++ comments. Fix these. Signed-off-by: Wolfgang Denk <wd@denx.de>
2011-12-16USB: Use (get|put)_unaligned for accessing wMaxPacketSizeTom Rini2-7/+11
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 <mk7.kang@samsung.com> Cc: Remy Bohmer <linux@bohmer.net> OpenRISC: Tested-by: Stefan Kristiansson <stefan.kristiansson@saunalahti.fi> Beagleboard xM, Pandaboard run-tested, s5p_goni build-tested. Signed-off-by: Tom Rini <trini@ti.com>
2011-12-16USB: ULPI: increase error case verbosityIgor Grinberg1-6/+6
Add the argument value to the error message. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Acked-by: Simon Glass <sjg@chromium.org>
2011-12-16USB: ULPI: clean a mixup of return typesIgor Grinberg2-6/+6
Clean a mixup between u32 and int as a return type for functions returning error values. Use int as it is native (and widely used) return type. Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Acked-by: Simon Glass <sjg@chromium.org>
2011-12-16USB: ULPI: switch argument type from u8 to unsignedIgor Grinberg1-5/+5
There is no benefit in using u8, so switch to unsigned to reduce the binary image size (by 20 bytes). Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Acked-by: Simon Glass <sjg@chromium.org>
2011-12-11USB: Add generic ULPI layer and a viewportJana Rapava3-0/+389
Add partial ULPI specification implementation that should be enough to interface the ULPI PHYs in the boot loader context. Add a viewport implementation for Chipidea/ARC based controllers. Signed-off-by: Jana Rapava <fermata7@gmail.com> Signed-off-by: Igor Grinberg <grinberg@compulab.co.il> Cc: Remy Bohmer <linux@bohmer.net> Cc: Stefano Babic <sbabic@denx.de> Cc: Wolfgang Grandegger <wg@denx.de> Cc: Simon Glass <sjg@chromium.org>
2011-12-11USB: EHCI: Allow EHCI post-powerup configuration in board filesMarek Vasut1-2/+10
This patch allows USB to work on some hosts, which need additional frobing after the host was powered up via regular USB powerup sequence. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Remy Bohmer <linux@bohmer.net> Cc: Wolfgang Grandegger <wg@denx.de> Cc: Jason Liu <r64343@freescale.com>
2011-12-11USB: MX5: Add MX5 usb post-init callbackMarek Vasut1-2/+12
This is useful for USB Transceivers init etc. Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Remy Bohmer <linux@bohmer.net> Cc: Wolfgang Grandegger <wg@denx.de> Cc: Jason Liu <r64343@freescale.com>
2011-12-11USB: MX5: Abstract out mx51 USB pixmux configurationMarek Vasut1-0/+71
Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Stefano Babic <sbabic@denx.de> Cc: Remy Bohmer <linux@bohmer.net> Cc: Wolfgang Grandegger <wg@denx.de> Cc: Jason Liu <r64343@freescale.com>
2011-12-11USB: MX5: add generic USB EHCI support for mx51 and mx53Wolfgang Grandegger2-0/+175
It's derived from ehci-mxc and uses the header files of the ehci-fsl interface. The callback board_ehci_hcd_init() has been introduced to allow for board-specific setup when USB is started. Signed-off-by: Wolfgang Grandegger <wg@denx.de> CC: Stefano Babic <sbabic@denx.de> CC: Remy Bohmer <linux@bohmer.net>
2011-12-11usb:gadget:s5p USB Device Controller (UDC) implementationLukasz Majewski4-0/+2611
This commit provides UDC driver support for Samsung's SoC family of processors. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com> Signed-off-by: Marek Szyprowski <m.szyprowski@samsung.com> Signed-off-by: Kyungmin Park <kyungmin.park@samsung.com> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Remy Bohmer <linux@bohmer.net>
2011-12-11ehci: speed up initializationVincent Palatin1-1/+1
According to EHCI specification v1.0, the controller should stabilize the power on a port at most 20 ms after the port power bit transition. So, we put this setting in the virtual descriptor corresponding field, (bPwrOn2PwrGood = 10 => 10 x 2ms = 20ms), this saves about 500ms at each controller initialization/enumeration. Signed-off-by: Vincent Palatin <vpalatin@chromium.org>
2011-12-11pxa: convert pxa27x_udc to use read and write functionsStefan Herbrechtsmeier1-83/+100
Signed-off-by: Stefan Herbrechtsmeier <sherbrec@cit-ec.uni-bielefeld.de> CC: Marek Vasut <marek.vasut@gmail.com> CC: Remy Bohmer <linux@bohmer.net>
2011-12-11USB: Add usb_event_poll() to get keyboards working with EHCIMarek Vasut1-1/+32
Signed-off-by: Marek Vasut <marek.vasut@gmail.com> Cc: Remy Bohmer <linux@bohmer.net>
2011-12-11USB: gadaget: add Marvell controller supportLei Wen3-0/+507
Signed-off-by: Lei Wen <leiwen@marvell.com>
2011-12-11USB: Fix complaints about strict aliasing in OHCI-HCDMarek Vasut1-32/+43
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2011-12-09drivers/usb/gadget/ep0.c: Fix GCC 4.6 warningAnatolij Gustschin1-2/+0
Fix: ep0.c: In function 'ep0_get_descriptor': ep0.c:187:8: warning: variable 'cp' set but not used [-Wunused-but-set-variable] Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Remy Bohmer <linux@bohmer.net> Acked-by: Remy Bohmer <linux@bohmer.net> Acked-by: Marek Vasut <marek.vasut@gmail.com>
2011-12-09drivers/usb/gadget/core.c: Fix GCC 4.6 warningAnatolij Gustschin1-2/+2
Fix: core.c: In function 'usbd_device_event_irq': core.c:596:21: warning: variable 'state' set but not used [-Wunused-but-set-variable] Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Remy Bohmer <linux@bohmer.net> Acked-by: Remy Bohmer <linux@bohmer.net> Acked-by: Marek Vasut <marek.vasut@gmail.com>
2011-12-09drivers/usb/musb/musb_udc.c: Fix GCC 4.6 warningAnatolij Gustschin1-5/+3
Fix: musb_udc.c: In function 'musb_peri_softconnect': musb_udc.c:166:14: warning: variable 'intrtx' set but not used [-Wunused-but-set-variable] musb_udc.c:166:6: warning: variable 'intrrx' set but not used [-Wunused-but-set-variable] musb_udc.c:165:5: warning: variable 'intrusb' set but not used [-Wunused-but-set-variable] Signed-off-by: Anatolij Gustschin <agust@denx.de> Cc: Remy Bohmer <linux@bohmer.net> Acked-by: Remy Bohmer <linux@bohmer.net> Acked-by: Marek Vasut <marek.vasut@gmail.com>
2011-12-09drivers/usb/host/ehci-mxc.c: Fix GCC 4.6 warningAnatolij Gustschin1-2/+1
Fix: ehci-mxc.c: In function 'ehci_hcd_init': ehci-mxc.c:113:6: warning: variable 'tmp' set but not used [-Wunused-but-set-variable] Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-12-06PXA: Rename CONFIG_PXA2[57]X to CONFIG_CPU_PXA2[57]XMarek Vasut1-1/+1
Signed-off-by: Marek Vasut <marek.vasut@gmail.com>
2011-12-02drivers/usb/host/sl811-hcd.c: Fix GCC 4.6 build warningWolfgang Denk1-7/+5
Fix: sl811-hcd.c: In function 'sl811_rh_submit_urb': sl811-hcd.c:556:8: warning: variable 'wIndex' set but not used [-Wunused-but-set-variable] Signed-off-by: Wolfgang Denk <wd@denx.de> Cc: Remy Bohmer <linux@bohmer.net>
2011-11-23Merge branch 'hs@denx.de' of git://git.denx.de/u-boot-stagingWolfgang Denk1-2/+1
* 'hs@denx.de' of git://git.denx.de/u-boot-staging: drivers/net/dnet.c: Fix GCC 4.6 warnings board/xaeniax/flash.c: Fix GCC 4.6 warnings net/bootp.c: Fix GCC 4.6 warning common/cmd_bootm.c: Fix GCC 4.6 warnings board/mx1ads/mx1ads.c: Fix GCC 4.6 warning board/mx1ads/syncflash.c: Fix GCC 4.6 warnings board/lubbock/flash.c: Fix GCC 4.6 warnings drivers/net/cs8900.c: Fix GCC 4.6 warning arch/arm/cpu/arm926ejs/omap/cpuinfo.c: Fix GCC 4.6 warnings drivers/net/lan91c96.c: Fix GCC 4.6 warning board/ronetix/pm9263/pm9263.c: Fix GCC 4.6 warning drivers/mtd/onenand/samsung.c: Fix GCC 4.6 warning drivers/usb/musb/musb_hcd.c: Fix GCC 4.6 warning
2011-11-23drivers/usb/musb/musb_hcd.c: Fix GCC 4.6 warningAnatolij Gustschin1-2/+1
Fix: musb_hcd.c: In function 'submit_control_msg': musb_hcd.c:851:6: warning: variable 'csr' set but not used [-Wunused-but-set-variable] Signed-off-by: Anatolij Gustschin <agust@denx.de>
2011-11-22smsc95xx: Debug message cleanupWolfgang Grandegger1-7/+3
Cc: Simon Glass <sjg@chromium.org> Cc: Mike Frysinger <vapier@gentoo.org> Signed-off-by: Wolfgang Grandegger <wg@denx.de> Acked-by: Mike Frysinger <vapier@gentoo.org> Acked-by: Simon Glass <sjg@chromium.org>