Skip to content

Commit

Permalink
usb: musb: ux500: set dma config for both src and dst
Browse files Browse the repository at this point in the history
The dma driver requires both src and dst to be set.
This fix is needed in order to run gadget mass storage.
Patch is verified on snowball.

Signed-off-by: Per Forlin <[email protected]>
Acked-by: Mian Yousaf Kaukab <[email protected]>
Acked-by: Linus Walleij <[email protected]>
Signed-off-by: Felipe Balbi <[email protected]>
  • Loading branch information
perfor authored and Felipe Balbi committed Aug 12, 2011
1 parent 93e098a commit d366d39
Showing 1 changed file with 7 additions and 9 deletions.
16 changes: 7 additions & 9 deletions drivers/usb/musb/ux500_dma.c
Original file line number Diff line number Diff line change
Expand Up @@ -133,15 +133,13 @@ static bool ux500_configure_channel(struct dma_channel *channel,
DMA_SLAVE_BUSWIDTH_4_BYTES;

slave_conf.direction = direction;
if (direction == DMA_FROM_DEVICE) {
slave_conf.src_addr = usb_fifo_addr;
slave_conf.src_addr_width = addr_width;
slave_conf.src_maxburst = 16;
} else {
slave_conf.dst_addr = usb_fifo_addr;
slave_conf.dst_addr_width = addr_width;
slave_conf.dst_maxburst = 16;
}
slave_conf.src_addr = usb_fifo_addr;
slave_conf.src_addr_width = addr_width;
slave_conf.src_maxburst = 16;
slave_conf.dst_addr = usb_fifo_addr;
slave_conf.dst_addr_width = addr_width;
slave_conf.dst_maxburst = 16;

dma_chan->device->device_control(dma_chan, DMA_SLAVE_CONFIG,
(unsigned long) &slave_conf);

Expand Down

0 comments on commit d366d39

Please sign in to comment.