diff options
author | Bo Shen <voice.shen@atmel.com> | 2014-12-17 17:18:48 +0800 |
---|---|---|
committer | Felipe Balbi <balbi@ti.com> | 2014-12-22 10:41:05 -0600 |
commit | f40afdddeb6c54ffd1e2920a5e93e363d6748db6 (patch) | |
tree | 2bd28b3ce30df56e1d8b0d909beec2efa1d0c341 /drivers/usb | |
parent | 84a2b61b6eb94036093531cdabc448dddfbae45a (diff) | |
download | op-kernel-dev-f40afdddeb6c54ffd1e2920a5e93e363d6748db6.zip op-kernel-dev-f40afdddeb6c54ffd1e2920a5e93e363d6748db6.tar.gz |
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/usb')
-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 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 |