U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Tom Rini <trini@konsulko.com>
To: Caleb Connolly <caleb.connolly@linaro.org>
Cc: Simon Glass <sjg@chromium.org>,
	Dzmitry Sankouski <dsankouski@gmail.com>,
	Vladimir Zapolskiy <vladimir.zapolskiy@linaro.org>,
	Ramon Fried <rfried.dev@gmail.com>,
	Heinrich Schuchardt <xypron.glpk@gmx.de>,
	u-boot@lists.denx.de
Subject: Re: [PATCH] arm: init: add an option to use FDT from previous bootloader
Date: Tue, 24 Oct 2023 15:58:27 -0400	[thread overview]
Message-ID: <20231024195827.GJ496310@bill-the-cat> (raw)
In-Reply-To: <a4979be1-2267-4cfa-b412-f66e7455258b@linaro.org>

[-- Attachment #1: Type: text/plain, Size: 2182 bytes --]

On Tue, Oct 24, 2023 at 08:52:22PM +0100, Caleb Connolly wrote:
> 
> 
> On 24/10/2023 20:25, Tom Rini wrote:
> > On Tue, Oct 24, 2023 at 12:32:35PM +0100, Caleb Connolly wrote:
> > 
> >> Add a new config option to allow u-boot to reuse the FDT provided by the
> >> previous stage bootloader when available.
> >>
> >> On some boards the previous stage bootloader can populate
> >> platform-specific parts of the devicetree such as the memory node, this
> >> allows us to avoid hardcoding it in u-boot and instead determine it
> >> dynamically at runtime.
> >>
> >> Signed-off-by: Caleb Connolly <caleb.connolly@linaro.org>
> >> ---
> >> This patch will improve generic support for Qualcomm boards by enabling
> >> us to configure the memory map at runtime rather than having hardcoded
> >> maps on a per-device basis. I've gone for this approach initially to try
> >> and avoid introducing board specific code where possible, but I'm happy
> >> to rework this into mach-snapdragon if that's preferred.
> >> ---
> >> base-commit: e65b5d35c9116485366bb08138043d51220551da
> >>
> >> // Caleb (they/them)
> >> ---
> >>  arch/arm/lib/save_prev_bl_data.c |  7 +++++++
> >>  boot/Kconfig                     | 10 ++++++++++
> >>  include/init.h                   |  9 +++++++++
> >>  lib/fdtdec.c                     |  7 ++++++-
> > 
> > So what is different with this instead of using save_boot_params ? I'm
> > not saying this isn't needed, but I don't immediately see why
> > save_boot_params + (OF_HAS_PRIOR_STAGE=y&&OF_BOARD=y) isn't the solution
> > to the problem.
> 
> OF_BOARD would work here by implementing board_fdt_blob_setup() for
> mach-snapdragon, my hope was to avoid doing this in a board-specific
> way, but if that's preferred then I can totally do that instead.
> 
> I left a comment below the patch about this, although it probably wasn't
> super clear.

Ah, yes.  I guess I don't see what I suggested as "board specific" in
that outside of efforts like bloblist that Simon mentioned, every
semiconductor is slightly different.  So yes please, OF_BOARD and
board_fdt_blob_setup and so forth instead, thanks.

-- 
Tom

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 659 bytes --]

      reply	other threads:[~2023-10-24 19:58 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2023-10-24 11:32 [PATCH] arm: init: add an option to use FDT from previous bootloader Caleb Connolly
2023-10-24 18:03 ` Simon Glass
2023-10-24 18:10   ` Caleb Connolly
2023-10-24 19:34     ` Simon Glass
2023-10-25 14:05       ` Mark Kettenis
2023-11-04 19:43         ` Simon Glass
2023-10-24 19:25 ` Tom Rini
2023-10-24 19:52   ` Caleb Connolly
2023-10-24 19:58     ` Tom Rini [this message]

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=20231024195827.GJ496310@bill-the-cat \
    --to=trini@konsulko.com \
    --cc=caleb.connolly@linaro.org \
    --cc=dsankouski@gmail.com \
    --cc=rfried.dev@gmail.com \
    --cc=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    --cc=vladimir.zapolskiy@linaro.org \
    --cc=xypron.glpk@gmx.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