summaryrefslogtreecommitdiff
path: root/cpu/ppc4xx/gpio.c
diff options
context:
space:
mode:
authorWolfgang Denk <wd@denx.de>2007-08-14 18:43:14 +0200
committerWolfgang Denk <wd@denx.de>2007-08-14 18:43:14 +0200
commit541d41b2f23182047c0d655ad8d795f33dd37df2 (patch)
treeb6c9395bacc120d62415f45a0598a41ea0b5d018 /cpu/ppc4xx/gpio.c
parentf01dbb5424a81453c81190dd30e945891466f621 (diff)
parent3b3bff4cbf2cb14f9a3e7d03f26ebab900efe4ae (diff)
downloadu-boot-imx-541d41b2f23182047c0d655ad8d795f33dd37df2.zip
u-boot-imx-541d41b2f23182047c0d655ad8d795f33dd37df2.tar.gz
u-boot-imx-541d41b2f23182047c0d655ad8d795f33dd37df2.tar.bz2
Merge with /home/wd/git/u-boot/custodian/u-boot-ppc4xx
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));