Skip to content

Commit

Permalink
musb: sunxi: Make sunxi musb glue work without MUSB_PIO_ONLY
Browse files Browse the repository at this point in the history
Now that it is possible to build in multiple dma engines, we can no longer
require MUSB_PIO_ONLY to be set when using the sunxi musb glue.

This patch adds dummy dma hooks to make the musb glue work without
MUSB_PIO_ONLY. This hooks are fake because we do not support dma with
musb on sunxi. The Allwinnner Android kernels have some dma code, but it
is disabled as Allwinner never managed to get it to work.

Signed-off-by: Hans de Goede <hdegoede@redhat.com>
Signed-off-by: Felipe Balbi <balbi@ti.com>
  • Loading branch information
Hans de Goede authored and Felipe Balbi committed Oct 9, 2015
1 parent 94218ee commit f301fe2
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions drivers/usb/musb/sunxi.c
Original file line number Diff line number Diff line change
Expand Up @@ -341,6 +341,16 @@ static void sunxi_musb_disable(struct musb *musb)
clear_bit(SUNXI_MUSB_FL_ENABLED, &glue->flags);
}

struct dma_controller *sunxi_musb_dma_controller_create(struct musb *musb,
void __iomem *base)
{
return NULL;
}

void sunxi_musb_dma_controller_destroy(struct dma_controller *c)
{
}

/*
* sunxi musb register layout
* 0x00 - 0x17 fifo regs, 1 long per fifo
Expand Down Expand Up @@ -566,6 +576,8 @@ static const struct musb_platform_ops sunxi_musb_ops = {
.writeb = sunxi_musb_writeb,
.readw = sunxi_musb_readw,
.writew = sunxi_musb_writew,
.dma_init = sunxi_musb_dma_controller_create,
.dma_exit = sunxi_musb_dma_controller_destroy,
.set_vbus = sunxi_musb_set_vbus,
.pre_root_reset_end = sunxi_musb_pre_root_reset_end,
.post_root_reset_end = sunxi_musb_post_root_reset_end,
Expand Down

0 comments on commit f301fe2

Please sign in to comment.