Convert CONFIG_ENV_RANGE to Kconfig

This converts the following to Kconfig:
   CONFIG_ENV_RANGE

Now that this is in Kconfig we can enforce a minimum size and so remove
the check in C code to ensure range is larger than size.

Signed-off-by: Tom Rini <trini@konsulko.com>
This commit is contained in:
Tom Rini 2022-06-13 22:57:33 -04:00
parent 5c3f6a3206
commit 5d7dea1400
35 changed files with 30 additions and 74 deletions

View File

@ -68,6 +68,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=ff800000.flash:2m(uboot-env),1m(dtb),5m(kernel
CONFIG_OF_CONTROL=y CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_RANGE=0xc000
CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_BOOTFILE=y CONFIG_USE_BOOTFILE=y
CONFIG_BOOTFILE="uImage" CONFIG_BOOTFILE="uImage"

View File

@ -67,6 +67,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=ff800000.flash:2m(uboot-env),1m(dtb),5m(kernel
CONFIG_OF_CONTROL=y CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_RANGE=0xc000
CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_BOOTFILE=y CONFIG_USE_BOOTFILE=y
CONFIG_BOOTFILE="uImage" CONFIG_BOOTFILE="uImage"

View File

@ -69,6 +69,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=ff800000.flash:2m(uboot-env),1m(dtb),5m(kernel
CONFIG_OF_CONTROL=y CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_RANGE=0x80000
CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_BOOTFILE=y CONFIG_USE_BOOTFILE=y
CONFIG_BOOTFILE="uImage" CONFIG_BOOTFILE="uImage"

View File

@ -68,6 +68,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=ff800000.flash:2m(uboot-env),1m(dtb),5m(kernel
CONFIG_OF_CONTROL=y CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_RANGE=0x80000
CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_BOOTFILE=y CONFIG_USE_BOOTFILE=y
CONFIG_BOOTFILE="uImage" CONFIG_BOOTFILE="uImage"

View File

@ -68,6 +68,7 @@ CONFIG_CMD_FAT=y
CONFIG_OF_CONTROL=y CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_RANGE=0xc000
CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_BOOTFILE=y CONFIG_USE_BOOTFILE=y
CONFIG_BOOTFILE="uImage" CONFIG_BOOTFILE="uImage"

View File

@ -67,6 +67,7 @@ CONFIG_CMD_FAT=y
CONFIG_OF_CONTROL=y CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_RANGE=0xc000
CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_BOOTFILE=y CONFIG_USE_BOOTFILE=y
CONFIG_BOOTFILE="uImage" CONFIG_BOOTFILE="uImage"

View File

@ -70,6 +70,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=ec000000.nor:128k(dtb),6016k(kernel),57088k(fs
CONFIG_OF_CONTROL=y CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_RANGE=0x60000
CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_BOOTFILE=y CONFIG_USE_BOOTFILE=y
CONFIG_BOOTFILE="uImage" CONFIG_BOOTFILE="uImage"

View File

@ -72,6 +72,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=fef000000.nor:256k(vsc7385-firmware),256k(dtb)
CONFIG_OF_CONTROL=y CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_RANGE=0xc000
CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_BOOTFILE=y CONFIG_USE_BOOTFILE=y
CONFIG_BOOTFILE="uImage" CONFIG_BOOTFILE="uImage"

View File

@ -71,6 +71,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=ef000000.nor:256k(vsc7385-firmware),256k(dtb),
CONFIG_OF_CONTROL=y CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_RANGE=0xc000
CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_BOOTFILE=y CONFIG_USE_BOOTFILE=y
CONFIG_BOOTFILE="uImage" CONFIG_BOOTFILE="uImage"

View File

@ -55,6 +55,7 @@ CONFIG_CMD_UBI=y
CONFIG_OF_CONTROL=y CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_RANGE=0x80000
CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_VERSION_VARIABLE=y CONFIG_VERSION_VARIABLE=y

View File

@ -56,6 +56,7 @@ CONFIG_CMD_UBI=y
CONFIG_OF_CONTROL=y CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_RANGE=0x80000
CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_IP_DEFRAG=y CONFIG_IP_DEFRAG=y

View File

@ -62,6 +62,7 @@ CONFIG_CMD_UBI=y
CONFIG_OF_CONTROL=y CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_RANGE=0x80000
CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y
CONFIG_VERSION_VARIABLE=y CONFIG_VERSION_VARIABLE=y

View File

@ -79,6 +79,7 @@ CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_EMBED=y CONFIG_OF_EMBED=y
CONFIG_ENV_OVERWRITE=y CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_RANGE=0x80000
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_NET_RETRY_COUNT=10 CONFIG_NET_RETRY_COUNT=10

View File

@ -80,6 +80,7 @@ CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_EMBED=y CONFIG_OF_EMBED=y
CONFIG_ENV_OVERWRITE=y CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_RANGE=0x200000
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_NET_RETRY_COUNT=10 CONFIG_NET_RETRY_COUNT=10

View File

@ -68,6 +68,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=mxc_nand:1m(u-boot),512k(env1),512k(env2),-(ub
CONFIG_CMD_UBI=y CONFIG_CMD_UBI=y
CONFIG_OF_CONTROL=y CONFIG_OF_CONTROL=y
CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_RANGE=0x80000
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_BOOTFILE=y CONFIG_USE_BOOTFILE=y

View File

@ -43,6 +43,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=gpmi-nand:3m(bootloader)ro,512k(environment),5
CONFIG_CMD_UBI=y CONFIG_CMD_UBI=y
CONFIG_ENV_OVERWRITE=y CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_RANGE=0x80000
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_USE_BOOTFILE=y CONFIG_USE_BOOTFILE=y

View File

@ -79,6 +79,7 @@ CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_EMBED=y CONFIG_OF_EMBED=y
CONFIG_ENV_OVERWRITE=y CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_RANGE=0x80000
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_NET_RETRY_COUNT=10 CONFIG_NET_RETRY_COUNT=10

View File

@ -69,6 +69,7 @@ CONFIG_OF_CONTROL=y
CONFIG_OF_EMBED=y CONFIG_OF_EMBED=y
CONFIG_ENV_OVERWRITE=y CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_RANGE=0x80000
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_NET_RETRY_COUNT=20 CONFIG_NET_RETRY_COUNT=20

View File

@ -79,6 +79,7 @@ CONFIG_SPL_OF_CONTROL=y
CONFIG_OF_EMBED=y CONFIG_OF_EMBED=y
CONFIG_ENV_OVERWRITE=y CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_RANGE=0x80000
CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_REDUNDAND_ENVIRONMENT=y
CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_NET_RETRY_COUNT=10 CONFIG_NET_RETRY_COUNT=10

View File

@ -45,6 +45,7 @@ CONFIG_CMD_UBI=y
CONFIG_OF_CONTROL=y CONFIG_OF_CONTROL=y
CONFIG_ENV_OVERWRITE=y CONFIG_ENV_OVERWRITE=y
CONFIG_ENV_IS_IN_NAND=y CONFIG_ENV_IS_IN_NAND=y
CONFIG_ENV_RANGE=0x80000
CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y
CONFIG_DM=y CONFIG_DM=y
CONFIG_VYBRID_GPIO=y CONFIG_VYBRID_GPIO=y

18
env/Kconfig vendored
View File

@ -264,14 +264,6 @@ config ENV_IS_IN_NAND
during a "saveenv" operation. CONFIG_ENV_OFFSET_REDUND must be during a "saveenv" operation. CONFIG_ENV_OFFSET_REDUND must be
aligned to an erase block boundary. aligned to an erase block boundary.
- CONFIG_ENV_RANGE (optional):
Specifies the length of the region in which the environment
can be written. This should be a multiple of the NAND device's
block size. Specifying a range with more erase blocks than
are needed to hold CONFIG_ENV_SIZE allows bad blocks within
the range to be avoided.
- CONFIG_ENV_OFFSET_OOB (optional): - CONFIG_ENV_OFFSET_OOB (optional):
Enables support for dynamically retrieving the offset of the Enables support for dynamically retrieving the offset of the
@ -280,6 +272,16 @@ config ENV_IS_IN_NAND
Currently, CONFIG_ENV_OFFSET_REDUND is not supported when Currently, CONFIG_ENV_OFFSET_REDUND is not supported when
using CONFIG_ENV_OFFSET_OOB. using CONFIG_ENV_OFFSET_OOB.
config ENV_RANGE
hex "Length of the region in which the environment can be written"
depends on ENV_IS_IN_NAND
range ENV_SIZE 0x7fffffff
default ENV_SIZE
help
This should be a multiple of the NAND device's block size.
Specifying a range with more erase blocks than are needed to hold
CONFIG_ENV_SIZE allows bad blocks within the range to be avoided.
config ENV_IS_IN_NVRAM config ENV_IS_IN_NVRAM
bool "Environment in a non-volatile RAM" bool "Environment in a non-volatile RAM"
depends on !CHAIN_OF_TRUST depends on !CHAIN_OF_TRUST

8
env/nand.c vendored
View File

@ -33,10 +33,6 @@
#error CONFIG_ENV_OFFSET_REDUND must have CONFIG_CMD_SAVEENV & CONFIG_CMD_NAND #error CONFIG_ENV_OFFSET_REDUND must have CONFIG_CMD_SAVEENV & CONFIG_CMD_NAND
#endif #endif
#ifndef CONFIG_ENV_RANGE
#define CONFIG_ENV_RANGE CONFIG_ENV_SIZE
#endif
#if defined(ENV_IS_EMBEDDED) #if defined(ENV_IS_EMBEDDED)
static env_t *env_ptr = &environment; static env_t *env_ptr = &environment;
#elif defined(CONFIG_NAND_ENV_DST) #elif defined(CONFIG_NAND_ENV_DST)
@ -201,10 +197,6 @@ static int env_nand_save(void)
#endif #endif
}; };
if (CONFIG_ENV_RANGE < CONFIG_ENV_SIZE)
return 1;
ret = env_export(env_new); ret = env_export(env_new);
if (ret) if (ret)
return ret; return ret;

View File

@ -477,12 +477,6 @@ extern unsigned long get_sdram_size(void);
#elif defined(CONFIG_MTD_RAW_NAND) #elif defined(CONFIG_MTD_RAW_NAND)
#ifdef CONFIG_TPL_BUILD #ifdef CONFIG_TPL_BUILD
#define SPL_ENV_ADDR (CONFIG_SYS_INIT_L2_ADDR + (160 << 10)) #define SPL_ENV_ADDR (CONFIG_SYS_INIT_L2_ADDR + (160 << 10))
#else
#if defined(CONFIG_TARGET_P1010RDB_PA)
#define CONFIG_ENV_RANGE (3 * CONFIG_ENV_SIZE) /* 3*16=48K for env */
#elif defined(CONFIG_TARGET_P1010RDB_PB)
#define CONFIG_ENV_RANGE (32 * CONFIG_ENV_SIZE) /* new block size 512K */
#endif
#endif #endif
#endif #endif

View File

@ -122,11 +122,6 @@
#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
/* environment organization */
#if defined(CONFIG_ENV_IS_IN_NAND)
#define CONFIG_ENV_RANGE (4 * CONFIG_ENV_SIZE)
#endif
#ifdef CONFIG_TARGET_COLIBRI_IMX6ULL_NAND #ifdef CONFIG_TARGET_COLIBRI_IMX6ULL_NAND
/* NAND stuff */ /* NAND stuff */
#define CONFIG_SYS_MAX_NAND_DEVICE 1 #define CONFIG_SYS_MAX_NAND_DEVICE 1

View File

@ -166,11 +166,6 @@
#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
/* environment organization */
#if defined(CONFIG_ENV_IS_IN_NAND)
#define CONFIG_ENV_RANGE (4 * CONFIG_ENV_SIZE)
#endif
#ifdef CONFIG_TARGET_COLIBRI_IMX7_NAND #ifdef CONFIG_TARGET_COLIBRI_IMX7_NAND
/* NAND stuff */ /* NAND stuff */
#define CONFIG_SYS_MAX_NAND_DEVICE 1 #define CONFIG_SYS_MAX_NAND_DEVICE 1

View File

@ -91,11 +91,6 @@
#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
/* Environment organization */
#ifdef CONFIG_ENV_IS_IN_NAND
#define CONFIG_ENV_RANGE (4 * 64 * 2048)
#endif
/* USB Host Support */ /* USB Host Support */
/* USB DFU */ /* USB DFU */

View File

@ -27,9 +27,6 @@
/* Physical Memory Map */ /* Physical Memory Map */
#define CONFIG_MAX_RAM_BANK_SIZE (1024 << 20) /* 1GB */ #define CONFIG_MAX_RAM_BANK_SIZE (1024 << 20) /* 1GB */
/* Define own nand partitions */
#define CONFIG_ENV_RANGE (4 * CONFIG_SYS_ENV_SECT_SIZE)
/* Default env settings */ /* Default env settings */
#define CONFIG_EXTRA_ENV_SETTINGS \ #define CONFIG_EXTRA_ENV_SETTINGS \
"hostname=draco\0" \ "hostname=draco\0" \

View File

@ -77,10 +77,6 @@
/* nedded by compliance test in read mode */ /* nedded by compliance test in read mode */
/* Define own nand partitions */
#define CONFIG_ENV_RANGE (4 * CONFIG_SYS_ENV_SECT_SIZE)
#undef COMMON_ENV_DFU_ARGS #undef COMMON_ENV_DFU_ARGS
#define COMMON_ENV_DFU_ARGS "dfu_args=run bootargs_defaults;" \ #define COMMON_ENV_DFU_ARGS "dfu_args=run bootargs_defaults;" \
"setenv bootargs ${bootargs};" \ "setenv bootargs ${bootargs};" \

View File

@ -51,9 +51,6 @@
#define CONFIG_MXC_NAND_IP_REGS_BASE NFC_BASE_ADDR #define CONFIG_MXC_NAND_IP_REGS_BASE NFC_BASE_ADDR
#define CONFIG_SYS_NAND_LARGEPAGE #define CONFIG_SYS_NAND_LARGEPAGE
#define CONFIG_MXC_NAND_HWECC #define CONFIG_MXC_NAND_HWECC
/* Environment is in NAND */
#define CONFIG_ENV_RANGE (0x00080000) /* 512 KiB */
#endif #endif
/* /*

View File

@ -15,17 +15,6 @@
#define PHYS_SDRAM_1_SIZE 0x40000000 /* Max 1 GB RAM */ #define PHYS_SDRAM_1_SIZE 0x40000000 /* Max 1 GB RAM */
#define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1 #define CONFIG_SYS_SDRAM_BASE PHYS_SDRAM_1
/* Environment */
/* Environment is in MMC */
/* Environment is in NAND */
#if defined(CONFIG_CMD_NAND) && defined(CONFIG_ENV_IS_IN_NAND)
#define CONFIG_ENV_RANGE (512 * 1024)
#endif
/* Environment is in SPI flash */
/* UBI and NAND partitioning */ /* UBI and NAND partitioning */
/* RTC */ /* RTC */

View File

@ -433,7 +433,6 @@
#if defined(CONFIG_SDCARD) #if defined(CONFIG_SDCARD)
#define CONFIG_FSL_FIXED_MMC_LOCATION #define CONFIG_FSL_FIXED_MMC_LOCATION
#elif defined(CONFIG_MTD_RAW_NAND) #elif defined(CONFIG_MTD_RAW_NAND)
#define CONFIG_ENV_RANGE (3 * CONFIG_ENV_SIZE)
#ifdef CONFIG_TPL_BUILD #ifdef CONFIG_TPL_BUILD
#define SPL_ENV_ADDR (CONFIG_SYS_INIT_L2_ADDR + (160 << 10)) #define SPL_ENV_ADDR (CONFIG_SYS_INIT_L2_ADDR + (160 << 10))
#endif #endif

View File

@ -37,9 +37,6 @@
#define EEPROM_ADDR_DDR3 0x90 #define EEPROM_ADDR_DDR3 0x90
#define EEPROM_ADDR_CHIP 0x120 #define EEPROM_ADDR_CHIP 0x120
/* Define own nand partitions */
#define CONFIG_ENV_RANGE (4 * CONFIG_SYS_ENV_SECT_SIZE)
/* Default env settings */ /* Default env settings */
#define CONFIG_EXTRA_ENV_SETTINGS \ #define CONFIG_EXTRA_ENV_SETTINGS \
"hostname=rastaban\0" \ "hostname=rastaban\0" \

View File

@ -87,11 +87,6 @@
/* General Boot Parameter */ /* General Boot Parameter */
/*
* The NAND Flash partitions:
*/
#define CONFIG_ENV_RANGE (SZ_512K)
/* /*
* Predefined environment variables. * Predefined environment variables.
* Usefull to define some easy to use boot commands. * Usefull to define some easy to use boot commands.

View File

@ -30,9 +30,6 @@
#define EEPROM_ADDR_DDR3 0x90 #define EEPROM_ADDR_DDR3 0x90
#define EEPROM_ADDR_CHIP 0x120 #define EEPROM_ADDR_CHIP 0x120
/* Define own nand partitions */
#define CONFIG_ENV_RANGE (4 * CONFIG_SYS_ENV_SECT_SIZE)
/* Default env settings */ /* Default env settings */
#define CONFIG_EXTRA_ENV_SETTINGS \ #define CONFIG_EXTRA_ENV_SETTINGS \
"hostname=thuban\0" \ "hostname=thuban\0" \

View File

@ -130,8 +130,4 @@
#define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR
#define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE
#ifdef CONFIG_ENV_IS_IN_NAND
#define CONFIG_ENV_RANGE (512 * 1024)
#endif
#endif #endif