fix(xilinx): dcc to support runtime console scope
DCC driver to support boot and runtime console scope
switch for dedicated boot and runtime consoles.
Change-Id: I7769dc44860a5fda99ca42ce17a3a6009288d7e7
Signed-off-by: Maheedhar Bollapalli <MaheedharSai.Bollapalli@amd.com>
diff --git a/plat/amd/versal2/bl31_setup.c b/plat/amd/versal2/bl31_setup.c
index e878863..42cd5c0 100644
--- a/plat/amd/versal2/bl31_setup.c
+++ b/plat/amd/versal2/bl31_setup.c
@@ -76,6 +76,7 @@
{
uint32_t uart_clock;
int32_t rc;
+ static console_t _runtime_console;
board_detection();
@@ -122,7 +123,6 @@
uart_clock = get_uart_clk();
if (CONSOLE_IS(pl011_0) || CONSOLE_IS(pl011_1)) {
- static console_t _runtime_console;
/* Initialize the console to provide early debug support */
rc = console_pl011_register(UART_BASE, uart_clock,
@@ -138,7 +138,7 @@
/* Initialize the dcc console for debug.
* dcc is over jtag and does not configures uart0 or uart1.
*/
- rc = console_dcc_register();
+ rc = console_dcc_register(&_runtime_console);
if (rc == 0) {
panic();
}
diff --git a/plat/xilinx/common/plat_console.c b/plat/xilinx/common/plat_console.c
index f3dd3a7..610c84f 100644
--- a/plat/xilinx/common/plat_console.c
+++ b/plat/xilinx/common/plat_console.c
@@ -212,7 +212,7 @@
static void console_end(console_t *console)
{
if (CONSOLE_IS(dcc)) {
- console_dcc_unregister();
+ console_dcc_unregister(console);
} else {
if (console != NULL) {
console_flush();
@@ -293,7 +293,7 @@
*/
static void handle_dcc_console(console_t *console)
{
- int32_t rc = console_dcc_register();
+ int32_t rc = console_dcc_register(console);
if (rc == 0) {
panic();
@@ -377,7 +377,7 @@
#endif
if (CONSOLE_IS(dcc)) {
/* Initialize the dcc console for debug */
- rc = console_dcc_register();
+ rc = console_dcc_register(&boot_console);
if (rc == 0) {
panic();
}