Skip to contentSkip to conversation

usb: dwc2: Fix up, consolidate, and simplify driver parameters

PATCH In review John Youn 2 participants 4 messages Nov 4, 2016 – Nov 10, 2016 2 messages not in the archive

Subsystems (2)
lore
Share & tools
lore

John Youn

author
#0 lore raw

v2 cover usb: dwc2: Fix up, consolidate, and simplify driver parameters

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.

The long-term goal is to remove all static and legacy parameters in favor of autodetection and/or devicetree properties.

However, this patch series is mostly a cleanup and refactoring to allow for this. Then, it adds the current gadget-specific properties. And for host-mode, it adds the DMA property. Lastly, it adds the ability to set properties from the PCI driver so that we can perform IP validation with the HAPS platform.

Later patch series will address the other properties and also allow for them to be set by the PCI driver via debugfs.

Tested on DWC_hsotg IP version 3.30a on Synopsys HAPS platform.

v2:
* Renamed host-dma to "snps,host-dma-disable".
* Removed params->host_dma from being set statically.
* Reverted descriptor dma params renaming (to be addressed in the future).
* Simplified and removed unused code.

Regards,
John

John Youn (12):
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
Documentation: devicetree: dwc2: Add host DMA binding
usb: dwc2: Get 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                        |  280 +----
 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                      | 1412 ++++++++++++++++++++++++
 drivers/usb/dwc2/pci.c                         |   19 +
 drivers/usb/dwc2/platform.c                    |  207 +---
 13 files changed, 1653 insertions(+), 1561 deletions(-)
 create mode 100644 drivers/usb/dwc2/params.c
Signature · 6 lines
2.10.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): cover.1478220875.git.johnyoun-HKixBCOQz3hWk0Htik3J/[email protected]

author
#2 lore raw

PATCH v2 11/13 Documentation: devicetree: dwc2: Add host DMA binding

Add the snps,host-dma-disable binding. This controls whether to disable DMA in host mode.

---
 Documentation/devicetree/bindings/usb/dwc2.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/usb/dwc2.txt +1 -0
index 2c30a54..9472111 100644
@@ -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
+- snps,host-dma-disable: disable host DMA mode.
 - 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.
Signature · 6 lines
2.10.0

--
To unsubscribe from this list: send the line "unsubscribe devicetree" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html

A message that is not in the archive (sent off-list or not yet received): 6eb07c204dcbe7d3d9cb3db593828558ad6b3117.1478220875.git.johnyoun-HKixBCOQz3hWk0Htik3J/[email protected]

Acked-by
#4 lore raw

Re: [PATCH v2 11/13] Documentation: devicetree: dwc2: Add host DMA binding

Quoted 7 lines · John Youn

Add the snps,host-dma-disable binding. This controls whether to disable DMA in host mode.

---
 Documentation/devicetree/bindings/usb/dwc2.txt | 1 +
 1 file changed, 1 insertion(+)

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to [email protected] More majordomo info at http://vger.kernel.org/majordomo-info.html

author
#5 lore raw

PATCH v2 11/13 Documentation: devicetree: dwc2: Add host DMA binding

In reply to a message not in the archive

Add the snps,host-dma-disable binding. This controls whether to disable DMA in host mode.

---
 Documentation/devicetree/bindings/usb/dwc2.txt | 1 +
 1 file changed, 1 insertion(+)
Documentation/devicetree/bindings/usb/dwc2.txt +1 -0
index 2c30a54..9472111 100644
@@ -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
+- snps,host-dma-disable: disable host DMA mode.
 - 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.
Signature · 6 lines
2.10.0

--
To unsubscribe from this list: send the line "unsubscribe linux-usb" in
the body of a message to [email protected]
More majordomo info at  http://vger.kernel.org/majordomo-info.html