diff options
author | Bo Shen <voice.shen@atmel.com> | 2014-12-17 04:18:48 -0500 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-12-22 11:41:05 -0500 |
commit | f40afdddeb6c54ffd1e2920a5e93e363d6748db6 (patch) | |
tree | 2bd28b3ce30df56e1d8b0d909beec2efa1d0c341 /drivers | |
parent | 84a2b61b6eb94036093531cdabc448dddfbae45a (diff) |
usb: gadget: udc: atmel: change setting for DMA
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.
Fixes: 914a3f3b3754 (USB: add atmel_usba_udc driver)
Cc: <stable@vger.kernel.org> # 2.6.24+
Acked-by: Nicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: Bo Shen <voice.shen@atmel.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
Diffstat (limited to 'drivers')
-rw-r--r-- | drivers/usb/gadget/udc/atmel_usba_udc.c | 6 |
1 files 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 ce882371786b..63e90f5c05cb 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, | |||
716 | req->using_dma = 1; | 716 | req->using_dma = 1; |
717 | req->ctrl = USBA_BF(DMA_BUF_LEN, req->req.length) | 717 | req->ctrl = USBA_BF(DMA_BUF_LEN, req->req.length) |
718 | | USBA_DMA_CH_EN | USBA_DMA_END_BUF_IE | 718 | | USBA_DMA_CH_EN | USBA_DMA_END_BUF_IE |
719 | | USBA_DMA_END_TR_EN | USBA_DMA_END_TR_IE; | 719 | | USBA_DMA_END_BUF_EN; |
720 | 720 | ||
721 | if (ep->is_in) | 721 | if (!ep->is_in) |
722 | req->ctrl |= USBA_DMA_END_BUF_EN; | 722 | req->ctrl |= USBA_DMA_END_TR_EN | USBA_DMA_END_TR_IE; |
723 | 723 | ||
724 | /* | 724 | /* |
725 | * Add this request to the queue and submit for DMA if | 725 | * Add this request to the queue and submit for DMA if |