summaryrefslogtreecommitdiff
path: root/drivers/usb/host/r8a66597-hcd.c
AgeCommit message (Collapse)AuthorFilesLines
2020-12-14dm: treewide: Rename ofdata_to_platdata() to of_to_plat()Simon Glass1-2/+2
This name is far too long. Rename it to remove the 'data' bits. This makes it consistent with the platdata->plat rename. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-12-13dm: treewide: Rename auto_alloc_size members to be shorterSimon Glass1-1/+1
This construct is quite long-winded. In earlier days it made some sense since auto-allocation was a strange concept. But with driver model now used pretty universally, we can shorten this to 'auto'. This reduces verbosity and makes it easier to read. Coincidentally it also ensures that every declaration is on one line, thus making dtoc's job easier. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop linux/delay.h from common headerSimon Glass1-0/+1
Move this uncommon header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-05-19common: Drop log.h from common headerSimon Glass1-0/+1
Move this header out of the common header. Signed-off-by: Simon Glass <sjg@chromium.org>
2020-02-06dm: core: Create a new header file for 'compat' featuresSimon Glass1-0/+1
At present dm/device.h includes the linux-compatible features. This requires including linux/compat.h which in turn includes a lot of headers. One of these is malloc.h which we thus end up including in every file in U-Boot. Apart from the inefficiency of this, it is problematic for sandbox which needs to use the system malloc() in some files. Move the compatibility features into a separate header file. Signed-off-by: Simon Glass <sjg@chromium.org>
2019-08-22usb: r8a66597: Add optional DM VBUS regulator supportMarek Vasut1-0/+29
Add DM regulator support for toggling VBUS, this is useful on boards which control the VBUS e.g. through GPIO. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Chris Brandt <chris.brandt@renesas.com>
2019-08-22usb: r8a66597: Checkpatch cleanupMarek Vasut1-31/+32
Fix remaining checkpatch complaints in the driver. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Chris Brandt <chris.brandt@renesas.com>
2019-08-22usb: r8a66597: Convert to USB DMMarek Vasut1-70/+125
Convert the R8A66597 USB driver to DM and add support for DT probing. Drop support for legacy non-DM and non-DT probing, since there are no platform using that. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Chris Brandt <chris.brandt@renesas.com>
2019-08-22usb: r8a66597: Replace R8A66597_BASE0Marek Vasut1-3/+3
Replace R8A66597_BASE0 with proper SYSCFG0 accesses, no functional change. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Chris Brandt <chris.brandt@renesas.com>
2019-08-22usb: r8a66597: Remove BE supportMarek Vasut1-3/+3
While the USB controller can work both in LE and BE modes, there is no user for the BE mode, so drop it. If there ever is a user for it, it can be easily re-added back. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Chris Brandt <chris.brandt@renesas.com>
2019-08-22usb: r8a66597: Make CONFIG_RZA_USB defaultMarek Vasut1-35/+0
No other platforms use this r8a66597 controller but RZ/A1, make RZ/A1 support the default and drop all the other SoC support to remove ifdeffery. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Chris Brandt <chris.brandt@renesas.com>
2019-08-22usb: r8a66597: Remove CONFIG_SUPERH_ON_CHIP_R8A66597Marek Vasut1-14/+0
Remove CONFIG_SUPERH_ON_CHIP_R8A66597 macro, which is unused. Signed-off-by: Marek Vasut <marek.vasut+renesas@gmail.com> Cc: Chris Brandt <chris.brandt@renesas.com>
2018-05-07SPDX: Convert all of our single license tags to Linux Kernel styleTom Rini1-2/+1
When U-Boot started using SPDX tags we were among the early adopters and there weren't a lot of other examples to borrow from. So we picked the area of the file that usually had a full license text and replaced it with an appropriate SPDX-License-Identifier: entry. Since then, the Linux Kernel has adopted SPDX tags and they place it as the very first line in a file (except where shebangs are used, then it's second line) and with slightly different comment styles than us. In part due to community overlap, in part due to better tag visibility and in part for other minor reasons, switch over to that style. This commit changes all instances where we have a single declared license in the tag as both the before and after are identical in tag contents. There's also a few places where I found we did not have a tag and have introduced one. Signed-off-by: Tom Rini <trini@konsulko.com>
2018-01-28usb: host: Drop unused hcd_name from r8a66597-hcd.cTom Rini1-1/+0
The variable hcd_name is unsued, drop. Cc: Marek Vasut <marex@denx.de> Cc: Chris Brandt <chris.brandt@renesas.com> Signed-off-by: Tom Rini <trini@konsulko.com>
2017-12-09usb: r8a66597: convert wait loop to readw_poll_timeoutChris Brandt1-8/+5
It is better to use an existing wait loop implementation. Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
2017-11-28usb: r8a66597: Add support for RZ/A seriesChris Brandt1-0/+47
While the USB HW in the RZ/A is basically the same, there are some differences from the original versions that were in the SH SoCs. Signed-off-by: Chris Brandt <chris.brandt@renesas.com>
2015-11-20Move console definitions into a new console.h fileSimon Glass1-0/+1
The console includes a global variable and several functions that are only used by a small subset of U-Boot files. Before adding more functions, move the definitions into their own header file. Signed-off-by: Simon Glass <sjg@chromium.org>
2015-07-22usb: Update some EHCI driver licenses to use SPDXSimon Glass1-13/+1
A few drivers still write out the license in full. Fix these. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de>
2014-11-20include: move various macros to include/linux/kernel.hMasahiro Yamada1-3/+0
U-Boot has imported various utility macros from Linux scattering them to various places without consistency. In include/common.h are min, max, min3, max3, ARRAY_SIZE, ALIGN, container_of, DIV_ROUND_UP, etc. In include/linux/compat.h are min_t, max_t, round_up, round_down, etc. We also have duplicated defines of min_t in some *.c files. Moreover, we are suffering from too cluttered include/common.h. This commit moves various macros that originate in include/linux/kernel.h of Linux to their original position. Note: This commit simply moves the macros; the macros roundup, min, max, min2, max3, ARRAY_SIZE are different from those of Linux at this point. Signed-off-by: Masahiro Yamada <yamada.m@jp.panasonic.com>
2014-06-26usb: r8a66597: Fix initilization size of r8a66597 info structureYasuhisa Umano1-1/+1
Initialization of r8a66597 info structure is not enough. Because initilization was used size of pointer. This fixes that use size of r8a6659 info structure. Signed-off-by: Yasuhisa Umano <yasuhisa.umano.zc@renesas.com>
2014-06-26usb: r8a66597: Fix initialization hub that using R8A66597_MAX_ROOT_HUByasuhisa umano1-2/+2
This driver is processed as two USB hub despite one. The number of root hub is defined in R8A66597_MAX_ROOT_HUB. This fixes that register is accessed by using the definition of R8A66597_MAX_ROOT_HUB. Signed-off-by: Yasuhisa Umano <yasuhisa.umano.zc@renesas.com>
2014-03-10usb: create common header virtual root hub descriptorsStephen Warren1-103/+1
Many USB host controller drivers contain almost identical copies of the same virtual root hub descriptors. Put these into a common file to avoid duplication. Note that there were some very minor differences between the descriptors in the various files, such as: - USB 1.0 vs. USB 1.1 - Manufacturer/Device ID - Max packet size - String content I assume these aren't relevant. Cc: Thomas Lange <thomas@corelatus.se> Cc: Shinya Kuribayashi <skuribay@pobox.com> Cc: Gary Jennejohn <garyj@denx.de> Cc: Wolfgang Denk <wd@denx.de> Cc: Eric Millbrandt <emillbrandt@coldhaus.com> Cc: Pierre Aubert <p.aubert@staubli.com> Cc: Stefan Roese <sr@denx.de> Cc: Daniel Hellstrom <daniel@gaisler.com> Cc: Denis Peter <d.peter@mpl.ch> Cc: Rodolfo Giometti <giometti@linux.it> Cc: Zhang Wei <wei.zhang@freescale.com> Cc: Mateusz Zalega <m.zalega@samsung.com> Cc: Remy Bohmer <linux@bohmer.net> Cc: Markus Klotzbuecher <mk@denx.de> Cc: Minkyu Kang <mk7.kang@samsung.com> Cc: Gary Jennejohn <garyj@denx.de> Cc: C Nauman <cnauman@diagraph.com> Cc: David Müller <d.mueller@elsoft.ch> Cc: Yoshihiro Shimoda <shimoda.yoshihiro@renesas.com> Cc: Nobuhiro Iwamatsu <iwamatsu@nigauri.org> Cc: Thomas Abraham <t-abraham@ti.com> Cc: Tom Rini <trini@ti.com> Cc: Andrew Murray <amurray@embedded-bits.co.uk> Cc: Matej Frančeškin <matej.franceskin@comtrade.com> Cc: Cliff Cai <cliff.cai@analog.com> Cc: Bryan Wu <cooloney@gmail.com> Signed-off-by: Stephen Warren <swarren@wwwdotorg.org>
2013-10-21usb: add enum usb_init_type parameter to usb_lowlevel_initTroy Kisky1-1/+1
This parameter will later be used to verify OTG ports. Signed-off-by: Troy Kisky <troy.kisky@boundarydevices.com>
2012-11-20usb: r8a6659: Fix build by missing of parenthesisNobuhiro Iwamatsu1-1/+1
By commit c7e3b2b5, this was chanded to support multiple controllers. But this has missing of parenthesis. This commit fix it. ----- r8a66597-hcd.c: In function ‘usb_lowlevel_init’: r8a66597-hcd.c:911:52: error: expected declaration specifiers before ‘)’ token r8a66597-hcd.c:935:1: error: expected ‘=’, ‘,’, ‘;’, ‘asm’ or‘__attribute__’ before ‘{’ token r8a66597-hcd.c:939:1: error: expected ‘{’ at end of input ----- Signed-off-by: Nobuhiro Iwamatsu <nobuhiro.iwamatsu.yj@renesas.com> CC: Lucas Stach <dev@lynxeye.de>
2012-11-20usb: r8a66597: Switched from variable to only macroNobuhiro Iwamatsu1-10/+5
Some variables are initialized with a value defined by macro. This was changed to use the macro directly. And the variable not to use deleted it. Signed-off-by: Nobuhiro Iwamatsu <iwamatsu@nigauri.org>
2012-10-15usb: lowlevel interface change to support multiple controllersLucas Stach1-2/+2
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>
2012-03-19usb: replace wait_ms() with mdelay()Mike Frysinger1-7/+7
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-03USB: move keyboard polling into kbd driveramartin@nvidia.com1-6/+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>
2009-04-06drivers/usb: regorganisationJean-Christophe PLAGNIOL-VILLARD1-0/+945
move to linux usb driver organisation as following drivers/usb/gadget drivers/usb/host drivers/usb/musb Signed-off-by: Jean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com> Signed-off-by: Remy Bohmer <linux@bohmer.net>