All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tolunay Orkun <listmember@orkun.us>
To: u-boot@lists.denx.de
Subject: [U-Boot-Users] PATCH: CFG_GPIO0_OR and CFG_GPIO0_ODR to setup GPIO completely
Date: Fri, 07 Apr 2006 17:00:52 -0500	[thread overview]
Message-ID: <4436E114.7090804@orkun.us> (raw)

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 */

                 reply	other threads:[~2006-04-07 22:00 UTC|newest]

Thread overview: [no followups] expand[flat|nested]  mbox.gz  Atom feed

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4436E114.7090804@orkun.us \
    --to=listmember@orkun.us \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.