Initialise UART console in all bootloader stages
This patch reworks the console driver to ensure that each bootloader stage
initializes it independently. As a result, both BL3-1 and BL2 platform code
now calls console_init() instead of relying on BL1 to perform console setup
Fixes ARM-software/tf-issues#120
Change-Id: Ic4d66e0375e40a2fc7434afcabc8bbb4715c14ab
diff --git a/plat/fvp/bl2_plat_setup.c b/plat/fvp/bl2_plat_setup.c
index f0d6e44..4d57ed5 100644
--- a/plat/fvp/bl2_plat_setup.c
+++ b/plat/fvp/bl2_plat_setup.c
@@ -33,6 +33,7 @@
#include <platform.h>
#include <bl2.h>
#include <bl_common.h>
+#include <console.h>
/*******************************************************************************
* Declarations of linker defined symbols which will help us find the layout
@@ -110,6 +111,8 @@
/* Initialize the platform config for future decision making */
platform_config_setup();
+ console_init(PL011_UART0_BASE);
+
return;
}
diff --git a/plat/fvp/bl31_plat_setup.c b/plat/fvp/bl31_plat_setup.c
index 1b24687..eb137e0 100644
--- a/plat/fvp/bl31_plat_setup.c
+++ b/plat/fvp/bl31_plat_setup.c
@@ -32,6 +32,7 @@
#include <fvp_pwrc.h>
#include <assert.h>
#include <arch_helpers.h>
+#include <console.h>
/*******************************************************************************
* Declarations of linker defined symbols which will help us find the layout
@@ -117,6 +118,8 @@
/* Initialize the platform config for future decision making */
platform_config_setup();
+
+ console_init(PL011_UART0_BASE);
}
/*******************************************************************************