Author: fjoe
Date: Thu Jun 21 03:10:48 2012
New Revision: 237350
URL: http://svn.freebsd.org/changeset/base/237350

Log:
  Add support for the following Moxa PCIe multiport serial boards:
  - CP102E
  - CP102EL
  - CP132EL
  - CP114EL
  - CP118EL-A
  - CP168EL-A
  
  MFC after:    1 week

Modified:
  head/sys/dev/puc/puc_cfg.h
  head/sys/dev/puc/pucdata.c

Modified: head/sys/dev/puc/puc_cfg.h
==============================================================================
--- head/sys/dev/puc/puc_cfg.h  Thu Jun 21 02:48:49 2012        (r237349)
+++ head/sys/dev/puc/puc_cfg.h  Thu Jun 21 03:10:48 2012        (r237350)
@@ -79,7 +79,7 @@ struct puc_cfg {
        int8_t          ports;
        int8_t          rid;            /* Rid of first port */
        int8_t          d_rid;          /* Delta rid of next ports */
-       int8_t          d_ofs;          /* Delta offset of next ports */
+       int16_t         d_ofs;          /* Delta offset of next ports */
        puc_config_f    *config_function;
 };
 

Modified: head/sys/dev/puc/pucdata.c
==============================================================================
--- head/sys/dev/puc/pucdata.c  Thu Jun 21 02:48:49 2012        (r237349)
+++ head/sys/dev/puc/pucdata.c  Thu Jun 21 03:10:48 2012        (r237350)
@@ -507,6 +507,18 @@ const struct puc_cfg puc_pci_devices[] =
            .config_function = puc_config_quatech
        },
 
+       {   0x1393, 0x1024, 0xffff, 0,
+           "Moxa Technologies, Smartio CP-102E/PCIe",
+           DEFAULT_RCLK * 8,
+           PUC_PORT_2S, 0x14, 0, 0x200
+       },
+
+       {   0x1393, 0x1025, 0xffff, 0,
+           "Moxa Technologies, Smartio CP-102EL/PCIe",
+           DEFAULT_RCLK * 8,
+           PUC_PORT_2S, 0x14, 0, 0x200,
+       },
+
        {   0x1393, 0x1040, 0xffff, 0,
            "Moxa Technologies, Smartio C104H/PCI",
            DEFAULT_RCLK * 8,
@@ -550,6 +562,25 @@ const struct puc_cfg puc_pci_devices[] =
            PUC_PORT_4S, 0x18, 0, 8,
        },
 
+       {   0x1393, 0x1144, 0xffff, 0,
+           "Moxa Technologies, Smartio CP-114EL/PCIe",
+           DEFAULT_RCLK * 8,
+           PUC_PORT_4S, 0x14, 0, -1,
+               .config_function = puc_config_moxa
+       },
+
+       {   0x1393, 0x1182, 0xffff, 0,
+           "Moxa Technologies, Smartio CP-118EL-A/PCIe",
+           DEFAULT_RCLK * 8,
+           PUC_PORT_8S, 0x14, 0, 0x200,
+       },
+
+       {   0x1393, 0x1322, 0xffff, 0,
+           "Moxa Technologies, Smartio CP-132EL/PCIe",
+           DEFAULT_RCLK * 8,
+           PUC_PORT_2S, 0x14, 0, 0x200,
+       },
+
        {   0x1393, 0x1680, 0xffff, 0,
            "Moxa Technologies, C168H/PCI",
            DEFAULT_RCLK * 8,
@@ -568,6 +599,12 @@ const struct puc_cfg puc_pci_devices[] =
            PUC_PORT_8S, 0x18, 0, 8,
        },
 
+       {   0x1393, 0x1683, 0xffff, 0,
+           "Moxa Technologies, Smartio CP-168EL-A/PCIe",
+           DEFAULT_RCLK * 8,
+           PUC_PORT_8S, 0x14, 0, 0x200,
+       },
+
        {   0x13a8, 0x0152, 0xffff, 0,
            "Exar XR17C/D152",
            DEFAULT_RCLK * 8,
@@ -1127,9 +1164,7 @@ static int
 puc_config_moxa(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port,
     intptr_t *res)
 {
-       const struct puc_cfg *cfg = sc->sc_cfg;
-       
-       if (cmd == PUC_CFG_GET_OFS && cfg->device == 0x1045) {
+       if (cmd == PUC_CFG_GET_OFS) {
                *res = ((port == 3) ? 7 : port) * 0x200;
                return 0;
        }
_______________________________________________
svn-src-head@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/svn-src-head
To unsubscribe, send any mail to "svn-src-head-unsubscr...@freebsd.org"

Reply via email to