diff options
author | root <root@iss-tomyspiel-l> | 2011-07-04 16:21:23 +0200 |
---|---|---|
committer | root <root@iss-tomyspiel-l> | 2011-07-04 16:21:23 +0200 |
commit | 2e7a7a3534bcf591c0d6c65105b2d845f293112f (patch) | |
tree | d0e5d2f9ea246ff55134205f7ac3af0d9599e641 /pci.h | |
parent | 70937611e34577151a6607640050e8b164a54e70 (diff) | |
download | ipecamera-2e7a7a3534bcf591c0d6c65105b2d845f293112f.tar.gz ipecamera-2e7a7a3534bcf591c0d6c65105b2d845f293112f.tar.bz2 ipecamera-2e7a7a3534bcf591c0d6c65105b2d845f293112f.tar.xz ipecamera-2e7a7a3534bcf591c0d6c65105b2d845f293112f.zip |
North West Logick DMA implementation
Diffstat (limited to 'pci.h')
-rw-r--r-- | pci.h | 43 |
1 files changed, 39 insertions, 4 deletions
@@ -1,17 +1,45 @@ #ifndef _PCITOOL_PCI_H #define _PCITOOL_PCI_H +#define PCILIB_DMA_TIMEOUT 10000 /**< us */ #define PCILIB_REGISTER_TIMEOUT 10000 /**< us */ #include "driver/pciDriver.h" - +#include "pcilib_types.h" #include "pcilib.h" +#include "kmem.h" -int pcilib_set_dma_engine_description(pcilib_t *ctx, pcilib_dma_t engine, pcilib_dma_engine_description_t *desc); +struct pcilib_s { + int handle; + + uintptr_t page_mask; + pcilib_board_info_t board_info; + pcilib_dma_info_t dma_info; + pcilib_model_t model; + + char *bar_space[PCILIB_MAX_BANKS]; -const pcilib_board_info_t *pcilib_get_board_info(pcilib_t *ctx); -const pcilib_dma_info_t *pcilib_get_dma_info(pcilib_t *ctx); + int reg_bar_mapped; + pcilib_bar_t reg_bar; +// char *reg_space; + + int data_bar_mapped; + pcilib_bar_t data_bar; +// char *data_space; +// size_t data_size; + + pcilib_kmem_list_t *kmem_list; + + pcilib_model_description_t *model_info; + + pcilib_dma_context_t *dma_ctx; + pcilib_context_t *event_ctx; + +#ifdef PCILIB_FILE_IO + int file_io_handle; +#endif /* PCILIB_FILE_IO */ +}; #ifdef _PCILIB_PCI_C # include "ipecamera/model.h" @@ -36,4 +64,11 @@ extern void (*pcilib_warning)(const char *msg, ...); extern pcilib_protocol_description_t pcilib_protocol[]; #endif /* _PCILIB_PCI_C */ +const pcilib_board_info_t *pcilib_get_board_info(pcilib_t *ctx); +const pcilib_dma_info_t *pcilib_get_dma_info(pcilib_t *ctx); + +int pcilib_map_register_space(pcilib_t *ctx); +int pcilib_map_data_space(pcilib_t *ctx, uintptr_t addr); + + #endif /* _PCITOOL_PCI_H */ |