/kernel/linux/linux-6.6/drivers/usb/dwc3/ |
H A D | Makefile | 5 obj-$(CONFIG_USB_DWC3) += dwc3.o 7 dwc3-y := core.o 10 dwc3-y += trace.o 14 dwc3-y += host.o 18 dwc3-y += gadget.o ep0.o 22 dwc3-y += drd.o 26 dwc3-y += ulpi.o 30 dwc3-y += debugfs.o 45 obj-$(CONFIG_USB_DWC3_AM62) += dwc3-am62.o 46 obj-$(CONFIG_USB_DWC3_OMAP) += dwc3 [all...] |
H A D | dwc3-haps.c | 3 * dwc3-haps.c - Synopsys HAPS PCI Specific glue layer 20 * @dwc3: child dwc3 platform_device 24 struct platform_device *dwc3; member 60 dwc->dwc3 = platform_device_alloc("dwc3", PLATFORM_DEVID_AUTO); in dwc3_haps_probe() 61 if (!dwc->dwc3) in dwc3_haps_probe() 75 ret = platform_device_add_resources(dwc->dwc3, res, ARRAY_SIZE(res)); in dwc3_haps_probe() 77 dev_err(dev, "couldn't add resources to dwc3 device\n"); in dwc3_haps_probe() 82 dwc->dwc3 in dwc3_haps_probe() [all...] |
H A D | core.h | 687 struct dwc3 *dwc; 735 struct dwc3 *dwc; 927 * @status: internal dwc3 request status tracking 977 * struct dwc3 - representation of our controller 1069 * @sysdev_is_parent: true when dwc3 device has a parent driver 1077 * @do_fifo_resize: true when txfifo resizing is enabled for dwc3 endpoints 1137 struct dwc3 { struct 1361 #define work_to_dwc(w) (container_of((w), struct dwc3, drd_work)) 1520 void dwc3_set_prtcap(struct dwc3 *dwc, u32 mode); 1521 void dwc3_set_mode(struct dwc3 *dw [all...] |
H A D | drd.c | 19 static void dwc3_otg_disable_events(struct dwc3 *dwc, u32 disable_mask) in dwc3_otg_disable_events() 27 static void dwc3_otg_enable_events(struct dwc3 *dwc, u32 enable_mask) in dwc3_otg_enable_events() 35 static void dwc3_otg_clear_events(struct dwc3 *dwc) in dwc3_otg_clear_events() 54 struct dwc3 *dwc = _dwc; in dwc3_otg_thread_irq() 72 struct dwc3 *dwc = _dwc; in dwc3_otg_irq() 93 static void dwc3_otgregs_init(struct dwc3 *dwc) in dwc3_otgregs_init() 137 static int dwc3_otg_get_irq(struct dwc3 *dwc) in dwc3_otg_get_irq() 167 void dwc3_otg_init(struct dwc3 *dwc) in dwc3_otg_init() 186 void dwc3_otg_exit(struct dwc3 *dwc) in dwc3_otg_exit() 195 void dwc3_otg_host_init(struct dwc3 *dw [all...] |
H A D | dwc3-imx8mp.c | 3 * dwc3-imx8mp.c - NXP imx8mp Specific Glue layer 53 struct platform_device *dwc3; member 101 struct dwc3 *dwc3 = platform_get_drvdata(dwc3_imx->dwc3); in dwc3_imx8mp_wakeup_enable() local 104 if (!dwc3) in dwc3_imx8mp_wakeup_enable() 109 if ((dwc3->current_dr_role == DWC3_GCTL_PRTCAP_HOST) && dwc3->xhci) in dwc3_imx8mp_wakeup_enable() 112 else if (dwc3->current_dr_role == DWC3_GCTL_PRTCAP_DEVICE) in dwc3_imx8mp_wakeup_enable() 131 struct dwc3 *dw in dwc3_imx8mp_interrupt() [all...] |
H A D | dwc3-qcom.c | 4 * Inspired by dwc3-of-simple.c 70 struct platform_device *dwc3; member 267 max_speed = usb_get_maximum_speed(&qcom->dwc3->dev); in dwc3_qcom_interconnect_init() 310 struct dwc3 *dwc; in dwc3_qcom_is_host() 315 dwc = platform_get_drvdata(qcom->dwc3); in dwc3_qcom_is_host() 326 struct dwc3 *dwc = platform_get_drvdata(qcom->dwc3); in dwc3_qcom_read_usb2_speed() 489 struct dwc3 *dwc = platform_get_drvdata(qcom->dwc3); in qcom_dwc3_resume_irq() 507 /* Configure dwc3 t in dwc3_qcom_select_utmi_clk() [all...] |
H A D | dwc3-pci.c | 3 * dwc3-pci.c - PCI Specific glue layer 70 * @dwc3: child dwc3 platform_device 77 struct platform_device *dwc3; member 272 dwc->dwc3->id = PLATFORM_DEVID_NONE; in dwc3_pci_quirks() 273 platform_bytcr_gpios.dev_id = "dwc3.ulpi"; in dwc3_pci_quirks() 289 return device_add_software_node(&dwc->dwc3->dev, swnode); in dwc3_pci_quirks() 296 struct platform_device *dwc3 = dwc->dwc3; in dwc3_pci_resume_work() local 299 ret = pm_runtime_get_sync(&dwc3 in dwc3_pci_resume_work() [all...] |
H A D | gadget.h | 18 struct dwc3; 93 * @reason: cancelled reason for the dwc3 request 110 void dwc3_ep0_interrupt(struct dwc3 *dwc, 112 void dwc3_ep0_out_start(struct dwc3 *dwc); 113 void dwc3_ep0_end_control_data(struct dwc3 *dwc, struct dwc3_ep *dep); 114 void dwc3_ep0_stall_and_restart(struct dwc3 *dwc); 120 void dwc3_ep0_send_delayed_status(struct dwc3 *dwc); 125 * @dep: dwc3 endpoint 146 static inline void dwc3_gadget_dctl_write_safe(struct dwc3 *dwc, u32 value) in dwc3_gadget_dctl_write_safe()
|
H A D | ep0.c | 30 static void __dwc3_ep0_do_control_status(struct dwc3 *dwc, struct dwc3_ep *dep); 31 static void __dwc3_ep0_do_control_data(struct dwc3 *dwc, 33 static int dwc3_ep0_delegate_req(struct dwc3 *dwc, 40 struct dwc3 *dwc; in dwc3_ep0_prepare_one_trb() 68 struct dwc3 *dwc; in dwc3_ep0_start_trans() 92 struct dwc3 *dwc = dep->dwc; in __dwc3_gadget_ep0_queue() 195 struct dwc3 *dwc = dep->dwc; in dwc3_gadget_ep0_queue() 223 void dwc3_ep0_stall_and_restart(struct dwc3 *dwc) in dwc3_ep0_stall_and_restart() 256 struct dwc3 *dwc = dep->dwc; in __dwc3_gadget_ep0_set_halt() 266 struct dwc3 *dw in dwc3_gadget_ep0_set_halt() [all...] |
H A D | gadget.c | 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() 142 static void dwc3_ep0_reset_state(struct dwc3 *dwc) in dwc3_ep0_reset_state() 196 struct dwc3 *dwc = dep->dwc; in dwc3_gadget_del_and_unmap_request() 230 struct dwc3 *dwc = dep->dwc; in dwc3_gadget_giveback() 249 int dwc3_send_gadget_generic_command(struct dwc3 *dwc, unsigned int cmd, in dwc3_send_gadget_generic_command() 280 static int __dwc3_gadget_wakeup(struct dwc3 *dwc, bool async); 295 struct dwc3 *dwc = dep->dwc; in dwc3_send_gadget_ep_cmd() 459 struct dwc3 *dw in dwc3_send_clear_stall_ep_cmd() [all...] |
H A D | core.c | 49 static int dwc3_get_dr_mode(struct dwc3 *dwc) in dwc3_get_dr_mode() 107 void dwc3_set_prtcap(struct dwc3 *dwc, u32 mode) in dwc3_set_prtcap() 121 struct dwc3 *dwc = work_to_dwc(work); in __dwc3_set_mode() 240 void dwc3_set_mode(struct dwc3 *dwc, u32 mode) in dwc3_set_mode() 256 struct dwc3 *dwc = dep->dwc; in dwc3_core_fifo_space() 272 int dwc3_core_soft_reset(struct dwc3 *dwc) in dwc3_core_soft_reset() 279 * XHCI driver will reset the host block. If dwc3 was configured for in dwc3_core_soft_reset() 327 * @dwc3: Pointer to our controller context structure 329 static void dwc3_frame_length_adjustment(struct dwc3 *dwc) in dwc3_frame_length_adjustment() 357 static void dwc3_ref_clk_period(struct dwc3 *dw [all...] |
H A D | ulpi.c | 24 static int dwc3_ulpi_busyloop(struct dwc3 *dwc, u8 addr, bool read) in dwc3_ulpi_busyloop() 53 struct dwc3 *dwc = dev_get_drvdata(dev); in dwc3_ulpi_read() 71 struct dwc3 *dwc = dev_get_drvdata(dev); in dwc3_ulpi_write() 86 int dwc3_ulpi_init(struct dwc3 *dwc) in dwc3_ulpi_init() 98 void dwc3_ulpi_exit(struct dwc3 *dwc) in dwc3_ulpi_exit()
|
H A D | debugfs.c | 287 struct dwc3 *dwc = s->private; in dwc3_host_lsp() 317 struct dwc3 *dwc = s->private; in dwc3_gadget_lsp() 331 struct dwc3 *dwc = s->private; in dwc3_lsp_show() 372 struct dwc3 *dwc = s->private; in dwc3_lsp_write() 402 struct dwc3 *dwc = s->private; in dwc3_mode_show() 443 struct dwc3 *dwc = s->private; in dwc3_mode_write() 477 struct dwc3 *dwc = s->private; in dwc3_testmode_show() 529 struct dwc3 *dwc = s->private; in dwc3_testmode_write() 574 struct dwc3 *dwc = s->private; in dwc3_link_state_show() 617 struct dwc3 *dw in dwc3_link_state_write() [all...] |
/kernel/linux/linux-5.10/drivers/usb/dwc3/ |
H A D | Makefile | 5 obj-$(CONFIG_USB_DWC3) += dwc3.o 7 dwc3-y := core.o 10 dwc3-y += trace.o 14 dwc3-y += host.o 18 dwc3-y += gadget.o ep0.o 22 dwc3-y += drd.o 26 dwc3-y += ulpi.o 30 dwc3-y += debugfs.o 45 obj-$(CONFIG_USB_DWC3_OMAP) += dwc3-omap.o 46 obj-$(CONFIG_USB_DWC3_EXYNOS) += dwc3 [all...] |
H A D | ep0.c | 30 static void __dwc3_ep0_do_control_status(struct dwc3 *dwc, struct dwc3_ep *dep); 31 static void __dwc3_ep0_do_control_data(struct dwc3 *dwc, 38 struct dwc3 *dwc; in dwc3_ep0_prepare_one_trb() 66 struct dwc3 *dwc; in dwc3_ep0_start_trans() 90 struct dwc3 *dwc = dep->dwc; in __dwc3_gadget_ep0_queue() 193 struct dwc3 *dwc = dep->dwc; in dwc3_gadget_ep0_queue() 221 static void dwc3_ep0_stall_and_restart(struct dwc3 *dwc) in dwc3_ep0_stall_and_restart() 252 struct dwc3 *dwc = dep->dwc; in __dwc3_gadget_ep0_set_halt() 262 struct dwc3 *dwc = dep->dwc; in dwc3_gadget_ep0_set_halt() 273 void dwc3_ep0_out_start(struct dwc3 *dw [all...] |
H A D | drd.c | 19 static void dwc3_otg_disable_events(struct dwc3 *dwc, u32 disable_mask) in dwc3_otg_disable_events() 27 static void dwc3_otg_enable_events(struct dwc3 *dwc, u32 enable_mask) in dwc3_otg_enable_events() 35 static void dwc3_otg_clear_events(struct dwc3 *dwc) in dwc3_otg_clear_events() 54 struct dwc3 *dwc = _dwc; in dwc3_otg_thread_irq() 72 struct dwc3 *dwc = _dwc; in dwc3_otg_irq() 93 static void dwc3_otgregs_init(struct dwc3 *dwc) in dwc3_otgregs_init() 137 static int dwc3_otg_get_irq(struct dwc3 *dwc) in dwc3_otg_get_irq() 167 void dwc3_otg_init(struct dwc3 *dwc) in dwc3_otg_init() 186 void dwc3_otg_exit(struct dwc3 *dwc) in dwc3_otg_exit() 195 void dwc3_otg_host_init(struct dwc3 *dw [all...] |
H A D | dwc3-haps.c | 3 * dwc3-haps.c - Synopsys HAPS PCI Specific glue layer 20 * @dwc3: child dwc3 platform_device 24 struct platform_device *dwc3; member 56 dwc->dwc3 = platform_device_alloc("dwc3", PLATFORM_DEVID_AUTO); in dwc3_haps_probe() 57 if (!dwc->dwc3) in dwc3_haps_probe() 71 ret = platform_device_add_resources(dwc->dwc3, res, ARRAY_SIZE(res)); in dwc3_haps_probe() 73 dev_err(dev, "couldn't add resources to dwc3 device\n"); in dwc3_haps_probe() 78 dwc->dwc3 in dwc3_haps_probe() [all...] |
H A D | core.h | 649 struct dwc3 *dwc; 697 struct dwc3 *dwc; 883 * @status: internal dwc3 request status tracking 931 * struct dwc3 - representation of our controller 1014 * @has_hibernation: true when dwc3 was configured with Hibernation 1015 * @sysdev_is_parent: true when dwc3 device has a parent driver 1066 struct dwc3 { struct 1269 #define work_to_dwc(w) (container_of((w), struct dwc3, drd_work)) 1428 void dwc3_set_prtcap(struct dwc3 *dwc, u32 mode); 1429 void dwc3_set_mode(struct dwc3 *dw [all...] |
H A D | gadget.c | 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() 178 struct dwc3 *dwc = dep->dwc; in dwc3_gadget_del_and_unmap_request() 212 struct dwc3 *dwc = dep->dwc; in dwc3_gadget_giveback() 231 int dwc3_send_gadget_generic_command(struct dwc3 *dwc, unsigned int cmd, in dwc3_send_gadget_generic_command() 262 static int __dwc3_gadget_wakeup(struct dwc3 *dwc); 277 struct dwc3 *dwc = dep->dwc; in dwc3_send_gadget_ep_cmd() 424 struct dwc3 *dwc = dep->dwc; in dwc3_send_clear_stall_ep_cmd() 456 struct dwc3 *dw in dwc3_alloc_trb_pool() [all...] |
H A D | dwc3-qcom.c | 4 * Inspired by dwc3-of-simple.c 69 struct platform_device *dwc3; member 265 if (usb_get_maximum_speed(&qcom->dwc3->dev) >= USB_SPEED_SUPER || in dwc3_qcom_interconnect_init() 266 usb_get_maximum_speed(&qcom->dwc3->dev) == USB_SPEED_UNKNOWN) in dwc3_qcom_interconnect_init() 309 struct dwc3 *dwc; in dwc3_qcom_is_host() 314 dwc = platform_get_drvdata(qcom->dwc3); in dwc3_qcom_is_host() 432 struct dwc3 *dwc = platform_get_drvdata(qcom->dwc3); in qcom_dwc3_resume_irq() 450 /* Configure dwc3 to use UTMI clock as PIPE clock not present */ in dwc3_qcom_select_utmi_clk() 614 qcom->dwc3 in dwc3_qcom_acpi_register_core() [all...] |
H A D | dwc3-pci.c | 3 * dwc3-pci.c - PCI Specific glue layer 56 * @dwc3: child dwc3 platform_device 63 struct platform_device *dwc3; member 214 struct platform_device *dwc3 = dwc->dwc3; in dwc3_pci_resume_work() local 217 ret = pm_runtime_get_sync(&dwc3->dev); in dwc3_pci_resume_work() 219 pm_runtime_put_sync_autosuspend(&dwc3->dev); in dwc3_pci_resume_work() 223 pm_runtime_mark_last_busy(&dwc3->dev); in dwc3_pci_resume_work() 224 pm_runtime_put_sync_autosuspend(&dwc3 in dwc3_pci_resume_work() [all...] |
H A D | ulpi.c | 24 static int dwc3_ulpi_busyloop(struct dwc3 *dwc, u8 addr, bool read) in dwc3_ulpi_busyloop() 53 struct dwc3 *dwc = dev_get_drvdata(dev); in dwc3_ulpi_read() 71 struct dwc3 *dwc = dev_get_drvdata(dev); in dwc3_ulpi_write() 86 int dwc3_ulpi_init(struct dwc3 *dwc) in dwc3_ulpi_init() 98 void dwc3_ulpi_exit(struct dwc3 *dwc) in dwc3_ulpi_exit()
|
H A D | debugfs.c | 282 struct dwc3 *dwc = s->private; in dwc3_host_lsp() 312 struct dwc3 *dwc = s->private; in dwc3_gadget_lsp() 326 struct dwc3 *dwc = s->private; in dwc3_lsp_show() 367 struct dwc3 *dwc = s->private; in dwc3_lsp_write() 397 struct dwc3 *dwc = s->private; in dwc3_mode_show() 438 struct dwc3 *dwc = s->private; in dwc3_mode_write() 472 struct dwc3 *dwc = s->private; in dwc3_testmode_show() 524 struct dwc3 *dwc = s->private; in dwc3_testmode_write() 569 struct dwc3 *dwc = s->private; in dwc3_link_state_show() 612 struct dwc3 *dw in dwc3_link_state_write() [all...] |
H A D | core.c | 47 static int dwc3_get_dr_mode(struct dwc3 *dwc) in dwc3_get_dr_mode() 105 void dwc3_set_prtcap(struct dwc3 *dwc, u32 mode) in dwc3_set_prtcap() 119 struct dwc3 *dwc = work_to_dwc(work); in __dwc3_set_mode() 238 void dwc3_set_mode(struct dwc3 *dwc, u32 mode) in dwc3_set_mode() 254 struct dwc3 *dwc = dep->dwc; in dwc3_core_fifo_space() 270 int dwc3_core_soft_reset(struct dwc3 *dwc) in dwc3_core_soft_reset() 277 * XHCI driver will reset the host block. If dwc3 was configured for in dwc3_core_soft_reset() 324 * @dwc3: Pointer to our controller context structure 326 static void dwc3_frame_length_adjustment(struct dwc3 *dwc) in dwc3_frame_length_adjustment() 351 static void dwc3_free_one_event_buffer(struct dwc3 *dw [all...] |
H A D | gadget.h | 18 struct dwc3; 108 void dwc3_ep0_interrupt(struct dwc3 *dwc, 110 void dwc3_ep0_out_start(struct dwc3 *dwc); 116 void dwc3_ep0_send_delayed_status(struct dwc3 *dwc); 120 * @dep: dwc3 endpoint 141 static inline void dwc3_gadget_dctl_write_safe(struct dwc3 *dwc, u32 value) in dwc3_gadget_dctl_write_safe()
|