Skip to contentSkip to conversation

: Support for Exar XR17C158 Octal UART

PATCH New Raphael Zimmerer 1 participant 1 message Jul 30, 2004 PCI

lore
Share & tools
lore
#0 lore raw

PATCH 1/1 : Support for Exar XR17C158 Octal UART

Hello,

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

Regards,
Raphael

 drivers/serial/8250_pci.c |   22 ++++++++++++++++++++++
 include/linux/pci_ids.h   |    3 +++
 2 files changed, 25 insertions(+)
drivers/serial/8250_pci.c +22 -0
diff -rNu linux-2.6.8-rc2/drivers/serial/8250_pci.c linux-2.6.8-rc2-[uart]/drivers/serial/8250_pci.c
@@ -630,6 +630,17 @@
 		.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
 	 */
 	{
@@ -1069,6 +1080,7 @@
 	pbn_computone_6,
 	pbn_computone_8,
 	pbn_sbsxrsio,
+	pbn_exar_XR17C158,
 };
 
 /*
@@ -1489,6 +1501,12 @@
 		.base_baud	= 460800,
 		.uart_offset	= 256,
 		.reg_shift	= 4,
+	},
+	[pbn_exar_XR17C158] = {
+		.flags		= FL_BASE0,
+		.num_ports	= 8,
+		.base_baud	= 921600,
+		.uart_offset	= 0x200,
 	}
 };
 
@@ -1759,6 +1777,10 @@
 }
 
 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,
include/linux/pci_ids.h +3 -0
diff -rNu linux-2.6.8-rc2/include/linux/pci_ids.h linux-2.6.8-rc2-[uart]/include/linux/pci_ids.h
@@ -1794,6 +1794,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