[U-Boot] [PATCH 07/25] Blackfin: do not require CONFIG_BAUDRATE

Mike Frysinger vapier at gentoo.org
Thu Dec 17 03:43:52 CET 2009


Signed-off-by: Mike Frysinger <vapier at gentoo.org>
---
 cpu/blackfin/initcode.c |    3 +++
 lib_blackfin/board.c    |    2 ++
 2 files changed, 5 insertions(+), 0 deletions(-)

diff --git a/cpu/blackfin/initcode.c b/cpu/blackfin/initcode.c
index a039cbb..90a5fc3 100644
--- a/cpu/blackfin/initcode.c
+++ b/cpu/blackfin/initcode.c
@@ -66,6 +66,9 @@ static inline void serial_init(void)
 		int ucen = *pUART_GCTL & UCEN;
 		serial_early_init();
 
+#ifndef CONFIG_BAUDRATE
+# define CONFIG_BAUDRATE 57600
+#endif
 		/* If the UART is off, that means we need to program
 		 * the baud rate ourselves initially.
 		 */
diff --git a/lib_blackfin/board.c b/lib_blackfin/board.c
index 6cade7d..1c3b461 100644
--- a/lib_blackfin/board.c
+++ b/lib_blackfin/board.c
@@ -61,11 +61,13 @@ static int display_banner(void)
 
 static int init_baudrate(void)
 {
+#ifdef CONFIG_BAUDRATE
 	char baudrate[15];
 	int i = getenv_r("baudrate", baudrate, sizeof(baudrate));
 	gd->bd->bi_baudrate = gd->baudrate = (i > 0)
 	    ? simple_strtoul(baudrate, NULL, 10)
 	    : CONFIG_BAUDRATE;
+#endif
 	return 0;
 }
 
-- 
1.6.5.5



More information about the U-Boot mailing list