From patchwork Tue Mar 6 12:33:39 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Christophe Leroy X-Patchwork-Id: 882044 X-Patchwork-Delegate: trini@ti.com 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=c-s.fr Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 3zwbmb1ZKlz9ryL for ; Tue, 6 Mar 2018 23:33:51 +1100 (AEDT) Received: by lists.denx.de (Postfix, from userid 105) id D74E1C21E31; Tue, 6 Mar 2018 12:33:44 +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=none 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 B2552C21C8B; Tue, 6 Mar 2018 12:33:41 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 7C03FC21C8B; Tue, 6 Mar 2018 12:33:40 +0000 (UTC) Received: from pegase1.c-s.fr (pegase1.c-s.fr [93.17.236.30]) by lists.denx.de (Postfix) with ESMTPS id 37833C21C38 for ; Tue, 6 Mar 2018 12:33:40 +0000 (UTC) Received: from localhost (mailhub1-int [192.168.12.234]) by localhost (Postfix) with ESMTP id 3zwbmC5rZbz9ttwF; Tue, 6 Mar 2018 13:33:31 +0100 (CET) X-Virus-Scanned: Debian amavisd-new at c-s.fr Received: from pegase1.c-s.fr ([192.168.12.234]) by localhost (pegase1.c-s.fr [192.168.12.234]) (amavisd-new, port 10024) with ESMTP id EKlXYjTuBCc9; Tue, 6 Mar 2018 13:33:31 +0100 (CET) Received: from messagerie.si.c-s.fr (messagerie.si.c-s.fr [192.168.25.192]) by pegase1.c-s.fr (Postfix) with ESMTP id 3zwbmC5G9Yz9ttwC; Tue, 6 Mar 2018 13:33:31 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by messagerie.si.c-s.fr (Postfix) with ESMTP id CDE6A8B7FE; Tue, 6 Mar 2018 13:33:39 +0100 (CET) X-Virus-Scanned: amavisd-new at c-s.fr Received: from messagerie.si.c-s.fr ([127.0.0.1]) by localhost (messagerie.si.c-s.fr [127.0.0.1]) (amavisd-new, port 10023) with ESMTP id p4jbzXt5CNph; Tue, 6 Mar 2018 13:33:39 +0100 (CET) Received: from po15720vm.idsi0.si.c-s.fr (po15451.idsi0.si.c-s.fr [172.25.231.5]) by messagerie.si.c-s.fr (Postfix) with ESMTP id 9A2028B7E1; Tue, 6 Mar 2018 13:33:39 +0100 (CET) Received: by po15720vm.idsi0.si.c-s.fr (Postfix, from userid 0) id 8825A6F0E5; Tue, 6 Mar 2018 13:33:39 +0100 (CET) Message-Id: <95159e6c8bbb232e98f6332fd839531b05cd420b-1.1520334961.git.christophe.leroy@c-s.fr> In-Reply-To: References: From: Christophe Leroy To: Tom Rini Date: Tue, 6 Mar 2018 13:33:39 +0100 (CET) Cc: Thomas Petazzoni , u-boot@lists.denx.de Subject: [U-Boot] [PATCH v3b 15/15] board: MCR3000: Use smaller flash sector for environment 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" The MCR3000 board is equipped with an AM29LV160DB boot flash which is organised as follows: - One 16kb block - Two 8kb block - One 32kb block - Thirty one 64kb blocks At the time being, u-boot is a single piece occupying the 320 first kbytes, then the environment is stored in the following 64kb block The environment being quite tiny, we save one 64kb block by embedding the environment in the first 8kb block. Signed-off-by: Christophe Leroy --- board/cssi/MCR3000/u-boot.lds | 6 +++--- include/configs/MCR3000.h | 8 ++++---- 2 files changed, 7 insertions(+), 7 deletions(-) diff --git a/board/cssi/MCR3000/u-boot.lds b/board/cssi/MCR3000/u-boot.lds index cd042ca0ce4..990cca4ebb6 100644 --- a/board/cssi/MCR3000/u-boot.lds +++ b/board/cssi/MCR3000/u-boot.lds @@ -18,14 +18,14 @@ SECTIONS .text : { arch/powerpc/cpu/mpc8xx/start.o (.text) - arch/powerpc/cpu/mpc8xx/start.o (.text*) arch/powerpc/cpu/mpc8xx/traps.o (.text*) - arch/powerpc/cpu/mpc8xx/built-in.o (.text*) arch/powerpc/lib/built-in.o (.text*) board/cssi/MCR3000/built-in.o (.text*) - disk/built-in.o (.text*) drivers/net/built-in.o (.text*) + . = DEFINED(env_offset) ? env_offset : .; + env/embedded.o (.text.environment) + *(.text) } _etext = .; diff --git a/include/configs/MCR3000.h b/include/configs/MCR3000.h index ada009e5da4..2b49f97e091 100644 --- a/include/configs/MCR3000.h +++ b/include/configs/MCR3000.h @@ -24,7 +24,7 @@ "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \ "mcr3k:eth0:off;" \ "${ofl_args}; " \ - "bootm 0x04070000 - 0x04060000\0" \ + "bootm 0x04060000 - 0x04050000\0" \ "tftpboot=setenv bootargs " \ "${console_args} " \ "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \ @@ -45,7 +45,7 @@ "${console_args} " \ "ip=${ipaddr}:${serverip}:${gatewayip}:${netmask}:" \ "mcr3k:eth0:off;" \ - "bootm 0x04070000 - 0x04060000\0" \ + "bootm 0x04060000 - 0x04050000\0" \ "dhcpboot=dhcp ${loadaddr} ${filename};" \ "tftp 0xf00000 mcr3000.dtb;" \ "setenv bootargs " \ @@ -102,8 +102,8 @@ /* Environment Configuration */ /* environment is in FLASH */ -#define CONFIG_ENV_SECT_SIZE (64 * 1024) -#define CONFIG_ENV_OFFSET CONFIG_SYS_MONITOR_LEN +#define CONFIG_ENV_SECT_SIZE 0x2000 +#define CONFIG_ENV_OFFSET 0x4000 #define CONFIG_ENV_OVERWRITE 1 /* Ethernet configuration part */