12 #include <linux/kernel.h>
14 #include <linux/types.h>
15 #include <linux/errno.h>
17 #include <asm/cacheflush.h>
29 if (xtensa_need_flush_dma_source(src)) {
33 if (chunk && (size > chunk)) {
36 u32 gaps = (size+chunk-1)/chunk - 1;
39 }
else if (-skip > chunk) {
40 s32 decr = gaps * (chunk +
skip);
44 span =
max(span + gaps * skip,
45 (chunk + skip) * gaps - skip);
48 flush_dcache_unaligned(base, span);
50 if (xtensa_need_invalidate_dma_destination(dst)) {
54 if (chunk && (size > chunk)) {
57 u32 gaps = (size+chunk-1)/chunk - 1;
60 }
else if (-skip > chunk) {
61 s32 decr = gaps * (chunk +
skip);
65 span =
max(span + gaps * skip,
66 (chunk + skip) * gaps - skip);
69 invalidate_dcache_unaligned(base, span);
71 s6dmac_put_fifo(dmac, chan, src, dst, size);
79 _s6dmac_disable_error_irqs(dmac, mask);
80 spin_unlock_irqrestore(spinl, flags);
126 ret |= ((tmp >>
channel) & 1) << 5;
135 s6dmac_disable_chan(dmac, chan);
150 static inline void __init dmac_master(
u32 dmac,
159 static void __init s6_dmac_init(
void)