]> git.proxmox.com Git - mirror_ubuntu-disco-kernel.git/commitdiff
USB: ohci: make distrust_firmware a quirk
authorDmitry Baryshkov <dbaryshkov@gmail.com>
Sun, 6 Jul 2008 19:35:01 +0000 (23:35 +0400)
committerGreg Kroah-Hartman <gregkh@suse.de>
Thu, 14 Aug 2008 00:32:52 +0000 (17:32 -0700)
Signed-off-by: Dmitry Baryshkov <dbaryshkov@gmail.com>
Acked-by: David Brownell <dbrownell@users.sourceforge.net>
Cc: Alan Stern <stern@rowland.harvard.edu>
Signed-off-by: Greg Kroah-Hartman <gregkh@suse.de>
drivers/usb/host/ohci-hcd.c
drivers/usb/host/ohci-omap.c
drivers/usb/host/ohci.h

index 26bc47941d0132f46badea48da3855daf7dedfff..96fe76e9a6c46e22cb8a69c4a660a04a1f4ebcc7 100644 (file)
@@ -483,6 +483,9 @@ static int ohci_init (struct ohci_hcd *ohci)
        int ret;
        struct usb_hcd *hcd = ohci_to_hcd(ohci);
 
+       if (distrust_firmware)
+               ohci->flags |= OHCI_QUIRK_HUB_POWER;
+
        disable (ohci);
        ohci->regs = hcd->regs;
 
@@ -689,7 +692,8 @@ retry:
                temp |= RH_A_NOCP;
                temp &= ~(RH_A_POTPGT | RH_A_NPS);
                ohci_writel (ohci, temp, &ohci->regs->roothub.a);
-       } else if ((ohci->flags & OHCI_QUIRK_AMD756) || distrust_firmware) {
+       } else if ((ohci->flags & OHCI_QUIRK_AMD756) ||
+                       (ohci->flags & OHCI_QUIRK_HUB_POWER)) {
                /* hub power always on; required for AMD-756 and some
                 * Mac platforms.  ganged overcurrent reporting, if any.
                 */
index 94dfca02f7e169228197c0a9ebf6b3cd970fade1..5b2f17838cab919aadbf211cf08426a6acb14576 100644 (file)
@@ -260,7 +260,7 @@ static int ohci_omap_init(struct usb_hcd *hcd)
                        omap_cfg_reg(W4_USB_HIGHZ);
                }
                ohci_writel(ohci, rh, &ohci->regs->roothub.a);
-               distrust_firmware = 0;
+               ohci->flags &= ~OHCI_QUIRK_HUB_POWER;
        } else if (machine_is_nokia770()) {
                /* We require a self-powered hub, which should have
                 * plenty of power. */
index dc544ddc784962831637e749c4d50420ee24aa0b..73b4a44c27265d0a4a733f42861145a71ecaacc9 100644 (file)
@@ -399,6 +399,7 @@ struct ohci_hcd {
 #define        OHCI_QUIRK_ZFMICRO      0x20                    /* Compaq ZFMicro chipset*/
 #define        OHCI_QUIRK_NEC          0x40                    /* lost interrupts */
 #define        OHCI_QUIRK_FRAME_NO     0x80                    /* no big endian frame_no shift */
+#define        OHCI_QUIRK_HUB_POWER    0x100                   /* distrust firmware power/oc setup */
        // there are also chip quirks/bugs in init logic
 
        struct work_struct      nec_work;       /* Worker for NEC quirk */