public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot] [PATCH] OMAP3 Beagle Pin Mux initialization glitch fix
@ 2011-02-24 23:16 Bob Feretich
  2011-03-01 23:06 ` Jason Kridner
  0 siblings, 1 reply; 4+ messages in thread
From: Bob Feretich @ 2011-02-24 23:16 UTC (permalink / raw)
  To: u-boot

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;
--

^ permalink raw reply	[flat|nested] 4+ messages in thread
* [U-Boot] [PATCH] OMAP3 Beagle Pin Mux initialization glitch fix
@ 2011-08-11  5:26 Joel A Fernandes
  2011-08-11 18:23 ` Jason Kridner
  0 siblings, 1 reply; 4+ messages in thread
From: Joel A Fernandes @ 2011-08-11  5:26 UTC (permalink / raw)
  To: u-boot

From: Bob Feretich <bob.feretich@rafresearch.com>

From: Bob Feretich <bob.feretich@rafresearch.com>

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.

Previous discussions:
http://lists.denx.de/pipermail/u-boot/2011-March/088115.html

Signed-off-by: Bob Feretich <bob.feretich@rafresearch.com>
Signed-off-by: Joel A Fernandes <agnel.joel@gmail.com>
---
 board/ti/beagle/beagle.c |   12 ++++++------
 1 files changed, 6 insertions(+), 6 deletions(-)

diff --git a/board/ti/beagle/beagle.c b/board/ti/beagle/beagle.c
index ab50514..15d061a 100644
--- a/board/ti/beagle/beagle.c
+++ b/board/ti/beagle/beagle.c
@@ -301,17 +301,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;
-- 
1.7.1

^ permalink raw reply related	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2011-08-11 18:23 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-02-24 23:16 [U-Boot] [PATCH] OMAP3 Beagle Pin Mux initialization glitch fix Bob Feretich
2011-03-01 23:06 ` 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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox