1 #include <linux/module.h>
3 #include <asm/arch/cache.h>
4 #include <asm/arch/hwregs/dma.h>
6 /* This file is used to workaround a cache bug, Guinness TR 106. */
8 inline void flush_dma_descr(struct dma_descr_data
*descr
, int flush_buf
)
10 /* Flush descriptor to make sure we get correct in_eop and after. */
11 asm volatile ("ftagd [%0]" :: "r" (descr
));
12 /* Flush buffer pointed out by descriptor. */
14 cris_flush_cache_range(phys_to_virt((unsigned)descr
->buf
),
15 (unsigned)(descr
->after
- descr
->buf
));
17 EXPORT_SYMBOL(flush_dma_descr
);
19 void flush_dma_list(struct dma_descr_data
*descr
)
22 flush_dma_descr(descr
, 1);
25 descr
= phys_to_virt((unsigned)descr
->next
);
28 EXPORT_SYMBOL(flush_dma_list
);
30 /* From cacheflush.S */
31 EXPORT_SYMBOL(cris_flush_cache
);
32 /* From cacheflush.S */
33 EXPORT_SYMBOL(cris_flush_cache_range
);