• Home
  • Raw
  • Download

Lines Matching refs:fhci

91 				fhci_dbg(usb->fhci, "td err fu\n");  in fhci_transaction_confirm()
95 fhci_dbg(usb->fhci, "td err f!u\n"); in fhci_transaction_confirm()
98 fhci_dbg(usb->fhci, "td err !f\n"); in fhci_transaction_confirm()
106 fhci_vdbg(usb->fhci, "td nack\n"); in fhci_transaction_confirm()
135 mode = in_8(&usb->fhci->regs->usb_mod); in fhci_flush_all_transmissions()
136 clrbits8(&usb->fhci->regs->usb_mod, USB_MODE_EN); in fhci_flush_all_transmissions()
150 out_be16(&usb->fhci->regs->usb_event, 0xffff); in fhci_flush_all_transmissions()
152 out_8(&usb->fhci->regs->usb_mod, mode | USB_MODE_EN); in fhci_flush_all_transmissions()
200 fhci_vdbg(usb->fhci, "not enough space in this frame: " in add_packet()
211 fhci_dbg(usb->fhci, "not enough time in this frame\n"); in add_packet()
218 fhci_dbg(usb->fhci, "there is no empty frame\n"); in add_packet()
252 fhci_err(usb->fhci, "host transaction failed\n"); in add_packet()
342 struct fhci_hcd *fhci = usb->fhci; in rotate_frames() local
345 if ((((in_be16(&fhci->pram->frame_num) & 0x07ff) - in rotate_frames()
353 usb->actual_frame->frame_num = in_be16(&fhci->pram->frame_num) & 0x7ff; in rotate_frames()
404 static void sof_interrupt(struct fhci_hcd *fhci) in sof_interrupt() argument
406 struct fhci_usb *usb = fhci->usb_lld; in sof_interrupt()
417 out_be16(&usb->fhci->regs->usb_mask, usb->saved_msk); in sof_interrupt()
420 gtm_set_exact_timer16(fhci->timer, usb->max_frame_usage, false); in sof_interrupt()
429 void fhci_device_disconnected_interrupt(struct fhci_hcd *fhci) in fhci_device_disconnected_interrupt() argument
431 struct fhci_usb *usb = fhci->usb_lld; in fhci_device_disconnected_interrupt()
433 fhci_dbg(fhci, "-> %s\n", __func__); in fhci_device_disconnected_interrupt()
436 clrbits8(&usb->fhci->regs->usb_mod, USB_MODE_LSS); in fhci_device_disconnected_interrupt()
439 fhci_stop_sof_timer(fhci); in fhci_device_disconnected_interrupt()
443 out_be16(&usb->fhci->regs->usb_mask, usb->saved_msk); in fhci_device_disconnected_interrupt()
450 fhci_dbg(fhci, "<- %s\n", __func__); in fhci_device_disconnected_interrupt()
454 void fhci_device_connected_interrupt(struct fhci_hcd *fhci) in fhci_device_connected_interrupt() argument
457 struct fhci_usb *usb = fhci->usb_lld; in fhci_device_connected_interrupt()
461 fhci_dbg(fhci, "-> %s\n", __func__); in fhci_device_connected_interrupt()
464 state = fhci_ioports_check_bus_state(fhci); in fhci_device_connected_interrupt()
468 ret = qe_usb_clock_set(fhci->lowspeed_clk, USB_CLOCK >> 3); in fhci_device_connected_interrupt()
470 fhci_warn(fhci, "Low-Speed device is not supported, " in fhci_device_connected_interrupt()
476 setbits8(&usb->fhci->regs->usb_mod, USB_MODE_LSS); in fhci_device_connected_interrupt()
486 ret = qe_usb_clock_set(fhci->fullspeed_clk, USB_CLOCK); in fhci_device_connected_interrupt()
488 fhci_warn(fhci, "Full-Speed device is not supported, " in fhci_device_connected_interrupt()
494 clrbits8(&usb->fhci->regs->usb_mod, USB_MODE_LSS); in fhci_device_connected_interrupt()
506 fhci_dbg(fhci, "<- %s\n", __func__); in fhci_device_connected_interrupt()
512 struct fhci_hcd *fhci = hcd_to_fhci(hcd); in fhci_frame_limit_timer_irq() local
513 struct fhci_usb *usb = fhci->usb_lld; in fhci_frame_limit_timer_irq()
515 spin_lock(&fhci->lock); in fhci_frame_limit_timer_irq()
517 gtm_set_exact_timer16(fhci->timer, 1000, false); in fhci_frame_limit_timer_irq()
526 spin_unlock(&fhci->lock); in fhci_frame_limit_timer_irq()
534 fhci_dbg(usb->fhci, "-> %s\n", __func__); in abort_transmission()
538 out_8(&usb->fhci->regs->usb_comm, USB_CMD_FLUSH_FIFO | EP_ZERO); in abort_transmission()
544 fhci_dbg(usb->fhci, "<- %s\n", __func__); in abort_transmission()
549 struct fhci_hcd *fhci = hcd_to_fhci(hcd); in fhci_irq() local
554 spin_lock_irqsave(&fhci->lock, flags); in fhci_irq()
556 usb = fhci->usb_lld; in fhci_irq()
558 usb_er |= in_be16(&usb->fhci->regs->usb_event) & in fhci_irq()
559 in_be16(&usb->fhci->regs->usb_mask); in fhci_irq()
562 out_be16(&usb->fhci->regs->usb_event, usb_er); in fhci_irq()
564 fhci_dbg_isr(fhci, usb_er); in fhci_irq()
569 fhci_device_disconnected_interrupt(fhci); in fhci_irq()
576 out_be16(&usb->fhci->regs->usb_event, in fhci_irq()
579 if (fhci_ioports_check_bus_state(fhci) == 1 && in fhci_irq()
582 fhci_device_connected_interrupt(fhci); in fhci_irq()
588 abort_transmission(fhci->usb_lld); in fhci_irq()
593 sof_interrupt(fhci); in fhci_irq()
598 fhci_tx_conf_interrupt(fhci->usb_lld); in fhci_irq()
603 fhci_tx_conf_interrupt(fhci->usb_lld); in fhci_irq()
612 fhci_device_connected_interrupt(fhci); in fhci_irq()
618 out_be16(&usb->fhci->regs->usb_mask, in fhci_irq()
621 fhci_dbg_isr(fhci, -1); in fhci_irq()
627 spin_unlock_irqrestore(&fhci->lock, flags); in fhci_irq()
646 struct fhci_hcd *fhci = (struct fhci_hcd *)data; in process_done_list() local
648 disable_irq(fhci->timer->irq); in process_done_list()
649 disable_irq(fhci_to_hcd(fhci)->irq); in process_done_list()
650 spin_lock(&fhci->lock); in process_done_list()
652 td = fhci_remove_td_from_done_list(fhci->hc_list); in process_done_list()
669 fhci_urb_complete_free(fhci, urb); in process_done_list()
672 fhci_del_ed_list(fhci, ed); in process_done_list()
677 fhci_del_ed_list(fhci, ed); in process_done_list()
681 td = fhci_remove_td_from_done_list(fhci->hc_list); in process_done_list()
684 spin_unlock(&fhci->lock); in process_done_list()
685 enable_irq(fhci->timer->irq); in process_done_list()
686 enable_irq(fhci_to_hcd(fhci)->irq); in process_done_list()
692 u32 fhci_transfer_confirm_callback(struct fhci_hcd *fhci) in fhci_transfer_confirm_callback() argument
694 if (!fhci->process_done_task->state) in fhci_transfer_confirm_callback()
695 tasklet_schedule(fhci->process_done_task); in fhci_transfer_confirm_callback()
706 void fhci_queue_urb(struct fhci_hcd *fhci, struct urb *urb) in fhci_queue_urb() argument
718 ed = fhci_get_empty_ed(fhci); in fhci_queue_urb()
742 fhci_dbg(fhci, "new ep speed=%d max_pkt_size=%d\n", in fhci_queue_urb()
749 get_frame_num(fhci); in fhci_queue_urb()
780 td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt, in fhci_queue_urb()
791 td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt, in fhci_queue_urb()
799 td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt, in fhci_queue_urb()
807 urb->start_frame = get_frame_num(fhci) + 1; in fhci_queue_urb()
808 td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt++, in fhci_queue_urb()
817 td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt++, FHCI_TA_SETUP, in fhci_queue_urb()
821 td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt++, in fhci_queue_urb()
827 td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt++, in fhci_queue_urb()
843 td = fhci_td_fill(fhci, urb, urb_priv, ed, cnt, in fhci_queue_urb()
870 list_add(&ed->node, &fhci->hc_list->ctrl_list); in fhci_queue_urb()
873 list_add(&ed->node, &fhci->hc_list->bulk_list); in fhci_queue_urb()
876 list_add(&ed->node, &fhci->hc_list->intr_list); in fhci_queue_urb()
879 list_add(&ed->node, &fhci->hc_list->iso_list); in fhci_queue_urb()
887 fhci->active_urbs++; in fhci_queue_urb()