Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 11 Nov 2011 22:24:16 +0000 (UTC)
From:      Eitan Adler <eadler@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r227457 - head/sys/dev/puc
Message-ID:  <201111112224.pABMOG0R011302@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: eadler (ports committer)
Date: Fri Nov 11 22:24:16 2011
New Revision: 227457
URL: http://svn.freebsd.org/changeset/base/227457

Log:
  - add support for CP-104EL-A and CP-104JU to puc
  
  PR:		151365
  Submitted by:	Joerg Niendorf <f5d10a@internode.on.net>
  Approved by:	jhb

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

Modified: head/sys/dev/puc/pucdata.c
==============================================================================
--- head/sys/dev/puc/pucdata.c	Fri Nov 11 21:57:31 2011	(r227456)
+++ head/sys/dev/puc/pucdata.c	Fri Nov 11 22:24:16 2011	(r227457)
@@ -51,6 +51,7 @@ static puc_config_f puc_config_amc;
 static puc_config_f puc_config_diva;
 static puc_config_f puc_config_exar;
 static puc_config_f puc_config_icbook;
+static puc_config_f puc_config_moxa;
 static puc_config_f puc_config_oxford_pcie;
 static puc_config_f puc_config_quatech;
 static puc_config_f puc_config_syba;
@@ -518,12 +519,25 @@ const struct puc_cfg puc_pci_devices[] =
 	    PUC_PORT_4S, 0x18, 0, 8,
 	},
 
+	{   0x1393, 0x1042, 0xffff, 0,
+	    "Moxa Technologies, Smartio CP-104JU/PCI",
+	    DEFAULT_RCLK * 8,
+	    PUC_PORT_4S, 0x18, 0, 8,
+	},
+
 	{   0x1393, 0x1043, 0xffff, 0,
 	    "Moxa Technologies, Smartio CP-104EL/PCIe",
 	    DEFAULT_RCLK * 8,
 	    PUC_PORT_4S, 0x18, 0, 8,
 	},
 
+	{   0x1393, 0x1045, 0xffff, 0,
+	    "Moxa Technologies, Smartio CP-104EL-A/PCIe",
+	    DEFAULT_RCLK * 8,
+	    PUC_PORT_4S, 0x14, 0, -1,
+		.config_function = puc_config_moxa
+	},
+
 	{   0x1393, 0x1120, 0xffff, 0,
 	    "Moxa Technologies, CP-112UL",
 	    DEFAULT_RCLK * 8,
@@ -1086,6 +1100,19 @@ puc_config_icbook(struct puc_softc *sc, 
 }
 
 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) {
+		*res = ((port == 3) ? 7 : port) * 0x200;
+		return 0;
+	}
+	return (ENXIO);
+}
+
+static int
 puc_config_quatech(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port,
     intptr_t *res)
 {



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?201111112224.pABMOG0R011302>