Skip to content

usb: dwc2: Remove host and gadget only code from core

John Youn linux-arm-kernel lkml 2 versions – New

Get series with b4
b4 am [email protected]

Versions newest first · linked by author and title

  1. v2 Latest2 patches 0 repliesNew
  2. v12 patches 2 repliesSuperseded

Changes in v2 from the cover letter

* Addressed issues from Douglas Anderson
* Restored comments on dwc2_calc_frame_interval()
* Made some functions static and removed their prototypes from headers
* Added tags

Patches in v2 No applies recorded yet

#Subject and filesSizeRepliesApplied
1/2usb: dwc2: Move register save and restore functionsdrivers/usb/dwc2/core.c drivers/usb/dwc2/core.h drivers/usb/dwc2/gadget.c +1 more+179 -1830 replies
2/2usb: dwc2: Move host-specific core functions into hcd.cdrivers/usb/dwc2/core.c drivers/usb/dwc2/core.h drivers/usb/dwc2/hcd.c +1 more+1853 -18480 replies

Reviews trailers per patch

All 2 patches have a Reviewed-by or Acked-by.

PatchDouglas Anderson
1/2T-b R-b
2/2T-b R-b

Trailers given in replies are filled; those carried in the patches from earlier versions are outlined with dashes.

Read the v2 thread

Cover letter [PATCH v2 0/2] usb: dwc2: Remove host and gadget only code from core

This series moves the host/gadget-specific code from core.c to hcd.c and gadget.c so that they will be compiled only when their respective configurations are selected, or in DRD.

This is mostly just a straight move of the code. I have also added some comments to group related functions together.

Compiled and tested in all three modes.

This should also solve the issue reported here:
http://marc.info/?l=linux-usb&m=145591813410106&w=2

Although I wasn't able to test it... couldn't figure out how to disable CONFIG_USB and enable DWC2 in gadget mode.

Felipe,

This should be applied after Doug's series on your testing/next branch.

Regards,
John

v2:
* Addressed issues from Douglas Anderson
* Restored comments on dwc2_calc_frame_interval()
* Made some functions static and removed their prototypes from headers
* Added tags

John Youn (2):
usb: dwc2: Move register save and restore functions
usb: dwc2: Move host-specific core functions into hcd.c

 drivers/usb/dwc2/core.c   | 1959 ---------------------------------------------
 drivers/usb/dwc2/core.h   |   37 +-
 drivers/usb/dwc2/gadget.c |  102 +++
 drivers/usb/dwc2/hcd.c    | 1959 +++++++++++++++++++++++++++++++++++++++++++--
 drivers/usb/dwc2/hcd.h    |    8 +
 5 files changed, 2033 insertions(+), 2032 deletions(-)
Signature · 1 line
2.6.3