summaryrefslogtreecommitdiffstats
path: root/target/linux/realtek/files/include/asm-mips/rtl865x/sys.h
diff options
context:
space:
mode:
authorRoman Yeryomin <roman@advem.lv>2012-09-13 00:40:35 +0300
committerRoman Yeryomin <roman@advem.lv>2013-05-26 00:44:46 +0300
commita27354c9021a8423ef8c7d2bffad49cbf639eec1 (patch)
tree2355929a4b8cf1888cd0797cfabdb42e0077c524 /target/linux/realtek/files/include/asm-mips/rtl865x/sys.h
parent24a776baeb5d3cd903b144c89ceb11c5bc36a49e (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.h43
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);
+