2 * (C) Copyright 2014 Xilinx, Inc. Michal Simek
4 * SPDX-License-Identifier: GPL-2.0+
7 #include <debug_uart.h>
12 #include <asm/arch/hardware.h>
13 #include <asm/arch/sys_proto.h>
15 DECLARE_GLOBAL_DATA_PTR;
17 void board_init_f(ulong dummy)
23 * The debug UART can be used from this point:
29 #ifdef CONFIG_SPL_BOARD_INIT
30 void spl_board_init(void)
32 preloader_console_init();
37 u32 spl_boot_device(void)
41 switch ((zynq_slcr_get_boot_mode()) & ZYNQ_BM_MASK) {
42 #ifdef CONFIG_SPL_SPI_SUPPORT
45 mode = BOOT_DEVICE_SPI;
49 mode = BOOT_DEVICE_NAND;
52 mode = BOOT_DEVICE_NOR;
54 #ifdef CONFIG_SPL_MMC_SUPPORT
57 mode = BOOT_DEVICE_MMC1;
61 mode = BOOT_DEVICE_RAM;
64 puts("Unsupported boot mode selected\n");
71 #ifdef CONFIG_SPL_MMC_SUPPORT
72 u32 spl_boot_mode(const u32 boot_device)
78 #ifdef CONFIG_SPL_OS_BOOT
79 int spl_start_uboot(void)
86 __weak void ps7_init(void)
89 * This function is overridden by the one in
90 * board/xilinx/zynq/(platform)/ps7_init_gpl.c, if it exists.
94 __weak int ps7_post_config(void)
97 * This function is overridden by the one in
98 * board/xilinx/zynq/(platform)/ps7_init_gpl.c, if it exists.
103 void spl_board_prepare_for_boot(void)
109 #ifdef CONFIG_SPL_LOAD_FIT
110 int board_fit_config_name_match(const char *name)
112 /* Just empty function now - can't decide what to choose */
113 debug("%s: %s\n", __func__, name);