From 33263fc5f9ac8e8cb2b22d06af3ce5ac1dd815e4 Mon Sep 17 00:00:00 2001 From: Ralf Baechle Date: Fri, 4 Feb 2000 07:40:19 +0000 Subject: Merge with Linux 2.3.32. --- drivers/char/zr36120_mem.h | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 drivers/char/zr36120_mem.h (limited to 'drivers/char/zr36120_mem.h') diff --git a/drivers/char/zr36120_mem.h b/drivers/char/zr36120_mem.h new file mode 100644 index 000000000..609f0a1a9 --- /dev/null +++ b/drivers/char/zr36120_mem.h @@ -0,0 +1,17 @@ +extern inline unsigned long uvirt_to_phys(unsigned long adr); + +/* vmalloced address to physical address */ +extern inline unsigned long kvirt_to_phys(unsigned long adr) +{ return uvirt_to_phys(VMALLOC_VMADDR(adr)); } + +/* vmalloced address to bus address */ +extern inline unsigned long kvirt_to_bus(unsigned long adr) +{ return virt_to_bus(phys_to_virt(kvirt_to_phys(adr))); } + +/* always vmalloced memory - not always continuous! */ +void* rvmalloc(unsigned long size); +void rvfree(void* mem, unsigned long size); + +/* either kmalloc() or bigphysarea() alloced memory - continuous */ +void* bmalloc(unsigned long size); +void bfree(void* mem, unsigned long size); -- cgit v1.2.3