Last change
on this file since 8405 was 22, checked in by ogrimm, 16 years ago |
First commit of drsdaq program
|
-
Property svn:executable
set to
*
|
File size:
2.0 KB
|
Line | |
---|
1 | /************************************************************************/
|
---|
2 | /* */
|
---|
3 | /* This is the driver header file for the IO_RCC package */
|
---|
4 | /* */
|
---|
5 | /* 6. Jun. 02 MAJO created */
|
---|
6 | /* */
|
---|
7 | /*******C 2002 - The software with that certain something****************/
|
---|
8 |
|
---|
9 | #ifndef _IO_RCC_DRIVER_H
|
---|
10 | #define _IO_RCC_DRIVER_H
|
---|
11 |
|
---|
12 | #include "io_rcc/io_rcc_common.h"
|
---|
13 |
|
---|
14 | #define IO_MAX_PCI 100 //Max. number of PCI devices linked at any time
|
---|
15 | #define MAX_PROC_TEXT_SIZE 0x10000 //The output of "more /proc/io_rcc" must not generate more characters than that
|
---|
16 |
|
---|
17 | #define CMOSA 0x70
|
---|
18 | #define CMOSD 0x71
|
---|
19 | #define BID1 0x35
|
---|
20 | #define BID2 0x36
|
---|
21 |
|
---|
22 |
|
---|
23 | /********/
|
---|
24 | /*Macros*/
|
---|
25 | /********/
|
---|
26 | #ifdef DRIVER_DEBUG
|
---|
27 | #define kdebug(x) {if (debug) printk x;}
|
---|
28 | #else
|
---|
29 | #define kdebug(x)
|
---|
30 | #endif
|
---|
31 |
|
---|
32 | #ifdef DRIVER_ERROR
|
---|
33 | #define kerror(x) {if (errorlog) printk x;}
|
---|
34 | #else
|
---|
35 | #define kerror(x)
|
---|
36 | #endif
|
---|
37 |
|
---|
38 |
|
---|
39 | /*********/
|
---|
40 | /* Types */
|
---|
41 | /*********/
|
---|
42 | typedef struct
|
---|
43 | {
|
---|
44 | struct pci_dev *dev_ptr;
|
---|
45 | u_int vid;
|
---|
46 | u_int did;
|
---|
47 | u_int occ;
|
---|
48 | u_int pid;
|
---|
49 | } pci_devices_t;
|
---|
50 |
|
---|
51 | typedef struct
|
---|
52 | {
|
---|
53 | u_int linked[IO_MAX_PCI];
|
---|
54 | } private_stuff;
|
---|
55 |
|
---|
56 | struct io_proc_data_t
|
---|
57 | {
|
---|
58 | char name[10];
|
---|
59 | char value[100];
|
---|
60 | };
|
---|
61 |
|
---|
62 |
|
---|
63 | /************/
|
---|
64 | /*Prototypes*/
|
---|
65 | /************/
|
---|
66 | static void io_rcc_vmaClose(struct vm_area_struct *vma);
|
---|
67 | static void io_rcc_vmaOpen(struct vm_area_struct *vma);
|
---|
68 | static int io_rcc_ioctl(struct inode *inode, struct file *file, u_int cmd, u_long arg);
|
---|
69 | static int io_rcc_open(struct inode *ino, struct file *filep);
|
---|
70 | static int io_rcc_mmap(struct file *file, struct vm_area_struct *vma);
|
---|
71 | static int io_rcc_release(struct inode *ino, struct file *filep);
|
---|
72 | static int io_rcc_write_procmem(struct file *file, const char *buffer, u_long count, void *data);
|
---|
73 | static int io_rcc_read_procmem(char *buf, char **start, off_t offset, int count, int *eof, void *data);
|
---|
74 |
|
---|
75 |
|
---|
76 | /*************/
|
---|
77 | /*ioctl codes*/
|
---|
78 | /*************/
|
---|
79 | enum
|
---|
80 | {
|
---|
81 | IOPEEK=1,
|
---|
82 | IOPOKE,
|
---|
83 | IOGETID,
|
---|
84 | IOPCILINK,
|
---|
85 | IOPCIUNLINK,
|
---|
86 | IOPCICONFR,
|
---|
87 | IOPCICONFW,
|
---|
88 | IOPCIINFO
|
---|
89 | };
|
---|
90 |
|
---|
91 |
|
---|
92 | #endif
|
---|
Note:
See
TracBrowser
for help on using the repository browser.