From: Sascha Hauer <sha@pengutronix.de>
To: Ahmad Fatoum <a.fatoum@pengutronix.de>
Cc: barebox@lists.infradead.org, ejo@pengutronix.de
Subject: Re: [PATCH] ARM: stm32mp: phycore: register barebox update handlers
Date: Mon, 4 Sep 2023 11:07:44 +0200 [thread overview]
Message-ID: <20230904090744.GD189379@pengutronix.de> (raw)
In-Reply-To: <20230825120736.1508084-1-a.fatoum@pengutronix.de>
On Fri, Aug 25, 2023 at 02:07:36PM +0200, Ahmad Fatoum wrote:
> We have barebox update handlers for updating barebox on SD (ssbl GPT
> partition) and on eMMC boot partition (with or without TF-A).
>
> Let's put them to use.
>
> Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
> ---
> Only build-tested. Waiting for ejo's Tested-by
> ---
> arch/arm/boards/phytec-phycore-stm32mp1/board.c | 13 +++++++++++--
> 1 file changed, 11 insertions(+), 2 deletions(-)
Applied, thanks
Sascha
>
> diff --git a/arch/arm/boards/phytec-phycore-stm32mp1/board.c b/arch/arm/boards/phytec-phycore-stm32mp1/board.c
> index 731880c3d16a..6b10ebbdb2e6 100644
> --- a/arch/arm/boards/phytec-phycore-stm32mp1/board.c
> +++ b/arch/arm/boards/phytec-phycore-stm32mp1/board.c
> @@ -2,13 +2,22 @@
> #include <common.h>
> #include <driver.h>
> #include <bootsource.h>
> +#include <mach/stm32mp/bbu.h>
>
> static int phycore_stm32mp1_probe(struct device *dev)
> {
> - if (bootsource_get_instance() == 0)
> + int sd_bbu_flags = 0, emmc_bbu_flags = 0;
> +
> + if (bootsource_get_instance() == 0) {
> of_device_enable_path("/chosen/environment-sd");
> - else
> + sd_bbu_flags = BBU_HANDLER_FLAG_DEFAULT;
> + } else {
> of_device_enable_path("/chosen/environment-emmc");
> + emmc_bbu_flags = BBU_HANDLER_FLAG_DEFAULT;
> + }
> +
> + stm32mp_bbu_mmc_register_handler("sd", "/dev/mmc0.ssbl", sd_bbu_flags);
> + stm32mp_bbu_mmc_fip_register("emmc", "/dev/mmc1", emmc_bbu_flags);
>
> barebox_set_hostname("phyCORE-STM32MP1");
>
> --
> 2.39.2
>
>
>
--
Pengutronix e.K. | |
Steuerwalder Str. 21 | http://www.pengutronix.de/ |
31137 Hildesheim, Germany | Phone: +49-5121-206917-0 |
Amtsgericht Hildesheim, HRA 2686 | Fax: +49-5121-206917-5555 |
prev parent reply other threads:[~2023-09-04 9:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-25 12:07 Ahmad Fatoum
2023-09-04 9:07 ` Sascha Hauer [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=20230904090744.GD189379@pengutronix.de \
--to=sha@pengutronix.de \
--cc=a.fatoum@pengutronix.de \
--cc=barebox@lists.infradead.org \
--cc=ejo@pengutronix.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