From: Ming Lei <tom.leiming@xxxxxxxxx> This patch passes musb pointer to is_inventra_dma to prepare for support runtime is_inventra_dma. Signed-off-by: Ming Lei <tom.leiming@xxxxxxxxx> --- drivers/usb/musb/musb_dma.h | 4 ++-- drivers/usb/musb/musb_gadget.c | 8 ++++---- drivers/usb/musb/musb_host.c | 8 ++++---- 3 files changed, 10 insertions(+), 10 deletions(-) diff --git a/drivers/usb/musb/musb_dma.h b/drivers/usb/musb/musb_dma.h index b4271b8..7a7fb27 100644 --- a/drivers/usb/musb/musb_dma.h +++ b/drivers/usb/musb/musb_dma.h @@ -69,9 +69,9 @@ struct musb_hw_ep; #endif #ifdef CONFIG_USB_INVENTRA_DMA -#define is_inventra_dma() 1 +#define is_inventra_dma(musb) 1 #else -#define is_inventra_dma() 0 +#define is_inventra_dma(musb) 0 #endif #ifdef CONFIG_USB_TI_CPPI_DMA diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 7430bbb..b784680 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -343,7 +343,7 @@ static void txstate(struct musb *musb, struct musb_request *req) /* MUSB_TXCSR_P_ISO is still set correctly */ - if (is_inventra_dma()) { + if (is_inventra_dma(musb)) { if (request_size < musb_ep->packet_sz) musb_ep->dma->desired_mode = 0; else @@ -521,7 +521,7 @@ void musb_g_tx(struct musb *musb, u8 epnum) if ((request->zero && request->length && (request->length % musb_ep->packet_sz == 0) && (request->actual == request->length)) - || (is_inventra_dma() && is_dma && (!dma->desired_mode || + || (is_inventra_dma(musb) && is_dma && (!dma->desired_mode || (request->actual & (musb_ep->packet_sz - 1)))) ) { @@ -645,7 +645,7 @@ static void rxstate(struct musb *musb, struct musb_request *req) len = musb_readw(epio, MUSB_RXCOUNT); if (request->actual < request->length) { if (is_dma_capable() && - is_inventra_dma() && musb_ep->dma) { + is_inventra_dma(musb) && musb_ep->dma) { struct dma_controller *c; struct dma_channel *channel; int use_dma = 0; @@ -851,7 +851,7 @@ void musb_g_rx(struct musb *musb, u8 epnum) musb_readw(epio, MUSB_RXCSR), musb_ep->dma->actual_len, request); - if (is_inventra_dma() || tusb_dma_omap()) { + if (is_inventra_dma(musb) || tusb_dma_omap()) { /* Autoclear doesn't clear RxPktRdy for short packets */ if ((dma->desired_mode == 0 && !hw_ep->rx_double_buffered) || (dma->actual_len diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index a42240a..a9963ac 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -628,7 +628,7 @@ static bool musb_tx_dma_program(struct dma_controller *dma, u16 csr; u8 mode; - if (is_inventra_dma()) { + if (is_inventra_dma(hw_ep->musb)) { if (length > channel->max_len) length = channel->max_len; @@ -1544,7 +1544,7 @@ void musb_host_rx(struct musb *musb, u8 epnum) /* FIXME this is _way_ too much in-line logic for Mentor DMA */ - if (!is_inventra_dma() && (rx_csr & MUSB_RXCSR_H_REQPKT)) { + if (!is_inventra_dma(musb) && (rx_csr & MUSB_RXCSR_H_REQPKT)) { /* REVISIT this happened for a while on some short reads... * the cleanup still needs investigation... looks bad... * and also duplicates dma cleanup code above ... plus, @@ -1574,7 +1574,7 @@ void musb_host_rx(struct musb *musb, u8 epnum) | MUSB_RXCSR_RXPKTRDY); musb_writew(hw_ep->regs, MUSB_RXCSR, val); - if (is_inventra_dma()) { + if (is_inventra_dma(musb)) { if (usb_pipeisoc(pipe)) { struct usb_iso_packet_descriptor *d; @@ -1630,7 +1630,7 @@ void musb_host_rx(struct musb *musb, u8 epnum) } /* we are expecting IN packets */ - if (is_inventra_dma() && dma) { + if (is_inventra_dma(musb) && dma) { struct dma_controller *c; u16 rx_count; int ret, length; -- 1.7.3 -- To unsubscribe from this list: send the line "unsubscribe linux-usb" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html