pl011: Add support in AArch32 for MULTI_CONSOLE_API
Allow AArch32 to use the multi console driver by adding the
required functions
Change-Id: I9e69f18965f320074cf75442d6b0de891aef7936
Signed-off-by: Daniel Boulby <daniel.boulby@arm.com>
diff --git a/plat/arm/common/aarch32/arm_helpers.S b/plat/arm/common/aarch32/arm_helpers.S
index c4cfa8a..badddd3 100644
--- a/plat/arm/common/aarch32/arm_helpers.S
+++ b/plat/arm/common/aarch32/arm_helpers.S
@@ -48,7 +48,7 @@
ldr r0, =PLAT_ARM_CRASH_UART_BASE
ldr r1, =PLAT_ARM_CRASH_UART_CLK_IN_HZ
ldr r2, =ARM_CONSOLE_BAUDRATE
- b console_core_init
+ b console_pl011_core_init
endfunc plat_crash_console_init
/* ---------------------------------------------
@@ -60,7 +60,7 @@
*/
func plat_crash_console_putc
ldr r1, =PLAT_ARM_CRASH_UART_BASE
- b console_core_putc
+ b console_pl011_core_putc
endfunc plat_crash_console_putc
/* ---------------------------------------------
@@ -73,5 +73,5 @@
*/
func plat_crash_console_flush
ldr r0, =PLAT_ARM_CRASH_UART_BASE
- b console_core_flush
+ b console_pl011_core_flush
endfunc plat_crash_console_flush
diff --git a/plat/arm/common/sp_min/arm_sp_min_setup.c b/plat/arm/common/sp_min/arm_sp_min_setup.c
index 10c1914..b8234c1 100644
--- a/plat/arm/common/sp_min/arm_sp_min_setup.c
+++ b/plat/arm/common/sp_min/arm_sp_min_setup.c
@@ -9,6 +9,7 @@
#include <console.h>
#include <debug.h>
#include <mmio.h>
+#include <pl011.h>
#include <plat_arm.h>
#include <platform.h>
#include <platform_def.h>
@@ -61,8 +62,7 @@
uintptr_t hw_config, void *plat_params_from_bl2)
{
/* Initialize the console to provide early debug support */
- console_init(PLAT_ARM_BOOT_UART_BASE, PLAT_ARM_BOOT_UART_CLK_IN_HZ,
- ARM_CONSOLE_BAUDRATE);
+ arm_console_boot_init();
#if RESET_TO_SP_MIN
/* There are no parameters from BL2 if SP_MIN is a reset vector */
@@ -152,8 +152,7 @@
void arm_sp_min_plat_runtime_setup(void)
{
/* Initialize the runtime console */
- console_init(PLAT_ARM_SP_MIN_RUN_UART_BASE,
- PLAT_ARM_SP_MIN_RUN_UART_CLK_IN_HZ, ARM_CONSOLE_BAUDRATE);
+ arm_console_runtime_init();
}
/*******************************************************************************
diff --git a/plat/common/aarch32/plat_sp_min_common.c b/plat/common/aarch32/plat_sp_min_common.c
index 67ae817..57559c8 100644
--- a/plat/common/aarch32/plat_sp_min_common.c
+++ b/plat/common/aarch32/plat_sp_min_common.c
@@ -21,7 +21,11 @@
* Finish the use of console driver in SP_MIN so that any runtime logs
* from SP_MIN will be suppressed.
*/
+#if MULTI_CONSOLE_API
+ console_switch_state(CONSOLE_FLAG_RUNTIME);
+#else
console_uninit();
+#endif
}
#if !ERROR_DEPRECATED