1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2014 - 2017 Xilinx, Inc. Michal Simek
6 #include <debug_uart.h>
12 #include <generated/dt.h>
16 #include <asm/arch/hardware.h>
17 #include <asm/arch/sys_proto.h>
18 #include <asm/arch/ps7_init_gpl.h>
20 void board_init_f(ulong dummy)
26 #ifdef CONFIG_DEBUG_UART
27 /* Uart debug for sure */
29 puts("Debug uart enabled\n"); /* or printch() */
33 #ifdef CONFIG_SPL_BOARD_INIT
34 void spl_board_init(void)
36 preloader_console_init();
37 #if defined(CONFIG_ARCH_EARLY_INIT_R) && defined(CONFIG_SPL_FPGA_SUPPORT)
44 u32 spl_boot_device(void)
48 switch ((zynq_slcr_get_boot_mode()) & ZYNQ_BM_MASK) {
49 #ifdef CONFIG_SPL_SPI_SUPPORT
51 mode = BOOT_DEVICE_SPI;
55 mode = BOOT_DEVICE_NAND;
58 mode = BOOT_DEVICE_NOR;
60 #ifdef CONFIG_SPL_MMC_SUPPORT
62 mode = BOOT_DEVICE_MMC1;
66 mode = BOOT_DEVICE_RAM;
69 puts("Unsupported boot mode selected\n");
76 #ifdef CONFIG_SPL_OS_BOOT
77 int spl_start_uboot(void)
84 void spl_board_prepare_for_boot(void)
90 #ifdef CONFIG_SPL_LOAD_FIT
91 int board_fit_config_name_match(const char *name)
93 /* Just empty function now - can't decide what to choose */
94 debug("%s: Check %s, default %s\n", __func__, name, DEVICE_TREE);
96 if (!strcmp(name, DEVICE_TREE))