Skip to content
Snippets Groups Projects
Commit d7903ae1 authored by Anatolij Gustschin's avatar Anatolij Gustschin Committed by Wolfgang Denk
Browse files

mpc5xxx: add GPIO port configuration


Add posibility for board specifig GPIO configurations using
various CONFIG_SYS_ macros.

Signed-off-by: default avatarAnatolij Gustschin <agust@denx.de>
parent 3d500013
No related branches found
No related tags found
No related merge requests found
...@@ -169,6 +169,20 @@ void cpu_init_f (void) ...@@ -169,6 +169,20 @@ void cpu_init_f (void)
out_be32(&gpio->port_config, CONFIG_SYS_GPS_PORT_CONFIG); out_be32(&gpio->port_config, CONFIG_SYS_GPS_PORT_CONFIG);
#endif #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 */ /* enable timebase */
setbits_be32(&xlb->config, (1 << 13)); setbits_be32(&xlb->config, (1 << 13));
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment