2 * Copyright 2014-2015 Freescale Semiconductor, Inc.
4 * SPDX-License-Identifier: GPL-2.0+
13 DECLARE_GLOBAL_DATA_PTR;
15 u32 spl_boot_device(void)
17 #ifdef CONFIG_SPL_MMC_SUPPORT
18 return BOOT_DEVICE_MMC1;
20 #ifdef CONFIG_SPL_NAND_SUPPORT
21 return BOOT_DEVICE_NAND;
26 u32 spl_boot_mode(const u32 boot_device)
28 switch (spl_boot_device()) {
29 case BOOT_DEVICE_MMC1:
30 #ifdef CONFIG_SPL_FAT_SUPPORT
33 return MMCSD_MODE_RAW;
35 case BOOT_DEVICE_NAND:
38 puts("spl: error: unsupported device\n");
43 #ifdef CONFIG_SPL_BUILD
44 void board_init_f(ulong dummy)
46 /* Clear global data */
47 memset((void *)gd, 0, sizeof(gd_t));
58 preloader_console_init();
60 #ifdef CONFIG_SPL_I2C_SUPPORT
66 memset(__bss_start, 0, __bss_end - __bss_start);
68 board_init_r(NULL, 0);