mail archive of the barebox mailing list
 help / color / mirror / Atom feed
* [PATCH] ARM: i.MX: karo-tx6: use mmcboot handler
@ 2025-10-21 14:41 Fabian Pfitzner
  2025-10-21 15:27 ` [PATCH] fixup! " Ahmad Fatoum
                   ` (2 more replies)
  0 siblings, 3 replies; 4+ messages in thread
From: Fabian Pfitzner @ 2025-10-21 14:41 UTC (permalink / raw)
  To: barebox; +Cc: Fabian Pfitzner

Use the mmcboot handler instead. This handler automatically determines
the boot partition by considering the partition's state, thus avoiding
to specify it manually.

Signed-off-by: Fabian Pfitzner <f.pfitzner@pengutronix.de>
---
 arch/arm/boards/karo-tx6x/board.c | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/arch/arm/boards/karo-tx6x/board.c b/arch/arm/boards/karo-tx6x/board.c
index f3ff59afb9..43e23f00cd 100644
--- a/arch/arm/boards/karo-tx6x/board.c
+++ b/arch/arm/boards/karo-tx6x/board.c
@@ -115,7 +115,7 @@ static int tx6x_devices_init(void)
 		of_device_enable_and_register_by_name("environment-nand");
 		of_device_enable_and_register_by_alias("nand");
 	} else {
-		imx6_bbu_internal_mmc_register_handler("eMMC", "/dev/mmc3.boot0",
+		imx6_bbu_internal_mmcboot_register_handler("eMMC", "/dev/mmc3",
 						       BBU_HANDLER_FLAG_DEFAULT);
 		of_device_enable_and_register_by_name("environment-emmc");
 		of_device_enable_and_register_by_alias("mmc3");
-- 
2.47.3




^ permalink raw reply	[flat|nested] 4+ messages in thread

* [PATCH] fixup! ARM: i.MX: karo-tx6: use mmcboot handler
  2025-10-21 14:41 [PATCH] ARM: i.MX: karo-tx6: use mmcboot handler Fabian Pfitzner
@ 2025-10-21 15:27 ` Ahmad Fatoum
  2025-10-21 15:28 ` [PATCH] " Ahmad Fatoum
  2025-10-22  6:30 ` Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2025-10-21 15:27 UTC (permalink / raw)
  To: barebox; +Cc: Ahmad Fatoum

Documentation: migration-2025.11.0: mention Karo bbu change

The existing method of hardcoding boot0 is not power-fail safe, so it's
hopefully not used by userspace to update the bootloader, but in any
case a warning sounds apt.

Signed-off-by: Ahmad Fatoum <a.fatoum@pengutronix.de>
---
 .../migration-guides/migration-2025.11.0.rst        | 13 +++++++++++++
 1 file changed, 13 insertions(+)

diff --git a/Documentation/migration-guides/migration-2025.11.0.rst b/Documentation/migration-guides/migration-2025.11.0.rst
index 9cbc46acc39b..a9c7abb66ef0 100644
--- a/Documentation/migration-guides/migration-2025.11.0.rst
+++ b/Documentation/migration-guides/migration-2025.11.0.rst
@@ -1,3 +1,6 @@
+Release v2025.11.0
+==================
+
 i.MX GPIOs
 ----------
 
@@ -5,3 +8,13 @@ Reading output GPIOs now returns the configured output level instead
 of reading back the input register. This aligns us with what Linux
 is doing, but may falsify readings of single-ended GPIOs that have
 the SION bit configured.
+
+Board support
+-------------
+
+Karo TX6X
+^^^^^^^^^
+
+The barebox update handler for this SoM no longer unconditionally updates
+/dev/mmc3.boot0, but instead it now updates the inactive boot partition
+on /dev/mmc3 and then sets it as active allowing for power-fail safety.
-- 
2.47.3




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ARM: i.MX: karo-tx6: use mmcboot handler
  2025-10-21 14:41 [PATCH] ARM: i.MX: karo-tx6: use mmcboot handler Fabian Pfitzner
  2025-10-21 15:27 ` [PATCH] fixup! " Ahmad Fatoum
@ 2025-10-21 15:28 ` Ahmad Fatoum
  2025-10-22  6:30 ` Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Ahmad Fatoum @ 2025-10-21 15:28 UTC (permalink / raw)
  To: Fabian Pfitzner, barebox

On 10/21/25 4:41 PM, Fabian Pfitzner wrote:
> Use the mmcboot handler instead. This handler automatically determines
> the boot partition by considering the partition's state, thus avoiding
> to specify it manually.
> 
> Signed-off-by: Fabian Pfitzner <f.pfitzner@pengutronix.de>

Reviewed-by: Ahmad Fatoum <a.fatoum@pengutronix.de>

I think this is worth an entry in the migration guide. See the fixup I
just sent. I think Sascha can squash it if there are no other comments.

Cheers,
Ahmad

> ---
>  arch/arm/boards/karo-tx6x/board.c | 2 +-
>  1 file changed, 1 insertion(+), 1 deletion(-)
> 
> diff --git a/arch/arm/boards/karo-tx6x/board.c b/arch/arm/boards/karo-tx6x/board.c
> index f3ff59afb9..43e23f00cd 100644
> --- a/arch/arm/boards/karo-tx6x/board.c
> +++ b/arch/arm/boards/karo-tx6x/board.c
> @@ -115,7 +115,7 @@ static int tx6x_devices_init(void)
>  		of_device_enable_and_register_by_name("environment-nand");
>  		of_device_enable_and_register_by_alias("nand");
>  	} else {
> -		imx6_bbu_internal_mmc_register_handler("eMMC", "/dev/mmc3.boot0",
> +		imx6_bbu_internal_mmcboot_register_handler("eMMC", "/dev/mmc3",
>  						       BBU_HANDLER_FLAG_DEFAULT);
>  		of_device_enable_and_register_by_name("environment-emmc");
>  		of_device_enable_and_register_by_alias("mmc3");

-- 
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 |




^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: [PATCH] ARM: i.MX: karo-tx6: use mmcboot handler
  2025-10-21 14:41 [PATCH] ARM: i.MX: karo-tx6: use mmcboot handler Fabian Pfitzner
  2025-10-21 15:27 ` [PATCH] fixup! " Ahmad Fatoum
  2025-10-21 15:28 ` [PATCH] " Ahmad Fatoum
@ 2025-10-22  6:30 ` Sascha Hauer
  2 siblings, 0 replies; 4+ messages in thread
From: Sascha Hauer @ 2025-10-22  6:30 UTC (permalink / raw)
  To: barebox, Fabian Pfitzner


On Tue, 21 Oct 2025 16:41:07 +0200, Fabian Pfitzner wrote:
> Use the mmcboot handler instead. This handler automatically determines
> the boot partition by considering the partition's state, thus avoiding
> to specify it manually.
> 
> 

Applied, thanks!

[1/1] ARM: i.MX: karo-tx6: use mmcboot handler
      https://git.pengutronix.de/cgit/barebox/commit/?id=0fc72287d87f (link may not be stable)
[1/1] fixup! ARM: i.MX: karo-tx6: use mmcboot handler
      https://git.pengutronix.de/cgit/barebox/commit/?id=39754cd17d0b (link may not be stable)

Best regards,
-- 
Sascha Hauer <s.hauer@pengutronix.de>




^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2025-10-22  6:30 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-10-21 14:41 [PATCH] ARM: i.MX: karo-tx6: use mmcboot handler Fabian Pfitzner
2025-10-21 15:27 ` [PATCH] fixup! " Ahmad Fatoum
2025-10-21 15:28 ` [PATCH] " Ahmad Fatoum
2025-10-22  6:30 ` Sascha Hauer

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox