PATCH: CFG_GPIO0_OR and CFG_GPIO0_ODR to setup GPIO completely
Re: http://sf.net/mailarchive/forum.php?thread_id=10122605&forum_id=12898
CHANGELOG:
* (ppc4xx) Add CFG_GPIO0_OR, CFG_GPIO0_ODR to setup GPIO completely.
- Add configuration of Open Drain GPIO Output selection
- Add configuration of initial value of GPIO output pins
Sign-off-by Tolunay Orkun <[email protected]>
cpu/ppc4xx/cpu_init.c +6 -0
@@ -115,6 +115,12 @@ cpu_init_f (void)/* * GPIO0 setup (select GPIO or alternate function) */ +#if defined(CFG_GPIO0_OR ) +out32 (GPIO0_OR ,CFG_GPIO0_OR );/* set initial state of output pins */ +#endif +#if defined(CFG_GPIO0_ODR ) +out32 (GPIO0_ODR ,CFG_GPIO0_ODR );/* open-drain select */ +#endif out32 (GPIO0_OSRH ,CFG_GPIO0_OSRH );/* output select */ out32 (GPIO0_OSRL ,CFG_GPIO0_OSRL );out32 (GPIO0_ISR1H ,CFG_GPIO0_ISR1H );/* input select */