summaryrefslogtreecommitdiff
path: root/arch/arm/imx-common
diff options
context:
space:
mode:
authorTim Harvey <tharvey@gateworks.com>2014-06-02 16:13:24 -0700
committerStefano Babic <sbabic@denx.de>2014-06-06 10:07:26 +0200
commit5bf497e3fdba14cb39f8752ae7646d77dc49d519 (patch)
tree29b6d7e71fd0719a3ffec6d41a6ed721123fbf61 /arch/arm/imx-common
parentfe0f7f7842e109b9e04e455787d35bf3b21027c2 (diff)
downloadu-boot-imx-5bf497e3fdba14cb39f8752ae7646d77dc49d519.zip
u-boot-imx-5bf497e3fdba14cb39f8752ae7646d77dc49d519.tar.gz
u-boot-imx-5bf497e3fdba14cb39f8752ae7646d77dc49d519.tar.bz2
imx: iomux: add macros to setup iomux for multiple SoC types
Allow imx_iomux_v3_setup_multiple_pads to take a multi-cpu pad_list and add macros for declaring the pad_list that take into account the SoC types supported using CONFIG_MX6QDL (supports both the MX6Q and MX6DL iomux). Cc: Stefan Roese <sr@denx.de> Cc: Otavio Salvador <otavio@ossystems.com.br> Cc: Andy Ng <andreas2025@gmail.com> Cc: Eric Nelson <eric.nelson@boundarydevices.com> Cc: Tapani Utriainen <tapani@technexion.com> Cc: Tom Rini <trini@ti.com> Signed-off-by: Tim Harvey <tharvey@gateworks.com>
Diffstat (limited to 'arch/arm/imx-common')
-rw-r--r--arch/arm/imx-common/iomux-v3.c16
1 files changed, 14 insertions, 2 deletions
diff --git a/arch/arm/imx-common/iomux-v3.c b/arch/arm/imx-common/iomux-v3.c
index 6e46ea8..306183a 100644
--- a/arch/arm/imx-common/iomux-v3.c
+++ b/arch/arm/imx-common/iomux-v3.c
@@ -11,6 +11,7 @@
#include <common.h>
#include <asm/io.h>
#include <asm/arch/imx-regs.h>
+#include <asm/arch/sys_proto.h>
#include <asm/imx-common/iomux-v3.h>
static void *base = (void *)IOMUXC_BASE_ADDR;
@@ -54,12 +55,23 @@ void imx_iomux_v3_setup_pad(iomux_v3_cfg_t pad)
#endif
}
+/* configures a list of pads within declared with IOMUX_PADS macro */
void imx_iomux_v3_setup_multiple_pads(iomux_v3_cfg_t const *pad_list,
unsigned count)
{
iomux_v3_cfg_t const *p = pad_list;
+ int stride;
int i;
- for (i = 0; i < count; i++)
- imx_iomux_v3_setup_pad(*p++);
+#if defined(CONFIG_MX6QDL)
+ stride = 2;
+ if (!is_cpu_type(MXC_CPU_MX6Q) && !is_cpu_type(MXC_CPU_MX6D))
+ p += 1;
+#else
+ stride = 1;
+#endif
+ for (i = 0; i < count; i++) {
+ imx_iomux_v3_setup_pad(*p);
+ p += stride;
+ }
}