1 // SPDX-License-Identifier: GPL-2.0+
3 * Passing basic information from SPL to U-Boot proper
5 * Copyright 2018 Google, Inc
10 #include <asm/global_data.h>
12 DECLARE_GLOBAL_DATA_PTR;
14 void handoff_save_dram(struct spl_handoff *ho)
16 struct bd_info *bd = gd->bd;
19 ho->ram_size = gd->ram_size;
21 for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
22 ho->ram_bank[i].start = bd->bi_dram[i].start;
23 ho->ram_bank[i].size = bd->bi_dram[i].size;
27 void handoff_load_dram_size(struct spl_handoff *ho)
29 gd->ram_size = ho->ram_size;
32 void handoff_load_dram_banks(struct spl_handoff *ho)
34 struct bd_info *bd = gd->bd;
37 for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
38 bd->bi_dram[i].start = ho->ram_bank[i].start;
39 bd->bi_dram[i].size = ho->ram_bank[i].size;