Rick Chen | 08537f3 | 2023-01-04 09:55:43 +0800 | [diff] [blame] | 1 | // SPDX-License-Identifier: GPL-2.0+ |
| 2 | /* |
| 3 | * Copyright (C) 2023 Andes Technology Corporation |
| 4 | * Rick Chen, Andes Technology Corporation <rick@andestech.com> |
| 5 | */ |
| 6 | #include <common.h> |
| 7 | #include <cpu_func.h> |
| 8 | #include <hang.h> |
| 9 | #include <init.h> |
| 10 | #include <log.h> |
| 11 | #include <spl.h> |
| 12 | #include <asm/global_data.h> |
| 13 | #include <asm/system.h> |
| 14 | |
| 15 | DECLARE_GLOBAL_DATA_PTR; |
| 16 | |
| 17 | #if CONFIG_IS_ENABLED(RAM_SUPPORT) |
| 18 | struct legacy_img_hdr *spl_get_load_buffer(ssize_t offset, size_t size) |
| 19 | { |
| 20 | return (void *)(CONFIG_SPL_LOAD_FIT_ADDRESS + offset); |
| 21 | } |
| 22 | |
| 23 | void *board_spl_fit_buffer_addr(ulong fit_size, int sectors, int bl_len) |
| 24 | { |
| 25 | return spl_get_load_buffer(0, sectors * bl_len); |
| 26 | } |
| 27 | #endif |