2 * Copyright 2015 - 2016 Xilinx, Inc.
4 * Michal Simek <michal.simek@xilinx.com>
6 * SPDX-License-Identifier: GPL-2.0+
10 #include <debug_uart.h>
15 #include <asm/arch/hardware.h>
16 #include <asm/arch/sys_proto.h>
18 void board_init_f(ulong dummy)
23 #ifdef CONFIG_DEBUG_UART
24 /* Uart debug for sure */
26 puts("Debug uart enabled\n"); /* or printch() */
28 /* Delay is required for clocks to be propagated */
32 memset(__bss_start, 0, __bss_end - __bss_start);
34 /* No need to call timer init - it is empty for ZynqMP */
35 board_init_r(NULL, 0);
38 #ifdef CONFIG_SPL_BOARD_INIT
39 void spl_board_init(void)
41 preloader_console_init();
46 u32 spl_boot_device(void)
51 #if defined(CONFIG_SPL_ZYNQMP_ALT_BOOTMODE_ENABLED)
52 /* Change default boot mode at run-time */
53 writel(BOOT_MODE_USE_ALT |
54 CONFIG_SPL_ZYNQMP_ALT_BOOTMODE << BOOT_MODE_ALT_SHIFT,
55 &crlapb_base->boot_mode);
58 reg = readl(&crlapb_base->boot_mode);
59 bootmode = reg & BOOT_MODES_MASK;
63 return BOOT_DEVICE_RAM;
64 #ifdef CONFIG_SPL_MMC_SUPPORT
68 return BOOT_DEVICE_MMC1;
71 printf("Invalid Boot Mode:0x%x\n", bootmode);
78 u32 spl_boot_mode(const u32 boot_device)
80 switch (spl_boot_device()) {
83 case BOOT_DEVICE_MMC1:
86 puts("spl: error: unsupported device\n");
91 __weak void psu_init(void)
94 * This function is overridden by the one in
95 * board/xilinx/zynqmp/(platform)/psu_init_gpl.c, if it exists.
99 #ifdef CONFIG_SPL_OS_BOOT
100 int spl_start_uboot(void)
106 #ifdef CONFIG_SPL_LOAD_FIT
107 int board_fit_config_name_match(const char *name)
109 /* Just empty function now - can't decide what to choose */
110 debug("%s: %s\n", __func__, name);