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