From patchwork Tue Oct 25 05:15:29 2011 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 121493 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 22DCA1007D9 for ; Tue, 25 Oct 2011 16:16:50 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id B959328E1E; Tue, 25 Oct 2011 07:16:48 +0200 (CEST) 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 f+sfSCnAg-AD; Tue, 25 Oct 2011 07:16:48 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 7459428DFE; Tue, 25 Oct 2011 07:16:46 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 8752928CBE for ; Tue, 25 Oct 2011 07:16:37 +0200 (CEST) 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 rh29prNCFnrr for ; Tue, 25 Oct 2011 07:16:37 +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 smtp-out.google.com (smtp-out.google.com [74.125.121.67]) by theia.denx.de (Postfix) with ESMTPS id D3D8728BF1 for ; Tue, 25 Oct 2011 07:16:34 +0200 (CEST) Received: from wpaz21.hot.corp.google.com (wpaz21.hot.corp.google.com [172.24.198.85]) by smtp-out.google.com with ESMTP id p9P5GOsg024968; Mon, 24 Oct 2011 22:16:25 -0700 Received: from sglass.mtv.corp.google.com (sglass.mtv.corp.google.com [172.22.72.144]) by wpaz21.hot.corp.google.com with ESMTP id p9P5GM43013912; Mon, 24 Oct 2011 22:16:23 -0700 Received: by sglass.mtv.corp.google.com (Postfix, from userid 121222) id CAE06140A18; Mon, 24 Oct 2011 22:16:22 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Mon, 24 Oct 2011 22:15:29 -0700 Message-Id: <1319519734-28704-2-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.3.1 In-Reply-To: <1319519734-28704-1-git-send-email-sjg@chromium.org> References: <1319519734-28704-1-git-send-email-sjg@chromium.org> X-System-Of-Record: true Cc: Grant Likely , Tom Warren Subject: [U-Boot] [PATCH v6 1/6] fdt: ARM: Add device tree control of U-Boot (CONFIG_OF_CONTROL) X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.9 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de This adds a device tree pointer to the global data. It can be set by board code. A later commit will add support for making a device tree binary blob available to U-Boot for run-time configuration. Signed-off-by: Simon Glass --- Changes in v3: - Rename gd->blob to gd->fdt_blob Changes in v4: - Fix reference to gd->blob which should be gd->fdt_blob README | 11 +++++++++++ arch/arm/include/asm/global_data.h | 1 + 2 files changed, 12 insertions(+), 0 deletions(-) diff --git a/README b/README index c6b179c..f424b28 100644 --- a/README +++ b/README @@ -815,6 +815,17 @@ The following options need to be configured: XXX - this list needs to get updated! +- Device tree: + CONFIG_OF_CONTROL + If this variable is defined, U-Boot will use a device tree + to configure its devices, instead of relying on statically + compiled #defines in the board file. This option is + experimental and only available on a few boards. The device + tree is available in the global data as gd->fdt_blob. + + U-Boot needs to get its device tree from somewhere. This will + be enabled in a future patch. + - Watchdog: CONFIG_WATCHDOG If this variable is defined, it enables watchdog diff --git a/arch/arm/include/asm/global_data.h b/arch/arm/include/asm/global_data.h index fac98d5..c3ff789 100644 --- a/arch/arm/include/asm/global_data.h +++ b/arch/arm/include/asm/global_data.h @@ -76,6 +76,7 @@ typedef struct global_data { #if !(defined(CONFIG_SYS_ICACHE_OFF) && defined(CONFIG_SYS_DCACHE_OFF)) unsigned long tlb_addr; #endif + const void *fdt_blob; /* Our device tree, NULL if none */ void **jt; /* jump table */ char env_buf[32]; /* buffer for getenv() before reloc. */ #if defined(CONFIG_POST) || defined(CONFIG_LOGBUFFER)