
On 24. 07. 20 16:54, Stefan Roese wrote:
Since commit 86cf1c82850f ("configs: Migrate CONFIG_NR_DRAM_BANKS") & commit 999a772d9f24 ("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 Cc: Tom Rini trini@konsulko.com Cc: Ramon Fried ramon.fried@gmail.com Cc: Simon Glass sjg@chromium.org Cc: Michal Simek michal.simek@xilinx.com
arch/x86/cpu/broadwell/cpu_from_spl.c | 2 -- board/xilinx/zynqmp/zynqmp.c | 2 -- cmd/bdinfo.c | 2 -- common/board_f.c | 6 +----- common/image.c | 3 +-- common/init/handoff.c | 4 ---- drivers/pci/pci-uclass.c | 17 +---------------- include/asm-generic/u-boot.h | 2 -- include/handoff.h | 2 -- lib/fdtdec.c | 5 ----- lib/lmb.c | 7 ------- 11 files changed, 3 insertions(+), 49 deletions(-)
diff --git a/arch/x86/cpu/broadwell/cpu_from_spl.c b/arch/x86/cpu/broadwell/cpu_from_spl.c index 6567d50653..4d4cdafa2b 100644 --- a/arch/x86/cpu/broadwell/cpu_from_spl.c +++ b/arch/x86/cpu/broadwell/cpu_from_spl.c @@ -53,14 +53,12 @@ void board_debug_uart_init(void)
int dram_init_banksize(void) { -#ifdef CONFIG_NR_DRAM_BANKS struct spl_handoff *ho;
ho = bloblist_find(BLOBLISTT_SPL_HANDOFF, sizeof(*ho)); if (!ho) return log_msg_ret("Missing SPL hand-off info", -ENOENT); handoff_load_dram_banks(ho); -#endif
return 0; } diff --git a/board/xilinx/zynqmp/zynqmp.c b/board/xilinx/zynqmp/zynqmp.c index ebb7172908..4cc5cb6fd7 100644 --- a/board/xilinx/zynqmp/zynqmp.c +++ b/board/xilinx/zynqmp/zynqmp.c @@ -467,10 +467,8 @@ int dram_init(void) #else int dram_init_banksize(void) { -#if defined(CONFIG_NR_DRAM_BANKS) gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE; gd->bd->bi_dram[0].size = get_effective_memsize(); -#endif
mem_map_fill();
Acked-by: Michal Simek michal.simek@xilinx.com (for zynqmp)
Thanks, Michal