Loading drivers/usb/dwc3/Makefile +1 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ CFLAGS_trace.o := -I$(src) ccflags-$(CONFIG_USB_DWC3_DEBUG) := -DDEBUG ccflags-$(CONFIG_USB_DWC3_VERBOSE) += -DVERBOSE_DEBUG ccflags-y += -Idrivers/usb/host ccflags-y += -Idrivers/usb/host -Idrivers/base/power obj-$(CONFIG_USB_DWC3) += dwc3.o Loading @@ -17,8 +17,6 @@ ifneq ($(filter y,$(CONFIG_USB_DWC3_GADGET) $(CONFIG_USB_DWC3_DUAL_ROLE)),) dwc3-y += gadget.o ep0.o endif dwc3-y += dwc3_otg.o ifneq ($(CONFIG_DEBUG_FS),) dwc3-y += debugfs.o endif Loading drivers/usb/dwc3/core.c +1 −8 Original line number Diff line number Diff line Loading @@ -706,16 +706,11 @@ static int dwc3_core_init_mode(struct dwc3 *dwc) break; case USB_DR_MODE_OTG: dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_OTG); ret = dwc3_otg_init(dwc); if (ret) { dev_err(dev, "failed to initialize otg\n"); return ret; } dwc->is_drd = true; ret = dwc3_host_init(dwc); if (ret) { dev_err(dev, "failed to initialize host\n"); dwc3_otg_exit(dwc); return ret; } Loading @@ -723,7 +718,6 @@ static int dwc3_core_init_mode(struct dwc3 *dwc) if (ret) { dev_err(dev, "failed to initialize gadget\n"); dwc3_host_exit(dwc); dwc3_otg_exit(dwc); return ret; } break; Loading @@ -747,7 +741,6 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc) case USB_DR_MODE_OTG: dwc3_gadget_exit(dwc); dwc3_host_exit(dwc); dwc3_otg_exit(dwc); break; default: /* do nothing */ Loading drivers/usb/dwc3/core.h +5 −6 Original line number Diff line number Diff line Loading @@ -35,8 +35,6 @@ #include <linux/phy/phy.h> #include "dwc3_otg.h" #define DWC3_MSG_MAX 500 /* Global constants */ Loading Loading @@ -733,6 +731,7 @@ struct dwc3_scratchpad_array { #define DWC3_CONTROLLER_POST_INITIALIZATION_EVENT 7 #define DWC3_CONTROLLER_CONNDONE_EVENT 8 #define DWC3_CONTROLLER_NOTIFY_OTG_EVENT 9 #define DWC3_CONTROLLER_SET_CURRENT_DRAW_EVENT 10 #define MAX_INTR_STATS 10 /** Loading Loading @@ -795,6 +794,7 @@ struct dwc3_scratchpad_array { * @setup_packet_pending: true when there's a Setup Packet in FIFO. Workaround * @start_config_issued: true when StartConfig command has been issued * @three_stage_setup: set if we perform a three phase setup * @is_drd: device supports dual-role or not * @err_evt_seen: previous event in queue was erratic error * @usb3_u1u2_disable: if true, disable U1U2 low power modes in Superspeed mode. * @hird_thresh: value to configure in DCTL[HIRD_Thresh] Loading @@ -807,6 +807,7 @@ struct dwc3_scratchpad_array { * @bh_handled_evt_cnt: no. of events handled by tasklet per interrupt * @bh_dbg_index: index for capturing bh_completion_time and bh_handled_evt_cnt * @wait_linkstate: waitqueue for waiting LINK to move into required state * @vbus_draw: current to be drawn from USB */ struct dwc3 { struct usb_ctrlrequest *ctrl_req; Loading @@ -825,7 +826,6 @@ struct dwc3 { struct device *dev; struct dwc3_otg *dotg; struct platform_device *xhci; struct resource xhci_resources[DWC3_XHCI_RESOURCES_NUM]; Loading Loading @@ -916,6 +916,7 @@ struct dwc3 { unsigned setup_packet_pending:1; unsigned start_config_issued:1; unsigned three_stage_setup:1; unsigned is_drd:1; /* Indicate if the gadget was powered by the otg driver */ unsigned vbus_active:1; Loading @@ -937,6 +938,7 @@ struct dwc3 { atomic_t in_lpm; int tx_fifo_size; bool b_suspend; unsigned vbus_draw; /* IRQ timing statistics */ int irq; Loading Loading @@ -1102,9 +1104,6 @@ struct dwc3_gadget_ep_cmd_params { void dwc3_set_mode(struct dwc3 *dwc, u32 mode); int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc); int dwc3_otg_init(struct dwc3 *dwc); void dwc3_otg_exit(struct dwc3 *dwc); #if IS_ENABLED(CONFIG_USB_DWC3_HOST) || IS_ENABLED(CONFIG_USB_DWC3_DUAL_ROLE) int dwc3_host_init(struct dwc3 *dwc); void dwc3_host_exit(struct dwc3 *dwc); Loading Loading
drivers/usb/dwc3/Makefile +1 −3 Original line number Diff line number Diff line Loading @@ -3,7 +3,7 @@ CFLAGS_trace.o := -I$(src) ccflags-$(CONFIG_USB_DWC3_DEBUG) := -DDEBUG ccflags-$(CONFIG_USB_DWC3_VERBOSE) += -DVERBOSE_DEBUG ccflags-y += -Idrivers/usb/host ccflags-y += -Idrivers/usb/host -Idrivers/base/power obj-$(CONFIG_USB_DWC3) += dwc3.o Loading @@ -17,8 +17,6 @@ ifneq ($(filter y,$(CONFIG_USB_DWC3_GADGET) $(CONFIG_USB_DWC3_DUAL_ROLE)),) dwc3-y += gadget.o ep0.o endif dwc3-y += dwc3_otg.o ifneq ($(CONFIG_DEBUG_FS),) dwc3-y += debugfs.o endif Loading
drivers/usb/dwc3/core.c +1 −8 Original line number Diff line number Diff line Loading @@ -706,16 +706,11 @@ static int dwc3_core_init_mode(struct dwc3 *dwc) break; case USB_DR_MODE_OTG: dwc3_set_mode(dwc, DWC3_GCTL_PRTCAP_OTG); ret = dwc3_otg_init(dwc); if (ret) { dev_err(dev, "failed to initialize otg\n"); return ret; } dwc->is_drd = true; ret = dwc3_host_init(dwc); if (ret) { dev_err(dev, "failed to initialize host\n"); dwc3_otg_exit(dwc); return ret; } Loading @@ -723,7 +718,6 @@ static int dwc3_core_init_mode(struct dwc3 *dwc) if (ret) { dev_err(dev, "failed to initialize gadget\n"); dwc3_host_exit(dwc); dwc3_otg_exit(dwc); return ret; } break; Loading @@ -747,7 +741,6 @@ static void dwc3_core_exit_mode(struct dwc3 *dwc) case USB_DR_MODE_OTG: dwc3_gadget_exit(dwc); dwc3_host_exit(dwc); dwc3_otg_exit(dwc); break; default: /* do nothing */ Loading
drivers/usb/dwc3/core.h +5 −6 Original line number Diff line number Diff line Loading @@ -35,8 +35,6 @@ #include <linux/phy/phy.h> #include "dwc3_otg.h" #define DWC3_MSG_MAX 500 /* Global constants */ Loading Loading @@ -733,6 +731,7 @@ struct dwc3_scratchpad_array { #define DWC3_CONTROLLER_POST_INITIALIZATION_EVENT 7 #define DWC3_CONTROLLER_CONNDONE_EVENT 8 #define DWC3_CONTROLLER_NOTIFY_OTG_EVENT 9 #define DWC3_CONTROLLER_SET_CURRENT_DRAW_EVENT 10 #define MAX_INTR_STATS 10 /** Loading Loading @@ -795,6 +794,7 @@ struct dwc3_scratchpad_array { * @setup_packet_pending: true when there's a Setup Packet in FIFO. Workaround * @start_config_issued: true when StartConfig command has been issued * @three_stage_setup: set if we perform a three phase setup * @is_drd: device supports dual-role or not * @err_evt_seen: previous event in queue was erratic error * @usb3_u1u2_disable: if true, disable U1U2 low power modes in Superspeed mode. * @hird_thresh: value to configure in DCTL[HIRD_Thresh] Loading @@ -807,6 +807,7 @@ struct dwc3_scratchpad_array { * @bh_handled_evt_cnt: no. of events handled by tasklet per interrupt * @bh_dbg_index: index for capturing bh_completion_time and bh_handled_evt_cnt * @wait_linkstate: waitqueue for waiting LINK to move into required state * @vbus_draw: current to be drawn from USB */ struct dwc3 { struct usb_ctrlrequest *ctrl_req; Loading @@ -825,7 +826,6 @@ struct dwc3 { struct device *dev; struct dwc3_otg *dotg; struct platform_device *xhci; struct resource xhci_resources[DWC3_XHCI_RESOURCES_NUM]; Loading Loading @@ -916,6 +916,7 @@ struct dwc3 { unsigned setup_packet_pending:1; unsigned start_config_issued:1; unsigned three_stage_setup:1; unsigned is_drd:1; /* Indicate if the gadget was powered by the otg driver */ unsigned vbus_active:1; Loading @@ -937,6 +938,7 @@ struct dwc3 { atomic_t in_lpm; int tx_fifo_size; bool b_suspend; unsigned vbus_draw; /* IRQ timing statistics */ int irq; Loading Loading @@ -1102,9 +1104,6 @@ struct dwc3_gadget_ep_cmd_params { void dwc3_set_mode(struct dwc3 *dwc, u32 mode); int dwc3_gadget_resize_tx_fifos(struct dwc3 *dwc); int dwc3_otg_init(struct dwc3 *dwc); void dwc3_otg_exit(struct dwc3 *dwc); #if IS_ENABLED(CONFIG_USB_DWC3_HOST) || IS_ENABLED(CONFIG_USB_DWC3_DUAL_ROLE) int dwc3_host_init(struct dwc3 *dwc); void dwc3_host_exit(struct dwc3 *dwc); Loading