• Home
  • Line#
  • Scopes#
  • Navigate#
  • Raw
  • Download
1 /*
2  * dspbridge/mpu_api/inc/host_os.h
3  *
4  * DSP-BIOS Bridge driver support functions for TI OMAP processors.
5  *
6  * Copyright (C) 2007 Texas Instruments, Inc.
7  *
8  * This program is free software; you can redistribute it and/or modify it
9  * under the terms of the GNU Lesser General Public License as published
10  * by the Free Software Foundation version 2.1 of the License.
11  *
12  * This program is distributed .as is. WITHOUT ANY WARRANTY of any kind,
13  * whether express or implied; without even the implied warranty of
14  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the GNU
15  * Lesser General Public License for more details.
16  */
17 
18 
19 /*
20  *  ======== windows.h ========
21  *
22  *! Revision History
23  *! ================
24  *! 08-Mar-2004 sb Added cacheflush.h to support Dynamic Memory Mapping feature
25  *! 16-Feb-2004 sb Added headers required for consistent_alloc
26  */
27 
28 #ifndef _HOST_OS_H_
29 #define _HOST_OS_H_
30 
31 #ifdef __KERNEL__
32 
33 #include <linux/autoconf.h>
34 #include <asm/system.h>
35 #include <asm/atomic.h>
36 #include <asm/semaphore.h>
37 #include <asm/uaccess.h>
38 #include <asm/irq.h>
39 #include <asm/io.h>
40 #include <linux/syscalls.h>
41 #include <linux/version.h>
42 #include <linux/kernel.h>
43 #include <linux/string.h>
44 #include <linux/stddef.h>
45 #include <linux/types.h>
46 #include <linux/interrupt.h>
47 #include <linux/spinlock.h>
48 #include <linux/sched.h>
49 #include <linux/fs.h>
50 #include <linux/file.h>
51 #include <linux/slab.h>
52 #include <linux/delay.h>
53 #include <linux/ctype.h>
54 #include <linux/mm.h>
55 #include <linux/device.h>
56 #include <linux/vmalloc.h>
57 #include <linux/ioport.h>
58 #include <linux/platform_device.h>
59 //#include <asm/arch/bus.h>
60 
61 
62 #include <asm/arch/clock.h>
63 #include <linux/clk.h>
64 //  #include <asm-arm/hardware/clock.h>
65 
66 #include <linux/pagemap.h>
67 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0)
68 #include <asm/cacheflush.h>
69 #include <linux/dma-mapping.h>
70 #else
71 // #include <asm/proc/cache.h>
72 #include <asm/pci.h>
73 #include <linux/pci.h>
74 #endif
75 
76 /*  ----------------------------------- Macros */
77 
78 #define SEEK_SET        0	/* Seek from beginning of file.  */
79 #define SEEK_CUR        1	/* Seek from current position.  */
80 #define SEEK_END        2	/* Seek from end of file.  */
81 
82 
83 /* TODO -- Remove, once BP defines them */
84 #define INT_MAIL_MPU_IRQ        26
85 #define INT_DSP_MMU_IRQ        28
86 
87 
88 #else
89 
90 #include <stdio.h>
91 #include <stdlib.h>
92 #include <fcntl.h>
93 #include <unistd.h>
94 #include <semaphore.h>
95 
96 #include <sys/types.h>
97 #include <sys/stat.h>
98 #include <sys/ioctl.h>
99 #include <sys/mman.h>
100 #include <stdbool.h>
101 #ifdef DEBUG_BRIDGE_PERF
102 #include <sys/time.h>
103 #endif
104 #endif
105 
106 #include <dbtype.h>
107 
108 #endif
109