public inbox for u-boot@lists.denx.de
 help / color / mirror / Atom feed
From: "Michal Suchánek" <msuchanek@suse.de>
To: Andre Przywara <andre.przywara@arm.com>
Cc: Samuel Holland <samuel@sholland.org>,
	u-boot@lists.denx.de, Simon Glass <sjg@chromium.org>,
	Philipp Tomsich <philipp.tomsich@vrull.eu>,
	Kever Yang <kever.yang@rock-chips.com>,
	Jagan Teki <jagan@amarulasolutions.com>,
	Andy Yan <andy.yan@rock-chips.com>,
	Michal Simek <michal.simek@amd.com>,
	Igor Opaniuk <igor.opaniuk@foundries.io>
Subject: Re: [PATCH 0/2] Command for entering mask rom USB download mode
Date: Mon, 4 Jul 2022 11:42:26 +0200	[thread overview]
Message-ID: <20220704094226.GI17705@kitsune.suse.cz> (raw)
In-Reply-To: <20220703232251.12d4d251@slackpad.lan>

On Sun, Jul 03, 2022 at 11:22:51PM +0100, Andre Przywara wrote:
> On Sun,  3 Jul 2022 21:20:20 +0200
> Michal Suchanek <msuchanek@suse.de> wrote:
> 
> Hi,
> 
> > many ARM SoCs have a mask rom feature that provides interface for
> > downloading firmware over USB.
> > 
> > Downstream rockchip u-boot has 'brom' or 'rbrom' command for this
> > purpose, and downstream sunxi u-boot provides 'efex' command. p-boot has
> > code for entering FEL on A64 SoC.
> 
> Thanks for bringing this up. We have discussed several options before,
> including some true FEL reset commands, which do not depend on the SPL
> doing the branch.
> But I guess we can just start with this one and expand it from there.
>  
> > With this patch I am able to activate the USB downloader on a rk3399 but
> > the rkflashtool fails to communicate with the device. On a H2+ I can get
> > into the FEL mode and get flash parameters. YMMV
> > 
> > I don't have any great idea how to structure this so that the command
> > does not need platform-specific code. Is there an example of a command
> > that has platform-specific implementations?
> 
> I don't think that's a problem: there are already platform specific
> commands, you just put them in a separate file and mark them as
> "depends on ARCH_SUNXI" (or whatever) in cmd/Kconfig and be done. No
> need to boil the ocean here in trying to be generic.
> That's why I wouldn't put them in cmd/boot.c, especially since you
> don't seem to share any code?

The reset implementation also does not share any actual code between
platforms, has different implementation on each platform, and is
cross-platform command that provides the same functionality on each
paltform.

Because the functionality can be provided on multiple platfroms the goal
is to provide cross-platform user interface for it.

Thanks

Michal

  reply	other threads:[~2022-07-04  9:42 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-07-03 19:20 [PATCH 0/2] Command for entering mask rom USB download mode Michal Suchanek
2022-07-03 19:20 ` [PATCH 1/2] cmd: boot: add brom cmd to reboot to brom dnl mode Michal Suchanek
2022-07-03 19:20 ` [PATCH 2/2] cmd: boot: add brom cmd to reboot to FEL mode Michal Suchanek
2022-07-03 22:23   ` Andre Przywara
2022-07-04  9:33     ` Michal Suchánek
2022-07-03 22:22 ` [PATCH 0/2] Command for entering mask rom USB download mode Andre Przywara
2022-07-04  9:42   ` Michal Suchánek [this message]
2022-07-03 23:26 ` Samuel Holland
2022-07-04 10:32   ` Michal Suchánek

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=20220704094226.GI17705@kitsune.suse.cz \
    --to=msuchanek@suse.de \
    --cc=andre.przywara@arm.com \
    --cc=andy.yan@rock-chips.com \
    --cc=igor.opaniuk@foundries.io \
    --cc=jagan@amarulasolutions.com \
    --cc=kever.yang@rock-chips.com \
    --cc=michal.simek@amd.com \
    --cc=philipp.tomsich@vrull.eu \
    --cc=samuel@sholland.org \
    --cc=sjg@chromium.org \
    --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