[U-Boot] [PATCH 1/5] env: Remove useless CONFIG_ENV_SIZE_REDUND and fix ENV_IS_REDUND check
Tom Rini
trini at konsulko.com
Thu Nov 14 14:54:11 UTC 2019
We have CONFIG_ENV_SIZE_IS_REDUND but don't really use it. We have one
board where we can simply multiple CONFIG_ENV_SIZE by two for the same
result. The other place where we could but were not previously using
this is for where env_internal.h checks for if we should set
ENV_IS_EMBEDDED. This seems like the most likely use, historically, of
the variable, but it was not used. Add logic to check for this now.
Cc: Wolfgang Denk <wd at denx.de>
Cc: Joe Hershberger <joe.hershberger at ni.com>
Signed-off-by: Tom Rini <trini at konsulko.com>
---
board/gardena/smart-gateway-mt7688/board.c | 2 +-
env/Kconfig | 7 -------
env/flash.c | 5 -----
env/mmc.c | 5 -----
env/nand.c | 5 -----
env/sata.c | 2 +-
include/configs/MPC8308RDB.h | 1 -
include/configs/MPC8313ERDB_NAND.h | 1 -
include/configs/MPC8349EMDS.h | 1 -
include/configs/MPC8349EMDS_SDRAM.h | 1 -
include/configs/MigoR.h | 1 -
include/configs/TQM834x.h | 1 -
include/configs/UCP1020.h | 2 --
include/configs/am335x_shc.h | 1 -
include/configs/apf27.h | 1 -
include/configs/apx4devkit.h | 1 -
include/configs/armadillo-800eva.h | 1 -
include/configs/bk4r1.h | 1 -
include/configs/blanche.h | 1 -
include/configs/caddy2.h | 1 -
include/configs/condor.h | 1 -
include/configs/dh_imx6.h | 1 -
include/configs/display5.h | 1 -
include/configs/draco.h | 1 -
include/configs/eagle.h | 1 -
include/configs/edb93xx.h | 1 -
include/configs/etamin.h | 1 -
include/configs/flea3.h | 1 -
include/configs/gardena-smart-gateway-mt7688.h | 1 -
include/configs/gazerbeam.h | 1 -
include/configs/gw_ventana.h | 1 -
include/configs/hrcon.h | 1 -
include/configs/ids8313.h | 1 -
include/configs/imx27lite-common.h | 1 -
include/configs/km/km-mpc83xx.h | 1 -
include/configs/km/km_arm.h | 1 -
include/configs/kp_imx53.h | 1 -
include/configs/m53menlo.h | 1 -
include/configs/mccmon6.h | 1 -
include/configs/mpc8308_p1m.h | 1 -
include/configs/mx28evk.h | 1 -
include/configs/mx35pdk.h | 1 -
include/configs/novena.h | 1 -
include/configs/pcm052.h | 1 -
include/configs/pcm058.h | 1 -
include/configs/pfla02.h | 1 -
include/configs/platinum.h | 1 -
include/configs/rastaban.h | 1 -
include/configs/rcar-gen2-common.h | 1 -
include/configs/rcar-gen3-common.h | 1 -
include/configs/sbc8349.h | 1 -
include/configs/sh7752evb.h | 1 -
include/configs/sh7753evb.h | 1 -
include/configs/sh7757lcr.h | 1 -
include/configs/sh7763rdp.h | 1 -
include/configs/sksimx6.h | 1 -
include/configs/socfpga_vining_fpga.h | 1 -
include/configs/socrates.h | 1 -
include/configs/strider.h | 1 -
include/configs/tam3517-common.h | 1 -
include/configs/thuban.h | 1 -
include/configs/titanium.h | 1 -
include/configs/vcoreiii.h | 1 -
include/configs/vct.h | 1 -
include/configs/ve8313.h | 1 -
include/configs/vining_2000.h | 1 -
include/configs/vme8349.h | 1 -
include/configs/woodburn_common.h | 1 -
include/configs/x600.h | 1 -
include/env_internal.h | 7 +++++--
scripts/config_whitelist.txt | 1 -
tools/envcrc.c | 3 ---
72 files changed, 7 insertions(+), 94 deletions(-)
diff --git a/board/gardena/smart-gateway-mt7688/board.c b/board/gardena/smart-gateway-mt7688/board.c
index bd494c84fc80..7b9570714342 100644
--- a/board/gardena/smart-gateway-mt7688/board.c
+++ b/board/gardena/smart-gateway-mt7688/board.c
@@ -18,7 +18,7 @@
#define FACTORY_DATA_OFFS 0xc0000
#define FACTORY_DATA_SECT_SIZE 0x10000
-#if ((CONFIG_ENV_OFFSET_REDUND + CONFIG_ENV_SIZE_REDUND) > FACTORY_DATA_OFFS)
+#if ((CONFIG_ENV_OFFSET_REDUND * 2) > FACTORY_DATA_OFFS)
#error "U-Boot image with environment too big (overlapping with factory-data)!"
#endif
#define FACTORY_DATA_USER_OFFS 0x140
diff --git a/env/Kconfig b/env/Kconfig
index 337787051df8..0b97af42b1c8 100644
--- a/env/Kconfig
+++ b/env/Kconfig
@@ -132,7 +132,6 @@ config ENV_IS_IN_FLASH
RAM, your target system will be dead.
CONFIG_ENV_ADDR_REDUND
- CONFIG_ENV_SIZE_REDUND
These settings describe a second storage area used to hold
a redundant copy of the environment data, so that there is
@@ -195,12 +194,6 @@ config ENV_IS_IN_MMC
This value is also in units of bytes, but must also be aligned to
an MMC sector boundary.
- CONFIG_ENV_SIZE_REDUND (optional):
-
- This value need not be set, even when CONFIG_ENV_OFFSET_REDUND is
- set. If this value is set, it must be set to the same value as
- CONFIG_ENV_SIZE.
-
config ENV_IS_IN_NAND
bool "Environment in a NAND device"
depends on !CHAIN_OF_TRUST
diff --git a/env/flash.c b/env/flash.c
index 231a5fdf24d0..b94ed2b04f8d 100644
--- a/env/flash.c
+++ b/env/flash.c
@@ -28,11 +28,6 @@ DECLARE_GLOBAL_DATA_PTR;
# endif
#endif
-#if defined(CONFIG_ENV_SIZE_REDUND) && \
- (CONFIG_ENV_SIZE_REDUND < CONFIG_ENV_SIZE)
-#error CONFIG_ENV_SIZE_REDUND should not be less then CONFIG_ENV_SIZE
-#endif
-
/* TODO(sjg at chromium.org): Figure out all these special cases */
#if (!defined(CONFIG_MICROBLAZE) && !defined(CONFIG_ARCH_ZYNQ) && \
!defined(CONFIG_TARGET_MCCMON6) && !defined(CONFIG_TARGET_X600) && \
diff --git a/env/mmc.c b/env/mmc.c
index 9f1878def13a..fee9f0674edc 100644
--- a/env/mmc.c
+++ b/env/mmc.c
@@ -22,11 +22,6 @@
#define __STR(X) #X
#define STR(X) __STR(X)
-#if defined(CONFIG_ENV_SIZE_REDUND) && \
- (CONFIG_ENV_SIZE_REDUND != CONFIG_ENV_SIZE)
-#error CONFIG_ENV_SIZE_REDUND should be the same as CONFIG_ENV_SIZE
-#endif
-
DECLARE_GLOBAL_DATA_PTR;
#if !defined(CONFIG_ENV_OFFSET)
diff --git a/env/nand.c b/env/nand.c
index 9f3dc635cf1f..e631bf2fdab5 100644
--- a/env/nand.c
+++ b/env/nand.c
@@ -31,11 +31,6 @@
#error CONFIG_ENV_OFFSET_REDUND must have CONFIG_CMD_SAVEENV & CONFIG_CMD_NAND
#endif
-#if defined(CONFIG_ENV_SIZE_REDUND) && \
- (CONFIG_ENV_SIZE_REDUND != CONFIG_ENV_SIZE)
-#error CONFIG_ENV_SIZE_REDUND should be the same as CONFIG_ENV_SIZE
-#endif
-
#ifndef CONFIG_ENV_RANGE
#define CONFIG_ENV_RANGE CONFIG_ENV_SIZE
#endif
diff --git a/env/sata.c b/env/sata.c
index 93697100815d..8bfcc94306d3 100644
--- a/env/sata.c
+++ b/env/sata.c
@@ -16,7 +16,7 @@
#include <sata.h>
#include <search.h>
-#if defined(CONFIG_ENV_SIZE_REDUND) || defined(CONFIG_ENV_OFFSET_REDUND)
+#if defined(CONFIG_ENV_OFFSET_REDUND)
#error ENV REDUND not supported
#endif
diff --git a/include/configs/MPC8308RDB.h b/include/configs/MPC8308RDB.h
index 85d7ff6c5214..e4a51d2d27e2 100644
--- a/include/configs/MPC8308RDB.h
+++ b/include/configs/MPC8308RDB.h
@@ -253,7 +253,6 @@
#define CONFIG_ENV_SECT_SIZE 0x10000 /* 64K(one sector) for env */
#define CONFIG_ENV_SIZE 0x2000
#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
#define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
diff --git a/include/configs/MPC8313ERDB_NAND.h b/include/configs/MPC8313ERDB_NAND.h
index 4153d609be4a..fb09c2630f9c 100644
--- a/include/configs/MPC8313ERDB_NAND.h
+++ b/include/configs/MPC8313ERDB_NAND.h
@@ -300,7 +300,6 @@
#define CONFIG_ENV_OFFSET (512 * 1024)
#define CONFIG_ENV_SECT_SIZE CONFIG_SYS_NAND_BLOCK_SIZE
#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#define CONFIG_ENV_RANGE (CONFIG_ENV_SECT_SIZE * 4)
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE)
diff --git a/include/configs/MPC8349EMDS.h b/include/configs/MPC8349EMDS.h
index 7352e34b9c97..10293bd5f1b5 100644
--- a/include/configs/MPC8349EMDS.h
+++ b/include/configs/MPC8349EMDS.h
@@ -276,7 +276,6 @@
/* Address and size of Redundant Environment Sector */
#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
#else
#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
diff --git a/include/configs/MPC8349EMDS_SDRAM.h b/include/configs/MPC8349EMDS_SDRAM.h
index 2ae1069e4f8a..0193a6bfb736 100644
--- a/include/configs/MPC8349EMDS_SDRAM.h
+++ b/include/configs/MPC8349EMDS_SDRAM.h
@@ -331,7 +331,6 @@
/* Address and size of Redundant Environment Sector */
#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
#else
#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
diff --git a/include/configs/MigoR.h b/include/configs/MigoR.h
index 64172f36194e..fab355e1f2a4 100644
--- a/include/configs/MigoR.h
+++ b/include/configs/MigoR.h
@@ -83,7 +83,6 @@
#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN)
/* Offset of env Flash sector relative to CONFIG_SYS_FLASH_BASE */
#define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR - CONFIG_SYS_FLASH_BASE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SECT_SIZE)
/* Board Clock */
#define CONFIG_SYS_CLK_FREQ 33333333
diff --git a/include/configs/TQM834x.h b/include/configs/TQM834x.h
index 9bf5d9d3fd6b..c8537e03139e 100644
--- a/include/configs/TQM834x.h
+++ b/include/configs/TQM834x.h
@@ -191,7 +191,6 @@
#define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K (one sector) for env */
#define CONFIG_ENV_SIZE 0x8000 /* 32K max size */
#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
#define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
#define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
diff --git a/include/configs/UCP1020.h b/include/configs/UCP1020.h
index 40080f512b53..b2778a93c984 100644
--- a/include/configs/UCP1020.h
+++ b/include/configs/UCP1020.h
@@ -388,7 +388,6 @@
#if defined(CONFIG_SYS_REDUNDAND_ENVIRONMENT)
/* Address and size of Redundant Environment Sector */
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#endif
#elif defined(CONFIG_RAMBOOT_SDCARD)
@@ -408,7 +407,6 @@
#if defined(CONFIG_SYS_REDUNDAND_ENVIRONMENT)
/* Address and size of Redundant Environment Sector */
#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SIZE)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#endif
#endif
diff --git a/include/configs/am335x_shc.h b/include/configs/am335x_shc.h
index f4a000f0200d..b34e48cb454e 100644
--- a/include/configs/am335x_shc.h
+++ b/include/configs/am335x_shc.h
@@ -51,7 +51,6 @@
#define CONFIG_HSMMC2_8BIT
#define CONFIG_ENV_OFFSET_REDUND 0x9000 /* 36 kB */
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#ifndef CONFIG_SHC_ICT
/*
diff --git a/include/configs/apf27.h b/include/configs/apf27.h
index 044ce4467e58..16a257406321 100644
--- a/include/configs/apf27.h
+++ b/include/configs/apf27.h
@@ -71,7 +71,6 @@
#define CONFIG_ENV_RANGE 0X00080000 /* 512kB */
#define CONFIG_ENV_OFFSET_REDUND \
(CONFIG_ENV_OFFSET + CONFIG_ENV_RANGE) /* +512kB */
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE /* 512kB */
#define CONFIG_FIRMWARE_OFFSET 0x00200000
#define CONFIG_FIRMWARE_SIZE 0x00080000 /* 512kB */
#define CONFIG_KERNEL_OFFSET 0x00300000
diff --git a/include/configs/apx4devkit.h b/include/configs/apx4devkit.h
index 09de1c06ef67..66b616c80bb1 100644
--- a/include/configs/apx4devkit.h
+++ b/include/configs/apx4devkit.h
@@ -35,7 +35,6 @@
#if defined(CONFIG_CMD_NAND) && defined(CONFIG_ENV_IS_IN_NAND)
#define CONFIG_ENV_SECT_SIZE (128 * 1024)
#define CONFIG_ENV_SIZE (128 * 1024)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#define CONFIG_ENV_RANGE (384 * 1024)
#define CONFIG_ENV_OFFSET 0x120000
#define CONFIG_ENV_OFFSET_REDUND \
diff --git a/include/configs/armadillo-800eva.h b/include/configs/armadillo-800eva.h
index c3ccceedca97..dc611da035f4 100644
--- a/include/configs/armadillo-800eva.h
+++ b/include/configs/armadillo-800eva.h
@@ -75,7 +75,6 @@
CONFIG_SYS_MONITOR_LEN)
#define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR)
#define CONFIG_ENV_SIZE (CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SECT_SIZE)
/* SH Ether */
#define CONFIG_SH_ETHER_USE_PORT 0
diff --git a/include/configs/bk4r1.h b/include/configs/bk4r1.h
index 285e28b535e4..2575a0de3f93 100644
--- a/include/configs/bk4r1.h
+++ b/include/configs/bk4r1.h
@@ -263,7 +263,6 @@
#define CONFIG_ENV_SECT_SIZE (SZ_128K)
#define CONFIG_ENV_SIZE (SZ_8K)
#define CONFIG_ENV_OFFSET 0x200000
-#define CONFIG_ENV_SIZE_REDUND (SZ_8K)
#define CONFIG_ENV_OFFSET_REDUND 0x220000
#endif
diff --git a/include/configs/blanche.h b/include/configs/blanche.h
index 8774bde331b4..7f4a204a3959 100644
--- a/include/configs/blanche.h
+++ b/include/configs/blanche.h
@@ -59,7 +59,6 @@
#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + CONFIG_SYS_MONITOR_LEN)
#define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR)
#define CONFIG_ENV_SIZE (CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_SYS_MONITOR_LEN)
#endif
#endif /* __BLANCHE_H */
diff --git a/include/configs/caddy2.h b/include/configs/caddy2.h
index 89deeac4e7de..2c4f2c5b730b 100644
--- a/include/configs/caddy2.h
+++ b/include/configs/caddy2.h
@@ -205,7 +205,6 @@
/* Address and size of Redundant Environment Sector */
#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
#else
#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
diff --git a/include/configs/condor.h b/include/configs/condor.h
index e3c146e8244d..c84d127f49f6 100644
--- a/include/configs/condor.h
+++ b/include/configs/condor.h
@@ -16,7 +16,6 @@
#define CONFIG_BITBANGMII_MULTI
/* Environment compatibility */
-#undef CONFIG_ENV_SIZE_REDUND
#undef CONFIG_ENV_SECT_SIZE
#define CONFIG_ENV_SECT_SIZE (256 * 1024)
#define CONFIG_ENV_OFFSET 0x700000
diff --git a/include/configs/dh_imx6.h b/include/configs/dh_imx6.h
index d4bd88f5114b..66a1b980eee9 100644
--- a/include/configs/dh_imx6.h
+++ b/include/configs/dh_imx6.h
@@ -144,7 +144,6 @@
#define CONFIG_ENV_SECT_SIZE (64 * 1024)
#define CONFIG_ENV_OFFSET_REDUND \
(CONFIG_ENV_OFFSET + CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#endif
#endif /* __DH_IMX6_CONFIG_H */
diff --git a/include/configs/display5.h b/include/configs/display5.h
index 7b171489e381..b353cffbfcc2 100644
--- a/include/configs/display5.h
+++ b/include/configs/display5.h
@@ -354,7 +354,6 @@
#define CONFIG_ENV_SECT_SIZE (SZ_64K)
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \
CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#endif
#define CONFIG_MXC_USB_PORTSC (PORT_PTS_UTMI | PORT_PTS_PTW)
diff --git a/include/configs/draco.h b/include/configs/draco.h
index ffeb3982b556..e566ccef2a19 100644
--- a/include/configs/draco.h
+++ b/include/configs/draco.h
@@ -42,7 +42,6 @@
/* Define own nand partitions */
#define CONFIG_ENV_OFFSET_REDUND 0x2E0000
-#define CONFIG_ENV_SIZE_REDUND 0x2000
#define CONFIG_ENV_RANGE (4 * CONFIG_SYS_ENV_SECT_SIZE)
#ifndef CONFIG_SPL_BUILD
diff --git a/include/configs/eagle.h b/include/configs/eagle.h
index f0e4bcaa29df..5f2fe42d2eb0 100644
--- a/include/configs/eagle.h
+++ b/include/configs/eagle.h
@@ -16,7 +16,6 @@
#define CONFIG_BITBANGMII_MULTI
/* Environment compatibility */
-#undef CONFIG_ENV_SIZE_REDUND
#undef CONFIG_ENV_SECT_SIZE
#define CONFIG_ENV_SECT_SIZE (256 * 1024)
#define CONFIG_ENV_OFFSET 0x700000
diff --git a/include/configs/edb93xx.h b/include/configs/edb93xx.h
index 84cbcdda93ca..6526a83141f1 100644
--- a/include/configs/edb93xx.h
+++ b/include/configs/edb93xx.h
@@ -183,7 +183,6 @@
#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#define CONFIG_USB_OHCI_NEW
#define CONFIG_USB_OHCI_EP93XX
diff --git a/include/configs/etamin.h b/include/configs/etamin.h
index 726f8a500f9d..8e09f73a887f 100644
--- a/include/configs/etamin.h
+++ b/include/configs/etamin.h
@@ -112,7 +112,6 @@
/* Define own nand partitions */
#define CONFIG_ENV_OFFSET_REDUND 0xB80000
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#define CONFIG_ENV_RANGE (4 * CONFIG_SYS_ENV_SECT_SIZE)
diff --git a/include/configs/flea3.h b/include/configs/flea3.h
index 4cd823fa363e..4b8b2dc4ad65 100644
--- a/include/configs/flea3.h
+++ b/include/configs/flea3.h
@@ -117,7 +117,6 @@
/* Address and size of Redundant Environment Sector */
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + \
CONFIG_SYS_MONITOR_LEN)
diff --git a/include/configs/gardena-smart-gateway-mt7688.h b/include/configs/gardena-smart-gateway-mt7688.h
index 94c5b8daf349..cfa7d1c674a0 100644
--- a/include/configs/gardena-smart-gateway-mt7688.h
+++ b/include/configs/gardena-smart-gateway-mt7688.h
@@ -43,7 +43,6 @@
#define CONFIG_ENV_SECT_SIZE (64 << 10)
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \
CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
/*
* Environment is right behind U-Boot in flash. Make sure U-Boot
diff --git a/include/configs/gazerbeam.h b/include/configs/gazerbeam.h
index 0ff48287ace2..8c01097245ed 100644
--- a/include/configs/gazerbeam.h
+++ b/include/configs/gazerbeam.h
@@ -60,7 +60,6 @@
#define CONFIG_ENV_SECT_SIZE 0x10000 /* 64K(one sector) for env */
#define CONFIG_ENV_SIZE 0x2000
#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#define CONFIG_LOADS_ECHO /* echo on for serial download */
#define CONFIG_SYS_LOADS_BAUD_CHANGE /* allow baudrate change */
diff --git a/include/configs/gw_ventana.h b/include/configs/gw_ventana.h
index e543061bff6d..8b0f4d4d9019 100644
--- a/include/configs/gw_ventana.h
+++ b/include/configs/gw_ventana.h
@@ -163,7 +163,6 @@
#define CONFIG_ENV_SECT_SIZE (128 * SZ_1K)
#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + (512 * SZ_1K))
- #define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#elif defined(CONFIG_ENV_IS_IN_SPI_FLASH)
#define CONFIG_ENV_OFFSET (512 * SZ_1K)
#define CONFIG_ENV_SECT_SIZE (64 * SZ_1K)
diff --git a/include/configs/hrcon.h b/include/configs/hrcon.h
index 8fb321178fa1..cd59b840e9f9 100644
--- a/include/configs/hrcon.h
+++ b/include/configs/hrcon.h
@@ -357,7 +357,6 @@ void fpga_control_clear(unsigned int bus, int pin);
#define CONFIG_ENV_SECT_SIZE 0x10000 /* 64K(one sector) for env */
#define CONFIG_ENV_SIZE 0x2000
#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#else
#define CONFIG_ENV_SIZE 0x2000 /* 8KB */
#endif
diff --git a/include/configs/ids8313.h b/include/configs/ids8313.h
index 43cb14c14e5c..71063653fadc 100644
--- a/include/configs/ids8313.h
+++ b/include/configs/ids8313.h
@@ -227,7 +227,6 @@
+ CONFIG_SYS_MONITOR_LEN)
#define CONFIG_ENV_SIZE 0x20000
#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SIZE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
#define CONFIG_NETDEV eth1
#define CONFIG_HOSTNAME "ids8313"
diff --git a/include/configs/imx27lite-common.h b/include/configs/imx27lite-common.h
index 730e874c9f02..a2d0ade0151f 100644
--- a/include/configs/imx27lite-common.h
+++ b/include/configs/imx27lite-common.h
@@ -98,7 +98,6 @@
#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
/* Address and size of Redundant Environment Sector */
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
/*
* Ethernet
diff --git a/include/configs/km/km-mpc83xx.h b/include/configs/km/km-mpc83xx.h
index c06143c68b55..a9899fe4591e 100644
--- a/include/configs/km/km-mpc83xx.h
+++ b/include/configs/km/km-mpc83xx.h
@@ -117,7 +117,6 @@
/* Address and size of Redundant Environment Sector */
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \
CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
#else /* CFG_SYS_RAMBOOT */
#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
diff --git a/include/configs/km/km_arm.h b/include/configs/km/km_arm.h
index 64c968b63ba4..63fa6675ff92 100644
--- a/include/configs/km/km_arm.h
+++ b/include/configs/km/km_arm.h
@@ -155,7 +155,6 @@ int get_scl(void);
#define CONFIG_ENV_SIZE (0x2000 - CONFIG_ENV_OFFSET)
#define CONFIG_I2C_ENV_EEPROM_BUS 5 /* I2C2 (Mux-Port 5) */
#define CONFIG_ENV_OFFSET_REDUND 0x2000 /* no bracets! */
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
#endif
#define KM_FLASH_GPIO_PIN 16
diff --git a/include/configs/kp_imx53.h b/include/configs/kp_imx53.h
index ff564b27ec83..85224c3f46ae 100644
--- a/include/configs/kp_imx53.h
+++ b/include/configs/kp_imx53.h
@@ -99,7 +99,6 @@
/* environment organization */
#define CONFIG_ENV_OFFSET (SZ_1M)
#define CONFIG_ENV_SIZE (SZ_8K)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
#define CONFIG_SYS_MMC_ENV_DEV 0
diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h
index 113e84456d38..701bf2a597ba 100644
--- a/include/configs/m53menlo.h
+++ b/include/configs/m53menlo.h
@@ -72,7 +72,6 @@
#define CONFIG_MXC_NAND_HWECC
/* Environment is in NAND */
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#define CONFIG_ENV_SECT_SIZE (128 * 1024)
#define CONFIG_ENV_RANGE (4 * CONFIG_ENV_SECT_SIZE)
#define CONFIG_ENV_OFFSET (8 * CONFIG_ENV_SECT_SIZE) /* 1 MiB */
diff --git a/include/configs/mccmon6.h b/include/configs/mccmon6.h
index c75519c1958f..50afc7c60808 100644
--- a/include/configs/mccmon6.h
+++ b/include/configs/mccmon6.h
@@ -252,6 +252,5 @@
#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + 0x40000)
#define CONFIG_ENV_ADDR_REDUND (CONFIG_SYS_FLASH_BASE + 0x60000)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#endif /* __CONFIG_H * */
diff --git a/include/configs/mpc8308_p1m.h b/include/configs/mpc8308_p1m.h
index 3ce4b705b707..5a8546838fe3 100644
--- a/include/configs/mpc8308_p1m.h
+++ b/include/configs/mpc8308_p1m.h
@@ -232,7 +232,6 @@
#define CONFIG_ENV_SECT_SIZE 0x20000 /* 128K(one sector) for env */
#define CONFIG_ENV_SIZE 0x2000
#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
#define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h
index 2fad2c7a8492..7e7637ebecd8 100644
--- a/include/configs/mx28evk.h
+++ b/include/configs/mx28evk.h
@@ -34,7 +34,6 @@
/* Environment is in NAND */
#if defined(CONFIG_CMD_NAND) && defined(CONFIG_ENV_IS_IN_NAND)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#define CONFIG_ENV_SECT_SIZE (128 * 1024)
#define CONFIG_ENV_RANGE (512 * 1024)
#define CONFIG_ENV_OFFSET 0x300000
diff --git a/include/configs/mx35pdk.h b/include/configs/mx35pdk.h
index e153dfb19922..4ec36193c0b2 100644
--- a/include/configs/mx35pdk.h
+++ b/include/configs/mx35pdk.h
@@ -133,7 +133,6 @@
/* Address and size of Redundant Environment Sector */
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + \
CONFIG_SYS_MONITOR_LEN)
diff --git a/include/configs/novena.h b/include/configs/novena.h
index cdc437c4925f..fff2396e98f2 100644
--- a/include/configs/novena.h
+++ b/include/configs/novena.h
@@ -28,7 +28,6 @@
#ifdef CONFIG_CMD_MMC
#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_ENV_OFFSET (512 * 1024)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#define CONFIG_ENV_OFFSET_REDUND \
(CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
#endif
diff --git a/include/configs/pcm052.h b/include/configs/pcm052.h
index fb8f3c8609c0..b68d205bfb3a 100644
--- a/include/configs/pcm052.h
+++ b/include/configs/pcm052.h
@@ -178,7 +178,6 @@
#define CONFIG_ENV_SECT_SIZE (SZ_128K)
#define CONFIG_ENV_SIZE (SZ_8K)
#define CONFIG_ENV_OFFSET 0xA0000
-#define CONFIG_ENV_SIZE_REDUND (SZ_8K)
#define CONFIG_ENV_OFFSET_REDUND 0xC0000
#endif
diff --git a/include/configs/pcm058.h b/include/configs/pcm058.h
index b9f5ad326082..6c4a619433b6 100644
--- a/include/configs/pcm058.h
+++ b/include/configs/pcm058.h
@@ -78,7 +78,6 @@
#define CONFIG_ENV_SECT_SIZE (64 * SZ_1K)
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \
CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#ifdef CONFIG_ENV_IS_IN_NAND
#define CONFIG_ENV_OFFSET (0x1E0000)
diff --git a/include/configs/pfla02.h b/include/configs/pfla02.h
index 9a169351a3a0..a4d0e4898a48 100644
--- a/include/configs/pfla02.h
+++ b/include/configs/pfla02.h
@@ -79,7 +79,6 @@
#define CONFIG_ENV_SECT_SIZE (64 * SZ_1K)
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \
CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#ifdef CONFIG_ENV_IS_IN_NAND
#define CONFIG_ENV_OFFSET (0x1E0000)
diff --git a/include/configs/platinum.h b/include/configs/platinum.h
index 1b57e9931f67..58e590a1fd3b 100644
--- a/include/configs/platinum.h
+++ b/include/configs/platinum.h
@@ -78,7 +78,6 @@
#define CONFIG_ENV_SECT_SIZE (128 << 10)
#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + (512 << 10))
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#else /* CONFIG_CMD_NAND */
diff --git a/include/configs/rastaban.h b/include/configs/rastaban.h
index c69535aa6dcb..c34b68a374f7 100644
--- a/include/configs/rastaban.h
+++ b/include/configs/rastaban.h
@@ -47,7 +47,6 @@
/* Define own nand partitions */
#define CONFIG_ENV_OFFSET_REDUND 0x2E0000
-#define CONFIG_ENV_SIZE_REDUND 0x2000
#define CONFIG_ENV_RANGE (4 * CONFIG_SYS_ENV_SECT_SIZE)
#ifndef CONFIG_SPL_BUILD
diff --git a/include/configs/rcar-gen2-common.h b/include/configs/rcar-gen2-common.h
index e940a8b70a3b..3a763336ed17 100644
--- a/include/configs/rcar-gen2-common.h
+++ b/include/configs/rcar-gen2-common.h
@@ -43,7 +43,6 @@
#define CONFIG_ENV_SECT_SIZE (256 * 1024)
#define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR)
#define CONFIG_ENV_SIZE (CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_SYS_MONITOR_LEN)
/* SF MTD */
#ifdef CONFIG_SPL_BUILD
diff --git a/include/configs/rcar-gen3-common.h b/include/configs/rcar-gen3-common.h
index 95bd97c0ec3a..0f7a00f95782 100644
--- a/include/configs/rcar-gen3-common.h
+++ b/include/configs/rcar-gen3-common.h
@@ -54,7 +54,6 @@
#define CONFIG_ENV_OVERWRITE
#define CONFIG_ENV_SECT_SIZE (128 * 1024)
#define CONFIG_ENV_SIZE (CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
#define CONFIG_EXTRA_ENV_SETTINGS \
"bootm_size=0x10000000\0"
diff --git a/include/configs/sbc8349.h b/include/configs/sbc8349.h
index d2053cc0597a..01d480288578 100644
--- a/include/configs/sbc8349.h
+++ b/include/configs/sbc8349.h
@@ -229,7 +229,6 @@
/* Address and size of Redundant Environment Sector */
#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
#else
#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
diff --git a/include/configs/sh7752evb.h b/include/configs/sh7752evb.h
index cd7f51c7ced0..02c5143491a6 100644
--- a/include/configs/sh7752evb.h
+++ b/include/configs/sh7752evb.h
@@ -67,7 +67,6 @@
#define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR)
#define CONFIG_ENV_OVERWRITE 1
#define CONFIG_ENV_SIZE (CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SECT_SIZE)
#define CONFIG_EXTRA_ENV_SETTINGS \
"netboot=bootp; bootm\0"
diff --git a/include/configs/sh7753evb.h b/include/configs/sh7753evb.h
index 6b00bd7d906a..ae76254589b3 100644
--- a/include/configs/sh7753evb.h
+++ b/include/configs/sh7753evb.h
@@ -67,7 +67,6 @@
#define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR)
#define CONFIG_ENV_OVERWRITE 1
#define CONFIG_ENV_SIZE (CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SECT_SIZE)
#define CONFIG_EXTRA_ENV_SETTINGS \
"netboot=bootp; bootm\0"
diff --git a/include/configs/sh7757lcr.h b/include/configs/sh7757lcr.h
index f1955a16b927..04b6879644b7 100644
--- a/include/configs/sh7757lcr.h
+++ b/include/configs/sh7757lcr.h
@@ -79,7 +79,6 @@
#define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR)
#define CONFIG_ENV_OVERWRITE 1
#define CONFIG_ENV_SIZE (CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SECT_SIZE)
#define CONFIG_EXTRA_ENV_SETTINGS \
"netboot=bootp; bootm\0"
diff --git a/include/configs/sh7763rdp.h b/include/configs/sh7763rdp.h
index 10961b14bae9..620cf5af5009 100644
--- a/include/configs/sh7763rdp.h
+++ b/include/configs/sh7763rdp.h
@@ -60,7 +60,6 @@
#define CONFIG_ENV_ADDR (CONFIG_SYS_FLASH_BASE + (1 * CONFIG_ENV_SECT_SIZE))
/* Offset of env Flash sector relative to CONFIG_SYS_FLASH_BASE */
#define CONFIG_ENV_OFFSET (CONFIG_ENV_ADDR - CONFIG_SYS_FLASH_BASE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SECT_SIZE)
#define CONFIG_ENV_ADDR_REDUND (CONFIG_SYS_FLASH_BASE + (2 * CONFIG_ENV_SECT_SIZE))
/* Clock */
diff --git a/include/configs/sksimx6.h b/include/configs/sksimx6.h
index e1a7d724c161..b2ca7b1a7257 100644
--- a/include/configs/sksimx6.h
+++ b/include/configs/sksimx6.h
@@ -58,7 +58,6 @@
#define CONFIG_SYS_MMC_ENV_DEV 0
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \
CONFIG_ENV_SIZE)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
/* Default environment */
#define CONFIG_EXTRA_ENV_SETTINGS \
diff --git a/include/configs/socfpga_vining_fpga.h b/include/configs/socfpga_vining_fpga.h
index abde883487e8..5cc12419a692 100644
--- a/include/configs/socfpga_vining_fpga.h
+++ b/include/configs/socfpga_vining_fpga.h
@@ -195,7 +195,6 @@
"fi\0" \
"socfpga_legacy_reset_compat=1\0"
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#define CONFIG_ENV_SECT_SIZE (64 * 1024)
#define CONFIG_ENV_OFFSET 0x100000
#define CONFIG_ENV_OFFSET_REDUND \
diff --git a/include/configs/socrates.h b/include/configs/socrates.h
index a03005902fa8..f5f3316b9030 100644
--- a/include/configs/socrates.h
+++ b/include/configs/socrates.h
@@ -192,7 +192,6 @@
CONFIG_ENV_SECT_SIZE - CONFIG_ENV_SECT_SIZE)
#define CONFIG_ENV_SIZE 0x4000
#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR - CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
#define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
#define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
diff --git a/include/configs/strider.h b/include/configs/strider.h
index e3d64e52aa13..d270d8a2dd4f 100644
--- a/include/configs/strider.h
+++ b/include/configs/strider.h
@@ -390,7 +390,6 @@ void fpga_control_clear(unsigned int bus, int pin);
#define CONFIG_ENV_SECT_SIZE 0x10000 /* 64K(one sector) for env */
#define CONFIG_ENV_SIZE 0x2000
#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#else
#define CONFIG_ENV_SIZE 0x2000 /* 8KB */
#endif
diff --git a/include/configs/tam3517-common.h b/include/configs/tam3517-common.h
index 121de2bd2452..69819da492fd 100644
--- a/include/configs/tam3517-common.h
+++ b/include/configs/tam3517-common.h
@@ -114,7 +114,6 @@
#define CONFIG_ENV_ADDR 0x180000
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + \
2 * CONFIG_SYS_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
#define CONFIG_SYS_INIT_RAM_ADDR 0x4020f800
diff --git a/include/configs/thuban.h b/include/configs/thuban.h
index 569df9e4d8d7..954b063e293a 100644
--- a/include/configs/thuban.h
+++ b/include/configs/thuban.h
@@ -40,7 +40,6 @@
/* Define own nand partitions */
#define CONFIG_ENV_OFFSET_REDUND 0x2E0000
-#define CONFIG_ENV_SIZE_REDUND 0x2000
#define CONFIG_ENV_RANGE (4 * CONFIG_SYS_ENV_SECT_SIZE)
#ifndef CONFIG_SPL_BUILD
diff --git a/include/configs/titanium.h b/include/configs/titanium.h
index c24d657dba7d..64ec06da8599 100644
--- a/include/configs/titanium.h
+++ b/include/configs/titanium.h
@@ -149,7 +149,6 @@
#define CONFIG_ENV_SECT_SIZE (128 << 10)
#define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + (512 << 10))
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#else /* CONFIG_CMD_NAND */
diff --git a/include/configs/vcoreiii.h b/include/configs/vcoreiii.h
index 7ed952435937..6ff68cd6a085 100644
--- a/include/configs/vcoreiii.h
+++ b/include/configs/vcoreiii.h
@@ -30,7 +30,6 @@
#define CONFIG_ENV_SIZE (8 * 1024)
#define CONFIG_ENV_SECT_SIZE (256 * 1024)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SECT_SIZE)
#endif
diff --git a/include/configs/vct.h b/include/configs/vct.h
index 571071593a12..890f347b4395 100644
--- a/include/configs/vct.h
+++ b/include/configs/vct.h
@@ -134,7 +134,6 @@
/* Address and size of Redundant Environment Sector */
#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
#endif /* CONFIG_ENV_IS_IN_FLASH */
#endif /* CONFIG_VCT_NOR */
diff --git a/include/configs/ve8313.h b/include/configs/ve8313.h
index 66f771d818f1..2608b2b23220 100644
--- a/include/configs/ve8313.h
+++ b/include/configs/ve8313.h
@@ -202,7 +202,6 @@
/* Address and size of Redundant Environment Sector */
#define CONFIG_ENV_OFFSET_REDUND \
(CONFIG_ENV_OFFSET + CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
#define CONFIG_LOADS_ECHO 1 /* echo on for serial download */
#define CONFIG_SYS_LOADS_BAUD_CHANGE 1 /* allow baudrate change */
diff --git a/include/configs/vining_2000.h b/include/configs/vining_2000.h
index 33f06c00b1d8..6672930fb39c 100644
--- a/include/configs/vining_2000.h
+++ b/include/configs/vining_2000.h
@@ -88,7 +88,6 @@
#define CONFIG_ENV_OFFSET (8 * SZ_64K)
#define CONFIG_ENV_SIZE SZ_8K
#define CONFIG_ENV_OFFSET_REDUND (9 * SZ_64K)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#ifdef CONFIG_ENV_IS_IN_MMC
#define CONFIG_SYS_MMC_ENV_DEV 0 /* USDHC4 eMMC */
diff --git a/include/configs/vme8349.h b/include/configs/vme8349.h
index a4f2af4962de..74e8d3925bf2 100644
--- a/include/configs/vme8349.h
+++ b/include/configs/vme8349.h
@@ -205,7 +205,6 @@
/* Address and size of Redundant Environment Sector */
#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
#else
#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE - 0x1000)
diff --git a/include/configs/woodburn_common.h b/include/configs/woodburn_common.h
index 5ad3dab51c4a..d7c4a6f1f4d8 100644
--- a/include/configs/woodburn_common.h
+++ b/include/configs/woodburn_common.h
@@ -124,7 +124,6 @@
/* Address and size of Redundant Environment Sector */
#define CONFIG_ENV_OFFSET_REDUND (CONFIG_ENV_OFFSET + CONFIG_ENV_SIZE)
-#define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
#define CONFIG_ENV_ADDR (CONFIG_SYS_MONITOR_BASE + \
CONFIG_SYS_MONITOR_LEN)
diff --git a/include/configs/x600.h b/include/configs/x600.h
index d4bbdcdb1340..f6779213a896 100644
--- a/include/configs/x600.h
+++ b/include/configs/x600.h
@@ -93,7 +93,6 @@
#define CONFIG_ENV_SIZE 0x02000
#define CONFIG_ENV_ADDR_REDUND (CONFIG_ENV_ADDR + \
CONFIG_ENV_SECT_SIZE)
-#define CONFIG_ENV_SIZE_REDUND (CONFIG_ENV_SIZE)
/* Miscellaneous configurable options */
#define CONFIG_BOOT_PARAMS_ADDR 0x00000100
diff --git a/include/env_internal.h b/include/env_internal.h
index d520e6a55b5c..b8158c0e0bc5 100644
--- a/include/env_internal.h
+++ b/include/env_internal.h
@@ -50,8 +50,11 @@
# else
# error "Both CONFIG_ENV_SECT_SIZE and CONFIG_ENV_SIZE undefined"
# endif
-# if defined(CONFIG_ENV_ADDR_REDUND) && !defined(CONFIG_ENV_SIZE_REDUND)
-# define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
+# if defined(CONFIG_ENV_ADDR_REDUND) && \
+ ((CONFIG_ENV_ADDR >= CONFIG_SYS_MONITOR_BASE) && \
+ (CONFIG_ENV_ADDR_REDUND + CONFIG_ENV_SIZE) <= \
+ (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN))
+# define ENV_IS_EMBEDDED
# endif
# if (CONFIG_ENV_ADDR >= CONFIG_SYS_MONITOR_BASE) && \
(CONFIG_ENV_ADDR + CONFIG_ENV_SIZE) <= \
diff --git a/scripts/config_whitelist.txt b/scripts/config_whitelist.txt
index b680c554c15a..d73e433cffb1 100644
--- a/scripts/config_whitelist.txt
+++ b/scripts/config_whitelist.txt
@@ -454,7 +454,6 @@ CONFIG_ENV_SETTINGS_NAND_V2
CONFIG_ENV_SETTINGS_V1
CONFIG_ENV_SETTINGS_V2
CONFIG_ENV_SIZE_FLEX
-CONFIG_ENV_SIZE_REDUND
CONFIG_ENV_SROM_BANK
CONFIG_ENV_TOTAL_SIZE
CONFIG_ENV_UBIFS_OPTION
diff --git a/tools/envcrc.c b/tools/envcrc.c
index 95776828289e..4b3b828af0fd 100644
--- a/tools/envcrc.c
+++ b/tools/envcrc.c
@@ -33,9 +33,6 @@
# ifndef CONFIG_ENV_SIZE
# define CONFIG_ENV_SIZE CONFIG_ENV_SECT_SIZE
# endif
-# if defined(CONFIG_ENV_ADDR_REDUND) && !defined(CONFIG_ENV_SIZE_REDUND)
-# define CONFIG_ENV_SIZE_REDUND CONFIG_ENV_SIZE
-# endif
# if (CONFIG_ENV_ADDR >= CONFIG_SYS_MONITOR_BASE) && \
((CONFIG_ENV_ADDR + CONFIG_ENV_SIZE) <= (CONFIG_SYS_MONITOR_BASE + CONFIG_SYS_MONITOR_LEN))
# define ENV_IS_EMBEDDED
--
2.17.1
More information about the U-Boot
mailing list