From patchwork Thu Oct 31 09:45:09 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Priyanka Jain X-Patchwork-Id: 287442 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 B93032C03D0 for ; Thu, 31 Oct 2013 20:46:16 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 1F4024A1B6; Thu, 31 Oct 2013 10:46:14 +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 FNcGUthlwl2N; Thu, 31 Oct 2013 10:46:13 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id BBD004A1B9; Thu, 31 Oct 2013 10:46:08 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 285F34A1B9 for ; Thu, 31 Oct 2013 10:46:01 +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 7y5PE+uEEl5x for ; Thu, 31 Oct 2013 10:45:56 +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 db8outboundpool.messaging.microsoft.com (mail-db8lp0189.outbound.messaging.microsoft.com [213.199.154.189]) by theia.denx.de (Postfix) with ESMTPS id 500DF4A1B6 for ; Thu, 31 Oct 2013 10:45:50 +0100 (CET) Received: from mail164-db8-R.bigfish.com (10.174.8.243) by DB8EHSOBE001.bigfish.com (10.174.4.64) with Microsoft SMTP Server id 14.1.225.22; Thu, 31 Oct 2013 09:45:47 +0000 Received: from mail164-db8 (localhost [127.0.0.1]) by mail164-db8-R.bigfish.com (Postfix) with ESMTP id 29B14DA0185 for ; Thu, 31 Oct 2013 09:45:47 +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(zzzz1f42h208ch1ee6h1de0h1fdah2073h1202h1e76h1d1ah1d2ah1fc6hzz1de098h8275bh1de097hz2dh2a8h839he5bhf0ah1288h12a5h12a9h12bdh12e5h137ah139eh13b6h1441h1504h1537h162dh1631h1758h1898h18e1h1946h19b5h1ad9h1b0ah1b2fh2222h1fb3h1d0ch1d2eh1d3fh1dc1h1dfeh1dffh1e23h1fe8h1ff5h2218h2216h1155h) Received: from mail164-db8 (localhost.localdomain [127.0.0.1]) by mail164-db8 (MessageSwitch) id 138321274614315_4825; Thu, 31 Oct 2013 09:45:46 +0000 (UTC) Received: from DB8EHSMHS014.bigfish.com (unknown [10.174.8.239]) by mail164-db8.bigfish.com (Postfix) with ESMTP id F3C99B00047 for ; Thu, 31 Oct 2013 09:45:45 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by DB8EHSMHS014.bigfish.com (10.174.4.24) with Microsoft SMTP Server (TLS) id 14.16.227.3; Thu, 31 Oct 2013 09:45:45 +0000 Received: from az84smr01.freescale.net (10.64.34.197) by 039-SN1MMR1-001.039d.mgd.msft.net (10.84.1.13) with Microsoft SMTP Server (TLS) id 14.3.158.2; Thu, 31 Oct 2013 09:45:44 +0000 Received: from b32167-VirtualBox.ap.freescale.net (B32167-02-010232014050.ap.freescale.net [10.232.14.50]) by az84smr01.freescale.net (8.14.3/8.14.0) with ESMTP id r9V9jRRI012402; Thu, 31 Oct 2013 02:45:42 -0700 From: Priyanka Jain To: Date: Thu, 31 Oct 2013 15:15:09 +0530 Message-ID: <1383212709-2291-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% Cc: Priyanka Jain , yorksun@freescale.com Subject: [U-Boot] [PATCH 1/2] 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. 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 --- 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,