Lines Matching refs:hcd
395 ehci->hcd.state = USB_STATE_HALT; in ehci_reset()
460 if (!HCD_IS_RUNNING (ehci->hcd.state)) in ehci_ready()
473 ehci->hcd.state = USB_STATE_HALT; in ehci_ready()
538 ehci->hcd.state = USB_STATE_HALT; in ehci_ready()
677 ehci_hub_status_data (struct usb_hcd *hcd, char *buf) in ehci_hub_status_data() argument
679 struct ehci_hcd *ehci = hcd_to_ehci (hcd); in ehci_hub_status_data()
796 if ( ((temp & PORT_CONNECT) == 0) && ((hcd->pre_sts & PORT_CONNECT) != 0) ) in ehci_hub_status_data()
798 … diag_printf("<ehci_hub_status_data> Add CSC @ root hub %d, DISCONNECT!\n", hcd->host_id); in ehci_hub_status_data()
801 hcd->pre_sts = temp; in ehci_hub_status_data()
1237 ehci->hcd.state = USB_STATE_RUNNING; in ehci_hc_swreset()
1253 struct usb_hcd *hcd, in ehci_hub_control() argument
1260 struct ehci_hcd *ehci = hcd_to_ehci (hcd); in ehci_hub_control()
1267 const struct device_s *__mptr = hcd->controller; in ehci_hub_control()
1549 if ((hcd->pre_temp & PORT_CONNECT) != 0) in ehci_hub_control()
1555 hcd->pre_temp = temp; in ehci_hub_control()
1814 if ( g_usb_phy_reset_flg && (hcd == cpe_ehci_dev.dev.driver_data) ) in ehci_hub_control()
1833 if ( g_usb_phy_reset_flg_Port2&& (hcd == cpe_ehci_dev_Port2.dev.driver_data) ) in ehci_hub_control()
2667 hcd_to_bus (&ehci->hcd)->bandwidth_int_reqs--; in ehci_urb_done()
2842 usb_hcd_giveback_urb (&ehci->hcd, urb, regs); in ehci_urb_done()
3163 && HCD_IS_RUNNING (ehci->hcd.state))) { in qh_completions()
5053 ehci->hcd.state = USB_STATE_RUNNING; in qh_link_async()
5192 ehci->hcd.state = USB_STATE_RUNNING;
5836 && HCD_IS_RUNNING (ehci->hcd.state)) in end_unlink_async()
5841 if (HCD_IS_RUNNING (ehci->hcd.state) in end_unlink_async()
5969 if (ehci->hcd.state != USB_STATE_HALT) { in start_unlink_async()
6037 if (unlikely (ehci->hcd.state == USB_STATE_HALT)) { in start_unlink_async()
6576 pci_read_config_dword (ehci->hcd.pdev, where, &cap); in bios_handoff()
6700 int ehci_hc_reset (struct usb_hcd *hcd) in ehci_hc_reset() argument
6702 struct ehci_hcd *ehci = hcd_to_ehci (hcd); in ehci_hc_reset()
6707 ehci->caps = (struct ehci_caps *) hcd->regs; in ehci_hc_reset()
6708 ehci->regs = (struct ehci_regs *) ( (U32)hcd->regs + in ehci_hc_reset()
6766 pci_read_config_dword (ehci->hcd.pdev, temp, &cap); in ehci_hc_reset()
6842 extern void usb_hcd_poll_rh_status(struct usb_hcd *hcd);
6844 int ehci_start (struct usb_hcd *hcd) in ehci_start() argument
6846 struct ehci_hcd *ehci = hcd_to_ehci (hcd); in ehci_start()
6968 hcd->uses_new_polling = 1; in ehci_start()
6969 hcd->poll_rh = 0; in ehci_start()
7148 if (!pci_set_dma_mask (ehci->hcd.pdev, 0xffffffffffffffffULL)) in ehci_start()
7155 pci_set_mwi (ehci->hcd.pdev); in ehci_start()
7259 bus = hcd_to_bus (hcd); in ehci_start()
7316 ehci->hcd.state = USB_STATE_RUNNING; in ehci_start()
7324 pci_read_config_byte (hcd->pdev, 0x60, &tempbyte); in ehci_start()
7433 if (hcd_register_root (hcd) != 0) { in ehci_start()
7434 if (hcd->state == USB_STATE_RUNNING) in ehci_start()
7444 if (hcd->uses_new_polling && hcd->poll_rh) in ehci_start()
7447 usb_hcd_poll_rh_status(hcd); in ehci_start()
7504 void ehci_stop (struct usb_hcd *hcd) in ehci_stop() argument
7506 struct ehci_hcd *ehci = hcd_to_ehci (hcd); in ehci_stop()
7511 if (hcd->state == USB_STATE_RUNNING) in ehci_stop()
7595 int ehci_get_frame (struct usb_hcd *hcd) in ehci_get_frame() argument
7597 struct ehci_hcd *ehci = hcd_to_ehci (hcd); in ehci_get_frame()
7652 int ehci_suspend (struct usb_hcd *hcd, U32 state) in ehci_suspend() argument
7654 struct ehci_hcd *ehci = hcd_to_ehci (hcd); in ehci_suspend()
7662 if (hcd->state == USB_STATE_RUNNING) in ehci_suspend()
7735 int ehci_resume (struct usb_hcd *hcd) in ehci_resume() argument
7737 struct ehci_hcd *ehci = hcd_to_ehci (hcd); in ehci_resume()
7796 hcd->state = USB_STATE_RUNNING; in ehci_resume()
7898 void ehci_irq (struct usb_hcd *hcd, struct pt_regs *regs) in ehci_irq() argument
7900 struct ehci_hcd *ehci= hcd_to_ehci (hcd); in ehci_irq()
8160 mod_timer(&hcd->rh_timer, ehci->reset_done[i], 0); in ehci_irq()
8233 usb_hcd_poll_rh_status(hcd); in ehci_irq()
8289 struct usb_hcd *hcd, in ehci_urb_enqueue() argument
8293 struct ehci_hcd *ehci = hcd_to_ehci (hcd); in ehci_urb_enqueue()
8417 int ehci_urb_dequeue (struct usb_hcd *hcd, struct urb *urb) in ehci_urb_dequeue() argument
8419 struct ehci_hcd *ehci = hcd_to_ehci (hcd); in ehci_urb_dequeue()
8487 && HCD_IS_RUNNING (ehci->hcd.state) in ehci_urb_dequeue()
8498 } else if (!HCD_IS_RUNNING (ehci->hcd.state) && ehci->reclaim) in ehci_urb_dequeue()
8567 hub_port_disable(ehci->hcd.self.root_hub,0); in ehci_urb_dequeue()
8631 hub_port_disable(ehci->hcd.self.root_hub,0); in ehci_urb_dequeue()
8746 && HCD_IS_RUNNING (ehci->hcd.state)) { in ehci_urb_dequeue()
8923 ehci_endpoint_disable (struct usb_hcd *hcd, struct hcd_dev *dev, int ep) in ehci_endpoint_disable() argument
8925 struct ehci_hcd *ehci = hcd_to_ehci (hcd); in ehci_endpoint_disable()
8991 if (!HCD_IS_RUNNING (ehci->hcd.state)) in ehci_endpoint_disable()
9206 void usb_hcd_cpe_ehci_remove (struct usb_hcd *hcd, struct cpe_dev *dev);
9216 struct usb_hcd *hcd = 0; in usb_hcd_cpe_ehci_probe() local
9239 hcd = driver->hcd_alloc(); in usb_hcd_cpe_ehci_probe()
9240 diag_printf("hcd: %lx\n", (U32)hcd); in usb_hcd_cpe_ehci_probe()
9241 if (hcd == NULL){ in usb_hcd_cpe_ehci_probe()
9247 hcd->driver = (struct hc_driver *) driver; in usb_hcd_cpe_ehci_probe()
9250 memcpy((char*)hcd,(char*)driver,24); in usb_hcd_cpe_ehci_probe()
9252 hcd->irq = gIrqUHC; //CPE_USB_EHCI0_IRQ; in usb_hcd_cpe_ehci_probe()
9253 hcd->regs = (U32*) gBaseUHC; in usb_hcd_cpe_ehci_probe()
9254 hcd->host_id = 0; // new in usb_hcd_cpe_ehci_probe()
9255 hcd->phub_event = &hub_event_list; in usb_hcd_cpe_ehci_probe()
9256 hcd->pdev = (struct pci_dev *)(1111); //Fake PCI device in usb_hcd_cpe_ehci_probe()
9257 hcd->self.controller = &dev->dev; in usb_hcd_cpe_ehci_probe()
9258 hcd->controller = hcd->self.controller; in usb_hcd_cpe_ehci_probe()
9260 retval = hcd_buffer_create (hcd); in usb_hcd_cpe_ehci_probe()
9267 if (driver->reset && (retval = driver->reset (hcd)) < 0) { in usb_hcd_cpe_ehci_probe()
9268 dev_err (hcd->controller, "can't reset%s","\n"); in usb_hcd_cpe_ehci_probe()
9273 fLib_CloseInt(hcd->irq); in usb_hcd_cpe_ehci_probe()
9274 fLib_SetIntTrig(hcd->irq,LEVEL,L_ACTIVE); in usb_hcd_cpe_ehci_probe()
9275 retval = fLib_ReqInt (hcd->irq, usb_hcd_cpe_ehci_hcim_irq, hcd); in usb_hcd_cpe_ehci_probe()
9285 fLib_EnableInt(hcd->irq); in usb_hcd_cpe_ehci_probe()
9291 fLib_EnableInt(hcd->irq); in usb_hcd_cpe_ehci_probe()
9305 hcd->description, hcd->regs, hcd->irq); in usb_hcd_cpe_ehci_probe()
9306 usb_bus_init (&hcd->self); in usb_hcd_cpe_ehci_probe()
9307 hcd->self.op = &usb_hcd_operations; in usb_hcd_cpe_ehci_probe()
9308 hcd->self.hcpriv = (void *) hcd; in usb_hcd_cpe_ehci_probe()
9309 hcd->self.bus_name = "cpe_ehci"; in usb_hcd_cpe_ehci_probe()
9311 memcpy(hcd->product_desc, "CPE_AMBA EHCI", sizeof(hcd->product_desc)); in usb_hcd_cpe_ehci_probe()
9314 init_timer(&hcd->rh_timer); in usb_hcd_cpe_ehci_probe()
9315 hcd->rh_timer.function = rh_timer_func; in usb_hcd_cpe_ehci_probe()
9316 hcd->rh_timer.data = (unsigned long) hcd; in usb_hcd_cpe_ehci_probe()
9318 hcd->pre_sts = 0; // new in usb_hcd_cpe_ehci_probe()
9319 hcd->pre_temp = 0; // new in usb_hcd_cpe_ehci_probe()
9320 init_OS_Resource_EX(&hcd->USBWaitFlg); in usb_hcd_cpe_ehci_probe()
9321 INIT_LIST_HEAD (&hcd->dev_list); in usb_hcd_cpe_ehci_probe()
9322 usb_register_bus (&hcd->self); in usb_hcd_cpe_ehci_probe()
9324 if ((retval = driver->start (hcd)) < 0) in usb_hcd_cpe_ehci_probe()
9326 usb_hcd_cpe_ehci_remove(hcd, dev); in usb_hcd_cpe_ehci_probe()
9330 *hcd_out = hcd; in usb_hcd_cpe_ehci_probe()
9335 hcd_buffer_destroy (hcd); in usb_hcd_cpe_ehci_probe()
9336 if (hcd) in usb_hcd_cpe_ehci_probe()
9337 driver->hcd_free(hcd); in usb_hcd_cpe_ehci_probe()
9345 void usb_hcd_cpe_ehci_remove (struct usb_hcd *hcd, struct cpe_dev *dev) in usb_hcd_cpe_ehci_remove() argument
9349 usb_info ("remove: %s, state %x", hcd->self.bus_name, hcd->state); in usb_hcd_cpe_ehci_remove()
9350 hub = hcd->self.root_hub; in usb_hcd_cpe_ehci_remove()
9351 if (HCD_IS_RUNNING (hcd->state)) in usb_hcd_cpe_ehci_remove()
9352 hcd->state = USB_STATE_QUIESCING; in usb_hcd_cpe_ehci_remove()
9354 dbg ("%s: roothub graceful disconnect", hcd->self.bus_name); in usb_hcd_cpe_ehci_remove()
9357 hcd->driver->stop (hcd); in usb_hcd_cpe_ehci_remove()
9358 hcd->state = USB_STATE_HALT; in usb_hcd_cpe_ehci_remove()
9362 hcd_buffer_destroy (hcd); in usb_hcd_cpe_ehci_remove()
9363 usb_deregister_bus (&hcd->self); in usb_hcd_cpe_ehci_remove()
9364 hcd->driver->hcd_free (hcd); in usb_hcd_cpe_ehci_remove()
9372 int usb_hcd_cpe_ehci_suspend (struct usb_hcd *hcd) in usb_hcd_cpe_ehci_suspend() argument
9376 switch (hcd->state) { in usb_hcd_cpe_ehci_suspend()
9378 dev_dbg (hcd->controller, "halted; hcd not suspended%s","\n"); in usb_hcd_cpe_ehci_suspend()
9381 dev_dbg (hcd->controller, "hcd already suspended%s","\n"); in usb_hcd_cpe_ehci_suspend()
9384 hcd->state = USB_STATE_QUIESCING; in usb_hcd_cpe_ehci_suspend()
9385 retval = hcd->driver->suspend (hcd, 0); in usb_hcd_cpe_ehci_suspend()
9387 dev_dbg (hcd->controller, "suspend fail, retval %d%s","\n", retval); in usb_hcd_cpe_ehci_suspend()
9392 int usb_hcd_cpe_ehci_resume(struct usb_hcd *hcd) in usb_hcd_cpe_ehci_resume() argument
9396 if (hcd->state != USB_STATE_SUSPENDED) { in usb_hcd_cpe_ehci_resume()
9397 dev_dbg (hcd->controller, "can't resume, not suspended!%s","\n"); in usb_hcd_cpe_ehci_resume()
9400 hcd->state = USB_STATE_RESUMING; in usb_hcd_cpe_ehci_resume()
9402 retval = hcd->driver->resume (hcd); in usb_hcd_cpe_ehci_resume()
9404 if (!HCD_IS_RUNNING (hcd->state)) { in usb_hcd_cpe_ehci_resume()
9405 dev_dbg (hcd->controller, "resume fail, retval %d\n", retval); in usb_hcd_cpe_ehci_resume()
9406 usb_hc_died (hcd); in usb_hcd_cpe_ehci_resume()
9418 ehci_cpe_ehci_start (struct usb_hcd *hcd)
9427 extern int ehci_hc_reset (struct usb_hcd *hcd);
9428 extern int ehci_start (struct usb_hcd *hcd);
9429 extern int ehci_suspend (struct usb_hcd *hcd, U32 state);
9430 extern int ehci_resume (struct usb_hcd *hcd);
9431 extern void ehci_stop (struct usb_hcd *hcd);
9433 extern void ehci_hcd_free (struct usb_hcd *hcd);
9434 extern int ehci_urb_enqueue ( struct usb_hcd *hcd, struct urb *urb, int mem_flags) ;
9435 extern int ehci_urb_dequeue (struct usb_hcd *hcd, struct urb *urb);
9436 extern void ehci_endpoint_disable (struct usb_hcd *hcd, struct hcd_dev *dev, int ep);
9437 extern int ehci_get_frame (struct usb_hcd *hcd);
9438 extern int ehci_hub_status_data (struct usb_hcd *hcd, char *buf);
9439 extern int ehci_hub_control ( struct usb_hcd *hcd, U16 typeReq, U16 wValue, U16 wInde…
9487 extern void InitUSBIntr(struct usb_hcd * hcd);
9491 struct usb_hcd *hcd = NULL; in ehci_hcd_cpe_ehci_drv_probe() local
9502 ret = usb_hcd_cpe_ehci_probe(&ehci_cpe_hc_driver, &hcd, dev); in ehci_hcd_cpe_ehci_drv_probe()
9506 dev->dev.driver_data = hcd; in ehci_hcd_cpe_ehci_drv_probe()
9507 g_pUsbHcd = hcd; in ehci_hcd_cpe_ehci_drv_probe()
9508 InitUSBIntr(hcd); //add USB interrupt entry . yuwen in ehci_hcd_cpe_ehci_drv_probe()
9518 struct usb_hcd *hcd ; in ehci_hcd_cpe_ehci_drv_remove() local
9522 hcd = (struct usb_hcd *) dev->dev.driver_data; in ehci_hcd_cpe_ehci_drv_remove()
9524 usb_hcd_cpe_ehci_remove(hcd, dev); in ehci_hcd_cpe_ehci_drv_remove()
9536 struct usb_hcd *hcd ; in ehci_hcd_cpe_ehci_drv_suspend() local
9539 hcd = dev->dev.driver_data; in ehci_hcd_cpe_ehci_drv_suspend()
9540 usb_hcd_cpe_ehci_suspend(hcd); in ehci_hcd_cpe_ehci_drv_suspend()
9550 struct usb_hcd *hcd ; in ehci_hcd_cpe_ehci_drv_resume() local
9553 hcd = dev->dev.driver_data; in ehci_hcd_cpe_ehci_drv_resume()
9554 usb_hcd_cpe_ehci_resume(hcd); in ehci_hcd_cpe_ehci_drv_resume()
9656 struct usb_hcd *hcd = 0; in usb_hcd_cpe_ehci_probe_EX() local
9663 hcd = driver->hcd_alloc(); in usb_hcd_cpe_ehci_probe_EX()
9664 diag_printf("hcd: %lx\n", (U32)hcd); in usb_hcd_cpe_ehci_probe_EX()
9665 if (hcd == NULL){ in usb_hcd_cpe_ehci_probe_EX()
9671 hcd->driver = (struct hc_driver *) driver; in usb_hcd_cpe_ehci_probe_EX()
9674 memcpy((char*)hcd,(char*)driver,24); in usb_hcd_cpe_ehci_probe_EX()
9676 hcd->host_id = p_rootHub->portNum; in usb_hcd_cpe_ehci_probe_EX()
9677 hcd->phub_event = p_rootHub->p_hub_event; in usb_hcd_cpe_ehci_probe_EX()
9680 hcd->irq = dev->intNum; in usb_hcd_cpe_ehci_probe_EX()
9681 hcd->regs = (U32*) dev->mapbase; in usb_hcd_cpe_ehci_probe_EX()
9682 hcd->pdev = (struct pci_dev *)(1111); //Fake PCI device in usb_hcd_cpe_ehci_probe_EX()
9683 hcd->self.controller = &dev->dev; in usb_hcd_cpe_ehci_probe_EX()
9684 hcd->controller = hcd->self.controller; in usb_hcd_cpe_ehci_probe_EX()
9686 retval = hcd_buffer_create (hcd); in usb_hcd_cpe_ehci_probe_EX()
9693 if (driver->reset && (retval = driver->reset (hcd)) < 0) { in usb_hcd_cpe_ehci_probe_EX()
9694 dev_err (hcd->controller, "can't reset%s","\n"); in usb_hcd_cpe_ehci_probe_EX()
9699 hcd->description, hcd->regs, hcd->irq); in usb_hcd_cpe_ehci_probe_EX()
9700 usb_bus_init (&hcd->self); in usb_hcd_cpe_ehci_probe_EX()
9701 hcd->self.op = &usb_hcd_operations; in usb_hcd_cpe_ehci_probe_EX()
9702 hcd->self.hcpriv = (void *) hcd; in usb_hcd_cpe_ehci_probe_EX()
9707 hcd->self.bus_name = p_rootHub->bus_name; in usb_hcd_cpe_ehci_probe_EX()
9708 memcpy(hcd->product_desc, p_rootHub->product_desc, sizeof(p_rootHub->product_desc)); in usb_hcd_cpe_ehci_probe_EX()
9710 hcd->pre_sts = 0; // new in usb_hcd_cpe_ehci_probe_EX()
9711 hcd->pre_temp = 0; // new in usb_hcd_cpe_ehci_probe_EX()
9712 hcd->pgVar = p_rootHub; // new in usb_hcd_cpe_ehci_probe_EX()
9713 init_OS_Resource_EX(&hcd->USBWaitFlg); in usb_hcd_cpe_ehci_probe_EX()
9714 INIT_LIST_HEAD (&hcd->dev_list); in usb_hcd_cpe_ehci_probe_EX()
9715 usb_register_bus (&hcd->self); in usb_hcd_cpe_ehci_probe_EX()
9717 if ((retval = driver->start (hcd)) < 0) // start HCD in usb_hcd_cpe_ehci_probe_EX()
9719 usb_hcd_cpe_ehci_remove(hcd, dev); in usb_hcd_cpe_ehci_probe_EX()
9723 *hcd_out = hcd; in usb_hcd_cpe_ehci_probe_EX()
9728 hcd_buffer_destroy (hcd); in usb_hcd_cpe_ehci_probe_EX()
9729 if (hcd) in usb_hcd_cpe_ehci_probe_EX()
9730 driver->hcd_free(hcd); in usb_hcd_cpe_ehci_probe_EX()
9781 extern void InitUSBIntr_EX(struct usb_hcd * hcd);
9785 struct usb_hcd *hcd = NULL; in ehci_hcd_cpe_ehci_drv_probe_EX() local
9795 ret = usb_hcd_cpe_ehci_probe_EX(&ehci_cpe_hc_driver, &hcd, dev); in ehci_hcd_cpe_ehci_drv_probe_EX()
9800 dev->dev.driver_data = hcd; in ehci_hcd_cpe_ehci_drv_probe_EX()
9801 InitUSBIntr_EX(hcd); in ehci_hcd_cpe_ehci_drv_probe_EX()