aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSandrine Bailleux <sandrine.bailleux@arm.com>2014-02-21 14:16:16 +0000
committerDan Handley <dan.handley@arm.com>2014-02-26 19:53:48 +0000
commit20d284c08d81c288c821ba6878d005dd89c6cfaa (patch)
treeec58d6ac65b8a51669f8dd2d5933ea6d5cec140c
parent090630e4bcb5a4266a8a6c4ae50e567efa5db83e (diff)
fvp: Initialise UART earlier
The UART used to be initialised in bl1_platform_setup(). This is too late because there are some calls to the assert() macro, which needs to print some messages on the console, before that. This patch moves the UART initialisation code to bl1_early_platform_setup(). Fixes ARM-software/tf-issues#49 Change-Id: I98c83a803866372806d2a9c2e1ed80f2ef5b3bcc
-rw-r--r--docs/porting-guide.md4
-rw-r--r--plat/fvp/bl1_plat_setup.c8
2 files changed, 5 insertions, 7 deletions
diff --git a/docs/porting-guide.md b/docs/porting-guide.md
index 460dbcc..c9e4a50 100644
--- a/docs/porting-guide.md
+++ b/docs/porting-guide.md
@@ -446,8 +446,8 @@ This function executes with the MMU and data caches enabled. It is responsible
for performing any remaining platform-specific setup that can occur after the
MMU and data cache have been enabled.
-In the ARM FVP port, it zeros out the ZI section, enables the system level
-implementation of the generic timer counter and initializes the console.
+In the ARM FVP port, it zeros out the ZI section and enables the system level
+implementation of the generic timer counter.
This function is also responsible for initializing the storage abstraction layer
which is used to load further bootloader images.
diff --git a/plat/fvp/bl1_plat_setup.c b/plat/fvp/bl1_plat_setup.c
index 1cee705..d4fd81b 100644
--- a/plat/fvp/bl1_plat_setup.c
+++ b/plat/fvp/bl1_plat_setup.c
@@ -100,6 +100,9 @@ void bl1_early_platform_setup(void)
/* Initialize the platform config for future decision making */
platform_config_setup();
+
+ /* Initialize the console */
+ console_init(PL011_UART0_BASE);
}
/*******************************************************************************
@@ -114,11 +117,6 @@ void bl1_platform_setup(void)
/* Enable and initialize the System level generic timer */
mmio_write_32(SYS_CNTCTL_BASE + CNTCR_OFF, CNTCR_EN);
-
- /* Initialize the console */
- console_init(PL011_UART0_BASE);
-
- return;
}