1 // SPDX-License-Identifier: GPL-2.0+
3 * (C) Copyright 2014 - 2017 Xilinx, Inc. Michal Simek
6 #include <debug_uart.h>
10 #include <generated/dt.h>
14 #include <asm/arch/hardware.h>
15 #include <asm/arch/sys_proto.h>
16 #include <asm/arch/ps7_init_gpl.h>
18 void board_init_f(ulong dummy)
24 #ifdef CONFIG_DEBUG_UART
25 /* Uart debug for sure */
27 puts("Debug uart enabled\n"); /* or printch() */
31 #ifdef CONFIG_SPL_BOARD_INIT
32 void spl_board_init(void)
34 preloader_console_init();
35 #if defined(CONFIG_ARCH_EARLY_INIT_R) && defined(CONFIG_SPL_FPGA_SUPPORT)
42 u32 spl_boot_device(void)
46 switch ((zynq_slcr_get_boot_mode()) & ZYNQ_BM_MASK) {
47 #ifdef CONFIG_SPL_SPI_SUPPORT
49 mode = BOOT_DEVICE_SPI;
53 mode = BOOT_DEVICE_NAND;
56 mode = BOOT_DEVICE_NOR;
58 #ifdef CONFIG_SPL_MMC_SUPPORT
60 mode = BOOT_DEVICE_MMC1;
64 mode = BOOT_DEVICE_RAM;
67 puts("Unsupported boot mode selected\n");
74 #ifdef CONFIG_SPL_OS_BOOT
75 int spl_start_uboot(void)
82 void spl_board_prepare_for_boot(void)
88 #ifdef CONFIG_SPL_LOAD_FIT
89 int board_fit_config_name_match(const char *name)
91 /* Just empty function now - can't decide what to choose */
92 debug("%s: Check %s, default %s\n", __func__, name, DEVICE_TREE);
94 if (!strcmp(name, DEVICE_TREE))