Commit d712648a authored by Aaro Koskinen's avatar Aaro Koskinen Committed by Greg Kroah-Hartman

staging: octeon-usb: program DMA engine based on transfer direction

Program DMA engine based on transfer direction. We are only transferring
to one direction at a time.
Signed-off-by: default avatarAaro Koskinen <aaro.koskinen@iki.fi>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent af8e4c71
...@@ -1636,8 +1636,9 @@ static void cvmx_usb_start_channel(struct cvmx_usb_state *usb, int channel, ...@@ -1636,8 +1636,9 @@ static void cvmx_usb_start_channel(struct cvmx_usb_state *usb, int channel,
usbc_haintmsk.u32); usbc_haintmsk.u32);
} }
/* Setup the locations the DMA engines use */ /* Setup the location the DMA engine uses. */
{ {
uint64_t reg;
uint64_t dma_address = transaction->buffer + uint64_t dma_address = transaction->buffer +
transaction->actual_bytes; transaction->actual_bytes;
...@@ -1646,12 +1647,11 @@ static void cvmx_usb_start_channel(struct cvmx_usb_state *usb, int channel, ...@@ -1646,12 +1647,11 @@ static void cvmx_usb_start_channel(struct cvmx_usb_state *usb, int channel,
transaction->iso_packets[0].offset + transaction->iso_packets[0].offset +
transaction->actual_bytes; transaction->actual_bytes;
cvmx_write64_uint64(CVMX_USBNX_DMA0_OUTB_CHN0(usb->index) + if (pipe->transfer_dir == CVMX_USB_DIRECTION_OUT)
channel * 8, reg = CVMX_USBNX_DMA0_OUTB_CHN0(usb->index);
dma_address); else
cvmx_write64_uint64(CVMX_USBNX_DMA0_INB_CHN0(usb->index) + reg = CVMX_USBNX_DMA0_INB_CHN0(usb->index);
channel * 8, cvmx_write64_uint64(reg + channel * 8, dma_address);
dma_address);
} }
/* Setup both the size of the transfer and the SPLIT characteristics */ /* Setup both the size of the transfer and the SPLIT characteristics */
......
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