diff options
Diffstat (limited to 'drivers/usb/host/ehci-hcd.c')
-rw-r--r-- | drivers/usb/host/ehci-hcd.c | 67 |
1 files changed, 0 insertions, 67 deletions
diff --git a/drivers/usb/host/ehci-hcd.c b/drivers/usb/host/ehci-hcd.c index c4e15ed1405a..35cdba10411b 100644 --- a/drivers/usb/host/ehci-hcd.c +++ b/drivers/usb/host/ehci-hcd.c | |||
@@ -275,58 +275,6 @@ static void ehci_work(struct ehci_hcd *ehci); | |||
275 | 275 | ||
276 | /*-------------------------------------------------------------------------*/ | 276 | /*-------------------------------------------------------------------------*/ |
277 | 277 | ||
278 | #ifdef CONFIG_CPU_FREQ | ||
279 | |||
280 | #include <linux/cpufreq.h> | ||
281 | |||
282 | static void ehci_cpufreq_pause (struct ehci_hcd *ehci) | ||
283 | { | ||
284 | unsigned long flags; | ||
285 | |||
286 | spin_lock_irqsave(&ehci->lock, flags); | ||
287 | if (!ehci->cpufreq_changing++) | ||
288 | qh_inactivate_split_intr_qhs(ehci); | ||
289 | spin_unlock_irqrestore(&ehci->lock, flags); | ||
290 | } | ||
291 | |||
292 | static void ehci_cpufreq_unpause (struct ehci_hcd *ehci) | ||
293 | { | ||
294 | unsigned long flags; | ||
295 | |||
296 | spin_lock_irqsave(&ehci->lock, flags); | ||
297 | if (!--ehci->cpufreq_changing) | ||
298 | qh_reactivate_split_intr_qhs(ehci); | ||
299 | spin_unlock_irqrestore(&ehci->lock, flags); | ||
300 | } | ||
301 | |||
302 | /* | ||
303 | * ehci_cpufreq_notifier is needed to avoid MMF errors that occur when | ||
304 | * EHCI controllers that don't cache many uframes get delayed trying to | ||
305 | * read main memory during CPU frequency transitions. This can cause | ||
306 | * split interrupt transactions to not be completed in the required uframe. | ||
307 | * This has been observed on the Broadcom/ServerWorks HT1000 controller. | ||
308 | */ | ||
309 | static int ehci_cpufreq_notifier(struct notifier_block *nb, unsigned long val, | ||
310 | void *data) | ||
311 | { | ||
312 | struct ehci_hcd *ehci = container_of(nb, struct ehci_hcd, | ||
313 | cpufreq_transition); | ||
314 | |||
315 | switch (val) { | ||
316 | case CPUFREQ_PRECHANGE: | ||
317 | ehci_cpufreq_pause(ehci); | ||
318 | break; | ||
319 | case CPUFREQ_POSTCHANGE: | ||
320 | ehci_cpufreq_unpause(ehci); | ||
321 | break; | ||
322 | } | ||
323 | return 0; | ||
324 | } | ||
325 | |||
326 | #endif | ||
327 | |||
328 | /*-------------------------------------------------------------------------*/ | ||
329 | |||
330 | static void ehci_watchdog (unsigned long param) | 278 | static void ehci_watchdog (unsigned long param) |
331 | { | 279 | { |
332 | struct ehci_hcd *ehci = (struct ehci_hcd *) param; | 280 | struct ehci_hcd *ehci = (struct ehci_hcd *) param; |
@@ -460,10 +408,6 @@ static void ehci_stop (struct usb_hcd *hcd) | |||
460 | ehci_writel(ehci, 0, &ehci->regs->intr_enable); | 408 | ehci_writel(ehci, 0, &ehci->regs->intr_enable); |
461 | spin_unlock_irq(&ehci->lock); | 409 | spin_unlock_irq(&ehci->lock); |
462 | 410 | ||
463 | #ifdef CONFIG_CPU_FREQ | ||
464 | cpufreq_unregister_notifier(&ehci->cpufreq_transition, | ||
465 | CPUFREQ_TRANSITION_NOTIFIER); | ||
466 | #endif | ||
467 | /* let companion controllers work when we aren't */ | 411 | /* let companion controllers work when we aren't */ |
468 | ehci_writel(ehci, 0, &ehci->regs->configured_flag); | 412 | ehci_writel(ehci, 0, &ehci->regs->configured_flag); |
469 | 413 | ||
@@ -569,17 +513,6 @@ static int ehci_init(struct usb_hcd *hcd) | |||
569 | } | 513 | } |
570 | ehci->command = temp; | 514 | ehci->command = temp; |
571 | 515 | ||
572 | #ifdef CONFIG_CPU_FREQ | ||
573 | INIT_LIST_HEAD(&ehci->split_intr_qhs); | ||
574 | /* | ||
575 | * If the EHCI controller caches enough uframes, this probably | ||
576 | * isn't needed unless there are so many low/full speed devices | ||
577 | * that the controller's can't cache it all. | ||
578 | */ | ||
579 | ehci->cpufreq_transition.notifier_call = ehci_cpufreq_notifier; | ||
580 | cpufreq_register_notifier(&ehci->cpufreq_transition, | ||
581 | CPUFREQ_TRANSITION_NOTIFIER); | ||
582 | #endif | ||
583 | return 0; | 516 | return 0; |
584 | } | 517 | } |
585 | 518 | ||