[PATCH] board: xilinx: Remove conditional check for Microblaze

Michal Simek michal.simek at amd.com
Fri Sep 20 15:07:02 CEST 2024



On 9/13/24 11:32, Padmarao Begari wrote:
> U-Boot is not picking boot.scr script address from device tree
> rather it's using default address for Microblaze platform,
> and it's picking for other platforms. Remove conditional check
> for Microblaze platform, so that u-boot pick up boot.scr script
> address for all platforms from device tree.
> 
> Signed-off-by: Padmarao Begari <padmarao.begari at amd.com>
> ---
>   board/xilinx/common/board.c | 39 +++++++++++++++++--------------------
>   1 file changed, 18 insertions(+), 21 deletions(-)
> 
> diff --git a/board/xilinx/common/board.c b/board/xilinx/common/board.c
> index 0b43407b9e..a217b39df6 100644
> --- a/board/xilinx/common/board.c
> +++ b/board/xilinx/common/board.c
> @@ -426,28 +426,25 @@ int board_late_init_xilinx(void)
>   	struct xilinx_board_description *desc;
>   	phys_size_t bootm_size = gd->ram_top - gd->ram_base;
>   	u64 bootscr_flash_offset, bootscr_flash_size;
> -
> -	if (!IS_ENABLED(CONFIG_MICROBLAZE)) {
> -		ulong scriptaddr;
> -		u64 bootscr_address;
> -		u64 bootscr_offset;
> -
> -		/* Fetch bootscr_address/bootscr_offset from DT and update */
> -		if (!ofnode_read_bootscript_address(&bootscr_address,
> -						    &bootscr_offset)) {
> -			if (bootscr_offset)
> -				ret |= env_set_hex("scriptaddr",
> -						   gd->ram_base +
> -						   bootscr_offset);
> -			else
> -				ret |= env_set_hex("scriptaddr",
> -						   bootscr_address);
> -		} else {
> -			/* Update scriptaddr(bootscr offset) from env */
> -			scriptaddr = env_get_hex("scriptaddr", 0);
> +	ulong scriptaddr;
> +	u64 bootscr_address;
> +	u64 bootscr_offset;
> +
> +	/* Fetch bootscr_address/bootscr_offset from DT and update */
> +	if (!ofnode_read_bootscript_address(&bootscr_address,
> +					    &bootscr_offset)) {
> +		if (bootscr_offset)
>   			ret |= env_set_hex("scriptaddr",
> -					   gd->ram_base + scriptaddr);
> -		}
> +					   gd->ram_base +
> +					   bootscr_offset);
> +		else
> +			ret |= env_set_hex("scriptaddr",
> +					   bootscr_address);
> +	} else {
> +		/* Update scriptaddr(bootscr offset) from env */
> +		scriptaddr = env_get_hex("scriptaddr", 0);
> +		ret |= env_set_hex("scriptaddr",
> +				   gd->ram_base + scriptaddr);
>   	}
>   
>   	if (!ofnode_read_bootscript_flash(&bootscr_flash_offset,

Applied.
M


More information about the U-Boot mailing list