From patchwork Tue Nov 26 06:06:20 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Priyanka Jain X-Patchwork-Id: 294257 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 CC90D2C009F for ; Tue, 26 Nov 2013 19:25:11 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id D9C6F4A96F; Tue, 26 Nov 2013 09:25:07 +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 oWevlHKuQL09; Tue, 26 Nov 2013 09:25:07 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 46D994A976; Tue, 26 Nov 2013 09:25:02 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 3669B4A93D for ; Tue, 26 Nov 2013 07:06:55 +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 UVAthf5Ek5zV for ; Tue, 26 Nov 2013 07:06:49 +0100 (CET) X-policyd-weight: NOT_IN_SBL_XBL_SPAMHAUS=-1.5 NOT_IN_SPAMCOP=-1.5 BL_NJABL=ERR(-1.5) (only DNSBL check requested) Received: from am1outboundpool.messaging.microsoft.com (am1ehsobe004.messaging.microsoft.com [213.199.154.207]) by theia.denx.de (Postfix) with ESMTPS id 71A504A92D for ; Tue, 26 Nov 2013 07:06:41 +0100 (CET) Received: from mail59-am1-R.bigfish.com (10.3.201.237) by AM1EHSOBE016.bigfish.com (10.3.207.138) with Microsoft SMTP Server id 14.1.225.22; Tue, 26 Nov 2013 06:06:41 +0000 Received: from mail59-am1 (localhost [127.0.0.1]) by mail59-am1-R.bigfish.com (Postfix) with ESMTP id 376261802C4 for ; Tue, 26 Nov 2013 06:06:41 +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: 0 X-BigFish: VS0(zzzz1f42h2148h208ch1ee6h1de0h1fdah2073h2146h1202h1e76h1d1ah1d2ah1fc6hzz1de098h8275bh1de097hz2dh2a8h839he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh2222h224fh1fb3h1d0ch1d2eh1d3fh1dc1h1dfeh1dffh1e23h1fe8h1ff5h2218h2216h226dh22d0h1155h) Received: from mail59-am1 (localhost.localdomain [127.0.0.1]) by mail59-am1 (MessageSwitch) id 1385445999615876_11453; Tue, 26 Nov 2013 06:06:39 +0000 (UTC) Received: from AM1EHSMHS021.bigfish.com (unknown [10.3.201.246]) by mail59-am1.bigfish.com (Postfix) with ESMTP id 9175424004D; Tue, 26 Nov 2013 06:06:39 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by AM1EHSMHS021.bigfish.com (10.3.207.150) with Microsoft SMTP Server (TLS) id 14.16.227.3; Tue, 26 Nov 2013 06:06:33 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-003.039d.mgd.msft.net (10.84.1.16) with Microsoft SMTP Server (TLS) id 14.3.158.2; Tue, 26 Nov 2013 06:06:31 +0000 Received: from b32167-VirtualBox.ap.freescale.net (B32167-02-010232134001.ap.freescale.net [10.232.134.1]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id rAQ66Qb9016078; Mon, 25 Nov 2013 23:06:29 -0700 From: Priyanka Jain To: Date: Tue, 26 Nov 2013 11:36:20 +0530 Message-ID: <1385445980-2725-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: Tue, 26 Nov 2013 09:25:01 +0100 Cc: Priyanka Jain , yorksun@freescale.com Subject: [U-Boot] [PATCH 1/2][v2] 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 --- 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,