diff options
author | Vahram Aharonyan <vahrama@synopsys.com> | 2016-11-10 06:27:48 +0300 |
---|---|---|
committer | Felipe Balbi <felipe.balbi@linux.intel.com> | 2016-11-18 14:54:18 +0300 |
commit | dec4b55677edbd9f5e4c86d020ba44bd3f3f319d (patch) | |
tree | 669b92e4879419c2d328f0575292f52fbb2719cd /drivers/usb/dwc2/gadget.c | |
parent | aa4049f3a58ce8cf889ce89300b996f373e3b3a4 (diff) | |
download | linux-dec4b55677edbd9f5e4c86d020ba44bd3f3f319d.tar.xz |
usb: dwc2: gadget: Add descriptor DMA parameter
Add a parameter for descriptor DMA and set it based on hardware
capabilities. This won't actually be used by the gadget until later,
when the descriptor DMA code is in place.
Signed-off-by: Vahram Aharonyan <vahrama@synopsys.com>
Signed-off-by: John Youn <johnyoun@synopsys.com>
Signed-off-by: Felipe Balbi <felipe.balbi@linux.intel.com>
Diffstat (limited to 'drivers/usb/dwc2/gadget.c')
-rw-r--r-- | drivers/usb/dwc2/gadget.c | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/drivers/usb/dwc2/gadget.c b/drivers/usb/dwc2/gadget.c index 1ba0bfc9e581..4013518265c0 100644 --- a/drivers/usb/dwc2/gadget.c +++ b/drivers/usb/dwc2/gadget.c @@ -96,6 +96,17 @@ static inline bool using_dma(struct dwc2_hsotg *hsotg) return hsotg->params.g_dma; } +/* + * using_desc_dma - return the descriptor DMA status of the driver. + * @hsotg: The driver state. + * + * Return true if we're using descriptor DMA. + */ +static inline bool using_desc_dma(struct dwc2_hsotg *hsotg) +{ + return hsotg->params.g_dma_desc; +} + /** * dwc2_gadget_incr_frame_num - Increments the targeted frame number. * @hs_ep: The endpoint |