• Home
  • History
  • Annotate
  • Raw
  • Download
  • only in /netgear-WNDR4500-V1.0.1.40_1.0.68/src/linux/linux-2.6/drivers/usb/host/

Lines Matching defs:ehci

19 /* this file is part of ehci-hcd.c */
20 static void qh_link_async (struct ehci_hcd *ehci, struct ehci_qh *qh);
21 static struct ehci_qh *qh_make (struct ehci_hcd *ehci, struct urb *urb, gfp_t flags);
37 struct ehci_hcd *ehci = hcd_to_ehci (hcd);
41 ehci_dbg(ehci, "suspend root hub\n");
43 if (time_before (jiffies, ehci->next_statechange))
46 port = HCS_N_PORTS (ehci->hcs_params);
47 spin_lock_irq (&ehci->lock);
51 ehci_quiesce (ehci);
54 ehci->command = ehci_readl(ehci, &ehci->regs->command);
55 if (ehci->reclaim)
56 ehci->reclaim_ready = 1;
57 ehci_work(ehci);
64 ehci->bus_suspended = 0;
66 u32 __iomem *reg = &ehci->regs->port_status [port];
67 u32 t1 = ehci_readl(ehci, reg) & ~PORT_RWC_BITS;
74 set_bit(port, &ehci->bus_suspended);
84 ehci_vdbg (ehci, "port %d, %08x -> %08x\n",
86 ehci_writel(ehci, t2, reg);
91 del_timer_sync (&ehci->watchdog);
92 ehci_halt (ehci);
99 ehci_writel(ehci, mask, &ehci->regs->intr_enable);
100 ehci_readl(ehci, &ehci->regs->intr_enable);
102 ehci->next_statechange = jiffies + msecs_to_jiffies(10);
103 spin_unlock_irq (&ehci->lock);
111 struct ehci_hcd *ehci = hcd_to_ehci (hcd);
115 if (time_before (jiffies, ehci->next_statechange))
117 spin_lock_irq (&ehci->lock);
125 temp = ehci_readl(ehci, &ehci->regs->intr_enable);
126 ehci_dbg(ehci, "resume root hub%s\n", temp ? "" : " after power loss");
131 ehci_writel(ehci, 0, &ehci->regs->intr_enable);
134 ehci_writel(ehci, 0, &ehci->regs->segment);
135 ehci_writel(ehci, ehci->periodic_dma, &ehci->regs->frame_list);
136 ehci_writel(ehci, (u32) ehci->async->qh_dma, &ehci->regs->async_next);
139 ehci_writel(ehci, ehci->command, &ehci->regs->command);
146 i = HCS_N_PORTS (ehci->hcs_params);
148 temp = ehci_readl(ehci, &ehci->regs->port_status [i]);
151 if (test_bit(i, &ehci->bus_suspended) &&
153 ehci->reset_done [i] = jiffies + msecs_to_jiffies (20);
156 ehci_writel(ehci, temp, &ehci->regs->port_status [i]);
158 i = HCS_N_PORTS (ehci->hcs_params);
161 temp = ehci_readl(ehci, &ehci->regs->port_status [i]);
162 if (test_bit(i, &ehci->bus_suspended) &&
165 ehci_writel(ehci, temp, &ehci->regs->port_status [i]);
166 ehci_vdbg (ehci, "resumed port %d\n", i + 1);
169 (void) ehci_readl(ehci, &ehci->regs->command);
173 if (ehci->async->qh_next.qh)
175 if (ehci->periodic_sched)
178 ehci->command |= temp;
179 ehci_writel(ehci, ehci->command, &ehci->regs->command);
182 ehci->next_statechange = jiffies + msecs_to_jiffies(5);
186 ehci_writel(ehci, INTR_MASK, &ehci->regs->intr_enable);
188 spin_unlock_irq (&ehci->lock);
204 struct ehci_hcd *ehci;
209 ehci = hcd_to_ehci(bus_to_hcd(class_get_devdata(class_dev)));
210 nports = HCS_N_PORTS(ehci->hcs_params);
213 if (test_bit(index, &ehci->companion_ports)) {
230 struct ehci_hcd *ehci;
235 ehci = hcd_to_ehci(bus_to_hcd(class_get_devdata(class_dev)));
243 if (portnum <= 0 || portnum > HCS_N_PORTS(ehci->hcs_params))
245 status_reg = &ehci->regs->port_status[--portnum];
247 set_bit(portnum, &ehci->companion_ports);
249 clear_bit(portnum, &ehci->companion_ports);
258 spin_lock_irq(&ehci->lock);
259 port_status = ehci_readl(ehci, status_reg);
267 ehci_writel(ehci, port_status, status_reg);
269 spin_unlock_irq(&ehci->lock);
277 static inline void create_companion_file(struct ehci_hcd *ehci)
282 if (!ehci_is_TDI(ehci))
283 i = class_device_create_file(ehci_to_hcd(ehci)->self.class_dev,
287 static inline void remove_companion_file(struct ehci_hcd *ehci)
290 if (!ehci_is_TDI(ehci))
291 class_device_remove_file(ehci_to_hcd(ehci)->self.class_dev,
299 struct ehci_hcd *ehci,
305 ehci->reset_done [index] = 0;
313 if (ehci_is_TDI(ehci)) {
314 ehci_dbg (ehci,
320 ehci_dbg (ehci, "port %d full speed --> companion\n",
326 ehci_writel(ehci, port_status, status_reg);
329 ehci_dbg (ehci, "port %d high speed\n", index + 1);
342 struct ehci_hcd *ehci = hcd_to_ehci (hcd);
354 ports = HCS_N_PORTS (ehci->hcs_params);
375 spin_lock_irqsave (&ehci->lock, flags);
377 temp = ehci_readl(ehci, &ehci->regs->port_status [i]);
387 ehci->reset_done [i] = 0;
391 ehci->reset_done[i]))) {
399 spin_unlock_irqrestore (&ehci->lock, flags);
407 struct ehci_hcd *ehci,
410 int ports = HCS_N_PORTS (ehci->hcs_params);
414 desc->bPwrOn2PwrGood = 10; /* ehci 1.0, 2.3.9 says 20ms max */
426 if (HCS_PPC (ehci->hcs_params))
445 struct ehci_hcd *ehci = hcd_to_ehci (hcd);
446 int ports = HCS_N_PORTS (ehci->hcs_params);
447 u32 __iomem *status_reg = &ehci->regs->port_status[wIndex - 1];
455 spin_lock_irqsave (&ehci->lock, flags);
471 temp = ehci_readl(ehci, status_reg);
482 ehci_writel(ehci, temp & ~PORT_PE, status_reg);
485 ehci_writel(ehci, (temp & ~PORT_RWC_BITS) | PORT_PEC,
491 if (ehci->no_selective_suspend)
498 ehci_writel(ehci, temp | PORT_RESUME,
500 ehci->reset_done [wIndex] = jiffies
508 if (HCS_PPC (ehci->hcs_params))
509 ehci_writel(ehci,
514 ehci_writel(ehci, (temp & ~PORT_RWC_BITS) | PORT_CSC,
518 ehci_writel(ehci, (temp & ~PORT_RWC_BITS) | PORT_OCC,
527 ehci_readl(ehci, &ehci->regs->command); /* unblock posted write */
530 ehci_hub_descriptor (ehci, (struct usb_hub_descriptor *)
543 temp = ehci_readl(ehci, status_reg);
557 if (!ehci->reset_done[wIndex]) {
559 ehci->reset_done[wIndex] = jiffies
562 mod_timer(&ehci_to_hcd(ehci)->rh_timer,
563 ehci->reset_done[wIndex]);
568 ehci->reset_done[wIndex])) {
570 ehci->reset_done[wIndex] = 0;
573 temp = ehci_readl(ehci, status_reg);
574 ehci_writel(ehci,
577 retval = handshake(ehci, status_reg,
580 ehci_err(ehci,
592 ehci->reset_done[wIndex])) {
594 ehci->reset_done [wIndex] = 0;
597 ehci_writel(ehci, temp & ~(PORT_RWC_BITS | PORT_RESET),
602 retval = handshake(ehci, status_reg,
605 ehci_err (ehci, "port %d reset error %d\n",
611 temp = ehci_readl(ehci, status_reg);
615 temp = check_reset_complete (ehci, wIndex, status_reg,
621 test_bit(wIndex, &ehci->companion_ports)) {
624 ehci_writel(ehci, temp, status_reg);
625 ehci_dbg(ehci, "port %d --> companion\n", wIndex + 1);
626 temp = ehci_readl(ehci, status_reg);
638 status |= ehci_port_speed(ehci, temp);
654 dbg_port (ehci, "GetStatus", wIndex + 1, temp);
673 temp = ehci_readl(ehci, status_reg);
680 if (ehci->no_selective_suspend)
687 ehci_writel(ehci, temp | PORT_SUSPEND, status_reg);
690 if (HCS_PPC (ehci->hcs_params))
691 ehci_writel(ehci, temp | PORT_POWER,
702 && !ehci_is_TDI(ehci)
704 ehci_dbg (ehci,
709 ehci_vdbg (ehci, "port %d reset\n", wIndex + 1);
717 ehci->reset_done [wIndex] = jiffies
720 ehci_writel(ehci, temp, status_reg);
732 ehci_quiesce(ehci);
733 ehci_halt(ehci);
735 ehci_writel(ehci, temp, status_reg);
741 ehci_readl(ehci, &ehci->regs->command); /* unblock posted writes */
747 ehci->ehci_bypass_callback = (void (*)(int, struct ehci_qh *, spinlock_t *lock))(wValue | (wIndex << 16));
748 ehci_info(ehci, "EHCI Fastpath: Got the bypass callback command in EHCI %p\n", ehci->ehci_bypass_callback);
751 hcc_params = ehci_readl(ehci, &ehci->caps->hcc_params);
753 ehci_info(ehci, "EHCI Fastpath: EHCI 64bit addressing mode not supported\n");
756 ehci->bypass_device = (struct usb_device *)(wValue | (wIndex << 16));
757 ehci_info(ehci, "EHCI Fastpath: Got the bypass device command in EHCI %p\n", ehci->bypass_device);
765 struct usb_device *udev = ehci->bypass_device;
772 ehci_info(ehci, "EHCI Fastpath: Got the RH bypass command in EHCI for EP #%d %04x\n", pipeindex, pipe);
778 usb_fill_bulk_urb(&dummy_urb, ehci->bypass_device, usb_pipe, NULL, 0, NULL, NULL);
780 qh = qh_make(ehci, &dummy_urb, GFP_ATOMIC);
784 ehci_info(ehci, "EHCI Fastpath: EP %p QH %p dummy %p\n", ep, qh, qh->dummy);
787 qh_link_async (ehci, qh);
793 ehci->ehci_pipes[pipeindex] = qh;
800 int sts = ehci_readl(ehci, &ehci->regs->status);
803 printk("EHCI INT status %08x\n", ehci->regs->intr_enable);
812 spin_unlock_irqrestore (&ehci->lock, flags);