From: Ahmad Fatoum <a.fatoum@pengutronix.de>
To: barebox@lists.infradead.org
Cc: ejo@pengutronix.de, Ahmad Fatoum <a.fatoum@pengutronix.de>
Subject: [PATCH] ARM: stm32mp: phycore: register barebox update handlers
Date: Fri, 25 Aug 2023 14:07:36 +0200 [thread overview]
Message-ID: <20230825120736.1508084-1-a.fatoum@pengutronix.de> (raw)
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(-)
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
next reply other threads:[~2023-08-25 12:09 UTC|newest]
Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top
2023-08-25 12:07 Ahmad Fatoum [this message]
2023-09-04 9:07 ` Sascha Hauer
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=20230825120736.1508084-1-a.fatoum@pengutronix.de \
--to=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