All of lore.kernel.org
 help / color / mirror / Atom feed
From: Anshul Dalal <anshuld@ti.com>
To: Tom Rini <trini@konsulko.com>, Quentin Schulz <u-boot@0leil.net>,
	<anshuld@ti.com>
Cc: Wadim Egorov <w.egorov@phytec.de>, <ilias.apalodimas@linaro.org>,
	<quentin.schulz@cherry.de>, <kever.yang@rock-chips.com>,
	<aristo.chen@canonical.com>, <alchark@flipper.net>,
	<u-boot@lists.u-boot-project.org>, <upstream@lists.phytec.de>
Subject: Re: [PATCH v3 2/3] arm: mach-k3: Set /chosen/bootsource for the next boot stage
Date: Thu, 3 Dec 2026 11:46:17 +0530	[thread overview]
Message-ID: <DNAVM2MAHSAP.23D7JSENBAIG3@ti.com> (raw)
In-Reply-To: <20261130231444.GT3176972@bill-the-cat>

On Tue Dec 1, 2026 at 4:44 AM IST, Tom Rini wrote:
> On Thu, Nov 26, 2026 at 07:43:48PM +0100, Quentin Schulz wrote:
>
>> Hi Tom,
>> 
>> You seem to be the custodian for the two files changed here, can you please
>> give this a review?
>> 
>> I'm fine picking up patches 1 and 3 independently, and patch 2 lives its own
>> life (possibly with more versions) or wait for your review for patch 2 and
>> take everything at once, up to you.
>> 
>> Thanks!
>> Quentin
>> 
>> On 11/17/26 2:51 PM, Wadim Egorov wrote:
>> > Call fdt_fixup_bootsource() from spl_perform_arch_fixups() so the next
>> > boot stage knows the device the ROM booted from.
>> > 
>> > Implement bootsource_get_ofpath() for AM62x by mapping the boot device
>> > from get_boot_device() to its device tree node. For OSPI boot the path
>> > points to the flash chip and not the controller, since the flash node
>> > is what the OS maps to an MTD device. All AM62 boards name it flash@0.
>> > 
>> > Signed-off-by: Wadim Egorov <w.egorov@phytec.de>
>> > ---
>> >   arch/arm/mach-k3/am62x/boot.c | 26 ++++++++++++++++++++++++++
>> >   arch/arm/mach-k3/common.c     |  1 +
>> >   2 files changed, 27 insertions(+)
>> > 
>> > diff --git a/arch/arm/mach-k3/am62x/boot.c b/arch/arm/mach-k3/am62x/boot.c
>> > index a3a6cda6bdb..db07a550caf 100644
>> > --- a/arch/arm/mach-k3/am62x/boot.c
>> > +++ b/arch/arm/mach-k3/am62x/boot.c
>> > @@ -2,6 +2,7 @@
>> >   #include <asm/io.h>
>> >   #include <asm/arch/hardware.h>
>> >   #include <asm/arch/am62_spl.h>
>> > +#include <fdt_support.h>
>> >   static u32 __get_backup_bootmedia(u32 devstat)
>> >   {
>> > @@ -102,6 +103,31 @@ u32 get_boot_device(void)
>> >   	return bootmedia;
>> >   }
>> > +const char *bootsource_get_ofpath(void)
>> > +{
>> > +	switch (get_boot_device()) {
>> > +	case BOOT_DEVICE_MMC1:
>> > +		return "/bus@f0000/mmc@fa10000";
>> > +	case BOOT_DEVICE_MMC2:
>> > +		return "/bus@f0000/mmc@fa00000";
>> > +	case BOOT_DEVICE_SPI:
>> > +		/*
>> > +		 * The flash chip is described by the board device tree. All
>> > +		 * AM62 boards name it flash@0.
>> > +		 */
>> > +		return "/bus@f0000/bus@fc00000/spi@fc40000/flash@0";
>> > +	case BOOT_DEVICE_ETHERNET:
>> > +		return "/bus@f0000/ethernet@8000000/ethernet-ports/port@1";
>> > +	case BOOT_DEVICE_UART:
>> > +		return "/bus@f0000/serial@2800000";
>> > +	case BOOT_DEVICE_USB:
>> > +	case BOOT_DEVICE_DFU:
>> > +		return "/bus@f0000/dwc3-usb@f900000/usb@31000000";
>> > +	}
>> > +
>> > +	return NULL;
>> > +}
>> > +
>> >   const char *get_reset_reason(void)
>> >   {
>> >   	u32 reset_reason = readl(CTRLMMR_MCU_RST_SRC);
>> > diff --git a/arch/arm/mach-k3/common.c b/arch/arm/mach-k3/common.c
>> > index 6e382efdb3b..c7fd7b4f44c 100644
>> > --- a/arch/arm/mach-k3/common.c
>> > +++ b/arch/arm/mach-k3/common.c
>> > @@ -570,6 +570,7 @@ void spl_perform_arch_fixups(struct spl_image_info *spl_image)
>> >   		return;
>> >   	fdt_fixup_reserved(fdt);
>> > +	fdt_fixup_bootsource(fdt);
>> >   	if (IS_ENABLED(CONFIG_SPL_OS_BOOT))
>> >   		k3_falcon_fdt_fixup(fdt);
>
> Seems reasonable to me, Anshul? And them I'll pick this up Quentin, I
> just wanted to be sure you were happy with it, given your previous
> feedback.

Hi Tom, the patch looks good to me.

Reviewed-by: Anshul Dalal <anshuld@ti.com>

  reply	other threads:[~2026-12-03  6:17 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2026-11-17 13:51 [PATCH v3 0/3] Set /chosen/bootsource for the next boot stage and the OS Wadim Egorov
2026-11-17 13:51 ` [PATCH v3 1/3] fdt_support: Add /chosen/bootsource fixup Wadim Egorov
2026-11-26 18:41   ` Quentin Schulz
2026-11-17 13:51 ` [PATCH v3 2/3] arm: mach-k3: Set /chosen/bootsource for the next boot stage Wadim Egorov
2026-11-26 18:43   ` Quentin Schulz
2026-11-30 23:14     ` Tom Rini
2026-12-03  6:16       ` Anshul Dalal [this message]
2026-11-17 13:51 ` [PATCH v3 3/3] rockchip: Use the generic /chosen/bootsource fixup Wadim Egorov

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=DNAVM2MAHSAP.23D7JSENBAIG3@ti.com \
    --to=anshuld@ti.com \
    --cc=alchark@flipper.net \
    --cc=aristo.chen@canonical.com \
    --cc=ilias.apalodimas@linaro.org \
    --cc=kever.yang@rock-chips.com \
    --cc=quentin.schulz@cherry.de \
    --cc=trini@konsulko.com \
    --cc=u-boot@0leil.net \
    --cc=u-boot@lists.u-boot-project.org \
    --cc=upstream@lists.phytec.de \
    --cc=w.egorov@phytec.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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.