blob: 6c49d6aede87830f2a91deff7d9adb336add4033 [file] [log] [blame]
Chia-Wei, Wang8f7f4902020-12-14 13:54:28 +08001// SPDX-License-Identifier: GPL-2.0+
2/*
3 * Copyright (c) Aspeed Technology Inc.
4 */
5#include <common.h>
6#include <debug_uart.h>
7#include <dm.h>
8#include <spl.h>
9#include <init.h>
10#include <asm/io.h>
11#include <asm/arch/scu_ast2600.h>
Simon Glass3ba929a2020-10-30 21:38:53 -060012#include <asm/global_data.h>
Chia-Wei, Wang8f7f4902020-12-14 13:54:28 +080013
14DECLARE_GLOBAL_DATA_PTR;
15
16void board_init_f(ulong dummy)
17{
18 spl_early_init();
19 preloader_console_init();
20 timer_init();
21 dram_init();
22}
23
24u32 spl_boot_device(void)
25{
26 return BOOT_DEVICE_RAM;
27}
28
29struct image_header *spl_get_load_buffer(ssize_t offset, size_t size)
30{
Chia-Wei Wange7897742021-10-27 14:17:32 +080031 return (struct image_header *)(CONFIG_SYS_LOAD_ADDR);
Chia-Wei, Wang8f7f4902020-12-14 13:54:28 +080032}
33
34#ifdef CONFIG_SPL_OS_BOOT
35int spl_start_uboot(void)
36{
37 /* boot linux */
38 return 0;
39}
40#endif
41
42#ifdef CONFIG_SPL_LOAD_FIT
43int board_fit_config_name_match(const char *name)
44{
45 /* just empty function now - can't decide what to choose */
46 debug("%s: %s\n", __func__, name);
47 return 0;
48}
49#endif