svn commit: r273670 - stable/10/sys/arm/freescale/imx
Ian Lepore
ian at FreeBSD.org
Sun Oct 26 03:44:22 UTC 2014
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 <sys/param.h>
#include <sys/systm.h>
#include <sys/bus.h>
@@ -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"
More information about the svn-src-stable
mailing list