public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
* [U-Boot-Users] [PATCH] Fix a missing include for the lwmon5 dspic init POST.
@ 2008-05-30  7:47 sascha.laue at liebherr.com
  2008-05-30  9:34 ` Wolfgang Denk
  0 siblings, 1 reply; 3+ messages in thread
From: sascha.laue at liebherr.com @ 2008-05-30  7:47 UTC (permalink / raw)
  To: u-boot

From: Sascha Laue <sascha.laue@liebherr.com>

Signed-off-by: Sascha Laue <sascha.laue@liebherr.com>
---
 board/lwmon5/lwmon5.c |    7 +++++--
 1 files changed, 5 insertions(+), 2 deletions(-)

diff --git a/board/lwmon5/lwmon5.c b/board/lwmon5/lwmon5.c
index b63fbdc..c29dfc1 100644
--- a/board/lwmon5/lwmon5.c
+++ b/board/lwmon5/lwmon5.c
@@ -24,6 +24,7 @@
 #include <asm/processor.h>
 #include <asm/gpio.h>
 #include <asm/io.h>
+#include <post.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -103,15 +104,17 @@ int board_early_init_f(void)
 	out_be32((void *)CFG_DSPIC_TEST_ADDR,
 		in_be32((void *)CFG_DSPIC_TEST_ADDR)
 			& ~CFG_DSPIC_TEST_MASK);
-	while (!gpio_read_in_bit(CFG_GPIO_DSPIC_READY) && reg++ < 1000) {
+	while (gpio_read_in_bit(CFG_GPIO_DSPIC_READY) && reg++ < 1000) {
 		udelay(1000);
 	}
-	gpio_write_bit(CFG_GPIO_HIGHSIDE, 0);
 	if (gpio_read_in_bit(CFG_GPIO_DSPIC_READY)) {
 		/* set "boot error" flag */
 		out_be32((void *)CFG_DSPIC_TEST_ADDR,
 			in_be32((void *)CFG_DSPIC_TEST_ADDR) |
 			CFG_DSPIC_TEST_MASK);
+	} else {
+		/* dspic ready - disable LSB transmitter */
+		gpio_write_bit(CFG_GPIO_HIGHSIDE, 0);
 	}
 #endif
 
-- 
1.5.2.4

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

end of thread, other threads:[~2008-07-07  7:58 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-05-30  7:47 [U-Boot-Users] [PATCH] Fix a missing include for the lwmon5 dspic init POST sascha.laue at liebherr.com
2008-05-30  9:34 ` Wolfgang Denk
2008-07-07  7:58   ` Stefan Roese

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