[U-Boot-Users] [PATCH] Fix a missing include for the lwmon5 dspic init POST.

sascha.laue at liebherr.com sascha.laue at liebherr.com
Fri May 30 09:47:49 CEST 2008


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

Signed-off-by: Sascha Laue <sascha.laue at 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





More information about the U-Boot mailing list