From patchwork Fri Jul 13 19:41:29 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Javier Martinez Canillas X-Patchwork-Id: 170949 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 4DBA32C030F for ; Sat, 14 Jul 2012 05:42:13 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id DB53F280DF; Fri, 13 Jul 2012 21:42:09 +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 N0rNaQWDDg5E; Fri, 13 Jul 2012 21:42:09 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 38931280D4; Fri, 13 Jul 2012 21:42:08 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BF9E5280D3 for ; Fri, 13 Jul 2012 21:42:05 +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 bsH2TZcbb6G1 for ; Fri, 13 Jul 2012 21:42:05 +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-we0-f172.google.com (mail-we0-f172.google.com [74.125.82.172]) by theia.denx.de (Postfix) with ESMTPS id 08D36280D2 for ; Fri, 13 Jul 2012 21:42:03 +0200 (CEST) Received: by weyu54 with SMTP id u54so2312504wey.3 for ; Fri, 13 Jul 2012 12:42:02 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:x-gm-message-state; bh=N3SliLM2DWJOjNRmVvpbZNlNOSiUIBO6eq2wZvqjB8Y=; b=Qo8AEYNiBW6Qy5yOdcNwCNS2eJp+nGBGK8AYj1G9kVBlZ2lAbvk4yb1Uyxv6Yk+zk2 vcNWX+/Yfb92bRQ9l2KUGYGU8lABXFbXE4UjEbyKDel1fJ2OO7Kwv7DiI0rg292668Xh wWugY8r8uys+6TRizt00LC5b5Rr9fxd4YvK50E2Qne1VT7VBrPUWmh7qh75yAU+ORNcQ 4nN/TYULyv8qml9RLBBYLzgO+AfdM18YA+EQgMs17z/HV0iuZQinDkco4OgZvD2le9lw MzRf16tIUQVLuOLuQvCshwxIO8jyeapwWX5hg6ajxksww3VI0f7SVbWACfGXknaPKvyP +Dzg== Received: by 10.180.79.69 with SMTP id h5mr167654wix.6.1342208521857; Fri, 13 Jul 2012 12:42:01 -0700 (PDT) Received: from localhost.localdomain (37.235.79.188.dynamic.jazztel.es. [188.79.235.37]) by mx.google.com with ESMTPS id j6sm7479775wiy.4.2012.07.13.12.42.00 (version=TLSv1/SSLv3 cipher=OTHER); Fri, 13 Jul 2012 12:42:01 -0700 (PDT) From: Javier Martinez Canillas To: Tom Rini Date: Fri, 13 Jul 2012 21:41:29 +0200 Message-Id: <1342208490-24761-1-git-send-email-javier@dowhile0.org> X-Mailer: git-send-email 1.7.7.6 X-Gm-Message-State: ALoCoQlM9a45DMsvEG3ZdG6JLPs7hSyGeivz6asLusRqXUhvMJ1G7x3OOf2ZM2jXr/pwNZqFfsKo Cc: u-boot@lists.denx.de Subject: [U-Boot] [PATCH u-boot-arm/next 1/2] OMAP3: igep00x0: Add config option to choose flash storage memory 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 IGEP-based boards can have two different flash memories, a OneNAND or a NAND device. Add a configuration option for to choose which memory to use. Signed-off-by: Javier Martinez Canillas Acked-by: Enric Balletbo i Serra --- board/isee/igep0020/igep0020.h | 4 ++++ board/isee/igep0030/igep0030.h | 4 ++++ boards.cfg | 6 ++++-- include/configs/igep00x0.h | 19 +++++++++++++++++++ 4 files changed, 31 insertions(+), 2 deletions(-) diff --git a/board/isee/igep0020/igep0020.h b/board/isee/igep0020/igep0020.h index 3d6e15f..3335ecc 100644 --- a/board/isee/igep0020/igep0020.h +++ b/board/isee/igep0020/igep0020.h @@ -26,7 +26,11 @@ const omap3_sysinfo sysinfo = { DDR_STACKED, "IGEP v2 board", +#if defined(CONFIG_ENV_IS_IN_ONENAND) "ONENAND", +#else + "NAND", +#endif }; static void setup_net_chip(void); diff --git a/board/isee/igep0030/igep0030.h b/board/isee/igep0030/igep0030.h index b7ce5aa..a93339d 100644 --- a/board/isee/igep0030/igep0030.h +++ b/board/isee/igep0030/igep0030.h @@ -26,7 +26,11 @@ const omap3_sysinfo sysinfo = { DDR_STACKED, "OMAP3 IGEP module", +#if defined(CONFIG_ENV_IS_IN_ONENAND) "ONENAND", +#else + "NAND", +#endif }; /* diff --git a/boards.cfg b/boards.cfg index 9efdc6d..7463896 100644 --- a/boards.cfg +++ b/boards.cfg @@ -224,8 +224,10 @@ cm_t35 arm armv7 cm_t35 - omap3_overo arm armv7 overo - omap3 omap3_pandora arm armv7 pandora - omap3 dig297 arm armv7 dig297 comelit omap3 -igep0020 arm armv7 igep0020 isee omap3 igep00x0:MACH_TYPE=MACH_TYPE_IGEP0020 -igep0030 arm armv7 igep0030 isee omap3 igep00x0:MACH_TYPE=MACH_TYPE_IGEP0030 +igep0020 arm armv7 igep0020 isee omap3 igep00x0:MACH_TYPE=MACH_TYPE_IGEP0020,BOOT_ONENAND +igep0020_nand arm armv7 igep0020 isee omap3 igep00x0:MACH_TYPE=MACH_TYPE_IGEP0020,BOOT_NAND +igep0030 arm armv7 igep0030 isee omap3 igep00x0:MACH_TYPE=MACH_TYPE_IGEP0030,BOOT_ONENAND +igep0030_nand arm armv7 igep0030 isee omap3 igep00x0:MACH_TYPE=MACH_TYPE_IGEP0030,BOOT_NAND am3517_evm arm armv7 am3517evm logicpd omap3 mt_ventoux arm armv7 mt_ventoux teejet omap3 omap3_zoom1 arm armv7 zoom1 logicpd omap3 diff --git a/include/configs/igep00x0.h b/include/configs/igep00x0.h index a0a23a7..d8e87c3 100644 --- a/include/configs/igep00x0.h +++ b/include/configs/igep00x0.h @@ -105,7 +105,12 @@ #define CONFIG_CMD_FAT /* FAT support */ #define CONFIG_CMD_I2C /* I2C serial bus support */ #define CONFIG_CMD_MMC /* MMC support */ +#ifdef CONFIG_BOOT_ONENAND #define CONFIG_CMD_ONENAND /* ONENAND support */ +#endif +#ifdef CONFIG_BOOT_NAND +#define CONFIG_CMD_NAND +#endif #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ #define CONFIG_CMD_DHCP #define CONFIG_CMD_PING @@ -244,6 +249,7 @@ * FLASH and environment organization */ +#ifdef CONFIG_BOOT_ONENAND #define PISMO1_ONEN_SIZE GPMC_SIZE_128M /* Configure the PISMO */ #define CONFIG_SYS_ONENAND_BASE ONENAND_MAP @@ -253,6 +259,19 @@ #define CONFIG_ENV_IS_IN_ONENAND 1 #define CONFIG_ENV_SIZE (512 << 10) /* Total Size Environment */ #define CONFIG_ENV_ADDR ONENAND_ENV_OFFSET +#endif + +#ifdef CONFIG_BOOT_NAND +#define PISMO1_NAND_SIZE GPMC_SIZE_128M /* Configure the PISMO */ +#define CONFIG_NAND_OMAP_GPMC +#define CONFIG_SYS_NAND_BASE NAND_BASE +#define GPMC_NAND_ECC_LP_x16_LAYOUT 1 +#define CONFIG_ENV_OFFSET 0x260000 /* environment starts here */ +#define CONFIG_ENV_IS_IN_NAND 1 +#define CONFIG_ENV_SIZE (512 << 10) /* Total Size Environment */ +#define CONFIG_ENV_ADDR NAND_ENV_OFFSET +#define CONFIG_SYS_MAX_NAND_DEVICE 1 +#endif /* * Size of malloc() pool