Skip to content
This repository has been archived by the owner on Dec 20, 2023. It is now read-only.

Commit

Permalink
usb: gadget: udc: atmel: change setting for DMA
Browse files Browse the repository at this point in the history
commit f40afdd 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: 914a3f3 (USB: add atmel_usba_udc driver)
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>
Signed-off-by: Greg Kroah-Hartman <gregkh@linuxfoundation.org>
  • Loading branch information
Bo Shen authored and gregkh committed Jan 27, 2015
1 parent 84ac889 commit c811188
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions drivers/usb/gadget/udc/atmel_usba_udc.c
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c811188

Please sign in to comment.