[PATCH] Add NetMos 9835 to parport_serial

Zwane Mwaikambo (zwane@linux.realnet.co.sz)
Mon, 6 May 2002 08:17:52 +0200 (SAST)


Tested simultaneous serial i/o and parallel port. The base_baud of 115200
i just chose as a safe default, i didn't try pushing it any further.
During testing of parport interrupt sharing, i noticed an oddity whereupon
parport was allowed to register the same irq even though it didn't specify
SA_SHIRQ and serial did a request_irq before parport. But then again it
was late saturday and the booze was plenty...

Regards,
Zwane Mwaikambo

--- linux-2.4.19-pre7-ac3/drivers/parport/parport_serial.c.orig Sun May 5 14:24:36 2002
+++ linux-2.4.19-pre7-ac3/drivers/parport/parport_serial.c Sun May 5 14:38:57 2002
@@ -41,6 +41,7 @@
avlab_2s1p,
avlab_2s1p_650,
avlab_2s1p_850,
+ netmos_9835
};


@@ -74,6 +75,7 @@
/* avlab_2s1p */ { 1, { { 2, 3}, } },
/* avlab_2s1p_650 */ { 1, { { 2, 3}, } },
/* avlab_2s1p_850 */ { 1, { { 2, 3}, } },
+ /* netmos_9835 */ { 1, { { 2, 3}, } },
};

static struct pci_device_id parport_serial_pci_tbl[] __devinitdata = {
@@ -92,6 +94,8 @@
{ 0x14db, 0x2160, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p},
{ 0x14db, 0x2161, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p_650},
{ 0x14db, 0x2162, PCI_ANY_ID, PCI_ANY_ID, 0, 0, avlab_2s1p_850},
+ { PCI_VENDOR_ID_NETMOS, PCI_DEVICE_ID_NETMOS_9835,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0, netmos_9835 },
{ 0, } /* terminate list */
};
MODULE_DEVICE_TABLE(pci,parport_serial_pci_tbl);
@@ -129,6 +133,7 @@
/* avlab_2s1p (n/t) */ { SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 2, 115200 },
/* avlab_2s1p_650 (nt)*/{ SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 2, 115200 },
/* avlab_2s1p_850 (nt)*/{ SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 2, 115200 },
+/* netmos_9835 */ { SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 2, 115200 },
};

struct parport_serial_private {
@@ -266,6 +271,10 @@
"hi" as an offset (see SYBA
def.) */
/* TODO: test if sharing interrupts works */
+
+ /* not with the netmos card i tested with, due to the
+ * parport ISR methinks -Zwane
+ */
printk (KERN_DEBUG "PCI parallel port detected: %04x:%04x, "
"I/O at %#lx(%#lx)\n",
parport_serial_pci_tbl[i].vendor,

-- 
http://function.linuxpower.ca
		

- To unsubscribe from this list: send the line "unsubscribe linux-kernel" in the body of a message to majordomo@vger.kernel.org More majordomo info at http://vger.kernel.org/majordomo-info.html Please read the FAQ at http://www.tux.org/lkml/