24 #include <linux/module.h>
27 #include <linux/errno.h>
30 #include <linux/kernel.h>
31 #include <linux/slab.h>
32 #include <linux/pci.h>
33 #include <linux/sysctl.h>
37 #include <asm/uaccess.h>
40 #include <linux/parport.h>
58 static int clear_epp_timeout(
struct parport *pb)
62 if (!(parport_gsc_read_status(pb) & 0x01))
66 parport_gsc_read_status(pb);
67 r = parport_gsc_read_status(pb);
70 r = parport_gsc_read_status(pb);
100 .write_data = parport_gsc_write_data,
101 .read_data = parport_gsc_read_data,
103 .write_control = parport_gsc_write_control,
104 .read_control = parport_gsc_read_control,
105 .frob_control = parport_gsc_frob_control,
107 .read_status = parport_gsc_read_status,
109 .enable_irq = parport_gsc_enable_irq,
110 .disable_irq = parport_gsc_disable_irq,
112 .data_forward = parport_gsc_data_forward,
113 .data_reverse = parport_gsc_data_reverse,
150 clear_epp_timeout(pb);
162 if ((r & 0xf) == w) {
174 parport_gsc_write_data (pb, w);
175 r = parport_gsc_read_data (pb);
178 parport_gsc_write_data (pb, w);
179 r = parport_gsc_read_data (pb);
208 clear_epp_timeout(pb);
211 parport_gsc_data_reverse (pb);
213 parport_gsc_write_data(pb, 0x55);
214 if (parport_gsc_read_data(pb) != 0x55) ok++;
216 parport_gsc_write_data(pb, 0xaa);
217 if (parport_gsc_read_data(pb) != 0xaa) ok++;
220 parport_gsc_data_forward (pb);
271 if (!parport_SPP_supported (p)) {
277 parport_PS2_supported (p);
308 #define printmode(x) {if(p->modes&PARPORT_MODE_##x){printk("%s%s",f?",":"",#x);f++;}}
325 "resorting to polled operation\n",
334 parport_gsc_write_data(p, 0);
335 parport_gsc_data_forward (p);
346 #define PARPORT_GSC_OFFSET 0x800
357 (
unsigned long long)dev->
hpa.start);
369 printk(
"%s: initialize bidirectional-mode.\n", __func__);
373 printk(
"%s: enhanced parport-modes not supported.\n", __func__);
416 .id_table = parport_tbl,
417 .probe = parport_init_chip,
426 static void __devexit parport_gsc_exit(
void)