mirror of
https://source.denx.de/u-boot/u-boot.git
synced 2025-12-24 02:42:18 +01:00
Commit 86acdce2ba88 ("common: add config for board_init() call")
introduced CONFIG_BOARD_INIT option. This option can be disabled for the
boards where board_init() function is not needed. Remove empty
board_init() calls for all boards where it's possible, and disable
CONFIG_BOARD_INIT in all related defconfigs.
This cleanup was made semi-automatically using these scripts: [1].
No functional change, but the binary size for the modified boards is
reduced a bit.
[1] https://github.com/joe-skb7/uboot-convert-scripts/tree/master/remove-board-init
Signed-off-by: Sam Protsenko <semen.protsenko@linaro.org>
Tested-by: Adam Ford <aford173@gmail.com> #imx8mm_beacon
Tested-by: Bryan Brattlof <bb@ti.com>
Acked-by: Peng Fan <peng.fan@nxp.com> #NXP boards
44 lines
906 B
C
44 lines
906 B
C
// SPDX-License-Identifier: GPL-2.0+
|
|
/*
|
|
* Copyright 2019 NXP
|
|
*/
|
|
|
|
#include <asm/arch/sys_proto.h>
|
|
#include <config.h>
|
|
#include <efi_loader.h>
|
|
#include <env.h>
|
|
|
|
#if CONFIG_IS_ENABLED(EFI_HAVE_CAPSULE_SUPPORT)
|
|
#define IMX_BOOT_IMAGE_GUID \
|
|
EFI_GUID(0x928b33bc, 0xe58b, 0x4247, 0x9f, 0x1d, \
|
|
0x3b, 0xf1, 0xee, 0x1c, 0xda, 0xff)
|
|
|
|
struct efi_fw_image fw_images[] = {
|
|
{
|
|
.image_type_id = IMX_BOOT_IMAGE_GUID,
|
|
.fw_name = u"IMX8MP-EVK-RAW",
|
|
.image_index = 1,
|
|
},
|
|
};
|
|
|
|
struct efi_capsule_update_info update_info = {
|
|
.dfu_string = "mmc 2=flash-bin raw 0 0x2000 mmcpart 1",
|
|
.num_images = ARRAY_SIZE(fw_images),
|
|
.images = fw_images,
|
|
};
|
|
#endif /* EFI_HAVE_CAPSULE_SUPPORT */
|
|
|
|
int board_late_init(void)
|
|
{
|
|
#if CONFIG_IS_ENABLED(ENV_IS_IN_MMC)
|
|
board_late_mmc_env_init();
|
|
#endif
|
|
|
|
#ifdef CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG
|
|
env_set("board_name", "EVK");
|
|
env_set("board_rev", "iMX8MP");
|
|
#endif
|
|
|
|
return 0;
|
|
}
|