zynqmp: add support for multi console interface
authorAmbroise Vincent <[email protected]>
Wed, 29 May 2019 10:46:08 +0000 (11:46 +0100)
committerSiva Durga Prasad Paladugu <[email protected]>
Mon, 1 Jul 2019 06:05:34 +0000 (11:35 +0530)
This patch addds multi console interface for ZynqMP
platform

Change-Id: I508a61412df2b71d04bca6a1139c8f32cbd7dccd
Signed-off-by: Ambroise Vincent <[email protected]>
Signed-off-by: Siva Durga Prasad Paladugu <[email protected]>
Tested-by: Siva Durga Prasad Paladugu <[email protected]>
plat/xilinx/zynqmp/aarch64/zynqmp_helpers.S
plat/xilinx/zynqmp/bl31_zynqmp_setup.c
plat/xilinx/zynqmp/include/plat_private.h
plat/xilinx/zynqmp/platform.mk
plat/xilinx/zynqmp/tsp/tsp_plat_setup.c

index 8d81665387b2ab476b11728eebe25a5a1cfc507a..beba6640583923561a873840e2a453abbfdb0d5c 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -90,7 +90,7 @@ func plat_crash_console_init
        mov_imm x0, ZYNQMP_CRASH_UART_BASE
        mov_imm x1, ZYNQMP_CRASH_UART_CLK_IN_HZ
        mov_imm x2, ZYNQMP_UART_BAUDRATE
-       b       console_core_init
+       b       console_cdns_core_init
 endfunc plat_crash_console_init
 
        /* ---------------------------------------------
@@ -102,7 +102,7 @@ endfunc plat_crash_console_init
         */
 func plat_crash_console_putc
        mov_imm x1, ZYNQMP_CRASH_UART_BASE
-       b       console_core_putc
+       b       console_cdns_core_putc
 endfunc plat_crash_console_putc
 
        /* ---------------------------------------------
@@ -115,7 +115,7 @@ endfunc plat_crash_console_putc
         */
 func plat_crash_console_flush
        mov_imm x0, ZYNQMP_CRASH_UART_BASE
-       b       console_core_flush
+       b       console_cdns_core_flush
 endfunc plat_crash_console_flush
 
        /* ---------------------------------------------------------------------
index 0d0b991aeebfeff2b4c09296824d0e9e8877d902..285a4eb8bd087181ea29f51157265f296f041a6e 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -57,9 +57,14 @@ static inline void bl31_set_default_config(void)
 void bl31_early_platform_setup2(u_register_t arg0, u_register_t arg1,
                                u_register_t arg2, u_register_t arg3)
 {
-       /* Initialize the console to provide early debug support */
-       console_init(ZYNQMP_UART_BASE, zynqmp_get_uart_clk(),
-                    ZYNQMP_UART_BAUDRATE);
+       /* Register the console to provide early debug support */
+       static console_cdns_t bl31_boot_console;
+       (void)console_cdns_register(ZYNQMP_UART_BASE,
+                                      zynqmp_get_uart_clk(),
+                                      ZYNQMP_UART_BAUDRATE,
+                                      &bl31_boot_console);
+       console_set_scope(&bl31_boot_console.console,
+                         CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_BOOT);
 
        /* Initialize the platform config for future decision making */
        zynqmp_config_setup();
index 99d0bc673278ee095f3353b115f53d3b872cbe24..8bdf4296771f9ad455aa77a605b81ffe440ac0f9 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2014-2019, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
@@ -11,6 +11,7 @@
 
 #include <bl31/interrupt_mgmt.h>
 #include <common/bl_common.h>
+#include <drivers/cadence/cdns_uart.h>
 
 void zynqmp_config_setup(void);
 
index b2f91cd8e0df90aeb688b9192e931be4ec7b40a6..bd7bc08da3436c4a9b6d2706ae93facc01a04e53 100644 (file)
@@ -1,5 +1,5 @@
 #
-# Copyright (c) 2013-2018, ARM Limited and Contributors. All rights reserved.
+# Copyright (c) 2013-2019, ARM Limited and Contributors. All rights reserved.
 #
 # SPDX-License-Identifier: BSD-3-Clause
 
@@ -59,7 +59,6 @@ PLAT_BL_COMMON_SOURCES        :=      lib/xlat_tables/xlat_tables_common.c            \
                                drivers/arm/gic/v2/gicv2_main.c                 \
                                drivers/arm/gic/v2/gicv2_helpers.c              \
                                drivers/cadence/uart/aarch64/cdns_console.S     \
-                               drivers/console/aarch64/console.S               \
                                plat/arm/common/arm_cci.c                       \
                                plat/arm/common/arm_common.c                    \
                                plat/arm/common/arm_gicv2.c                     \
index e3d4164d492ad3325d59b518b12227e56ab2d2c7..7f0ac74cfbe789f2886a2e535a5516db145dd6f2 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014-2018, ARM Limited and Contributors. All rights reserved.
+ * Copyright (c) 2014-2019, ARM Limited and Contributors. All rights reserved.
  *
  * SPDX-License-Identifier: BSD-3-Clause
  */
 void tsp_early_platform_setup(void)
 {
        /*
-        * Initialize a different console than already in use to display
+        * Register a different console than already in use to display
         * messages from TSP
         */
-       console_init(ZYNQMP_UART_BASE, zynqmp_get_uart_clk(),
-                    ZYNQMP_UART_BAUDRATE);
+       static console_cdns_t tsp_boot_console;
+       (void)console_cdns_register(ZYNQMP_UART_BASE,
+                                      zynqmp_get_uart_clk(),
+                                      ZYNQMP_UART_BAUDRATE,
+                                      &tsp_boot_console);
+       console_set_scope(&tsp_boot_console.console,
+                         CONSOLE_FLAG_RUNTIME | CONSOLE_FLAG_BOOT);
 
        /* Initialize the platform config for future decision making */
        zynqmp_config_setup();