| 1 | /**************************************************************************** |
|---|
| 2 | * Copyright (c) 2006 DST Technologies Inc. All Rights Reserved. |
|---|
| 3 | * |
|---|
| 4 | * Module: LLD_OS |
|---|
| 5 | * |
|---|
| 6 | * Description: This file contains Lowest Level Driver local definitions |
|---|
| 7 | * |
|---|
| 8 | * Notes: Generally this will be an os specific file only. The |
|---|
| 9 | * #ifdef __KERNEL__ directive is included to aid in using win9X |
|---|
| 10 | * to easily find common compile errors. |
|---|
| 11 | * |
|---|
| 12 | ***************************************************************************/ |
|---|
| 13 | |
|---|
| 14 | #ifndef _LLD_OS_H |
|---|
| 15 | #define _LLD_OS_H |
|---|
| 16 | |
|---|
| 17 | #ifdef __KERNEL__ |
|---|
| 18 | |
|---|
| 19 | #include <linux/init.h> |
|---|
| 20 | #include <linux/module.h> |
|---|
| 21 | #include <linux/version.h> |
|---|
| 22 | |
|---|
| 23 | /* A fix to allow existing sources and makefiles to be used with newer |
|---|
| 24 | * kernels (>= 2.4.11). The fix can be removed once we collectively |
|---|
| 25 | * correct our <2.4.11 build environments, whose kernel-sources system |
|---|
| 26 | * headers are missing modversions.h. |
|---|
| 27 | */ |
|---|
| 28 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,11) |
|---|
| 29 | #if !defined(EXPORT_SYMTAB) |
|---|
| 30 | #if defined(EXPORT_SYMBOL) |
|---|
| 31 | #undef EXPORT_SYMBOL |
|---|
| 32 | #endif |
|---|
| 33 | #define EXPORT_SYMBOL(x) |
|---|
| 34 | #endif |
|---|
| 35 | #endif |
|---|
| 36 | |
|---|
| 37 | #if LINUX_VERSION_CODE < KERNEL_VERSION(2,2,0) |
|---|
| 38 | #error Kernel 2.2.0 or higher is required to build this module. |
|---|
| 39 | #endif |
|---|
| 40 | #include <linux/kernel.h> |
|---|
| 41 | #include <linux/string.h> |
|---|
| 42 | #include <linux/sched.h> |
|---|
| 43 | #include <linux/fs.h> |
|---|
| 44 | //#include <linux/wrapper.h> |
|---|
| 45 | #include <linux/mm.h> |
|---|
| 46 | #include <linux/slab.h> |
|---|
| 47 | #include <linux/pci.h> |
|---|
| 48 | #include <linux/types.h> |
|---|
| 49 | #include <linux/delay.h> |
|---|
| 50 | #if LINUX_VERSION_CODE >= KERNEL_VERSION(2,4,0) |
|---|
| 51 | #if LINUX_VERSION_CODE <= KERNEL_VERSION(2,6,15) |
|---|
| 52 | #include <linux/devfs_fs_kernel.h> |
|---|
| 53 | #endif |
|---|
| 54 | #endif |
|---|
| 55 | #include <asm/uaccess.h> |
|---|
| 56 | #include <asm/io.h> |
|---|
| 57 | #include <asm/semaphore.h> |
|---|
| 58 | #include <asm/irq.h> |
|---|
| 59 | #include <linux/mman.h> |
|---|
| 60 | #include <linux/proc_fs.h> |
|---|
| 61 | #define _STDIO_H // NO STDIO IN A KERNEL MODULE!!! |
|---|
| 62 | #endif // __KERNEL__ |
|---|
| 63 | |
|---|
| 64 | #endif // _LLD_OS_H |
|---|