• Home
  • Raw
  • Download

Lines Matching refs:usb

61 u16 fhci_get_sof_timer_count(struct fhci_usb *usb)  in fhci_get_sof_timer_count()  argument
63 return be16_to_cpu(in_be16(&usb->fhci->regs->usb_ussft) / 12); in fhci_get_sof_timer_count()
67 static u32 endpoint_zero_init(struct fhci_usb *usb, in endpoint_zero_init() argument
73 rc = fhci_create_ep(usb, data_mem, ring_len); in endpoint_zero_init()
78 fhci_init_ep_registers(usb, usb->ep0, data_mem); in endpoint_zero_init()
84 void fhci_usb_enable_interrupt(struct fhci_usb *usb) in fhci_usb_enable_interrupt() argument
86 struct fhci_hcd *fhci = usb->fhci; in fhci_usb_enable_interrupt()
88 if (usb->intr_nesting_cnt == 1) { in fhci_usb_enable_interrupt()
93 out_be16(&usb->fhci->regs->usb_usber, 0xffff); in fhci_usb_enable_interrupt()
94 out_be16(&usb->fhci->regs->usb_usbmr, usb->saved_msk); in fhci_usb_enable_interrupt()
98 } else if (usb->intr_nesting_cnt > 1) in fhci_usb_enable_interrupt()
100 usb->intr_nesting_cnt--; in fhci_usb_enable_interrupt()
104 void fhci_usb_disable_interrupt(struct fhci_usb *usb) in fhci_usb_disable_interrupt() argument
106 struct fhci_hcd *fhci = usb->fhci; in fhci_usb_disable_interrupt()
108 if (usb->intr_nesting_cnt == 0) { in fhci_usb_disable_interrupt()
114 out_be16(&usb->fhci->regs->usb_usbmr, 0); in fhci_usb_disable_interrupt()
116 usb->intr_nesting_cnt++; in fhci_usb_disable_interrupt()
122 struct fhci_usb *usb = fhci->usb_lld; in fhci_usb_enable() local
124 out_be16(&usb->fhci->regs->usb_usber, 0xffff); in fhci_usb_enable()
125 out_be16(&usb->fhci->regs->usb_usbmr, usb->saved_msk); in fhci_usb_enable()
126 setbits8(&usb->fhci->regs->usb_usmod, USB_MODE_EN); in fhci_usb_enable()
136 struct fhci_usb *usb = fhci->usb_lld; in fhci_usb_disable() local
138 fhci_usb_disable_interrupt(usb); in fhci_usb_disable()
142 if (usb->port_status == FHCI_PORT_FULL || in fhci_usb_disable()
143 usb->port_status == FHCI_PORT_LOW) in fhci_usb_disable()
146 clrbits8(&usb->fhci->regs->usb_usmod, USB_MODE_EN); in fhci_usb_disable()
247 struct fhci_usb *usb = lld; in fhci_usb_free() local
250 if (usb) { in fhci_usb_free()
251 fhci = usb->fhci; in fhci_usb_free()
253 fhci_ep0_free(usb); in fhci_usb_free()
254 kfree(usb->actual_frame); in fhci_usb_free()
255 kfree(usb); in fhci_usb_free()
262 struct fhci_usb *usb = fhci->usb_lld; in fhci_usb_init() local
264 memset_io(usb->fhci->pram, 0, FHCI_PRAM_SIZE); in fhci_usb_init()
266 usb->port_status = FHCI_PORT_DISABLED; in fhci_usb_init()
267 usb->max_frame_usage = FRAME_TIME_USAGE; in fhci_usb_init()
268 usb->sw_transaction_time = SW_FIX_TIME_BETWEEN_TRANSACTION; in fhci_usb_init()
270 usb->actual_frame = kzalloc(sizeof(*usb->actual_frame), GFP_KERNEL); in fhci_usb_init()
271 if (!usb->actual_frame) { in fhci_usb_init()
272 fhci_usb_free(usb); in fhci_usb_init()
276 INIT_LIST_HEAD(&usb->actual_frame->tds_list); in fhci_usb_init()
285 usb->saved_msk = (USB_E_TXB_MASK | in fhci_usb_init()
290 out_8(&usb->fhci->regs->usb_usmod, USB_MODE_HOST | USB_MODE_EN); in fhci_usb_init()
293 out_be16(&usb->fhci->regs->usb_usbmr, 0); in fhci_usb_init()
296 out_be16(&usb->fhci->regs->usb_usber, 0xffff); in fhci_usb_init()
298 if (endpoint_zero_init(usb, DEFAULT_DATA_MEM, DEFAULT_RING_LEN) != 0) { in fhci_usb_init()
299 fhci_usb_free(usb); in fhci_usb_init()
309 struct fhci_usb *usb; in fhci_create_lld() local
312 usb = kzalloc(sizeof(*usb), GFP_KERNEL); in fhci_create_lld()
313 if (!usb) { in fhci_create_lld()
318 usb->fhci = fhci; in fhci_create_lld()
319 usb->hc_list = fhci->hc_list; in fhci_create_lld()
320 usb->vroot_hub = fhci->vroot_hub; in fhci_create_lld()
322 usb->transfer_confirm = fhci_transfer_confirm_callback; in fhci_create_lld()
324 return usb; in fhci_create_lld()
473 struct fhci_usb *usb = fhci->usb_lld; in fhci_urb_dequeue() local
486 if (usb->port_status != FHCI_PORT_DISABLED) { in fhci_urb_dequeue()