Commit fad26567 authored by Bo Shen's avatar Bo Shen Committed by Luis Henriques

usb: gadget: udc: atmel: change setting for DMA

commit f40afddd upstream.

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: 914a3f3b (USB: add atmel_usba_udc driver)
Acked-by: default avatarNicolas Ferre <nicolas.ferre@atmel.com>
Signed-off-by: default avatarBo Shen <voice.shen@atmel.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
[ luis: backported to 3.16:
  - file rename: drivers/usb/gadget/udc/atmel_usba_udc.c ->
    drivers/usb/gadget/atmel_usba_udc.c ]
Signed-off-by: default avatarLuis Henriques <luis.henriques@canonical.com>
parent 842c7ef5
......@@ -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
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment