Browse Source

Fix reading data smaller than 4K

Matthias Vogelgesang 6 years ago
parent
commit
abf1ac47b0
1 changed files with 6 additions and 0 deletions
  1. 6 0
      ddrio.c

+ 6 - 0
ddrio.c

@@ -338,6 +338,12 @@ read_from_ddr (pcilib_t *pci, volatile void *bar, Options *opts)
 
             WR64_sleep (HF_REG_DESCRIPTOR_ADDRESS, bus_addr_data);
 
+            /* start DMA */
+            if (!started) {
+                WR32_sleep (HF_REG_DMA, HF_DMA_START);
+                started = 1;
+            }
+
             do {
                 hardware_ptr = desc[flag_index];
             }