This source file includes following definitions.
- deskstation_tyne_dma_alloc
- deskstation_tyne_dma_init
1
2
3
4
5
6 #include <linux/autoconf.h>
7 #include <linux/types.h>
8 #include <asm/bootinfo.h>
9
10 #ifdef CONFIG_DESKSTATION_TYNE
11
12 static unsigned long allocated;
13
14
15
16
17 unsigned long deskstation_tyne_dma_alloc(size_t size)
18 {
19 unsigned long ret = allocated;
20 allocated += size;
21 if (allocated > boot_info.dma_cache_size)
22 ret = -1;
23 return ret;
24 }
25
26 void deskstation_tyne_dma_init(void)
27 {
28 if (boot_info.machtype != MACH_DESKSTATION_TYNE)
29 return;
30 allocated = 0;
31 printk ("Deskstation Tyne DMA (%luk) buffer initialized.\n",
32 boot_info.dma_cache_size >> 10);
33 }
34
35 #endif