public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Bob Feretich <bob.feretich@rafresearch.com>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH] OMAP3 Beagle Pin Mux initialization glitch fix
Date: Thu, 24 Feb 2011 15:16:44 -0800	[thread overview]
Message-ID: <4D66E6DC.8070604@rafresearch.com> (raw)

The below patch reverses the order of two segments in the board file.
Output pins need to have their values initialized, before they are
exposed to the logic outside the chip.

Signed-off-by: Bob Feretich <bob.feretich@rafresearch.com>
Cc: Wolfgang Denk <wd@denx.de>
---

diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
--- a/board/ti/beagle/beagle.c	2011-02-23 17:26:27.000000000 -0800
+++ b/board/ti/beagle/beagle.c	2011-02-23 17:47:44.000000000 -0800
@@ -239,17 +239,17 @@ int misc_init_r(void)
  	twl4030_power_init();
  	twl4030_led_init(TWL4030_LED_LEDEN_LEDAON | TWL4030_LED_LEDEN_LEDBON);

-	/* Configure GPIOs to output */
-	writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe);
-	writel(~(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 |
-		GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe);
-
-	/* Set GPIOs */
+	/* Set GPIO states before they are made outputs */
  	writel(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1,
  		&gpio6_base->setdataout);
  	writel(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 |
  		GPIO15 | GPIO14 | GPIO13 | GPIO12, &gpio5_base->setdataout);

+	/* Configure GPIOs to output */
+	writel(~(GPIO23 | GPIO10 | GPIO8 | GPIO2 | GPIO1), &gpio6_base->oe);
+	writel(~(GPIO31 | GPIO30 | GPIO29 | GPIO28 | GPIO22 | GPIO21 |
+		GPIO15 | GPIO14 | GPIO13 | GPIO12), &gpio5_base->oe);
+
  	dieid_num_r();

  	return 0;
--

             reply	other threads:[~2011-02-24 23:16 UTC|newest]

Thread overview: 4+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-02-24 23:16 Bob Feretich [this message]
2011-03-01 23:06 ` [U-Boot] [PATCH] OMAP3 Beagle Pin Mux initialization glitch fix Jason Kridner
  -- strict thread matches above, loose matches on Subject: below --
2011-08-11  5:26 Joel A Fernandes
2011-08-11 18:23 ` Jason Kridner

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=4D66E6DC.8070604@rafresearch.com \
    --to=bob.feretich@rafresearch.com \
    --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 a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox