Skip to contentSkip to conversation

usb: gadget: udc-core: remove manual dma configuration

PATCH In review Grygorii Strashko 2 participants 2 messages Apr 4, 2016 – Apr 5, 2016 USB

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 usb: gadget: udc-core: remove manual dma configuration

Since commit 7ace8fc8219e ("usb: gadget: udc: core: Fix argument of dma_map_single for IOMMU") it is not necessary to configure DMA for usb_gadget device manually, because all DMA operation are performed using parent/controller device.

---
 drivers/usb/gadget/udc/udc-core.c | 6 ------
 1 file changed, 6 deletions(-)
drivers/usb/gadget/udc/udc-core.c +0 -6
index 4151597..e4e70e1 100644
@@ -371,12 +371,6 @@ int usb_add_gadget_udc_release(struct device *parent, struct usb_gadget *gadget,
 	INIT_WORK(&gadget->work, usb_gadget_state_work);
 	gadget->dev.parent = parent;
 
-#ifdef	CONFIG_HAS_DMA
-	dma_set_coherent_mask(&gadget->dev, parent->coherent_dma_mask);
-	gadget->dev.dma_parms = parent->dma_parms;
-	gadget->dev.dma_mask = parent->dma_mask;
-#endif
-
 	if (release)
 		gadget->dev.release = release;
 	else
Signature · 1 line
2.8.0
Tested-by on v1 1/1
#1 lore raw

Hi,

Quoted 10 lines

From: Grygorii Strashko [mailto:[email protected]]
Sent: Monday, April 04, 2016 8:32 PM

Since commit 7ace8fc8219e ("usb: gadget: udc: core: Fix argument of dma_map_single for IOMMU") it is not necessary to configure DMA for usb_gadget device manually, because all DMA operation are performed using parent/controller device.

My environment could work correctly after I applied this patch. So,

I realized that the commit 7ace8fc8219e is not suitable for my environment. (Especially I realized it could use all of DMAC channels when IOMMU was enabled.) So, I will submit RFC patch set for udc-core.c / renesas_usbhs later :)

Best regards,
Yoshihiro Shimoda