summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2008-06-23 11:15:09 +0200
committerStefan Roese <sr@denx.de>2008-06-23 11:15:09 +0200
commitaac7a5095b968d6c9a3e6422f31b4ad203cac9c8 (patch)
treecc37017ee90c9bc936f852d88d71c044a8c564e6
parent914f58c5766860373a7d232e961cee5a4b54a55b (diff)
downloadu-boot-imx-aac7a5095b968d6c9a3e6422f31b4ad203cac9c8.zip
u-boot-imx-aac7a5095b968d6c9a3e6422f31b4ad203cac9c8.tar.gz
u-boot-imx-aac7a5095b968d6c9a3e6422f31b4ad203cac9c8.tar.bz2
ppc4xx: Fix problem in gpio_config()
As pointed out by Guennadi Liakhovetski (thanks), pin2 is already shifted left by one. So the additional shift is bogus. Signed-off-by: Stefan Roese <sr@denx.de>
-rw-r--r--cpu/ppc4xx/gpio.c4
1 files changed, 2 insertions, 2 deletions
diff --git a/cpu/ppc4xx/gpio.c b/cpu/ppc4xx/gpio.c
index 37d3fa8..df99f53 100644
--- a/cpu/ppc4xx/gpio.c
+++ b/cpu/ppc4xx/gpio.c
@@ -1,5 +1,5 @@
/*
- * (C) Copyright 2007
+ * (C) Copyright 2007-2008
* Stefan Roese, DENX Software Engineering, sr@denx.de.
*
* See file CREDITS for list of people who contributed to this
@@ -52,7 +52,7 @@ void gpio_config(int pin, int in_out, int gpio_alt, int out_val)
}
mask = 0x80000000 >> pin;
- mask2 = 0xc0000000 >> (pin2 << 1);
+ mask2 = 0xc0000000 >> pin2;
/* first set TCR to 0 */
out_be32((void *)GPIO0_TCR + offs, in_be32((void *)GPIO0_TCR + offs) & ~mask);