From patchwork Fri Oct 26 02:31:08 2012 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 194338 X-Patchwork-Delegate: vanbaren@cideas.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 4892A2C0407 for ; Fri, 26 Oct 2012 13:33:43 +1100 (EST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 9B9974A51B; Fri, 26 Oct 2012 04:32:49 +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 722KIWG2yChd; Fri, 26 Oct 2012 04:32:49 +0200 (CEST) Received: from theia.denx.de (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 873324A47D; Fri, 26 Oct 2012 04:31:41 +0200 (CEST) Received: from localhost (localhost [127.0.0.1]) by theia.denx.de (Postfix) with ESMTP id 923874A445 for ; Fri, 26 Oct 2012 04:31:36 +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 CzsKW570bZf7 for ; Fri, 26 Oct 2012 04:31:35 +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 mail-qa0-f73.google.com (mail-qa0-f73.google.com [209.85.216.73]) by theia.denx.de (Postfix) with ESMTPS id 980444A44D for ; Fri, 26 Oct 2012 04:31:25 +0200 (CEST) Received: by mail-qa0-f73.google.com with SMTP id 6so142qam.0 for ; Thu, 25 Oct 2012 19:31:22 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=20120113; h=from:to:cc:subject:date:message-id:x-mailer:in-reply-to:references :x-gm-message-state; bh=/Z/KRamqtxl7ntX9j7Zy7Abv+4s8e1v6WfB3LV5Ha80=; b=B19AJOLOhdLDsx+E9uvtSSNQJMIJ0tOSQIrrnBl8bp9PSeCcGy82l35Da4v/g1KEBV X0nHqQHJ8Zhd18k50JwpimswfG2Qi8Jl8QnraW4OrguDBvX3p00itVog6jc8wJ9Ib7BJ ovZQqLoSRG2cZKoVBBsui/o9ZGlFx2I6tH6cXSxnTJ6nzkda2jLR+Vo+cJJ9KlCYF7qJ RyPvjo7MCx3c5YEipPgmqCrqiuvY0zHK75arUrtZNItfWBQd6tKBVkiIaWV2AZ9AOSux qJfQ61Hu0iaDmbA+MXtgHOCEtn5418/nasef+Q8BkMmWBbAm8OfQ0t8Gx6gfsdltkQIH 6ycQ== Received: by 10.236.117.66 with SMTP id i42mr14094815yhh.8.1351218682608; Thu, 25 Oct 2012 19:31:22 -0700 (PDT) Received: from wpzn3.hot.corp.google.com (216-239-44-65.google.com [216.239.44.65]) by gmr-mx.google.com with ESMTPS id g7si10001anp.1.2012.10.25.19.31.22 (version=TLSv1/SSLv3 cipher=AES128-SHA); Thu, 25 Oct 2012 19:31:22 -0700 (PDT) Received: from kaka.mtv.corp.google.com (kaka.mtv.corp.google.com [172.22.73.79]) by wpzn3.hot.corp.google.com (Postfix) with ESMTP id 70021100048; Thu, 25 Oct 2012 19:31:22 -0700 (PDT) Received: by kaka.mtv.corp.google.com (Postfix, from userid 121222) id 49AD51609F5; Thu, 25 Oct 2012 19:31:22 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Thu, 25 Oct 2012 19:31:08 -0700 Message-Id: <1351218671-15228-12-git-send-email-sjg@chromium.org> X-Mailer: git-send-email 1.7.7.3 In-Reply-To: <1351218671-15228-1-git-send-email-sjg@chromium.org> References: <1351218671-15228-1-git-send-email-sjg@chromium.org> X-Gm-Message-State: ALoCoQnYc2U0rnB64Dzf4fiTNEdEqyQ/7VOA9K4tNn7zSxIKTuVjzWFydGxUBH/JXm3iSolTwemwSNlAto3ixRM5PWf6CiYL9n4lnWizvJAGzEwrdU+xP4N+a5KLgrCNcNtN+HmZAW6zI6Mc4ZtldrxMYJA9GsWrTKWi3OCveg/lDbmEVOCqPEL8teGuHvGRcSMBbK+sYUov Cc: Gabe Black , Jerry Van Baren , Tom Rini , Devicetree Discuss Subject: [U-Boot] [PATCH 11/14] fdt: Tell the FDT library where the device tree is 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: , MIME-Version: 1.0 Sender: u-boot-bounces@lists.denx.de Errors-To: u-boot-bounces@lists.denx.de From: Gabe Black This change adds a call to set_working_fdt_addr near the end of u-boot initialization which tells the fdt command/library where the device tree is. This makes it possible to use the fdt command to look at the active device tree since otherwise there would be no way to know what address it was at to set things up manually. Signed-off-by: Gabe Black Signed-off-by: Simon Glass --- common/main.c | 8 ++++++++ 1 files changed, 8 insertions(+), 0 deletions(-) diff --git a/common/main.c b/common/main.c index 23a68ee..cf1b5f9 100644 --- a/common/main.c +++ b/common/main.c @@ -45,6 +45,10 @@ #include #endif +#ifdef CONFIG_OF_LIBFDT +#include +#endif /* CONFIG_OF_LIBFDT */ + #include #include #include @@ -418,6 +422,10 @@ void main_loop (void) #endif /* CONFIG_MENUKEY */ #endif /* CONFIG_BOOTDELAY */ +#if defined CONFIG_OF_CONTROL + set_working_fdt_addr((void *)gd->fdt_blob); +#endif /* CONFIG_OF_CONTROL */ + /* * Main Loop for Monitor Command Processing */