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.
15 #ifndef _CDCM_H_INCLUDE_
16 #define _CDCM_H_INCLUDE_
18 /* for both Lynx/Linux */
24 #include "general_drvr.h"
26 #include "cdcmLynxAPI.h"
27 #include "cdcmLynxDefs.h"
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,
35 struct pdparam_master
*);
38 #define sel cdcm_sel /* see Lynx <sys/file.h> for more details */
39 #define enable restore
45 #include <sys/types.h>
50 #include <sys/ioctl.h>
54 #include <ces/absolute.h>
55 #include <ces/vmelib.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_ */