Skip to contentSkip to conversation

serial: uartlite: Support for SERIAL_MULTI

PATCH Superseded Michal Simek 2 participants 2 messages Aug 31, 2011 – Oct 6, 2011 Microblaze architecture

v1 of 5 Superseded Latest is v5 →

lore
Share & tools
lore

Michal Simek

author maintainer
#0 lore raw

PATCH 1/1 serial: uartlite: Support for SERIAL_MULTI

Add support for SERIAL MULTI for Microblaze.
It can be used by other archs too.

---
 arch/microblaze/lib/board.c          |    4 +
 common/serial.c                      |   14 ++++
 drivers/serial/serial_xuartlite.c    |  138 +++++++++++++++++++++++++++++-----
 include/configs/microblaze-generic.h |    2 +
 include/serial.h                     |    9 ++-
 5 files changed, 148 insertions(+), 19 deletions(-)
arch/microblaze/lib/board.c +4 -0
index c00d96b..3b671b8 100644
@@ -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
common/serial.c +14 -0
index 995d268..df02fa5 100644
@@ -108,6 +108,20 @@ void serial_initialize (void)
 #if defined(CONFIG_SYS_BFIN_UART)
 	serial_register_bfin_uart();
 #endif
+#if defined(CONFIG_XILINX_UARTLITE)
+# ifdef XILINX_UARTLITE_BASEADDR
+	serial_register(&uartlite_serial0_device);
+# endif /* XILINX_UARTLITE_BASEADDR */
+# ifdef XILINX_UARTLITE_BASEADDR1
+	serial_register(&uartlite_serial1_device);
+# endif /* XILINX_UARTLITE_BASEADDR1 */
+# ifdef XILINX_UARTLITE_BASEADDR2
+	serial_register(&uartlite_serial2_device);
+# endif /* XILINX_UARTLITE_BASEADDR2 */
+# ifdef XILINX_UARTLITE_BASEADDR3
+	serial_register(&uartlite_serial3_device);
+# endif /* XILINX_UARTLITE_BASEADDR3 */
+#endif /* CONFIG_XILINX_UARTLITE */
 	serial_assign (default_serial_console ()->name);
 }
 
drivers/serial/serial_xuartlite.c +120 -18

166 lines not on this page · raw message

include/configs/microblaze-generic.h +2 -0
index 0f46e62..1b60bfa 100644
@@ -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
include/serial.h +8 -1
index ff1ce99..f047d2f 100644
@@ -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)
@@ -50,6 +50,13 @@ extern struct serial_device serial4_device;
 extern struct serial_device serial6_device;
 #endif
 
+#if defined(CONFIG_XILINX_UARTLITE)
+extern struct serial_device uartlite_serial0_device;
+extern struct serial_device uartlite_serial1_device;
+extern struct serial_device uartlite_serial2_device;
+extern struct serial_device uartlite_serial3_device;
+#endif
+
 #if defined(CONFIG_S3C2410)
 extern struct serial_device s3c24xx_serial0_device;
 extern struct serial_device s3c24xx_serial1_device;
Signature · 1 line
1.5.5.6
#1 lore raw

PATCH 1/1 serial: uartlite: Support for SERIAL_MULTI

Dear Michal Simek,

Quoted 11 lines · In message <[email protected]> you wrote:

Add support for SERIAL MULTI for Microblaze.
It can be used by other archs too.

---
 arch/microblaze/lib/board.c          |    4 +
 common/serial.c                      |   14 ++++
 drivers/serial/serial_xuartlite.c    |  138 +++++++++++++++++++++++++++++-----
 include/configs/microblaze-generic.h |    2 +
 include/serial.h                     |    9 ++-
 5 files changed, 148 insertions(+), 19 deletions(-)

Checkpatch says:

total: 16 errors, 17 warnings, 231 lines checked

Please clean up and resubmit. Thanks.

Best regards,

Wolfgang Denk

Signature · 5 lines
DENX Software Engineering GmbH,     MD: Wolfgang Denk & Detlev Zundel
HRB 165235 Munich, Office: Kirchenstr.5, D-82194 Groebenzell, Germany
Phone: (+49)-8142-66989-10 Fax: (+49)-8142-66989-80 Email: wd at denx.de
Ernest asks Frank how long he has been working for the company.
        "Ever since they threatened to fire me."