puc & SIIG & Baud Rates

Rusty Biesele Rusty at takarus.com
Mon Jun 19 14:34:08 UTC 2006


 
 This is a follow-up to Douglas Rand's post which is 
attached below. The question he posed was how to patch
pucdata.c for its 10X clock frequency without interfering
with other Oxford Semiconductor chip based cards. I found that
the secondary vendor for the Oxford Chip on the SIIG CyberSerial 4S
is 0x131f, the vendor code for SIIG. By inserting a more specific
entry for the Oxford chip recognizing the secondary vendor code
before the generic entry for the Oxford chips, the SIIG card can
be uniquely recognized without interfering with other manufacturer's
using the Oxford chip.

Here is the diff of my file against the release 6.0 code:

diff pucdata.c-orig pucdata.c
857a858,878
>       /* NOTE: This entry must appear before the generic entry
>          for the Oxford Semiconductor OX16PCI954 PCI UARTs.
>          SIIG uses a non-standard crystal and these entries 
>          may not work with other implementations using Oxford
>          chips. This more specific entry will be detected for 
>          SIIG boards and the more generic entry below for 
>          non-SIIG boards. Thanks to Douglas Rand
<rand at meridian-enviro.com>
>          for figuring the 10x crystal problem  out. 
>          Rusty Biesele <Rusty at takarus.com>.
>       */
>       {   "SIIG Cyber Serial 4S with Oxford Semiconductor OX16PCI954
UARTs",
>           {   0x1415, 0x9501, 0x131f, 0       },
>           {   0xffff, 0xffff, 0xffff, 0       },
>           {
>               { 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 },
>           },
>       },
> 
869d889
< 



Date: Thu, 25 May 2006 15:20:44 -0500
Message-ID: <87slmxvotf.wl%rand at meridian-enviro.com>
From: "Douglas K. Rand" <rand at meridian-enviro.com>
To: freebsd-hardware at freebsd.org

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 at 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 at 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.





More information about the freebsd-hardware mailing list