Age | Commit message (Collapse) | Author | Files | Lines |
|
This patch removes the restriction of having a limited amount of only
four active tds on one endpoint. We use the linked list implementation
to manage all tds which get added and removed by hardware_{en,de}queue.
The removal of this restriction adds the driver to run into a hardware
errata. It's possible that the hardware will still address an transfer
descriptor that already got cleaned up. To solve this the patch also
postpone the cleanup of processed tds by one.
Signed-off-by: Michael Grzeschik <[email protected]>
Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch adds iso endpoint support to the device controller.
It makes use of the multiplication bits in the maxpacket field
of the endpoint and calculates the multiplier bits for each
transfer description on every request.
Signed-off-by: Michael Grzeschik <[email protected]>
Reviewed-by: Peter Chen <[email protected]>
Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Re-enable chipidea irq even if there's no role changing to do. This is
a problem since b183c19f ("USB: chipidea: re-order irq handling to avoid
unhandled irqs"); when it manifests, chipidea irq gets disabled for good.
Cc: [email protected] # v3.7
Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
devm_ioremap_resource does sanity checks on the given resource. No need to
duplicate this in the driver.
Signed-off-by: Wolfram Sang <[email protected]>
Acked-by: Alexander Shishkin <[email protected]>
|
|
Convert between big-endian and little-endian format when accessing the usb
controller structures which are little-endian by specification.
Fix cases where the little-endian memory layout is taken for granted.
The patch doesn't have any effect on the already supported little-endian
architectures.
Signed-off-by: Svetoslav Neykov <[email protected]>
[Alex: minor cosmetic fixes]
Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
chipidea's ffs_nr() is pretty much what __ffs() does.
Use that one instead.
Signed-off-by: Felipe Balbi <[email protected]>
[rebased on top of debug infrastructure rework]
Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Create and remove debugfs entries in hdrc probe/remove instead of
start/stop of the device controller. Gadget specific will not export
anything while the controller is in host mode.
Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Manual role switching function is there for debugging purposes, so has
to move to debugfs.
Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
switch over to the newly added devm_ioremap_resource
which provides more consistent error messages.
Signed-off-by: Felipe Balbi <[email protected]>
Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Some headers included in the chipidea controller core are not needed,
remove them.
Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Delete successive tests to the same location. In this case res has already
been tested for being NULL, and calling devm_request_and_ioremap will not
make it NULL. On the other hand, devm_request_and_ioremap can return NULL
on failure.
A simplified version of the semantic match that finds this problem is as
follows: (http://coccinelle.lip6.fr/)
// <smpl>
@s exists@
local idexpression y;
expression x,e;
@@
*if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
{ ... when forall
return ...; }
... when != \(y = e\|y += e\|y -= e\|y |= e\|y &= e\|y++\|y--\|&y\)
when != \(XT_GETPAGE(...,y)\|WMI_CMD_BUF(...)\)
*if ( \(x == NULL\|IS_ERR(x)\|y != 0\) )
{ ... when forall
return ...; }
// </smpl>
Signed-off-by: Julia Lawall <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The pointer to a platform_device struct must not be dereferenced after
the device has been unregistered.
This bug produces a crash when unloading the ci13xxx kernel module
compiled with CONFIG_PAGE_POISONING enabled.
Signed-off-by: Lothar Waßmann <[email protected]>
Cc: stable <[email protected]> # 3.6
Acked-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
CONFIG_HOTPLUG is going away as an option so __devexit is no
longer needed.
Signed-off-by: Bill Pemberton <[email protected]>
Cc: Peter Korsgaard <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Cc: Li Yang <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Wan ZongShun <[email protected]>
Cc: Ben Dooks <[email protected]>
Cc: Kukjin Kim <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
CONFIG_HOTPLUG is going away as an option so __devinit is no longer
needed.
Signed-off-by: Bill Pemberton <[email protected]>
Cc: Peter Korsgaard <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Cc: Li Yang <[email protected]>
Acked-by: Alan Stern <[email protected]>
Cc: Geoff Levand <[email protected]>
Cc: Wan ZongShun <[email protected]>
Cc: Olav Kongas <[email protected]>
Cc: Lennert Buytenhek <[email protected]>
Cc: Ben Dooks <[email protected]>
Cc: Kukjin Kim <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
CONFIG_HOTPLUG is going away as an option so __devexit_p is no longer
needed.
Signed-off-by: Bill Pemberton <[email protected]>
Cc: Peter Korsgaard <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Cc: Li Yang <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Wan ZongShun <[email protected]>
Cc: Ben Dooks <[email protected]>
Cc: Kukjin Kim <[email protected]>
Acked-by: Nicolas Ferre <[email protected]>
Acked-by: Peter Korsgaard <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
- let role driver handle irq before ID change check; this gives the
role driver a chance to handle disconnect;
- disable irq during switch role; no role driver to handle irq in
the period.
Tested-by: Michael Grzeschik <[email protected]>
Tested-by: Marc Kleine-Budde <[email protected]>
Signed-off-by: Richard Zhao <[email protected]>
Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
In order to avoid re-queueing of the role changing work, we need to clear
the ID change interrupt bit right in the irq handler.
Tested-by: Michael Grzeschik <[email protected]>
Tested-by: Marc Kleine-Budde <[email protected]>
Signed-off-by: Richard Zhao <[email protected]>
Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
The ID pin needs 1ms debounce time, even at probe time. We delay 2ms
to be on the safe side.
Tested-by: Michael Grzeschik <[email protected]>
Tested-by: Marc Kleine-Budde <[email protected]>
Signed-off-by: Richard Zhao <[email protected]>
Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Sometimes, the driver bindings may know what phy they use.
For example, when using device tree, the usb controller may have a
phandler pointing to usb phy.
Signed-off-by: Richard Zhao <[email protected]>
Reviewed-by: Marek Vasut <[email protected]>
Acked-by: Felipe Balbi <[email protected]>
Tested-by: Subodh Nijsure <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
We use ida_simple_get and ida_simple_remove to manage the ids.
Signed-off-by: Richard Zhao <[email protected]>
Reviewed-by: Felipe Balbi <[email protected]>
Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Platform drivers do the similar things to add/remove ci13xxx device, so
create a unified one.
Signed-off-by: Richard Zhao <[email protected]>
Reviewed-by: Felipe Balbi <[email protected]>
Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This patch rename struct ci13xxx_udc_driver and var with the type.
ci13xxx_platform_data reflect it's passed from platfrom driver.
Signed-off-by: Richard Zhao <[email protected]>
Reviewed-by: Felipe Balbi <[email protected]>
Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
It's 0 for host only device.
Signed-off-by: Richard Zhao <[email protected]>
Cc: Marek Vasut <[email protected]>
Cc: Alan Stern <[email protected]>
Cc: Alexander Shishkin <[email protected]>
Cc: Felipe Balbi <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
This adds EHCI host support to the chipidea driver. We want it to be
part of the hdrc driver and not a standalone (sub-)driver module, as
the structure of ehci-hcd.c suggests, so for chipidea controller we
hack it to not provide platform-related code, but only the ehci hcd.
The ehci-platform driver won't work for us here too, because the
controller uses the same registers for both device and host mode and
also otg-related bits, so it's not really possible to put ehci registers
into a separate resource.
This is not a pretty solution, but the alternative is exporting symbols
from the chipidea driver to a ehci-chipidea driver and doing all the
module refcounting.
Signed-off-by: Alexander Shishkin <[email protected]>
Cc: Alan Stern <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Some of the bits of USBMODE register are defined in <usb/ehci_def.h>,
use them instead of having our own definitions.
Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
These definitions are unused, and the same registers are also defined
in <linux/usb/msm_hsusb_hw.h>.
Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Add some generic code for roles and implement simple role switching
based on ID pin state and/or a sysfs file. At this, we also rename
the device to ci_hdrc, which is what it is.
The "manual" switch is made into a sysfs file and not debugfs, because
it might be useful even in non-debug context. For some boards, like
sheevaplug, it seems to be the only way to switch roles without modifying
the hardware, since the ID pin is always grounded.
Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|
|
Split the driver into the following parts:
* core -- resources, register access, capabilities, etc;
* udc -- device controller functionality;
* debug -- logging events.
Signed-off-by: Alexander Shishkin <[email protected]>
Signed-off-by: Greg Kroah-Hartman <[email protected]>
|