mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-05 20:54:31 +00:00
dfaf6a5797
Since commit86cf1c8285
("configs: Migrate CONFIG_NR_DRAM_BANKS") & commit999a772d9f
("Kconfig: Migrate CONFIG_NR_DRAM_BANKS"), CONFIG_NR_DRAM_BANKS is always defined with a value (4 is default). It makes no sense to still carry code that is guarded with "#ifndef CONFIG_NR_DRAM_BANKS" (and similar). This patch removes all these unreferenced code paths. Signed-off-by: Stefan Roese <sr@denx.de> Reviewed-by: Pali Rohár <pali@kernel.org> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Reviewed-by: Bin Meng <bmeng.cn@gmail.com>
40 lines
792 B
C
40 lines
792 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Passing basic information from SPL to U-Boot proper
|
|
*
|
|
* Copyright 2018 Google, Inc
|
|
*/
|
|
|
|
#include <common.h>
|
|
#include <handoff.h>
|
|
|
|
DECLARE_GLOBAL_DATA_PTR;
|
|
|
|
void handoff_save_dram(struct spl_handoff *ho)
|
|
{
|
|
struct bd_info *bd = gd->bd;
|
|
int i;
|
|
|
|
ho->ram_size = gd->ram_size;
|
|
|
|
for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
|
|
ho->ram_bank[i].start = bd->bi_dram[i].start;
|
|
ho->ram_bank[i].size = bd->bi_dram[i].size;
|
|
}
|
|
}
|
|
|
|
void handoff_load_dram_size(struct spl_handoff *ho)
|
|
{
|
|
gd->ram_size = ho->ram_size;
|
|
}
|
|
|
|
void handoff_load_dram_banks(struct spl_handoff *ho)
|
|
{
|
|
struct bd_info *bd = gd->bd;
|
|
int i;
|
|
|
|
for (i = 0; i < CONFIG_NR_DRAM_BANKS; i++) {
|
|
bd->bi_dram[i].start = ho->ram_bank[i].start;
|
|
bd->bi_dram[i].size = ho->ram_bank[i].size;
|
|
}
|
|
}
|