summaryrefslogtreecommitdiffstats
path: root/drivers/usb/dwc3/debugfs.c
Commit message (Collapse)AuthorAgeFilesLines
* usb: dwc3: switch to GPL v2 onlyFelipe Balbi2013-07-291-27/+7Star
| | | | | | | | | | | | | | | | This is a Linux-only driver which makes use of GPL-only symbols. It makes no sense to maintain Dual BSD/GPL licensing for this driver. Considering that the amount of work to use this driver in any different operating system would likely be as large as developing the driver from scratch and considering that we depend on GPL-only symbols, we will switch over to a GPL v2-only license. Cc: Anton Tikhomirov <av.tikhomirov@samsung.com> Acked-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: core: fix wrong OTG event regitser offsetGeorge Cherian2013-03-181-0/+1
| | | | | | | | | | | This patch fixes the wrong OTG_EVT,OTG_EVTEN and OTG_STS register offsets. While at that, also add a missing register to debugfs regdump utility. Signed-off-by: George Cherian <george.cherian@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: debugfs: improve debugfs file creationFelipe Balbi2013-03-181-19/+22
| | | | | | | | | | | | | when commit 388e5c5 (usb: dwc3: remove dwc3 dependency on host AND gadget.) changed the way debugfs files are created, it failed to note that 'mode' is necessary in Dual Role mode only while 'testmode' and 'link_state' are valid in Dual Role and Peripheral-only builds. Fix this while also converting pre- processor conditional to C conditionals. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: debugfs: mark our regset structure constFelipe Balbi2013-03-181-1/+1
| | | | | | | | | nobody should be modifying that structure and debugfs has already being fixed to take const arguments, so we won't cause any new compile warnings. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: debugfs: when unknown, print only the state valueFelipe Balbi2013-03-181-1/+1
| | | | | | | | | whenever we grab an unknown link_state we were printing the entire register value as a integer but that's hardly useful; instead, let's print only the bogus state value. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: debugfs: add two missing Link StatesFelipe Balbi2013-03-181-0/+6
| | | | | | | | for Reset and Resume we were going to print "UNKNOWN" when we actually knew what those were. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: remove dwc3 dependency on host AND gadget.Vivek Gautam2013-01-181-0/+2
| | | | | | | | | | | | | | | | | | | | DWC3 controller curretly depends on USB && USB_GADGET. Some hardware may like to use only host feature on dwc3, or only gadget feature. So, removing this dependency of USB_DWC3 on USB and USB_GADGET. Adding the mode of operaiton of DWC3 also here HOST/GADGET/DUAL_ROLE based on which features are enabled. [ balbi@ti.com : . make sure we have default modes for all possible Kernel configurations. . Remove the config -> menuconfig change as it's unnecessary . switch over to IS_ENABLED() ] CC: Doug Anderson <dianders@chromium.org> Signed-off-by: Vivek Gautam <gautam.vivek@samsung.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: debugfs: convert our regdump to use regsetsFelipe Balbi2013-01-181-24/+12Star
| | | | | | | regset is a generic implementation of regdump utility through debugfs. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: debugfs: fix regdump offsetJack Pham2012-12-131-1/+1
| | | | | | | | | | | As with dwc_readl/writel, the global registers are specified as offsets starting from the beginning of the xHCI address space, but the memory region pointed to by dwc->regs already maps to the start of the global addresses. Fix by offsetting each of the regs relative to DWC3_GLOBALS_REGS_START. Signed-off-by: Jack Pham <jackp@codeaurora.org> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: remove use of __devexitBill Pemberton2012-11-211-1/+1
| | | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devexit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Peter Korsgaard <jacmet@sunsite.dk> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Acked-by: Felipe Balbi <balbi@ti.com> Cc: Li Yang <leoli@freescale.com> Cc: Alan Stern <stern@rowland.harvard.edu> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: remove use of __devinitBill Pemberton2012-11-211-1/+1
| | | | | | | | | | | | | | | | | | | | CONFIG_HOTPLUG is going away as an option so __devinit is no longer needed. Signed-off-by: Bill Pemberton <wfp5p@virginia.edu> Cc: Peter Korsgaard <jacmet@sunsite.dk> Cc: Alexander Shishkin <alexander.shishkin@linux.intel.com> Acked-by: Felipe Balbi <balbi@ti.com> Cc: Li Yang <leoli@freescale.com> Acked-by: Alan Stern <stern@rowland.harvard.edu> Cc: Geoff Levand <geoff@infradead.org> Cc: Wan ZongShun <mcuos.com@gmail.com> Cc: Olav Kongas <ok@artecdesign.ee> Cc: Lennert Buytenhek <kernel@wantstofly.org> Cc: Ben Dooks <ben-linux@fluff.org> Cc: Kukjin Kim <kgene.kim@samsung.com> Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com> Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
* usb: dwc3: debugfs: fix off by one when entering testmodeGerard Cauvy2012-02-101-3/+3
| | | | | | | | | | | | | When implementing the USB2 testmode support via debugfs, Felipe has committed a mistake when counting the number of letters of some of the strings, resulting on an off by one error which prevented some of the Test modes to be entered properly. This patch, fixes that mistake. Signed-off-by: Gerard Cauvy <g-cauvy1@ti.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: debugfs: fix error checkFelipe Balbi2012-02-061-10/+10
| | | | | | | | | | | debugfs APIs will return NULL if it fails to create the file/directory we ask it to create. Instead of checking for IS_ERR(ptr) we must check for !ptr. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: gadget: allow Link state changes via debugfsFelipe Balbi2012-02-061-0/+110
| | | | | | | | This is very useful for low level link testing where we might not have a USB Host stack, only a scope to verify signal integrity. Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: gadget: allow testmodes changes via debugfsFelipe Balbi2012-02-061-0/+92
| | | | | | | | This is very useful for low level Link Testing where we might not have a USB Host stack, only a scope to verify signal integrity. Signed-off-by: Felipe Balbi <balbi@ti.com>
* Merge branch 'usb-next' of ↵Linus Torvalds2012-01-091-3/+80
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb * 'usb-next' of git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb: (232 commits) USB: Add USB-ID for Multiplex RC serial adapter to cp210x.c xhci: Clean up 32-bit build warnings. USB: update documentation for usbmon usb: usb-storage doesn't support dynamic id currently, the patch disables the feature to fix an oops drivers/usb/class/cdc-acm.c: clear dangling pointer drivers/usb/dwc3/dwc3-pci.c: introduce missing kfree drivers/usb/host/isp1760-if.c: introduce missing kfree usb: option: add ZD Incorporated HSPA modem usb: ch9: fix up MaxStreams helper USB: usb-skeleton.c: cleanup open_count USB: usb-skeleton.c: fix open/disconnect race xhci: Properly handle COMP_2ND_BW_ERR USB: remove dead code from suspend/resume path USB: add quirk for another camera drivers: usb: wusbcore: Fix dependency for USB_WUSB xhci: Better debugging for critical host errors. xhci: Be less verbose during URB cancellation. xhci: Remove debugging about ring structure allocation. xhci: Remove debugging about toggling cycle bits. xhci: Remove debugging for individual transfers. ...
| * usb: dwc3: fix sparse errorsFelipe Balbi2011-12-121-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | sparse caught three mistakes on this driver, fix them: drivers/usb/dwc3/ep0.c:806:29: warning: duplicate const drivers/usb/dwc3/debugfs.c:481:15: warning: symbol 'dwc3_debugfs_init' \ was not declared. Should it be static? drivers/usb/dwc3/debugfs.c:518:16: warning: symbol 'dwc3_debugfs_exit' \ was not declared. Should it be static? Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: fix few coding style problemsFelipe Balbi2011-12-121-3/+2Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | There were a few coding style issues with this driver which are now fixed: drivers/usb/dwc3/debugfs.c:48: WARNING: Use #include \ <linux/uaccess.h> instead of <asm/uaccess.h> drivers/usb/dwc3/debugfs.c:484: ERROR: space required \ before the open brace '{' drivers/usb/dwc3/ep0.c:261: WARNING: line over 80 characters drivers/usb/dwc3/ep0.c:287: WARNING: suspect code indent \ for conditional statements (16, 23) drivers/usb/dwc3/gadget.c:749: WARNING: line over 80 characters drivers/usb/dwc3/gadget.c:1267: WARNING: line over 80 characters drivers/usb/dwc3/gadget.h:116: WARNING: line over 80 characters drivers/usb/dwc3/io.h:42: WARNING: Use #include \ <linux/io.h> instead of <asm/io.h> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: use a helper function for operation mode settingSebastian Andrzej Siewior2011-12-121-12/+9Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | There are two where need to set operational mode: - during initialization while we decide to run in host,device or DRD mode - at runtime via the debugfs interface. This patch provides a new function which sets the operational mode and moves its initialiation to the mode switch instead in the gadget code itself. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: debugfs: hold the lock in during mode changeSebastian Andrzej Siewior2011-12-121-2/+0Star
| | | | | | | | | | | | | | | | | | | | | | The read and write operation is atomic and we need no locking around this operations. What we need however is a lock that is held which ensures that the content of the DWC3_GCTL has not been changed. With this, the conten may have been change changed after the first but before our write back. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
| * usb: dwc3: debugfs: add support for changing port modeFelipe Balbi2011-12-121-0/+82
| | | | | | | | | | | | | | This makes testing a lot easier when trying to switch between host and device modes. Signed-off-by: Felipe Balbi <balbi@ti.com>
* | usb: dwc3: fix a warningAlessandro Rubini2011-11-191-1/+0Star
| | | | | | | | | | | | | | The previous patch left an unused variable, I apologize. Signed-off-by: Alessandro Rubini <rubini@gnudd.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | usb: dwc3: use debugfs_print_regs32()Alessandro Rubini2011-11-181-12/+3Star
|/ | | | | | | | | | This a use example of the regs32 utilities in debugfs, although this fuse use ":" as separator between name and value, and debugs uses "=" (as it looked to me a more common practice). Signed-off-by: Alessandro Rubini <rubini@gnudd.com> Acked-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: dwc: remove "All rights reserved" statement.Sebastian Andrzej Siewior2011-10-041-1/+0Star
| | | | | | | | | | Some people think that this line is not compatible with the GPL. The statement was required due to the Buenos Aires Convention and is now deprecated. I remove it because it is said that it is pointless nowdays. Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: dwc3: debugfs: remove test mode interfaceSebastian Andrzej Siewior2011-09-091-94/+0Star
| | | | | | | | | | | | | | | | | | There are some issues around for enabling/disabling this mode and handling it. It does not work perfectly (yet). However we have a few gadgets tested successfuly so far. That means we are quite confident that we won't need this in near future. So I'm for removing it and bringing a working version back once there is a need for it. Thanks to Dan Carpenter who spotted the wrong memory handling here. [ balbi@ti.com : made it actually apply ] Cc: Dan Carpenter <error27@gmail.com> Cc: wharms@bfs.de Signed-off-by: Sebastian Andrzej Siewior <bigeasy@linutronix.de> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: dwc3: debugfs: add a kfree() on error to dwc3_testmode_open()Dan Carpenter2011-09-091-1/+3
| | | | | | | | We may as well fix this potential leak so we don't have to listen to the static checkers complain. Signed-off-by: Dan Carpenter <error27@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: Introduce DesignWare USB3 DRD DriverFelipe Balbi2011-08-231-0/+534
The DesignWare USB3 is a highly configurable IP Core which can be instantiated as Dual-Role Device (DRD), Peripheral Only and Host Only (XHCI) configurations. Several other parameters can be configured like amount of FIFO space, amount of TX and RX endpoints, amount of Host Interrupters, etc. The current driver has been validated with a virtual model of version 1.73a of that core and with an FPGA burned with version 1.83a of the DRD core. We have support for PCIe bus, which is used on FPGA prototyping, and for the OMAP5, more adaptation (or glue) layers can be easily added and the driver is half prepared to handle any possible configuration the HW engineer has chosen considering we have the information on one of the GHWPARAMS registers to do runtime checking of certain features. More runtime checks can, and should, be added in order to make this driver even more flexible with regards to number of endpoints, FIFO sizes, transfer types, etc. While this supports only the device side, for now, we will add support for Host side (xHCI - see the updated series Sebastian has sent [1]) and OTG after we have it all stabilized. [1] http://marc.info/?l=linux-usb&m=131341992020339&w=2 Signed-off-by: Felipe Balbi <balbi@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>