Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 10 Jun 2011 19:12:00 +0000 (UTC)
From:      John Baldwin <jhb@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-8@freebsd.org
Subject:   svn commit: r222946 - stable/8/sys/dev/puc
Message-ID:  <201106101912.p5AJC1GE039637@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: jhb
Date: Fri Jun 10 19:12:00 2011
New Revision: 222946
URL: http://svn.freebsd.org/changeset/base/222946

Log:
  MFC 222660:
  - Rename the Cronyx Omega2-PCI entry to Exar XR17C158 since that is the
    real owner of the device ID.  Also rename the associated config
    function while here.
  - Add support for the 2-port and 4-port Exar parts as well: Exar XR17C/D152
    and Exar XR17C154.

Modified:
  stable/8/sys/dev/puc/pucdata.c
Directory Properties:
  stable/8/sys/   (props changed)
  stable/8/sys/amd64/include/xen/   (props changed)
  stable/8/sys/cddl/contrib/opensolaris/   (props changed)
  stable/8/sys/contrib/dev/acpica/   (props changed)
  stable/8/sys/contrib/pf/   (props changed)

Modified: stable/8/sys/dev/puc/pucdata.c
==============================================================================
--- stable/8/sys/dev/puc/pucdata.c	Fri Jun 10 19:08:17 2011	(r222945)
+++ stable/8/sys/dev/puc/pucdata.c	Fri Jun 10 19:12:00 2011	(r222946)
@@ -48,8 +48,8 @@ __FBSDID("$FreeBSD$");
 #include <dev/puc/puc_bfe.h>
 
 static puc_config_f puc_config_amc;
-static puc_config_f puc_config_cronyx;
 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_oxford_pcie;
 static puc_config_f puc_config_quatech;
@@ -548,11 +548,25 @@ const struct puc_cfg puc_pci_devices[] =
 	    PUC_PORT_8S, 0x18, 0, 8,
 	},
 
+	{   0x13a8, 0x0152, 0xffff, 0,
+	    "Exar XR17C/D152",
+	    DEFAULT_RCLK * 8,
+	    PUC_PORT_2S, 0x10, 0, -1,
+	    .config_function = puc_config_exar
+	},
+
+	{   0x13a8, 0x0154, 0xffff, 0,
+	    "Exar XR17C154",
+	    DEFAULT_RCLK * 8,
+	    PUC_PORT_4S, 0x10, 0, -1,
+	    .config_function = puc_config_exar
+	},
+
 	{   0x13a8, 0x0158, 0xffff, 0,
-	    "Cronyx Omega2-PCI",
+	    "Exar XR17C158",
 	    DEFAULT_RCLK * 8,
 	    PUC_PORT_8S, 0x10, 0, -1,
-	    .config_function = puc_config_cronyx
+	    .config_function = puc_config_exar
 	},
 
 	{   0x13a8, 0x0258, 0xffff, 0,
@@ -1014,28 +1028,28 @@ puc_config_amc(struct puc_softc *sc, enu
 }
 
 static int
-puc_config_cronyx(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port,
+puc_config_diva(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) {
-		*res = port * 0x200;
+		if (cfg->subdevice == 0x1282)		/* Everest SP */
+			port <<= 1;
+		else if (cfg->subdevice == 0x104b)	/* Maestro SP2 */
+			port = (port == 3) ? 4 : port;
+		*res = port * 8 + ((port > 2) ? 0x18 : 0);
 		return (0);
 	}
 	return (ENXIO);
 }
 
 static int
-puc_config_diva(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port,
+puc_config_exar(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) {
-		if (cfg->subdevice == 0x1282)		/* Everest SP */
-			port <<= 1;
-		else if (cfg->subdevice == 0x104b)	/* Maestro SP2 */
-			port = (port == 3) ? 4 : port;
-		*res = port * 8 + ((port > 2) ? 0x18 : 0);
+		*res = port * 0x200;
 		return (0);
 	}
 	return (ENXIO);



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