Chia-Wei, Wang | 8f7f490 | 2020-12-14 13:54:28 +0800 | [diff] [blame] | 1 | // 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 Glass | 3ba929a | 2020-10-30 21:38:53 -0600 | [diff] [blame] | 12 | #include <asm/global_data.h> |
Chia-Wei, Wang | 8f7f490 | 2020-12-14 13:54:28 +0800 | [diff] [blame] | 13 | |
| 14 | DECLARE_GLOBAL_DATA_PTR; |
| 15 | |
| 16 | void board_init_f(ulong dummy) |
| 17 | { |
| 18 | spl_early_init(); |
| 19 | preloader_console_init(); |
| 20 | timer_init(); |
| 21 | dram_init(); |
| 22 | } |
| 23 | |
| 24 | u32 spl_boot_device(void) |
| 25 | { |
| 26 | return BOOT_DEVICE_RAM; |
| 27 | } |
| 28 | |
| 29 | struct image_header *spl_get_load_buffer(ssize_t offset, size_t size) |
| 30 | { |
Chia-Wei Wang | e789774 | 2021-10-27 14:17:32 +0800 | [diff] [blame] | 31 | return (struct image_header *)(CONFIG_SYS_LOAD_ADDR); |
Chia-Wei, Wang | 8f7f490 | 2020-12-14 13:54:28 +0800 | [diff] [blame] | 32 | } |
| 33 | |
| 34 | #ifdef CONFIG_SPL_OS_BOOT |
| 35 | int spl_start_uboot(void) |
| 36 | { |
| 37 | /* boot linux */ |
| 38 | return 0; |
| 39 | } |
| 40 | #endif |
| 41 | |
| 42 | #ifdef CONFIG_SPL_LOAD_FIT |
| 43 | int 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 |