]>
git.ipfire.org Git - people/ms/u-boot.git/blob - arch/arm/cpu/armv8/fsl-layerscape/spl.c
2 * Copyright 2014-2015 Freescale Semiconductor, Inc.
4 * SPDX-License-Identifier: GPL-2.0+
14 DECLARE_GLOBAL_DATA_PTR
;
16 u32
spl_boot_device(void)
18 #ifdef CONFIG_SPL_MMC_SUPPORT
19 return BOOT_DEVICE_MMC1
;
21 #ifdef CONFIG_SPL_NAND_SUPPORT
22 return BOOT_DEVICE_NAND
;
27 u32
spl_boot_mode(const u32 boot_device
)
29 switch (spl_boot_device()) {
30 case BOOT_DEVICE_MMC1
:
31 #ifdef CONFIG_SPL_FAT_SUPPORT
34 return MMCSD_MODE_RAW
;
36 case BOOT_DEVICE_NAND
:
39 puts("spl: error: unsupported device\n");
44 #ifdef CONFIG_SPL_BUILD
45 void board_init_f(ulong dummy
)
47 /* Clear global data */
48 memset((void *)gd
, 0, sizeof(gd_t
));
59 preloader_console_init();
61 #ifdef CONFIG_SPL_I2C_SUPPORT
67 memset(__bss_start
, 0, __bss_end
- __bss_start
);
69 #ifdef CONFIG_LAYERSCAPE_NS_ACCESS
70 enable_layerscape_ns_access();
72 board_init_r(NULL
, 0);