From patchwork Mon May 13 18:28:35 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Tom Rini X-Patchwork-Id: 243485 X-Patchwork-Delegate: trini@ti.com Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Received: from theia.denx.de (theia.denx.de [85.214.87.163]) by ozlabs.org (Postfix) with ESMTP id 2A24C2C00A7 for ; Tue, 14 May 2013 04:29:28 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E3F304A029; Mon, 13 May 2013 20:29:26 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id u8F3C4j7jrCr; Mon, 13 May 2013 20:29:26 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E31ED4A039; Mon, 13 May 2013 20:29:00 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 579204A028 for ; Mon, 13 May 2013 20:28:58 +0200 (CEST) X-Virus-Scanned: Debian amavisd-new at theia.denx.de Received: from theia.denx.de ([127.0.0.1]) by localhost (theia.denx.de [127.0.0.1]) (amavisd-new, port 10024) with ESMTP id PCurrV7+2n6T for ; Mon, 13 May 2013 20:28:53 +0200 (CEST) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 NOT_IN_BL_NJABL=-1.5 (only DNSBL check requested) Received: from mail-gg0-f173.google.com (mail-gg0-f173.google.com [209.85.161.173]) by theia.denx.de (Postfix) with ESMTPS id A310B4A025 for ; Mon, 13 May 2013 20:28:44 +0200 (CEST) Received: by mail-gg0-f173.google.com with SMTP id i25so1464653ggk.32 for ; Mon, 13 May 2013 11:28:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=x-received:sender:from:to:subject:date:message-id:x-mailer :in-reply-to:references; bh=r6fRctJHX5zoVN0u1MHSzzNG+lKGTVDsB3gRdj64Mr4=; b=zRmJQyyy0xUGXA+h3mIetyewfpNe/XI7nEvle1inEWRdbyRYYp5tO8UMH8G5Qk381L dqEXOvwtJTwqdDbY8fLXvbpRBzRs/QdHSQTYCyqiaSDV3tK3tZ1DG4yM4GRngPqwoVWv XAdJR5nXWBbd6vhqLVbrqMHrBL8RhVceZ0KCREktrBHqAVbo2VEWm+4sNER2WoWrXk5n gJlg9X/13wWypwJyHRo7XuS0EAOjfiYXApqmJql6DVhxyK2W33gCyDkUYSL3keBOOjSC ZfG6gSuhEISDmUST1RmWRkKxAXN1m7KMiJAaNghxjLkuwliloYVF9LnQyeL5txgXJBOt AtIQ== X-Received: by 10.236.210.99 with SMTP id t63mr16485525yho.107.1368469723911; Mon, 13 May 2013 11:28:43 -0700 (PDT) Received: from localhost.localdomain (cpe-065-184-250-089.ec.res.rr.com. [65.184.250.89]) by mx.google.com with ESMTPSA id s20sm16463855yhh.17.2013.05.13.11.28.42 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Mon, 13 May 2013 11:28:42 -0700 (PDT) From: Tom Rini To: u-boot@lists.denx.de Date: Mon, 13 May 2013 14:28:35 -0400 Message-Id: <1368469719-22406-3-git-send-email-trini@ti.com> X-Mailer: git-send-email 1.7.9.5 In-Reply-To: <1368469719-22406-1-git-send-email-trini@ti.com> References: <1368469719-22406-1-git-send-email-trini@ti.com> Subject: [U-Boot] [PATCH v2 3/7] am335x_evm: Update SPI_BOOT support, add MTDPARTS info X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.11 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de - Style cleanup (# define -> #define) - Due to ROM issues, redudant loading isn't feasible, so drop. - Given extra space, increase max size of U-Boot to 512KiB - Correct env size to match usage (we had not re-defined ENV_SIZE). - Given extra space, keep env size as 128KiB, add redundant environment. Signed-off-by: Tom Rini Reviewed-by: Peter Korsgaard --- Changes in v2: - Correct physmap -> m25p80 in mtdparts (Peter K). - Style fixups, drop redundant SPL space, add redundant environment. Signed-off-by: Tom Rini --- include/configs/am335x_evm.h | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/include/configs/am335x_evm.h b/include/configs/am335x_evm.h index 945ec09..15822b4 100644 --- a/include/configs/am335x_evm.h +++ b/include/configs/am335x_evm.h @@ -330,7 +330,7 @@ #define CONFIG_SPL_SPI_LOAD #define CONFIG_SPL_SPI_BUS 0 #define CONFIG_SPL_SPI_CS 0 -#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x80000 +#define CONFIG_SYS_SPI_U_BOOT_OFFS 0x20000 #define CONFIG_SPL_MUSB_NEW_SUPPORT #define CONFIG_SPL_LDSCRIPT "$(CPUDIR)/am33xx/u-boot-spl.lds" @@ -420,22 +420,27 @@ #endif /* - * Default to using SPI for environment, etc. We have multiple copies - * of SPL as the ROM will check these locations. - * 0x0 - 0x20000 : First copy of SPL - * 0x20000 - 0x40000 : Second copy of SPL - * 0x40000 - 0x60000 : Third copy of SPL - * 0x60000 - 0x80000 : Fourth copy of SPL - * 0x80000 - 0xDF000 : U-Boot - * 0xDF000 - 0xE0000 : U-Boot Environment - * 0xE0000 - 0x442000 : Linux Kernel + * Default to using SPI for environment, etc. + * 0x000000 - 0x020000 : SPL (128KiB) + * 0x020000 - 0x0A0000 : U-Boot (512KiB) + * 0x0A0000 - 0x0BFFFF : First copy of U-Boot Environment (128KiB) + * 0x0C0000 - 0x0DFFFF : Second copy of U-Boot Environment (128KiB) + * 0x0E0000 - 0x442000 : Linux Kernel * 0x442000 - 0x800000 : Userland */ #if defined(CONFIG_SPI_BOOT) -# define CONFIG_ENV_IS_IN_SPI_FLASH -# define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED -# define CONFIG_ENV_OFFSET (892 << 10) /* 892 KiB in */ -# define CONFIG_ENV_SECT_SIZE (4 << 10) /* 4 KB sectors */ +#define CONFIG_ENV_IS_IN_SPI_FLASH +#define CONFIG_SYS_REDUNDAND_ENVIRONMENT +#define CONFIG_ENV_SPI_MAX_HZ CONFIG_SF_DEFAULT_SPEED +#define CONFIG_ENV_SECT_SIZE (4 << 10) /* 4 KB sectors */ +#define CONFIG_ENV_OFFSET (768 << 10) /* 768 KiB in */ +#define CONFIG_ENV_OFFSET_REDUND (896 << 10) /* 896 KiB in */ +#define CONFIG_CMD_MTDPARTS +#define MTDIDS_DEFAULT "nor0=m25p80-flash.0" +#define MTDPARTS_DEFAULT "mtdparts=m25p80-flash.0:128k(SPL)," \ + "512k(u-boot),128k(u-boot-env1)," \ + "128k(u-boot-env2),3464k(kernel)," \ + "-(rootfs)" #endif /* SPI support */ /* Unsupported features */