Perle Speed LE and FreeBSD

Issue:
for customers that want to use the Speed LE product on FreeBSD.

Solution:

FreeBSD provides native support for our serial cards through the PUC serial driver (PCI Universal Communications driver). This driver supports Oxford chip based serial UARTS.

Modification of the pucdata.c file would be required to add new entries, and then the kernel recompiled.

 

/sys/dev/puc/pucdata.c

Contents of patch file noted at end of this document.

The puc driver supports 2, 4, and 8 port cards.

Note: single port cards (serial or parallel) will not work with the PUC driver, as the driver code is programmed to ignore these types:

   /* We don't attach to single-port serial cards. */

      if (cfg->ports == PUC_PORT_1S || cfg->ports == PUC_PORT_1P)

         return (EDOOFUS);

 

It is noted by the FreeBSD maintainers that single port cards should be added to /sys/dev/uart/uart_bus_pci.c or /sys/dev/ppc/ppc_pci.c

 

The kernel configuration must have the puc driver enabled:

 

# If you've got a "dumb" serial or parallel PCI card that is

# supported by the puc(4) glue driver, uncomment the following

# line to enable it (connects to sio, uart and/or ppc drivers):

device         puc

 

 

The serial device names will be /dev/ttyu[Uart#]

 

Example of detection of Perle Speed8 LE PCI card (as this card uses dual quad UARTS it will appear twice) by the puc serial driver. Device nodes /dev/ttyu2 through ttyu9 will be allocated:

freebsd82# dmesg | grep puc

puc0: port 0xdf40-0xdf5f,0xdf60-0xdf7f mem 0xfe9fa000-0xfe9fafff,0xfe9fb000-0xfe9fbfff irq 16 at device 4.0 on pci1

puc0: [FILTER]

uart2: <16550 or compatible> on puc0

uart3: <16550 or compatible> on puc0

uart4: <16550 or compatible> on puc0

uart5: <16550 or compatible> on puc0

puc1: port 0xdf80-0xdf9f,0xdfe0-0xdfff mem 0xfe9fc000-0xfe9fcfff,0xfe9fd000-0xfe9fdfff irq 16 at device 4.1 on pci1

puc1: [FILTER]

uart6: <16950 or compatible> on puc1

uart7: <16950 or compatible> on puc1

uart8: <16950 or compatible> on puc1

uart9: <16950 or compatible> on puc1

 

 

patchfile for FreeBSD 8.2-RELEASE:

 

--- pucdata.orig.c      2012-02-10 12:24:47.000000000 -0500

+++ pucdata.c   2012-02-10 12:40:34.000000000 -0500

@@ -668,11 +668,35 @@

         */

 

        {   0x155f, 0x0331, 0xffff, 0,

-           "Perle Speed4 LE",

+           "Perle Ultraport4 Express",

            DEFAULT_RCLK * 8,

            PUC_PORT_4S, 0x10, 0, 8,

        },

 

+        {   0x155f, 0xB012, 0xffff, 0,

+            "Perle Speed2 LE",

+            DEFAULT_RCLK * 8,

+            PUC_PORT_2S, 0x10, 0, 8,

+        },

+

+        {   0x155f, 0xB022, 0xffff, 0,

+            "Perle Speed2 LE",

+            DEFAULT_RCLK * 8,

+            PUC_PORT_2S, 0x10, 0, 8,

+        },

+

+        {   0x155f, 0xB004, 0xffff, 0,

+            "Perle Speed4 LE",

+            DEFAULT_RCLK * 8,

+            PUC_PORT_4S, 0x10, 0, 8,

+        },

+

+        {   0x155f, 0xB008, 0xffff, 0,

+            "Perle Speed8 LE",

+            DEFAULT_RCLK * 8,

+            PUC_PORT_8S, 0x10, 0, 8,

+        },

+

        {   0x14d2, 0x8010, 0xffff, 0,

            "VScom PCI-100L",

            DEFAULT_RCLK * 8,


Article ID:
621
Published:
2/14/2012 9:57:22 AM
Last Modified:
2/14/2012 10:00:19 AM
Keywords:
FreeBSD, Speed LE, driver
Issue Type:
FAQ