//***************************************************************************
-#define port_stb 1
-#define port_afd 2
-#define cmd_stb port_afd
-#define port_init 4
-#define data_stb port_init
-#define port_sel 8
#define port_int 16
#define port_dir 0x20
CUR_CTRL = pi->saved_r2;
- CUR_CTRL |= port_sel;
+ CUR_CTRL |= PARPORT_CONTROL_SELECT;
outb(CUR_CTRL, pi->port + 2);
outb(pi->unit, pi->port);
outb(~pi->unit, pi->port);
- CUR_CTRL &= ~port_sel;
+ CUR_CTRL &= ~PARPORT_CONTROL_SELECT;
outb(CUR_CTRL, pi->port + 2);
- CUR_CTRL = (CUR_CTRL & port_int) | port_init;
+ CUR_CTRL = (CUR_CTRL & port_int) | PARPORT_CONTROL_INIT;
outb(CUR_CTRL, pi->port + 2);
outb(i, pi->port);
- CUR_CTRL |= port_sel;
+ CUR_CTRL |= PARPORT_CONTROL_SELECT;
outb(CUR_CTRL, pi->port + 2);
// DELAY
- CUR_CTRL |= port_afd;
+ CUR_CTRL |= PARPORT_CONTROL_AUTOFD;
outb(CUR_CTRL, pi->port + 2);
if (j == k)
{
- CUR_CTRL &= ~port_afd;
+ CUR_CTRL &= ~PARPORT_CONTROL_AUTOFD;
outb(CUR_CTRL, pi->port + 2);
if (j == k)
{
if (i & 4) // EPP
- CUR_CTRL &= ~(port_sel | port_init);
+ CUR_CTRL &= ~(PARPORT_CONTROL_SELECT | PARPORT_CONTROL_INIT);
else // PPC/ECP
- CUR_CTRL &= ~port_sel;
+ CUR_CTRL &= ~PARPORT_CONTROL_SELECT;
outb(CUR_CTRL, pi->port + 2);
static void ppc6_deselect(struct pi_adapter *pi)
{
if (mode_map[pi->mode] & 4) // EPP
- CUR_CTRL |= port_init;
+ CUR_CTRL |= PARPORT_CONTROL_INIT;
else // PPC/ECP
- CUR_CTRL |= port_sel;
+ CUR_CTRL |= PARPORT_CONTROL_SELECT;
outb(CUR_CTRL, pi->port + 2);
outb(pi->saved_r0, pi->port);
- outb((pi->saved_r2 | port_sel), pi->port + 2);
+ outb((pi->saved_r2 | PARPORT_CONTROL_SELECT), pi->port + 2);
outb(pi->saved_r2, pi->port + 2);
}
{
outb(cmd, pi->port);
- CUR_CTRL ^= cmd_stb;
+ CUR_CTRL ^= PARPORT_CONTROL_AUTOFD;
outb(CUR_CTRL, pi->port + 2);
{
outb(data, pi->port);
- CUR_CTRL ^= data_stb;
+ CUR_CTRL ^= PARPORT_CONTROL_INIT;
outb(CUR_CTRL, pi->port + 2);
case PPCMODE_UNI_SW :
case PPCMODE_UNI_FW :
{
- CUR_CTRL = (CUR_CTRL & ~port_stb) ^ data_stb;
+ CUR_CTRL = (CUR_CTRL & ~PARPORT_CONTROL_STROBE) ^ PARPORT_CONTROL_INIT;
outb(CUR_CTRL, pi->port + 2);
data = ((data & 0x80) >> 1) | ((data & 0x38) >> 3);
- CUR_CTRL |= port_stb;
+ CUR_CTRL |= PARPORT_CONTROL_STROBE;
outb(CUR_CTRL, pi->port + 2);
outb(CUR_CTRL, pi->port + 2);
- CUR_CTRL = (CUR_CTRL | port_stb) ^ data_stb;
+ CUR_CTRL = (CUR_CTRL | PARPORT_CONTROL_STROBE) ^ PARPORT_CONTROL_INIT;
outb(CUR_CTRL, pi->port + 2);
data = inb(pi->port);
- CUR_CTRL &= ~port_stb;
+ CUR_CTRL &= ~PARPORT_CONTROL_STROBE;
outb(CUR_CTRL, pi->port + 2);
{
u8 d;
- CUR_CTRL = (CUR_CTRL & ~port_stb) ^ data_stb;
+ CUR_CTRL = (CUR_CTRL & ~PARPORT_CONTROL_STROBE)
+ ^ PARPORT_CONTROL_INIT;
outb(CUR_CTRL, pi->port + 2);
d = ((d & 0x80) >> 1) | ((d & 0x38) >> 3);
- CUR_CTRL |= port_stb;
+ CUR_CTRL |= PARPORT_CONTROL_STROBE;
outb(CUR_CTRL, pi->port + 2);
outb(CUR_CTRL, pi->port + 2);
- CUR_CTRL |= port_stb;
+ CUR_CTRL |= PARPORT_CONTROL_STROBE;
while(count)
{
- CUR_CTRL ^= data_stb;
+ CUR_CTRL ^= PARPORT_CONTROL_INIT;
outb(CUR_CTRL, pi->port + 2);
count--;
}
- CUR_CTRL &= ~port_stb;
+ CUR_CTRL &= ~PARPORT_CONTROL_STROBE;
outb(CUR_CTRL, pi->port + 2);
{
outb(*data++, pi->port);
- CUR_CTRL ^= data_stb;
+ CUR_CTRL ^= PARPORT_CONTROL_INIT;
outb(CUR_CTRL, pi->port + 2);
}
ppc6_send_cmd(pi, CMD_PREFIX_SET | PREFIX_FASTWR);
- CUR_CTRL |= port_stb;
+ CUR_CTRL |= PARPORT_CONTROL_STROBE;
outb(CUR_CTRL, pi->port + 2);
if (this == last)
{
- CUR_CTRL ^= data_stb;
+ CUR_CTRL ^= PARPORT_CONTROL_INIT;
outb(CUR_CTRL, pi->port + 2);
}
}
}
- CUR_CTRL &= ~port_stb;
+ CUR_CTRL &= ~PARPORT_CONTROL_STROBE;
outb(CUR_CTRL, pi->port + 2);