Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 25 May 2006 15:20:44 -0500
From:      "Douglas K. Rand" <rand@meridian-enviro.com>
To:        freebsd-hardware@freebsd.org
Subject:   puc & SIIG & Baud Rates
Message-ID:  <87slmxvotf.wl%rand@meridian-enviro.com>

next in thread | raw e-mail | index | archive | help
I'm using a SIIG CyberPro PCI 4S serial card that has a 18.432 MHz
crystal on board rather than the if not standard, VERY common 1.8432
MHz crystal. After talking with SIIG support it seems that most of
their cards use the 10x crystal which cause baud rate mismatches.

I found the hint I needed from a (probably private) message by Kirk
McKusick that was included in this post to freebsd-stable:

   http://lists.freebsd.org/pipermail/freebsd-stable/2005-March/013183.html

Here's the pciconf details for the card:

puc0@pci0:13:0: class=0x070006 card=0x2051131f chip=0x95011415 rev=0x00 hdr=0x00
    vendor   = 'Oxford Semiconductor Ltd'
    device   = 'OX16PCI954 Quad UART'
    class    = simple comms
    subclass = UART
none1@pci0:13:1:        class=0x068000 card=0x0000131f chip=0x95101415 rev=0x00 hdr=0x00
    vendor   = 'Oxford Semiconductor Ltd'
    device   = 'OX16PCI954 PCI Interface (disabled)'
    class    = bridge

I tried the following patch to pucdata.c for the card:

--- pucdata.c-orig	Thu May 25 15:11:08 2006
+++ pucdata.c	Thu May 25 15:11:34 2006
@@ -623,14 +623,14 @@
 	/* SIIG Cyber 4S PCI 16C650 (20x family): 4S */
 	{   "SIIG Cyber 4S PCI 16C650 (20x family)",
 	    {	0x131f,	0x2051,	0,	0	},
 	    {	0xffff,	0xffff,	0,	0	},
 	    {
-		{ PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, 0x18, 0x00, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, 0x1c, 0x00, COM_FREQ },
+		{ PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ * 10 },
+		{ PUC_PORT_TYPE_COM, 0x14, 0x00, COM_FREQ * 10 },
+		{ PUC_PORT_TYPE_COM, 0x18, 0x00, COM_FREQ * 10 },
+		{ PUC_PORT_TYPE_COM, 0x1c, 0x00, COM_FREQ * 10 },
 	    },
 	},
 
 	/* SIIG Cyber 4S PCI 16C850 (20x family): 4S */
 	{   "SIIG Cyber 4S PCI 16C850 (20x family)",

which didn't do anything to help me. I finally realized that
pciconf -lv is reporting the chip details, not the card details. So, I
tried this patch:

--- pucdata.c-orig	Thu May 25 15:11:08 2006
+++ pucdata.c	Thu May 25 15:11:34 2006
@@ -858,14 +858,14 @@
 	/* Oxford Semiconductor OX16PCI954 PCI UARTs */
 	{   "Oxford Semiconductor OX16PCI954 UARTs",
 	    {	0x1415,	0x9501,	0,	0	},
 	    {	0xffff,	0xffff,	0,	0	},
 	    {
-		{ PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, 0x10, 0x08, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, 0x10, 0x10, COM_FREQ },
-		{ PUC_PORT_TYPE_COM, 0x10, 0x18, COM_FREQ },
+		{ PUC_PORT_TYPE_COM, 0x10, 0x00, COM_FREQ * 10 },
+		{ PUC_PORT_TYPE_COM, 0x10, 0x08, COM_FREQ * 10 },
+		{ PUC_PORT_TYPE_COM, 0x10, 0x10, COM_FREQ * 10 },
+		{ PUC_PORT_TYPE_COM, 0x10, 0x18, COM_FREQ * 10 },
 	    },
 	},
 
 	/* Oxford Semiconductor OX16PCI954 PCI UARTs */
 	{   "Oxford Semiconductor OX16PCI954 UARTs",

And this patch makes the card work for me. I also expect that this
patch will break all other vendors that use this Oxford chip on cards
with the 1.8432 MHz crystal. I was wondering if anybody might have
ideas on a better approach for the patch that will fix it for the
card.

I have a query into SIIG tech support for a list of their cards (and
the device IDs) that use the 18.432 crystal.




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?87slmxvotf.wl%rand>