diff options
author | Roman Yeryomin <roman@advem.lv> | 2012-09-13 00:40:35 +0300 |
---|---|---|
committer | Roman Yeryomin <roman@advem.lv> | 2012-12-03 00:13:21 +0200 |
commit | 5deb3317cb51ac52de922bb55f8492624018906d (patch) | |
tree | c2fbe6346699d9bb0f2100490c3029519bb8fde8 /target/linux/realtek/files/include/asm-mips/rtl865x/sys.h | |
parent | 0239d37124f9184b478a42de8a7fa1bc85a6a6fe (diff) |
Add realtek target files
Signed-off-by: Roman Yeryomin <roman@advem.lv>
Diffstat (limited to 'target/linux/realtek/files/include/asm-mips/rtl865x/sys.h')
-rw-r--r-- | target/linux/realtek/files/include/asm-mips/rtl865x/sys.h | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/target/linux/realtek/files/include/asm-mips/rtl865x/sys.h b/target/linux/realtek/files/include/asm-mips/rtl865x/sys.h new file mode 100644 index 000000000..19b519ffd --- /dev/null +++ b/target/linux/realtek/files/include/asm-mips/rtl865x/sys.h @@ -0,0 +1,43 @@ +struct rtl_pool { /* the pool */ + struct list_head page_list; + spinlock_t lock; + size_t blocks_per_page; + size_t size; + int flags; + size_t allocation; + char name [32]; + wait_queue_head_t waitq; +}; + +struct rtl_page { /* cacheable header for 'allocation' bytes */ + struct list_head page_list; + void *vaddr; + dma_addr_t dma; + unsigned long bitmap [0]; +}; + +#define POOL_TIMEOUT_JIFFIES ((100 /* msec */ * HZ) / 1000) +#define POOL_POISON_BYTE 0xa7 + + +#undef DEBUG + +#ifdef DEBUG +#define DBG(x...) printk(x) +#else +#define DBG(x...) +#endif + + + +#define POOL_TIMEOUT_JIFFIES ((100 /* msec */ * HZ) / 1000) +#define POOL_POISON_BYTE 0xa7 +#define CONFIG_RTLPOOL_DEBUG +void rtl_free_consistent(size_t size, void *vaddr, dma_addr_t handle); +void *consistent_alloc(int gfp, size_t size, dma_addr_t *dma_handle); +void *rtl_alloc_consistent(size_t size, dma_addr_t *handle); +struct rtl_pool* rtl_pool_create(const char *, size_t, size_t ,size_t,int); +void rtl_pool_destroy (struct rtl_pool *pool); +void *rtl_pool_alloc (struct rtl_pool *, int, dma_addr_t *); +void rtl_pool_free (struct rtl_pool *pool, void *vaddr, dma_addr_t dma); + |