diff options
Diffstat (limited to 'drivers/usb/host/pci-quirks.c')
-rw-r--r-- | drivers/usb/host/pci-quirks.c | 9 |
1 files changed, 4 insertions, 5 deletions
diff --git a/drivers/usb/host/pci-quirks.c b/drivers/usb/host/pci-quirks.c index 1045f846fbe2..20861650905e 100644 --- a/drivers/usb/host/pci-quirks.c +++ b/drivers/usb/host/pci-quirks.c | |||
@@ -8,7 +8,6 @@ | |||
8 | * (and others) | 8 | * (and others) |
9 | */ | 9 | */ |
10 | 10 | ||
11 | #include <linux/config.h> | ||
12 | #include <linux/types.h> | 11 | #include <linux/types.h> |
13 | #include <linux/kernel.h> | 12 | #include <linux/kernel.h> |
14 | #include <linux/pci.h> | 13 | #include <linux/pci.h> |
@@ -168,8 +167,6 @@ static int __devinit mmio_resource_enabled(struct pci_dev *pdev, int idx) | |||
168 | static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev) | 167 | static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev) |
169 | { | 168 | { |
170 | void __iomem *base; | 169 | void __iomem *base; |
171 | int wait_time; | ||
172 | u32 control; | ||
173 | 170 | ||
174 | if (!mmio_resource_enabled(pdev, 0)) | 171 | if (!mmio_resource_enabled(pdev, 0)) |
175 | return; | 172 | return; |
@@ -180,9 +177,10 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev) | |||
180 | 177 | ||
181 | /* On PA-RISC, PDC can leave IR set incorrectly; ignore it there. */ | 178 | /* On PA-RISC, PDC can leave IR set incorrectly; ignore it there. */ |
182 | #ifndef __hppa__ | 179 | #ifndef __hppa__ |
183 | control = readl(base + OHCI_CONTROL); | 180 | { |
181 | u32 control = readl(base + OHCI_CONTROL); | ||
184 | if (control & OHCI_CTRL_IR) { | 182 | if (control & OHCI_CTRL_IR) { |
185 | wait_time = 500; /* arbitrary; 5 seconds */ | 183 | int wait_time = 500; /* arbitrary; 5 seconds */ |
186 | writel(OHCI_INTR_OC, base + OHCI_INTRENABLE); | 184 | writel(OHCI_INTR_OC, base + OHCI_INTRENABLE); |
187 | writel(OHCI_OCR, base + OHCI_CMDSTATUS); | 185 | writel(OHCI_OCR, base + OHCI_CMDSTATUS); |
188 | while (wait_time > 0 && | 186 | while (wait_time > 0 && |
@@ -199,6 +197,7 @@ static void __devinit quirk_usb_handoff_ohci(struct pci_dev *pdev) | |||
199 | /* reset controller, preserving RWC */ | 197 | /* reset controller, preserving RWC */ |
200 | writel(control & OHCI_CTRL_RWC, base + OHCI_CONTROL); | 198 | writel(control & OHCI_CTRL_RWC, base + OHCI_CONTROL); |
201 | } | 199 | } |
200 | } | ||
202 | #endif | 201 | #endif |
203 | 202 | ||
204 | /* | 203 | /* |