From mboxrd@z Thu Jan 1 00:00:00 1970 From: Alexey Brodkin Date: Fri, 24 Jul 2020 12:14:07 +0000 Subject: [PATCH v4 08/17] board_f: Factor out bdinfo bi_mem{start, size} to setup_bdinfo In-Reply-To: <20200724111225.12513-8-ovidiu.panait@windriver.com> References: <20200724111225.12513-1-ovidiu.panait@windriver.com>, <20200724111225.12513-8-ovidiu.panait@windriver.com> Message-ID: List-Id: MIME-Version: 1.0 Content-Type: text/plain; charset="us-ascii" Content-Transfer-Encoding: 7bit To: u-boot@lists.denx.de Hi Ovidiu, > Move all assignments to gd->bd->bi_mem{start,size} to generic code in > setup_bdinfo. > > Xtensa architecture is special in this regard as it defines its own > handling of gd->bd->bi_mem{start,size} fields. In order to avoid defining > a weak SDRAM function, let arch_setup_bdinfo overwrite the generic flags. > > For ARC architecture, remove ARCH_EARLY_INIT_R from Kconfig since it is > not needed anymore. > > Also, use gd->ram_base to populate bi_memstart to avoid an ifdef. > > Signed-off-by: Ovidiu Panait > --- > > arch/Kconfig | 1 - > arch/arc/lib/cpu.c | 7 ------- > arch/xtensa/lib/Makefile | 2 +- > arch/xtensa/lib/bdinfo.c | 22 ++++++++++++++++++++++ > board/cadence/xtfpga/xtfpga.c | 3 --- > common/board_f.c | 11 +++++------ > 6 files changed, 28 insertions(+), 18 deletions(-) > create mode 100644 arch/xtensa/lib/bdinfo.c > > diff --git a/arch/Kconfig b/arch/Kconfig > index 9be02d1319..4d9557959c 100644 > --- a/arch/Kconfig > +++ b/arch/Kconfig > @@ -10,7 +10,6 @@ choice > > config ARC > bool "ARC architecture" > - select ARCH_EARLY_INIT_R > select ARC_TIMER > select CLK > select HAVE_PRIVATE_LIBGCC > diff --git a/arch/arc/lib/cpu.c b/arch/arc/lib/cpu.c > index 27b5832a0c..d66a8c867a 100644 > --- a/arch/arc/lib/cpu.c > +++ b/arch/arc/lib/cpu.c > @@ -25,13 +25,6 @@ int arch_cpu_init(void) > return 0; > } > > -int arch_early_init_r(void) > -{ > - gd->bd->bi_memstart = CONFIG_SYS_SDRAM_BASE; > - gd->bd->bi_memsize = CONFIG_SYS_SDRAM_SIZE; > - return 0; > -} > - > /* This is a dummy function on arc */ > int dram_init(void) > { For ARC part... Acked-by: Alexey Brodkin