refactor(xilinx): console registration through console holder structure

Refactored register_console using console holder structure as
input. Structure holds console scope and console type as additional
members. These modifications enhance code readability and
maintainability, contributing to a clearer and more sustainable
codebase for future development.

Change-Id: I7fcc1accfdecdacc205d427a80031536c456638e
Signed-off-by: Maheedhar Bollapalli <MaheedharSai.Bollapalli@amd.com>
diff --git a/plat/xilinx/common/include/plat_console.h b/plat/xilinx/common/include/plat_console.h
index b38f347..9f212ec 100644
--- a/plat/xilinx/common/include/plat_console.h
+++ b/plat/xilinx/common/include/plat_console.h
@@ -8,24 +8,31 @@
 #define PLAT_DT_UART_H
 
 #define DT_UART_DCC_COMPAT	"arm,dcc"
+#define DT_UART_CAD_COMPAT	"xlnx,zynqmp-uart"
+#define DT_UART_PL011_COMPAT	"arm,pl011"
 
-#if defined(PLAT_zynqmp)
-#define DT_UART_COMPAT	"xlnx,zynqmp-uart"
-#else
-#define DT_UART_COMPAT	"arm,pl011"
-#endif
-
-/*Default console type is either CADENCE0 or CADENCE1 or PL011_0 or PL011_1
+/* Default console type is either CADENCE0 or CADENCE1 or PL011_0 or PL011_1
  * Debug console type is DCC
- **/
-#define PLAT_XLNX_CONSOLE_TYPE_DEFAULT 0
-#define PLAT_XLNX_CONSOLE_TYPE_DEBUG   1
+ */
+#define CONSOLE_CDNS	0
+#define CONSOLE_PL011   1
+#define CONSOLE_DCC	2
+
+typedef struct console_hd {
+	uint8_t console_state;
+	uint32_t clk;
+	uint32_t baud_rate;
+	uintptr_t base;
+	uint32_t console_scope;
+	uint8_t console_type;
+} console_holder;
 
 typedef struct dt_uart_info_s {
 	char compatible[30];
 	uintptr_t base;
 	uint32_t baud_rate;
 	int32_t status;
+	uint8_t console_type;
 } dt_uart_info_t;
 
 void setup_console(void);