summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3
Commit message (Collapse)AuthorAgeFilesLines
* Merge 4.7-rc6 into usb-nextGreg Kroah-Hartman2016-07-041-2/+4
|\ | | | | | | | | | | We want the USB fixes in here as well. Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
| * Merge tag 'mfd-fixes-4.7.1' of ↵Linus Torvalds2016-07-011-1/+2
| |\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull more MFD fixes from Lee Jones: "Apologies for missing these from the first pull request. Final patches fixing Reset API change" * tag 'mfd-fixes-4.7.1' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: usb: dwc3: st: Use explicit reset_control_get_exclusive() API phy: phy-stih407-usb: Use explicit reset_control_get_exclusive() API phy: miphy28lp: Inform the reset framework that our reset line may be shared
| | * usb: dwc3: st: Use explicit reset_control_get_exclusive() APILee Jones2016-07-011-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We're making all reset line users specify whether their lines are shared with other IP or they operate them exclusively. In this case the line is exclusively used only by this IP, so use the *_exclusive() API accordingly. Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
| * | Merge tag 'mfd-fixes-4.7' of ↵Linus Torvalds2016-06-301-1/+2
| |\ \ | | |/ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd Pull MFD fixes from Lee Jones: "Contained are some standard fixes and unusually an extension to the Reset API. Some of those changes are required to fix a bug introduced in -rc1, which introduces extra 'reset line checks' i.e. whether the line is shared or not. If a line is shared and the new *_shared() API is not used, the request fails with an error. This breaks USB in v4.7 for ST's platforms. Admittedly, there are some patches contained in our (MFD/Reset) immutable branch which are not true -fixes, but there isn't anything I can do about that. Rest assured though, there aren't any API 'changes'. Everything is the same from the consumer's perspective. - Use new reset_*_get_shared() variant to prevent reset line obtainment failure (Fixes commit 0b52297f2288: "reset: Add support for shared reset controls") - Fix unintentional switch() fall-through into error path - Fix uninitialised variable compiler warning" * tag 'mfd-fixes-4.7' of git://git.kernel.org/pub/scm/linux/kernel/git/lee/mfd: mfd: da9053: Fix compiler warning message for uninitialised variable mfd: max77620: Fix FPS switch statements phy: phy-stih407-usb: Inform the reset framework that our reset line may be shared usb: dwc3: st: Inform the reset framework that our reset line may be shared usb: host: ehci-st: Inform the reset framework that our reset line may be shared usb: host: ohci-st: Inform the reset framework that our reset line may be shared reset: TRIVIAL: Add line break at same place for similar APIs reset: Supply *_shared variant calls when using *_optional APIs reset: Supply *_shared variant calls when using of_* API reset: Ensure drivers are explicit when requesting reset lines reset: Reorder inline reset_control_get*() wrappers
| | * usb: dwc3: st: Inform the reset framework that our reset line may be sharedLee Jones2016-06-301-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On the STiH410 B2120 development board the MiPHY28lp shares its reset line with the Synopsys DWC3 SuperSpeed (SS) USB 3.0 Dual-Role-Device (DRD). New functionality in the reset subsystems forces consumers to be explicit when requesting shared/exclusive reset lines. Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Lee Jones <lee.jones@linaro.org>
* | | usb: dwc3: host: Fix broken XHCI hostRoger Quadros2016-07-011-1/+42
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Looks like we lost all changes related to commit 9522def40065 ("usb: dwc3: core: cleanup IRQ resources") in host.c when Felipe's next branch was merged into Greg's next branch. Fixes 215db948181 ("Merge tag 'usb-for-v4.8' of git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next") Signed-off-by: Roger Quadros <rogerq@ti.com> Acked-by: Felipe Balbi <felipe.balbi@linux.intel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* | | Merge tag 'usb-for-v4.8' of ↵Greg Kroah-Hartman2016-06-2912-885/+1156
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/balbi/usb into usb-next Felipe writes: usb: patches for v4.8 merge window Here's the big pull request for Peripheral stack and all related drivers. This time around with 109 non-merge commits mostly concentrated on drivers/usb/gadget/udc (41.5%) and drivers/usb/dwc3 (28.1%). There's a big rework on dwc3's transfer handling which gave us almost 3x faster USB3 speeds with Mass Storage on a particular test scenario I measured. We are also removing platform_data from dwc3 after converting all users to built-in properties instead. For the Gadget API, we're just adding tracepoints to aid debugging activities. Other than these, there's the usual set of spelling fixes, minor bug fixes and sparse warnings cleanups.
| * | | dwc3: gadget: Implement the suspend entry event handlerBaolin Wang2016-06-211-1/+25
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It had changed to be suspend event for BIT6 in DEVT register from version 2.30a and above. Thus this patch introduces one suspend event handler to handle the suspend event. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: core: cleanup IRQ resourcesRoger Quadros2016-06-213-18/+78
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Implementations might use different IRQs for host, gadget so use named interrupt resources to allow device tree to specify the interrupts. Following are the interrupt names Peripheral Interrupt - peripheral HOST Interrupt - host Maintain backward compatibility for a single named interrupt ("dwc3_usb3") for all interrupts as well as unnamed interrupt at index 0 for all interrupts. As platform_get_irq() variants are used, tackle the -EPROBE_DEFER case as well. Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: Add the suspend state checking when stopping gadgetBaolin Wang2016-06-211-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It will be crash to stop gadget when the dwc3 device had been into suspend state, thus we need to check if the dwc3 device had been into suspend state when UDC try to stop gadget. Signed-off-by: Baolin Wang <baolin.wang@linaro.org> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: issue ENDTRANSFER conditional on resource_indexFelipe Balbi2016-06-211-15/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Because of recent changes to transfer handling on DWC3, we will not get XferComplete unless we completely fill up our TRB ring. This means that we might get a Reset or Disconnect without getting a XferComplete first. In order to correctly release our allocated Transfer Resource, we must issue ENDTRANSFER command whenever dep->resource_index is valid. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: fix runtime PM in error pathRoger Quadros2016-06-211-8/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If there is a failure after pm_runtime_enable/get_sync() we need to call pm_runtime_disable/put_sync(). Otherwise it will lead to an unbalanced pm_runtime_enable() on the subsequent probe if the earlier probe bailed out due to -EPROBE_DEFER. pm_runtime_get_sync() can fail as well so deal with that case too. Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: simplify run_stop() break conditionFelipe Balbi2016-06-211-8/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | it's clear now that when is_on=true, we must loop until DWC3_DSTS_DEVCTRLHLT clears; while when is_on=false we must loop until DWC3_DSTS_DEVCTRLHLT gets set. Instead of adding actual if() statements, we can rely on XOR operation to evaluate to true only when the above conditions apply. Then, we can move the break condition back to the while() statement together with our timeout check and the resulting code is very compact and simpler to read. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: avoid while(1) in run_stop()Felipe Balbi2016-06-211-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | instead of looping forever and forcing a return if timeout reaches zero, we can just use timeout and loop's break condition directly. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: remove udelay() from run_stop()Felipe Balbi2016-06-211-1/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | testing shows that udelay() is unnecessary as controller reaches Halted state almost instantenously as can be seen by our timeout variable never actually decrementing. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: core: fixup dr_mode fallback selectionFelipe Balbi2016-06-211-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We shouldn't change a host-only dwc3 to gadget-only if driver is built as gadget-only. Fix that up here. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: pci: add dr-mode for Intel dwc3Felipe Balbi2016-06-211-25/+37
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | It's know that Intel's SoCs' dwc3 integration is peripheral-only since Intel implements its own portmux for role-swapping. In order to prevent dwc3 from ever registering and XHCI platform_device, let's just set dr-mode to peripheral-only on Intel SoCs. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: rename 'ignore' argument to 'modify'Felipe Balbi2016-06-211-7/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 'modify' is what the current action is called. Let's rename it so it matches databook. While at that, also make sure to add support 'init' action too. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: decrement trbs_left for each sg entryFelipe Balbi2016-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | If we don't, we will overwrite valid TRBs. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: start Bulk endpoints more frequentlyFelipe Balbi2016-06-201-2/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Now we can try to issue Update Transfer every time gadget driver queues a new request. This will make sure we keep controller's queue busy for as long as possible. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: disable XFER_NOT_READYFelipe Balbi2016-06-201-2/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We don't need this IRQ anymore for interrupt or bulk endpoints. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: use allocated/queued reqs for LST bitFelipe Balbi2016-06-201-6/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Let's only set LST bit when we run out of space in our TRB ring. For all other cases, we keep LST bit unset which will prevent constant allocation and deallocation of endpoint transfer resources. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: halt and stop based HWO bitFelipe Balbi2016-06-201-4/+24
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of relying on empty list of queued requests, let's rely on the fact that we have a TRB being processed right now. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: keep track of allocated and queued reqsFelipe Balbi2016-06-203-2/+18
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We will be using this information to change how we figure out when we need LST bit. For now, just update our counters. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: update transfer needs transfer resourceFelipe Balbi2016-06-201-3/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | According to SNPS databook, we need to pass transfer resource on update transfer command, let's do it. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: remove handling of platform dataHeikki Krogerus2016-06-202-88/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | No more users for it. Tested-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: pci: use build-in properties instead of platform dataHeikki Krogerus2016-06-201-38/+32
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This should allow the core driver to drop handling of platform data and expect the platform specific details to always come from properties. Tested-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Heikki Krogerus <heikki.krogerus@linux.intel.com> Cc: Huang Rui <ray.huang@amd.com> CC: John Youn <John.Youn@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: remove trailing newline from dwc3_traceFelipe Balbi2016-06-202-22/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | when passing strings to trace, we don't need the trailing newline character. Trace already appends a newline character automatically. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: omap: Pass VBUS and ID events transparentlyRoger Quadros2016-06-201-8/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Don't make any decisions regarding VBUS session based on ID status. That is best left to the OTG core. Pass ID and VBUS events independent of each other so that OTG core knows exactly what to do. This makes dual-role with extcon work with OTG irq on OMAP platforms. Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: omap: Don't set POWERPRESENTRoger Quadros2016-06-201-6/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | TRM [1] recommends that POWERPRESENT bit must not be set and left at it's default value of 0. [1] OMAP542x TRM - http://www.ti.com/lit/pdf/swpu249 Section 23.11.4.5.1 Mailbox VBUS/ID Management "Because PIPE powerpresent has a different meaning in host and in device mode, and because of the redundancy with the UTMI signals, the controller ORes together the appropriate PIPE and UTMI inputs to create its internal VBUS status. For that reason, it is recommended to leave field USBOTGSS_UTMI_OTG_STATUS[9] POWERPRESENT at its default value (=0), and only to fill in the USB2 VBUS status fields in the same register." Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: omap: Mark the interrupt handler as sharedRoger Quadros2016-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | On OMAPs, OTG events come on the same IRQ so we need to share this IRQ with the OTG device driver. Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: omap: use request_threaded_irq()Roger Quadros2016-06-201-6/+26
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | We intend to share this interrupt with the OTG driver an to ensure that irqflags match for the shared interrupt handlers we use request_threaded_irq() If we don't use request_treaded_irq() then forced threaded irq will set IRQF_ONESHOT and this won't match with the OTG IRQ handler's IRQ flags. NOTE: OTG IRQ handler is yet to be added. This is a preparatory step. Signed-off-by: Roger Quadros <rogerq@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: add DWC3_GUCTL1 reg for debugWilliam Wu2016-06-202-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | GUCTL1 reg has some useful functions which can be written by user. For rockchip platform, we set GUCTL1.DEV_FORCE_20_CLK_FOR_30_CLK (bit26, applicable for the core is programmed to operate in 2.0 device only) to 1 in bootrom, and after start the kernel, we want to check whether this bit can be reset to default 0 after the core reset. Dump GUCTL1 reg from debugfs is more convenient for us. Signed-off-by: William Wu <william.wu@rock-chips.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: Fix DWC3_USB31_REVISION_110A definitionJohn Youn2016-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The DWC3_USB31_REVISION_110A macro uses an invalid constant name in its definition. This is currently not used. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: Use the correct speed macros for DSTS/DCFGJohn Youn2016-06-201-12/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Correct the use of the DWC3_DSTS_XXX_SPEED and DWC3_DCFG_XXX_SPEED macros. The wrong set of macros were being used in a few places. This is only a cosmetic change as the values for both sets are identical. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: Fix truncated cast issueJohn Youn2016-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | From sparse: warning: cast truncates bits from constant value (100 becomes 0) The DWC3_TRB_NUM constant is too big for u8. Do the calculation a slightly different way that should still be optimized out for the case where DWC3_TRB_NUM == 256. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: Handle TRB index 0 when full or emptyJohn Youn2016-06-201-6/+22
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the trb->enqueue == trb->dequeue, then it could be full or empty. This could also happen at TRB index 0, so modify the check to handle that condition. At index 0, the previous TRB is the one just before the link TRB. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: Account for link TRB in TRBs leftJohn Youn2016-06-201-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The TRBs left calculation didn't account for the link TRB taking up one spot. If the trb_dequeue < trb_enqueue, then the result includes the link TRB slot so it must be adjusted. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: Account for max size in TRB spaceJohn Youn2016-06-201-1/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The current calculation takes dep->trb_dequeue - dep->trb_enqueue to find the TRB space left. If you enqueue 1, that results in: (u8) 0 - (u8) 1 = 0xff = 255 TRBs left. This is correct if DWC3_TRB_NUM == 256. If DWC3_TRB_NUM is less than 256 (but still a power of 2) you need to mod the result by DWC3_TRB_NUM. For example the same calculation with DWC3_TRB_NUM = 8, results in: 255 % 6 = 7 TRBs left. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: Don't prepare TRBs if no spaceJohn Youn2016-06-201-0/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If trbs_left == 0, we don't have any space left in the TRB ring so don't prepare anything. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: Initialize the TRB ringJohn Youn2016-06-201-2/+6
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Clears out all the TRBs in the ring to clean up any stale data that might be in them from the previous time the endpoint was enabled. Also removed the existing clear of the LINK trb since the entire ring is cleard just before. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: Simplify skipping of link TRBsJohn Youn2016-06-201-18/+16
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make the skipping of the link TRBS built-in to the increment operation. This simplifies the code wherever we increment the trb index and ensures that we never end up pointing to a link trb. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: Endianness issue on dwc3_log_ctrlJohn Youn2016-06-201-8/+8
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Sparse complains even though it looks ok. Probably it cannot detect that the wValue, wIndex, and wLength are declared __le16 due to the macro magic. Redeclare them as CPU endianness and make the conversion on assignment. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: Fix usage of bitwise operatorJohn Youn2016-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Cleans up the sparse warning: warning: dubious: x | !y Since we do want a bitwise OR here, don't use a logical (true/false) value. Probably is not a real issue but it cleans up the warning. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: ep0: Use the correct type for SET_SEL dataJohn Youn2016-06-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | u2sel and u2pel should be __le16. Doesn't fix any issue. Found with sparse. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: ep0: Fix endianness of wIndex passed to dwc3_wIndex_to_depJohn Youn2016-06-201-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The wIndex passed in here is CPU endianness, but the function expects little endian. Found with sparse. Signed-off-by: John Youn <johnyoun@synopsys.com> Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: improve gcmd traceFelipe Balbi2016-06-203-14/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just like we did for endpoint commands, let's have a single trace output for the command and its status. This will improve trace readability Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: remove udelay() from generic cmdFelipe Balbi2016-06-201-2/+0
| | | | | | | | | | | | | | | | | | | | | | | | | | | | We want commands to finish ASAP, so let's remove that udelay() call. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: gadget: single return point on generic commandsFelipe Balbi2016-06-201-13/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Just like we did for endpoint commands, let's use a single return point for generic commands as well. This aids readability. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
| * | | usb: dwc3: trace: print ep cmd status with a single traceFelipe Balbi2016-06-203-9/+30
| | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of printing command's status with a separate trace printout, let's print it within a single call. Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
OpenPOWER on IntegriCloud