From patchwork Tue Apr 29 23:15:22 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Ash Charles X-Patchwork-Id: 344015 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 2643F140307 for ; Wed, 30 Apr 2014 09:16:26 +1000 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C85384B8EC; Wed, 30 Apr 2014 01:16:24 +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 uzWm41E5-5hE; Wed, 30 Apr 2014 01:16:24 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D89194B90F; Wed, 30 Apr 2014 01:16:15 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B7BC64B8B6 for ; Wed, 30 Apr 2014 01:16:14 +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 AH2lmZUGQUxu for ; Wed, 30 Apr 2014 01:16:12 +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-pd0-f178.google.com (mail-pd0-f178.google.com [209.85.192.178]) by theia.denx.de (Postfix) with ESMTPS id 4AA654B901 for ; Wed, 30 Apr 2014 01:16:04 +0200 (CEST) Received: by mail-pd0-f178.google.com with SMTP id fp1so821007pdb.23 for ; Tue, 29 Apr 2014 16:16:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:message-id:in-reply-to:references; bh=K1VoD8huQ4wclStFsqrgSKZ3yuhb7jn1qHcyo0aTpGc=; b=XouUSnjssPX2I6erjPejNqc8eKv53IvoJhWTVol/qxAwAVRdW8vX8dLWm3wtapHJs9 rKfPgZd+0bmQhRVyKGx1ol3Q7d2jVyMiiJ8yP1dRG6SffNON9Q8T7i0Qj73arqymIJEE WXXqKaaXu/pdgL+FVEiDCZiDSGGTpsFJrJA1nmOYNfALF6rhINfBdBvLS6gPsB0gNePe +xgSWfwQQFxNTRKqBGXIUvULNWPs2ZOs+7gK6f5M1TWf1UmpFQd5euL/29jEFM+nzJYq d4cqoUZLYLLzJ8Emgr4HVRj07atzSpQz+DtJrhKwnvRyIPwnr05QYsfs/TLSb3FlbbXu psTg== X-Received: by 10.66.216.137 with SMTP id oq9mr1294710pac.97.1398813363535; Tue, 29 Apr 2014 16:16:03 -0700 (PDT) Received: from gumstux.bchsia.telus.net (s206-116-3-18.bc.hsia.telus.net. [206.116.3.18]) by mx.google.com with ESMTPSA id xr9sm120609073pab.5.2014.04.29.16.16.02 for (version=TLSv1.1 cipher=ECDHE-RSA-RC4-SHA bits=128/128); Tue, 29 Apr 2014 16:16:02 -0700 (PDT) From: Ash Charles To: u-boot@lists.denx.de Date: Tue, 29 Apr 2014 16:15:22 -0700 Message-Id: <1398813328-17365-3-git-send-email-ashcharles@gmail.com> X-Mailer: git-send-email 1.8.3.2 In-Reply-To: <1398813328-17365-1-git-send-email-ashcharles@gmail.com> References: <1398813328-17365-1-git-send-email-ashcharles@gmail.com> Cc: trini@ti.com, Ash Charles , "Peter A. Bigot" , steve@sakoman.com Subject: [U-Boot] [PATCH 2/8] OMAP3: overo: add command support for mtd and ubi 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 The NAND linux partition format default was changed from jffs2 to ubi in 254973e6df0e48f1a72b67905185c774dcd9f394 but the corresponding commands were not enabled. Signed-off-by: Peter A. Bigot Tested-by: Ash Charles --- include/configs/omap3_overo.h | 40 +++++++++++++++++++++++++++++++++++++--- 1 file changed, 37 insertions(+), 3 deletions(-) diff --git a/include/configs/omap3_overo.h b/include/configs/omap3_overo.h index f26d069..7823aa1 100644 --- a/include/configs/omap3_overo.h +++ b/include/configs/omap3_overo.h @@ -43,9 +43,11 @@ /* * Size of malloc() pool */ -#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB */ - /* Sector */ -#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 10)) +#define CONFIG_ENV_SIZE (128 << 10) /* 128 KiB sector */ + +/* Shift 128 << 15 provides 4 MiB heap to support UBI commands. + * Shift 128 << 10 provides 128 KiB heap for limited-memory devices. */ +#define CONFIG_SYS_MALLOC_LEN (CONFIG_ENV_SIZE + (128 << 15)) /* * Hardware drivers @@ -97,6 +99,37 @@ #undef CONFIG_CMD_NFS /* NFS support */ #define CONFIG_CMD_NET /* bootp, tftpboot, rarpboot */ +#ifdef CONFIG_CMD_NAND + +#define CONFIG_CMD_MTDPARTS /* MTD partition support */ +#define CONFIG_CMD_UBI /* UBI-formated MTD partition support */ +#define CONFIG_CMD_UBIFS /* Read-only UBI volume operations */ + +#define CONFIG_RBTREE /* required by CONFIG_CMD_UBI */ +#define CONFIG_LZO /* required by CONFIG_CMD_UBIFS */ + +#define CONFIG_MTD_DEVICE /* required by CONFIG_CMD_MTDPARTS */ +#define CONFIG_MTD_PARTITIONS /* required for UBI partition support */ + +/* NAND block size is 128 KiB. Synchronize these values with + * overo_nand_partitions in mach-omap2/board-overo.c in Linux: + * xloader 4 * NAND_BLOCK_SIZE = 512 KiB + * uboot 14 * NAND_BLOCK_SIZE = 1792 KiB + * uboot environtment 2 * NAND_BLOCK_SIZE = 256 KiB + * linux 32 * NAND_BLOCK_SIE = 4 MiB + * rootfs remainder + */ +#define MTDIDS_DEFAULT "nand0=omap2-nand.0" +#define MTDPARTS_DEFAULT "mtdparts=omap2-nand.0:" \ + "512k(xloader)," \ + "1792k(u-boot)," \ + "256k(environ)," \ + "4m(linux)," \ + "-(rootfs)" +#else /* CONFIG_CMD_NAND */ +#define MTDPARTS_DEFAULT +#endif /* CONFIG_CMD_NAND */ + #define CONFIG_SYS_NO_FLASH #define CONFIG_SYS_I2C #define CONFIG_SYS_OMAP24_I2C_SPEED 100000 @@ -145,6 +178,7 @@ "mmcrootfstype=ext3 rootwait\0" \ "nandroot=ubi0:rootfs ubi.mtd=4\0" \ "nandrootfstype=ubifs\0" \ + "mtdparts=" MTDPARTS_DEFAULT "\0" \ "mmcargs=setenv bootargs console=${console} " \ "${optargs} " \ "mpurate=${mpurate} " \