From patchwork Tue Jul 26 05:34:07 2016 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Mike Looijmans X-Patchwork-Id: 652613 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 3rz7Wx16cDz9t15 for ; Tue, 26 Jul 2016 16:29:49 +1000 (AEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 652BBA7531; Tue, 26 Jul 2016 08:29:47 +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 6NPNk8VOTxvw; Tue, 26 Jul 2016 08:29:47 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7588BA7537; Tue, 26 Jul 2016 08:29:46 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id E0DBBA7531 for ; Tue, 26 Jul 2016 07:34:25 +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 AjHcHZBtlgLQ for ; Tue, 26 Jul 2016 07:34:25 +0200 (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 atl4mhob15.myregisteredsite.com (atl4mhob15.myregisteredsite.com [209.17.115.53]) by theia.denx.de (Postfix) with ESMTP id 7E8A7A752A for ; Tue, 26 Jul 2016 07:34:21 +0200 (CEST) Received: from mailpod.hostingplatform.com ([10.30.71.209]) by atl4mhob15.myregisteredsite.com (8.14.4/8.14.4) with ESMTP id u6Q5YIlR018100 for ; Tue, 26 Jul 2016 01:34:18 -0400 Received: (qmail 3598 invoked by uid 0); 26 Jul 2016 05:34:18 -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; 26 Jul 2016 05:34:18 -0000 From: Mike Looijmans To: u-boot@lists.denx.de Date: Tue, 26 Jul 2016 07:34:07 +0200 Message-Id: <1469511247-9323-1-git-send-email-mike.looijmans@topic.nl> X-Mailer: git-send-email 1.9.1 X-Mailman-Approved-At: Tue, 26 Jul 2016 08:29:44 +0200 Cc: Mike Looijmans , trini@konsulko.com Subject: [U-Boot] [PATCH v2] 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 set to 16k for the two boards that define this CONFIG_SYS_FDT_BASE parameter. This allows platforms with larger devicetree blobs to boot from NOR. Signed-off-by: Mike Looijmans --- v2: Instead of a default, just specify the value for the two boards that use it. common/spl/spl_nor.c | 4 ++-- include/configs/a3m071.h | 1 + include/configs/microblaze-generic.h | 1 + 3 files changed, 4 insertions(+), 2 deletions(-) diff --git a/common/spl/spl_nor.c b/common/spl/spl_nor.c index da2422f..8ea874c 100644 --- a/common/spl/spl_nor.c +++ b/common/spl/spl_nor.c @@ -40,11 +40,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 { diff --git a/include/configs/a3m071.h b/include/configs/a3m071.h index 8f17dd1..ab2477c 100644 --- a/include/configs/a3m071.h +++ b/include/configs/a3m071.h @@ -334,6 +334,7 @@ #define CONFIG_SYS_OS_BASE 0xfc200000 #define CONFIG_SYS_FDT_BASE 0xfc1e0000 +#define CONFIG_SYS_FDT_SIZE (16<<10) #define CONFIG_EXTRA_ENV_SETTINGS \ "netdev=eth0\0" \ diff --git a/include/configs/microblaze-generic.h b/include/configs/microblaze-generic.h index 047e756..e5bf700 100644 --- a/include/configs/microblaze-generic.h +++ b/include/configs/microblaze-generic.h @@ -305,6 +305,7 @@ 0x60000) #define CONFIG_SYS_FDT_BASE (CONFIG_SYS_FLASH_BASE + \ 0x40000) +#define CONFIG_SYS_FDT_SIZE (16<<10) #define CONFIG_SYS_SPL_ARGS_ADDR (CONFIG_SYS_TEXT_BASE + \ 0x1000000)