linux-arm-kernel.lists.infradead.org archive mirror
 help / color / mirror / Atom feed
* [PATCH 1/2] USB: gadget: udc: atmel: change setting for DMA
@ 2014-12-17  9:18 Bo Shen
  2014-12-17  9:18 ` [PATCH 2/2] USB: gadget: udc: atmel: fix possible IN hang issue Bo Shen
  2014-12-18 17:20 ` [PATCH 1/2] USB: gadget: udc: atmel: change setting for DMA Nicolas Ferre
  0 siblings, 2 replies; 5+ messages in thread
From: Bo Shen @ 2014-12-17  9:18 UTC (permalink / raw)
  To: linux-arm-kernel

According to the datasheet, when transfer using DMA, the control
setting for IN packet only need END_BUF_EN, END_BUF_IE, CH_EN,
while for OUT packet, need more two bits END_TR_EN and END_TR_IE
to be configured.

Signed-off-by: Bo Shen <voice.shen@atmel.com>
---

 drivers/usb/gadget/udc/atmel_usba_udc.c | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/drivers/usb/gadget/udc/atmel_usba_udc.c b/drivers/usb/gadget/udc/atmel_usba_udc.c
index ce88237..63e90f5 100644
--- a/drivers/usb/gadget/udc/atmel_usba_udc.c
+++ b/drivers/usb/gadget/udc/atmel_usba_udc.c
@@ -716,10 +716,10 @@ static int queue_dma(struct usba_udc *udc, struct usba_ep *ep,
 	req->using_dma = 1;
 	req->ctrl = USBA_BF(DMA_BUF_LEN, req->req.length)
 			| USBA_DMA_CH_EN | USBA_DMA_END_BUF_IE
-			| USBA_DMA_END_TR_EN | USBA_DMA_END_TR_IE;
+			| USBA_DMA_END_BUF_EN;
 
-	if (ep->is_in)
-		req->ctrl |= USBA_DMA_END_BUF_EN;
+	if (!ep->is_in)
+		req->ctrl |= USBA_DMA_END_TR_EN | USBA_DMA_END_TR_IE;
 
 	/*
 	 * Add this request to the queue and submit for DMA if
-- 
2.1.0.24.g4109c28

^ permalink raw reply related	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2014-12-22 16:38 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2014-12-17  9:18 [PATCH 1/2] USB: gadget: udc: atmel: change setting for DMA Bo Shen
2014-12-17  9:18 ` [PATCH 2/2] USB: gadget: udc: atmel: fix possible IN hang issue Bo Shen
2014-12-18 17:22   ` Nicolas Ferre
2014-12-18 17:20 ` [PATCH 1/2] USB: gadget: udc: atmel: change setting for DMA Nicolas Ferre
2014-12-22 16:38   ` Felipe Balbi

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).