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 E5EECC433FE for ; Thu, 3 Feb 2022 17:42:17 +0000 (UTC) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id 1A856836BF; Thu, 3 Feb 2022 18:42:10 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=ziswiler.com Authentication-Results: phobos.denx.de; spf=pass smtp.mailfrom=u-boot-bounces@lists.denx.de Received: by phobos.denx.de (Postfix, from userid 109) id 3E953838C4; Thu, 3 Feb 2022 18:42:07 +0100 (CET) Received: from mout.perfora.net (mout.perfora.net [74.208.4.194]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits)) (No client certificate requested) by phobos.denx.de (Postfix) with ESMTPS id 368E781980 for ; Thu, 3 Feb 2022 18:42:04 +0100 (CET) Authentication-Results: phobos.denx.de; dmarc=none (p=none dis=none) header.from=ziswiler.com Authentication-Results: phobos.denx.de; spf=none smtp.mailfrom=marcel@ziswiler.com Received: from localhost.localdomain ([81.221.85.15]) by mrelay.perfora.net (mreueus003 [74.208.5.2]) with ESMTPSA (Nemesis) id 0LpLnP-1mbNXz3PYD-00fBm5; Thu, 03 Feb 2022 18:41:47 +0100 From: Marcel Ziswiler To: u-boot@lists.denx.de Cc: Heiko Schocher , Stephan Gerhold , Oleksandr Suvorov , Sebastian Reichel , Fabio Estevam , Harm Berntsen , Philippe Schenker , Weijie Gao , Stefano Babic , Linus Walleij , Hannes Schmelzer , "NXP i . MX U-Boot Team" , Stefan Roese , Simon Glass , Max Krummenacher , Michal Simek , Francesco Dolcini , Marcel Ziswiler Subject: [PATCH v2 2/2] colibri-imx7: improve env badblock management Date: Thu, 3 Feb 2022 18:41:25 +0100 Message-Id: <20220203174125.712632-3-marcel@ziswiler.com> X-Mailer: git-send-email 2.34.1 In-Reply-To: <20220203174125.712632-1-marcel@ziswiler.com> References: <20220203174125.712632-1-marcel@ziswiler.com> MIME-Version: 1.0 Content-Transfer-Encoding: 8bit X-Provags-ID: V03:K1:iVBiYC6o/xWad8Jym/wFd9bwf6LK8EJuvD/bN+5u1lDKjt06O1C CJV1wmEk3scDEW+QzRec3rkA2H5tukVSIRcqxn3keagWkaye2xpvLCc1HRxK2XWqmYJ0fwX vm/As4dC0dvE/LQXNUvSYgKqwvWWt4817YbpXQoB6ceQCpWCMVwSBfnT2FS5SVzh75CS46V wkJdST60JdjChxjY1rcHg== X-UI-Out-Filterresults: notjunk:1;V03:K0:w/0/uUmkpjc=:KIxbZ/PjIKi06DtDICNjbE iR8wIM+asiqf2q+Gx4zWj40TOL364W2Jz9TpTEqjNrPU6eWv1WC+7d7W8veczAYUFcGs2n8jV 1Px1Rw3SP8kC9KuPGbeSGeHlIEUzR5yQCFSvRr2JzoeYcIaKMeQHyXfcyFN8k+QINhe/xxX6Y JXognxQcNkJtB8ofABpXWX++ahYszOPGpTy70l3t4xMAk04hhBAzIM9+i/WK+Bm0178ibMrfn TIP2UYu23ZHuAgbG5KUgq1yTW/WM7EXawZq2HUSq45wqqhmOFGkXmv7yth75ly5KZKJD/aep0 RcT40sJujL9yGVdif4t1096Z6yaI2PxZeXmGNbJJETnIuhwtXf5OYfAUPn4/09EzFikUqhW3G Vd2Ste+U/yXi4O0Szntu+hfgx5a6s96iNanTd2X19JUZjMMHtgCOYFLGMC/zPSlMuAJFrZWEf +5urxt+QFuBTCs+KjVzmbQ6R00fIuGREO/1xMIA/ofFno+VYKuBwOumgu1d/+N7afytRIkT9g udVYt4SWPsX1jGPCA2Oo6RTkZSI+PnW5RX1NAqrWhrQABAVq0XtfuZH1/ESO6DHyI+6L0ZgmI Mb22QI5HUUY3pfVDn3AshX4+2fYzaBYgtHQ4nAonRzts6ulWBe/7XF4Igcr2Emc+OdOuZUHAr Ao+4UYoO98EmdZiYHEZCi6msSFUjbTSQI/yUw6x1AFK25AdevhFK3q37mikQg4nn35+o= 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 From: Francesco Dolcini Use the complete 512kb (4 blocks) nand partition reserved for u-boot environment instead of just the first block, this allows the module to have a working environment even if 3 blocks are bad. Signed-off-by: Francesco Dolcini --- (no changes since v1) include/configs/colibri_imx7.h | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/include/configs/colibri_imx7.h b/include/configs/colibri_imx7.h index faf27ba4fa..92e24ea8c6 100644 --- a/include/configs/colibri_imx7.h +++ b/include/configs/colibri_imx7.h @@ -180,6 +180,11 @@ #define CONFIG_SYS_INIT_SP_ADDR \ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) +/* 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 -- 2.34.1