summaryrefslogtreecommitdiffstats
path: root/drivers/usb
Commit message (Collapse)AuthorAgeFilesLines
...
* | usb: dwc2: Use shared wait_for_bitMateusz Kulikowski2016-01-251-28/+13
| | | | | | | | | | | | Use existing library function to poll bit(s). Signed-off-by: Mateusz Kulikowski <mateusz.kulikowski@gmail.com>
* | dm: usb: Add a compatible string for PCI EHCI controllerSimon Glass2016-01-241-0/+6
|/ | | | | | | | | Add a compatible string to allow this to be specified in the device tree if needed. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Marek Vasut <marex@denx.de> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* Add more SPDX-License-Identifier tagsTom Rini2016-01-1922-383/+24
| | | | | | | | | In a number of places we had wordings of the GPL (or LGPL in a few cases) license text that were split in such a way that it wasn't caught previously. Convert all of these to the correct SPDX-License-Identifier tag. Signed-off-by: Tom Rini <trini@konsulko.com>
* usb: host: ehci-vf: Implement board_usb_phy_mode weak functionSanchayan Maity2016-01-161-0/+10
| | | | | | | | | | Add board_usb_phy_mode weak function on similar lines to ehci-mx6. However since Vybrid USB does not have a true OTG, make this weak functon just return 0. The function is supposed to be implemented by the individual boards using a GPIO for providing the OTG pin functionality. Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
* usb: host: ehci-vf: Remove hardcoded USB host client configurationSanchayan Maity2016-01-161-5/+0
| | | | | | | | The current ehci-vf USB driver for Vybrid hardcodes the USB host and client functionality. Remove this. Reported-by: Santhosh Kumar Janardhanam <santhosh.kj@hcl.com> Signed-off-by: Sanchayan Maity <maitysanchayan@gmail.com>
* usb:ci_udc: Remove ULPI setting for i.MX OTG controllerYe.Li2016-01-161-11/+3
| | | | | | | | | All the i.MX6, i.MX23 and i.MX28 OTG controllers only support UTMI interface. Set to ULPI is not correct, even the controller will reject this setting in PORTSC register. Signed-off-by: Ye.Li <B37916@freescale.com> Signed-off-by: Peng Fan <peng.fan@nxp.com>
* Fix GCC format-security errors and convert sprintfs.Ben Whitten2016-01-141-3/+3
| | | | | | | | | | | With format-security errors turned on, GCC picks up the use of sprintf with a format parameter not being a string literal. Simple uses of sprintf are also converted to use strcpy. Signed-off-by: Ben Whitten <ben.whitten@gmail.com> Acked-by: Wolfgang Denk <wd@denx.de> Reviewed-by: Tom Rini <trini@konsulko.com>
* ums: support multiple LUNs at onceStephen Warren2016-01-132-13/+16
| | | | | | | | | | | | | | | Extend the ums command to accept a list of block devices. Each of these will be exported as a separate LUN. An example use-case would be: ums 0 mmc 0,0.1,0.2 ... which would export LUNs for eMMC 0's user data, boot0, and boot1 HW partitions. This is useful since it allows the host access to everything on the eMMC without having to somehow stop the ums command from executing and restart it with different parameters. Signed-off-by: Stephen Warren <swarren@nvidia.com> Reviewed-by: Tom Rini <trini@konsulko.com>
* dm: net: usb: Convert mcs7830 driver to support driver modelSimon Glass2016-01-121-0/+105
| | | | | | | Adjust this driver to support driver model for Ethernet. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* dm: net: usb: Refactor mcs7830 driver ready for DM conversionSimon Glass2016-01-121-121/+144
| | | | | | | | | Remove stamp data and create common functions for the main Ethernet operations. This will make it easier to convert this driver to support driver model. Signed-off-by: Simon Glass <sjg@chromium.org> Acked-by: Joe Hershberger <joe.hershberger@ni.com>
* dm: usb: Convert echi-pci to use new DM PCI APISimon Glass2016-01-121-12/+39
| | | | | | | | Convert this driver to use the new driver model PCI API. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com> Acked-by: Marek Vasut <marex@denx.de>
* dm: pci: Add a dm_ prefix to pci_get_bdf()Simon Glass2016-01-121-1/+1
| | | | | | | | | | | | Most driver model PCI functions have a dm_ prefix. At some point, when the old code is converted to driver model and the old functions are removed, we will drop that prefix. For consistency, we should use the dm_ prefix for all driver model functions. Update pci_get_bdf() accordingly. Signed-off-by: Simon Glass <sjg@chromium.org> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
* usb: musb: Fix hub port setting for SPLIT transactionsStefan Brüns2015-12-311-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | The ifdef'ed Linux kernel code uses the 1 based port number, whereas U-Boot puts a 0 based port number into the register. The reason the 0 based port number apparently works can probably be taken from the USB 2.0 spec: 8.4.2.2 Start-Split Transaction Token ... The host must correctly set the port field for single and multiple TT hub implementations. A single TT hub implementation *may ignore* the port field. Actually, as far as I understand, a multi TT hub defaults to single TT (bAlternateSetting: 0) until switched via SetInterface, so even "port 42" would work. The change was verified by hardcoding the port number to a wrong value, SPLIT transactions kept working (although using a DWC2 instead of MUSB). Tested hubs are the RPi onboard SMC9514 and an external "05e3:0608 Genesys Logic, Inc. USB-2.0 4-Port HUB". The former is a multi TT hub, the latter single TT only. Addendum: Tested on sunxi/MUSB by Hans de Goede Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Hans de Goede <hdegoede@redhat.com>
* usb: Move determination of TT hub address/port into separate functionStefan Brüns2015-12-313-101/+12
| | | | | | | | | | | | | Start split and complete split tokens need the hub address and the downstream port of the first HS hub (device view). The core of the function was duplicated in both host/ehci_hcd and musb-new/usb-compat.h. Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Reviewed-by: Marek Vasut <marex@denx.de> Reviewed-by: Hans de Goede <hdegoede@redhat.com> Tested-by: Hans de Goede <hdegoede@redhat.com>
* usb: dwc2: avoid out of bounds accessStefan Brüns2015-12-311-3/+4
| | | | | | | | | | flush_dcache_range may access data after priv->aligned_buffer end if len > DWC2_DATA_BUF_SIZE. memcpy may access data after buffer end if done > 0 Signed-off-by: Stefan Brüns <stefan.bruens@rwth-aachen.de> Acked-by: Marek Vasut <marex@denx.de> Acked-by: Stephen Warren <swarren@wwwdotorg.org>
* usb: add support of generic OHCI devicesAlexey Brodkin2015-12-173-0/+54
| | | | | | | | | | | This driver is meant to be used with any OHCI-compatible host controller in case if there's no need for platform-specific glue such as setup of controller or PHY's power mode via GPIOs etc. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Simon Glass <sjg@chromium.org> Cc: Marek Vasut <marex@denx.de>
* usb: host: ehci: samsung: Move hcor initialization after usb phy setupLukasz Majewski2015-12-171-2/+2
| | | | | | | | | | | | | With the old order of initialization the hcor pointer has been setup to the same address as Exynos EHCI base address (0x12110000 instead of 0x12110010). Such behaviour was caused by reading value of 0 instead of 0x10 from EHCI HCCPBASE register without doing proper clock initialization before. To fix this problem hcor initialization has been moved after USB PHY setup. Now ehci_readl(&ctx->hcd->cr_capbase) returns correct value. Signed-off-by: Lukasz Majewski <l.majewski@samsung.com>
* usb: s3c-otg: Rename usb/s3c_udc.h to usb/dwc2_udc.hMarek Vasut2015-12-173-3/+3
| | | | | | | | | | | The driver is actually for the Designware DWC2 controller. This patch renames the global s3c_udc.h header to dwc2_udc.h. The rename is done automatically: $ sed -i "s/s3c_udc\.h/dwc2_udc.h/g" \ `git grep "s3c_udc\.h" | cut -d : -f 1` Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Rename s3c_udc_probe() functionMarek Vasut2015-12-171-1/+1
| | | | | | | | | | | | The driver is actually for the Designware DWC2 controller. This patch is the second and final to rename global symbol, the s3c_udc_probe() function. The rename is done automatically: $ sed -i "s/s3c_udc_probe/dwc2_udc_probe/g" \ `git grep s3c_udc_probe | cut -d : -f 1` Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Rename struct s3c_plat_otg_dataMarek Vasut2015-12-172-2/+2
| | | | | | | | | | | | The driver is actually for the Designware DWC2 controller. This patch is the first to rename global symbol, the struct s3c_plat_otg_data. The rename is done automatically: $ sed -i "s/s3c_plat_otg_data/dwc2_plat_otg_data/g" \ `git grep s3c_plat_otg_data | cut -d : -f 1` Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Rename USB_GADGET_S3C_UDC_OTG* to USB_GADGET_DWC2_OTG*Marek Vasut2015-12-171-2/+2
| | | | | | | | | | | | | The s3c-otg IP block is in fact a DWC2 OTG one, so finally rename the config option to make it less misleading. No functional change, just a mechanical change done using the following script: git grep USB_GADGET_S3C_UDC_OTG | cut -d : -f 1 | sort -u | \ while read line ; do sed -i "s/USB_GADGET_S3C_UDC_OTG/USB_GADGET_DWC2_OTG/g" $line ; done Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Tweak the commentsMarek Vasut2015-12-174-4/+4
| | | | | | | The driver is actually for the Designware DWC2 controller. Tweak the comments in the driver to reflect this fact. Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Rename remaining macrosMarek Vasut2015-12-174-22/+22
| | | | | | | | The driver is actually for the Designware DWC2 controller. This patch renames the remaining S3C_* macros to match the DWC2 naming. Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Rename sources to dwc2_*cMarek Vasut2015-12-174-6/+6
| | | | | | | | The driver is actually for the Designware DWC2 controller. This patch renames the local source files to dwc2_*c and adjusts the Makefile to use the new names. Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Rename local headers to dwc2_*hMarek Vasut2015-12-175-8/+8
| | | | | | | | The driver is actually for the Designware DWC2 controller. This patch renames the local header files to dwc2_*h and adjusts the sources to use the new names. Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Change the driver name to dwc2-udcMarek Vasut2015-12-171-3/+3
| | | | | | Just change the driver name. Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Zap useless externsMarek Vasut2015-12-171-4/+2
| | | | | | | The extern statements are useless, remove them. Also remove the extern ... controller, which is completely useless. Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Rename remaining local s3c_*() functionsMarek Vasut2015-12-172-23/+23
| | | | | | | | The driver is actually for the Designware DWC2 controller. This patch renames the remaining local s3c_*() functions to reflect this. Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Rename s3c_udc_*() functionsMarek Vasut2015-12-172-47/+47
| | | | | | | | | The driver is actually for the Designware DWC2 controller. This patch renames the s3c_ep_*() functions to reflect this. The function s3c_udc_probe() is a special case and is not renamed by this patch yet. Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Rename s3c_ep_*() functionsMarek Vasut2015-12-171-11/+11
| | | | | | | The driver is actually for the Designware DWC2 controller. This patch renames the s3c_ep_*() functions to reflect this. Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Rename s3c_ep0_*() functionsMarek Vasut2015-12-172-14/+14
| | | | | | | The driver is actually for the Designware DWC2 controller. This patch renames the s3c_ep0_*() functions to reflect this. Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Staticize functions in s3c_udc_otg_xfer_dma.cMarek Vasut2015-12-171-7/+7
| | | | | | Just staticize the functions, they are not used outside of the file. Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Staticize s3c_udc_ep_set_stallMarek Vasut2015-12-172-3/+1
| | | | | | This function is local to s3c_udc_otg_xfer_dma.c , staticize it. Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Rename struct s3c_requestMarek Vasut2015-12-173-28/+28
| | | | | | | The driver is actually for the Designware DWC2 controller. This patch renames struct s3c_request to reflect this. Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Rename struct s3c_epMarek Vasut2015-12-173-46/+46
| | | | | | | The driver is actually for the Designware DWC2 controller. This patch renames struct s3c_ep to reflect this. Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Rename struct s3c_dev_*_epMarek Vasut2015-12-171-4/+4
| | | | | | | The driver is actually for the Designware DWC2 controller. This patch renames struct s3c_dev_*_ep to reflect this. Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Rename struct s3c_usbotg_phy to dwc2_usbotg_phyMarek Vasut2015-12-172-5/+5
| | | | | | | | The driver is actually for the Designware DWC2 controller. This patch renames struct s3c_usbotg_phy to struct dwc2_usbotg_phy to make things more obvious and clear. Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Split private bits from s3c_udc.hMarek Vasut2015-12-174-1/+105
| | | | | | | | | Most of the functions are local to the s3c_udc driver, remove them from the s3c_udc.h header to stop those bits from propagating all over the place. Instead, move all the private stuff into new private s3c_udc_otg_priv.h header. Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Rename struct s3c_usbotg_reg to dwc2_usbotg_regMarek Vasut2015-12-172-3/+3
| | | | | | | | The driver is actually for the Designware DWC2 controller. This patch renames struct s3c_usbotg_reg to struct dwc2_usbotg_reg to make things more obvious and clear. Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Rename struct s3c_udc to dwc2_udcMarek Vasut2015-12-174-46/+46
| | | | | | | | The driver is actually for the Designware DWC2 controller. This patch renames struct s3c_udc to struct dwc2_udc to make things more obvious and clear. Signed-off-by: Marek Vasut <marex@denx.de>
* usb: s3c-otg: Rename regs-otg.h to s3c_udc_otg_regs.hMarek Vasut2015-12-173-2/+2
| | | | | | | Rename the header file, so it's obvious which driver it's part of. No functional change. Signed-off-by: Marek Vasut <marex@denx.de>
* usb: xhci: zynqmp: Removing unused function usb_phy_resetMarek Vasut2015-12-071-17/+0
| | | | | | | This patch removes unsued function usb_phy_reset, rather common function dwc3_phy_reset is used. Signed-off-by: Marek Vasut <marex@denx.de>
* usb: xhci: fsl: Removing unused function usb_phy_resetRajesh Bhagat2015-12-071-17/+0
| | | | | | | This patch removes unsued function usb_phy_reset, rather common function dwc3_phy_reset is used. Signed-off-by: Rajesh Bhagat <rajesh.bhagat@freescale.com>
* usb: xhci: dwc3: Adding reset delay requirement as per dwc3 databookRajesh Bhagat2015-12-071-0/+2
| | | | | | | | | | | As per dwc3 databook, delay is required before taking the core out of reset. This delay is required so that the PHY are stable, and then we can take core out of reset. Reference is taken from linux dwc3 code, file: drivers/usb/dwc3/core.c. Signed-off-by: Sriram Dash <sriram.dash@freescale.com> Signed-off-by: Rajesh Bhagat <rajesh.bhagat@freescale.com>
* usb: add support for generic EHCI devicesAlexey Brodkin2015-12-073-0/+59
| | | | | | | | | | | | This driver is meant to be used with any EHCI-compatible host controller in case if there's no need for platform-specific glue such as setup of controller or PHY's power mode via GPIOs etc. Signed-off-by: Alexey Brodkin <abrodkin@synopsys.com> Cc: Stephen Warren <swarren@nvidia.com> Cc: Simon Glass <sjg@chromium.org> Cc: Marek Vasut <marex@denx.de>
* sunxi: usb: Rename the sunxi usb driver DM entryMarek Vasut2015-12-071-1/+1
| | | | | | | | | | | The DM entry should be unique, otherwise it will collide with other drivers. Fix this by assigning the driver a more unique name than usb_ehci. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Hans de Goede <hdegoede@redhat.com> Cc: Ian Campbell <ijc@hellion.org.uk> Cc: Simon Glass <sjg@chromium.org>
* usb: zynqmp: Fix build warningsMarek Vasut2015-12-071-1/+1
| | | | | | | | The driver does "return 0" in function with void type. Signed-off-by: Marek Vasut <marex@denx.de> Cc: Michal Simek <monstr@monstr.eu> Cc: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
* usb: dwc3: fix build warningsFelipe Balbi2015-12-072-2/+2
| | | | | | | | | | | | | | fix the following build warnings: drivers/usb/dwc3/core.c: In function ‘dwc3_uboot_init’: drivers/usb/dwc3/core.c:625:6: warning: ‘dev’ is used uninitialized in this function [-Wuninitialized] mem = devm_kzalloc(dev, sizeof(*dwc) + DWC3_ALIGN_MASK, GFP_KERNEL); ^ drivers/usb/dwc3/dwc3-omap.c: In function ‘dwc3_omap_uboot_init’: drivers/usb/dwc3/dwc3-omap.c:380:7: warning: ‘dev’ is used uninitialized in this function [-Wuninitialized] omap = devm_kzalloc(dev, sizeof(*omap), GFP_KERNEL); Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: host: xhci-omap: fix build breakFelipe Balbi2015-12-071-1/+1
| | | | | | | | | | Fix the following build break: drivers/usb/host/xhci-omap.c:35:5: error: ‘board_usb_init’ aliased to external symbol ‘__board_usb_init’ int board_usb_init(int index, enum usb_init_type init) ^ Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: zynqmp: Add XHCI driver supportSiva Durga Prasad Paladugu2015-12-072-0/+144
| | | | | | Added USB XHCI driver support for zynqmp. Signed-off-by: Siva Durga Prasad Paladugu <sivadur@xilinx.com>
OpenPOWER on IntegriCloud