From 815924bac97aed5e4b662d5aafeed9634b82af4a Mon Sep 17 00:00:00 2001 From: "Suren A. Chilingaryan" Date: Wed, 18 Nov 2015 05:10:04 +0100 Subject: Support 64-bit addressing mode in IPEDMA --- dma/ipe_private.h | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) (limited to 'dma/ipe_private.h') diff --git a/dma/ipe_private.h b/dma/ipe_private.h index 8f2b00b..640b6a0 100644 --- a/dma/ipe_private.h +++ b/dma/ipe_private.h @@ -21,7 +21,7 @@ #define IPEDMA_REG_ADDR_MASK 0xFFF #define IPEDMA_REG_BANK_MASK 0xF000 -#define IPEDMA_REG_BANK_SHIFT 24 +#define IPEDMA_REG_BANK_SHIFT 12 #define REG2VIRT(reg) (ctx->base_addr[(reg&IPEDMA_REG_BANK_MASK)>>IPEDMA_REG_BANK_SHIFT] + (reg&IPEDMA_REG_ADDR_MASK)) #define REG(bank, addr) ((bank<version<3)?(*(uint32_t*)ptr):(*(uint64_t*)ptr)) + +typedef uint32_t reg_t; typedef struct ipe_dma_s ipe_dma_t; struct ipe_dma_s { @@ -95,8 +100,10 @@ struct ipe_dma_s { pcilib_kmem_handle_t *pages; /**< collection of memory-locked pages for DMA operation */ size_t ring_size, page_size; - size_t last_read, last_read_addr, last_written; + size_t last_read, last_written; + uintptr_t last_read_addr; + reg_t reg_last_read; /**< actual location of last_read register (removed from hardware for version 3) */ }; #endif /* _PCILIB_DMA_IPE_PRIVATE_H */ -- cgit v1.2.3