Lines 208-215
static void __devinit quirk_usb_handoff_
Link Here
|
208 |
} |
208 |
} |
209 |
if (wait_time <= 0) |
209 |
if (wait_time <= 0) |
210 |
printk(KERN_WARNING "%s %s: BIOS handoff " |
210 |
printk(KERN_WARNING "%s %s: BIOS handoff " |
211 |
"failed (BIOS bug ?)\n", |
211 |
"failed (BIOS bug ?) %08x\n", |
212 |
pdev->dev.bus_id, "OHCI"); |
212 |
pdev->dev.bus_id, "OHCI", |
|
|
213 |
readl(base + OHCI_CONTROL)); |
213 |
|
214 |
|
214 |
/* reset controller, preserving RWC */ |
215 |
/* reset controller, preserving RWC */ |
215 |
writel(control & OHCI_CTRL_RWC, base + OHCI_CONTROL); |
216 |
writel(control & OHCI_CTRL_RWC, base + OHCI_CONTROL); |
Lines 234-245
static void __devinit quirk_usb_disable_
Link Here
|
234 |
u8 offset, cap_length; |
235 |
u8 offset, cap_length; |
235 |
int count = 256/4; |
236 |
int count = 256/4; |
236 |
|
237 |
|
237 |
if (!mmio_resource_enabled(pdev, 0)) |
238 |
printk("quirk_usb_disable_ehci()\n"); |
|
|
239 |
|
240 |
if (!mmio_resource_enabled(pdev, 0)) { |
241 |
printk("quirk_usb_disable_ehci() no mmio\n"); |
238 |
return; |
242 |
return; |
|
|
243 |
} |
239 |
|
244 |
|
240 |
base = ioremap_nocache(pci_resource_start(pdev, 0), |
245 |
base = ioremap_nocache(pci_resource_start(pdev, 0), |
241 |
pci_resource_len(pdev, 0)); |
246 |
pci_resource_len(pdev, 0)); |
242 |
if (base == NULL) return; |
247 |
if (base == NULL) { |
|
|
248 |
printk("quirk_usb_disable_ehci() no base\n"); |
249 |
return; |
250 |
} |
243 |
|
251 |
|
244 |
cap_length = readb(base); |
252 |
cap_length = readb(base); |
245 |
op_reg_base = base + cap_length; |
253 |
op_reg_base = base + cap_length; |
Lines 261-266
static void __devinit quirk_usb_disable_
Link Here
|
261 |
pr_debug("%s %s: BIOS handoff\n", |
269 |
pr_debug("%s %s: BIOS handoff\n", |
262 |
pdev->dev.bus_id, "EHCI"); |
270 |
pdev->dev.bus_id, "EHCI"); |
263 |
|
271 |
|
|
|
272 |
#if 0 |
273 |
/* aleksey_gorelov@phoenix.com reports that some systems need SMI forced on, |
274 |
* but that seems dubious in general (the BIOS left it off intentionally) |
275 |
* and is known to prevent some systems from booting. so we won't do this |
276 |
* unless maybe we can determine when we're on a system that needs SMI forced. |
277 |
*/ |
264 |
/* BIOS workaround (?): be sure the |
278 |
/* BIOS workaround (?): be sure the |
265 |
* pre-Linux code receives the SMI |
279 |
* pre-Linux code receives the SMI |
266 |
*/ |
280 |
*/ |
Lines 270-275
static void __devinit quirk_usb_disable_
Link Here
|
270 |
pci_write_config_dword(pdev, |
284 |
pci_write_config_dword(pdev, |
271 |
offset + EHCI_USBLEGCTLSTS, |
285 |
offset + EHCI_USBLEGCTLSTS, |
272 |
val | EHCI_USBLEGCTLSTS_SOOE); |
286 |
val | EHCI_USBLEGCTLSTS_SOOE); |
|
|
287 |
#endif |
273 |
} |
288 |
} |
274 |
|
289 |
|
275 |
/* always say Linux will own the hardware |
290 |
/* always say Linux will own the hardware |
Lines 292-299
static void __devinit quirk_usb_disable_
Link Here
|
292 |
* it down, and hope nothing goes too wrong |
307 |
* it down, and hope nothing goes too wrong |
293 |
*/ |
308 |
*/ |
294 |
printk(KERN_WARNING "%s %s: BIOS handoff " |
309 |
printk(KERN_WARNING "%s %s: BIOS handoff " |
295 |
"failed (BIOS bug ?)\n", |
310 |
"failed (BIOS bug ?) %08x\n", |
296 |
pdev->dev.bus_id, "EHCI"); |
311 |
pdev->dev.bus_id, "EHCI", cap); |
297 |
pci_write_config_byte(pdev, offset + 2, 0); |
312 |
pci_write_config_byte(pdev, offset + 2, 0); |
298 |
} |
313 |
} |
299 |
|
314 |
|
Lines 344-349
static void __devinit quirk_usb_disable_
Link Here
|
344 |
|
359 |
|
345 |
iounmap(base); |
360 |
iounmap(base); |
346 |
|
361 |
|
|
|
362 |
printk("quirk_usb_disable_ehci() complete\n"); |
363 |
|
347 |
return; |
364 |
return; |
348 |
} |
365 |
} |
349 |
|
366 |
|