From patchwork Thu Nov 28 04:38:12 2013 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Priyanka Jain X-Patchwork-Id: 294781 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 0DAEE2C00AC for ; Thu, 28 Nov 2013 18:30:10 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C8BBC4AFE7; Thu, 28 Nov 2013 08:30:08 +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 KbnZJqYbEJ5D; Thu, 28 Nov 2013 08:30:08 +0100 (CET) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id C007B4BD51; Thu, 28 Nov 2013 08:30:03 +0100 (CET) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 2C5B94BAF1 for ; Thu, 28 Nov 2013 05:38:39 +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 BamMseYQl91K for ; Thu, 28 Nov 2013 05:38:34 +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-db8lp0187.outbound.messaging.microsoft.com [213.199.154.187]) by theia.denx.de (Postfix) with ESMTPS id 27A4D4BAEA for ; Thu, 28 Nov 2013 05:38:28 +0100 (CET) Received: from mail150-db8-R.bigfish.com (10.174.8.238) by DB8EHSOBE039.bigfish.com (10.174.4.102) with Microsoft SMTP Server id 14.1.225.22; Thu, 28 Nov 2013 04:38:26 +0000 Received: from mail150-db8 (localhost [127.0.0.1]) by mail150-db8-R.bigfish.com (Postfix) with ESMTP id D0253203D8 for ; Thu, 28 Nov 2013 04:38:26 +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 mail150-db8 (localhost.localdomain [127.0.0.1]) by mail150-db8 (MessageSwitch) id 13856135051303_31246; Thu, 28 Nov 2013 04:38:25 +0000 (UTC) Received: from DB8EHSMHS027.bigfish.com (unknown [10.174.8.243]) by mail150-db8.bigfish.com (Postfix) with ESMTP id EFC80140057; Thu, 28 Nov 2013 04:38:24 +0000 (UTC) Received: from mail.freescale.net (70.37.183.190) by DB8EHSMHS027.bigfish.com (10.174.4.37) with Microsoft SMTP Server (TLS) id 14.16.227.3; Thu, 28 Nov 2013 04:38:24 +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:38:23 +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 rAS4cI9D020321; Wed, 27 Nov 2013 21:38:21 -0700 From: Priyanka Jain To: Date: Thu, 28 Nov 2013 10:08:12 +0530 Message-ID: <1385613492-2517-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: spiflash:Add corenet devices support in eSPI 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 eSPI SPL framework assumes booting from spi-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 v3: Send as independent patch (not as part of patch set) Changes for v2: Updated description based on Sun York's inputs drivers/mtd/spi/fsl_espi_spl.c | 5 +++++ 1 files changed, 5 insertions(+), 0 deletions(-) diff --git a/drivers/mtd/spi/fsl_espi_spl.c b/drivers/mtd/spi/fsl_espi_spl.c index 6263d8c..e5ac79b 100644 --- a/drivers/mtd/spi/fsl_espi_spl.c +++ b/drivers/mtd/spi/fsl_espi_spl.c @@ -31,6 +31,10 @@ void spi_boot(void) hang(); } +#ifdef CONFIG_FSL_CORENET + offset = CONFIG_SYS_SPI_FLASH_U_BOOT_OFFS; + code_len = CONFIG_SYS_SPI_FLASH_U_BOOT_SIZE; +#else /* * Load U-Boot image from SPI flash into RAM */ @@ -50,6 +54,7 @@ void spi_boot(void) code_len = *(u32 *)(buf + ESPI_BOOT_IMAGE_SIZE); /* Skip spl code */ code_len = code_len - CONFIG_SPL_MAX_SIZE; +#endif /* copy code to DDR */ spi_flash_read(flash, offset, code_len, (void *)CONFIG_SYS_SPI_FLASH_U_BOOT_DST);