From 5deb3317cb51ac52de922bb55f8492624018906d Mon Sep 17 00:00:00 2001 From: Roman Yeryomin Date: Thu, 13 Sep 2012 00:40:35 +0300 Subject: Add realtek target files Signed-off-by: Roman Yeryomin --- .../realtek/files/include/asm-mips/rtl865x/sys.h | 43 ++++++++++++++++++++++ 1 file changed, 43 insertions(+) create mode 100644 target/linux/realtek/files/include/asm-mips/rtl865x/sys.h (limited to 'target/linux/realtek/files/include/asm-mips/rtl865x/sys.h') 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); + -- cgit v1.2.3