summaryrefslogtreecommitdiffstats
path: root/dma/ipe_private.h
diff options
context:
space:
mode:
authorSuren A. Chilingaryan <csa@suren.me>2015-08-06 05:27:21 +0200
committerSuren A. Chilingaryan <csa@suren.me>2015-08-06 05:27:21 +0200
commitccbad1cc8eca5f361427dd0ceca15cfa6d68a6d9 (patch)
tree0e7e6c1fbf7a22966570062d6ec323cb59ee2a02 /dma/ipe_private.h
parentd60dd48eec0ef5d7bf2feca9b3f06374a2f444aa (diff)
downloadpcitool-ccbad1cc8eca5f361427dd0ceca15cfa6d68a6d9.tar.gz
pcitool-ccbad1cc8eca5f361427dd0ceca15cfa6d68a6d9.tar.bz2
pcitool-ccbad1cc8eca5f361427dd0ceca15cfa6d68a6d9.tar.xz
pcitool-ccbad1cc8eca5f361427dd0ceca15cfa6d68a6d9.zip
Detect if IPEDMA operates in streaming mode
Diffstat (limited to 'dma/ipe_private.h')
-rw-r--r--dma/ipe_private.h7
1 files changed, 5 insertions, 2 deletions
diff --git a/dma/ipe_private.h b/dma/ipe_private.h
index 937e202..fdebec0 100644
--- a/dma/ipe_private.h
+++ b/dma/ipe_private.h
@@ -8,7 +8,7 @@
#define IPEDMA_MAX_TLP_SIZE 256 /**< Defines maximum TLP in bytes supported by device */
//#define IPEDMA_TLP_SIZE 128 /**< If set, enforces the specified TLP size */
-//#define IPEDMA_STREAMING_MODE /**< Enables streaming DMA operation mode instead of ring-buffer, the page is written once and forgotten and need to be pushed in queue again */
+#define IPEDMA_STREAMING_MODE /**< Enables streaming DMA operation mode instead of ring-buffer, the page is written once and forgotten and need to be pushed in queue again */
#define IPEDMA_STREAMING_CHECKS /**< Enables status checks in streaming mode (it will cause performance penalty) */
#define IPEDMA_PAGE_SIZE 4096
#define IPEDMA_DMA_PAGES 1024 /**< number of DMA pages in the ring buffer to allocate */
@@ -17,7 +17,6 @@
#define IPEDMA_DESCRIPTOR_ALIGNMENT 64
-//#define IPEDMA_BUG_DMARD /**< No register read during DMA transfer */
//#define IPEDMA_BUG_LAST_READ /**< We should forbid writting the second last available DMA buffer (the last is forbidden by design) */
//#define IPEDMA_DETECT_PACKETS /**< Using empty_deceted flag */
#define IPEDMA_SUPPORT_EMPTY_DETECTED /**< Avoid waiting for data when empty_detected flag is set in hardware */
@@ -39,6 +38,9 @@
#define IPEDMA_REG_UPDATE_THRESHOLD 0x60
#define IPEDMA_REG_STREAMING_STATUS 0x68
+#define IPEDMA_MASK_PCIE_GEN 0xF
+#define IPEDMA_MASK_STREAMING_MODE 0x10
+
#define WR(addr, value) { *(uint32_t*)(ctx->base_addr + addr) = value; }
#define RD(addr, value) { value = *(uint32_t*)(ctx->base_addr + addr); }
@@ -62,6 +64,7 @@ struct ipe_dma_s {
int reused; /**< indicates that DMA was found intialized, buffers were reused, and no additional initialization is needed */
int preserve; /**< indicates that DMA should not be stopped during clean-up */
int mode64; /**< indicates 64-bit operation mode */
+ int streaming; /**< indicates if DMA is operating in streaming or ring-buffer mode */
pcilib_kmem_handle_t *desc; /**< in-memory status descriptor written by DMA engine upon operation progess */
pcilib_kmem_handle_t *pages; /**< collection of memory-locked pages for DMA operation */