From patchwork Thu Feb 3 17:41:24 2022 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Marcel Ziswiler X-Patchwork-Id: 1588110 X-Patchwork-Delegate: sbabic@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=pass (sender SPF authorized) smtp.mailfrom=lists.denx.de (client-ip=2a01:238:438b:c500:173d:9f52:ddab:ee01; helo=phobos.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Received: from phobos.denx.de (phobos.denx.de [IPv6:2a01:238:438b:c500:173d:9f52:ddab:ee01]) (using TLSv1.3 with cipher TLS_AES_256_GCM_SHA384 (256/256 bits) key-exchange X25519 server-signature RSA-PSS (4096 bits) server-digest SHA256) (No client certificate requested) by bilbo.ozlabs.org (Postfix) with ESMTPS id 4JqQwN0Yg9z9sCD for ; Fri, 4 Feb 2022 04:42:12 +1100 (AEDT) Received: from h2850616.stratoserver.net (localhost [IPv6:::1]) by phobos.denx.de (Postfix) with ESMTP id CDD1F819A2; Thu, 3 Feb 2022 18:42:07 +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 14A58836BF; Thu, 3 Feb 2022 18:42:06 +0100 (CET) X-Spam-Checker-Version: SpamAssassin 3.4.2 (2018-09-13) on phobos.denx.de X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00,RCVD_IN_MSPIKE_H3, RCVD_IN_MSPIKE_WL,SPF_HELO_PASS,SPF_NONE,T_SCC_BODY_TEXT_LINE autolearn=ham autolearn_force=no version=3.4.2 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 6C0B683388 for ; Thu, 3 Feb 2022 18:42:00 +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 0MCc0S-1n7SeT15Gs-009U0E; Thu, 03 Feb 2022 18:41:43 +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 1/2] colibri-imx6ull: improve env badblock management Date: Thu, 3 Feb 2022 18:41:24 +0100 Message-Id: <20220203174125.712632-2-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 X-Provags-ID: V03:K1:7KAAiYciwmEHyb2kLjyDOHmHCLxV8QCd4fDGPjvKKR2fVD+3kUo Xlj3EcqJQB6eeAFTDN3HByF/FCGTkvwirFKtTvx2jZHFfjyVbWSLb2YGCxlVxZvq/fv7RJ5 sAasTkEEi8YLbeoyDxWSkakcaUu1wsjv0XwPv70fETgcckK5yQG/AWiiA9NWYGWcb56a2BS kTboWvD44qwTrix+mvKZQ== X-UI-Out-Filterresults: notjunk:1;V03:K0:/cBGIZCc+Ck=:ZYjVHNgNfXqSkiQEIH4ncT L+/Kl9QGywIP4xa8kkC8/n5zOcc50aST5cLesEHLE10Yz3wEiJFEcHHLZvEcmYCTIfdXLyV+0 9aM9v13glmd1mHszQa81drdygkHXALU8Gr2ciuUSr57bvSJvKNI7rSeVzxV1fjQX+Ebzd7aZz alT+DM0xA4MrwyZLF7mQqdqUfdWd9h2HHliXR3aBg9z3pFo0Kdtj/DA/83jELCZrJjBZFNWqO WXcb08tbJJzE+IbISkC2Ei0ZiV08jvoogwulLk7aYiqYOyYj7CzKItV4SO023NcIrRw/9MxDZ n7K0+hiviRNXVS9LtCT51urm9sv9JuOmg0vD0AhnsyJWHE9P3n01B/j7Hxgfv8hH8x5b1XYsT Mu8+uJdVkNmLE177RD5/JOgm+D9nZlEzVZAZ0o1stp1jDvAR/+NtEOmaimTxtGtkAWqOh7gS9 oEeYwh4cXROHRMELwXRjSm+YB2BbG4tgA46O8Nzb0O4Z4ITzm/oKMFQ7b6AK9ckLTtSb3yTsD TZUF9vfohvn9QzjN2Vq/XMHmpBRfB/hs42tdfbkX0OG4LjIrIkyjfXzjSWicXplqiOxp7FFDK 6QycVsDMiCMmfddFrdP0LytITLmArIeOmEeFx9GneO2aSaqZoXhDO0mVT7ffb8fnVJ7DWZSH8 3c/163fyeqP1IC6VqxGPheaYcuS65wVOycvFQC76MdeYPI6uZSKnCJPW39rap4SfBt0o= 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 Signed-off-by: Marcel Ziswiler --- Changes in v2: - Re-based on top of today's master taking our recent addition of the eMMC SKU into account. - Just remove stale eMMC environment comment after Kconfig move. include/configs/colibri-imx6ull.h | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/include/configs/colibri-imx6ull.h b/include/configs/colibri-imx6ull.h index 787fe33941..91f0f953a1 100644 --- a/include/configs/colibri-imx6ull.h +++ b/include/configs/colibri-imx6ull.h @@ -140,8 +140,9 @@ (CONFIG_SYS_INIT_RAM_ADDR + CONFIG_SYS_INIT_SP_OFFSET) /* environment organization */ - -/* Environment in eMMC, before config block at the end of 1st "boot sector" */ +#if defined(CONFIG_ENV_IS_IN_NAND) +#define CONFIG_ENV_RANGE (4 * CONFIG_ENV_SIZE) +#endif #ifdef CONFIG_TARGET_COLIBRI_IMX6ULL_NAND /* NAND stuff */