#include <linux/clk.h>
#include <linux/device.h>
#include <linux/usb/ch9.h>
-#include <linux/usb_gadget.h>
+#include <linux/usb/gadget.h>
#include <linux/usb.h>
#include <linux/usb/otg.h>
#include <linux/usb/musb.h>
DBG(3, "Using PIO for remaining %lu bytes\n", pio);
buf = phys_to_virt((u32)chdat->dma_addr) + chdat->transfer_len;
if (chdat->tx) {
- consistent_sync(phys_to_virt((u32)chdat->dma_addr),
+ dma_cache_maint(phys_to_virt((u32)chdat->dma_addr),
chdat->transfer_len, DMA_TO_DEVICE);
musb_write_fifo(hw_ep, pio, buf);
} else {
musb_read_fifo(hw_ep, pio, buf);
- consistent_sync(phys_to_virt((u32)chdat->dma_addr),
+ dma_cache_maint(phys_to_virt((u32)chdat->dma_addr),
chdat->transfer_len, DMA_FROM_DEVICE);
}
channel->actual_len += pio;
/* Since we're recycling dma areas, we need to clean or invalidate */
if (chdat->tx) {
- consistent_sync(phys_to_virt(dma_addr), len, DMA_TO_DEVICE);
+ dma_cache_maint(phys_to_virt(dma_addr), len, DMA_TO_DEVICE);
} else
- consistent_sync(phys_to_virt(dma_addr), len, DMA_FROM_DEVICE);
+ dma_cache_maint(phys_to_virt(dma_addr), len, DMA_FROM_DEVICE);
/* Use 16-bit transfer if dma_addr is not 32-bit aligned */
if ((dma_addr & 0x3) == 0) {