From patchwork Thu Nov 28 04:42:16 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Priyanka Jain X-Patchwork-Id: 294782 X-Patchwork-Delegate: panto@antoniou-consulting.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 467E92C008F for ; Thu, 28 Nov 2013 18:30:21 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E30E44BD6A; Thu, 28 Nov 2013 08:30:19 +0100 (CET) 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 4RLwYhcBRcMM; Thu, 28 Nov 2013 08:30:19 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 416594BD7F; Thu, 28 Nov 2013 08:30:05 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2B53A4BAFD for ; Thu, 28 Nov 2013 05:42:44 +0100 (CET) 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 AKLDl3DK9zdq for ; Thu, 28 Nov 2013 05:42:38 +0100 (CET) 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 (tx2ehsobe001.messaging.microsoft.com [65.55.88.11]) by theia.denx.de (Postfix) with ESMTPS id 202F94BAF5 for ; Thu, 28 Nov 2013 05:42:31 +0100 (CET) Received: from mail204-tx2-R.bigfish.com (10.9.14.244) by TX2EHSOBE009.bigfish.com (10.9.40.29) with Microsoft SMTP Server id 14.1.225.22; Thu, 28 Nov 2013 04:42:29 +0000 Received: from mail204-tx2 (localhost [127.0.0.1]) by mail204-tx2-R.bigfish.com (Postfix) with ESMTP id 7CB6EDC026C for ; Thu, 28 Nov 2013 04:42:29 +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: 3 X-BigFish: VS3(zzzz1f42h2148h208ch1ee6h1de0h1fdah2073h2146h1202h1e76h1d1ah1d2ah1fc6hzz1de098h8275bh1de097hz2dh2a8h839he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh2222h224fh1fb3h1d0ch1d2eh1d3fh1dc1h1dfeh1dffh1e23h1fe8h1ff5h2218h2216h226dh22d0h2327h10bek1155h) Received: from mail204-tx2 (localhost.localdomain [127.0.0.1]) by mail204-tx2 (MessageSwitch) id 138561374884158_7902; Thu, 28 Nov 2013 04:42:28 +0000 (UTC) Received: from TX2EHSMHS018.bigfish.com (unknown [10.9.14.253]) by mail204-tx2.bigfish.com (Postfix) with ESMTP id 1149C200046; Thu, 28 Nov 2013 04:42:28 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by TX2EHSMHS018.bigfish.com (10.9.99.118) with Microsoft SMTP Server (TLS) id 14.16.227.3; Thu, 28 Nov 2013 04:42:25 +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; Thu, 28 Nov 2013 04:42:25 +0000 Received: from b32167-VirtualBox.ap.freescale.net (udp164295uds.ap.freescale.net [10.232.14.50] (may be forged)) by tx30smr01.am.freescale.net (8.14.3/8.14.0) with ESMTP id rAS4gK7x022126; Wed, 27 Nov 2013 21:42:23 -0700 From: Priyanka Jain To: Date: Thu, 28 Nov 2013 10:12:16 +0530 Message-ID: <1385613736-2770-1-git-send-email-Priyanka.Jain@freescale.com> X-Mailer: git-send-email 1.7.4.1 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% X-Mailman-Approved-At: Thu, 28 Nov 2013 08:30:03 +0100 Cc: Priyanka Jain , yorksun@freescale.com Subject: [U-Boot] [PATCH][v3] powerpc: mmc: Add corenet devices support in esdhc spl 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 Existing eSDHC SPL framework assumes booting from sd-image with boot_format header which contains final u-boot Image offset and size. No such header is present in case of corenet devices like T1040 as corenet deivces use PBI-RCW based intialization. So, for corenet deives, SPL bootloader use values provided at compilation time. These values can be defined in board specific config file. Signed-off-by: Priyanka Jain Acked-by: Pantelis Antoniou --- Changes for v3: Send as independent patch (not as part of patch set) Changes for v2: Updated description based on Sun York's inputs drivers/mmc/fsl_esdhc_spl.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/mmc/fsl_esdhc_spl.c b/drivers/mmc/fsl_esdhc_spl.c index 65c52a2..8fc263f 100644 --- a/drivers/mmc/fsl_esdhc_spl.c +++ b/drivers/mmc/fsl_esdhc_spl.c @@ -42,6 +42,10 @@ void __noreturn mmc_boot(void) hang(); } +#ifdef CONFIG_FSL_CORENET + offset = CONFIG_SYS_MMC_U_BOOT_OFFS; + code_len = CONFIG_SYS_MMC_U_BOOT_SIZE; +#else blklen = mmc->read_bl_len; tmp_buf = malloc(blklen); if (!tmp_buf) { @@ -91,6 +95,7 @@ void __noreturn mmc_boot(void) /* * Load U-Boot image from mmc into RAM */ +#endif blk_start = ALIGN(offset, mmc->read_bl_len) / mmc->read_bl_len; blk_cnt = ALIGN(code_len, mmc->read_bl_len) / mmc->read_bl_len; err = mmc->block_dev.block_read(0, blk_start, blk_cnt,