aboutsummaryrefslogtreecommitdiff
path: root/include/linux/usb/ehci_def.h
AgeCommit message (Collapse)AuthorFilesLines
2020-02-10usb: host: ehci-platform: add a quirk to avoid stuckYoshihiro Shimoda1-1/+1
Since EHCI/OHCI controllers on R-Car Gen3 SoCs are possible to be getting stuck very rarely after a full/low usb device was disconnected. To detect/recover from such a situation, the controllers require a special way which poll the EHCI PORTSC register and changes the OHCI functional state. So, this patch adds a polling timer into the ehci-platform driver, and if the ehci driver detects the issue by the EHCI PORTSC register, the ehci driver removes a companion device (= the OHCI controller) to change the OHCI functional state to USB Reset once. And then, the ehci driver adds the companion device again. Signed-off-by: Yoshihiro Shimoda <[email protected]> Acked-by: Alan Stern <[email protected]> Link: https://lore.kernel.org/r/1580114262-25029-1-git-send-email-yoshihiro.shimoda.uh@renesas.com Signed-off-by: Greg Kroah-Hartman <[email protected]>
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 <[email protected]> Cc: Kate Stewart <[email protected]> Cc: Philippe Ombredanne <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]> Acked-by: Felipe Balbi <[email protected]> Acked-by: Johan Hovold <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2016-06-24USB: EHCI: declare hostpc register as zero-length arrayAlan Stern1-2/+2
The HOSTPC extension registers found in some EHCI implementations form a variable-length array, with one element for each port. Therefore the hostpc field in struct ehci_regs should be declared as a zero-length array, not a single-element array. This fixes a problem reported by UBSAN. Signed-off-by: Alan Stern <[email protected]> Reported-by: Wilfried Klaebe <[email protected]> Tested-by: Wilfried Klaebe <[email protected]> CC: <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2014-11-07usb: Create separate header for ehci-dbgpChris Rorvick1-63/+2
The FUSBH200 and FOTG210 controllers implement sufficiently EHCI- compatible debug ports to leverage ehci-dbgp from their respective drivers. Rather than including <linux/usb/ehci_def.h> header, though, they replicate the necessary declarations in their own headers. Move the ehci-dbgp stuff into its own header as a first step towards removing this redundancy. Signed-off-by: Chris Rorvick <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-18USB: EHCI: Tegra: Fix wrong register definitionJim Lin1-3/+3
Fix the issue that EHCI registers, hostpc[0] and usbmode_ex, are not correctly accessed on Tegra3 platform. Signed-off-by: Jim Lin <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-09-18USB EHCI/Xen: propagate controller reset information to hypervisorJan Beulich1-6/+23
Just like for the in-tree early console debug port driver, the hypervisor - when using a debug port based console - also needs to be told about controller resets, so it can suppress using and then re-initialize the debug port accordingly. Other than the in-tree driver, the hypervisor driver actually cares about doing this only for the device where the debug is port actually in use, i.e. it needs to be told the coordinates of the device being reset (quite obviously, leveraging the addition done for that would likely benefit the in-tree driver too). Signed-off-by: Jan Beulich <[email protected]> Acked-by: Konrad Rzeszutek Wilk <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2012-06-26USB: EHCI: define extension registers like normal onesAlan Stern1-7/+21
This patch (as1562) cleans up the definitions of the EHCI extended registers to be consistent with the definitions of the standard registers. This makes the code look a lot nicer, with no functional change. Signed-off-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-05-03USB: EHCI: Support controllers with big endian capability regsJan Andersson1-2/+7
The two first HC capability registers (CAPLENGTH and HCIVERSION) are defined as one 8-bit and one 16-bit register. Most HC implementations have selected to treat these registers as part of a 32-bit register, giving the same layout for both big and small endian systems. This patch adds a new quirk, big_endian_capbase, to support controllers with big endian register interfaces that treat HCIVERSION and CAPLENGTH as individual registers. Signed-off-by: Jan Andersson <[email protected]> Acked-by: Alan Stern <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-05-03USB: ehci: remove structure packing from ehci_defRabin Vincent1-3/+3
As pointed out by Arnd Bergmann, in include/linux/usb/ehci_def.h, struct ehci_caps is defined with __attribute__((packed)) for no good reason, and this triggers undefined behaviour when using ARM's readl() on pointers to elements of this structure: http://lkml.kernel.org/r/[email protected] The same problem exists with the other two structures in ehci_def.h too, so remove the __attribute__((packed)) from all of them. Cc: Arnd Bergmann <[email protected]> Signed-off-by: Rabin Vincent <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2011-03-31Fix common misspellingsLucas De Marchi1-1/+1
Fixes generated by 'codespell' and manually reviewed. Signed-off-by: Lucas De Marchi <[email protected]>
2011-03-11usb: host: Add EHCI driver for NVIDIA Tegra SoCsBenoit Goby1-1/+3
The Tegra 2 SoC has 3 EHCI compatible USB controllers. This patch adds the necessary glue to allow the ehci-hcd driver to work on Tegra 2 SoCs. The platform data is used to configure board-specific phy settings and to configure the operating mode, as one of the ports may be used as a otg port. For additional power saving, the driver supports powering down the phy on bus suspend when it is used, for example, to connect an internal device that use an out-of-band remote wakeup mechanism (e.g. a gpio). Signed-off-by: Benoit Goby <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-08-10USB: EHCI: EHCI 1.1 addendum: preparationAlek Du1-0/+23
EHCI 1.1 addendum introduced several energy efficiency extensions for EHCI USB host controllers: 1. LPM (link power management) 2. Per-port change 3. Shorter periodic frame list 4. Hardware prefetching This patch is intended to define the HW bits and debug interface for EHCI 1.1 addendum. The LPM and Per-port change patches will be sent out after this patch. Signed-off-by: Jacob Pan <[email protected]> Signed-off-by: Alek Du <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2010-05-20USB: include/usb/*.h checkpatch cleanupGreg Kroah-Hartman1-3/+3
Lots of minor formatting cleanups in includes/usb/ to make checkpatch happier. Signed-off-by: Greg Kroah-Hartman <[email protected]>
2009-09-23USB: ehci-dbgp: errata for EHCI debug controller initializationJason Wessel1-0/+1
On some EHCI usb debug controllers, the EHCI debug device will fail to be seen after a port reset, after a warm reset. Two options exist to get the device to initialize correctly. Option 1 is to unplug and plug in the device. Option 2 is to use the EHCI port test to get the usb debug device to start talking again. At that point the debug controller port reset will succeed. Signed-off-by: Jason Wessel <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: "Eric W. Biederman" <[email protected]> CC: [email protected] Signed-off-by: Greg Kroah-Hartman <[email protected]>
2009-09-23USB: ehci-dbgp,ehci: Allow early or late use of the dbgp deviceJason Wessel1-0/+10
If the EHCI debug port is initialized and in use, the EHCI host controller driver must follow two rules. 1) If the EHCI host driver issues a controller reset, the debug controller driver re-initialization must get called after the reset is completed. 2) The EHCI host driver should ignore any requests to the physical EHCI debug port when the EHCI debug port is in use. The code to check for the debug port was moved from ehci_pci_reinit() to ehci_pci_setup because it must get called prior to ehci_reset() which will clear the debug port registers. Signed-off-by: Jason Wessel <[email protected]> Cc: Alan Stern <[email protected]> Cc: [email protected] Cc: Ingo Molnar <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2009-09-23USB: ehci-dbgp: stability improvements and external re-initJason Wessel1-0/+5
This patch implements several changes: 1) Improve the capability to debug the dbgp driver The dbgp_ehci_status() was added in a number of places to report the critical ehci registers to diagnose the cause of a failure of the ehci-dbgp driver. 2) Capability to survive the host controller initialization The dbgp_external_startup(), dbgp_not_safe, and dbgp_phys_port were added so as to allow the ehci-dbgp to re-initialize after the ehci host controller is reset by the standard host controller driver. This same routine is common for the early startup or re-initialization. This resulted in the need to move some of the initialization code out of the __init section because the ehci driver has the possibility to be loaded later on as a kernel module. 3) Stability improvements for device initialization The device enumeration from 0 to 127 has the possibility to fail the first time after a warm reset on some older EHCI debug controllers. The enumeration will be tried up to 3 times to account for this failure case. The dbg_wait_until_complete() was changed to wait up to 250 ms before failing which only comes into play during device initialization. The maximum delay will never get hit during the course of normal operation of the driver, unless the device got unplugged or there was a ehci controller failure, in which case the dbgp device driver will shut itself down. Signed-off-by: Jason Wessel <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Andrew Morton <[email protected]> Cc: [email protected] Cc: Yinghai Lu <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2009-09-23USB: ehci,dbgp,early_printk: split ehci debug driver from early_printk.cJason Wessel1-0/+6
Move the dbgp early printk driver in advance of refactoring and adding new code, so the changes to this code are tracked separately from the move of the code. The drivers/usb/early directory will be the location of the current and future early usb code for driving usb devices prior initializing the standard interrupt driven USB drivers. Signed-off-by: Jason Wessel <[email protected]> Cc: Ingo Molnar <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Yinghai Lu <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2009-09-23USB: EHCI: Add Intel Moorestown EHCI controller HOSTPCx extensions and ↵Alek Du1-0/+13
support phy low power mode The Intel Moorestown EHCI controller supports non-standard HOSTPCx register extension. This register controls the LPM behaviour and controls the behaviour of each USB port. Signed-off-by: Jacob Pan <[email protected]> Signed-off-by: Alek Du <[email protected]> Acked-by: Alan Stern <[email protected]> Cc: David Brownell <[email protected]> Signed-off-by: Greg Kroah-Hartman <[email protected]>
2008-07-26usb: move ehci reg defYinghai Lu1-0/+160
prepare x86: usb debug port early console move ehci struct def to linux/usrb/ehci_def.h from host/ehci.h Signed-off-by: Yinghai Lu <[email protected]> Acked-by: David Brownell <[email protected]> Cc: Andrew Morton <[email protected]> Cc: Andi Kleen <[email protected]> Cc: "Arjan van de Ven" <[email protected]> Cc: "Eric W. Biederman" <[email protected]> Cc: "Greg KH" <[email protected]> Signed-off-by: Ingo Molnar <[email protected]>