Return-Path: X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on aws-us-west-2-korg-lkml-1.web.codeaurora.org Received: from phobos.denx.de (phobos.denx.de [85.214.62.61]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (No client certificate requested) by smtp.lore.kernel.org (Postfix) with ESMTPS id 2B85BC43334 for ; Tue, 14 Jun 2022 02:58:22 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id D2188844B3; Tue, 14 Jun 2022 04:57:56 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Authentication-Results: phobos.denx.de; dkim=pass (1024-bit key; unprotected) header.d=konsulko.com header.i=@konsulko.com header.b="a22HjPOq"; dkim-atps=neutral Received: by phobos.denx.de (Postfix, from userid 109) id C25C4844AA; Tue, 14 Jun 2022 04:57:48 +0200 (CEST) Received: from mail-qk1-x72e.google.com (mail-qk1-x72e.google.com [IPv6:2607:f8b0:4864:20::72e]) (using TLSv1.3 with cipher TLS_AES_128_GCM_SHA256 (128/128 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 4D6C58448D for ; Tue, 14 Jun 2022 04:57:44 +0200 (CEST) Authentication-Results: phobos.denx.de; dmarc=pass (p=none dis=none) header.from=konsulko.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=trini@konsulko.com Received: by mail-qk1-x72e.google.com with SMTP id b142so5502965qkg.2 for ; Mon, 13 Jun 2022 19:57:44 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=konsulko.com; s=google; h=from:to:subject:date:message-id:in-reply-to:references:mime-version :content-transfer-encoding; bh=VC4qT90C3+L3LeRYOELBuYiBoHLwSTnbAooTdgSFQiU=; b=a22HjPOqt/EFgHIam5FRsdHakGRTi8aczsgx7FVVaMBjvFKbhj8+sTI+e8rrYLZD9Y +IGBkiPf/8gxbdcUU8u/rdy4mE39t5382CXC4x9Mv6lYjPppqzaj5B/B3DlwAzMT3a5N 2FiZ3MRLByVNuM9XbykU/h/MdW/neWou00rkM= X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20210112; h=x-gm-message-state:from:to:subject:date:message-id:in-reply-to :references:mime-version:content-transfer-encoding; bh=VC4qT90C3+L3LeRYOELBuYiBoHLwSTnbAooTdgSFQiU=; b=NlSgH6nxPGo+MrqhL6WEipSLidPNJLynYQmA9uITooEix2mcAD2Bq0kDncK9njb34B 0eqvfbvjDO8PY92ZZK2ofUhoRmtXAuiWgRZfldj+ZMxZoivwwJeSmV+XPbCNEdkiI3Le K7v8oAAHSK79XKR3USHspeMeXEyZXo1oQRyHhk1LedG6tGKgKlRUbd8yJ6FesxIoruJR CHe76QcaPe/WrKUjgxXk4OCCNh89Z3rJ8blJp6HVSF9Ut6WSj1JVOpPX/meJleQPJVPK x73gNpOXZHNrhykdmgsHloA2gUsh7vUAYCWLwIaq2ruT68swVPo3vJYwZlhCbBeKAcE7 HVSw== X-Gm-Message-State: AOAM531j4KmMiwE6bqiQBbuxl4WG+VWi7XHWodYPWvxnSBg96vrnFxPA N7tnG5Q+Y3nqV7wzePg6YqEj9YyeHH6MdQ== X-Google-Smtp-Source: ABdhPJz75Bi+UEScuZB5RscgyoTFRJfZj+07lFNZJHnbB+E/mdLTdWXtEhkE484C8Oj4fJfaTkyq4A== X-Received: by 2002:a05:620a:bce:b0:6a6:7055:c99 with SMTP id s14-20020a05620a0bce00b006a670550c99mr2514197qki.378.1655175462456; Mon, 13 Jun 2022 19:57:42 -0700 (PDT) Received: from bill-the-cat.lan (cpe-65-184-195-139.ec.res.rr.com. [65.184.195.139]) by smtp.gmail.com with ESMTPSA id x7-20020a05622a000700b002f90a33c78csm6443778qtw.67.2022.06.13.19.57.41 for (version=TLS1_3 cipher=TLS_AES_256_GCM_SHA384 bits=256/256); Mon, 13 Jun 2022 19:57:41 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Subject: [PATCH 4/8] Convert CONFIG_ENV_RANGE to Kconfig Date: Mon, 13 Jun 2022 22:57:33 -0400 Message-Id: <20220614025737.3708141-4-trini@konsulko.com> X-Mailer: git-send-email 2.25.1 In-Reply-To: <20220614025737.3708141-1-trini@konsulko.com> References: <20220614025737.3708141-1-trini@konsulko.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.39 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" X-Virus-Scanned: clamav-milter 0.103.5 at phobos.denx.de X-Virus-Status: Clean 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 --- configs/P1010RDB-PA_36BIT_NAND_defconfig | 1 + configs/P1010RDB-PA_NAND_defconfig | 1 + configs/P1010RDB-PB_36BIT_NAND_defconfig | 1 + configs/P1010RDB-PB_NAND_defconfig | 1 + configs/P1020RDB-PC_36BIT_NAND_defconfig | 1 + configs/P1020RDB-PC_NAND_defconfig | 1 + configs/P1020RDB-PD_NAND_defconfig | 1 + configs/P2020RDB-PC_36BIT_NAND_defconfig | 1 + configs/P2020RDB-PC_NAND_defconfig | 1 + configs/colibri-imx6ull_defconfig | 1 + configs/colibri_imx7_defconfig | 1 + configs/colibri_vf_defconfig | 1 + configs/draco_defconfig | 1 + configs/etamin_defconfig | 1 + configs/m53menlo_defconfig | 1 + configs/mx28evk_nand_defconfig | 1 + configs/rastaban_defconfig | 1 + configs/smartweb_defconfig | 1 + configs/thuban_defconfig | 1 + configs/vf610twr_nand_defconfig | 1 + env/Kconfig | 18 ++++++++++-------- env/nand.c | 8 -------- include/configs/P1010RDB.h | 6 ------ include/configs/colibri-imx6ull.h | 5 ----- include/configs/colibri_imx7.h | 5 ----- include/configs/colibri_vf.h | 5 ----- include/configs/draco.h | 3 --- include/configs/etamin.h | 4 ---- include/configs/m53menlo.h | 3 --- include/configs/mx28evk.h | 11 ----------- include/configs/p1_p2_rdb_pc.h | 1 - include/configs/rastaban.h | 3 --- include/configs/smartweb.h | 5 ----- include/configs/thuban.h | 3 --- include/configs/vf610twr.h | 4 ---- 35 files changed, 30 insertions(+), 74 deletions(-) diff --git a/configs/P1010RDB-PA_36BIT_NAND_defconfig b/configs/P1010RDB-PA_36BIT_NAND_defconfig index 4ebb8d06cdd3..8af653c65661 100644 --- a/configs/P1010RDB-PA_36BIT_NAND_defconfig +++ b/configs/P1010RDB-PA_36BIT_NAND_defconfig @@ -69,6 +69,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=ff800000.flash:2m(uboot-env),1m(dtb),5m(kernel CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0xc000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" diff --git a/configs/P1010RDB-PA_NAND_defconfig b/configs/P1010RDB-PA_NAND_defconfig index 9ab41e80a278..f94b24d3bdc7 100644 --- a/configs/P1010RDB-PA_NAND_defconfig +++ b/configs/P1010RDB-PA_NAND_defconfig @@ -68,6 +68,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=ff800000.flash:2m(uboot-env),1m(dtb),5m(kernel CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0xc000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" diff --git a/configs/P1010RDB-PB_36BIT_NAND_defconfig b/configs/P1010RDB-PB_36BIT_NAND_defconfig index e2abe92e7a6b..d5577435c922 100644 --- a/configs/P1010RDB-PB_36BIT_NAND_defconfig +++ b/configs/P1010RDB-PB_36BIT_NAND_defconfig @@ -70,6 +70,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=ff800000.flash:2m(uboot-env),1m(dtb),5m(kernel CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" diff --git a/configs/P1010RDB-PB_NAND_defconfig b/configs/P1010RDB-PB_NAND_defconfig index f27a24b7a18e..3469ea0f40da 100644 --- a/configs/P1010RDB-PB_NAND_defconfig +++ b/configs/P1010RDB-PB_NAND_defconfig @@ -69,6 +69,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=ff800000.flash:2m(uboot-env),1m(dtb),5m(kernel CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" diff --git a/configs/P1020RDB-PC_36BIT_NAND_defconfig b/configs/P1020RDB-PC_36BIT_NAND_defconfig index d8902bc03ffb..19d1718830e5 100644 --- a/configs/P1020RDB-PC_36BIT_NAND_defconfig +++ b/configs/P1020RDB-PC_36BIT_NAND_defconfig @@ -69,6 +69,7 @@ CONFIG_CMD_FAT=y CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0xc000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" diff --git a/configs/P1020RDB-PC_NAND_defconfig b/configs/P1020RDB-PC_NAND_defconfig index c581b9ddbe6c..19f4e1cbcb33 100644 --- a/configs/P1020RDB-PC_NAND_defconfig +++ b/configs/P1020RDB-PC_NAND_defconfig @@ -68,6 +68,7 @@ CONFIG_CMD_FAT=y CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0xc000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" diff --git a/configs/P1020RDB-PD_NAND_defconfig b/configs/P1020RDB-PD_NAND_defconfig index 68034b1febd8..d10d6e802c8a 100644 --- a/configs/P1020RDB-PD_NAND_defconfig +++ b/configs/P1020RDB-PD_NAND_defconfig @@ -71,6 +71,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=ec000000.nor:128k(dtb),6016k(kernel),57088k(fs CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x60000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" diff --git a/configs/P2020RDB-PC_36BIT_NAND_defconfig b/configs/P2020RDB-PC_36BIT_NAND_defconfig index 1401009fb62b..6a6a2bbf6ea6 100644 --- a/configs/P2020RDB-PC_36BIT_NAND_defconfig +++ b/configs/P2020RDB-PC_36BIT_NAND_defconfig @@ -73,6 +73,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=fef000000.nor:256k(vsc7385-firmware),256k(dtb) CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0xc000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" diff --git a/configs/P2020RDB-PC_NAND_defconfig b/configs/P2020RDB-PC_NAND_defconfig index 627c2ab18673..095812ea8b89 100644 --- a/configs/P2020RDB-PC_NAND_defconfig +++ b/configs/P2020RDB-PC_NAND_defconfig @@ -72,6 +72,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=ef000000.nor:256k(vsc7385-firmware),256k(dtb), CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0xc000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y CONFIG_BOOTFILE="uImage" diff --git a/configs/colibri-imx6ull_defconfig b/configs/colibri-imx6ull_defconfig index 750b03b74d8f..a4225d862b44 100644 --- a/configs/colibri-imx6ull_defconfig +++ b/configs/colibri-imx6ull_defconfig @@ -55,6 +55,7 @@ CONFIG_CMD_UBI=y CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_VERSION_VARIABLE=y diff --git a/configs/colibri_imx7_defconfig b/configs/colibri_imx7_defconfig index f56064d34d35..15dae6b3db94 100644 --- a/configs/colibri_imx7_defconfig +++ b/configs/colibri_imx7_defconfig @@ -56,6 +56,7 @@ CONFIG_CMD_UBI=y CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_IP_DEFRAG=y diff --git a/configs/colibri_vf_defconfig b/configs/colibri_vf_defconfig index d92756fb1667..9dbe6280dd74 100644 --- a/configs/colibri_vf_defconfig +++ b/configs/colibri_vf_defconfig @@ -62,6 +62,7 @@ CONFIG_CMD_UBI=y CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_ENV_VARS_UBOOT_RUNTIME_CONFIG=y CONFIG_VERSION_VARIABLE=y diff --git a/configs/draco_defconfig b/configs/draco_defconfig index f7bb01f3bf3a..c137fc72e0f2 100644 --- a/configs/draco_defconfig +++ b/configs/draco_defconfig @@ -79,6 +79,7 @@ CONFIG_SPL_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RETRY_COUNT=10 diff --git a/configs/etamin_defconfig b/configs/etamin_defconfig index 294a67a7facb..f0b10f029239 100644 --- a/configs/etamin_defconfig +++ b/configs/etamin_defconfig @@ -80,6 +80,7 @@ CONFIG_SPL_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x200000 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RETRY_COUNT=10 diff --git a/configs/m53menlo_defconfig b/configs/m53menlo_defconfig index 2ccea8315c71..2ce0ab91819e 100644 --- a/configs/m53menlo_defconfig +++ b/configs/m53menlo_defconfig @@ -68,6 +68,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=mxc_nand:1m(u-boot),512k(env1),512k(env2),-(ub CONFIG_CMD_UBI=y CONFIG_OF_CONTROL=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y diff --git a/configs/mx28evk_nand_defconfig b/configs/mx28evk_nand_defconfig index 6b3235ca6e03..136c1d60699b 100644 --- a/configs/mx28evk_nand_defconfig +++ b/configs/mx28evk_nand_defconfig @@ -43,6 +43,7 @@ CONFIG_MTDPARTS_DEFAULT="mtdparts=gpmi-nand:3m(bootloader)ro,512k(environment),5 CONFIG_CMD_UBI=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_USE_BOOTFILE=y diff --git a/configs/rastaban_defconfig b/configs/rastaban_defconfig index 9f27592088cb..373bca678dda 100644 --- a/configs/rastaban_defconfig +++ b/configs/rastaban_defconfig @@ -79,6 +79,7 @@ CONFIG_SPL_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RETRY_COUNT=10 diff --git a/configs/smartweb_defconfig b/configs/smartweb_defconfig index 57c5218d4b0c..4e05f71bf3af 100644 --- a/configs/smartweb_defconfig +++ b/configs/smartweb_defconfig @@ -69,6 +69,7 @@ CONFIG_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RETRY_COUNT=20 diff --git a/configs/thuban_defconfig b/configs/thuban_defconfig index 0a6b0e88b3fe..6115e9e3edca 100644 --- a/configs/thuban_defconfig +++ b/configs/thuban_defconfig @@ -79,6 +79,7 @@ CONFIG_SPL_OF_CONTROL=y CONFIG_OF_EMBED=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_REDUNDAND_ENVIRONMENT=y CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_NET_RETRY_COUNT=10 diff --git a/configs/vf610twr_nand_defconfig b/configs/vf610twr_nand_defconfig index f6ed47f73488..288169c7ee3f 100644 --- a/configs/vf610twr_nand_defconfig +++ b/configs/vf610twr_nand_defconfig @@ -45,6 +45,7 @@ CONFIG_CMD_UBI=y CONFIG_OF_CONTROL=y CONFIG_ENV_OVERWRITE=y CONFIG_ENV_IS_IN_NAND=y +CONFIG_ENV_RANGE=0x80000 CONFIG_SYS_RELOC_GD_ENV_ADDR=y CONFIG_DM=y CONFIG_VYBRID_GPIO=y diff --git a/env/Kconfig b/env/Kconfig index 0aed7aea46bc..238e4c70cf05 100644 --- a/env/Kconfig +++ b/env/Kconfig @@ -264,14 +264,6 @@ config ENV_IS_IN_NAND during a "saveenv" operation. CONFIG_ENV_OFFSET_REDUND must be 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): 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 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 bool "Environment in a non-volatile RAM" depends on !CHAIN_OF_TRUST diff --git a/env/nand.c b/env/nand.c index 21aa367d5bdf..df300b131793 100644 --- a/env/nand.c +++ b/env/nand.c @@ -33,10 +33,6 @@ #error CONFIG_ENV_OFFSET_REDUND must have CONFIG_CMD_SAVEENV & CONFIG_CMD_NAND #endif -#ifndef CONFIG_ENV_RANGE -#define CONFIG_ENV_RANGE CONFIG_ENV_SIZE -#endif - #if defined(ENV_IS_EMBEDDED) static env_t *env_ptr = &environment; #elif defined(CONFIG_NAND_ENV_DST) @@ -201,10 +197,6 @@ static int env_nand_save(void) #endif }; - - if (CONFIG_ENV_RANGE < CONFIG_ENV_SIZE) - return 1; - ret = env_export(env_new); if (ret) return ret; diff --git a/include/configs/P1010RDB.h b/include/configs/P1010RDB.h index 27361f2d447f..ad78dba865b7 100644 --- a/include/configs/P1010RDB.h +++ b/include/configs/P1010RDB.h @@ -477,12 +477,6 @@ extern unsigned long get_sdram_size(void); #elif defined(CONFIG_MTD_RAW_NAND) #ifdef CONFIG_TPL_BUILD #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 diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h index 40d145a1bec5..bf020612837f 100644 --- a/include/configs/colibri-imx6ull.h +++ b/include/configs/colibri-imx6ull.h @@ -122,11 +122,6 @@ #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR #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 /* NAND stuff */ #define CONFIG_SYS_MAX_NAND_DEVICE 1 diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h index 8e50eeaec15a..c8884e61b715 100644 --- a/include/configs/colibri_imx7.h +++ b/include/configs/colibri_imx7.h @@ -166,11 +166,6 @@ #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR #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 /* NAND stuff */ #define CONFIG_SYS_MAX_NAND_DEVICE 1 diff --git a/include/configs/colibri_vf.h b/include/configs/colibri_vf.h index 9b1cec578e61..7d2b7dece029 100644 --- a/include/configs/colibri_vf.h +++ b/include/configs/colibri_vf.h @@ -91,11 +91,6 @@ #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR #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 DFU */ diff --git a/include/configs/draco.h b/include/configs/draco.h index 21367f0a6f5e..4869008da440 100644 --- a/include/configs/draco.h +++ b/include/configs/draco.h @@ -27,9 +27,6 @@ /* Physical Memory Map */ #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 */ #define CONFIG_EXTRA_ENV_SETTINGS \ "hostname=draco\0" \ diff --git a/include/configs/etamin.h b/include/configs/etamin.h index 654bfc612168..3acc62d9e178 100644 --- a/include/configs/etamin.h +++ b/include/configs/etamin.h @@ -77,10 +77,6 @@ /* 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 #define COMMON_ENV_DFU_ARGS "dfu_args=run bootargs_defaults;" \ "setenv bootargs ${bootargs};" \ diff --git a/include/configs/m53menlo.h b/include/configs/m53menlo.h index b8ad0c3a2164..1533e57fa8ca 100644 --- a/include/configs/m53menlo.h +++ b/include/configs/m53menlo.h @@ -51,9 +51,6 @@ #define CONFIG_MXC_NAND_IP_REGS_BASE NFC_BASE_ADDR #define CONFIG_SYS_NAND_LARGEPAGE #define CONFIG_MXC_NAND_HWECC - -/* Environment is in NAND */ -#define CONFIG_ENV_RANGE (0x00080000) /* 512 KiB */ #endif /* diff --git a/include/configs/mx28evk.h b/include/configs/mx28evk.h index 7a352bd2a605..9f3ac48b70a2 100644 --- a/include/configs/mx28evk.h +++ b/include/configs/mx28evk.h @@ -15,17 +15,6 @@ #define PHYS_SDRAM_1_SIZE 0x40000000 /* Max 1 GB RAM */ #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 */ /* RTC */ diff --git a/include/configs/p1_p2_rdb_pc.h b/include/configs/p1_p2_rdb_pc.h index f241f1483487..786b9812072a 100644 --- a/include/configs/p1_p2_rdb_pc.h +++ b/include/configs/p1_p2_rdb_pc.h @@ -433,7 +433,6 @@ #if defined(CONFIG_SDCARD) #define CONFIG_FSL_FIXED_MMC_LOCATION #elif defined(CONFIG_MTD_RAW_NAND) -#define CONFIG_ENV_RANGE (3 * CONFIG_ENV_SIZE) #ifdef CONFIG_TPL_BUILD #define SPL_ENV_ADDR (CONFIG_SYS_INIT_L2_ADDR + (160 << 10)) #endif diff --git a/include/configs/rastaban.h b/include/configs/rastaban.h index 5de980ddc00a..49cd11c17b44 100644 --- a/include/configs/rastaban.h +++ b/include/configs/rastaban.h @@ -37,9 +37,6 @@ #define EEPROM_ADDR_DDR3 0x90 #define EEPROM_ADDR_CHIP 0x120 -/* Define own nand partitions */ -#define CONFIG_ENV_RANGE (4 * CONFIG_SYS_ENV_SECT_SIZE) - /* Default env settings */ #define CONFIG_EXTRA_ENV_SETTINGS \ "hostname=rastaban\0" \ diff --git a/include/configs/smartweb.h b/include/configs/smartweb.h index 458d22d61f48..da6fb18c17ad 100644 --- a/include/configs/smartweb.h +++ b/include/configs/smartweb.h @@ -87,11 +87,6 @@ /* General Boot Parameter */ -/* - * The NAND Flash partitions: - */ -#define CONFIG_ENV_RANGE (SZ_512K) - /* * Predefined environment variables. * Usefull to define some easy to use boot commands. diff --git a/include/configs/thuban.h b/include/configs/thuban.h index fd903537ae5e..696306e46592 100644 --- a/include/configs/thuban.h +++ b/include/configs/thuban.h @@ -30,9 +30,6 @@ #define EEPROM_ADDR_DDR3 0x90 #define EEPROM_ADDR_CHIP 0x120 -/* Define own nand partitions */ -#define CONFIG_ENV_RANGE (4 * CONFIG_SYS_ENV_SECT_SIZE) - /* Default env settings */ #define CONFIG_EXTRA_ENV_SETTINGS \ "hostname=thuban\0" \ diff --git a/include/configs/vf610twr.h b/include/configs/vf610twr.h index 6ad1ba9e0217..7f4bfb5124ac 100644 --- a/include/configs/vf610twr.h +++ b/include/configs/vf610twr.h @@ -130,8 +130,4 @@ #define CONFIG_SYS_INIT_RAM_ADDR IRAM_BASE_ADDR #define CONFIG_SYS_INIT_RAM_SIZE IRAM_SIZE -#ifdef CONFIG_ENV_IS_IN_NAND -#define CONFIG_ENV_RANGE (512 * 1024) -#endif - #endif -- 2.25.1