From patchwork Tue Dec 4 16:57:20 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Aditya Prayoga X-Patchwork-Id: 1007759 X-Patchwork-Delegate: sr@denx.de Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=none (p=none dis=none) header.from=kobol.io Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 438Skn4gnBz9s8J for ; Wed, 5 Dec 2018 03:59:13 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id 343DEC223B4; Tue, 4 Dec 2018 16:58:02 +0000 (UTC) X-Spam-Checker-Version: SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de X-Spam-Level: X-Spam-Status: No, score=-0.0 required=5.0 tests=RCVD_IN_MSPIKE_H2 autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id B8A54C222DF; Tue, 4 Dec 2018 16:57:51 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id AF430C223CD; Tue, 4 Dec 2018 16:57:45 +0000 (UTC) Received: from relay1-d.mail.gandi.net (relay1-d.mail.gandi.net [217.70.183.193]) by lists.denx.de (Postfix) with ESMTPS id 84440C22334 for ; Tue, 4 Dec 2018 16:57:42 +0000 (UTC) X-Originating-IP: 36.85.228.191 Received: from ubuntuVM.lan (unknown [36.85.228.191]) (Authenticated sender: aditya@kobol.io) by relay1-d.mail.gandi.net (Postfix) with ESMTPSA id DCD7924000C; Tue, 4 Dec 2018 16:57:38 +0000 (UTC) From: Aditya Prayoga To: u-boot@lists.denx.de Date: Wed, 5 Dec 2018 00:57:20 +0800 Message-Id: <1543942645-52770-2-git-send-email-aditya@kobol.io> X-Mailer: git-send-email 2.7.4 In-Reply-To: <1543942645-52770-1-git-send-email-aditya@kobol.io> References: <1543942645-52770-1-git-send-email-aditya@kobol.io> Cc: Baruch Siach , Gauthier Provost , Aditya Prayoga , Dennis Gilmore , Stefan Roese Subject: [U-Boot] [PATCH v3 1/6] arm: mvebu: helios4: mmc: move environment before 1M X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" Store the environment before 1M into the block device. This constant is easier to remember, saves a little space, and is in line with what SolidRun's 2018.01-based fork does for the clearfog. Signed-off-by: Josua Mayer [ Aditya Prayoga: * Port forward] Signed-off-by: Aditya Prayoga Reviewed-by: Stefan Roese --- include/configs/helios4.h | 11 +++-------- 1 file changed, 3 insertions(+), 8 deletions(-) diff --git a/include/configs/helios4.h b/include/configs/helios4.h index ce912ea..c71055f 100644 --- a/include/configs/helios4.h +++ b/include/configs/helios4.h @@ -46,14 +46,9 @@ /* Environment in MMC */ #define CONFIG_SYS_MMC_ENV_DEV 0 #define CONFIG_ENV_SECT_SIZE 0x200 -#define CONFIG_ENV_SIZE 0x10000 -/* - * For SD - reserve 1 LBA for MBR + 1M for u-boot image. The MMC/eMMC - * boot image starts @ LBA-0. - * As result in MMC/eMMC case it will be a 1 sector gap between u-boot - * image and environment - */ -#define CONFIG_ENV_OFFSET 0xf0000 +#define CONFIG_ENV_SIZE 0x2000 +/* stay within first 1M */ +#define CONFIG_ENV_OFFSET (SZ_1M - CONFIG_ENV_SIZE) #define CONFIG_ENV_ADDR CONFIG_ENV_OFFSET #define CONFIG_PHY_MARVELL /* there is a marvell phy */