1 /* 2 * Copyright 2001-2008 Texas Instruments - http://www.ti.com/ 3 * 4 * Licensed under the Apache License, Version 2.0 (the "License"); 5 * you may not use this file except in compliance with the License. 6 * You may obtain a copy of the License at 7 * 8 * http://www.apache.org/licenses/LICENSE-2.0 9 * 10 * Unless required by applicable law or agreed to in writing, software 11 * distributed under the License is distributed on an "AS IS" BASIS, 12 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. 13 * See the License for the specific language governing permissions and 14 * limitations under the License. 15 */ 16 17 18 /* 19 * ======== windows.h ======== 20 * DSP-BIOS Bridge driver support functions for TI OMAP processors. 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 #if defined (OMAP_2430) || defined (OMAP_3430) 63 #include <asm/arch/clock.h> 64 #ifdef OMAP_3430 65 #include <linux/clk.h> 66 // #include <asm-arm/hardware/clock.h> 67 #endif 68 #endif 69 70 #include <linux/pagemap.h> 71 #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,5,0) 72 #include <asm/cacheflush.h> 73 #include <linux/dma-mapping.h> 74 #else 75 // #include <asm/proc/cache.h> 76 #include <asm/pci.h> 77 #include <linux/pci.h> 78 #endif 79 80 /* ----------------------------------- Macros */ 81 82 #define SEEK_SET 0 /* Seek from beginning of file. */ 83 #define SEEK_CUR 1 /* Seek from current position. */ 84 #define SEEK_END 2 /* Seek from end of file. */ 85 86 87 /* TODO -- Remove, once BP defines them */ 88 #ifdef OMAP_3430 89 #define INT_MAIL_MPU_IRQ 26 90 #define INT_DSP_MMU_IRQ 28 91 #endif 92 93 94 #else 95 96 #include <stdio.h> 97 #include <stdlib.h> 98 #include <fcntl.h> 99 #include <unistd.h> 100 #include <semaphore.h> 101 #include <stdbool.h> 102 #include <sys/types.h> 103 #include <sys/stat.h> 104 #include <sys/ioctl.h> 105 #include <sys/mman.h> 106 #endif 107 108 #include <dbtype.h> 109 110 #endif 111