aboutsummaryrefslogtreecommitdiff
path: root/sys/dev/xilinx/axidma.c
diff options
context:
space:
mode:
Diffstat (limited to 'sys/dev/xilinx/axidma.c')
-rw-r--r--sys/dev/xilinx/axidma.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/sys/dev/xilinx/axidma.c b/sys/dev/xilinx/axidma.c
index 5b92f90df683..77a46c712980 100644
--- a/sys/dev/xilinx/axidma.c
+++ b/sys/dev/xilinx/axidma.c
@@ -169,6 +169,9 @@ axidma_intr(struct axidma_softc *sc,
while (chan->idx_tail != chan->idx_head) {
desc = chan->descs[chan->idx_tail];
+ cpu_dcache_wbinv_range((vm_offset_t)desc,
+ sizeof(struct axidma_desc));
+
if ((desc->status & BD_STATUS_CMPLT) == 0)
break;
@@ -357,7 +360,8 @@ axidma_desc_alloc(struct axidma_softc *sc, struct xdma_channel *xchan,
return (-1);
}
chan->mem_vaddr = kva_alloc(chan->mem_size);
- pmap_kenter_device(chan->mem_vaddr, chan->mem_size, chan->mem_paddr);
+ pmap_kenter(chan->mem_vaddr, chan->mem_size, chan->mem_paddr,
+ VM_MEMATTR_DEFAULT);
device_printf(sc->dev, "Allocated chunk %lx %lu\n",
chan->mem_paddr, chan->mem_size);
@@ -493,6 +497,9 @@ axidma_channel_submit_sg(device_t dev, struct xdma_channel *xchan,
if (sg[i].last == 1)
desc->control |= BD_CONTROL_TXEOF;
+ cpu_dcache_wbinv_range((vm_offset_t)desc,
+ sizeof(struct axidma_desc));
+
tmp = chan->idx_head;
atomic_add_int(&chan->descs_used_count, 1);