From mboxrd@z Thu Jan 1 00:00:00 1970 From: Michal Simek Date: Mon, 10 Oct 2011 12:52:20 +0200 Subject: [U-Boot] [PATCH] microblaze: Enable SERIAL_MULTI In-Reply-To: References: <1318231036-11639-1-git-send-email-monstr@monstr.eu> <1318231036-11639-2-git-send-email-monstr@monstr.eu> Message-ID: <4E92CE64.5000609@monstr.eu> List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Graeme Russ wrote: > On 10/10/11, Michal Simek wrote: >> Enable support for SERIAL_MULTI. >> >> Microblaze can use uart16550 and uartlite drivers. >> >> Signed-off-by: Michal Simek >> >> --- >> 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(-) >> >> diff --git a/arch/microblaze/lib/board.c b/arch/microblaze/lib/board.c >> index ca5882d..64089c8 100644 >> --- a/arch/microblaze/lib/board.c >> +++ b/arch/microblaze/lib/board.c >> @@ -32,6 +32,7 @@ >> #include >> #include >> #include >> +#include >> >> 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 >> diff --git a/include/configs/microblaze-generic.h >> b/include/configs/microblaze-generic.h >> index 6b3fd76..89657189 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) > > 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 -- 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