Patchwork [U-Boot] microblaze: Enable SERIAL_MULTI

login
register
mail settings
Submitter Michal Simek
Date Sept. 6, 2011, 2:22 p.m.
Message ID <1315318932-21338-2-git-send-email-monstr@monstr.eu>
Download mbox | patch
Permalink /patch/113567/
State Superseded
Headers show

Comments

Michal Simek - Sept. 6, 2011, 2:22 p.m.
Enable support for SERIAL_MULTI.

Microblaze can use uart16550 and uartlite drivers.

Signed-off-by: Michal Simek <monstr@monstr.eu>
---
 arch/microblaze/lib/board.c          |    4 ++++
 include/configs/microblaze-generic.h |    2 ++
 include/serial.h                     |    2 +-
 3 files changed, 7 insertions(+), 1 deletions(-)

Patch

diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c
index b9ac514..799ba7f 100644
--- a/arch/microblaze/lib/board.c
+++ b/arch/microblaze/lib/board.c
@@ -31,6 +31,7 @@ 
 #include <watchdog.h>
 #include <stdio_dev.h>
 #include <net.h>
+#include <serial.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -111,6 +112,9 @@  void board_init (void)
 
 	monitor_flash_len = __end - __text_start;
 
+#ifdef CONFIG_SERIAL_MULTI
+	serial_initialize();
+#endif
 	/*
 	 * The Malloc area is immediately below the monitor copy in DRAM
 	 * aka CONFIG_SYS_MONITOR_BASE - Note there is no need for reloc_off
diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h
index 1320e9a..bb2c5a9 100644
--- a/include/configs/microblaze-generic.h
+++ b/include/configs/microblaze-generic.h
@@ -31,6 +31,8 @@ 
 #define	CONFIG_MICROBLAZE	1
 #define	MICROBLAZE_V5		1
 
+#define CONFIG_SERIAL_MULTI 1
+
 /* uart */
 #ifdef XILINX_UARTLITE_BASEADDR
 # define CONFIG_XILINX_UARTLITE
diff --git a/include/serial.h b/include/serial.h
index 5926244..f047d2f 100644
--- a/include/serial.h
+++ b/include/serial.h
@@ -31,7 +31,7 @@  extern struct serial_device * default_serial_console (void);
     defined(CONFIG_MB86R0x) || defined(CONFIG_MPC5xxx) || \
     defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) || \
     defined(CONFIG_MPC86xx) || defined(CONFIG_SYS_SC520) || \
-    defined(CONFIG_TEGRA2)
+    defined(CONFIG_TEGRA2) || defined(CONFIG_MICROBLAZE)
 extern struct serial_device serial0_device;
 extern struct serial_device serial1_device;
 #if defined(CONFIG_SYS_NS16550_SERIAL)