From patchwork Mon Jul 25 11:20:39 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Looijmans X-Patchwork-Id: 652261 X-Patchwork-Delegate: trini@ti.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 3ryhbj4jNyz9t0M for ; Mon, 25 Jul 2016 23:16:33 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 286FDA777B; Mon, 25 Jul 2016 15:16:31 +0200 (CEST) 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 ha-o9x8_rQcu; Mon, 25 Jul 2016 15:16:30 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 4F836A773D; Mon, 25 Jul 2016 15:16:30 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 15DBEA76EF for ; Mon, 25 Jul 2016 13:26:49 +0200 (CEST) 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 TqZNTPJ5sXl1 for ; Mon, 25 Jul 2016 13:26:48 +0200 (CEST) X-Greylist: delayed 347 seconds by postgrey-1.34 at theia; Mon, 25 Jul 2016 13:26:48 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 atl4mhfb01.myregisteredsite.com (atl4mhfb01.myregisteredsite.com [209.17.115.55]) by theia.denx.de (Postfix) with ESMTPS id A5BEAA7624 for ; Mon, 25 Jul 2016 13:26:48 +0200 (CEST) Received: from atl4mhob15.myregisteredsite.com (atl4mhob15.myregisteredsite.com [209.17.115.53]) by atl4mhfb01.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id u6PBL5Fb028135 for ; Mon, 25 Jul 2016 07:21:05 -0400 Received: from mailpod.hostingplatform.com ([10.30.71.211]) by atl4mhob15.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id u6PBKwAp018471 for ; Mon, 25 Jul 2016 07:20:58 -0400 Received: (qmail 27139 invoked by uid 0); 25 Jul 2016 11:20:58 -0000 X-TCPREMOTEIP: 37.74.225.130 X-Authenticated-UID: mike@milosoftware.com Received: from unknown (HELO mikebuntu.TOPIC.LOCAL) (mike@milosoftware.com@37.74.225.130) by 0 with ESMTPA; 25 Jul 2016 11:20:58 -0000 From: Mike Looijmans To: u-boot@lists.denx.de Date: Mon, 25 Jul 2016 13:20:39 +0200 Message-Id: <1469445639-16995-1-git-send-email-mike.looijmans@topic.nl> X-Mailer: git-send-email 1.9.1 X-Mailman-Approved-At: Mon, 25 Jul 2016 15:16:28 +0200 Cc: Mike Looijmans Subject: [U-Boot] [PATCH] spl_nor.c: Support devicetree sizes different from 16k X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.15 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" The devicetrees for various platforms already exceed 16k. Add a define CONFIG_SYS_FDT_SIZE to specify the FDT size, and default to 16k. This allows platforms with larger devicetree blobs to boot from NOR. Signed-off-by: Mike Looijmans --- common/spl/spl_nor.c | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c index da2422f..b37a023 100644 --- a/common/spl/spl_nor.c +++ b/common/spl/spl_nor.c @@ -7,6 +7,11 @@ #include #include +/* 16 KiB default size for DT */ +#ifndef CONFIG_SYS_FDT_SIZE +# define CONFIG_SYS_FDT_SIZE (16<<10) +#endif + int spl_nor_load_image(void) { int ret; @@ -40,11 +45,11 @@ int spl_nor_load_image(void) /* * Copy DT blob (fdt) to SDRAM. Passing pointer to - * flash doesn't work (16 KiB should be enough for DT) + * flash doesn't work */ memcpy((void *)CONFIG_SYS_SPL_ARGS_ADDR, (void *)(CONFIG_SYS_FDT_BASE), - (16 << 10)); + CONFIG_SYS_FDT_SIZE); return 0; } else {