Skip to contentSkip to conversation

microblaze - serial multi

U-Boot New Michal Simek 4 participants 9 messages Oct 10, 2011 Microblaze architecture

lore
Share & tools
lore

Michal Simek

author maintainer
#0 lore raw

Hi,

my uartlite serial multi patch is upstream that's why I can enable serial multi for microblaze.
There is one issue with serial.h where are spaces at the start of a line. I just follow coding style there.
If you require to fix it, I will do it.

Thanks,
Michal

author maintainer
#1 lore raw

PATCH 1/1 microblaze: Enable SERIAL_MULTI

Enable support for SERIAL_MULTI.

Microblaze can use uart16550 and uartlite drivers.

---
Note:
Follow serial.h conding style.

---
 arch/microblaze/lib/board.c          |    4 ++++
 include/configs/microblaze-generic.h |    2 ++
 include/serial.h                     |    2 +-
 3 files changed, 7 insertions(+), 1 deletions(-)
arch/microblaze/lib/board.c +4 -0
index ca5882d..64089c8 100644
@@ -32,6 +32,7 @@
 #include <stdio_dev.h>
 #include <net.h>
 #include <asm/processor.h>
+#include <serial.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -110,6 +111,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
include/configs/microblaze-generic.h +2 -0
index 6b3fd76..89657189 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 +1 -1
index 5926244..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)
Signature · 1 line
1.7.5.4
#2 lore raw

PATCH 1/1 microblaze: Enable SERIAL_MULTI

Quoted 56 lines · Michal Simek

Enable support for SERIAL_MULTI.

Microblaze can use uart16550 and uartlite drivers.

---
Note:
Follow serial.h conding style.

---
 arch/microblaze/lib/board.c          |    4 ++++
 include/configs/microblaze-generic.h |    2 ++
 include/serial.h                     |    2 +-
 3 files changed, 7 insertions(+), 1 deletions(-)
arch/microblaze/lib/board.c +4 -0
index ca5882d..64089c8 100644
@@ -32,6 +32,7 @@
 #include <stdio_dev.h>
 #include <net.h>
 #include <asm/processor.h>
+#include <serial.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -110,6 +111,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
include/configs/microblaze-generic.h +2 -0
index 6b3fd76..89657189 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 +0 -0
index 5926244..f047d2f 100644

include/serial.h extern struct serial_device * default_serial_console · line 35

Quoted 6 lines
include/serial.h +1 -1
@@ -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)

Am I the only one that thinks this is all really ugly?

Quoted 5 lines
include/serial.h +0 -0
 extern struct serial_device serial0_device;
 extern struct serial_device serial1_device;

#if defined(CONFIG_SYS_NS16550_SERIAL)
--
1.7.5.4

Regards,

Graeme

author maintainer
#3 lore raw

PATCH 1/1 microblaze: Enable SERIAL_MULTI

Quoted 57 lines · Graeme Russ
Quoted 56 lines · Michal Simek

Enable support for SERIAL_MULTI.

Microblaze can use uart16550 and uartlite drivers.

---
Note:
Follow serial.h conding style.

---
 arch/microblaze/lib/board.c          |    4 ++++
 include/configs/microblaze-generic.h |    2 ++
 include/serial.h                     |    2 +-
 3 files changed, 7 insertions(+), 1 deletions(-)
arch/microblaze/lib/board.c +4 -0
index ca5882d..64089c8 100644
@@ -32,6 +32,7 @@
 #include <stdio_dev.h>
 #include <net.h>
 #include <asm/processor.h>
+#include <serial.h>
 
 DECLARE_GLOBAL_DATA_PTR;
 
@@ -110,6 +111,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
include/configs/microblaze-generic.h +2 -0
index 6b3fd76..89657189 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 +0 -0
index 5926244..f047d2f 100644
@@ -31,7 +31,7 @@ extern struct serial_device * default_serial_console
Quoted 8 lines

include/serial.h extern struct serial_device * default_serial_console (void); · line 34

Quoted 6 lines
include/serial.h +1 -1
 (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)

Am I the only one that thinks this is all really ugly?

I hope you mean serial.h not mb code.

I agree with you but not sure if we can remove all ifdefs there.

Thanks,
Michal

Signature · 4 lines
Michal Simek, Ing. (M.Eng)
w: www.monstr.eu p: +42-0-721842854
Maintainer of Linux kernel 2.6 Microblaze Linux - http://www.monstr.eu/fdt/
Microblaze U-BOOT custodian
#4 lore raw

PATCH 1/1 microblaze: Enable SERIAL_MULTI

Dear Michal Simek,

Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 7 lines
Quoted 6 lines
     defined(CONFIG_MB86R0x) || defined(CONFIG_MPC5xxx) || \
     defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) || \
     defined(CONFIG_MPC86xx) || defined(CONFIG_SYS_SC520) || \
include/serial.h +1 -1
-    defined(CONFIG_TEGRA2)
+    defined(CONFIG_TEGRA2) || defined(CONFIG_MICROBLAZE)
Quoted 5 lines
Quoted 1 line

Am I the only one that thinks this is all really ugly?

I hope you mean serial.h not mb code.

I agree with you but not sure if we can remove all ifdefs there.

The long list of device specific ifdef's should be converted into a single ifdef testing for a specific feature instead.

Best regards,

Wolfgang Denk

Signature · 6 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
"He only drinks when he gets depressed." "Why does he get depressed?"
"Sometimes it's because he hasn't had a drink."
                                     - Terry Pratchett, _Men at Arms_
#5 lore raw

PATCH 1/1 microblaze: Enable SERIAL_MULTI

Quoted 7 lines · On Monday 10 October 2011 08:57:28 Wolfgang Denk wrote:
Quoted 6 lines · Michal Simek
Quoted 6 lines
Quoted 5 lines
     defined(CONFIG_MB86R0x) || defined(CONFIG_MPC5xxx) || \
     defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) || \
     defined(CONFIG_MPC86xx) || defined(CONFIG_SYS_SC520) || \
include/serial.h +1 -1
-    defined(CONFIG_TEGRA2)
+    defined(CONFIG_TEGRA2) || defined(CONFIG_MICROBLAZE)
Quoted 8 lines
Quoted 5 lines
Quoted 1 line

Am I the only one that thinks this is all really ugly?

I hope you mean serial.h not mb code.

I agree with you but not sure if we can remove all ifdefs there.

The long list of device specific ifdef's should be converted into a single ifdef testing for a specific feature instead.

it's driver specific code in this file, so it doesn't make much sense to have the board config define something just to get these prototypes

i do agree that this multi serial code is all very ugly ...
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111010/45ae8963/attachment.pgp

#6 lore raw

PATCH 1/1 microblaze: Enable SERIAL_MULTI

Dear Mike Frysinger,

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

include/serial.h extern struct serial_device * default_serial_console (void); · line 34

Quoted 6 lines
     defined(CONFIG_MB86R0x) || defined(CONFIG_MPC5xxx) || \
     defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) || \
     defined(CONFIG_MPC86xx) || defined(CONFIG_SYS_SC520) || \
include/serial.h +1 -1
-    defined(CONFIG_TEGRA2)
+    defined(CONFIG_TEGRA2) || defined(CONFIG_MICROBLAZE)

Am I the only one that thinks this is all really ugly?

I hope you mean serial.h not mb code.

Quoted 7 lines
Quoted 4 lines
Quoted 1 line

I agree with you but not sure if we can remove all ifdefs there.

The long list of device specific ifdef's should be converted into a single ifdef testing for a specific feature instead.

it's driver specific code in this file, so it doesn't make much sense to have the board config define something just to get these prototypes

It could be a CPU specific header file, then.

Best regards,

Wolfgang Denk

Signature · 4 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
"Deliver yesterday, code today, think tomorrow."
#7 lore raw

PATCH 1/1 microblaze: Enable SERIAL_MULTI

Quoted 14 lines · On Monday 10 October 2011 13:35:13 Wolfgang Denk wrote:
Quoted 13 lines · Mike Frysinger
Quoted 13 lines
Quoted 12 lines
Quoted 8 lines

include/serial.h extern struct serial_device * default_serial_console (void); · line 34

Quoted 6 lines
     defined(CONFIG_MB86R0x) || defined(CONFIG_MPC5xxx) || \
     defined(CONFIG_MPC83xx) || defined(CONFIG_MPC85xx) || \
     defined(CONFIG_MPC86xx) || defined(CONFIG_SYS_SC520) || \
include/serial.h +1 -1
-    defined(CONFIG_TEGRA2)
+    defined(CONFIG_TEGRA2) || defined(CONFIG_MICROBLAZE)

Am I the only one that thinks this is all really ugly?

I hope you mean serial.h not mb code.

I agree with you but not sure if we can remove all ifdefs there.

Quoted 7 lines
Quoted 5 lines
Quoted 2 lines

The long list of device specific ifdef's should be converted into a single ifdef testing for a specific feature instead.

it's driver specific code in this file, so it doesn't make much sense to have the board config define something just to get these prototypes

It could be a CPU specific header file, then.

some of these drivers are shared across SoCs/arches :)
-mike
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 836 bytes
Desc: This is a digitally signed message part.
Url : http://lists.denx.de/pipermail/u-boot/attachments/20111010/368a1b28/attachment.pgp

#8 lore raw

PATCH 1/1 microblaze: Enable SERIAL_MULTI

Dear Mike Frysinger,

Quoted 7 lines · In message <[email protected]> you wrote:
Quoted 5 lines
Quoted 3 lines

it's driver specific code in this file, so it doesn't make much sense to have the board config define something just to get these prototypes

It could be a CPU specific header file, then.

some of these drivers are shared across SoCs/arches :)

So put the #define in the CPU specific header files for all SoCs/arches that use this driver :-)

Best regards,

Wolfgang Denk

Signature · 4 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
On a clear disk you can seek forever.