Skip site navigation (1)Skip section navigation (2)
Date:      Fri, 15 Mar 2013 19:58:44 +0000 (UTC)
From:      Ryan Stone <rstone@FreeBSD.org>
To:        src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org
Subject:   svn commit: r248340 - head/sys/dev/puc
Message-ID:  <201303151958.r2FJwiVZ046492@svn.freebsd.org>

next in thread | raw e-mail | index | archive | help
Author: rstone
Date: Fri Mar 15 19:58:44 2013
New Revision: 248340
URL: http://svnweb.freebsd.org/changeset/base/248340

Log:
  Add support for Exar XR17V358 8-port serial device to puc(4)
  
  Reviewed by:	marius
  Sponsored by:	Sandvine Inc.
  MFC after:	1 week

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

Modified: head/sys/dev/puc/pucdata.c
==============================================================================
--- head/sys/dev/puc/pucdata.c	Fri Mar 15 19:50:21 2013	(r248339)
+++ head/sys/dev/puc/pucdata.c	Fri Mar 15 19:58:44 2013	(r248340)
@@ -50,6 +50,7 @@ __FBSDID("$FreeBSD$");
 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_exar_pcie;
 static puc_config_f puc_config_icbook;
 static puc_config_f puc_config_moxa;
 static puc_config_f puc_config_oxford_pcie;
@@ -630,6 +631,14 @@ const struct puc_cfg puc_pci_devices[] =
 	    PUC_PORT_8S, 0x10, 0, -1,
 	},
 
+	/* The XR17V358 uses the 125MHz PCIe clock as its reference clock. */
+	{   0x13a8, 0x0358, 0xffff, 0,
+	    "Exar XR17V358",
+	    125000000,
+	    PUC_PORT_8S, 0x10, 0, -1,
+	    .config_function = puc_config_exar_pcie
+	},
+
 	{   0x13fe, 0x1600, 0x1602, 0x0002,
 	    "Advantech PCI-1602",
 	    DEFAULT_RCLK * 8,
@@ -1186,6 +1195,17 @@ puc_config_exar(struct puc_softc *sc, en
 }
 
 static int
+puc_config_exar_pcie(struct puc_softc *sc, enum puc_cfg_cmd cmd, int port,
+    intptr_t *res)
+{
+	if (cmd == PUC_CFG_GET_OFS) {
+		*res = port * 0x400;
+		return (0);
+	}
+	return (ENXIO);
+}
+
+static int
 puc_config_icbook(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?201303151958.r2FJwiVZ046492>