Lines Matching refs:fhci

87 				fhci_dbg(usb->fhci, "td err fu\n");  in fhci_transaction_confirm()
91 fhci_dbg(usb->fhci, "td err f!u\n"); in fhci_transaction_confirm()
94 fhci_dbg(usb->fhci, "td err !f\n"); in fhci_transaction_confirm()
102 fhci_vdbg(usb->fhci, "td nack\n"); in fhci_transaction_confirm()
131 mode = in_8(&usb->fhci->regs->usb_usmod); in fhci_flush_all_transmissions()
132 clrbits8(&usb->fhci->regs->usb_usmod, USB_MODE_EN); in fhci_flush_all_transmissions()
146 out_be16(&usb->fhci->regs->usb_usber, 0xffff); in fhci_flush_all_transmissions()
148 out_8(&usb->fhci->regs->usb_usmod, mode | USB_MODE_EN); in fhci_flush_all_transmissions()
196 fhci_vdbg(usb->fhci, "not enough space in this frame: " in add_packet()
207 fhci_dbg(usb->fhci, "not enough time in this frame\n"); in add_packet()
214 fhci_dbg(usb->fhci, "there is no empty frame\n"); in add_packet()
248 fhci_err(usb->fhci, "host transaction failed\n"); in add_packet()
337 struct fhci_hcd *fhci = usb->fhci; in rotate_frames() local
340 if ((((in_be16(&fhci->pram->frame_num) & 0x07ff) - in rotate_frames()
348 usb->actual_frame->frame_num = in_be16(&fhci->pram->frame_num) & 0x7ff; in rotate_frames()
399 static void sof_interrupt(struct fhci_hcd *fhci) in sof_interrupt() argument
401 struct fhci_usb *usb = fhci->usb_lld; in sof_interrupt()
412 out_be16(&usb->fhci->regs->usb_usbmr, usb->saved_msk); in sof_interrupt()
415 gtm_set_exact_timer16(fhci->timer, usb->max_frame_usage, false); in sof_interrupt()
424 void fhci_device_disconnected_interrupt(struct fhci_hcd *fhci) in fhci_device_disconnected_interrupt() argument
426 struct fhci_usb *usb = fhci->usb_lld; in fhci_device_disconnected_interrupt()
428 fhci_dbg(fhci, "-> %s\n", __func__); in fhci_device_disconnected_interrupt()
431 clrbits8(&usb->fhci->regs->usb_usmod, USB_MODE_LSS); in fhci_device_disconnected_interrupt()
434 fhci_stop_sof_timer(fhci); in fhci_device_disconnected_interrupt()
438 out_be16(&usb->fhci->regs->usb_usbmr, usb->saved_msk); in fhci_device_disconnected_interrupt()
445 fhci_dbg(fhci, "<- %s\n", __func__); in fhci_device_disconnected_interrupt()
449 void fhci_device_connected_interrupt(struct fhci_hcd *fhci) in fhci_device_connected_interrupt() argument
452 struct fhci_usb *usb = fhci->usb_lld; in fhci_device_connected_interrupt()
456 fhci_dbg(fhci, "-> %s\n", __func__); in fhci_device_connected_interrupt()
459 state = fhci_ioports_check_bus_state(fhci); in fhci_device_connected_interrupt()
463 ret = qe_usb_clock_set(fhci->lowspeed_clk, USB_CLOCK >> 3); in fhci_device_connected_interrupt()
465 fhci_warn(fhci, "Low-Speed device is not supported, " in fhci_device_connected_interrupt()
471 setbits8(&usb->fhci->regs->usb_usmod, USB_MODE_LSS); in fhci_device_connected_interrupt()
481 ret = qe_usb_clock_set(fhci->fullspeed_clk, USB_CLOCK); in fhci_device_connected_interrupt()
483 fhci_warn(fhci, "Full-Speed device is not supported, " in fhci_device_connected_interrupt()
489 clrbits8(&usb->fhci->regs->usb_usmod, USB_MODE_LSS); in fhci_device_connected_interrupt()
501 fhci_dbg(fhci, "<- %s\n", __func__); in fhci_device_connected_interrupt()
507 struct fhci_hcd *fhci = hcd_to_fhci(hcd); in fhci_frame_limit_timer_irq() local
508 struct fhci_usb *usb = fhci->usb_lld; in fhci_frame_limit_timer_irq()
510 spin_lock(&fhci->lock); in fhci_frame_limit_timer_irq()
512 gtm_set_exact_timer16(fhci->timer, 1000, false); in fhci_frame_limit_timer_irq()
521 spin_unlock(&fhci->lock); in fhci_frame_limit_timer_irq()
529 fhci_dbg(usb->fhci, "-> %s\n", __func__); in abort_transmission()
533 out_8(&usb->fhci->regs->usb_uscom, USB_CMD_FLUSH_FIFO | EP_ZERO); in abort_transmission()
539 fhci_dbg(usb->fhci, "<- %s\n", __func__); in abort_transmission()
544 struct fhci_hcd *fhci = hcd_to_fhci(hcd); in fhci_irq() local
549 spin_lock_irqsave(&fhci->lock, flags); in fhci_irq()
551 usb = fhci->usb_lld; in fhci_irq()
553 usb_er |= in_be16(&usb->fhci->regs->usb_usber) & in fhci_irq()
554 in_be16(&usb->fhci->regs->usb_usbmr); in fhci_irq()
557 out_be16(&usb->fhci->regs->usb_usber, usb_er); in fhci_irq()
559 fhci_dbg_isr(fhci, usb_er); in fhci_irq()
564 fhci_device_disconnected_interrupt(fhci); in fhci_irq()
571 out_be16(&usb->fhci->regs->usb_usber, in fhci_irq()
574 if (fhci_ioports_check_bus_state(fhci) == 1) in fhci_irq()
575 fhci_device_connected_interrupt(fhci); in fhci_irq()
581 abort_transmission(fhci->usb_lld); in fhci_irq()
586 sof_interrupt(fhci); in fhci_irq()
591 fhci_tx_conf_interrupt(fhci->usb_lld); in fhci_irq()
596 fhci_tx_conf_interrupt(fhci->usb_lld); in fhci_irq()
603 fhci_device_connected_interrupt(fhci); in fhci_irq()
609 out_be16(&usb->fhci->regs->usb_usbmr, in fhci_irq()
612 fhci_dbg_isr(fhci, -1); in fhci_irq()
618 spin_unlock_irqrestore(&fhci->lock, flags); in fhci_irq()
637 struct fhci_hcd *fhci = (struct fhci_hcd *)data; in process_done_list() local
639 disable_irq(fhci->timer->irq); in process_done_list()
640 disable_irq(fhci_to_hcd(fhci)->irq); in process_done_list()
641 spin_lock(&fhci->lock); in process_done_list()
643 td = fhci_remove_td_from_done_list(fhci->hc_list); in process_done_list()
660 fhci_urb_complete_free(fhci, urb); in process_done_list()
663 fhci_del_ed_list(fhci, ed); in process_done_list()
668 fhci_del_ed_list(fhci, ed); in process_done_list()
672 td = fhci_remove_td_from_done_list(fhci->hc_list); in process_done_list()
675 spin_unlock(&fhci->lock); in process_done_list()
676 enable_irq(fhci->timer->irq); in process_done_list()
677 enable_irq(fhci_to_hcd(fhci)->irq); in process_done_list()
683 u32 fhci_transfer_confirm_callback(struct fhci_hcd *fhci) in fhci_transfer_confirm_callback() argument
685 if (!fhci->process_done_task->state) in fhci_transfer_confirm_callback()
686 tasklet_schedule(fhci->process_done_task); in fhci_transfer_confirm_callback()
697 void fhci_queue_urb(struct fhci_hcd *fhci, struct urb *urb) in fhci_queue_urb() argument
708 ed = fhci_get_empty_ed(fhci); in fhci_queue_urb()
731 fhci_dbg(fhci, "new ep speed=%d max_pkt_size=%d\n", in fhci_queue_urb()
739 get_frame_num(fhci); in fhci_queue_urb()
772 fhci_td_fill(fhci, urb, urb_priv, ed, cnt, in fhci_queue_urb()
783 fhci_td_fill(fhci, urb, urb_priv, ed, cnt, in fhci_queue_urb()
791 fhci_td_fill(fhci, urb, urb_priv, ed, cnt, in fhci_queue_urb()
799 urb->start_frame = get_frame_num(fhci) + 1; in fhci_queue_urb()
800 fhci_td_fill(fhci, urb, urb_priv, ed, cnt++, in fhci_queue_urb()
810 fhci_td_fill(fhci, urb, urb_priv, ed, cnt++, FHCI_TA_SETUP, in fhci_queue_urb()
815 fhci_td_fill(fhci, urb, urb_priv, ed, cnt++, in fhci_queue_urb()
824 fhci_td_fill(fhci, urb, urb_priv, ed, cnt++, in fhci_queue_urb()
829 fhci_td_fill(fhci, urb, urb_priv, ed, cnt++, in fhci_queue_urb()
846 fhci_td_fill(fhci, urb, urb_priv, ed, cnt, in fhci_queue_urb()
873 list_add(&ed->node, &fhci->hc_list->ctrl_list); in fhci_queue_urb()
876 list_add(&ed->node, &fhci->hc_list->bulk_list); in fhci_queue_urb()
879 list_add(&ed->node, &fhci->hc_list->intr_list); in fhci_queue_urb()
882 list_add(&ed->node, &fhci->hc_list->iso_list); in fhci_queue_urb()
890 fhci->active_urbs++; in fhci_queue_urb()