From owner-svn-src-all@FreeBSD.ORG Thu Jun 27 09:20:23 2013 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by hub.freebsd.org (Postfix) with ESMTP id 45DD4461; Thu, 27 Jun 2013 09:20:23 +0000 (UTC) (envelope-from marius@FreeBSD.org) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) by mx1.freebsd.org (Postfix) with ESMTP id 3904B161E; Thu, 27 Jun 2013 09:20:23 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.7/8.14.7) with ESMTP id r5R9KNi4077279; Thu, 27 Jun 2013 09:20:23 GMT (envelope-from marius@svn.freebsd.org) Received: (from marius@localhost) by svn.freebsd.org (8.14.7/8.14.5/Submit) id r5R9KNr3077245; Thu, 27 Jun 2013 09:20:23 GMT (envelope-from marius@svn.freebsd.org) Message-Id: <201306270920.r5R9KNr3077245@svn.freebsd.org> From: Marius Strobl Date: Thu, 27 Jun 2013 09:20:23 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-9@freebsd.org Subject: svn commit: r252297 - stable/9/sys/dev/puc X-SVN-Group: stable-9 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-all@freebsd.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "SVN commit messages for the entire src tree \(except for " user" and " projects" \)" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 27 Jun 2013 09:20:23 -0000 Author: marius Date: Thu Jun 27 09:20:22 2013 New Revision: 252297 URL: http://svnweb.freebsd.org/changeset/base/252297 Log: MFC: r248340 Add support for Exar XR17V358 8-port serial device to puc(4) Modified: stable/9/sys/dev/puc/pucdata.c Directory Properties: stable/9/sys/ (props changed) stable/9/sys/dev/ (props changed) stable/9/sys/dev/puc/ (props changed) Modified: stable/9/sys/dev/puc/pucdata.c ============================================================================== --- stable/9/sys/dev/puc/pucdata.c Thu Jun 27 09:14:50 2013 (r252296) +++ stable/9/sys/dev/puc/pucdata.c Thu Jun 27 09:20:22 2013 (r252297) @@ -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) {