From patchwork Wed Apr 2 11:56:23 2014 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Prabhakar Kushwaha X-Patchwork-Id: 336323 X-Patchwork-Delegate: yorksun@freescale.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 D5EC8140078 for ; Wed, 2 Apr 2014 22:56:54 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 220524BC46; Wed, 2 Apr 2014 13:56:52 +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 CUojexH55H1R; Wed, 2 Apr 2014 13:56:51 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 27F0C4BC3F; Wed, 2 Apr 2014 13:56:50 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8F81C4BC3F for ; Wed, 2 Apr 2014 13:56:45 +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 NINsMsbgZJdp for ; Wed, 2 Apr 2014 13:56:43 +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 tx2outboundpool.messaging.microsoft.com (tx2ehsobe005.messaging.microsoft.com [65.55.88.15]) by theia.denx.de (Postfix) with ESMTPS id 925844BC3C for ; Wed, 2 Apr 2014 13:56:38 +0200 (CEST) Received: from mail139-tx2-R.bigfish.com (10.9.14.238) by TX2EHSOBE011.bigfish.com (10.9.40.31) with Microsoft SMTP Server id 14.1.225.22; Wed, 2 Apr 2014 11:56:36 +0000 Received: from mail139-tx2 (localhost [127.0.0.1]) by mail139-tx2-R.bigfish.com (Postfix) with ESMTP id 323CE2603FA for ; Wed, 2 Apr 2014 11:56:36 +0000 (UTC) X-Forefront-Antispam-Report: CIP:70.37.183.190; KIP:(null); UIP:(null); IPV:NLI; H:mail.freescale.net; RD:none; EFVD:NLI X-SpamScore: 8 X-BigFish: VS8(z1346pzzz1f42h2148h1ee6h1de0h1fdah2073h2146h1202h1e76h2189h1d1ah1d2ah21bch1fc6h208chzz1de098h17326ah8275bh8275dh1de097h186068hz2dh2a8h839hd24he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh2222h224fh1fb3h1d0ch1d2eh1d3fh1dc1h1dfeh1dffh1e23h1fe8h1ff5h2218h2216h226dh22d0h24afh2327h2336h2438h2461h2487h24d7h2516h2545h255eh25cch25f6h2605h268bh26d3h1155h) Received: from mail139-tx2 (localhost.localdomain [127.0.0.1]) by mail139-tx2 (MessageSwitch) id 1396439792423208_32514; Wed, 2 Apr 2014 11:56:32 +0000 (UTC) Received: from TX2EHSMHS042.bigfish.com (unknown [10.9.14.228]) by mail139-tx2.bigfish.com (Postfix) with ESMTP id 0261C24010E; Wed, 2 Apr 2014 11:56:32 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by TX2EHSMHS042.bigfish.com (10.9.99.142) with Microsoft SMTP Server (TLS) id 14.16.227.3; Wed, 2 Apr 2014 11:56:31 +0000 Received: from tx30smr01.am.freescale.net (10.81.153.31) by 039-SN1MMR1-004.039d.mgd.msft.net (10.84.1.14) with Microsoft SMTP Server (TLS) id 14.3.158.2; Wed, 2 Apr 2014 11:56:31 +0000 Received: from b32579-VirtualBox.ap.freescale.net (B32579-02.ap.freescale.net [10.232.132.51]) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id s32BuOGx005603; Wed, 2 Apr 2014 04:56:29 -0700 From: Prabhakar Kushwaha To: Date: Wed, 2 Apr 2014 17:26:23 +0530 Message-ID: <1396439783-32407-1-git-send-email-prabhakar@freescale.com> X-Mailer: git-send-email 1.7.9.5 MIME-Version: 1.0 X-OriginatorOrg: freescale.com X-FOPE-CONNECTOR: Id%0$Dn%*$RO%0$TLS%0$FQDN%$TlsDn% X-FOPE-CONNECTOR: Id%0$Dn%FREESCALE.MAIL.ONMICROSOFT.COM$RO%1$TLS%0$FQDN%$TlsDn% Cc: yorksun@freescale.com Subject: [U-Boot] [PATCH] powerpc/T1040: add mtdparts suppport for T104xRDB and T1040QDS 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: , Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de We use dynamical mtdparts partition instead of directly puting mtd partitions nodes in device tree. Signed-off-by: Prabhakar Kushwaha --- This patch depends upon powerpc/t104xrdb: Unification of T104xRDB header files http://patchwork.ozlabs.org/patch/335207/ include/configs/T1040QDS.h | 17 +++++++++++++++++ include/configs/T104xRDB.h | 17 +++++++++++++++++ 2 files changed, 34 insertions(+) diff --git a/include/configs/T1040QDS.h b/include/configs/T1040QDS.h index 993f9ae..e802a82 100644 --- a/include/configs/T1040QDS.h +++ b/include/configs/T1040QDS.h @@ -649,6 +649,23 @@ unsigned long get_board_ddr_clk(void); #endif /* + * Dynamic MTD Partition support with mtdparts + */ +#ifndef CONFIG_SYS_NO_FLASH +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#define CONFIG_FLASH_CFI_MTD +#define MTDIDS_DEFAULT "nor0=fe8000000.nor,nand0=fff800000.flash," \ + "spi0=spife110000.0" +#define MTDPARTS_DEFAULT "mtdparts=fe8000000.nor:1m(uboot),5m(kernel)," \ + "128k(dtb),96m(fs),-(user);"\ + "fff800000.flash:2m(uboot),9m(kernel),"\ + "128k(dtb),96m(fs),-(user);spife110000.0:" \ + "2m(uboot),9m(kernel),128k(dtb),-(user)" +#endif + +/* * Environment */ #define CONFIG_LOADS_ECHO /* echo on for serial download */ diff --git a/include/configs/T104xRDB.h b/include/configs/T104xRDB.h index 8d2fdb0..16d27f3 100644 --- a/include/configs/T104xRDB.h +++ b/include/configs/T104xRDB.h @@ -611,6 +611,23 @@ #endif /* + * Dynamic MTD Partition support with mtdparts + */ +#ifndef CONFIG_SYS_NO_FLASH +#define CONFIG_MTD_DEVICE +#define CONFIG_MTD_PARTITIONS +#define CONFIG_CMD_MTDPARTS +#define CONFIG_FLASH_CFI_MTD +#define MTDIDS_DEFAULT "nor0=fe8000000.nor,nand0=fff800000.flash," \ + "spi0=spife110000.0" +#define MTDPARTS_DEFAULT "mtdparts=fe8000000.nor:1m(uboot),5m(kernel)," \ + "128k(dtb),96m(fs),-(user);"\ + "fff800000.flash:2m(uboot),9m(kernel),"\ + "128k(dtb),96m(fs),-(user);spife110000.0:" \ + "2m(uboot),9m(kernel),128k(dtb),-(user)" +#endif + +/* * Environment Configuration */ #define CONFIG_ROOTPATH "/opt/nfsroot"