aboutsummaryrefslogtreecommitdiff
path: root/arch/arm/cpu/arm1136
diff options
context:
space:
mode:
authorWolfgang Denk2010-10-17 19:57:38 +0200
committerWolfgang Denk2010-10-17 19:57:38 +0200
commit6ca803750e1e08fce26e508f1c35170bf9259bb4 (patch)
tree06a94458bc79e19dd3f8e187de5ce6ce6725a905 /arch/arm/cpu/arm1136
parentd470a6f60ad0d627c21a2769513d2017f9a0da76 (diff)
parentedad84c299628154ad14ad3726fc22ff45800830 (diff)
Merge branch 'master' of git://git.denx.de/u-boot-imx
Diffstat (limited to 'arch/arm/cpu/arm1136')
-rw-r--r--arch/arm/cpu/arm1136/mx31/generic.c17
1 files changed, 17 insertions, 0 deletions
diff --git a/arch/arm/cpu/arm1136/mx31/generic.c b/arch/arm/cpu/arm1136/mx31/generic.c
index 1415d6c2ae0..cbe8243ab8f 100644
--- a/arch/arm/cpu/arm1136/mx31/generic.c
+++ b/arch/arm/cpu/arm1136/mx31/generic.c
@@ -23,6 +23,7 @@
#include <common.h>
#include <asm/arch/mx31-regs.h>
+#include <asm/io.h>
static u32 mx31_decode_pll(u32 reg, u32 infreq)
{
@@ -90,6 +91,22 @@ void mx31_gpio_mux(unsigned long mode)
__REG(reg) = tmp;
}
+void mx31_set_pad(enum iomux_pins pin, u32 config)
+{
+ u32 field, l;
+ void *reg;
+
+ pin &= IOMUX_PADNUM_MASK;
+ reg = (IOMUXC_BASE + 0x154) + (pin + 2) / 3 * 4;
+ field = (pin + 2) % 3;
+
+ l = __raw_readl(reg);
+ l &= ~(0x1ff << (field * 10));
+ l |= config << (field * 10);
+ __raw_writel(l, reg);
+
+}
+
#if defined(CONFIG_DISPLAY_CPUINFO)
int print_cpuinfo (void)
{