From owner-svn-src-stable@FreeBSD.ORG Sun Oct 26 03:44:22 2014 Return-Path: Delivered-To: svn-src-stable@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [8.8.178.115]) (using TLSv1.2 with cipher AECDH-AES256-SHA (256/256 bits)) (No client certificate requested) by hub.freebsd.org (Postfix) with ESMTPS id 3265EDF7; Sun, 26 Oct 2014 03:44:22 +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 1DAFB1D3; Sun, 26 Oct 2014 03:44:22 +0000 (UTC) Received: from svn.freebsd.org ([127.0.1.70]) by svn.freebsd.org (8.14.9/8.14.9) with ESMTP id s9Q3iLAd029501; Sun, 26 Oct 2014 03:44:21 GMT (envelope-from ian@FreeBSD.org) Received: (from ian@localhost) by svn.freebsd.org (8.14.9/8.14.9/Submit) id s9Q3iK2t029488; Sun, 26 Oct 2014 03:44:20 GMT (envelope-from ian@FreeBSD.org) Message-Id: <201410260344.s9Q3iK2t029488@svn.freebsd.org> X-Authentication-Warning: svn.freebsd.org: ian set sender to ian@FreeBSD.org using -f From: Ian Lepore Date: Sun, 26 Oct 2014 03:44:20 +0000 (UTC) To: src-committers@freebsd.org, svn-src-all@freebsd.org, svn-src-stable@freebsd.org, svn-src-stable-10@freebsd.org Subject: svn commit: r273670 - stable/10/sys/arm/freescale/imx X-SVN-Group: stable-10 MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-BeenThere: svn-src-stable@freebsd.org X-Mailman-Version: 2.1.18-1 Precedence: list List-Id: SVN commit messages for all the -stable branches of the src tree List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sun, 26 Oct 2014 03:44:22 -0000 Author: ian Date: Sun Oct 26 03:44:19 2014 New Revision: 273670 URL: https://svnweb.freebsd.org/changeset/base/273670 Log: MFC r271550, r271591: Replace the imx5 and imx6 iomux drivers with a single common driver that uses the new fdt_pinctrl interface. Added: stable/10/sys/arm/freescale/imx/imx_iomux.c - copied, changed from r271550, head/sys/arm/freescale/imx/imx_iomux.c Deleted: stable/10/sys/arm/freescale/imx/imx51_iomux.c stable/10/sys/arm/freescale/imx/imx51_iomuxreg.h stable/10/sys/arm/freescale/imx/imx6_iomux.c stable/10/sys/arm/freescale/imx/imx6_iomuxreg.h Modified: stable/10/sys/arm/freescale/imx/files.imx51 stable/10/sys/arm/freescale/imx/files.imx53 stable/10/sys/arm/freescale/imx/files.imx6 stable/10/sys/arm/freescale/imx/std.imx51 stable/10/sys/arm/freescale/imx/std.imx53 stable/10/sys/arm/freescale/imx/std.imx6 Directory Properties: stable/10/ (props changed) Modified: stable/10/sys/arm/freescale/imx/files.imx51 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx51 Sun Oct 26 03:41:27 2014 (r273669) +++ stable/10/sys/arm/freescale/imx/files.imx51 Sun Oct 26 03:44:19 2014 (r273670) @@ -19,7 +19,7 @@ arm/freescale/imx/bus_space.c standard arm/freescale/imx/tzic.c standard # IOMUX - external pins multiplexor -arm/freescale/imx/imx51_iomux.c standard +arm/freescale/imx/imx_iomux.c standard # GPIO arm/freescale/imx/imx_gpio.c optional gpio Modified: stable/10/sys/arm/freescale/imx/files.imx53 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx53 Sun Oct 26 03:41:27 2014 (r273669) +++ stable/10/sys/arm/freescale/imx/files.imx53 Sun Oct 26 03:44:19 2014 (r273670) @@ -22,7 +22,7 @@ dev/uart/uart_dev_imx.c optional uart arm/freescale/imx/tzic.c standard # IOMUX - external pins multiplexor -arm/freescale/imx/imx51_iomux.c standard +arm/freescale/imx/imx_iomux.c standard # GPIO arm/freescale/imx/imx_gpio.c optional gpio Modified: stable/10/sys/arm/freescale/imx/files.imx6 ============================================================================== --- stable/10/sys/arm/freescale/imx/files.imx6 Sun Oct 26 03:41:27 2014 (r273669) +++ stable/10/sys/arm/freescale/imx/files.imx6 Sun Oct 26 03:44:19 2014 (r273670) @@ -20,11 +20,11 @@ arm/arm/mpcore_timer.c standard arm/freescale/fsl_ocotp.c standard arm/freescale/imx/imx6_anatop.c standard arm/freescale/imx/imx6_ccm.c standard -arm/freescale/imx/imx6_iomux.c standard arm/freescale/imx/imx6_machdep.c standard arm/freescale/imx/imx6_mp.c optional smp arm/freescale/imx/imx6_pl310.c standard arm/freescale/imx/imx_common.c standard +arm/freescale/imx/imx_iomux.c standard arm/freescale/imx/imx_machdep.c standard arm/freescale/imx/imx_gpt.c standard arm/freescale/imx/imx_gpio.c optional gpio Copied and modified: stable/10/sys/arm/freescale/imx/imx_iomux.c (from r271550, head/sys/arm/freescale/imx/imx_iomux.c) ============================================================================== --- head/sys/arm/freescale/imx/imx_iomux.c Sat Sep 13 20:09:34 2014 (r271550, copy source) +++ stable/10/sys/arm/freescale/imx/imx_iomux.c Sun Oct 26 03:44:19 2014 (r273670) @@ -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) Modified: stable/10/sys/arm/freescale/imx/std.imx51 ============================================================================== --- stable/10/sys/arm/freescale/imx/std.imx51 Sun Oct 26 03:41:27 2014 (r273669) +++ stable/10/sys/arm/freescale/imx/std.imx51 Sun Oct 26 03:44:19 2014 (r273670) @@ -10,5 +10,7 @@ options KERNPHYSADDR=0x90100000 makeoptions KERNPHYSADDR=0x90100000 options PHYSADDR=0x90000000 +device fdt_pinctrl + files "../freescale/imx/files.imx51" Modified: stable/10/sys/arm/freescale/imx/std.imx53 ============================================================================== --- stable/10/sys/arm/freescale/imx/std.imx53 Sun Oct 26 03:41:27 2014 (r273669) +++ stable/10/sys/arm/freescale/imx/std.imx53 Sun Oct 26 03:44:19 2014 (r273670) @@ -10,5 +10,7 @@ options KERNPHYSADDR=0x70100000 makeoptions KERNPHYSADDR=0x70100000 options PHYSADDR=0x70000000 +device fdt_pinctrl + files "../freescale/imx/files.imx53" Modified: stable/10/sys/arm/freescale/imx/std.imx6 ============================================================================== --- stable/10/sys/arm/freescale/imx/std.imx6 Sun Oct 26 03:41:27 2014 (r273669) +++ stable/10/sys/arm/freescale/imx/std.imx6 Sun Oct 26 03:44:19 2014 (r273670) @@ -13,5 +13,7 @@ options PHYSADDR = 0x10000000 options IPI_IRQ_START=0 options IPI_IRQ_END=15 +device fdt_pinctrl + files "../freescale/imx/files.imx6"