[PATCH] suport AFAVLAB serial multiport card

From: Harald Welte (laforge@gnumonks.org)
Date: Tue Feb 05 2002 - 05:57:07 EST


On Thu, Jan 31, 2002 at 10:20:59PM +0000, Russell King wrote:
> On Thu, Jan 31, 2002 at 10:48:19PM +0100, Robert Schwebel wrote:
> > Who is the maintainer for the serial driver stuff? The MAINTAINERS file
> > lists tytso, but the website mentioned in the file is rather outdated and
> > tytso doesn't answer my emails.
>
> I guess that'd be me, although I'm not specifically looking after the
> code in the existing 2.4 and 2.5 trees.

cool. I'm trying to get support for the AFAVLAB cards into serial.c since
2.4.0 days, but tytso never answered...

here's the patch, which still applies cleanly against 2.4.18-pre8:

--- linux-2.4.17-pre8-plain/drivers/char/serial.c Wed Dec 12 14:28:07 2001
+++ linux-2.4.17-pre8-nfpom/drivers/char/serial.c Wed Dec 12 14:42:14 2001
@@ -3895,7 +3895,14 @@
                         case 6: /* BAR 4*/
                         case 7: base_idx=idx-2; /* BAR 5*/
                 }
-
+
+ /* AFAVLAB uses a different mixture of BARs and offsets */
+ /* Not that ugly ;) -- HW */
+ if (dev->vendor == PCI_VENDOR_ID_AFAVLAB && idx >= 4) {
+ base_idx = 4;
+ offset = (idx - 4) * 8;
+ }
+
         /* Some Titan cards are also a little weird */
         if (dev->vendor == PCI_VENDOR_ID_TITAN &&
             (dev->device == PCI_DEVICE_ID_TITAN_400L ||
@@ -4242,6 +4249,7 @@
 
         pbn_b0_bt_1_115200,
         pbn_b0_bt_2_115200,
+ pbn_b0_bt_8_115200,
         pbn_b0_bt_1_460800,
         pbn_b0_bt_2_460800,
 
@@ -4320,6 +4328,7 @@
 
         { SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 1, 115200 }, /* pbn_b0_bt_1_115200 */
         { SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 2, 115200 }, /* pbn_b0_bt_2_115200 */
+ { SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 8, 115200 }, /* pbn_b0_bt_8_115200 */
         { SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 1, 460800 }, /* pbn_b0_bt_1_460800 */
         { SPCI_FL_BASE0 | SPCI_FL_BASE_TABLE, 2, 460800 }, /* pbn_b0_bt_2_460800 */
 
@@ -4841,6 +4850,11 @@
                 PCI_ANY_ID, PCI_ANY_ID, 0, 0,
                 pbn_b2_bt_2_115200 },
 
+ /* AFAVLAB serial card, from Harald Welte <laforge@gnumonks.org> */
+ { PCI_VENDOR_ID_AFAVLAB, PCI_DEVICE_ID_AFAVLAB_P028,
+ PCI_ANY_ID, PCI_ANY_ID, 0, 0,
+ pbn_b0_bt_8_115200 },
+
         /* EKF addition for i960 Boards form EKF with serial port */
         { PCI_VENDOR_ID_INTEL, 0x1960,
                 0xE4BF, PCI_ANY_ID, 0, 0,
--- linux-2.4.17-pre8-plain/include/linux/pci_ids.h Wed Dec 12 14:28:16 2001
+++ linux-2.4.17-pre8-nfpom/include/linux/pci_ids.h Wed Dec 12 14:33:20 2001
@@ -1483,6 +1483,9 @@
 #define PCI_DEVICE_ID_PANACOM_QUADMODEM 0x0400
 #define PCI_DEVICE_ID_PANACOM_DUALMODEM 0x0402
 
+#define PCI_VENDOR_ID_AFAVLAB 0x14db
+#define PCI_DEVICE_ID_AFAVLAB_P028 0x2180
+
 #define PCI_VENDOR_ID_BROADCOM 0x14e4
 #define PCI_DEVICE_ID_TIGON3_5700 0x1644
 #define PCI_DEVICE_ID_TIGON3_5701 0x1645

> Russell King (rmk@arm.linux.org.uk) The developer of ARM Linux

-- 
Live long and prosper
- Harald Welte / laforge@gnumonks.org               http://www.gnumonks.org/
============================================================================
GCS/E/IT d- s-: a-- C+++ UL++++$ P+++ L++++$ E--- W- N++ o? K- w--- O- M+ 
V-- PS++ PE-- Y++ PGP++ t+ 5-- !X !R tv-- b+++ !DI !D G+ e* h--- r++ y+(*)
-
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/



This archive was generated by hypermail 2b29 : Thu Feb 07 2002 - 21:00:41 EST