Donate to e Foundation | Murena handsets with /e/OS | Own a part of Murena! Learn more

Commit f8e9f34f authored by Tony Lindgren's avatar Tony Lindgren Committed by Felipe Balbi
Browse files

usb: musb: Fix up DMA related macros



Pass struct musb to tusb_dma_omap() and is_cppi_enabled(),
and add macros for the other DMA controllers. Populate the
platform specific quirks with the DMA type and use it during
runtime.

Note that platform glue layers with no custom DMA code are
tagged with MUSB_DMA_INVENTRA which may have a chance of
working. Looks like the defconfigs for these use PIO_ONLY,
so this should not break existing configs.

Signed-off-by: default avatarTony Lindgren <tony@atomide.com>
Signed-off-by: default avatarFelipe Balbi <balbi@ti.com>
parent e499123e
Loading
Loading
Loading
Loading
+1 −1
Original line number Diff line number Diff line
@@ -438,7 +438,7 @@ static void am35x_read_fifo(struct musb_hw_ep *hw_ep, u16 len, u8 *dst)
}

static const struct musb_platform_ops am35x_ops = {
	.quirks		= MUSB_INDEXED_EP,
	.quirks		= MUSB_DMA_INVENTRA | MUSB_INDEXED_EP,
	.init		= am35x_musb_init,
	.exit		= am35x_musb_exit,

+1 −0
Original line number Diff line number Diff line
@@ -465,6 +465,7 @@ static int bfin_musb_exit(struct musb *musb)
}

static const struct musb_platform_ops bfin_ops = {
	.quirks		= MUSB_DMA_INVENTRA,
	.init		= bfin_musb_init,
	.exit		= bfin_musb_exit,

+1 −1
Original line number Diff line number Diff line
@@ -458,7 +458,7 @@ static int da8xx_musb_exit(struct musb *musb)
}

static const struct musb_platform_ops da8xx_ops = {
	.quirks		= MUSB_INDEXED_EP,
	.quirks		= MUSB_DMA_CPPI | MUSB_INDEXED_EP,
	.init		= da8xx_musb_init,
	.exit		= da8xx_musb_exit,

+2 −1
Original line number Diff line number Diff line
@@ -284,7 +284,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 */
@@ -491,6 +491,7 @@ static int davinci_musb_exit(struct musb *musb)
}

static const struct musb_platform_ops davinci_ops = {
	.quirks		= MUSB_DMA_CPPI,
	.init		= davinci_musb_init,
	.exit		= davinci_musb_exit,

+1 −1
Original line number Diff line number Diff line
@@ -106,7 +106,7 @@ static int jz4740_musb_exit(struct musb *musb)
}

static const struct musb_platform_ops jz4740_musb_ops = {
	.quirks		= MUSB_INDEXED_EP,
	.quirks		= MUSB_DMA_INVENTRA | MUSB_INDEXED_EP,
	.fifo_mode	= 2,
	.init		= jz4740_musb_init,
	.exit		= jz4740_musb_exit,
Loading