From: Andre Przywara <andre.przywara@arm.com>
To: Michal Suchanek <msuchanek@suse.de>,
Samuel Holland <samuel@sholland.org>
Cc: 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: Sun, 3 Jul 2022 23:22:51 +0100 [thread overview]
Message-ID: <20220703232251.12d4d251@slackpad.lan> (raw)
In-Reply-To: <cover.1656875482.git.msuchanek@suse.de>
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?
For more details see the reply to the actual (sunxi) patch.
Cheers,
Andre
>
> Thanks
>
> Michal
>
> Andy Yan (1):
> cmd: boot: add brom cmd to reboot to brom dnl mode
>
> Michal Suchanek (1):
> cmd: boot: add brom cmd to reboot to FEL mode
>
> .../arm/include/asm/arch-rockchip/boot_mode.h | 1 +
> arch/arm/include/asm/arch-sunxi/cpu.h | 11 ++++++
> arch/arm/mach-sunxi/Kconfig | 18 ++++++++++
> arch/arm/mach-sunxi/board.c | 24 +++++++++++++
> cmd/boot.c | 35 +++++++++++++++++++
> 5 files changed, 89 insertions(+)
>
next prev parent reply other threads:[~2022-07-03 22:23 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 ` Andre Przywara [this message]
2022-07-04 9:42 ` [PATCH 0/2] Command for entering mask rom USB download mode Michal Suchánek
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=20220703232251.12d4d251@slackpad.lan \
--to=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=msuchanek@suse.de \
--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