From owner-svn-src-all@FreeBSD.ORG Sun Sep 14 16:12:44 2014 Return-Path: Delivered-To: svn-src-all@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) (using TLSv1 with cipher ADH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 5D4A61D6; Sun, 14 Sep 2014 16:12:44 +0000 (UTC) Received: from svn.freebsd.org (svn.freebsd.org [IPv6:2001:1900:2254:2068::e6a:0]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 2F907898; Sun, 14 Sep 2014 16:12:44 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s8EGCi1c089799; Sun, 14 Sep 2014 16:12:44 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s8EGCi4E089798; Sun, 14 Sep 2014 16:12:44 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201409141612.s8EGCi4E089798@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 14 Sep 2014 16:12:44 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-head@freebsd.org Subject: svn commit: r271591 - head/sys/arm/freescale/imx X-SVN-Group: head 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.18-1 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: Sun, 14 Sep 2014 16:12:44 -0000 Author: ian Date: Sun Sep 14 16:12:43 2014 New Revision: 271591 URL: http://svnweb.freebsd.org/changeset/base/271591 Log: Add a comment giving an overview of the driver. Remove leftover debugging. Modified: head/sys/arm/freescale/imx/imx_iomux.c Modified: head/sys/arm/freescale/imx/imx_iomux.c ============================================================================== --- head/sys/arm/freescale/imx/imx_iomux.c Sun Sep 14 15:59:15 2014 (r271590) +++ head/sys/arm/freescale/imx/imx_iomux.c Sun Sep 14 16:12:43 2014 (r271591) @@ -26,6 +26,29 @@ * $FreeBSD$ */ +/* + * Pin mux and pad control driver for imx5 and imx6. + * + * This driver implements the fdt_pinctrl interface for configuring the gpio and + * peripheral pins based on fdt configuration data. + * + * When the driver attaches, it walks the entire fdt tree and automatically + * configures the pins for each device which has a pinctrl-0 property and whose + * status is "okay". In addition it implements the fdt_pinctrl_configure() + * method which any other driver can call at any time to reconfigure its pins. + * + * The nature of the fsl,pins property in fdt data makes this driver's job very + * easy. Instead of representing each pin and pad configuration using symbolic + * properties such as pullup-enable="true" and so on, the data simply contains + * the addresses of the registers that control the pins, and the raw values to + * store in those registers. + * + * The imx5 and imx6 SoCs also have a small number of "general purpose + * registers" in the iomuxc device which are used to control an assortment + * of completely unrelated aspects of SoC behavior. This driver provides other + * drivers with direct access to those registers via simple accessor functions. + */ + #include #include #include @@ -102,13 +125,6 @@ iomux_configure_pins(device_t dev, phand cfgnode = OF_node_from_xref(cfgxref); ntuples = OF_getencprop_alloc(cfgnode, "fsl,pins", sizeof(*cfgtuples), (void **)&cfgtuples); -#ifdef DEBUG - { - char name[32]; - OF_getprop(cfgnode, "name", &name, sizeof(name)); - printf("found %d tuples in fsl,pins for %s\n", ntuples, name); - } -#endif if (ntuples < 0) return (ENOENT); if (ntuples == 0)