summaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-omap.c
Commit message (Collapse)AuthorAgeFilesLines
...
* usb: ehci-omap: Show fatal probing time errors to end userJarkko Nikula2011-02-011-3/+3
| | | | | | | | | | There are a few error paths in ehci_hcd_omap_probe that can be triggered because of memory allocation or hw failure. Change those dev_dbg error prints to dev_err with an error code printed so that the end users are able to notice the issue. Signed-off-by: Jarkko Nikula <jhnikula@gmail.com> Signed-off-by: Felipe Balbi <balbi@ti.com>
* usb: ehci-omap: fix tll channel enable maskAnand Gadiyar2010-12-161-3/+3
| | | | | | | | The TLL channel enable code searches for the wrong mask, and could end up enabling the wrong port. Fix this. Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: ehci-omap: Add OMAP4 supportAnand Gadiyar2010-11-301-42/+212
| | | | | | | | | | | | | | Update the ehci-omap glue layer to support the controller in the OMAP4. Major differences from OMAP3 is that the OMAP4 has per-port clocking, and supports ULPI output clocking mode. The old input clocking mode is not supported. Also, there are only 2 externally available ports as against 3 in the OMAP3. The third port is internally tied off and should not be used. Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
* usb: ehci-omap: add helpers for checking port modeAnand Gadiyar2010-11-301-9/+12
| | | | | | | | Introduce helper functions to test port mode. These checks are performed in several places in the driver, and these helpers improve readability. Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
* usb: ehci-omap: use clkdev aliases for functional clocksAnand Gadiyar2010-11-301-2/+2
| | | | | | | | Use the recently updated aliases to get functional clocks needed by the driver. This allows the driver to acquire OMAP4-specific clocks without having to use different clock names for OMAP3 and OMAP4. Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
* usb: ehci-omap: don't hard-code TLL channel countKeshava Munegowda2010-11-301-4/+5
| | | | | | | | | Make the TLL channel count a parameter instead of a hardcoded value. This allows us to be flexible with future OMAP revisions which could have a different number of channels. Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
* usb: ehci-omap: update clock names to be more genericKeshava Munegowda2010-11-301-22/+22
| | | | | | | | | | | | Rename usbhost2_120m_fck to usbhost_hs_fck and usbhost1_48m_fck to usbhost_fs_fck, to better reflect the clocks' functionalities. In OMAP4, the frequencies for the corresponding clocks are not necessarily the same as with OMAP3, however the functionalities are. Signed-off-by: Keshava Munegowda <keshava_mgowda@ti.com> Signed-off-by: Anand Gadiyar <gadiyar@ti.com>
* USB: ehci_omap: fix device detect issue with modulesAjay Kumar Gupta2010-08-101-0/+36
| | | | | | | | | | | | | | Currently devices don't get detected automatically if the ehci module is inserted 2nd time onward. We need to disconnect and reconnect the device for it to get detected and enumerated. Resetting the USB PHY using PHY reset comamnd over ULPI fixes this issue. Tested on OMAP3EVM. Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Acked-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6Linus Torvalds2010-05-211-2/+19
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6: (229 commits) USB: remove unused usb_buffer_alloc and usb_buffer_free macros usb: musb: update gfp/slab.h includes USB: ftdi_sio: fix legacy SIO-device header USB: kl5usb105: reimplement using generic framework USB: kl5usb105: minor clean ups USB: kl5usb105: fix memory leak USB: io_ti: use kfifo to implement write buffering USB: io_ti: remove unsused private counter USB: ti_usb: use kfifo to implement write buffering USB: ir-usb: fix incorrect write-buffer length USB: aircable: fix incorrect write-buffer length USB: safe_serial: straighten out read processing USB: safe_serial: reimplement read using generic framework USB: safe_serial: reimplement write using generic framework usb-storage: always print quirks USB: usb-storage: trivial debug improvements USB: oti6858: use port write fifo USB: oti6858: use kfifo to implement write buffering USB: cypress_m8: use kfifo to implement write buffering USB: cypress_m8: remove unused drain define ... Fix up conflicts (due to usb_buffer_alloc/free renaming) in drivers/input/tablet/acecad.c drivers/input/tablet/kbtab.c drivers/input/tablet/wacom_sys.c drivers/media/video/gspca/gspca.c sound/usb/usbaudio.c
| * USB: ehci-omap: Fix resume failures after bus suspendAnand Gadiyar2010-05-201-0/+14
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | An undocumented "feature" in the OMAP3 EHCI controller causes suspended ports to be taken out of suspend when the USBCMD.Run/Stop bit is cleared (this bit is normally cleared when ehci_bus_suspend is called). This "feature" breaks suspend-resume if the root-hub is allowed to suspend. (The controller thinks it is in resume, and the PHY thinks it is still in suspend). There is an undocumented register bit that can be used to disable this feature and restore normal behavior. Set this bit so suspend-resume can work normally. Tested on OMAP3 SDPs with the NXP ISP1504 and NXP ISP1703 PHYs. Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * USB: ehci-omap: fix Si version related programmingAjay Kumar Gupta2010-05-201-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | AM3517 is based on ES3.1 thus ES2.x related programming is invalid for it so updating ES2.x programming. Also fixed below checkpatch warning: WARNING: unnecessary whitespace before a quoted newline Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
| * usb: ehci-omap: fix compilation warningAjay Kumar Gupta2010-05-201-0/+3
| | | | | | | | | | | | | | | | | | | | Fixes below compilation warning: drivers/usb/host/ehci-hcd.c:425: warning: 'ehci_port_power' defined but not used Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* | Merge branch 'for-linus' of ↵Linus Torvalds2010-05-201-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial * 'for-linus' of git://git.kernel.org/pub/scm/linux/kernel/git/jikos/trivial: (44 commits) vlynq: make whole Kconfig-menu dependant on architecture add descriptive comment for TIF_MEMDIE task flag declaration. EEPROM: max6875: Header file cleanup EEPROM: 93cx6: Header file cleanup EEPROM: Header file cleanup agp: use NULL instead of 0 when pointer is needed rtc-v3020: make bitfield unsigned PCI: make bitfield unsigned jbd2: use NULL instead of 0 when pointer is needed cciss: fix shadows sparse warning doc: inode uses a mutex instead of a semaphore. uml: i386: Avoid redefinition of NR_syscalls fix "seperate" typos in comments cocbalt_lcdfb: correct sections doc: Change urls for sparse Powerpc: wii: Fix typo in comment i2o: cleanup some exit paths Documentation/: it's -> its where appropriate UML: Fix compiler warning due to missing task_struct declaration UML: add kernel.h include to signal.c ...
| * fix "seperate" typos in commentsAnand Gadiyar2010-05-101-1/+1
| | | | | | | | | | | | | | s/seperate/separate Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Jiri Kosina <jkosina@suse.cz>
* | USB: ehci: omap: fix kernel panic with rmmodAjay Kumar Gupta2010-04-231-2/+4
|/ | | | | | | | | | Sets the regulator values to NULL if they are not defined. This is required to fix the kernel panic in exit path when EHCI module is removed on the platforms where EHCI regulator are not set. Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* include cleanup: Update gfp.h and slab.h includes to prepare for breaking ↵Tejun Heo2010-03-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | implicit slab.h inclusion from percpu.h percpu.h is included by sched.h and module.h and thus ends up being included when building most .c files. percpu.h includes slab.h which in turn includes gfp.h making everything defined by the two files universally available and complicating inclusion dependencies. percpu.h -> slab.h dependency is about to be removed. Prepare for this change by updating users of gfp and slab facilities include those headers directly instead of assuming availability. As this conversion needs to touch large number of source files, the following script is used as the basis of conversion. http://userweb.kernel.org/~tj/misc/slabh-sweep.py The script does the followings. * Scan files for gfp and slab usages and update includes such that only the necessary includes are there. ie. if only gfp is used, gfp.h, if slab is used, slab.h. * When the script inserts a new include, it looks at the include blocks and try to put the new include such that its order conforms to its surrounding. It's put in the include block which contains core kernel includes, in the same order that the rest are ordered - alphabetical, Christmas tree, rev-Xmas-tree or at the end if there doesn't seem to be any matching order. * If the script can't find a place to put a new include (mostly because the file doesn't have fitting include block), it prints out an error message indicating which .h file needs to be added to the file. The conversion was done in the following steps. 1. The initial automatic conversion of all .c files updated slightly over 4000 files, deleting around 700 includes and adding ~480 gfp.h and ~3000 slab.h inclusions. The script emitted errors for ~400 files. 2. Each error was manually checked. Some didn't need the inclusion, some needed manual addition while adding it to implementation .h or embedding .c file was more appropriate for others. This step added inclusions to around 150 files. 3. The script was run again and the output was compared to the edits from #2 to make sure no file was left behind. 4. Several build tests were done and a couple of problems were fixed. e.g. lib/decompress_*.c used malloc/free() wrappers around slab APIs requiring slab.h to be added manually. 5. The script was run on all .h files but without automatically editing them as sprinkling gfp.h and slab.h inclusions around .h files could easily lead to inclusion dependency hell. Most gfp.h inclusion directives were ignored as stuff from gfp.h was usually wildly available and often used in preprocessor macros. Each slab.h inclusion directive was examined and added manually as necessary. 6. percpu.h was updated not to include slab.h. 7. Build test were done on the following configurations and failures were fixed. CONFIG_GCOV_KERNEL was turned off for all tests (as my distributed build env didn't work with gcov compiles) and a few more options had to be turned off depending on archs to make things build (like ipr on powerpc/64 which failed due to missing writeq). * x86 and x86_64 UP and SMP allmodconfig and a custom test config. * powerpc and powerpc64 SMP allmodconfig * sparc and sparc64 SMP allmodconfig * ia64 SMP allmodconfig * s390 SMP allmodconfig * alpha SMP allmodconfig * um on x86_64 SMP allmodconfig 8. percpu.h modifications were reverted so that it could be applied as a separate patch and serve as bisection point. Given the fact that I had only a couple of failures from tests on step 6, I'm fairly confident about the coverage of this conversion patch. If there is a breakage, it's likely to be something in one of the arch headers which should be easily discoverable easily on most builds of the specific arch. Signed-off-by: Tejun Heo <tj@kernel.org> Guess-its-ok-by: Christoph Lameter <cl@linux-foundation.org> Cc: Ingo Molnar <mingo@redhat.com> Cc: Lee Schermerhorn <Lee.Schermerhorn@hp.com>
* USB: ehci: omap: Update TODO list in commentsAnand Gadiyar2010-03-021-2/+1Star
| | | | | | | | | DPLL5 programming was moved out of this file before submission. Update the TODO list in the comments to reflect this Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: ehci: omap: use default interrupt thresholdAnand Gadiyar2010-03-021-4/+0Star
| | | | | | | | | | The current driver reduces the interrupt threshold to 1 microframe. This was an accidental change and is not really required. The default of 8 microframes will do just fine. So change it back. Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: omap: ehci: kill 2 compile warningsAnand Gadiyar2010-03-021-0/+3
| | | | | | | | | | | Kill these compile warnings: CC [M] drivers/usb/host/ehci-hcd.o drivers/usb/host/ehci-dbg.c:45: warning: 'dbg_hcs_params' defined but not used drivers/usb/host/ehci-dbg.c:89: warning: 'dbg_hcc_params' defined but not used Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: host: ehci: adding regulator framework in ehci-omap.c driver.Ajay Kumar Gupta2010-03-021-0/+36
| | | | | | | | | | | | | | | | OMAP3 has three HS USB ports so it can have three different regulator for each PHY connected to each port. Currently these regulators are assumed to be optional and driver doesn't fail but continue with the initialization if it doesn't get any regulators. Regulator supply names has to be mapped in board files as 'hsusbN' where 'N' is port number and can be {0, 1 ,2}. Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* usb: host: ehci: fix missing kfree in remove path alsoAjay Kumar Gupta2010-03-021-0/+1
| | | | | | | | | Added missing kfree() in ehci_hcd_omap_remove(). Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB ehci: replace mach header with platThomas Weber2009-12-161-1/+1
| | | | | | | | | | Replace the mach/usb.h with plat/usb.h Cc: linux-usb-devel@lists.sourceforge.net Signed-off-by: Thomas Weber <weber@corscience.de> Acked-by: Felipe Balbi <felipe.balbi@nokia.com> Acked-by: Greg Kroah-Hartman <gregkh@suse.de> Signed-off-by: Tony Lindgren <tony@atomide.com>
* USB: ehci-omap.c: introduce missing kfreeJulia Lawall2009-12-111-1/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Error handling code following a kzalloc should free the allocated data. The semantic match that finds this problem is as follows: (http://www.emn.fr/x-info/coccinelle/) // <smpl> @r exists@ local idexpression x; statement S; expression E; identifier f,f1,l; position p1,p2; expression *ptr != NULL; @@ x@p1 = \(kmalloc\|kzalloc\|kcalloc\)(...); ... if (x == NULL) S <... when != x when != if (...) { <+...x...+> } ( x->f1 = E | (x->f1 == NULL || ...) | f(...,x->f1,...) ) ...> ( return \(0\|<+...x...+>\|ptr\); | return@p2 ...; ) @script:python@ p1 << r.p1; p2 << r.p2; @@ print "* file: %s kmalloc %s return %s" % (p1[0].file,p1[0].line,p2[0].line) // </smpl> Signed-off-by: Julia Lawall <julia@diku.dk> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
* USB: host: ehci: introduce omap ehci-hcd driverFelipe Balbi2009-12-111-0/+755
this driver has been sitting in linux-omap tree for quite some time. It adds support for omap's ehci controller. Signed-off-by: Felipe Balbi <felipe.balbi@nokia.com> Signed-off-by: Vikram Pandita <vikram.pandita@ti.com> Signed-off-by: Ajay Kumar Gupta <ajay.gupta@ti.com> Signed-off-by: Anand Gadiyar <gadiyar@ti.com> Cc: David Brownell <dbrownell@users.sourceforge.net> Cc: Alan Stern <stern@rowland.harvard.edu> Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>