aboutsummaryrefslogtreecommitdiff
path: root/drivers/usb/host
AgeCommit message (Collapse)AuthorFilesLines
2013-05-09usb: tilegx: fix memleak when create hcd failLibo Chen2-4/+10
When usb_create_hcd fail, we should call gxio_usb_host_destroy Signed-off-by: Libo Chen <[email protected]> Signed-off-by: Chris Metcalf <[email protected]> [extended to EHCI]
2013-05-02Merge tag 'cleanup-for-linus' of ↵Linus Torvalds1-1/+1
git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc Pull ARM SoC cleanup from Olof Johansson: "Here is a collection of cleanup patches. Among the pieces that stand out are: - The deletion of h720x platforms - Split of at91 non-dt platforms to their own Kconfig file to keep them separate - General cleanups and refactoring of i.MX and MXS platforms - Some restructuring of clock tables for OMAP - Convertion of PMC driver for Tegra to dt-only - Some renames of sunxi -> sun4i (Allwinner A10) - ... plus a bunch of other stuff that I haven't mentioned" * tag 'cleanup-for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/arm/arm-soc: (119 commits) ARM: i.MX: remove unused ARCH_* configs ARM i.MX53: remove platform ahci support ARM: sunxi: Rework the restart code irqchip: sunxi: Rename sunxi to sun4i irqchip: sunxi: Make use of the IRQCHIP_DECLARE macro clocksource: sunxi: Rename sunxi to sun4i clocksource: sunxi: make use of CLKSRC_OF clocksource: sunxi: Cleanup the timer code ARM: at91: remove trailing semicolon from macros ARM: at91/setup: fix trivial typos ARM: EXYNOS: remove "config EXYNOS_DEV_DRM" ARM: EXYNOS: change the name of USB ohci header ARM: SAMSUNG: Remove unnecessary code for dma ARM: S3C24XX: Remove unused GPIO drive strength register definitions ARM: OMAP4+: PM: Restore CPU power state to ON with clockdomain force wakeup method ARM: S3C24XX: Removed unneeded dependency on CPU_S3C2412 ARM: S3C24XX: Removed unneeded dependency on CPU_S3C2410 ARM: S3C24XX: Removed unneeded dependency on ARCH_S3C24XX for boards ARM: SAMSUNG: Fix typo "CONFIG_SAMSUNG_DEV_RTC" ARM: S5P64X0: Fix typo "CONFIG_S5P64X0_SETUP_SDHCI" ...
2013-05-01Merge branch 'for-linus' of ↵Linus Torvalds2-6/+3
git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs Pull VFS updates from Al Viro, Misc cleanups all over the place, mainly wrt /proc interfaces (switch create_proc_entry to proc_create(), get rid of the deprecated create_proc_read_entry() in favor of using proc_create_data() and seq_file etc). 7kloc removed. * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/viro/vfs: (204 commits) don't bother with deferred freeing of fdtables proc: Move non-public stuff from linux/proc_fs.h to fs/proc/internal.h proc: Make the PROC_I() and PDE() macros internal to procfs proc: Supply a function to remove a proc entry by PDE take cgroup_open() and cpuset_open() to fs/proc/base.c ppc: Clean up scanlog ppc: Clean up rtas_flash driver somewhat hostap: proc: Use remove_proc_subtree() drm: proc: Use remove_proc_subtree() drm: proc: Use minor->index to label things, not PDE->name drm: Constify drm_proc_list[] zoran: Don't print proc_dir_entry data in debug reiserfs: Don't access the proc_dir_entry in r_open(), r_start() r_show() proc: Supply an accessor for getting the data from a PDE's parent airo: Use remove_proc_subtree() rtl8192u: Don't need to save device proc dir PDE rtl8187se: Use a dir under /proc/net/r8180/ proc: Add proc_mkdir_data() proc: Move some bits from linux/proc_fs.h to linux/{of.h,signal.h,tty.h} proc: Move PDE_NET() to fs/proc/proc_net.c ...
2013-04-29Merge tag 'usb-3.10-rc1' of ↵Linus Torvalds34-1171/+1007
git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb Pull USB patches from Greg Kroah-Hartman: "Here's the big USB pull request for 3.10-rc1. Lots of USB patches here, the majority being USB gadget changes and USB-serial driver cleanups, the rest being ARM build fixes / cleanups, and individual driver updates. We also finally got some chipidea fixes, which have been delayed for a number of kernel releases, as the maintainer has now reappeared. All of these have been in linux-next for a while" * tag 'usb-3.10-rc1' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (568 commits) USB: ehci-msm: USB_MSM_OTG needs USB_PHY USB: OHCI: avoid conflicting platform drivers USB: OMAP: ISP1301 needs USB_PHY USB: lpc32xx: ISP1301 needs USB_PHY USB: ftdi_sio: enable two UART ports on ST Microconnect Lite usb: phy: tegra: don't call into tegra-ehci directly usb: phy: phy core cannot yet be a module USB: Fix initconst in ehci driver usb-storage: CY7C68300A chips do not support Cypress ATACB USB: serial: option: Added support Olivetti Olicard 145 USB: ftdi_sio: correct ST Micro Connect Lite PIDs ARM: mxs_defconfig: add CONFIG_USB_PHY ARM: imx_v6_v7_defconfig: add CONFIG_USB_PHY usb: phy: remove exported function from __init section usb: gadget: zero: put function instances on unbind usb: gadget: f_sourcesink.c: correct a copy-paste misnomer usb: gadget: cdc2: fix error return code in cdc_do_config() usb: gadget: multi: fix error return code in rndis_do_config() usb: gadget: f_obex: fix error return code in obex_bind() USB: storage: convert to use module_usb_driver() ...
2013-04-25USB: ehci-msm: USB_MSM_OTG needs USB_PHYArnd Bergmann1-0/+1
The Kconfig entry for USB_EHCI_MSM unconditionally selects USB_MSM_OTG, which is now only visible when USB_PHY is also enabled. This adds an appropriate dependency and enables USB_PHY in the msm defconfig, avoiding the Kbuild warning: warning: (USB_EHCI_MSM) selects USB_MSM_OTG which has unmet direct dependencies (USB_SUPPORT && USB_PHY && (USB || USB_GADGET) && ARCH_MSM) Signed-off-by: Arnd Bergmann <[email protected]> Cc: Felipe Balbi <[email protected]> Cc: Pavankumar Kondeti <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-25USB: OHCI: avoid conflicting platform driversArnd Bergmann1-18/+118
Like the EHCI driver, OHCI supports a large number of different platform glue drivers by directly including them, which causes problems with conflicting macro definitions in some cases. As more ARM architecture specific back-ends are required to coexist in a single build, we should split those out into separate drivers. Unfortunately, the infrastructure for that is still under development, so to give us more time, this uses a separate *_PLATFORM_DRIVER macro for each ARM specific OHCI backend, just like we already do on PowerPC and some of the other ARM platforms. In linux-3.10, only the SPEAr and CNS3xxx back-ends would actually conflict without this patch, but over time we would get more of them, so this is a way to avoid having to patch the driver every time it breaks. We should still split out all back-ends into separate loadable modules, but that work is only needed to improve code size and cleanliness after this patch, not for correctness. While we're here, this fixes the incorrectly sorted error path for the OMAP1 and OMAP3 backends to ensure we always unregister the exact set of drivers that were registered before erroring out. Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-23usb: phy: tegra: don't call into tegra-ehci directlyArnd Bergmann1-5/+5
Both phy-tegra-usb.c and ehci-tegra.c export symbols used by the other one, which does not work if one of them or both are loadable modules, resulting in an error like: drivers/built-in.o: In function `utmi_phy_clk_disable': drivers/usb/phy/phy-tegra-usb.c:302: undefined reference to `tegra_ehci_set_phcd' drivers/built-in.o: In function `utmi_phy_clk_enable': drivers/usb/phy/phy-tegra-usb.c:324: undefined reference to `tegra_ehci_set_phcd' drivers/built-in.o: In function `utmi_phy_power_on': drivers/usb/phy/phy-tegra-usb.c:447: undefined reference to `tegra_ehci_set_pts' This turns the interface into a one-way dependency by letting the tegra ehci driver pass two function pointers for callbacks that need to be called by the phy driver. Signed-off-by: Arnd Bergmann <[email protected]> Cc: Venu Byravarasu <[email protected]> Cc: Alan Stern <[email protected]> Cc: Felipe Balbi <[email protected]> Cc: Stephen Warren <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-23USB: Fix initconst in ehci driverAndi Kleen3-3/+3
Fix some of the initconst markings in the ehci driver(s). Signed-off-by: Andi Kleen <[email protected]> Cc: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-17USB: ehci-omap: Improve PHY error handlingRoger Quadros1-2/+2
As the USB PHY layer never returns NULL we don't need to check for that condition. Signed-off-by: Roger Quadros <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-17USB: ehci-omap: Don't select any PHY driverRoger Quadros1-1/+3
Don't select NOP_USB_XCEIV. Instead, board config must select USB_PHY and the appropriate PHY driver. Also add a hint in Kconfig so that users enabling this driver manually enable the right PHY drivers as well. Gets rid of the below warnings when USB_EHCI_HCD_OMAP is enabled. warning: (USB_EHCI_HCD_OMAP) selects NOP_USB_XCEIV which has unmet direct dependencies (USB_SUPPORT && USB_PHY) warning: (USB_EHCI_HCD_OMAP) selects NOP_USB_XCEIV which has unmet direct dependencies (USB_SUPPORT && USB_PHY) Signed-off-by: Roger Quadros <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-17usb: remove redundant tdi_resetShengzhou Liu1-3/+0
We remove the redundant tdi_reset in ehci_setup since there is already it in ehci_reset. It was observed that the duplicated tdi_reset was causing the PHY_CLK_VALID bit unstable. Reported-by: Michael Braun <[email protected]> Signed-off-by: Shengzhou Liu <[email protected]> Acked-by: Alan Stern <[email protected]> Cc: stable <[email protected]> # 3.6+ Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-11usb: exynos: do not include plat/usb-phy.hArnd Bergmann2-2/+0
The definitions have moved to include/linux/usb/samsung-usb-phy.h, and plat/usb-phy.h is unavailable from drivers in a multiplatform configuration. Also fix up the plat/usb-phy.h header file to use the definitions from the new header instead of providing a separate copy. Signed-off-by: Arnd Bergmann <[email protected]> Cc: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-11usb: ohci-exynos: skip phy setup for Exynos5440 based platformsThomas Abraham1-2/+9
Exynos5440 does not require any explict USB phy configuration. So skip the USB phy configuration for Exynos5440 based platforms. Signed-off-by: Thomas Abraham <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-09USB: enclose USB_XHCI_HCD related symbols within a if USB_XHCI_HCD blockFlorian Fainelli1-2/+4
This patch encloses all symbols depending on USB_XHCI_HCD within an if USB_XHCI_HCD / endif block. Acked-by: Alan Stern <[email protected]> Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-09USB: enclose all depends on USB_OHCI_HCD within an if USB_OHCI_HCD blockFlorian Fainelli1-25/+26
This patch removes the various depends on USB_OHCI_HCD from the OHCI HCD drivers and enclose them within an if USB_OHCI_HCD / endif block. The Octeon OHCI HCD driver has been moved around to remain in this block. Acked-by: Alan Stern <[email protected]> Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-09USB: enclose EHCI HCD drivers within an if USB_EHCI_HCD blockFlorian Fainelli1-39/+42
Thist patch removes the depends on USB_EHCI_HCD that the various USB EHCI HCD drivers use and encloses every driver within an if USB_EHCI_HCD / endif block. The EHCI HCD platform and Octeon drivers have been moved around to remain enclosed within this block. Acked-by: Alan Stern <[email protected]> Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-09USB: remove USB_EHCI_BIG_ENDIAN_{DESC,MMIO} depends on architecture symbolFlorian Fainelli1-9/+2
Just like the OHCI counter part we just can remove the architecture specific symbols which prevent these configuration symbols from being selected by platforms/architectures requiring it. The original implementation did not scale at all since it required each and every single architecture to be added for these configuration symbols to be selected. Now it is up to the EHCI driver and/or platform to select these configuration symbols accordingly. Acked-by: Alan Stern <[email protected]> Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-09USB: regroup all depends on USB within an if USB blockFlorian Fainelli1-19/+11
This patch removes the depends on USB from all config symbols in drivers/usb/host/Kconfig and replace that with an if USB / endif block as suggested by Alan Stern. Some source ... Kconfig lines have been shuffled around to permit a better regroupment of the Kconfig files depending on "config USB" item. No functionnal change is introduced. Acked-by: Alan Stern <[email protected]> Signed-off-by: Florian Fainelli <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-09usb: ehci-s5p: fix: Fix null pointer dereferencingVivek Gautam1-1/+1
7edb3da: (USB: EHCI: make ehci-s5p a separate driver) raised an issue with ehci-s5p's driver data. Now that 's5p_ehci_hcd' doesn't maintain pointer to 'usb_hcd' and s5p_ehci is nothing but a pointer to hcd->priv; add hcd to the driver data rather than s5p_ehci. This fixes issues with null pointer dereferencing in s5p_ehci_shutdown(), s5p_ehci_suspend(), s5p_ehci_resume(). Signed-off-by: Vivek Gautam <[email protected]> CC: Manjunath Goudar <[email protected]> CC: Arnd Bergmann <[email protected]> CC: Jingoo Han <[email protected]> Acked-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-09procfs: new helper - PDE_DATA(inode)Al Viro2-2/+2
The only part of proc_dir_entry the code outside of fs/proc really cares about is PDE(inode)->data. Provide a helper for that; static inline for now, eventually will be moved to fs/proc, along with the knowledge of struct proc_dir_entry layout. Signed-off-by: Al Viro <[email protected]>
2013-04-09isp1362-hcd: don't reimplement proc_create_data()Al Viro1-4/+1
... especially in a racy way Signed-off-by: Al Viro <[email protected]>
2013-04-09Merge tag 'cleanup-samsung-for-v3.10' of ↵Arnd Bergmann1-1/+2
git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung into next/cleanup From Kukjin Kim <[email protected]>: cleanup unused codes for samsung * tag 'cleanup-samsung-for-v3.10' of git://git.kernel.org/pub/scm/linux/kernel/git/kgene/linux-samsung: ARM: EXYNOS: remove "config EXYNOS_DEV_DRM" ARM: EXYNOS: change the name of USB ohci header ARM: SAMSUNG: Remove unnecessary code for dma ARM: S3C24XX: Remove unused GPIO drive strength register definitions ARM: S3C24XX: Removed unneeded dependency on CPU_S3C2412 ARM: S3C24XX: Removed unneeded dependency on CPU_S3C2410 ARM: S3C24XX: Removed unneeded dependency on ARCH_S3C24XX for boards ARM: SAMSUNG: Fix typo "CONFIG_SAMSUNG_DEV_RTC" ARM: S5P64X0: Fix typo "CONFIG_S5P64X0_SETUP_SDHCI" ARM: S3C64XX: remove obsolete Makefile line ARM: S3C24XX: remove unneeded "config SMDK2440_CPU2442" ARM: SAMSUNG: Remove useless Samsung GPIO related CONFIG ARM: SAMSUNG: remove "config S3C_BOOT_WATCHDOG" ARM: EXYNOS: change HAVE_SAMSUNG_KEYPAD to KEYBOARD_SAMSUNG ARM: EXYNOS: remove duplicated include from common.c ARM: EXYNOS: drop "select HAVE_SCHED_CLOCK" ARM: S3C24XX: drop "select MACH_NEO1973" ARM: S3C24XX: drop "select MACH_N35" Signed-off-by: Arnd Bergmann <[email protected]>
2013-04-08Merge tag 'for-usb-next-2012-04-08' of ↵Greg Kroah-Hartman3-15/+19
git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-next Sarah writes: xHCI misc cleanup patches for 3.10 Hi Greg, Here's three cleanup patches for 3.10. Nothing big here, just some debugging output changes, a macro rename, and a math macro change that should have no behavioral effects. Tested on the Intel Panther Point xHCI host, with USB storage and mouse, with xHCI debugging turned on. I don't have the TI host that causes the debugging output changes to trigger. Sarah Sharp
2013-04-08USB: EHCI: make ehci-msm a separate driverManjunath Goudar4-54/+44
Separate the Qualcomm QSD/MSM on-chip host controller driver from ehci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; however, note that other changes are still needed before Qualcomm QSD/MSM can be booted with a multi-platform kernel, which is not expected before 3.11. With the infrastructure added by Alan Stern in patch 3e0232039 "USB: EHCI: prepare to make ehci-hcd a library module", we can avoid this problem by turning a bus glue into a separate module, as we do here for the msm bus glue. In V5 (arnd): - add FIXME about missing usb_add_hcd() or usb_remove_hcd() calls In V3: - Detailed commit message added here describing why this patch is required. - Arranged #include's in alphabetical order. - driver.name initialized hcd_name[] = "ehci-msm" in platform_driver structure initialization instead of "msm-ehci", which was the reason why it broke in EHCI USB testing In V2: Tegra patch related changes removed from this patch. Signed-off-by: Manjunath Goudar <[email protected]> Acked-by: Alan Stern <[email protected]> Acked-by: David Brown <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-08USB: EHCI: make ehci-atmel a separate driverManjunath Goudar4-52/+51
Separate the Atmel host controller driver from ehci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; however, note that other changes are still needed before Atmel can be booted with a multi-platform kernel. This is currently planned for Linux-3.11. With the infrastructure added by Alan Stern in patch 3e0232039 "USB: EHCI: prepare to make ehci-hcd a library module", we can avoid this problem by turning a bus glue into a separate module, as we do here for the Atmel bus glue. In V4 (arnd): - reordered #include statements. - removed call to ehci_shutdown and the corresponding export In V3: - Detailed commit message added here about why this patch is required. - Replaced hcd_name string "ehci-atmel" to "atmel-ehci". - Inserted blank line in the Makefile to separate the EHCI drivers from the following non-EHCI drivers. - Exported ehci_shutdown symbol as it is needed by the Atmel driver. - Eliminated ehci_atmel_setup routine because hcd registers can be directly set in the ehci_atmel_drv_probe function. In V2: Resolved below compiler error. drivers/usb/host/ehci-atmel.c: In function 'ehci_atmel_drv_remove': drivers/usb/host/ehci-atmel.c:167: error: implicit declaration of function 'ehci_shutdown' Signed-off-by: Manjunath Goudar <[email protected]> Acked-by: Alan Stern <[email protected]> Acked-by: Nicolas Ferre <[email protected]> Cc: Andrew Victor <[email protected]> Cc: Jean-Christophe Plagniol-Villard <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-08USB: EHCI: make ehci-s5p a separate driverManjunath Goudar4-91/+85
Separate the Samsung S5P/EXYNOS host controller driver from ehci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; however, note that other changes are still needed before S5P/EXYNOS can be booted with a multi-platform kernel. We currently expect those to get merged for 3.10. With the infrastructure added by Alan Stern in patch 3e0232039 "USB: EHCI: prepare to make ehci-hcd a library module", we can avoid this problem by turning a bus glue into a separate module, as we do here for the s5p bus glue. In V4 (arnd) - revert some of the pointless changes. - fix allocation of s5p specific data structure. In V3: - Detailed commit message added here, why this patch is required. - MODULE_LICENSE is GPL v2. - Added .extra_priv_size to eliminate the separate allocation of the s5p_ehci_hcd structure and removed .reset function pointer initialization. - Arranged #include's in alphabetical order. - After using extra_priv_size initialization, struct usb_hcd *hcd is redundant and can be removed from the probe function. - Eliminated s5p_ehci_phy_enable,contents of statements moved into the s5p_ehci_probe - Eliminated s5p_ehci_phy_disable, contents of statements moved into the s5p_ehci_remove. In V2: - Tegra patch related changes removed from this patch. Signed-off-by: Manjunath Goudar <[email protected]> Acked-by: Jingoo Han <[email protected]> Acked-by: Alan Stern <[email protected]> Cc: Kukjin Kim <[email protected]> Cc: Kyungmin Park <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-08USB: EHCI: make ehci-spear a separate driverManjunath Goudar4-69/+61
Separate the SPEAr host controller driver from ehci-hcd host code so that it can be built as a separate driver module. This work is part of enabling multi-platform kernels on ARM; however, note that other changes are still needed before SPEAr can be booted with a multi-platform kernel, but they are queued in the arm-soc tree for 3.10. With the infrastructure added by Alan Stern in patch 3e0232039 "USB: EHCI: prepare to make ehci-hcd a library module", we can avoid this problem by turning a bus glue into a separate module, as we do here for the SPEAr bus glue. In V4 (arnd): - renamed all 'struct spear_ehci' pointers from 'ehci' to the less ambiguous 'sehci'. - folded trivial spear_start_ehci/spear_stop_ehci functions into callers. - brought back initialization of ehci->caps. In V3: - Detailed commit message added here about why this patch is required. - Eliminated ehci_spear_setup routine because hcd registers can be directly set in the spear_ehci_hcd_drv_probe function. - spear_overrides struct initialized. - Converted to using .extra_priv_size for allocating spear_ehci, and updated all users of that structure. - to_spear_ehci() macro modified for spear_ehci. In V2: - Replaced spear as SPEAr everywhere, leaving functions/variables/config options. Signed-off-by: Deepak Saxena <[email protected]> Signed-off-by: Manjunath Goudar <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Viresh Kumar <[email protected]> Acked-by: Alan Stern <[email protected]> Cc: Shiraz Hashim <[email protected]> Cc: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-08USB: EHCI: make ehci-orion a separate driverManjunath Goudar4-53/+53
Separate the Orion host controller driver from ehci-hcd host code into its own driver module because of following reason. With the multiplatform changes in arm-soc tree, it becomes possible to enable the mvebu platform (which uses ehci-orion) at the same time as other platforms that require a conflicting EHCI bus glue. At the moment, this results in a warning like drivers/usb/host/ehci-hcd.c:1297:0: warning: "PLATFORM_DRIVER" redefined [enabled by default] drivers/usb/host/ehci-hcd.c:1277:0: note: this is the location of the previous definition drivers/usb/host/ehci-orion.c:334:31: warning: 'ehci_orion_driver' defined but not used [-Wunused-variable] and an ehci driver that only works on one of them. With the infrastructure added by Alan Stern in patch 3e0232039 "USB: EHCI: prepare to make ehci-hcd a library module", we can avoid this problem by turning a bus glue into a separate module, as we do here for the orion bus glue. An earlier version of this patch was included in 3.9 but caused a regression there, which has subsequently been fixed. While we are here, use the opportunity to disabiguate the two Marvell EHCI controller implementations in Kconfig. In V4 (arnd): - Improve Kconfig text In V3: - More detail provided in commit message regarding this patch. - Replaced hcd_name string "ehci-orion" into "orion-ehci". - MODULE_LICENSE is GPL v2. - In ehci_init_driver calling second argument passed as NULL instead of ehci_orion_overrides because ehci_orion_overrides is removed. In V2: - Tegra patch related changes removed from this patch. Signed-off-by: Manjunath Goudar <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Acked-by: Jason Cooper <[email protected]> Tested-by: Andrew Lunn <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-08xhci - clarify compliance mode debug messagesTony Camuso1-5/+9
There are no functional changes in this patch. However, because the compliance mode timer can be deleted in more than one function, it seemed expedient to include the function name in the debug strings. Also limited the use of capitals to the first word in the compliance mode debug messages, except after a function name where all words start with lower case, in keeping with the style prevalent elsewhere in xhci.c. Signed-off-by: Tony Camuso <[email protected]> Signed-off-by: Sarah Sharp <[email protected]>
2013-04-08ARM: EXYNOS: change the name of USB ohci headerJingoo Han1-1/+2
This patch changes the name of USB ohci header from 'usb-exynos.h' to 'usb-ohci-exynos.h'. This is because this header file has the platdata for only EXYNOS OHCI. Signed-off-by: Jingoo Han <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Kukjin Kim <[email protected]>
2013-04-05Merge tag 'usb-for-v3.10' of ↵Greg Kroah-Hartman6-48/+26
git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: usb: patches for v3.10 merge window Here is the big Gadget & PHY pull request. Many of us have been really busy lately getting multiple drivers to a better position. Since this pull request is so large, I will divide it in sections so it's easier to grasp what's included. - cleanups: . UDC drivers no longer touch gadget->dev, that's now udc-core responsibility . Many more UDC drivers converted to usb_gadget_map/unmap_request() . UDC drivers no longer initialize DMA-related fields from gadget's device structure . UDC drivers don't touch gadget.dev.driver directly . UDC drivers don't assign gadget.dev.release directly . Removal of some unused DMA_ADDR_INVALID . Introduction of CONFIG_USB_PHY . All phy drivers have been moved to drivers/usb/phy and renamed to a common naming scheme . Fix PHY layer so it never returns a NULL pointer, also fix all callers to avoid using IS_ERR_OR_NULL() . Sparse fixes all over the place . drivers/usb/otg/ has been deleted . Marvel drivers (mv_udc, ehci-mv, mv_otg and mv_u3d) improved clock usage - new features: . UDC core now provides a generic way for tracking and reporting UDC's state (not attached, resuming, suspended, addressed, default, etc) . twl4030-usb learned that it shouldn't be enabled during init . Full DT support for DWC3 has been implemented . ab8500-usb learned about pinctrl framework . nop PHY learned about DeviceTree and regulators . DWC3 learned about suspend/resume . DWC3 can now be compiled in host-only and gadget-only (as well as DRD) configurations . UVC now enables streaming endpoint based on negotiated speed . isp1301 now implements the PHY API properly . configfs-based interface for gadget drivers which will lead to the removal of all code which just combines functions together to build functional gadget drivers. . f_serial and f_obex were converted to new configfs interface while maintaining old interface around. - non-critical fixes: . UVC gadget driver got fixes for Endpoint usage and stream calculation . ab8500-usb fixed unbalanced clock and regulator API usage . twl4030-usb got a fix for when OMAP3 is booted with cable connected . fusb300_udc got a fix for DMA usage . UVC got fixes for two assertions of the USB Video Class Compliance specification revision 1.1 . build warning issues caused by recent addition of __must_check to regulator API These are all changes which deserve a mention, all other changes are related to these one or minor spelling fixes and other similar tasks. Signed-of-by: Felipe Balbi <[email protected]>
2013-04-03usb: host: ehci-tegra: Fix oops in error cleanupThierry Reding1-2/+5
The cleanup path checks whether the transceiver was properly initialized using IS_ERR(). However it can also happen that the cleanup path is run before the transceiver was initialized (or the operating mode isn't set to TEGRA_USB_OTG) and is therefore NULL. Add a separate label for error unwinding and initialize the transceiver field to ERR_PTR(-ENODEV) when the operating mode isn't TEGRA_USB_OTG to allow for consistent checking. Signed-off-by: Thierry Reding <[email protected]> Acked-by: Stephen Warren <[email protected]> Acked-by: Venu Byravarasu <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-03usb: host: tegra: Reset Tegra USB controller before initVenu Byravarasu1-0/+5
To clear any configurations made by U-Boot on Tegra USB controller, reset it before init in probe. Signed-off-by: Venu Byravarasu <[email protected]> Acked-by: Alan Stern <[email protected]> reviewed-by: Stephen Warren <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-03EHCI: Quirk flag for port power handling on overcurrent.Christian Engelmayer3-1/+12
Commit 756aa6b3d536afe85e151138cb03a293998887b3 (ehci-hub: improved over-current recovery) added port power cycling on overcurrent indications as needed by the MPC8349 USB controller after resolving of the overcurrent situation in order to have the host state machine assert the correct port status again. Commit 81463c1d707186adbbe534016cd1249edeab0dac (EHCI: only power off port if over-current is active) solved a thus resulting issue of endless overcurrent changes in combination with the MAX4967 USB power supply chip that signals overcurrent when power is not enabled by only powering off a port if the overcurrent is currently active. Added quirks flag need_oc_pp_cycle in order to specify the needed behaviour as there is no common behaviour that can comply with both requirements. Activated the quirks handling for Freescale 83xx based boards. Signed-off-by: Christian Engelmayer <[email protected]> Acked-by: Alan Stern <[email protected]> Acked-by: Sergei Shtylyov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-03xhci: Rename SEGMENT_SIZE and SEGMENT_SHIFT as the former is used in a.out.hDavid Howells2-10/+10
Rename SEGMENT_SIZE and SEGMENT_SHIFT as the former is used in a.out.h. Signed-off-by: David Howells <[email protected]> cc: Sarah Sharp <[email protected]> cc: Greg Kroah-Hartman <[email protected]> cc: [email protected] Signed-off-by: Sarah Sharp <[email protected]>
2013-04-03xhci: Use ilog2() rather than __ffs() for calculating SEGMENT_SHIFTDavid Howells1-1/+1
Use ilog2() rather than __ffs() for calculating SEGMENT_SHIFT as ilog2() can be worked out at compile time, whereas __ffs() must be calculated at runtime. Signed-off-by: David Howells <[email protected]> cc: Sarah Sharp <[email protected]> cc: Greg Kroah-Hartman <[email protected]> cc: [email protected] Signed-off-by: Sarah Sharp <[email protected]>
2013-04-02usb: ehci: mv_ehci: remove unused clockChao Xie1-25/+10
The origianl understanding of clock is wrong. The EHCI controller only have one clock input. Passing clock name by pdata is wrong. The clock is defined by device iteself. Acked-by: Alan Stern <[email protected]> Signed-off-by: Chao Xie <[email protected]> Signed-off-by: Felipe Balbi <[email protected]>
2013-04-01usb: PS3 EHCI remove unneeded ehci_shutdownGeoff Levand1-1/+0
Remove an unneeded call to ehci_shutdown() in ps3_ehci_remove(). This removal will allow for a loadable ehci driver. Cc: Arnd Bergmann <[email protected]> Signed-off-by: Geoff Levand <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-04-01Merge v3.9-rc5 into char-misc-nextGreg Kroah-Hartman6-54/+73
This picks up the fixes in 3.9-rc5 that we need here. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-28usb: ehci: mark unlink_empty_async_suspended() as __maybe_unusedArnd Bergmann1-3/+1
Patch 4d053fdac3 "usb: ehci: unlink_empty_async_suspended() only used with CONFIG_PM" tried to hide the unlink_empty_async_suspended function inside of an #ifdef to work around an unused function warning. Unfortunately that had the effect of introducing a new warning: drivers/usb/host/ehci-q.c:1297:13: warning: 'unlink_empty_async_suspended' declared 'static' but never defined [-Wunused-function] While we could add another #ifdef around the function declaration to avoid this, a nicer solution is to mark it as __maybe_unused, which will let gcc silently drop the function definition when it is not needed. Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-28USB: EHCI: DT support for generic bus glueArnd Bergmann3-161/+28
This lets us use the ehci-platform driver on platforms without special requirements for their ehci controllers. In particular, this is true for the vt8500/wm8x50 platforms, which currently have a separate driver that causes problems with multiplatform configurations. Tested-by: Tony Prisk <[email protected]> Tested-by: Peter Vasil <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Arnd Bergmann <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-28usb: ehci: unlink_empty_async_suspended() only used with CONFIG_PMTony Prisk1-0/+2
Compiling with !CONFIG_PM generates an unused function warning on unlink_empty_async_suspended(). Enclose the function in a #ifdef CONFIG_PM Signed-off-by: Tony Prisk <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-28USB: ehci-spear: add CONFIG_PM_SLEEP to suspend/resume functionsJingoo Han1-2/+2
Add CONFIG_PM_SLEEP to suspend/resume functions to fix the following build warning when CONFIG_PM_SLEEP is not selected. This is because sleep PM callbacks defined by SIMPLE_DEV_PM_OPS are only used when the CONFIG_PM_SLEEP is enabled. drivers/usb/host/ehci-spear.c:82:12: warning: 'ehci_spear_drv_suspend' defined but not used [-Wunused-function] drivers/usb/host/ehci-spear.c:90:12: warning: 'ehci_spear_drv_resume' defined but not used [-Wunused-function] Signed-off-by: Jingoo Han <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-28usb: echi-sh: Remove driver variable which is not usedNobuhiro Iwamatsu1-1/+0
Signed-off-by: Nobuhiro Iwamatsu <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-28usb: ehci-sh: Fix build error due to comma has been deletedNobuhiro Iwamatsu1-1/+1
By commit 39d3568 (USB: remove incorrect __exit markups), comma following ehci_hcd_sh_remove has been deleted. This fixes the error by the correction. Signed-off-by: Nobuhiro Iwamatsu <[email protected]> CC: Dmitry Torokhov <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-28USB: remove CONFIG_USB_SUSPEND optionAlan Stern6-25/+10
This patch (as1675) removes the CONFIG_USB_SUSPEND option, essentially replacing it everywhere with CONFIG_PM_RUNTIME (except for one place in hub.c, where it is replaced with CONFIG_PM because the code needs to be used in both runtime and system PM). The net result is code shrinkage and simplification. There's very little point in keeping CONFIG_USB_SUSPEND because almost everybody enables it. The few that don't will find that the usbcore module has gotten somewhat bigger and they will have to take active measures if they want to prevent hubs from being runtime suspended. Signed-off-by: Alan Stern <[email protected]> CC: Peter Chen <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-28Merge branch 'usb-linus' into usb-nextGreg Kroah-Hartman6-54/+73
This lets us fix the build error that happens when these two trees are merged together. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2013-03-26Merge tag 'for-usb-linus-2013-03-26' of ↵Greg Kroah-Hartman5-54/+71
git://git.kernel.org/pub/scm/linux/kernel/git/sarah/xhci into usb-linus Misc xHCI fixes for 3.9 Hi Greg, Here's a couple of fixes for the xHCI driver. Three patches are nothing major: build warning fix, macro field width fix, and removing some unnecessary log spam. The only interesting thing here is Tianyu's two patches to fix the USB port connection type discovery, for the USB port power off mechanism. This adds new USB host API, but as discussed, it's necessary to avoid powering off the wrong USB port. It's not marked for backport to stable kernels, since the sysfs mechanism to manually power off a port didn't go in until 3.9. I've smoke tested these, including system suspend, USB device suspend, and rocking out in my cube with a pair of USB headphones. They look fine to me. Hibernate is currently broken on my system, due to some nouveau MMIO read faults. I'll report that separately. Sarah Sharp
2013-03-26Merge tag 'arizona-extcon-asoc' of ↵Greg Kroah-Hartman6-18/+49
git://git.kernel.org/pub/scm/linux/kernel/git/broonie/misc into char-misc-next Mark writes: ASoC/extcon: arizona: Fix interaction between HPDET and headphone outputs This patch series covers both ASoC and extcon subsystems and fixes an interaction between the HPDET function and the headphone outputs - we really shouldn't run HPDET while the headphone is active. The first patch is a refactoring to make the extcon side easier.
2013-03-25USB: EHCI: fix bug in iTD/siTD DMA pool allocationSoeren Moch1-0/+2
[Description written by Alan Stern] Soeren tracked down a very difficult bug in ehci-hcd's DMA pool management of iTD and siTD structures. Some background: ehci-hcd gives each isochronous endpoint its own set of active and free itd's (or sitd's for full-speed devices). When a new itd is needed, it is taken from the head of the free list, if possible. However, itd's must not be used twice in a single frame because the hardware continues to access the data structure for the entire duration of a frame. Therefore if the itd at the head of the free list has its "frame" member equal to the current value of ehci->now_frame, it cannot be reused and instead a new itd is allocated from the DMA pool. The entries on the free list are not released back to the pool until the endpoint is no longer in use. The bug arises from the fact that sometimes an itd can be moved back onto the free list before itd->frame has been set properly. In Soeren's case, this happened because ehci-hcd can allocate one more itd than it actually needs for an URB; the extra itd may or may not be required depending on how the transfer aligns with a frame boundary. For example, an URB with 8 isochronous packets will cause two itd's to be allocated. If the URB is scheduled to start in microframe 3 of frame N then it will require both itds: one for microframes 3 - 7 of frame N and one for microframes 0 - 2 of frame N+1. But if the URB had been scheduled to start in microframe 0 then it would require only the first itd, which could cover microframes 0 - 7 of frame N. The second itd would be returned to the end of the free list. The itd allocation routine initializes the entire structure to 0, so the extra itd ends up on the free list with itd->frame set to 0 instead of a meaningful value. After a while the itd reaches the head of the list, and occasionally this happens when ehci->now_frame is equal to 0. Then, even though it would be okay to reuse this itd, the driver thinks it must get another itd from the DMA pool. For as long as the isochronous endpoint remains in use, this flaw in the mechanism causes more and more itd's to be taken slowly from the DMA pool. Since none are released back, the pool eventually becomes exhausted. This reuslts in memory allocation failures, which typically show up during a long-running audio stream. Video might suffer the same effect. The fix is very simple. To prevent allocations from the pool when they aren't needed, make sure that itd's sent back to the free list prematurely have itd->frame set to an invalid value which can never be equal to ehci->now_frame. This should be applied to -stable kernels going back to 3.6. Signed-off-by: Soeren Moch <[email protected]> Signed-off-by: Alan Stern <[email protected]> Cc: stable <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>