diff options
author | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-07-09 05:33:18 +0200 |
---|---|---|
committer | Suren A. Chilingaryan <csa@dside.dyndns.org> | 2011-07-09 05:33:18 +0200 |
commit | 02924fc49641ca9c000054a7a540b6f1eaa0e8f8 (patch) | |
tree | 986ba532752d7e19d85f77eea57f15579fe913d5 /dma.c | |
parent | 80d999195b2b1896fcd1878a44b0ece474fe678c (diff) | |
download | pcitool-02924fc49641ca9c000054a7a540b6f1eaa0e8f8.tar.gz pcitool-02924fc49641ca9c000054a7a540b6f1eaa0e8f8.tar.bz2 pcitool-02924fc49641ca9c000054a7a540b6f1eaa0e8f8.tar.xz pcitool-02924fc49641ca9c000054a7a540b6f1eaa0e8f8.zip |
Support dynamic registers, support register offsets and multiregisters (bitmasks), list NWL DMA registers
Diffstat (limited to 'dma.c')
-rw-r--r-- | dma.c | 18 |
1 files changed, 9 insertions, 9 deletions
@@ -88,12 +88,12 @@ size_t pcilib_stream_dma(pcilib_t *ctx, pcilib_dma_engine_t dma, uintptr_t addr, return 0; } - if (!ctx->model_info->dma_api) { + if (!ctx->model_info.dma_api) { pcilib_error("DMA Engine is not configured in the current model"); return 0; } - if (!ctx->model_info->dma_api->stream) { + if (!ctx->model_info.dma_api->stream) { pcilib_error("The DMA read is not supported by configured DMA engine"); return 0; } @@ -108,7 +108,7 @@ size_t pcilib_stream_dma(pcilib_t *ctx, pcilib_dma_engine_t dma, uintptr_t addr, return 0; } - return ctx->model_info->dma_api->stream(ctx->dma_ctx, dma, addr, size, flags, timeout, cb, cbattr); + return ctx->model_info.dma_api->stream(ctx->dma_ctx, dma, addr, size, flags, timeout, cb, cbattr); } size_t pcilib_read_dma(pcilib_t *ctx, pcilib_dma_engine_t dma, uintptr_t addr, size_t size, void *buf) { @@ -141,12 +141,12 @@ size_t pcilib_push_dma(pcilib_t *ctx, pcilib_dma_engine_t dma, uintptr_t addr, s return 0; } - if (!ctx->model_info->dma_api) { + if (!ctx->model_info.dma_api) { pcilib_error("DMA Engine is not configured in the current model"); return 0; } - if (!ctx->model_info->dma_api->push) { + if (!ctx->model_info.dma_api->push) { pcilib_error("The DMA write is not supported by configured DMA engine"); return 0; } @@ -161,7 +161,7 @@ size_t pcilib_push_dma(pcilib_t *ctx, pcilib_dma_engine_t dma, uintptr_t addr, s return 0; } - return ctx->model_info->dma_api->push(ctx->dma_ctx, dma, addr, size, flags, timeout, buf); + return ctx->model_info.dma_api->push(ctx->dma_ctx, dma, addr, size, flags, timeout, buf); } @@ -178,12 +178,12 @@ double pcilib_benchmark_dma(pcilib_t *ctx, pcilib_dma_engine_addr_t dma, uintptr return 0; } - if (!ctx->model_info->dma_api) { + if (!ctx->model_info.dma_api) { pcilib_error("DMA Engine is not configured in the current model"); return -1; } - if (!ctx->model_info->dma_api->benchmark) { + if (!ctx->model_info.dma_api->benchmark) { pcilib_error("The DMA benchmark is not supported by configured DMA engine"); return -1; } @@ -193,5 +193,5 @@ double pcilib_benchmark_dma(pcilib_t *ctx, pcilib_dma_engine_addr_t dma, uintptr return -1; } - return ctx->model_info->dma_api->benchmark(ctx->dma_ctx, dma, addr, size, iterations, direction); + return ctx->model_info.dma_api->benchmark(ctx->dma_ctx, dma, addr, size, iterations, direction); } |