CONFIG_NR_DRAM_BANKS: Remove unreferenced code as its always defined
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>
This commit is contained in:
@@ -215,8 +215,6 @@ static int announce_dram_init(void)
|
||||
static int show_dram_config(void)
|
||||
{
|
||||
unsigned long long size;
|
||||
|
||||
#ifdef CONFIG_NR_DRAM_BANKS
|
||||
int i;
|
||||
|
||||
debug("\nRAM Configuration:\n");
|
||||
@@ -229,9 +227,6 @@ static int show_dram_config(void)
|
||||
#endif
|
||||
}
|
||||
debug("\nDRAM: ");
|
||||
#else
|
||||
size = gd->ram_size;
|
||||
#endif
|
||||
|
||||
print_size(size, "");
|
||||
board_add_ram_info(0);
|
||||
@@ -242,7 +237,7 @@ static int show_dram_config(void)
|
||||
|
||||
__weak int dram_init_banksize(void)
|
||||
{
|
||||
#if defined(CONFIG_NR_DRAM_BANKS) && defined(CONFIG_SYS_SDRAM_BASE)
|
||||
#if defined(CONFIG_SYS_SDRAM_BASE)
|
||||
gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
|
||||
gd->bd->bi_dram[0].size = get_effective_memsize();
|
||||
#endif
|
||||
|
||||
Reference in New Issue
Block a user