From 6889412ad5e78f207b7155d81ea6c334e417e21e Mon Sep 17 00:00:00 2001
From: Tom Rini <trini@konsulko.com>
Date: Thu, 12 May 2022 10:02:06 -0400
Subject: [PATCH] Convert CONFIG_SYS_BARGSIZE to Kconfig

This converts the following to Kconfig:
   CONFIG_SYS_BARGSIZE

Signed-off-by: Tom Rini <trini@konsulko.com>
---
 Kconfig                                     | 8 ++++++++
 README                                      | 4 ----
 boot/image-board.c                          | 6 ++----
 configs/eb_cpu5282_defconfig                | 1 +
 configs/eb_cpu5282_internal_defconfig       | 1 +
 configs/gazerbeam_defconfig                 | 1 +
 configs/ids8313_defconfig                   | 1 +
 configs/stmark2_defconfig                   | 1 +
 include/configs/am3517_evm.h                | 3 ---
 include/configs/apalis-imx8.h               | 2 --
 include/configs/apalis-tk1.h                | 4 ----
 include/configs/apalis_t30.h                | 4 ----
 include/configs/ax25-ae350.h                | 5 -----
 include/configs/bcm_ns3.h                   | 2 --
 include/configs/capricorn-common.h          | 3 ---
 include/configs/ci20.h                      | 3 ---
 include/configs/colibri-imx8x.h             | 2 --
 include/configs/colibri_t20.h               | 4 ----
 include/configs/colibri_t30.h               | 4 ----
 include/configs/colibri_vf.h                | 1 -
 include/configs/da850evm.h                  | 1 -
 include/configs/devkit3250.h                | 1 -
 include/configs/devkit8000.h                | 2 --
 include/configs/display5.h                  | 2 --
 include/configs/eb_cpu5282.h                | 2 --
 include/configs/edison.h                    | 2 --
 include/configs/exynos-common.h             | 3 ---
 include/configs/exynos7420-common.h         | 3 ---
 include/configs/exynos78x0-common.h         | 3 ---
 include/configs/gazerbeam.h                 | 2 --
 include/configs/highbank.h                  | 1 -
 include/configs/ids8313.h                   | 1 -
 include/configs/imx27lite-common.h          | 3 ---
 include/configs/imx8mm-cl-iot-gate.h        | 2 --
 include/configs/imx8mm_beacon.h             | 1 -
 include/configs/imx8mm_data_modul_edm_sbc.h | 2 --
 include/configs/imx8mm_evk.h                | 2 --
 include/configs/imx8mm_icore_mx8mm.h        | 2 --
 include/configs/imx8mm_venice.h             | 4 +++-
 include/configs/imx8mn_beacon.h             | 1 -
 include/configs/imx8mn_bsh_smm_s2_common.h  | 2 --
 include/configs/imx8mn_evk.h                | 2 --
 include/configs/imx8mn_var_som.h            | 2 --
 include/configs/imx8mn_venice.h             | 4 +++-
 include/configs/imx8mp_dhcom_pdk2.h         | 3 ---
 include/configs/imx8mp_evk.h                | 2 --
 include/configs/imx8mp_rsb3720.h            | 2 --
 include/configs/imx8mp_venice.h             | 2 --
 include/configs/imx8mq_cm.h                 | 2 --
 include/configs/imx8mq_evk.h                | 2 --
 include/configs/imx8mq_phanbell.h           | 2 --
 include/configs/imx8qxp_mek.h               | 1 -
 include/configs/imx8ulp_evk.h               | 2 --
 include/configs/km/keymile-common.h         | 1 -
 include/configs/legoev3.h                   | 1 -
 include/configs/ls1021atsn.h                | 2 --
 include/configs/ls1028a_common.h            | 2 --
 include/configs/ls1088a_common.h            | 2 --
 include/configs/lx2160a_common.h            | 2 --
 include/configs/m53menlo.h                  | 2 --
 include/configs/mx53ppd.h                   | 2 --
 include/configs/mxs.h                       | 2 --
 include/configs/octeontx2_common.h          | 2 --
 include/configs/octeontx_common.h           | 2 --
 include/configs/omapl138_lcdk.h             | 1 -
 include/configs/owl-common.h                | 1 -
 include/configs/phycore_imx8mm.h            | 2 --
 include/configs/phycore_imx8mp.h            | 2 --
 include/configs/pico-imx8mq.h               | 2 --
 include/configs/presidio_asic.h             | 1 -
 include/configs/rcar-gen3-common.h          | 1 -
 include/configs/s5p4418_nanopi2.h           | 3 ---
 include/configs/siemens-am33x-common.h      | 3 ---
 include/configs/socfpga_common.h            | 2 --
 include/configs/socfpga_soc64_common.h      | 1 -
 include/configs/stmark2.h                   | 3 ---
 include/configs/tegra-common.h              | 3 ---
 include/configs/ti_armv7_common.h           | 3 ---
 include/configs/tplink_wdr4300.h            | 2 --
 include/configs/uniphier.h                  | 3 ---
 include/configs/verdin-imx8mm.h             | 2 --
 include/configs/verdin-imx8mp.h             | 2 --
 include/configs/work_92105.h                | 1 -
 include/configs/xenguest_arm64.h            | 2 --
 include/configs/xilinx_versal.h             | 1 -
 include/configs/xilinx_zynqmp.h             | 1 -
 include/configs/xtfpga.h                    | 3 ---
 87 files changed, 21 insertions(+), 172 deletions(-)

diff --git a/Kconfig b/Kconfig
index f7e3c332f0..f017968918 100644
--- a/Kconfig
+++ b/Kconfig
@@ -228,6 +228,14 @@ config SYS_BOOT_GET_CMDLINE
 	  Enables allocating and saving kernel cmdline in space between
 	  "bootm_low" and "bootm_low" + BOOTMAPSZ.
 
+config SYS_BARGSIZE
+	int "Size of kernel command line buffer in bytes"
+	depends on SYS_BOOT_GET_CMDLINE
+	default 512
+	help
+	  Buffer size for Boot Arguments which are passed to the application
+	  (usually a Linux kernel) when it is booted
+
 config SYS_BOOT_GET_KBD
 	bool "Enable kernel board information setup"
 	help
diff --git a/README b/README
index e738fa9273..e686839637 100644
--- a/README
+++ b/README
@@ -1853,10 +1853,6 @@ Configuration Settings:
 - CONFIG_SYS_PROMPT:	This is what U-Boot prints on the console to
 		prompt for user input.
 
-- CONFIG_SYS_BARGSIZE: Buffer size for Boot Arguments which are passed to
-		the application (usually a Linux kernel) when it is
-		booted
-
 - CONFIG_SYS_BAUDRATE_TABLE:
 		List of legal baudrate settings for this board.
 
diff --git a/boot/image-board.c b/boot/image-board.c
index 0d2e0fc969..cfc1c658e3 100644
--- a/boot/image-board.c
+++ b/boot/image-board.c
@@ -21,10 +21,6 @@
 #include <asm/cache.h>
 #include <asm/global_data.h>
 
-#ifndef CONFIG_SYS_BARGSIZE
-#define CONFIG_SYS_BARGSIZE 512
-#endif
-
 DECLARE_GLOBAL_DATA_PTR;
 
 #if CONFIG_IS_ENABLED(LEGACY_IMAGE_FORMAT)
@@ -827,6 +823,7 @@ int boot_get_loadable(int argc, char *const argv[], bootm_headers_t *images,
 	return 0;
 }
 
+#ifdef CONFIG_SYS_BOOT_GET_CMDLINE
 /**
  * boot_get_cmdline - allocate and initialize kernel cmdline
  * @lmb: pointer to lmb handle, will be used for memory mgmt
@@ -900,6 +897,7 @@ int boot_get_kbd(struct lmb *lmb, struct bd_info **kbd)
 
 	return 0;
 }
+#endif
 
 int image_setup_linux(bootm_headers_t *images)
 {
diff --git a/configs/eb_cpu5282_defconfig b/configs/eb_cpu5282_defconfig
index f8c0198d25..5a33e2f0ae 100644
--- a/configs/eb_cpu5282_defconfig
+++ b/configs/eb_cpu5282_defconfig
@@ -7,6 +7,7 @@ CONFIG_SYS_LOAD_ADDR=0x20000
 CONFIG_ENV_ADDR=0xFF040000
 CONFIG_TARGET_EB_CPU5282=y
 CONFIG_MCFTMR=y
+CONFIG_SYS_BARGSIZE=1024
 CONFIG_SYS_MONITOR_BASE=0xFF000400
 CONFIG_BOOTDELAY=5
 CONFIG_BOOT_RETRY=y
diff --git a/configs/eb_cpu5282_internal_defconfig b/configs/eb_cpu5282_internal_defconfig
index 93b860d837..d23b7170cd 100644
--- a/configs/eb_cpu5282_internal_defconfig
+++ b/configs/eb_cpu5282_internal_defconfig
@@ -7,6 +7,7 @@ CONFIG_SYS_LOAD_ADDR=0x20000
 CONFIG_ENV_ADDR=0xFF040000
 CONFIG_TARGET_EB_CPU5282=y
 CONFIG_MCFTMR=y
+CONFIG_SYS_BARGSIZE=1024
 CONFIG_SYS_MONITOR_BASE=0xF0000418
 CONFIG_BOOTDELAY=5
 CONFIG_BOOT_RETRY=y
diff --git a/configs/gazerbeam_defconfig b/configs/gazerbeam_defconfig
index 2f3b29e991..c48541a9ec 100644
--- a/configs/gazerbeam_defconfig
+++ b/configs/gazerbeam_defconfig
@@ -112,6 +112,7 @@ CONFIG_SYS_FPGA_FLAVOR_GAZERBEAM=y
 CONFIG_CMD_IOLOOP=y
 CONFIG_SYS_MEMTEST_START=0x00001000
 CONFIG_SYS_MEMTEST_END=0x07e00000
+CONFIG_SYS_BARGSIZE=1024
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_FIT_VERBOSE=y
diff --git a/configs/ids8313_defconfig b/configs/ids8313_defconfig
index c885de7663..b8070e7351 100644
--- a/configs/ids8313_defconfig
+++ b/configs/ids8313_defconfig
@@ -119,6 +119,7 @@ CONFIG_ACR_PIPE_DEP_4=y
 CONFIG_ACR_RPTCNT_4=y
 CONFIG_LCRR_EADC_1=y
 CONFIG_LCRR_CLKDIV_2=y
+CONFIG_SYS_BARGSIZE=1024
 CONFIG_FIT=y
 CONFIG_FIT_SIGNATURE=y
 CONFIG_LEGACY_IMAGE_FORMAT=y
diff --git a/configs/stmark2_defconfig b/configs/stmark2_defconfig
index 64ac6614e9..e56ca93d4b 100644
--- a/configs/stmark2_defconfig
+++ b/configs/stmark2_defconfig
@@ -8,6 +8,7 @@ CONFIG_DEFAULT_DEVICE_TREE="stmark2"
 CONFIG_SYS_LOAD_ADDR=0x40010000
 CONFIG_TARGET_STMARK2=y
 CONFIG_MCFTMR=y
+CONFIG_SYS_BARGSIZE=256
 CONFIG_TIMESTAMP=y
 CONFIG_SYS_MONITOR_BASE=0x47E00400
 CONFIG_USE_BOOTARGS=y
diff --git a/include/configs/am3517_evm.h b/include/configs/am3517_evm.h
index 8b96f81683..db3298781d 100644
--- a/include/configs/am3517_evm.h
+++ b/include/configs/am3517_evm.h
@@ -86,9 +86,6 @@
 
 /* Miscellaneous configurable options */
 
-/* Boot Argument Buffer Size */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 /* memtest works on */
 
 /* Physical Memory Map */
diff --git a/include/configs/apalis-imx8.h b/include/configs/apalis-imx8.h
index 837c344b7a..3a0d19613b 100644
--- a/include/configs/apalis-imx8.h
+++ b/include/configs/apalis-imx8.h
@@ -73,6 +73,4 @@
 #define PHYS_SDRAM_1_SIZE		SZ_2G		/* 2 GB */
 #define PHYS_SDRAM_2_SIZE		SZ_2G		/* 2 GB */
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 #endif /* __APALIS_IMX8_H */
diff --git a/include/configs/apalis-tk1.h b/include/configs/apalis-tk1.h
index ee9e9b2103..19e6a1e04e 100644
--- a/include/configs/apalis-tk1.h
+++ b/include/configs/apalis-tk1.h
@@ -89,10 +89,6 @@
 		"source ${loadaddr}\0" \
 	"vidargs=fbcon=map:1\0"
 
-/* Increase arguments buffer size */
-#undef CONFIG_SYS_BARGSIZE
-#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
-
 #include "tegra-common-post.h"
 
 #endif /* __CONFIG_H */
diff --git a/include/configs/apalis_t30.h b/include/configs/apalis_t30.h
index 46ccea9c3e..104c4135e2 100644
--- a/include/configs/apalis_t30.h
+++ b/include/configs/apalis_t30.h
@@ -26,10 +26,6 @@
 /* PCI networking support */
 #define CONFIG_E1000_NO_NVM
 
-/* Increase arguments buffer size */
-#undef CONFIG_SYS_BARGSIZE
-#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
-
 #define UBOOT_UPDATE \
 	"uboot_hwpart=1\0" \
 	"uboot_blk=0\0" \
diff --git a/include/configs/ax25-ae350.h b/include/configs/ax25-ae350.h
index 16545ca941..633be8f614 100644
--- a/include/configs/ax25-ae350.h
+++ b/include/configs/ax25-ae350.h
@@ -30,11 +30,6 @@
  * Miscellaneous configurable options
  */
 
-/*
- * Boot Argument Buffer Size
- */
-#define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE
-
 /* DT blob (fdt) address */
 #define CONFIG_SYS_FDT_BASE		0x800f0000
 
diff --git a/include/configs/bcm_ns3.h b/include/configs/bcm_ns3.h
index 85d8e31ef0..87c9f5e2dd 100644
--- a/include/configs/bcm_ns3.h
+++ b/include/configs/bcm_ns3.h
@@ -29,8 +29,6 @@
 /* console configuration */
 #define CONFIG_SYS_NS16550_CLK		25000000
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 /*
  * Increase max uncompressed/gunzip size, keeping size same as EMMC linux
  * partition.
diff --git a/include/configs/capricorn-common.h b/include/configs/capricorn-common.h
index 5731a9e111..63d02c5b44 100644
--- a/include/configs/capricorn-common.h
+++ b/include/configs/capricorn-common.h
@@ -117,9 +117,6 @@
 #define PHYS_SDRAM_1_SIZE		0x40000000	/* 1 GB */
 #define PHYS_SDRAM_2_SIZE		0x00000000	/* 0 GB */
 
-/* Console buffer and boot args */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 #define BOOTAUX_RESERVED_MEM_BASE	0x88000000
 #define BOOTAUX_RESERVED_MEM_SIZE	SZ_128M /* Reserve from second 128MB */
 
diff --git a/include/configs/ci20.h b/include/configs/ci20.h
index 016e107930..4af11496cb 100644
--- a/include/configs/ci20.h
+++ b/include/configs/ci20.h
@@ -28,9 +28,6 @@
 #define DM9000_IO			CONFIG_DM9000_BASE
 #define DM9000_DATA			(CONFIG_DM9000_BASE + 2)
 
-#define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE
-						/* Boot argument buffer size */
-
 /* Miscellaneous configuration options */
 #define CONFIG_SYS_BOOTM_LEN		(64 << 20)
 
diff --git a/include/configs/colibri-imx8x.h b/include/configs/colibri-imx8x.h
index c94c704dc7..852e816587 100644
--- a/include/configs/colibri-imx8x.h
+++ b/include/configs/colibri-imx8x.h
@@ -106,8 +106,6 @@
 #define PHYS_SDRAM_1_SIZE		SZ_2G		/* 2 GB */
 #define PHYS_SDRAM_2_SIZE		0x00000000	/* 0 GB */
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 /* Generic Timer Definitions */
 
 #define BOOTAUX_RESERVED_MEM_BASE 0x88000000
diff --git a/include/configs/colibri_t20.h b/include/configs/colibri_t20.h
index 315e95998f..1e6561dc28 100644
--- a/include/configs/colibri_t20.h
+++ b/include/configs/colibri_t20.h
@@ -28,10 +28,6 @@
 	"mtdparts=" CONFIG_MTDPARTS_DEFAULT "\0" \
 	UBOOT_UPDATE
 
-/* Increase arguments buffer size */
-#undef CONFIG_SYS_BARGSIZE
-#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
-
 #include "tegra-common-post.h"
 
 #endif /* __CONFIG_H */
diff --git a/include/configs/colibri_t30.h b/include/configs/colibri_t30.h
index 36e01dd9d8..c9d384e2bd 100644
--- a/include/configs/colibri_t30.h
+++ b/include/configs/colibri_t30.h
@@ -24,10 +24,6 @@
 #define CONFIG_TEGRA_ENABLE_UARTA
 #define CONFIG_SYS_NS16550_COM1		NV_PA_APB_UARTA_BASE
 
-/* Increase arguments buffer size */
-#undef CONFIG_SYS_BARGSIZE
-#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
-
 #define UBOOT_UPDATE \
 	"uboot_hwpart=1\0" \
 	"uboot_blk=0\0" \
diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h
index d739e461e7..7c313f94fe 100644
--- a/include/configs/colibri_vf.h
+++ b/include/configs/colibri_vf.h
@@ -82,7 +82,6 @@
 	"video-mode=dcufb:640x480-16@60,monitor=lcd\0"
 
 /* Miscellaneous configurable options */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
 
 /* Physical memory map */
 #define PHYS_SDRAM			(0x80000000)
diff --git a/include/configs/da850evm.h b/include/configs/da850evm.h
index 842158ae6d..12f5bbf512 100644
--- a/include/configs/da850evm.h
+++ b/include/configs/da850evm.h
@@ -148,7 +148,6 @@
 /*
  * U-Boot general configuration
  */
-#define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE /* Boot Args Buffer Size */
 
 /*
  * Linux Information
diff --git a/include/configs/devkit3250.h b/include/configs/devkit3250.h
index 5e8310c193..93a704cc31 100644
--- a/include/configs/devkit3250.h
+++ b/include/configs/devkit3250.h
@@ -64,7 +64,6 @@
 /*
  * U-Boot General Configurations
  */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
 
 /*
  * Pass open firmware flat tree
diff --git a/include/configs/devkit8000.h b/include/configs/devkit8000.h
index 5dbd126a2a..efb20eacd1 100644
--- a/include/configs/devkit8000.h
+++ b/include/configs/devkit8000.h
@@ -111,8 +111,6 @@
 			"fi; " \
 		"else run nandboot; fi\0"
 
-/* Boot Argument Buffer Size */
-
 /* Defines for SPL */
 
 /* NAND boot config */
diff --git a/include/configs/display5.h b/include/configs/display5.h
index 3737503c0c..93dcec5612 100644
--- a/include/configs/display5.h
+++ b/include/configs/display5.h
@@ -285,8 +285,6 @@
 
 /* Miscellaneous configurable options */
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 #define CONFIG_STANDALONE_LOAD_ADDR	0x10001000
 
 /* Physical Memory Map */
diff --git a/include/configs/eb_cpu5282.h b/include/configs/eb_cpu5282.h
index 5ad769cce9..9374928a9e 100644
--- a/include/configs/eb_cpu5282.h
+++ b/include/configs/eb_cpu5282.h
@@ -29,8 +29,6 @@
  * Environment is in the second sector of the first 256k of flash	*
  *----------------------------------------------------------------------*/
 
-#define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE
-
 /*#define CONFIG_SYS_DRAM_TEST		1 */
 #undef CONFIG_SYS_DRAM_TEST
 
diff --git a/include/configs/edison.h b/include/configs/edison.h
index a6ec6389b0..34536ecf85 100644
--- a/include/configs/edison.h
+++ b/include/configs/edison.h
@@ -10,8 +10,6 @@
 
 /* Miscellaneous configurable options */
 
-#define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE
-
 #define CONFIG_SYS_STACK_SIZE			(32 * 1024)
 
 #define CONFIG_SYS_MONITOR_LEN			(256 * 1024)
diff --git a/include/configs/exynos-common.h b/include/configs/exynos-common.h
index 7411552b9b..cbcef261f4 100644
--- a/include/configs/exynos-common.h
+++ b/include/configs/exynos-common.h
@@ -27,7 +27,4 @@
 
 /* Miscellaneous configurable options */
 
-/* Boot Argument Buffer Size */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 #endif	/* __CONFIG_H */
diff --git a/include/configs/exynos7420-common.h b/include/configs/exynos7420-common.h
index f9db9a269f..e8aed56710 100644
--- a/include/configs/exynos7420-common.h
+++ b/include/configs/exynos7420-common.h
@@ -17,9 +17,6 @@
 
 /* Miscellaneous configurable options */
 
-/* Boot Argument Buffer Size */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 /* select serial console configuration */
 
 /* IRAM Layout */
diff --git a/include/configs/exynos78x0-common.h b/include/configs/exynos78x0-common.h
index b443370067..3c2a293e53 100644
--- a/include/configs/exynos78x0-common.h
+++ b/include/configs/exynos78x0-common.h
@@ -20,9 +20,6 @@
 
 /* Miscellaneous configurable options */
 
-/* Boot Argument Buffer Size */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 #define CPU_RELEASE_ADDR		secondary_boot_addr
 
 #define CONFIG_SYS_BAUDRATE_TABLE \
diff --git a/include/configs/gazerbeam.h b/include/configs/gazerbeam.h
index b158918577..040fd00bb3 100644
--- a/include/configs/gazerbeam.h
+++ b/include/configs/gazerbeam.h
@@ -58,8 +58,6 @@
  * Miscellaneous configurable options
  */
 
-#define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE
-
 /*
  * For booting Linux, the board info and command line data
  * have to be in the first 256 MB of memory, since this is
diff --git a/include/configs/highbank.h b/include/configs/highbank.h
index 98b17af489..200cba3e70 100644
--- a/include/configs/highbank.h
+++ b/include/configs/highbank.h
@@ -19,7 +19,6 @@
 /*
  * Miscellaneous configurable options
  */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
 
 #define CONFIG_SYS_64BIT_LBA
 
diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h
index 0bd09c00db..3fd441e30b 100644
--- a/include/configs/ids8313.h
+++ b/include/configs/ids8313.h
@@ -216,7 +216,6 @@
 /*
  * Miscellaneous configurable options
  */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
 
 #define CONFIG_LOADS_ECHO
 #undef	CONFIG_SYS_LOADS_BAUD_CHANGE
diff --git a/include/configs/imx27lite-common.h b/include/configs/imx27lite-common.h
index 0c8f9faba3..009c3cc5c1 100644
--- a/include/configs/imx27lite-common.h
+++ b/include/configs/imx27lite-common.h
@@ -106,9 +106,6 @@
 /*
  * U-Boot general configuration
  */
-/* Boot Argument Buffer Size */
-#define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE
-
 #define	CONFIG_EXTRA_ENV_SETTINGS					\
 	"netdev=eth0\0"							\
 	"nfsargs=setenv bootargs root=/dev/nfs rw "			\
diff --git a/include/configs/imx8mm-cl-iot-gate.h b/include/configs/imx8mm-cl-iot-gate.h
index 3b07e925d3..c8875daa92 100644
--- a/include/configs/imx8mm-cl-iot-gate.h
+++ b/include/configs/imx8mm-cl-iot-gate.h
@@ -147,8 +147,6 @@
 
 #define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(3)
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 /* USDHC */
 
 #define CONFIG_SYS_FSL_USDHC_NUM	2
diff --git a/include/configs/imx8mm_beacon.h b/include/configs/imx8mm_beacon.h
index e704fc5901..ddd19cc8ce 100644
--- a/include/configs/imx8mm_beacon.h
+++ b/include/configs/imx8mm_beacon.h
@@ -93,5 +93,4 @@
 
 #define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(2)
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
 #endif
diff --git a/include/configs/imx8mm_data_modul_edm_sbc.h b/include/configs/imx8mm_data_modul_edm_sbc.h
index deae85f58b..6c5dbd7dde 100644
--- a/include/configs/imx8mm_data_modul_edm_sbc.h
+++ b/include/configs/imx8mm_data_modul_edm_sbc.h
@@ -43,8 +43,6 @@
 
 #define CONFIG_MXC_UART_BASE		UART3_BASE_ADDR
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 /* PHY needs a longer autonegotiation timeout after reset */
 #define PHY_ANEG_TIMEOUT		20000
 
diff --git a/include/configs/imx8mm_evk.h b/include/configs/imx8mm_evk.h
index 6c6a5b2de0..5de1a77973 100644
--- a/include/configs/imx8mm_evk.h
+++ b/include/configs/imx8mm_evk.h
@@ -70,8 +70,6 @@
 
 #define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(2)
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 #define CONFIG_FEC_MXC_PHYADDR          0
 
 #endif
diff --git a/include/configs/imx8mm_icore_mx8mm.h b/include/configs/imx8mm_icore_mx8mm.h
index 590c764c07..63bd865398 100644
--- a/include/configs/imx8mm_icore_mx8mm.h
+++ b/include/configs/imx8mm_icore_mx8mm.h
@@ -68,8 +68,6 @@
 /* UART */
 #define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(2)
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 /* USDHC */
 #define CONFIG_SYS_FSL_USDHC_NUM	2
 #define CONFIG_SYS_FSL_ESDHC_ADDR	0
diff --git a/include/configs/imx8mm_venice.h b/include/configs/imx8mm_venice.h
index 51e3406b22..f69678f495 100644
--- a/include/configs/imx8mm_venice.h
+++ b/include/configs/imx8mm_venice.h
@@ -104,6 +104,8 @@
 /* UART */
 #define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(2)
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
+/* FEC */
+#define CONFIG_FEC_MXC_PHYADDR          0
+#define FEC_QUIRK_ENET_MAC
 
 #endif
diff --git a/include/configs/imx8mn_beacon.h b/include/configs/imx8mn_beacon.h
index 5b45de19d3..11dd56cfe7 100644
--- a/include/configs/imx8mn_beacon.h
+++ b/include/configs/imx8mn_beacon.h
@@ -109,5 +109,4 @@
 
 #define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(2)
 
-#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
 #endif
diff --git a/include/configs/imx8mn_bsh_smm_s2_common.h b/include/configs/imx8mn_bsh_smm_s2_common.h
index 8b5a277144..367b9ee060 100644
--- a/include/configs/imx8mn_bsh_smm_s2_common.h
+++ b/include/configs/imx8mn_bsh_smm_s2_common.h
@@ -47,8 +47,6 @@
 
 #define CONFIG_MXC_UART_BASE		UART4_BASE_ADDR
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 /* I2C */
 
 #endif /* __IMX8MN_BSH_SMM_S2_COMMON_H */
diff --git a/include/configs/imx8mn_evk.h b/include/configs/imx8mn_evk.h
index 4cc9ab025f..b0bcd02d1f 100644
--- a/include/configs/imx8mn_evk.h
+++ b/include/configs/imx8mn_evk.h
@@ -77,6 +77,4 @@
 
 #define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(2)
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 #endif
diff --git a/include/configs/imx8mn_var_som.h b/include/configs/imx8mn_var_som.h
index a518bbff73..7f7def8f26 100644
--- a/include/configs/imx8mn_var_som.h
+++ b/include/configs/imx8mn_var_som.h
@@ -66,8 +66,6 @@
 
 #define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(4)
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 /* USDHC */
 #define CONFIG_SYS_FSL_ESDHC_ADDR	0
 
diff --git a/include/configs/imx8mn_venice.h b/include/configs/imx8mn_venice.h
index 538b23ab0a..4641996fef 100644
--- a/include/configs/imx8mn_venice.h
+++ b/include/configs/imx8mn_venice.h
@@ -100,6 +100,8 @@
 /* UART */
 #define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(2)
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
+/* FEC */
+#define CONFIG_FEC_MXC_PHYADDR          0
+#define FEC_QUIRK_ENET_MAC
 
 #endif
diff --git a/include/configs/imx8mp_dhcom_pdk2.h b/include/configs/imx8mp_dhcom_pdk2.h
index d5df08fdeb..18ccc6f927 100644
--- a/include/configs/imx8mp_dhcom_pdk2.h
+++ b/include/configs/imx8mp_dhcom_pdk2.h
@@ -41,9 +41,6 @@
 
 #define CONFIG_MXC_UART_BASE		UART1_BASE_ADDR
 
-/* Monitor Command Prompt */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 /* PHY needs a longer autonegotiation timeout after reset */
 #define PHY_ANEG_TIMEOUT		20000
 #define FEC_QUIRK_ENET_MAC
diff --git a/include/configs/imx8mp_evk.h b/include/configs/imx8mp_evk.h
index e9392c64e4..3ec4fb1fdd 100644
--- a/include/configs/imx8mp_evk.h
+++ b/include/configs/imx8mp_evk.h
@@ -81,6 +81,4 @@
 
 #define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(2)
 
-#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
-
 #endif
diff --git a/include/configs/imx8mp_rsb3720.h b/include/configs/imx8mp_rsb3720.h
index bc0d2975b7..31f23e30a6 100644
--- a/include/configs/imx8mp_rsb3720.h
+++ b/include/configs/imx8mp_rsb3720.h
@@ -170,8 +170,6 @@
 
 #define CONFIG_MXC_UART_BASE		UART3_BASE_ADDR
 
-#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE
-
 #define CONFIG_SYS_FSL_USDHC_NUM	2
 #define CONFIG_SYS_FSL_ESDHC_ADDR	0
 
diff --git a/include/configs/imx8mp_venice.h b/include/configs/imx8mp_venice.h
index c910d42921..e693bbe688 100644
--- a/include/configs/imx8mp_venice.h
+++ b/include/configs/imx8mp_venice.h
@@ -100,8 +100,6 @@
 /* UART */
 #define CONFIG_MXC_UART_BASE		UART2_BASE_ADDR
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 /* FEC */
 #define FEC_QUIRK_ENET_MAC
 
diff --git a/include/configs/imx8mq_cm.h b/include/configs/imx8mq_cm.h
index ccaf76cbbc..b8c0717c7a 100644
--- a/include/configs/imx8mq_cm.h
+++ b/include/configs/imx8mq_cm.h
@@ -73,8 +73,6 @@
 
 #define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(1)
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 #define CONFIG_SYS_FSL_USDHC_NUM		2
 #define CONFIG_SYS_FSL_ESDHC_ADDR       0
 
diff --git a/include/configs/imx8mq_evk.h b/include/configs/imx8mq_evk.h
index 532fa773ba..32ea06cf9c 100644
--- a/include/configs/imx8mq_evk.h
+++ b/include/configs/imx8mq_evk.h
@@ -79,8 +79,6 @@
 
 #define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(1)
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 #define CONFIG_SYS_FSL_USDHC_NUM	2
 #define CONFIG_SYS_FSL_ESDHC_ADDR       0
 
diff --git a/include/configs/imx8mq_phanbell.h b/include/configs/imx8mq_phanbell.h
index 2b2829f2e1..fcfd794ea3 100644
--- a/include/configs/imx8mq_phanbell.h
+++ b/include/configs/imx8mq_phanbell.h
@@ -107,8 +107,6 @@
 
 #define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(1)
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 #define CONFIG_SYS_FSL_USDHC_NUM	2
 #define CONFIG_SYS_FSL_ESDHC_ADDR       0
 
diff --git a/include/configs/imx8qxp_mek.h b/include/configs/imx8qxp_mek.h
index c8decee033..8eb6ab8552 100644
--- a/include/configs/imx8qxp_mek.h
+++ b/include/configs/imx8qxp_mek.h
@@ -128,6 +128,5 @@
 #endif
 
 /* Misc configuration */
-#define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE
 
 #endif /* __IMX8QXP_MEK_H */
diff --git a/include/configs/imx8ulp_evk.h b/include/configs/imx8ulp_evk.h
index 3f99c6b414..66bf816ecf 100644
--- a/include/configs/imx8ulp_evk.h
+++ b/include/configs/imx8ulp_evk.h
@@ -70,8 +70,6 @@
 #define PHYS_SDRAM			0x80000000
 #define PHYS_SDRAM_SIZE			0x80000000 /* 2GB DDR */
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 /* Using ULP WDOG for reset */
 #define WDOG_BASE_ADDR			WDG3_RBASE
 #endif
diff --git a/include/configs/km/keymile-common.h b/include/configs/km/keymile-common.h
index 76895b4462..64d121bb5b 100644
--- a/include/configs/km/keymile-common.h
+++ b/include/configs/km/keymile-common.h
@@ -12,7 +12,6 @@
 /*
  * Miscellaneous configurable options
  */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
 
 #define CONFIG_HUSH_INIT_VAR
 
diff --git a/include/configs/legoev3.h b/include/configs/legoev3.h
index 8e0b6d1184..a717bb0ae7 100644
--- a/include/configs/legoev3.h
+++ b/include/configs/legoev3.h
@@ -50,7 +50,6 @@
 /*
  * U-Boot general configuration
  */
-#define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE /* Boot Args Buffer Size */
 
 /*
  * Linux Information
diff --git a/include/configs/ls1021atsn.h b/include/configs/ls1021atsn.h
index 2b90c1d696..577ba6dfc0 100644
--- a/include/configs/ls1021atsn.h
+++ b/include/configs/ls1021atsn.h
@@ -176,8 +176,6 @@
 /* Miscellaneous configurable options */
 #define CONFIG_SYS_BOOTMAPSZ		(256 << 20)
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 #define CONFIG_LS102XA_STREAM_ID
 
 #define CONFIG_SYS_INIT_SP_OFFSET \
diff --git a/include/configs/ls1028a_common.h b/include/configs/ls1028a_common.h
index e4b86c2240..5b198ad8df 100644
--- a/include/configs/ls1028a_common.h
+++ b/include/configs/ls1028a_common.h
@@ -58,8 +58,6 @@
 	"run emmc_hdploadcmd; run distro_bootcmd;run emmc_bootcmd; " \
 	"env exists secureboot && esbc_halt;"
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE /* Boot args buffer */
-
 #define CONFIG_SYS_BOOTM_LEN   (64 << 20)      /* Increase max gunzip size */
 
 #define OCRAM_NONSECURE_SIZE		0x00010000
diff --git a/include/configs/ls1088a_common.h b/include/configs/ls1088a_common.h
index a9922f15ab..78d3d57eec 100644
--- a/include/configs/ls1088a_common.h
+++ b/include/configs/ls1088a_common.h
@@ -148,8 +148,6 @@ unsigned long long get_qixis_addr(void);
 	" 0x580e00000 \0"
 #endif
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE /* Boot args buffer */
-
 #ifdef CONFIG_SPL
 #define CONFIG_SPL_BSS_START_ADDR      0x80100000
 #define CONFIG_SPL_BSS_MAX_SIZE                0x00100000
diff --git a/include/configs/lx2160a_common.h b/include/configs/lx2160a_common.h
index bc210dab91..5717a3dd31 100644
--- a/include/configs/lx2160a_common.h
+++ b/include/configs/lx2160a_common.h
@@ -115,8 +115,6 @@
 #define CONFIG_HWCONFIG
 #define HWCONFIG_BUFFER_SIZE		128
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE /* Boot args buffer */
-
 #define CONFIG_SYS_BOOTM_LEN   (64 << 20)      /* Increase max gunzip size */
 
 /* Initial environment variables */
diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h
index 50941b818d..0e89dae770 100644
--- a/include/configs/m53menlo.h
+++ b/include/configs/m53menlo.h
@@ -32,8 +32,6 @@
 /*
  * U-Boot general configurations
  */
-#define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE
-						/* Boot argument buffer size */
 
 /*
  * Serial Driver
diff --git a/include/configs/mx53ppd.h b/include/configs/mx53ppd.h
index 002a3e5adb..46b4cce3f8 100644
--- a/include/configs/mx53ppd.h
+++ b/include/configs/mx53ppd.h
@@ -87,8 +87,6 @@
 
 /* Miscellaneous configurable options */
 
-#define CONFIG_SYS_BARGSIZE CONFIG_SYS_CBSIZE /* Boot Argument Buffer Size */
-
 #define CONFIG_SYS_BOOTMAPSZ (256 << 20)     /* 256M */
 
 /* Physical Memory Map */
diff --git a/include/configs/mxs.h b/include/configs/mxs.h
index 7065992a86..5118c53ad3 100644
--- a/include/configs/mxs.h
+++ b/include/configs/mxs.h
@@ -78,8 +78,6 @@
  */
 
 /* U-Boot general configuration */
-#define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE
-						/* Boot argument buffer size */
 
 /*
  * Drivers
diff --git a/include/configs/octeontx2_common.h b/include/configs/octeontx2_common.h
index f30851cc87..4df3be1b1e 100644
--- a/include/configs/octeontx2_common.h
+++ b/include/configs/octeontx2_common.h
@@ -22,8 +22,6 @@
 					"ethrotate=yes\0"	\
 					"autoload=0\0"
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 #define CONFIG_SYS_MMC_MAX_BLK_COUNT	8192
 
 #if defined(CONFIG_MMC_OCTEONTX)
diff --git a/include/configs/octeontx_common.h b/include/configs/octeontx_common.h
index f79c1c4fdb..959f3d1347 100644
--- a/include/configs/octeontx_common.h
+++ b/include/configs/octeontx_common.h
@@ -53,8 +53,6 @@
 # define CONFIG_SYS_64BIT_LBA
 #endif
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 #define CONFIG_SYS_MMC_MAX_BLK_COUNT	8192
 
 /** EMMC specific defines */
diff --git a/include/configs/omapl138_lcdk.h b/include/configs/omapl138_lcdk.h
index a1264bf4db..b7698c8645 100644
--- a/include/configs/omapl138_lcdk.h
+++ b/include/configs/omapl138_lcdk.h
@@ -139,7 +139,6 @@
 /*
  * U-Boot general configuration
  */
-#define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE /* Boot Args Buffer Size */
 
 /*
  * USB Configs
diff --git a/include/configs/owl-common.h b/include/configs/owl-common.h
index d6948cca28..0372bd7c79 100644
--- a/include/configs/owl-common.h
+++ b/include/configs/owl-common.h
@@ -23,6 +23,5 @@
 #define CONFIG_SYS_INIT_SP_ADDR		(CONFIG_SYS_TEXT_BASE + 0x7ff00)
 
 /* Console configuration */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
 
 #endif
diff --git a/include/configs/phycore_imx8mm.h b/include/configs/phycore_imx8mm.h
index 4eec7fb208..df17531159 100644
--- a/include/configs/phycore_imx8mm.h
+++ b/include/configs/phycore_imx8mm.h
@@ -86,6 +86,4 @@
 /* UART */
 #define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(3)
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 #endif /* __PHYCORE_IMX8MM_H */
diff --git a/include/configs/phycore_imx8mp.h b/include/configs/phycore_imx8mp.h
index 6c59e7ba57..8247c7ce39 100644
--- a/include/configs/phycore_imx8mp.h
+++ b/include/configs/phycore_imx8mp.h
@@ -86,6 +86,4 @@
 /* UART */
 #define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(1)
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 #endif /* __PHYCORE_IMX8MP_H */
diff --git a/include/configs/pico-imx8mq.h b/include/configs/pico-imx8mq.h
index a586e60fec..d59f70a61a 100644
--- a/include/configs/pico-imx8mq.h
+++ b/include/configs/pico-imx8mq.h
@@ -86,8 +86,6 @@
 
 #define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(1)
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 #define CONFIG_SYS_FSL_USDHC_NUM	2
 #define CONFIG_SYS_FSL_ESDHC_ADDR	0
 
diff --git a/include/configs/presidio_asic.h b/include/configs/presidio_asic.h
index dd03c5c03c..fcec8b0038 100644
--- a/include/configs/presidio_asic.h
+++ b/include/configs/presidio_asic.h
@@ -42,7 +42,6 @@
 #define CONFIG_SYS_SDRAM_BASE		PHYS_SDRAM_1
 
 /* Console I/O Buffer Size */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
 
 #define KSEG1_ATU_XLAT(x) (x)
 
diff --git a/include/configs/rcar-gen3-common.h b/include/configs/rcar-gen3-common.h
index ae585bb2c0..e65ab72ca9 100644
--- a/include/configs/rcar-gen3-common.h
+++ b/include/configs/rcar-gen3-common.h
@@ -24,7 +24,6 @@
 #define GICC_BASE	0xF1020000
 
 /* console */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
 #define CONFIG_SYS_BAUDRATE_TABLE	{ 115200, 38400 }
 
 /* PHY needs a longer autoneg timeout */
diff --git a/include/configs/s5p4418_nanopi2.h b/include/configs/s5p4418_nanopi2.h
index a25dce59da..0c2b05dc8c 100644
--- a/include/configs/s5p4418_nanopi2.h
+++ b/include/configs/s5p4418_nanopi2.h
@@ -77,9 +77,6 @@
  */
 /* board_init_f->init_sequence, call arch_cpu_init */
 
-/* Boot Argument Buffer Size */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 /*-----------------------------------------------------------------------
  * serial console configuration
  */
diff --git a/include/configs/siemens-am33x-common.h b/include/configs/siemens-am33x-common.h
index 5757b63ab1..322fd24302 100644
--- a/include/configs/siemens-am33x-common.h
+++ b/include/configs/siemens-am33x-common.h
@@ -29,9 +29,6 @@
 
 /* Console I/O Buffer Size */
 
-/* Boot Argument Buffer Size */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 /*
  * memtest works on 8 MB in DRAM after skipping 32MB from
  * start addr of ram disk
diff --git a/include/configs/socfpga_common.h b/include/configs/socfpga_common.h
index 4a099837e9..e8ee53969c 100644
--- a/include/configs/socfpga_common.h
+++ b/include/configs/socfpga_common.h
@@ -60,8 +60,6 @@
  * U-Boot general configurations
  */
 						/* Print buffer size */
-#define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE
-						/* Boot argument buffer size */
 
 /*
  * Cache
diff --git a/include/configs/socfpga_soc64_common.h b/include/configs/socfpga_soc64_common.h
index 14cc708079..045e66492e 100644
--- a/include/configs/socfpga_soc64_common.h
+++ b/include/configs/socfpga_soc64_common.h
@@ -20,7 +20,6 @@
 /*
  * U-Boot console configurations
  */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
 
 /* Extend size of kernel image for uncompression */
 #define CONFIG_SYS_BOOTM_LEN		(32 * 1024 * 1024)
diff --git a/include/configs/stmark2.h b/include/configs/stmark2.h
index 9c453fce6f..a56bc4e154 100644
--- a/include/configs/stmark2.h
+++ b/include/configs/stmark2.h
@@ -45,9 +45,6 @@
 
 #define CONFIG_PRAM			2048	/* 2048 KB */
 
-/* Boot Argument Buffer Size    */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 #define CONFIG_SYS_MBAR			0xFC000000
 
 /*
diff --git a/include/configs/tegra-common.h b/include/configs/tegra-common.h
index 55c0f27d71..eb0359b4db 100644
--- a/include/configs/tegra-common.h
+++ b/include/configs/tegra-common.h
@@ -35,9 +35,6 @@
  */
 #define CONFIG_SYS_MMC_MAX_DEVICE 4
 
-/* Boot Argument Buffer Size */
-#define CONFIG_SYS_BARGSIZE		(CONFIG_SYS_CBSIZE)
-
 #ifdef CONFIG_ARM64
 #define FDTFILE "nvidia/" CONFIG_DEFAULT_DEVICE_TREE ".dtb"
 #else
diff --git a/include/configs/ti_armv7_common.h b/include/configs/ti_armv7_common.h
index 9e18a6c6d0..90dfb1feeb 100644
--- a/include/configs/ti_armv7_common.h
+++ b/include/configs/ti_armv7_common.h
@@ -89,9 +89,6 @@
 /* As stated above, the following choices are optional. */
 
 /* Console I/O Buffer Size */
-/* Boot Argument Buffer Size */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 /*
  * When we have SPI, NOR or NAND flash we expect to be making use of
  * mtdparts, both for ease of use in U-Boot and for passing information
diff --git a/include/configs/tplink_wdr4300.h b/include/configs/tplink_wdr4300.h
index 30f8376b7e..bdb77cfc2c 100644
--- a/include/configs/tplink_wdr4300.h
+++ b/include/configs/tplink_wdr4300.h
@@ -27,8 +27,6 @@
  * Command
  */
 /* Miscellaneous configurable options */
-#define CONFIG_SYS_BARGSIZE	CONFIG_SYS_CBSIZE
-						/* Boot argument buffer size */
 
 /* USB, USB storage, USB ethernet */
 #define CONFIG_EHCI_MMIO_BIG_ENDIAN
diff --git a/include/configs/uniphier.h b/include/configs/uniphier.h
index 9bea5a2607..cbdb2d91bd 100644
--- a/include/configs/uniphier.h
+++ b/include/configs/uniphier.h
@@ -41,9 +41,6 @@
 
 #define CONFIG_SYS_MONITOR_LEN		0x00200000	/* 2MB */
 
-/* Boot Argument Buffer Size */
-#define CONFIG_SYS_BARGSIZE		(CONFIG_SYS_CBSIZE)
-
 #if !defined(CONFIG_ARM64)
 /* Time clock 1MHz */
 #define CONFIG_SYS_TIMER_RATE			1000000
diff --git a/include/configs/verdin-imx8mm.h b/include/configs/verdin-imx8mm.h
index b251e2b925..c7de503aba 100644
--- a/include/configs/verdin-imx8mm.h
+++ b/include/configs/verdin-imx8mm.h
@@ -86,8 +86,6 @@
 /* UART */
 #define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(1)
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 /* ENET */
 #define CONFIG_FEC_MXC_PHYADDR          7
 
diff --git a/include/configs/verdin-imx8mp.h b/include/configs/verdin-imx8mp.h
index df6dc7447e..a61192f8f9 100644
--- a/include/configs/verdin-imx8mp.h
+++ b/include/configs/verdin-imx8mp.h
@@ -102,6 +102,4 @@
 /* UART */
 #define CONFIG_MXC_UART_BASE		UART_BASE_ADDR(3)
 
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 #endif /* __VERDIN_IMX8MP_H */
diff --git a/include/configs/work_92105.h b/include/configs/work_92105.h
index 9b7cc7a4c4..4d46ce024f 100644
--- a/include/configs/work_92105.h
+++ b/include/configs/work_92105.h
@@ -27,7 +27,6 @@
 /*
  * U-Boot General Configurations
  */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
 
 /*
  * NAND chip timings for FIXME: which one?
diff --git a/include/configs/xenguest_arm64.h b/include/configs/xenguest_arm64.h
index 322b2cfef8..364dae0cd9 100644
--- a/include/configs/xenguest_arm64.h
+++ b/include/configs/xenguest_arm64.h
@@ -13,8 +13,6 @@
 
 #undef CONFIG_SYS_SDRAM_BASE
 
-#define CONFIG_SYS_BARGSIZE           CONFIG_SYS_CBSIZE
-
 #undef CONFIG_EXTRA_ENV_SETTINGS
 #define CONFIG_EXTRA_ENV_SETTINGS	\
 	"loadimage=ext4load pvblock 0 0x90000000 /boot/Image;\0" \
diff --git a/include/configs/xilinx_versal.h b/include/configs/xilinx_versal.h
index d1e2753cbb..3221bd20a7 100644
--- a/include/configs/xilinx_versal.h
+++ b/include/configs/xilinx_versal.h
@@ -28,7 +28,6 @@
 /* Miscellaneous configurable options */
 
 /* Console I/O Buffer Size */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
 
 #if defined(CONFIG_CMD_DFU)
 #define DFU_DEFAULT_POLL_TIMEOUT	300
diff --git a/include/configs/xilinx_zynqmp.h b/include/configs/xilinx_zynqmp.h
index 2abf96f354..31a6beb011 100644
--- a/include/configs/xilinx_zynqmp.h
+++ b/include/configs/xilinx_zynqmp.h
@@ -52,7 +52,6 @@
 #endif
 
 /* Console I/O Buffer Size */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
 
 /* Ethernet driver */
 #if defined(CONFIG_ZYNQ_GEM)
diff --git a/include/configs/xtfpga.h b/include/configs/xtfpga.h
index 89b6d198d7..4218015c37 100644
--- a/include/configs/xtfpga.h
+++ b/include/configs/xtfpga.h
@@ -98,9 +98,6 @@
 /*==============================*/
 
 	/* Console I/O Buffer Size  */
-	/* Boot Argument Buffer Size */
-#define CONFIG_SYS_BARGSIZE		CONFIG_SYS_CBSIZE
-
 /*==============================*/
 /* U-Boot autoboot configuration */
 /*==============================*/
-- 
2.39.5