public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: Andre Przywara <andre.przywara@arm.com>
To: u-boot@lists.denx.de
Subject: [PATCH v2 4/6] qemu-arm: Remove need to specify flash banks
Date: Wed, 30 Sep 2020 17:39:16 +0100	[thread overview]
Message-ID: <20200930163918.24995-5-andre.przywara@arm.com> (raw)
In-Reply-To: <20200930163918.24995-1-andre.przywara@arm.com>

Currently we hard-code the number and initial addresses of QEMU's flash
banks, even though our code is perfectly able to gather the same
information from the DTB provided by QEMU.
This is especially annoying, since we have two slightly different
U-Boot configurations ("bare-metal" vs. loaded via Arm Trusted
Firmware), which need to be selected at build time.

Drop the two hard coded alternatives, and use
CONFIG_SYS_MAX_FLASH_BANKS_DETECT instead, which relies on the DTB to
figure out the actual flash configuration at runtime.

Signed-off-by: Andre Przywara <andre.przywara@arm.com>
---
 include/configs/qemu-arm.h | 8 +-------
 1 file changed, 1 insertion(+), 7 deletions(-)

diff --git a/include/configs/qemu-arm.h b/include/configs/qemu-arm.h
index bc8b7c5c123..273fa1a7d7b 100644
--- a/include/configs/qemu-arm.h
+++ b/include/configs/qemu-arm.h
@@ -45,13 +45,7 @@
 #define CONFIG_SYS_CBSIZE 512
 
 #define CONFIG_SYS_MONITOR_BASE		CONFIG_SYS_TEXT_BASE
-#ifdef CONFIG_TFABOOT
-#define CONFIG_SYS_FLASH_BASE		0x4000000
-#define CONFIG_SYS_MAX_FLASH_BANKS	1
-#else
-#define CONFIG_SYS_FLASH_BASE		0x0
-#define CONFIG_SYS_MAX_FLASH_BANKS	2
-#endif
+#define CONFIG_SYS_MAX_FLASH_BANKS_DETECT	2
 #define CONFIG_SYS_MAX_FLASH_SECT	256 /* Sector: 256K, Bank: 64M */
 #define CONFIG_CFI_FLASH_USE_WEAK_ACCESSORS
 
-- 
2.17.5

  parent reply	other threads:[~2020-09-30 16:39 UTC|newest]

Thread overview: 17+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2020-09-30 16:39 [PATCH v2 0/6] qemu-arm64: Allow booting via Trusted Firmware Andre Przywara
2020-09-30 16:39 ` [PATCH v2 1/6] arm64: PIE: Do not skip static relocation Andre Przywara
2020-09-30 17:11   ` Stephen Warren
2020-10-01  8:33   ` Amit Tomar
2020-10-09 13:02   ` Tom Rini
2020-09-30 16:39 ` [PATCH v2 2/6] arm64: PIE: Skip fixups if distance is zero Andre Przywara
2020-10-09 13:02   ` Tom Rini
2020-09-30 16:39 ` [PATCH v2 3/6] arm64: PIE: Allow fixed stack pointer Andre Przywara
2020-10-09 13:02   ` Tom Rini
2020-09-30 16:39 ` Andre Przywara [this message]
2020-10-09 13:02   ` [PATCH v2 4/6] qemu-arm: Remove need to specify flash banks Tom Rini
2020-09-30 16:39 ` [PATCH v2 5/6] qemu-arm: Drop ARCH_SUPPORT_TFABOOT Andre Przywara
2020-09-30 17:40   ` Tom Rini
2020-10-09 13:02   ` Tom Rini
2020-09-30 16:39 ` [PATCH v2 6/6] qemu-arm64: Enable POSITION_INDEPENDENT Andre Przywara
2020-10-09 13:03   ` Tom Rini
2020-09-30 17:39 ` [PATCH v2 0/6] qemu-arm64: Allow booting via Trusted Firmware Tom Rini

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=20200930163918.24995-5-andre.przywara@arm.com \
    --to=andre.przywara@arm.com \
    --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