From: Raphael Zimmerer <killekulla@rdrz.de>

Here's a minimal patch to support the Exar Corp.  XR17C158 Octal UART Chip
(PCI).

Signed-off-by: Raphael Zimmerer <killekulla@rdrz.de>
Signed-off-by: Andrew Morton <akpm@osdl.org>
---

 25-akpm/drivers/serial/8250_pci.c |   22 ++++++++++++++++++++++
 25-akpm/include/linux/pci_ids.h   |    3 +++
 2 files changed, 25 insertions(+)

diff -puN drivers/serial/8250_pci.c~support-for-exar-xr17c158-octal-uart drivers/serial/8250_pci.c
--- 25/drivers/serial/8250_pci.c~support-for-exar-xr17c158-octal-uart	2004-08-06 22:10:52.236106328 -0700
+++ 25-akpm/drivers/serial/8250_pci.c	2004-08-06 22:10:52.242105416 -0700
@@ -629,6 +629,17 @@ static struct pci_serial_quirk pci_seria
 		.setup		= afavlab_setup,
 	},
 	/*
+	 * Exar Corp. XR17C158 Octal UART
+	 *  Only basic 16550A support.
+	 */
+	{
+		.vendor		= PCI_VENDOR_ID_EXAR,
+		.device		= PCI_DEVICE_ID_EXAR_XR17C158,
+		.subvendor	= PCI_ANY_ID,
+		.subdevice	= PCI_ANY_ID,
+		.setup		= pci_default_setup,
+	},
+	/*
 	 * HP Diva
 	 */
 	{
@@ -1068,6 +1079,7 @@ enum pci_board_num_t {
 	pbn_computone_6,
 	pbn_computone_8,
 	pbn_sbsxrsio,
+	pbn_exar_XR17C158,
 };
 
 /*
@@ -1488,6 +1500,12 @@ static struct pci_board pci_boards[] __d
 		.base_baud	= 460800,
 		.uart_offset	= 256,
 		.reg_shift	= 4,
+	},
+	[pbn_exar_XR17C158] = {
+		.flags		= FL_BASE0,
+		.num_ports	= 8,
+		.base_baud	= 921600,
+		.uart_offset	= 0x200,
 	}
 };
 
@@ -1758,6 +1776,10 @@ static int pciserial_resume_one(struct p
 }
 
 static struct pci_device_id serial_pci_tbl[] = {
+	{	PCI_VENDOR_ID_EXAR, PCI_DEVICE_ID_EXAR_XR17C158,
+		PCI_ANY_ID, PCI_ANY_ID,
+		0,
+		0, pbn_exar_XR17C158 },
 	{	PCI_VENDOR_ID_V3, PCI_DEVICE_ID_V3_V960,
 		PCI_SUBVENDOR_ID_CONNECT_TECH,
 		PCI_SUBDEVICE_ID_CONNECT_TECH_BH8_232, 0, 0,
diff -puN include/linux/pci_ids.h~support-for-exar-xr17c158-octal-uart include/linux/pci_ids.h
--- 25/include/linux/pci_ids.h~support-for-exar-xr17c158-octal-uart	2004-08-06 22:10:52.238106024 -0700
+++ 25-akpm/include/linux/pci_ids.h	2004-08-06 22:10:52.244105112 -0700
@@ -1800,6 +1800,9 @@
 #define PCI_DEVICE_ID_CCD_B00C		0xb00c
 #define PCI_DEVICE_ID_CCD_B100		0xb100
 
+#define PCI_VENDOR_ID_EXAR		0x13a8
+#define PCI_DEVICE_ID_EXAR_XR17C158	0x0158
+
 #define PCI_VENDOR_ID_MICROGATE		0x13c0
 #define PCI_DEVICE_ID_MICROGATE_USC	0x0010
 #define PCI_DEVICE_ID_MICROGATE_SCC	0x0020
_