xref: /openbmc/u-boot/arch/arm/mach-aspeed/ast2600/spl.c (revision 7b2ba35cce9dc917fc29f69d4229abe5f35be27d)
1 /*
2  * (C) Copyright 2019 ASPEED Technology Inc.
3  *
4  * SPDX-License-Identifier:	GPL-2.0+
5  */
6 #include <common.h>
7 #include <debug_uart.h>
8 #include <spl.h>
9 
10 #include <asm/io.h>
11 #include <asm/spl.h>
12 
13 DECLARE_GLOBAL_DATA_PTR;
14 
15 void board_init_f(ulong dummy)
16 {
17 	spl_early_init();
18 	timer_init();
19 	preloader_console_init();
20 	dram_init();
21 }
22 
23 u32 spl_boot_device(void)
24 {
25 	return BOOT_DEVICE_RAM;
26 }
27 
28 struct image_header *spl_get_load_buffer(ssize_t offset, size_t size)
29 {
30     return (struct image_header *)(CONFIG_SYS_TEXT_BASE);
31 }
32 
33 #ifdef CONFIG_SPL_MMC_SUPPORT
34 u32 spl_boot_mode(const u32 boot_device)
35 {
36 	return MMCSD_MODE_RAW;
37 }
38 #endif
39 
40 #ifdef CONFIG_SPL_OS_BOOT
41 int spl_start_uboot(void)
42 {
43 	/* boot linux */
44 	return 0;
45 }
46 #endif
47 
48 #ifdef CONFIG_SPL_LOAD_FIT
49 int board_fit_config_name_match(const char *name)
50 {
51 	/* Just empty function now - can't decide what to choose */
52 	debug("%s: %s\n", __func__, name);
53 
54 	return 0;
55 }
56 #endif
57