aboutsummaryrefslogtreecommitdiff
path: root/board/xilinx/zynqmp/zynqmp.c
diff options
context:
space:
mode:
Diffstat (limited to 'board/xilinx/zynqmp/zynqmp.c')
-rw-r--r--board/xilinx/zynqmp/zynqmp.c46
1 files changed, 37 insertions, 9 deletions
diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c
index 2b5239c..70b3c81 100644
--- a/board/xilinx/zynqmp/zynqmp.c
+++ b/board/xilinx/zynqmp/zynqmp.c
@@ -313,9 +313,8 @@ static char *zynqmp_get_silicon_idcode_name(void)
}
#endif
-int board_early_init_f(void)
+int __maybe_unused psu_uboot_init(void)
{
-#if defined(CONFIG_ZYNQMP_PSU_INIT_ENABLED)
int ret;
ret = psu_init();
@@ -335,16 +334,31 @@ int board_early_init_f(void)
/* Delay is required for clocks to be propagated */
udelay(1000000);
-#endif
+
+ return 0;
+}
-#ifdef CONFIG_DEBUG_UART
- /* Uart debug for sure */
- debug_uart_init();
- puts("Debug uart enabled\n"); /* or printch() */
-#endif
+#if !defined(CONFIG_SPL_BUILD)
+# if defined(CONFIG_DEBUG_UART_BOARD_INIT)
+void board_debug_uart_init(void)
+{
+# if defined(CONFIG_ZYNQMP_PSU_INIT_ENABLED)
+ psu_uboot_init();
+# endif
+}
+# endif
- return 0;
+# if defined(CONFIG_BOARD_EARLY_INIT_F)
+int board_early_init_f(void)
+{
+ int ret = 0;
+# if defined(CONFIG_ZYNQMP_PSU_INIT_ENABLED) && !defined(CONFIG_DEBUG_UART_BOARD_INIT)
+ ret = psu_uboot_init();
+# endif
+ return ret;
}
+# endif
+#endif
static int multi_boot(void)
{
@@ -373,6 +387,18 @@ static void restore_jtag(void)
}
#endif
+static void print_secure_boot(void)
+{
+ u32 status = 0;
+
+ if (zynqmp_mmio_read((ulong)&csu_base->status, &status))
+ return;
+
+ printf("Secure Boot:\t%sauthenticated, %sencrypted\n",
+ status & ZYNQMP_CSU_STATUS_AUTHENTICATED ? "" : "not ",
+ status & ZYNQMP_CSU_STATUS_ENCRYPTED ? "" : "not ");
+}
+
#define PS_SYSMON_ANALOG_BUS_VAL 0x3210
#define PS_SYSMON_ANALOG_BUS_REG 0xFFA50914
@@ -413,6 +439,8 @@ int board_init(void)
fpga_add(fpga_xilinx, &zynqmppl);
#endif
+ /* display secure boot information */
+ print_secure_boot();
if (current_el() == 3)
printf("Multiboot:\t%d\n", multi_boot());