aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/musb/jz4740.c (follow)
AgeCommit message (Collapse)AuthorFilesLines
2019-04-30usb: musb: jz4740: obtain USB PHY from devicetreePaul Cercueil1-10/+7
Fall back to devm_usb_get_phy() if devicetree is not available. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-04-30usb: musb: jz4740: Let the platform probe the PHYPaul Cercueil1-2/+0
By registering a generic USB PHY from within the driver, we may shadow the USB PHY registered by the platform, which might be different. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2019-02-12usb: musb: jz4740: Add support for devicetreePaul Cercueil1-0/+10
Add support for probing the driver from devicetree. Signed-off-by: Paul Cercueil <paul@crapouillou.net> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-07USB: musb: Remove redundant license textGreg Kroah-Hartman1-9/+0
Now that the SPDX tag is in all USB files, that identifies the license in a specific and legally-defined manner. So the extra GPL text wording can be removed as it is no longer needed at all. This is done on a quest to remove the 700+ different ways that files in the kernel describe the GPL license text. And there's unneeded stuff like the address (sometimes incorrect) for the FSF which is never needed. No copyright headers or other non-license-description text was removed. Cc: Maxime Ripard <maxime.ripard@free-electrons.com> Cc: Chen-Yu Tsai <wens@csie.org> Acked-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-11-04USB: add SPDX identifiers to all remaining files in drivers/usb/Greg Kroah-Hartman1-0/+1
It's good to have SPDX identifiers in all files to make it easier to audit the kernel tree for correct licenses. Update the drivers/usb/ and include/linux/usb* files with the correct SPDX license identifier based on the license text in the file itself. The SPDX identifier is a legally binding shorthand, which can be used instead of the full boiler plate text. This work is based on a script and data from Thomas Gleixner, Philippe Ombredanne, and Kate Stewart. Cc: Thomas Gleixner <tglx@linutronix.de> Cc: Kate Stewart <kstewart@linuxfoundation.org> Cc: Philippe Ombredanne <pombredanne@nexb.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Acked-by: Johan Hovold <johan@kernel.org> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2017-01-25usb: musb: constify musb_hdrc_config structuresBhumika Goyal1-1/+1
Declare musb_hdrc_config structures as const as they are only stored in the config field of a musb_hdrc_platform_data structure. This field is of type const, so musb_hdrc_config structures having this property can be made const too. Done using Coccinelle: @r disable optional_qualifier@ identifier x; position p; @@ static struct musb_hdrc_config x@p={...}; @ok@ struct musb_hdrc_platform_data pdata; identifier r.x; position p; @@ pdata.config=&x@p; @bad@ position p != {r.p,ok.p}; identifier r.x; @@ x@p @depends on !bad disable optional_qualifier@ identifier r.x; @@ +const struct musb_hdrc_config x; File size before: text data bss dec hex filename 1212 338 0 1550 60e drivers/usb/musb/jz4740.o File size after: text data bss dec hex filename 1268 290 0 1558 616 drivers/usb/musb/jz4740.o File size before: text data bss dec hex filename 6151 333 16 6500 1964 drivers/usb/musb/sunxi.o File size after: text data bss dec hex filename 6215 269 16 6500 1964 drivers/usb/musb/sunxi.o File size before: text data bss dec hex filename 3668 864 0 4532 11b4 drivers/usb/musb/ux500.o File size after: text data bss dec hex filename 3724 808 0 4532 11b4 drivers/usb/musb/ux500.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2016-04-26usb: musb: jz4740: fix error check of usb_get_phy()Vladimir Zapolskiy1-2/+2
The usb_get_phy() function returns either a valid pointer to phy or ERR_PTR() error, check for NULL always fails and may lead to oops on error path, fix this issue. Signed-off-by: Vladimir Zapolskiy <vz@mleia.com> Signed-off-by: Bin Liu <b-liu@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
2015-05-07usb: musb: Set up function pointers for DMATony Lindgren1-0/+4
Set up function pointers for DMA so get closer to being able to build in all the DMA engines. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2015-05-07usb: musb: Fix up DMA related macrosTony Lindgren1-1/+1
Pass struct musb to tusb_dma_omap() and is_cppi_enabled(), and add macros for the other DMA controllers. Populate the platform specific quirks with the DMA type and use it during runtime. Note that platform glue layers with no custom DMA code are tagged with MUSB_DMA_INVENTRA which may have a chance of working. Looks like the defconfigs for these use PIO_ONLY, so this should not break existing configs. Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-25usb: musb: Pass fifo_mode in platform dataTony Lindgren1-0/+1
This allows setting the correct fifo_mode when multiple MUSB glue layers are built-in. Cc: Fabio Baltieri <fabio.baltieri@linaro.org> Cc: Lee Jones <lee.jones@linaro.org> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Apelete Seketeli <apelete@seketeli.net> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-11-25usb: musb: Change end point selection to use new IO accessTony Lindgren1-0/+1
This allows the endpoints to work when multiple MUSB glue layers are built in. Cc: Fabio Baltieri <fabio.baltieri@linaro.org> Cc: Lee Jones <lee.jones@linaro.org> Cc: Lars-Peter Clausen <lars@metafoo.de> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Apelete Seketeli <apelete@seketeli.net> Signed-off-by: Tony Lindgren <tony@atomide.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
2014-07-10usb: musb: register nop transceiver driver for jz4740Apelete Seketeli1-0/+3
Following the name change of the NOP transceiver driver in commit 4525bee (usb: phy: rename usb_nop_xceiv to usb_phy_generic), the transceiver driver was no longer operable under its old name. Register the transceiver driver before calling usb_get_phy() to make sure we are noticed by an error message if it is not available. Signed-off-by: Apelete Seketeli <apelete@seketeli.net> Signed-off-by: Felipe Balbi <balbi@ti.com>
2013-12-20usb: musb: add support for JZ4740 usb device controllerApelete Seketeli1-0/+201
Add support for Ingenic JZ4740 USB Device Controller through a specific musb glue layer. JZ4740 UDC not being OTG compatible and missing some hardware registers, this musb glue layer is written from scratch to be used in gadget mode only and take silicon design specifics into account. Signed-off-by: Apelete Seketeli <apelete@seketeli.net> Signed-off-by: Lars-Peter Clausen <lars@metafoo.de> Signed-off-by: Felipe Balbi <balbi@ti.com>