summaryrefslogtreecommitdiffstats
path: root/arch/powerpc/cpu/mpc5xxx/cpu_init.c
diff options
context:
space:
mode:
authorAnatolij Gustschin <agust@denx.de>2012-08-12 23:38:10 +0000
committerWolfgang Denk <wd@denx.de>2012-09-01 14:19:52 +0200
commitd7903ae1593a67f0cbda1c289795cbaff9a4082b (patch)
tree2fdfae53400c3fa375a751bced76ab4418eea0d4 /arch/powerpc/cpu/mpc5xxx/cpu_init.c
parent3d500013633510cd77f8a7a809150810b75a545e (diff)
downloadtalos-obmc-uboot-d7903ae1593a67f0cbda1c289795cbaff9a4082b.tar.gz
talos-obmc-uboot-d7903ae1593a67f0cbda1c289795cbaff9a4082b.zip
mpc5xxx: add GPIO port configuration
Add posibility for board specifig GPIO configurations using various CONFIG_SYS_ macros. Signed-off-by: Anatolij Gustschin <agust@denx.de>
Diffstat (limited to 'arch/powerpc/cpu/mpc5xxx/cpu_init.c')
-rw-r--r--arch/powerpc/cpu/mpc5xxx/cpu_init.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/arch/powerpc/cpu/mpc5xxx/cpu_init.c b/arch/powerpc/cpu/mpc5xxx/cpu_init.c
index 9daf3755ac..3044b4171a 100644
--- a/arch/powerpc/cpu/mpc5xxx/cpu_init.c
+++ b/arch/powerpc/cpu/mpc5xxx/cpu_init.c
@@ -169,6 +169,20 @@ void cpu_init_f (void)
out_be32(&gpio->port_config, CONFIG_SYS_GPS_PORT_CONFIG);
#endif
+ /* Setup gpios */
+#if defined(CONFIG_SYS_GPIO_DATADIR)
+ out_be32(&gpio->simple_ddr, CONFIG_SYS_GPIO_DATADIR);
+#endif
+#if defined(CONFIG_SYS_GPIO_OPENDRAIN)
+ out_be32(&gpio->simple_ode, CONFIG_SYS_GPIO_OPENDRAIN);
+#endif
+#if defined(CONFIG_SYS_GPIO_DATAVALUE)
+ out_be32(&gpio->simple_dvo, CONFIG_SYS_GPIO_DATAVALUE);
+#endif
+#if defined(CONFIG_SYS_GPIO_ENABLE)
+ out_be32(&gpio->simple_gpioe, CONFIG_SYS_GPIO_ENABLE);
+#endif
+
/* enable timebase */
setbits_be32(&xlb->config, (1 << 13));
OpenPOWER on IntegriCloud