1 #ifndef __LINUX_PARPORT_PC_H
2 #define __LINUX_PARPORT_PC_H
8 #define ECONTROL(p) ((p)->base_hi + 0x2)
9 #define CONFIGB(p) ((p)->base_hi + 0x1)
10 #define CONFIGA(p) ((p)->base_hi + 0x0)
11 #define FIFO(p) ((p)->base_hi + 0x0)
12 #define EPPDATA(p) ((p)->base + 0x4)
13 #define EPPADDR(p) ((p)->base + 0x3)
14 #define CONTROL(p) ((p)->base + 0x2)
15 #define STATUS(p) ((p)->base + 0x1)
16 #define DATA(p) ((p)->base + 0x0)
87 static const char *
const ecr_modes[] = {
"SPP",
"PS2",
"PPFIFO",
"ECP",
"xXx",
"yYy",
"TST",
"CFG"};
91 printk (
KERN_DEBUG "*** parport state (%s): ecr=[%s", str, ecr_modes[(ecr & 0xe0) >> 5]);
92 if (ecr & 0x10)
printk (
",nErrIntrEn");
93 if (ecr & 0x08)
printk (
",dmaEn");
94 if (ecr & 0x04)
printk (
",serviceIntr");
95 if (ecr & 0x02)
printk (
",f_full");
96 if (ecr & 0x01)
printk (
",f_empty");
98 printk (
"] dcr(%s)=[", i ?
"soft" :
"hard");
106 if (dcr & 0x10)
printk (
",ackIntEn");
107 if (!(dcr & 0x08))
printk (
",N-SELECT-IN");
108 if (dcr & 0x04)
printk (
",N-INIT");
109 if (!(dcr & 0x02))
printk (
",N-AUTOFD");
110 if (!(dcr & 0x01))
printk (
",N-STROBE");
113 if (!(dsr & 0x80))
printk (
"BUSY");
114 if (dsr & 0x40)
printk (
",N-ACK");
115 if (dsr & 0x20)
printk (
",PERROR");
116 if (dsr & 0x10)
printk (
",SELECT");
117 if (dsr & 0x08)
printk (
",N-FAULT");
122 #define dump_parport_state(args...)
132 unsigned char ctr = priv->
ctr;
135 "__parport_pc_frob_control(%02x,%02x): %02x -> %02x\n",
136 mask, val, ctr, ((ctr & ~mask) ^ val) & priv->
ctr_writable);
138 ctr = (ctr & ~mask) ^ val;
147 __parport_pc_frob_control (p, 0x20, 0x20);
152 __parport_pc_frob_control (p, 0x20, 0x00);
167 parport_pc_data_reverse (p);
170 __parport_pc_frob_control (p, wm, d & wm);
180 return priv->
ctr & rm;
196 (val & 0x20) ?
"reverse" :
"forward");
198 parport_pc_data_reverse (p);
200 parport_pc_data_forward (p);
207 return __parport_pc_frob_control (p, mask, val);
218 __parport_pc_frob_control (p, 0x10, 0x00);
223 __parport_pc_frob_control (p, 0x10, 0x10);