26#ifndef NIDAS_LINUX_PCMCOM8_H
27#define NIDAS_LINUX_PCMCOM8_H
30#define PCMCOM8_NR_PORTS 8
34#include <linux/version.h>
35#include <linux/ioctl.h>
36#include <linux/cdev.h>
37#include <linux/device.h>
45#define PCMCOM8_MAJOR 0
48#define PCMCOM8_MAX_NR_DEVS 4
49#define PCMCOM8_IO_REGION_SIZE 8
52#define PCMCOM8_IDX 0x0
53#define PCMCOM8_ADR 0x1
54#define PCMCOM8_IAR 0x2
55#define PCMCOM8_IIR 0x3
56#define PCMCOM8_ECR 0x4
57#define PCMCOM8_EHR 0x5
58#define PCMCOM8_ELR 0x6
59#define PCMCOM8_CMD 0x7
60#define PCMCOM8_STA 0x7
76typedef struct pcmcom8_board {
84#if LINUX_VERSION_CODE >= KERNEL_VERSION(2,6,16)
87 struct semaphore mutex;
101#define PCMCOM8_IOC_MAGIC 'p'
102#define PCMCOM8_IOCSPORTCONFIG _IOW(PCMCOM8_IOC_MAGIC, 1, struct pcmcom8_config)
103#define PCMCOM8_IOCGPORTCONFIG _IOR(PCMCOM8_IOC_MAGIC, 2, struct pcmcom8_config)
104#define PCMCOM8_IOCSEEPORTCONFIG _IOW(PCMCOM8_IOC_MAGIC, 3, struct pcmcom8_config)
105#define PCMCOM8_IOCGEEPORTCONFIG _IOR(PCMCOM8_IOC_MAGIC, 4, struct pcmcom8_config)
106#define PCMCOM8_IOCEECONFIGLOAD _IO(PCMCOM8_IOC_MAGIC, 5)
107#define PCMCOM8_IOCPORTENABLE _IO(PCMCOM8_IOC_MAGIC, 6)
108#define PCMCOM8_IOCGNBOARD _IOR(PCMCOM8_IOC_MAGIC, 7, int)
109#define PCMCOM8_IOCGISABASE _IOR(PCMCOM8_IOC_MAGIC,8,unsigned long)
111#define PCMCOM8_IOC_MAXNR 9
static unsigned int ioport[MESA_4I34_MAX_NR_DEVS]
Definition mesa.c:72
#define PCMCOM8_NR_PORTS
Definition pcmcom8.h:30
struct pcmcom8_config pcmcom8_config
struct pcmcom8_serial_port pcmcom8_serial_port
static string device
Definition sing.cc:60
struct pcmcom8_serial_port ports[PCMCOM8_NR_PORTS]
Definition pcmcom8.h:71
unsigned int ioport
Definition pcmcom8.h:65
unsigned int enable
Definition pcmcom8.h:67
unsigned int irq
Definition pcmcom8.h:66