* [U-Boot-Users] PATCH: CFG_GPIO0_OR and CFG_GPIO0_ODR to setup GPIO completely
@ 2006-04-07 22:00 Tolunay Orkun
0 siblings, 0 replies; only message in thread
From: Tolunay Orkun @ 2006-04-07 22:00 UTC (permalink / raw)
To: u-boot
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 <listmember@orkun.us>
diff --git a/cpu/ppc4xx/cpu_init.c b/cpu/ppc4xx/cpu_init.c
index 1a139d7..761fcf7 100644
--- a/cpu/ppc4xx/cpu_init.c
+++ b/cpu/ppc4xx/cpu_init.c
@@ -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 */
^ permalink raw reply related [flat|nested] only message in thread
only message in thread, other threads:[~2006-04-07 22:00 UTC | newest]
Thread overview: (only message) (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-07 22:00 [U-Boot-Users] PATCH: CFG_GPIO0_OR and CFG_GPIO0_ODR to setup GPIO completely Tolunay Orkun
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox