From: Simon Glass <sjg@chromium.org>
To: U-Boot Mailing List <u-boot@lists.denx.de>
Cc: Tom Rini <trini@konsulko.com>, Simon Glass <sjg@chromium.org>,
Ilias Apalodimas <ilias.apalodimas@linaro.org>,
Jerry Van Baren <vanbaren@cideas.com>,
Shiji Yang <yangshiji66@outlook.com>
Subject: [PATCH v2 5/9] fdt: Correct condition for bloblist existing
Date: Mon, 10 Jun 2024 08:59:16 -0600 [thread overview]
Message-ID: <20240610145920.3302001-6-sjg@chromium.org> (raw)
In-Reply-To: <20240610145920.3302001-1-sjg@chromium.org>
On some boards, the bloblist is created in SPL once SDRAM is ready. It
cannot be accessed until that point, so is not available early in SPL.
Add a condition to avoid a hang in this case.
This fixes a hang in chromebook_coral
Fixes: 70fe2385943 ("fdt: Allow the devicetree to come from a bloblist")
Signed-off-by: Simon Glass <sjg@chromium.org>
---
Changes in v2:
- Use 'phase' instead of 'stage'
lib/fdtdec.c | 12 ++++++++++--
1 file changed, 10 insertions(+), 2 deletions(-)
diff --git a/lib/fdtdec.c b/lib/fdtdec.c
index b2c59ab3818..79eaa56ea39 100644
--- a/lib/fdtdec.c
+++ b/lib/fdtdec.c
@@ -1669,8 +1669,16 @@ int fdtdec_setup(void)
{
int ret = -ENOENT;
- /* If allowing a bloblist, check that first */
- if (CONFIG_IS_ENABLED(BLOBLIST)) {
+ /*
+ * If allowing a bloblist, check that first. This would be better
+ * handled with an OF_BLOBLIST Kconfig, but that caused far too much
+ * argument, so add a hack here, used e.g. by chromebook_coral
+ * The necessary test is whether the previous phase passed a bloblist,
+ * not whether this phase creates one.
+ */
+ if (CONFIG_IS_ENABLED(OF_BLOBLIST) &&
+ (spl_prev_phase() != PHASE_TPL ||
+ !IS_ENABLED(CONFIG_TPL_BLOBLIST))) {
ret = bloblist_maybe_init();
if (!ret) {
gd->fdt_blob = bloblist_find(BLOBLISTT_CONTROL_FDT, 0);
--
2.34.1
next prev parent reply other threads:[~2024-06-10 15:00 UTC|newest]
Thread overview: 38+ messages / expand[flat|nested] mbox.gz Atom feed top
2024-06-10 14:59 [PATCH v2 0/9] Bug-fixes for a few boards Simon Glass
2024-06-10 14:59 ` [PATCH v2 1/9] nvidia: nyan-big: Disable debug UART Simon Glass
2024-06-10 14:59 ` [PATCH v2 2/9] tpm: Avoid code bloat when not using EFI_TCG2_PROTOCOL Simon Glass
2024-06-14 6:03 ` Ilias Apalodimas
2024-06-14 6:59 ` Heinrich Schuchardt
2024-06-14 7:01 ` Ilias Apalodimas
2024-06-14 9:04 ` Heinrich Schuchardt
2024-06-15 7:01 ` Ilias Apalodimas
2024-06-15 7:03 ` Ilias Apalodimas
2024-06-17 13:53 ` Simon Glass
2024-06-17 17:16 ` Tom Rini
2024-06-18 12:43 ` Simon Glass
2024-06-18 14:15 ` Tom Rini
2024-06-19 3:03 ` Simon Glass
2024-06-19 15:32 ` Tom Rini
2024-06-20 23:05 ` Simon Glass
2024-06-20 23:19 ` Tom Rini
2024-06-21 14:57 ` Simon Glass
2024-06-21 16:05 ` Tom Rini
2024-06-21 17:55 ` Simon Glass
2024-06-21 19:19 ` Tom Rini
2024-06-21 19:38 ` Simon Glass
2024-06-21 22:12 ` Tom Rini
2024-06-23 21:52 ` Simon Glass
2024-06-24 17:28 ` Tom Rini
2024-06-10 14:59 ` [PATCH v2 3/9] rockchip: veyron: Add logging for power init Simon Glass
2024-06-10 17:02 ` Quentin Schulz
2024-06-10 14:59 ` [PATCH v2 4/9] power: regulator: Handle autoset in regulators_enable_boot_on() Simon Glass
2024-06-10 14:59 ` Simon Glass [this message]
2024-06-10 14:59 ` [PATCH v2 6/9] spl: Allow ATF to work when dcache is disabled Simon Glass
2024-06-10 14:59 ` [PATCH v2 7/9] rockchip: Ensure memory size is available in RK3399 SPL Simon Glass
2024-06-11 11:27 ` Quentin Schulz
2024-06-11 13:43 ` Jonas Karlman
2024-06-11 13:50 ` Quentin Schulz
2024-06-11 19:13 ` Simon Glass
2024-06-10 14:59 ` [PATCH v2 8/9] rockchip: bob: kevin: Disable dcache in SPL Simon Glass
2024-06-10 14:59 ` [PATCH v2 9/9] Drop the special am335x_boneblack_vboot target Simon Glass
2024-06-10 16:29 ` 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=20240610145920.3302001-6-sjg@chromium.org \
--to=sjg@chromium.org \
--cc=ilias.apalodimas@linaro.org \
--cc=trini@konsulko.com \
--cc=u-boot@lists.denx.de \
--cc=vanbaren@cideas.com \
--cc=yangshiji66@outlook.com \
/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