[PATCH] ARM: stm32mp: phycore: register barebox update handlers

Sascha Hauer sha at pengutronix.de
Mon Sep 4 02:07:44 PDT 2023


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



More information about the barebox mailing list