diff options
author | Antonio Niño Díaz <antonio.ninodiaz@arm.com> | 2018-11-12 11:40:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-11-12 11:40:11 +0100 |
commit | 91ece4e2c8ea39620c5a3bc0273494606a9a1d85 (patch) | |
tree | c8e70d7a3a659ad8c71520bf72bfee2993f64a32 /plat/hisilicon/poplar | |
parent | e07666de14c7515957639dab5b49f5d6cb513614 (diff) | |
parent | 5c58c8b1ee81b5f5e4565ae4c14f777d283227c1 (diff) |
Merge pull request #1674 from jforissier/hisi-multi-console
hikey, hikey960, poplar: use new console APIs
Diffstat (limited to 'plat/hisilicon/poplar')
-rw-r--r-- | plat/hisilicon/poplar/bl1_plat_setup.c | 6 | ||||
-rw-r--r-- | plat/hisilicon/poplar/bl2_plat_setup.c | 6 | ||||
-rw-r--r-- | plat/hisilicon/poplar/bl31_plat_setup.c | 6 | ||||
-rw-r--r-- | plat/hisilicon/poplar/plat_pm.c | 1 | ||||
-rw-r--r-- | plat/hisilicon/poplar/platform.mk | 2 |
5 files changed, 13 insertions, 8 deletions
diff --git a/plat/hisilicon/poplar/bl1_plat_setup.c b/plat/hisilicon/poplar/bl1_plat_setup.c index c2adc44e..d0b12ad2 100644 --- a/plat/hisilicon/poplar/bl1_plat_setup.c +++ b/plat/hisilicon/poplar/bl1_plat_setup.c @@ -7,13 +7,13 @@ #include <arch_helpers.h> #include <assert.h> #include <bl_common.h> -#include <console.h> #include <debug.h> #include <dw_mmc.h> #include <errno.h> #include <generic_delay_timer.h> #include <mmc.h> #include <mmio.h> +#include <pl011.h> #include <pl061_gpio.h> #include <platform.h> #include <platform_def.h> @@ -26,6 +26,7 @@ /* Data structure which holds the extents of the trusted RAM for BL1 */ static meminfo_t bl1_tzram_layout; static meminfo_t bl2_tzram_layout; +static console_pl011_t console; /* * Cannot use default weak implementation in bl1_main.c because BL1 RW data is @@ -62,7 +63,8 @@ int bl1_plat_handle_post_image_load(unsigned int image_id) void bl1_early_platform_setup(void) { /* Initialize the console to provide early debug support */ - console_init(PL011_UART0_BASE, PL011_UART0_CLK_IN_HZ, PL011_BAUDRATE); + console_pl011_register(PL011_UART0_BASE, PL011_UART0_CLK_IN_HZ, + PL011_BAUDRATE, &console); /* Allow BL1 to see the whole Trusted RAM */ bl1_tzram_layout.total_base = BL1_RW_BASE; diff --git a/plat/hisilicon/poplar/bl2_plat_setup.c b/plat/hisilicon/poplar/bl2_plat_setup.c index a253d3fc..3a3ed6a4 100644 --- a/plat/hisilicon/poplar/bl2_plat_setup.c +++ b/plat/hisilicon/poplar/bl2_plat_setup.c @@ -7,7 +7,6 @@ #include <arch_helpers.h> #include <assert.h> #include <bl_common.h> -#include <console.h> #include <debug.h> #include <desc_image_load.h> #include <dw_mmc.h> @@ -17,6 +16,7 @@ #include <mmio.h> #include <optee_utils.h> #include <partition/partition.h> +#include <pl011.h> #include <platform.h> #include <string.h> #include "hi3798cv200.h" @@ -31,6 +31,7 @@ #define BL2_COHERENT_RAM_LIMIT (unsigned long)(&__COHERENT_RAM_END__) static meminfo_t bl2_tzram_layout __aligned(CACHE_WRITEBACK_GRANULE); +static console_pl011_t console; /******************************************************************************* * Transfer SCP_BL2 from Trusted RAM using the SCP Download protocol. @@ -181,7 +182,8 @@ void bl2_early_platform_setup2(u_register_t arg0, u_register_t arg1, dw_mmc_params_t params = EMMC_INIT_PARAMS(POPLAR_EMMC_DESC_BASE); #endif - console_init(PL011_UART0_BASE, PL011_UART0_CLK_IN_HZ, PL011_BAUDRATE); + console_pl011_register(PL011_UART0_BASE, PL011_UART0_CLK_IN_HZ, + PL011_BAUDRATE, &console); /* Enable arch timer */ generic_delay_timer_init(); diff --git a/plat/hisilicon/poplar/bl31_plat_setup.c b/plat/hisilicon/poplar/bl31_plat_setup.c index 20a613d5..e2079f9e 100644 --- a/plat/hisilicon/poplar/bl31_plat_setup.c +++ b/plat/hisilicon/poplar/bl31_plat_setup.c @@ -9,12 +9,12 @@ #include <assert.h> #include <bl31.h> #include <bl_common.h> -#include <console.h> #include <cortex_a53.h> #include <debug.h> #include <errno.h> #include <generic_delay_timer.h> #include <mmio.h> +#include <pl011.h> #include <platform.h> #include <platform_def.h> #include <stddef.h> @@ -34,6 +34,7 @@ static entry_point_info_t bl32_image_ep_info; static entry_point_info_t bl33_image_ep_info; +static console_pl011_t console; static void hisi_tzpc_sec_init(void) { @@ -72,7 +73,8 @@ void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1, from_bl2 = (void *) arg0; - console_init(PL011_UART0_BASE, PL011_UART0_CLK_IN_HZ, PL011_BAUDRATE); + console_pl011_register(PL011_UART0_BASE, PL011_UART0_CLK_IN_HZ, + PL011_BAUDRATE, &console); /* Init console for crash report */ plat_crash_console_init(); diff --git a/plat/hisilicon/poplar/plat_pm.c b/plat/hisilicon/poplar/plat_pm.c index dcbcec4a..eccb0b0d 100644 --- a/plat/hisilicon/poplar/plat_pm.c +++ b/plat/hisilicon/poplar/plat_pm.c @@ -7,7 +7,6 @@ #include <arch_helpers.h> #include <assert.h> #include <bl_common.h> -#include <console.h> #include <context.h> #include <context_mgmt.h> #include <debug.h> diff --git a/plat/hisilicon/poplar/platform.mk b/plat/hisilicon/poplar/platform.mk index de262adc..0aaa7074 100644 --- a/plat/hisilicon/poplar/platform.mk +++ b/plat/hisilicon/poplar/platform.mk @@ -46,7 +46,7 @@ ERRATA_A53_855873 := 1 ERRATA_A53_835769 := 1 ERRATA_A53_843419 := 1 ENABLE_SVE_FOR_NS := 0 - +MULTI_CONSOLE_API := 1 WORKAROUND_CVE_2017_5715 := 0 PLAT_PL061_MAX_GPIOS := 104 |