Ensure a console is initialized before it is used

This patch moves console_init() to bl32_early_platform_setup(). It
also ensures that console_init() is called in each
blX_early_platform_setup() function before the console is used
e.g. through a printf call in an assert() statement.

Fixes ARM-software/TF-issues#127

Change-Id: I5b1f17e0152bab674d807d2a95ff3689c5d4794e
diff --git a/plat/fvp/bl2_plat_setup.c b/plat/fvp/bl2_plat_setup.c
index a4960aa..4c649eb 100644
--- a/plat/fvp/bl2_plat_setup.c
+++ b/plat/fvp/bl2_plat_setup.c
@@ -100,6 +100,9 @@
 void bl2_early_platform_setup(meminfo_t *mem_layout,
 			      void *data)
 {
+	/* Initialize the console to provide early debug support */
+	console_init(PL011_UART0_BASE);
+
 	/* Setup the BL2 memory layout */
 	bl2_tzram_layout.total_base = mem_layout->total_base;
 	bl2_tzram_layout.total_size = mem_layout->total_size;
@@ -110,10 +113,6 @@
 
 	/* Initialize the platform config for future decision making */
 	platform_config_setup();
-
-	console_init(PL011_UART0_BASE);
-
-	return;
 }
 
 /*******************************************************************************