From: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
To: jorge.ramirez@oss.qualcomm.com, caleb.connolly@linaro.org,
neil.armstrong@linaro.org, sumit.garg@kernel.org
Cc: u-boot-qcom@groups.io, u-boot@lists.denx.de
Subject: [PATCH 6/7] mach-snapdragon: board interface to enforce fdt
Date: Mon, 7 Apr 2025 10:19:26 +0200 [thread overview]
Message-ID: <20250407081927.138915-7-jorge.ramirez@oss.qualcomm.com> (raw)
In-Reply-To: <20250407081927.138915-1-jorge.ramirez@oss.qualcomm.com>
Some platforms might require the external fdt to boot.
This change provides a mechanism to the board initializaion code to make
the requet explicit.
Signed-off-by: Jorge Ramirez-Ortiz <jorge.ramirez@oss.qualcomm.com>
---
arch/arm/mach-snapdragon/board.c | 13 +++++++++++++
1 file changed, 13 insertions(+)
diff --git a/arch/arm/mach-snapdragon/board.c b/arch/arm/mach-snapdragon/board.c
index 2ef936aab75..1bca9dce20f 100644
--- a/arch/arm/mach-snapdragon/board.c
+++ b/arch/arm/mach-snapdragon/board.c
@@ -150,7 +150,13 @@ static void show_psci_version(void)
/* We support booting U-Boot with an internal DT when running as a first-stage bootloader
* or for supporting quirky devices where it's easier to leave the downstream DT in place
* to improve ABL compatibility. Otherwise, we use the DT provided by ABL.
+ *
+ * Alternatively the board can enforce the external fdt.
*/
+bool __weak qcom_board_fdt_external(void)
+{
+ return false;
+}
int board_fdt_blob_setup(void **fdtp)
{
struct fdt_header *fdt;
@@ -161,6 +167,12 @@ int board_fdt_blob_setup(void **fdtp)
external_valid = fdt && !fdt_check_header(fdt);
internal_valid = !fdt_check_header(*fdtp);
+ if (qcom_board_fdt_external() && external_valid) {
+ debug("Using external FDT\n");
+ *fdtp = fdt;
+ goto out;
+ }
+
/*
* There is no point returning an error here, U-Boot can't do anything useful in this situation.
* Bail out while we can still print a useful error message.
@@ -178,6 +190,7 @@ int board_fdt_blob_setup(void **fdtp)
*fdtp = fdt;
}
+out:
/*
* Parse the /memory node while we're here,
* this makes it easy to do other things early.
--
2.34.1
next prev parent reply other threads:[~2025-04-07 8:20 UTC|newest]
Thread overview: 21+ messages / expand[flat|nested] mbox.gz Atom feed top
2025-04-07 8:19 Dragonboard 820c - fix board support Jorge Ramirez-Ortiz
2025-04-07 8:19 ` [PATCH 1/7] board: qualcomm: dragonboard820c: udpate readme Jorge Ramirez-Ortiz
2025-04-07 9:01 ` neil.armstrong
2025-04-07 8:19 ` [PATCH 2/7] clk/qcom: apq8096: fix set rate for the uart clock Jorge Ramirez-Ortiz
2025-04-07 9:01 ` neil.armstrong
2025-04-07 8:19 ` [PATCH 3/7] mmc: msm_sdhci: handle bulk clock initialization error Jorge Ramirez-Ortiz
2025-04-07 9:02 ` neil.armstrong
2025-04-07 9:10 ` Neil Armstrong
2025-04-07 9:38 ` Jorge Ramirez
2025-04-07 9:53 ` Neil Armstrong
2025-04-07 10:36 ` Jorge Ramirez
2025-04-07 8:19 ` [PATCH 4/7] clk/qcom: apq8096: fix the sdhci clock Jorge Ramirez-Ortiz
2025-04-07 9:03 ` neil.armstrong
2025-04-07 8:19 ` [PATCH 5/7] configs: dragonboard820: enable GPIO Jorge Ramirez-Ortiz
2025-04-07 9:03 ` neil.armstrong
2025-04-07 8:19 ` Jorge Ramirez-Ortiz [this message]
2025-04-07 9:04 ` [PATCH 6/7] mach-snapdragon: board interface to enforce fdt neil.armstrong
2025-04-07 9:52 ` Jorge Ramirez
2025-04-07 10:02 ` Caleb Connolly
2025-04-07 10:33 ` Jorge Ramirez
2025-04-07 8:19 ` [PATCH 7/7] board: qualcommm: dragonboard820c: external fdt Jorge Ramirez-Ortiz
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=20250407081927.138915-7-jorge.ramirez@oss.qualcomm.com \
--to=jorge.ramirez@oss.qualcomm.com \
--cc=caleb.connolly@linaro.org \
--cc=neil.armstrong@linaro.org \
--cc=sumit.garg@kernel.org \
--cc=u-boot-qcom@groups.io \
--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