27 #include <linux/kernel.h>
30 static int lpt_hardware_initialized;
32 static void byteblaster_write(
int port,
int data)
37 static int byteblaster_read(
int port)
40 data =
inb((
u16)(port + 0x378));
48 int initial_lpt_ctrl = 0;
50 if (!lpt_hardware_initialized) {
51 initial_lpt_ctrl = byteblaster_read(2);
52 byteblaster_write(2, (initial_lpt_ctrl | 0x02) & 0xdf);
53 lpt_hardware_initialized = 1;
56 data = ((tdi ? 0x40 : 0) | (tms ? 0x02 : 0));
58 byteblaster_write(0, data);
61 tdo = byteblaster_read(1);
62 tdo = ((tdo & 0x80) ? 0 : 1);
65 byteblaster_write(0, data | 0x01);
67 byteblaster_write(0, data);