Commit b6a6631d authored by Sergei Shtylyov's avatar Sergei Shtylyov Committed by Greg Kroah-Hartman

usb: musb: host: make musb_tx_dma_set_mode_*() *void*

Now that the DMA engine check was moved to musb_tx_dma_porgram(), both
musb_tx_dma_set_mode_cppi_tusb() and musb_tx_dma_set_mode_mentor() always
return 0, so we can  make both these functions *void*.
Signed-off-by: default avatarSergei Shtylyov <sergei.shtylyov@cogentembedded.com>
[b-liu@ti.com: revise subject prefix]
Signed-off-by: default avatarBin Liu <b-liu@ti.com>
Signed-off-by: default avatarGreg Kroah-Hartman <gregkh@linuxfoundation.org>
parent 858b9be7
...@@ -633,7 +633,7 @@ musb_rx_reinit(struct musb *musb, struct musb_qh *qh, u8 epnum) ...@@ -633,7 +633,7 @@ musb_rx_reinit(struct musb *musb, struct musb_qh *qh, u8 epnum)
ep->rx_reinit = 0; ep->rx_reinit = 0;
} }
static int musb_tx_dma_set_mode_mentor(struct dma_controller *dma, static void musb_tx_dma_set_mode_mentor(struct dma_controller *dma,
struct musb_hw_ep *hw_ep, struct musb_qh *qh, struct musb_hw_ep *hw_ep, struct musb_qh *qh,
struct urb *urb, u32 offset, struct urb *urb, u32 offset,
u32 *length, u8 *mode) u32 *length, u8 *mode)
...@@ -670,17 +670,15 @@ static int musb_tx_dma_set_mode_mentor(struct dma_controller *dma, ...@@ -670,17 +670,15 @@ static int musb_tx_dma_set_mode_mentor(struct dma_controller *dma,
} }
channel->desired_mode = *mode; channel->desired_mode = *mode;
musb_writew(epio, MUSB_TXCSR, csr); musb_writew(epio, MUSB_TXCSR, csr);
return 0;
} }
static int musb_tx_dma_set_mode_cppi_tusb(struct dma_controller *dma, static void musb_tx_dma_set_mode_cppi_tusb(struct dma_controller *dma,
struct musb_hw_ep *hw_ep, struct musb_hw_ep *hw_ep,
struct musb_qh *qh, struct musb_qh *qh,
struct urb *urb, struct urb *urb,
u32 offset, u32 offset,
u32 *length, u32 *length,
u8 *mode) u8 *mode)
{ {
struct dma_channel *channel = hw_ep->tx_channel; struct dma_channel *channel = hw_ep->tx_channel;
...@@ -691,8 +689,6 @@ static int musb_tx_dma_set_mode_cppi_tusb(struct dma_controller *dma, ...@@ -691,8 +689,6 @@ static int musb_tx_dma_set_mode_cppi_tusb(struct dma_controller *dma,
* to identify the zero-length-final-packet case. * to identify the zero-length-final-packet case.
*/ */
*mode = (urb->transfer_flags & URB_ZERO_PACKET) ? 1 : 0; *mode = (urb->transfer_flags & URB_ZERO_PACKET) ? 1 : 0;
return 0;
} }
static bool musb_tx_dma_program(struct dma_controller *dma, static bool musb_tx_dma_program(struct dma_controller *dma,
...@@ -702,18 +698,15 @@ static bool musb_tx_dma_program(struct dma_controller *dma, ...@@ -702,18 +698,15 @@ static bool musb_tx_dma_program(struct dma_controller *dma,
struct dma_channel *channel = hw_ep->tx_channel; struct dma_channel *channel = hw_ep->tx_channel;
u16 pkt_size = qh->maxpacket; u16 pkt_size = qh->maxpacket;
u8 mode; u8 mode;
int res;
if (musb_dma_inventra(hw_ep->musb) || musb_dma_ux500(hw_ep->musb)) if (musb_dma_inventra(hw_ep->musb) || musb_dma_ux500(hw_ep->musb))
res = musb_tx_dma_set_mode_mentor(dma, hw_ep, qh, urb, musb_tx_dma_set_mode_mentor(dma, hw_ep, qh, urb, offset,
offset, &length, &mode); &length, &mode);
else if (is_cppi_enabled(hw_ep->musb) || tusb_dma_omap(hw_ep->musb)) else if (is_cppi_enabled(hw_ep->musb) || tusb_dma_omap(hw_ep->musb))
res = musb_tx_dma_set_mode_cppi_tusb(dma, hw_ep, qh, urb, musb_tx_dma_set_mode_cppi_tusb(dma, hw_ep, qh, urb, offset,
offset, &length, &mode); &length, &mode);
else else
return false; return false;
if (res)
return false;
qh->segsize = length; qh->segsize = length;
......
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