* [PATCH 00/15] usb: dwc2: Fix up, consolidate, and simplify driver parameters @ 2016-10-20 1:22 John Youn [not found] ` <cover.1476926069.git.johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: John Youn @ 2016-10-20 1:22 UTC (permalink / raw) To: John Youn, Felipe Balbi, linux-usb-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Mark Rutland Cc: Vahram Aharonyan Currently there are multiple methods of setting parameters in the dwc2 driver. And PCI drivers have no way of setting any paramters. For our IP validation environment, which uses a PCIe FPGA platform, we need a way to override hardware detected values in order to fully cover hardware functionality. Also, on the gadget side, due to inheriting the legacy s3c driver behavior, several important parameters are not auto-detected at all so they must be explicitly set to fully utilize the hardware. This patch series cleans up and simplifies the parameter handling in the dwc2 driver so that it is easier to set these parameters and easier to maintain the driver and support more platforms in the long run. All code should rely on one source for parameters, the hsotg->params structure. This structure will be populated on driver probe, with values being pulled in from all other sources, while resolving any discrepancies and HW incompatibilities. The long-term goal is to remove all static and legacy parameters in favor of devicetree properties. However, this patch series is mostly a cleanup and refactoring to allow for this. Then, it adds the current gadget-specific parameters into the internal params structure. And for host-mode, it adds the DMA parameters to the devicetree. Finally, it adds the ability to set these properties in the PCI driver. Later patch series will push more parameters into devicetree and also allow for them to be set by the PCI driver via debugfs. For now, we will maintain backward compatibility with the static structures while giving priority to the devicetree bindings. For those parameters that were not previously set via the static structures (gadget ones, plus any new ones), they can *only* be set through devicetree. Tested on DWC_hsotg IP version 3.30a on Synopsys HAPS platform. Regards, John John Youn (14): usb: dwc2: Remove unnecessary kfree usb: dwc2: Remove unused hardware parameter usb: dwc2: Add params.c file usb: dwc2: Declare the core params struct statically usb: dwc2: Move parameter initialization into params.c usb: dwc2: Remove dwc2_set_all_params function usb: dwc2: Remove unnecessary prototypes usb: dwc2: Rename host_rx_fifo_size hardware parameter usb: dwc2: Move gadget settings into core_params usb: dwc2: Rename the dma_enable parameter to host_dma usb: dwc2: Rename the dma_desc_enable parameter usb: dwc2: Rename the dma_desc_enable_fs parameter Documentation: devicetree: dwc2: Add host DMA binding usb: dwc2: Read host DMA device properties Vahram Aharonyan (1): usb: dwc2: Add PCI properties Documentation/devicetree/bindings/usb/dwc2.txt | 1 + drivers/usb/dwc2/Makefile | 1 + drivers/usb/dwc2/core.c | 930 +--------------- drivers/usb/dwc2/core.h | 288 ++--- drivers/usb/dwc2/core_intr.c | 6 +- drivers/usb/dwc2/gadget.c | 95 +- drivers/usb/dwc2/hcd.c | 193 ++-- drivers/usb/dwc2/hcd_ddma.c | 4 +- drivers/usb/dwc2/hcd_intr.c | 48 +- drivers/usb/dwc2/hcd_queue.c | 18 +- drivers/usb/dwc2/params.c | 1376 ++++++++++++++++++++++++ drivers/usb/dwc2/pci.c | 19 + drivers/usb/dwc2/platform.c | 207 +--- 13 files changed, 1621 insertions(+), 1565 deletions(-) create mode 100644 drivers/usb/dwc2/params.c -- 2.10.0 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
[parent not found: <cover.1476926069.git.johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>]
* [PATCH 13/15] Documentation: devicetree: dwc2: Add host DMA binding [not found] ` <cover.1476926069.git.johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> @ 2016-10-20 1:22 ` John Youn [not found] ` <1846cc28dd77ab35cd21994bb746f7685422cfb2.1476926070.git.johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> 0 siblings, 1 reply; 4+ messages in thread From: John Youn @ 2016-10-20 1:22 UTC (permalink / raw) To: John Youn, Felipe Balbi, linux-usb-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, Rob Herring, Mark Rutland Add the host-dma property to devicetree. This controls whether to use DMA in host mode. Signed-off-by: John Youn <johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> --- Documentation/devicetree/bindings/usb/dwc2.txt | 1 + 1 file changed, 1 insertion(+) diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt index 2c30a54..17f7624 100644 --- a/Documentation/devicetree/bindings/usb/dwc2.txt +++ b/Documentation/devicetree/bindings/usb/dwc2.txt @@ -25,6 +25,7 @@ Optional properties: Refer to phy/phy-bindings.txt for generic phy consumer properties - dr_mode: shall be one of "host", "peripheral" and "otg" Refer to usb/generic.txt +- host-dma: turn on or off host buffer DMA (1 or 0). - g-use-dma: enable dma usage in gadget driver. - g-rx-fifo-size: size of rx fifo size in gadget mode. - g-np-tx-fifo-size: size of non-periodic tx fifo size in gadget mode. -- 2.10.0 -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply related [flat|nested] 4+ messages in thread
[parent not found: <1846cc28dd77ab35cd21994bb746f7685422cfb2.1476926070.git.johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org>]
* Re: [PATCH 13/15] Documentation: devicetree: dwc2: Add host DMA binding [not found] ` <1846cc28dd77ab35cd21994bb746f7685422cfb2.1476926070.git.johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> @ 2016-10-26 22:07 ` Rob Herring 2016-10-27 21:33 ` John Youn 0 siblings, 1 reply; 4+ messages in thread From: Rob Herring @ 2016-10-26 22:07 UTC (permalink / raw) To: John Youn Cc: Felipe Balbi, linux-usb-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, Mark Rutland On Wed, Oct 19, 2016 at 06:22:52PM -0700, John Youn wrote: > Add the host-dma property to devicetree. This controls whether to use > DMA in host mode. > > Signed-off-by: John Youn <johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> > --- > Documentation/devicetree/bindings/usb/dwc2.txt | 1 + > 1 file changed, 1 insertion(+) > > diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt > index 2c30a54..17f7624 100644 > --- a/Documentation/devicetree/bindings/usb/dwc2.txt > +++ b/Documentation/devicetree/bindings/usb/dwc2.txt > @@ -25,6 +25,7 @@ Optional properties: > Refer to phy/phy-bindings.txt for generic phy consumer properties > - dr_mode: shall be one of "host", "peripheral" and "otg" > Refer to usb/generic.txt > +- host-dma: turn on or off host buffer DMA (1 or 0). Why not boolean? Seems like disabling would be rare, so name the property something like host-dma-disable. Also, it needs a vendor prefix. Rob -- To unsubscribe from this list: send the line "unsubscribe devicetree" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [PATCH 13/15] Documentation: devicetree: dwc2: Add host DMA binding 2016-10-26 22:07 ` Rob Herring @ 2016-10-27 21:33 ` John Youn 0 siblings, 0 replies; 4+ messages in thread From: John Youn @ 2016-10-27 21:33 UTC (permalink / raw) To: Rob Herring, John Youn Cc: Felipe Balbi, linux-usb-u79uwXL29TY76Z2rM5mHXA, devicetree-u79uwXL29TY76Z2rM5mHXA, Mark Rutland On 10/26/2016 3:07 PM, Rob Herring wrote: > On Wed, Oct 19, 2016 at 06:22:52PM -0700, John Youn wrote: >> Add the host-dma property to devicetree. This controls whether to use >> DMA in host mode. >> >> Signed-off-by: John Youn <johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> >> --- >> Documentation/devicetree/bindings/usb/dwc2.txt | 1 + >> 1 file changed, 1 insertion(+) >> >> diff --git a/Documentation/devicetree/bindings/usb/dwc2.txt b/Documentation/devicetree/bindings/usb/dwc2.txt >> index 2c30a54..17f7624 100644 >> --- a/Documentation/devicetree/bindings/usb/dwc2.txt >> +++ b/Documentation/devicetree/bindings/usb/dwc2.txt >> @@ -25,6 +25,7 @@ Optional properties: >> Refer to phy/phy-bindings.txt for generic phy consumer properties >> - dr_mode: shall be one of "host", "peripheral" and "otg" >> Refer to usb/generic.txt >> +- host-dma: turn on or off host buffer DMA (1 or 0). > > Why not boolean? Seems like disabling would be rare, so name the > property something like host-dma-disable. Ok. > Also, it needs a vendor > prefix. > The dwc2 driver doesn't have vendor prefixes on existing DT bindings. Is this required? If so I guess we'd have to deprecate the old ones and add new ones with the vendor prefix? Regards, John -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo-u79uwXL29TY76Z2rM5mHXA@public.gmane.org More majordomo info at http://vger.kernel.org/majordomo-info.html ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2016-10-27 21:33 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2016-10-20 1:22 [PATCH 00/15] usb: dwc2: Fix up, consolidate, and simplify driver parameters John Youn [not found] ` <cover.1476926069.git.johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> 2016-10-20 1:22 ` [PATCH 13/15] Documentation: devicetree: dwc2: Add host DMA binding John Youn [not found] ` <1846cc28dd77ab35cd21994bb746f7685422cfb2.1476926070.git.johnyoun-HKixBCOQz3hWk0Htik3J/w@public.gmane.org> 2016-10-26 22:07 ` Rob Herring 2016-10-27 21:33 ` John Youn
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.