From: Ming Lei <tom.leiming@xxxxxxxxx> This patch passes musb pointer to is_cppi_enabled to prepare for support of runtime is_cppi_enabled. Signed-off-by: Ming Lei <tom.leiming@xxxxxxxxx> --- drivers/usb/musb/davinci.c | 2 +- drivers/usb/musb/musb_core.c | 2 +- drivers/usb/musb/musb_dma.h | 4 ++-- drivers/usb/musb/musb_gadget.c | 4 ++-- drivers/usb/musb/musb_host.c | 10 +++++----- 5 files changed, 11 insertions(+), 11 deletions(-) diff --git a/drivers/usb/musb/davinci.c b/drivers/usb/musb/davinci.c index b0f5101..7f339cf 100644 --- a/drivers/usb/musb/davinci.c +++ b/drivers/usb/musb/davinci.c @@ -291,7 +291,7 @@ static irqreturn_t davinci_musb_interrupt(int irq, void *__hci) * mask, state, "vector", and EOI registers. */ cppi = container_of(musb->dma_controller, struct cppi, controller); - if (is_cppi_enabled() && musb->dma_controller && !cppi->irq) + if (is_cppi_enabled(musb) && musb->dma_controller && !cppi->irq) retval = cppi_interrupt(irq, __hci); /* ack and handle non-CPPI interrupts */ diff --git a/drivers/usb/musb/musb_core.c b/drivers/usb/musb/musb_core.c index d4c1eda..7eace04 100644 --- a/drivers/usb/musb/musb_core.c +++ b/drivers/usb/musb/musb_core.c @@ -1700,7 +1700,7 @@ void musb_dma_completion(struct musb *musb, u8 epnum, u8 transmit) /* called with controller lock already held */ if (!epnum) { - if (!tusb_dma_omap(musb) && !is_cppi_enabled()) { + if (!tusb_dma_omap(musb) && !is_cppi_enabled(musb)) { /* endpoint 0 */ if (devctl & MUSB_DEVCTL_HM) musb_h_ep0_irq(musb); diff --git a/drivers/usb/musb/musb_dma.h b/drivers/usb/musb/musb_dma.h index aa1ee04..dbc6d3d 100644 --- a/drivers/usb/musb/musb_dma.h +++ b/drivers/usb/musb/musb_dma.h @@ -75,9 +75,9 @@ struct musb_hw_ep; #endif #ifdef CONFIG_USB_TI_CPPI_DMA -#define is_cppi_enabled() 1 +#define is_cppi_enabled(musb) 1 #else -#define is_cppi_enabled() 0 +#define is_cppi_enabled(musb) 0 #endif #ifdef CONFIG_USB_TUSB_OMAP_DMA diff --git a/drivers/usb/musb/musb_gadget.c b/drivers/usb/musb/musb_gadget.c index 59a2440..f9b99be 100644 --- a/drivers/usb/musb/musb_gadget.c +++ b/drivers/usb/musb/musb_gadget.c @@ -380,7 +380,7 @@ static void txstate(struct musb *musb, struct musb_request *req) musb_writew(epio, MUSB_TXCSR, csr); } - } else if (is_cppi_enabled()) { + } else if (is_cppi_enabled(musb)) { /* program endpoint CSR first, then setup DMA */ csr &= ~(MUSB_TXCSR_P_UNDERRUN | MUSB_TXCSR_TXPKTRDY); csr |= MUSB_TXCSR_DMAENAB | MUSB_TXCSR_DMAMODE | @@ -614,7 +614,7 @@ static void rxstate(struct musb *musb, struct musb_request *req) return; } - if (is_cppi_enabled() && musb_ep->dma) { + if (is_cppi_enabled(musb) && musb_ep->dma) { struct dma_controller *c = musb->dma_controller; struct dma_channel *channel = musb_ep->dma; diff --git a/drivers/usb/musb/musb_host.c b/drivers/usb/musb/musb_host.c index 85b46f7..7063dd8 100644 --- a/drivers/usb/musb/musb_host.c +++ b/drivers/usb/musb/musb_host.c @@ -177,7 +177,7 @@ static inline void musb_h_tx_dma_start(struct musb_hw_ep *ep) /* NOTE: no locks here; caller should lock and select EP */ txcsr = musb_readw(ep->regs, MUSB_TXCSR); txcsr |= MUSB_TXCSR_DMAENAB | MUSB_TXCSR_H_WZC_BITS; - if (is_cppi_enabled()) + if (is_cppi_enabled(ep->musb)) txcsr |= MUSB_TXCSR_DMAMODE; musb_writew(ep->regs, MUSB_TXCSR, txcsr); } @@ -291,7 +291,7 @@ start: if (!hw_ep->tx_channel) musb_h_tx_start(hw_ep); - else if (is_cppi_enabled() || tusb_dma_omap(musb)) + else if (is_cppi_enabled(musb) || tusb_dma_omap(musb)) musb_h_tx_dma_start(hw_ep); } } @@ -647,7 +647,7 @@ static bool musb_tx_dma_program(struct dma_controller *dma, channel->desired_mode = mode; musb_writew(epio, MUSB_TXCSR, csr); } else { - if (!is_cppi_enabled() && !tusb_dma_omap(hw_ep->musb)) + if (!is_cppi_enabled(hw_ep->musb) && !tusb_dma_omap(hw_ep->musb)) return false; channel->actual_len = 0; @@ -850,7 +850,7 @@ static void musb_ep_program(struct musb *musb, u8 epnum, /* kick things off */ - if ((is_cppi_enabled() || tusb_dma_omap(musb)) && dma_channel) { + if ((is_cppi_enabled(musb) || tusb_dma_omap(musb)) && dma_channel) { /* candidate for DMA */ if (dma_channel) { dma_channel->actual_len = 0L; @@ -1313,7 +1313,7 @@ void musb_host_tx(struct musb *musb, u8 epnum) } else if ((usb_pipeisoc(pipe) || transfer_pending) && dma) { if (musb_tx_dma_program(musb->dma_controller, hw_ep, qh, urb, offset, length)) { - if (is_cppi_enabled() || tusb_dma_omap(musb)) + if (is_cppi_enabled(musb) || tusb_dma_omap(musb)) musb_h_tx_dma_start(hw_ep); return; } -- 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