summaryrefslogtreecommitdiff
path: root/cpu/ppc4xx/gpio.c
diff options
context:
space:
mode:
authorStefan Roese <sr@denx.de>2007-08-15 14:51:27 +0200
committerStefan Roese <sr@denx.de>2007-08-15 14:51:27 +0200
commitd61ea14885631e58a25feaa81ee82eb464c62d6a (patch)
tree27927975039d0a15e6c6d4dfe8f765a76a12820a /cpu/ppc4xx/gpio.c
parent3ba4c2d68f6541db4677b4aea12071f56e6ff6e6 (diff)
parent594e79838ce5078a90d0c27abb2b2d61d5f8e8a7 (diff)
downloadu-boot-imx-d61ea14885631e58a25feaa81ee82eb464c62d6a.zip
u-boot-imx-d61ea14885631e58a25feaa81ee82eb464c62d6a.tar.gz
u-boot-imx-d61ea14885631e58a25feaa81ee82eb464c62d6a.tar.bz2
Merge with git://www.denx.de/git/u-boot.git
Diffstat (limited to 'cpu/ppc4xx/gpio.c')
-rw-r--r--cpu/ppc4xx/gpio.c6
1 files changed, 4 insertions, 2 deletions
diff --git a/cpu/ppc4xx/gpio.c b/cpu/ppc4xx/gpio.c
index 5235203..50f2fdf 100644
--- a/cpu/ppc4xx/gpio.c
+++ b/cpu/ppc4xx/gpio.c
@@ -186,6 +186,7 @@ void gpio_set_chip_configuration(void)
out32(GPIO0_TCR, reg);
}
+#ifdef GPIO1
if (gpio_core == GPIO1) {
/*
* Setup output value
@@ -193,16 +194,17 @@ void gpio_set_chip_configuration(void)
* 0 -> low level
* else -> don't touch
*/
- reg = in32(GPIO0_OR);
+ reg = in32(GPIO1_OR);
if (gpio_tab[gpio_core][i].out_val == GPIO_OUT_1)
reg |= (0x80000000 >> (i));
else if (gpio_tab[gpio_core][i].out_val == GPIO_OUT_0)
reg &= ~(0x80000000 >> (i));
- out32(GPIO0_OR, reg);
+ out32(GPIO1_OR, reg);
reg = in32(GPIO1_TCR) | (0x80000000 >> (i));
out32(GPIO1_TCR, reg);
}
+#endif /* GPIO1 */
reg = in32(GPIO_OS(core_add+offs))
& ~(GPIO_MASK >> (j*2));