summaryrefslogtreecommitdiff
path: root/cpu
diff options
context:
space:
mode:
authorMagnus Lilja <lilja.magnus@gmail.com>2008-08-03 21:44:10 +0200
committerJean-Christophe PLAGNIOL-VILLARD <plagnioj@jcrosoft.com>2008-08-11 23:33:57 +0200
commit5276a3584d26a9533404f0ec00c3b61cf9a97939 (patch)
tree91eab723f350bb9a82837412614092bc7ba31522 /cpu
parentb6b183c5b2fffd4c456b7e3fcb064cceb47fe7ac (diff)
downloadu-boot-imx-5276a3584d26a9533404f0ec00c3b61cf9a97939.zip
u-boot-imx-5276a3584d26a9533404f0ec00c3b61cf9a97939.tar.gz
u-boot-imx-5276a3584d26a9533404f0ec00c3b61cf9a97939.tar.bz2
i.MX31: Fix mx31_gpio_mux() function and MUX_-macros.
Correct the mx31_gpio_mux() function to allow changing all i.MX31 IOMUX contacts instead of only the first 256 ones as is the case prior to this patch. Add missing MUX_* macros and update board files to use the new macros. Signed-off-by: Magnus Lilja <lilja.magnus@gmail.com>
Diffstat (limited to 'cpu')
-rw-r--r--cpu/arm1136/mx31/generic.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpu/arm1136/mx31/generic.c b/cpu/arm1136/mx31/generic.c
index 29c08c1..dc031c9 100644
--- a/cpu/arm1136/mx31/generic.c
+++ b/cpu/arm1136/mx31/generic.c
@@ -81,12 +81,12 @@ void mx31_gpio_mux(unsigned long mode)
{
unsigned long reg, shift, tmp;
- reg = IOMUXC_BASE + (mode & 0xfc);
+ reg = IOMUXC_BASE + (mode & 0x1fc);
shift = (~mode & 0x3) * 8;
tmp = __REG(reg);
tmp &= ~(0xff << shift);
- tmp |= ((mode >> 8) & 0xff) << shift;
+ tmp |= ((mode >> IOMUX_MODE_POS) & 0xff) << shift;
__REG(reg) = tmp;
}