public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Stefan Roese <sr@denx.de>
To: u-boot@lists.denx.de
Subject: [PATCH v7 03/10] board_f: Add default values for bi_dram[] in dram_init_banksize()
Date: Thu, 20 Aug 2020 06:44:45 +0200	[thread overview]
Message-ID: <20200820044452.2786286-4-sr@denx.de> (raw)
In-Reply-To: <20200820044452.2786286-1-sr@denx.de>

Remove the bi_memstart / bi_memsize assignment in setup_bdinfo() and
make sure, that bd_dram[] is always configured in the weak default
implementation of dram_init_banksize(), when CONFIG_SYS_SDRAM_BASE is
not set.

Signed-off-by: Stefan Roese <sr@denx.de>
Reviewed-by: Ovidiu Panait <ovidiu.panait@windriver.com>

---

Changes in v7:
- Add Reviewe-by tag from Ovidiu

Changes in v6:
- Simplify dram_init_banksize() even more as suggested by Daniel

Changes in v4:
- New patch

 common/board_f.c | 7 +------
 1 file changed, 1 insertion(+), 6 deletions(-)

diff --git a/common/board_f.c b/common/board_f.c
index d1f0f9af08..8a43df97e4 100644
--- a/common/board_f.c
+++ b/common/board_f.c
@@ -237,10 +237,8 @@ static int show_dram_config(void)
 
 __weak int dram_init_banksize(void)
 {
-#if defined(CONFIG_SYS_SDRAM_BASE)
-	gd->bd->bi_dram[0].start = CONFIG_SYS_SDRAM_BASE;
+	gd->bd->bi_dram[0].start = gd->ram_base;
 	gd->bd->bi_dram[0].size = get_effective_memsize();
-#endif
 
 	return 0;
 }
@@ -602,9 +600,6 @@ int setup_bdinfo(void)
 {
 	struct bd_info *bd = gd->bd;
 
-	bd->bi_memstart = gd->ram_base;  /* start of memory */
-	bd->bi_memsize = gd->ram_size;   /* size in bytes */
-
 	if (IS_ENABLED(CONFIG_SYS_HAS_SRAM)) {
 		bd->bi_sramstart = CONFIG_SYS_SRAM_BASE; /* start of SRAM */
 		bd->bi_sramsize = CONFIG_SYS_SRAM_SIZE;  /* size  of SRAM */
-- 
2.28.0

  parent reply	other threads:[~2020-08-20  4:44 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-08-20  4:44 [PATCH v7 00/10] Remove CONFIG_NR_DRAM_BANKS option and bi_memstart/memsize from bd_info Stefan Roese
2020-08-20  4:44 ` [PATCH v7 01/10] CONFIG_NR_DRAM_BANKS: Remove unreferenced code as its always defined Stefan Roese
2020-08-20  9:21   ` Bin Meng
2020-08-20  4:44 ` [PATCH v7 02/10] image: Use gd->ram_base/_size in env_get_bootm_size() Stefan Roese
2020-08-22 15:08   ` Simon Glass
2020-08-20  4:44 ` Stefan Roese [this message]
2020-08-20  9:22   ` [PATCH v7 03/10] board_f: Add default values for bi_dram[] in dram_init_banksize() Bin Meng
2020-08-20  9:29     ` Stefan Roese
2020-08-20  4:44 ` [PATCH v7 04/10] global: Move from bi_memstart/memsize -> gd->ram_base/ram_size Stefan Roese
2020-08-22 15:09   ` Simon Glass
2020-08-20  4:44 ` [PATCH v7 05/10] xtensa: Remove arch_setup_bdinfo() Stefan Roese
2020-08-20  4:44 ` [PATCH v7 06/10] xtensa: Remove local no-op dram_init_banksize() Stefan Roese
2020-08-20  4:44 ` [PATCH v7 07/10] video: cfb_console.c: Use bi_dram[] values on all platforms Stefan Roese
2020-08-22 15:09   ` Simon Glass
2020-08-20  4:44 ` [PATCH v7 08/10] powerpc: Remove bi_memstart & bi_memsize assignments in spl.c Stefan Roese
2020-08-22 15:09   ` Simon Glass
2020-08-20  4:44 ` [PATCH v7 09/10] cmd: bdinfo: Remove print of superseeded bi_memstart / bi_memsize values Stefan Roese
2020-08-20  4:44 ` [PATCH v7 10/10] asm-generic/u-boot.h: Remove bi_memstart & bi_memsize from bd_info Stefan Roese
2020-08-22 15:09   ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20200820044452.2786286-4-sr@denx.de \
    --to=sr@denx.de \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox