vmod/vmodttl: fixed bug related to luns not ordered and/or not starting from zero.
[ht-drivers.git] / cdcm / cdcm.h
blobe64261202844a8efdf128ff28b1da205324170b0
1 /**
2 * @file cdcm.h
4 * @brief General CDCM definitions.
6 * @author Georgievskiy Yury, Alain Gagnaire. CERN AB/CO.
8 * @date Created on 02/06/2006
10 * Should be included by anyone, who wants to use CDCM.
11 * Many thanks to Julian Lewis and Nicolas de Metz-Noblat.
13 * @version
15 #ifndef _CDCM_H_INCLUDE_
16 #define _CDCM_H_INCLUDE_
18 /* for both Lynx/Linux */
19 #include "cdcmBoth.h"
20 #include "cdcmIo.h"
22 #ifdef __linux__
24 #include "general_drvr.h"
25 #include "cdcmDrvr.h"
26 #include "cdcmLynxAPI.h"
27 #include "cdcmLynxDefs.h"
29 #ifdef CONFIG_BUS_VME
30 #include "vmebus.h" /* find_controller, etc */
31 #define find_controller cdcm_find_controller
32 extern unsigned int cdcm_find_controller(unsigned int, unsigned int,
33 unsigned int, unsigned int,
34 unsigned int,
35 struct pdparam_master*);
36 #endif
38 #define sel cdcm_sel /* see Lynx <sys/file.h> for more details */
39 #define enable restore
41 #else /* __Lynx__ */
43 #include <dldd.h>
44 #include <errno.h>
45 #include <sys/types.h>
46 #include <conf.h>
47 #include <kernel.h>
48 #include <sys/file.h>
49 #include <io.h>
50 #include <sys/ioctl.h>
51 #include <time.h>
52 #include <param.h>
53 #include <string.h>
54 #include <ces/absolute.h>
55 #include <ces/vmelib.h>
56 #include <drm.h>
57 #include <pci_resource.h>
60 * struct file is used in many places in Linux. Therefore let's just keep
61 * things clean by using the Lynx-like file as 'struct cdcm_file'. This
62 * means that whenever in a LynxOS driver 'struct file' appears, we have
63 * to change it into 'struct cdcm_file'.
65 #define cdcm_file file
67 extern unsigned long find_controller _AP((unsigned long vmeaddr, unsigned long len, unsigned long am, unsigned long offset, unsigned long size, struct pdparam_master *param));
68 extern unsigned long return_controller _AP((unsigned long physaddr, unsigned long len));
69 extern int vme_intset _AP((int vct, int (*handler)(),char *arg, long *sav));
70 extern int vme_intclr _AP((int vct, long *sav));
71 extern int nanotime(unsigned long *);
73 #endif /* __linux__ */
75 #endif /* _CDCM_H_INCLUDE_ */