[PoC 231/241] global: Migrate CONFIG_U_BOOT_HDR_SIZE to CFG

Tom Rini
2022-11-20T14:29:40Z

board/freescale/common/fsl_chain_of_trust.c | 2 +-
drivers/mtd/nand/raw/fsl_ifc_spl.c | 2 +-
include/configs/T104xRDB.h | 4 ++--
include/configs/ls1021atsn.h | 6 +++---
include/configs/ls1021atwr.h | 6 +++---
include/configs/ls1043a_common.h | 8 ++++----
include/configs/ls1046a_common.h | 2 +-
include/configs/ls1088a_common.h | 2 +-
scripts/config_whitelist.txt | 2 +-
9 files changed, 17 insertions(+), 17 deletions(-)

diff --git a/board/freescale/common/fsl_chain_of_trust.c b/board/freescale/common/fsl_chain_of_trust.c
index 9ca350ed4689..9e0e61e0bac7 100644
--- a/board/freescale/common/fsl_chain_of_trust.c
+++ b/board/freescale/common/fsl_chain_of_trust.c
@@ -143,7 +143,7 @@ void __noreturn jump_to_image_no_args(struct spl_image_info *spl_image)
(image_entry_noargs_t)(unsigned long)spl_image->entry_point;

hdr_addr = (spl_image->entry_point + spl_image->size -
- CONFIG_U_BOOT_HDR_SIZE);
+ CFG_U_BOOT_HDR_SIZE);
spl_validate_uboot(hdr_addr, (uintptr_t)spl_image->entry_point);
/*
* In case of failure in validation, spl_validate_uboot would
diff --git a/drivers/mtd/nand/raw/fsl_ifc_spl.c b/drivers/mtd/nand/raw/fsl_ifc_spl.c
index 3b464ce10ce9..2df63c5fc3ee 100644
--- a/drivers/mtd/nand/raw/fsl_ifc_spl.c
+++ b/drivers/mtd/nand/raw/fsl_ifc_spl.c
@@ -281,7 +281,7 @@ void nand_boot(void)
#define CONFIG_U_BOOT_HDR_ADDR \
((CFG_SYS_NAND_U_BOOT_START + \
CFG_SYS_NAND_U_BOOT_SIZE) - \
- CONFIG_U_BOOT_HDR_SIZE)
+ CFG_U_BOOT_HDR_SIZE)
spl_validate_uboot(CONFIG_U_BOOT_HDR_ADDR,
CFG_SYS_NAND_U_BOOT_START);
/*
diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h
index 7b9669a6eb98..4691e99c8b82 100644
--- a/include/configs/T104xRDB.h
+++ b/include/configs/T104xRDB.h
@@ -20,13 +20,13 @@

#ifdef CONFIG_MTD_RAW_NAND
#ifdef CONFIG_NXP_ESBC
-#define CONFIG_U_BOOT_HDR_SIZE (16 << 10)
+#define CFG_U_BOOT_HDR_SIZE (16 << 10)
/*
* HDR would be appended at end of image and copied to DDR along
* with U-Boot image.
*/
#define CFG_SYS_NAND_U_BOOT_SIZE ((768 << 10) + \
- CONFIG_U_BOOT_HDR_SIZE)
+ CFG_U_BOOT_HDR_SIZE)
#else
#define CFG_SYS_NAND_U_BOOT_SIZE (768 << 10)
#endif
diff --git a/include/configs/ls1021atsn.h b/include/configs/ls1021atsn.h
index d4855819bd7f..728b1a08fafd 100644
--- a/include/configs/ls1021atsn.h
+++ b/include/configs/ls1021atsn.h
@@ -40,17 +40,17 @@

#ifdef CONFIG_SD_BOOT
#ifdef CONFIG_NXP_ESBC
-#define CONFIG_U_BOOT_HDR_SIZE (16 << 10)
+#define CFG_U_BOOT_HDR_SIZE (16 << 10)
#endif /* ifdef CONFIG_NXP_ESBC */

-#ifdef CONFIG_U_BOOT_HDR_SIZE
+#ifdef CFG_U_BOOT_HDR_SIZE
/*
* HDR would be appended at end of image and copied to DDR along
* with U-Boot image. Here u-boot max. size is 512K. So if binary
* size increases then increase this size in case of secure boot as
* it uses raw U-Boot image instead of FIT image.
*/
-#endif /* ifdef CONFIG_U_BOOT_HDR_SIZE */
+#endif /* ifdef CFG_U_BOOT_HDR_SIZE */
#endif

#define PHYS_SDRAM 0x80000000
diff --git a/include/configs/ls1021atwr.h b/include/configs/ls1021atwr.h
index 128d80f48062..506f5ff1d10b 100644
--- a/include/configs/ls1021atwr.h
+++ b/include/configs/ls1021atwr.h
@@ -43,17 +43,17 @@
* HDR would be appended at end of image and copied to DDR along
* with U-Boot image.
*/
-#define CONFIG_U_BOOT_HDR_SIZE (16 << 10)
+#define CFG_U_BOOT_HDR_SIZE (16 << 10)
#endif /* ifdef CONFIG_NXP_ESBC */

-#ifdef CONFIG_U_BOOT_HDR_SIZE
+#ifdef CFG_U_BOOT_HDR_SIZE
/*
* HDR would be appended at end of image and copied to DDR along
* with U-Boot image. Here u-boot max. size is 512K. So if binary
* size increases then increase this size in case of secure boot as
* it uses raw u-boot image instead of fit image.
*/
-#endif /* ifdef CONFIG_U_BOOT_HDR_SIZE */
+#endif /* ifdef CFG_U_BOOT_HDR_SIZE */
#endif

#define PHYS_SDRAM 0x80000000
diff --git a/include/configs/ls1043a_common.h b/include/configs/ls1043a_common.h
index c79e113db4e4..674aa7e7cf40 100644
--- a/include/configs/ls1043a_common.h
+++ b/include/configs/ls1043a_common.h
@@ -45,7 +45,7 @@
/* SD boot SPL */
#ifdef CONFIG_SD_BOOT
#ifdef CONFIG_NXP_ESBC
-#define CONFIG_U_BOOT_HDR_SIZE (16 << 10)
+#define CFG_U_BOOT_HDR_SIZE (16 << 10)
/*
* HDR would be appended at end of image and copied to DDR along
* with U-Boot image. Here u-boot max. size is 512K. So if binary
@@ -61,17 +61,17 @@
#define CFG_SYS_NAND_U_BOOT_START CONFIG_TEXT_BASE

#ifdef CONFIG_NXP_ESBC
-#define CONFIG_U_BOOT_HDR_SIZE (16 << 10)
+#define CFG_U_BOOT_HDR_SIZE (16 << 10)
#endif /* ifdef CONFIG_NXP_ESBC */

-#ifdef CONFIG_U_BOOT_HDR_SIZE
+#ifdef CFG_U_BOOT_HDR_SIZE
/*
* HDR would be appended at end of image and copied to DDR along
* with U-Boot image. Here u-boot max. size is 512K. So if binary
* size increases then increase this size in case of secure boot as
* it uses raw u-boot image instead of fit image.
*/
-#endif /* ifdef CONFIG_U_BOOT_HDR_SIZE */
+#endif /* ifdef CFG_U_BOOT_HDR_SIZE */

#endif

diff --git a/include/configs/ls1046a_common.h b/include/configs/ls1046a_common.h
index e566ad4eed33..161b34e57a2f 100644
--- a/include/configs/ls1046a_common.h
+++ b/include/configs/ls1046a_common.h
@@ -45,7 +45,7 @@
/* SD boot SPL */
#ifdef CONFIG_SD_BOOT
#ifdef CONFIG_NXP_ESBC
-#define CONFIG_U_BOOT_HDR_SIZE (16 << 10)
+#define CFG_U_BOOT_HDR_SIZE (16 << 10)
/*
* HDR would be appended at end of image and copied to DDR along
* with U-Boot image. Here u-boot max. size is 512K. So if binary
diff --git a/include/configs/ls1088a_common.h b/include/configs/ls1088a_common.h
index e229ba2eea64..49686b4f160f 100644
--- a/include/configs/ls1088a_common.h
+++ b/include/configs/ls1088a_common.h
@@ -136,7 +136,7 @@ unsigned long long get_qixis_addr(void);

#ifdef CONFIG_SPL
#ifdef CONFIG_NXP_ESBC
-#define CONFIG_U_BOOT_HDR_SIZE (16 << 10)
+#define CFG_U_BOOT_HDR_SIZE (16 << 10)
/*
* HDR would be appended at end of image and copied to DDR along
* with U-Boot image. Here u-boot max. size is 512K. So if binary
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index ea722d3e2798..c5c22db16c1c 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -245,7 +245,7 @@ CFG_USB_BOOTING
CFG_USB_EXT2_BOOT
CFG_USB_FAT_BOOT
CFG_USB_ISP1301_I2C_ADDR
-CONFIG_U_BOOT_HDR_SIZE
+CFG_U_BOOT_HDR_SIZE
CONFIG_VAR_SIZE_SPL
CONFIG_VERY_BIG_RAM
CONFIG_VSC7385_IMAGE
--
2.25.1