Lines Matching full:dwc3
41 int dwc3_gadget_set_test_mode(struct dwc3 *dwc, int mode) in dwc3_gadget_set_test_mode()
72 int dwc3_gadget_get_link_state(struct dwc3 *dwc) in dwc3_gadget_get_link_state()
89 int dwc3_gadget_set_link_state(struct dwc3 *dwc, enum dwc3_link_state state) in dwc3_gadget_set_link_state()
98 if (!DWC3_VER_IS_PRIOR(DWC3, 194A)) { in dwc3_gadget_set_link_state()
125 if (!DWC3_VER_IS_PRIOR(DWC3, 194A)) in dwc3_gadget_set_link_state()
178 struct dwc3 *dwc = dep->dwc; in dwc3_gadget_del_and_unmap_request()
211 struct dwc3 *dwc = dep->dwc; in dwc3_gadget_giveback()
230 int dwc3_send_gadget_generic_command(struct dwc3 *dwc, unsigned int cmd, in dwc3_send_gadget_generic_command()
261 static int __dwc3_gadget_wakeup(struct dwc3 *dwc);
276 struct dwc3 *dwc = dep->dwc; in dwc3_send_gadget_ep_cmd()
412 struct dwc3 *dwc = dep->dwc; in dwc3_send_clear_stall_ep_cmd()
425 !DWC3_VER_IS_PRIOR(DWC3, 260A) && in dwc3_send_clear_stall_ep_cmd()
444 struct dwc3 *dwc = dep->dwc; in dwc3_alloc_trb_pool()
463 struct dwc3 *dwc = dep->dwc; in dwc3_free_trb_pool()
520 struct dwc3 *dwc; in dwc3_gadget_start_config()
555 struct dwc3 *dwc = dep->dwc; in dwc3_gadget_set_ep_config()
629 struct dwc3 *dwc = dep->dwc; in __dwc3_gadget_ep_enable()
728 static void dwc3_remove_requests(struct dwc3 *dwc, struct dwc3_ep *dep) in dwc3_remove_requests()
766 struct dwc3 *dwc = dep->dwc; in __dwc3_gadget_ep_disable()
813 struct dwc3 *dwc; in dwc3_gadget_ep_enable()
818 pr_debug("dwc3: invalid parameters\n"); in dwc3_gadget_ep_enable()
823 pr_debug("dwc3: missing wMaxPacketSize\n"); in dwc3_gadget_ep_enable()
845 struct dwc3 *dwc; in dwc3_gadget_ep_disable()
850 pr_debug("dwc3: invalid parameters\n"); in dwc3_gadget_ep_disable()
952 struct dwc3 *dwc = dep->dwc; in __dwc3_prepare_one_trb()
1294 struct dwc3 *dwc = dep->dwc; in dwc3_prepare_trbs()
1405 static int __dwc3_gadget_get_frame(struct dwc3 *dwc) in __dwc3_gadget_get_frame()
1531 struct dwc3 *dwc = dep->dwc; in __dwc3_gadget_start_isoc()
1603 struct dwc3 *dwc = dep->dwc; in __dwc3_gadget_ep_queue()
1671 struct dwc3 *dwc = dep->dwc; in dwc3_gadget_ep_queue()
1731 struct dwc3 *dwc = dep->dwc; in dwc3_gadget_ep_dequeue()
1782 struct dwc3 *dwc = dep->dwc; in __dwc3_gadget_ep_set_halt()
1865 struct dwc3 *dwc = dep->dwc; in dwc3_gadget_ep_set_halt()
1881 struct dwc3 *dwc = dep->dwc; in dwc3_gadget_ep_set_wedge()
1931 struct dwc3 *dwc = gadget_to_dwc(g); in dwc3_gadget_get_frame()
1936 static int __dwc3_gadget_wakeup(struct dwc3 *dwc) in __dwc3_gadget_wakeup()
1972 if (DWC3_VER_IS_PRIOR(DWC3, 194A)) { in __dwc3_gadget_wakeup()
2000 struct dwc3 *dwc = gadget_to_dwc(g); in dwc3_gadget_wakeup()
2014 struct dwc3 *dwc = gadget_to_dwc(g); in dwc3_gadget_set_selfpowered()
2024 static void dwc3_stop_active_transfers(struct dwc3 *dwc) in dwc3_stop_active_transfers()
2039 static int dwc3_gadget_run_stop(struct dwc3 *dwc, int is_on, int suspend) in dwc3_gadget_run_stop()
2049 if (DWC3_VER_IS_WITHIN(DWC3, ANY, 187A)) { in dwc3_gadget_run_stop()
2054 if (!DWC3_VER_IS_PRIOR(DWC3, 194A)) in dwc3_gadget_run_stop()
2084 static void dwc3_gadget_disable_irq(struct dwc3 *dwc);
2085 static void __dwc3_gadget_stop(struct dwc3 *dwc);
2089 struct dwc3 *dwc = gadget_to_dwc(g); in dwc3_gadget_pullup()
2156 static void dwc3_gadget_enable_irq(struct dwc3 *dwc) in dwc3_gadget_enable_irq()
2170 if (DWC3_VER_IS_PRIOR(DWC3, 250A)) in dwc3_gadget_enable_irq()
2176 static void dwc3_gadget_disable_irq(struct dwc3 *dwc) in dwc3_gadget_disable_irq()
2206 static void dwc3_gadget_setup_nump(struct dwc3 *dwc) in dwc3_gadget_setup_nump()
2228 static int __dwc3_gadget_start(struct dwc3 *dwc) in __dwc3_gadget_start()
2246 * We are telling dwc3 that we want to use DCFG.NUMP as ACK TP's NUMP in __dwc3_gadget_start()
2247 * field instead of letting dwc3 itself calculate that automatically. in __dwc3_gadget_start()
2253 if (DWC3_IP_IS(DWC3)) in __dwc3_gadget_start()
2298 struct dwc3 *dwc = gadget_to_dwc(g); in dwc3_gadget_start()
2305 IRQF_SHARED, "dwc3", dwc->ev_buf); in dwc3_gadget_start()
2338 static void __dwc3_gadget_stop(struct dwc3 *dwc) in __dwc3_gadget_stop()
2347 struct dwc3 *dwc = gadget_to_dwc(g); in dwc3_gadget_stop()
2369 struct dwc3 *dwc = gadget_to_dwc(g); in dwc3_gadget_config_params()
2408 struct dwc3 *dwc = gadget_to_dwc(g); in dwc3_gadget_set_speed()
2417 * WORKAROUND: DWC3 revision < 2.20a have an issue in dwc3_gadget_set_speed()
2429 if (DWC3_VER_IS_PRIOR(DWC3, 220A) && in dwc3_gadget_set_speed()
2447 if (DWC3_IP_IS(DWC3)) in dwc3_gadget_set_speed()
2455 if (DWC3_IP_IS(DWC3)) in dwc3_gadget_set_speed()
2481 struct dwc3 *dwc = dep->dwc; in dwc3_gadget_init_control_endpoint()
2496 struct dwc3 *dwc = dep->dwc; in dwc3_gadget_init_in_endpoint()
2508 if (DWC3_IP_IS(DWC3)) in dwc3_gadget_init_in_endpoint()
2543 struct dwc3 *dwc = dep->dwc; in dwc3_gadget_init_out_endpoint()
2556 if (DWC3_IP_IS(DWC3)) in dwc3_gadget_init_out_endpoint()
2590 static int dwc3_gadget_init_endpoint(struct dwc3 *dwc, u8 epnum) in dwc3_gadget_init_endpoint()
2639 static int dwc3_gadget_init_endpoints(struct dwc3 *dwc, u8 total) in dwc3_gadget_init_endpoints()
2656 static void dwc3_gadget_free_endpoints(struct dwc3 *dwc) in dwc3_gadget_free_endpoints()
2672 * with all sorts of bugs when removing dwc3.ko. in dwc3_gadget_free_endpoints()
2698 * receive a short transfer along the way, DWC3 will skip in dwc3_gadget_ep_reclaim_completed_trb()
2700 * where CHN bit is zero. DWC3 will also avoid clearing HWO in dwc3_gadget_ep_reclaim_completed_trb()
2863 struct dwc3 *dwc = dep->dwc; in dwc3_gadget_endpoint_trbs_complete()
2884 if (DWC3_VER_IS_PRIOR(DWC3, 183A)) { in dwc3_gadget_endpoint_trbs_complete()
2971 struct dwc3 *dwc = dep->dwc; in dwc3_gadget_endpoint_command_complete()
2998 struct dwc3 *dwc = dep->dwc; in dwc3_gadget_endpoint_stream_event()
3059 static void dwc3_endpoint_interrupt(struct dwc3 *dwc, in dwc3_endpoint_interrupt()
3102 static void dwc3_disconnect_gadget(struct dwc3 *dwc) in dwc3_disconnect_gadget()
3111 static void dwc3_suspend_gadget(struct dwc3 *dwc) in dwc3_suspend_gadget()
3120 static void dwc3_resume_gadget(struct dwc3 *dwc) in dwc3_resume_gadget()
3129 static void dwc3_reset_gadget(struct dwc3 *dwc) in dwc3_reset_gadget()
3202 static void dwc3_clear_stall_all_ep(struct dwc3 *dwc) in dwc3_clear_stall_all_ep()
3224 static void dwc3_gadget_disconnect_interrupt(struct dwc3 *dwc) in dwc3_gadget_disconnect_interrupt()
3244 static void dwc3_gadget_reset_interrupt(struct dwc3 *dwc) in dwc3_gadget_reset_interrupt()
3251 * WORKAROUND: DWC3 revisions <1.88a have an issue which in dwc3_gadget_reset_interrupt()
3276 if (DWC3_VER_IS_PRIOR(DWC3, 188A)) { in dwc3_gadget_reset_interrupt()
3302 static void dwc3_gadget_conndone_interrupt(struct dwc3 *dwc) in dwc3_gadget_conndone_interrupt()
3330 * WORKAROUND: DWC3 revisions <1.90a have an issue which in dwc3_gadget_conndone_interrupt()
3342 if (DWC3_VER_IS_PRIOR(DWC3, 190A)) in dwc3_gadget_conndone_interrupt()
3370 if (!DWC3_VER_IS_WITHIN(DWC3, ANY, 194A) && in dwc3_gadget_conndone_interrupt()
3384 * When dwc3 revisions >= 2.40a, LPM Erratum is enabled and in dwc3_gadget_conndone_interrupt()
3389 WARN_ONCE(DWC3_VER_IS_PRIOR(DWC3, 240A) && dwc->has_lpm_erratum, in dwc3_gadget_conndone_interrupt()
3390 "LPM Erratum not available on dwc3 revisions < 2.40a\n"); in dwc3_gadget_conndone_interrupt()
3392 if (dwc->has_lpm_erratum && !DWC3_VER_IS_PRIOR(DWC3, 240A)) in dwc3_gadget_conndone_interrupt()
3425 static void dwc3_gadget_wakeup_interrupt(struct dwc3 *dwc) in dwc3_gadget_wakeup_interrupt()
3439 static void dwc3_gadget_linksts_change_interrupt(struct dwc3 *dwc, in dwc3_gadget_linksts_change_interrupt()
3446 * WORKAROUND: DWC3 < 2.50a have an issue when configured without in dwc3_gadget_linksts_change_interrupt()
3463 if (DWC3_VER_IS_PRIOR(DWC3, 250A) && in dwc3_gadget_linksts_change_interrupt()
3472 * WORKAROUND: DWC3 Revisions <1.83a have an issue which, depending in dwc3_gadget_linksts_change_interrupt()
3489 if (DWC3_VER_IS_PRIOR(DWC3, 183A)) { in dwc3_gadget_linksts_change_interrupt()
3537 static void dwc3_gadget_suspend_interrupt(struct dwc3 *dwc, in dwc3_gadget_suspend_interrupt()
3548 static void dwc3_gadget_hibernation_interrupt(struct dwc3 *dwc, in dwc3_gadget_hibernation_interrupt()
3554 * WORKAROUND: DWC3 revison 2.20a with hibernation support in dwc3_gadget_hibernation_interrupt()
3572 static void dwc3_gadget_interrupt(struct dwc3 *dwc, in dwc3_gadget_interrupt()
3600 if (!DWC3_VER_IS_PRIOR(DWC3, 230A)) { in dwc3_gadget_interrupt()
3620 static void dwc3_process_event_entry(struct dwc3 *dwc, in dwc3_process_event_entry()
3635 struct dwc3 *dwc = evt->dwc; in dwc3_process_event_buf()
3685 struct dwc3 *dwc = evt->dwc; in dwc3_thread_interrupt()
3698 struct dwc3 *dwc = evt->dwc; in dwc3_check_event_buf()
3750 static int dwc3_gadget_get_irq(struct dwc3 *dwc) in dwc3_gadget_get_irq()
3793 int dwc3_gadget_init(struct dwc3 *dwc) in dwc3_gadget_init()
3843 dwc->gadget->name = "dwc3-gadget"; in dwc3_gadget_init()
3848 * <2.20a of dwc3 have an issue with metastability (documented in dwc3_gadget_init()
3853 * drivers (i.e. it won't go into dwc3's registers) we are allowing this in dwc3_gadget_init()
3862 if (DWC3_VER_IS_PRIOR(DWC3, 220A) && in dwc3_gadget_init()
3909 void dwc3_gadget_exit(struct dwc3 *dwc) in dwc3_gadget_exit()
3920 int dwc3_gadget_suspend(struct dwc3 *dwc) in dwc3_gadget_suspend()
3932 int dwc3_gadget_resume(struct dwc3 *dwc) in dwc3_gadget_resume()
3956 void dwc3_gadget_process_pending_events(struct dwc3 *dwc) in dwc3_gadget_process_pending_events()