summaryrefslogtreecommitdiff
path: root/arch/arm/cpu/arm1136/mx31
diff options
context:
space:
mode:
Diffstat (limited to 'arch/arm/cpu/arm1136/mx31')
-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 1415d6c..cbe8243 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)
{