aboutsummaryrefslogtreecommitdiffstats
path: root/drivers/usb/host/ehci-omap.c
diff options
context:
space:
mode:
authorLinus Torvalds <torvalds@linux-foundation.org>2010-05-21 00:26:12 -0400
committerLinus Torvalds <torvalds@linux-foundation.org>2010-05-21 00:26:12 -0400
commit7a9b149212f3716c598afe973b6261fd58453b7a (patch)
tree477716d84c71da124448b72278e98da28aadbd3d /drivers/usb/host/ehci-omap.c
parent3d62e3fdce8ef265a3706c52ae1ca6ab84e30f0e (diff)
parente26bcf37234c67624f62d9fc95f922b8dbda1363 (diff)
Merge git://git.kernel.org/pub/scm/linux/kernel/git/gregkh/usb-2.6
* 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
Diffstat (limited to 'drivers/usb/host/ehci-omap.c')
-rw-r--r--drivers/usb/host/ehci-omap.c21
1 files changed, 19 insertions, 2 deletions
diff --git a/drivers/usb/host/ehci-omap.c b/drivers/usb/host/ehci-omap.c
index 0cd6c7795d90..5450e628157f 100644
--- a/drivers/usb/host/ehci-omap.c
+++ b/drivers/usb/host/ehci-omap.c
@@ -116,6 +116,8 @@
116#define OMAP_UHH_DEBUG_CSR (0x44) 116#define OMAP_UHH_DEBUG_CSR (0x44)
117 117
118/* EHCI Register Set */ 118/* EHCI Register Set */
119#define EHCI_INSNREG04 (0xA0)
120#define EHCI_INSNREG04_DISABLE_UNSUSPEND (1 << 5)
119#define EHCI_INSNREG05_ULPI (0xA4) 121#define EHCI_INSNREG05_ULPI (0xA4)
120#define EHCI_INSNREG05_ULPI_CONTROL_SHIFT 31 122#define EHCI_INSNREG05_ULPI_CONTROL_SHIFT 31
121#define EHCI_INSNREG05_ULPI_PORTSEL_SHIFT 24 123#define EHCI_INSNREG05_ULPI_PORTSEL_SHIFT 24
@@ -352,8 +354,8 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
352 reg &= ~OMAP_UHH_HOSTCONFIG_P3_CONNECT_STATUS; 354 reg &= ~OMAP_UHH_HOSTCONFIG_P3_CONNECT_STATUS;
353 355
354 /* Bypass the TLL module for PHY mode operation */ 356 /* Bypass the TLL module for PHY mode operation */
355 if (omap_rev() <= OMAP3430_REV_ES2_1) { 357 if (cpu_is_omap3430() && (omap_rev() <= OMAP3430_REV_ES2_1)) {
356 dev_dbg(omap->dev, "OMAP3 ES version <= ES2.1 \n"); 358 dev_dbg(omap->dev, "OMAP3 ES version <= ES2.1\n");
357 if ((omap->port_mode[0] == EHCI_HCD_OMAP_MODE_PHY) || 359 if ((omap->port_mode[0] == EHCI_HCD_OMAP_MODE_PHY) ||
358 (omap->port_mode[1] == EHCI_HCD_OMAP_MODE_PHY) || 360 (omap->port_mode[1] == EHCI_HCD_OMAP_MODE_PHY) ||
359 (omap->port_mode[2] == EHCI_HCD_OMAP_MODE_PHY)) 361 (omap->port_mode[2] == EHCI_HCD_OMAP_MODE_PHY))
@@ -382,6 +384,18 @@ static int omap_start_ehc(struct ehci_hcd_omap *omap, struct usb_hcd *hcd)
382 dev_dbg(omap->dev, "UHH setup done, uhh_hostconfig=%x\n", reg); 384 dev_dbg(omap->dev, "UHH setup done, uhh_hostconfig=%x\n", reg);
383 385
384 386
387 /*
388 * An undocumented "feature" in the OMAP3 EHCI controller,
389 * causes suspended ports to be taken out of suspend when
390 * the USBCMD.Run/Stop bit is cleared (for example when
391 * we do ehci_bus_suspend).
392 * This breaks suspend-resume if the root-hub is allowed
393 * to suspend. Writing 1 to this undocumented register bit
394 * disables this feature and restores normal behavior.
395 */
396 ehci_omap_writel(omap->ehci_base, EHCI_INSNREG04,
397 EHCI_INSNREG04_DISABLE_UNSUSPEND);
398
385 if ((omap->port_mode[0] == EHCI_HCD_OMAP_MODE_TLL) || 399 if ((omap->port_mode[0] == EHCI_HCD_OMAP_MODE_TLL) ||
386 (omap->port_mode[1] == EHCI_HCD_OMAP_MODE_TLL) || 400 (omap->port_mode[1] == EHCI_HCD_OMAP_MODE_TLL) ||
387 (omap->port_mode[2] == EHCI_HCD_OMAP_MODE_TLL)) { 401 (omap->port_mode[2] == EHCI_HCD_OMAP_MODE_TLL)) {
@@ -659,6 +673,9 @@ static int ehci_hcd_omap_probe(struct platform_device *pdev)
659 goto err_add_hcd; 673 goto err_add_hcd;
660 } 674 }
661 675
676 /* root ports should always stay powered */
677 ehci_port_power(omap->ehci, 1);
678
662 return 0; 679 return 0;
663 680
664err_add_hcd: 681err_add_hcd: