From patchwork Thu Aug 30 19:05:21 2018 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Rob Herring X-Patchwork-Id: 145582 Delivered-To: patch@linaro.org Received: by 2002:a2e:1648:0:0:0:0:0 with SMTP id 8-v6csp256953ljw; Thu, 30 Aug 2018 12:05:29 -0700 (PDT) X-Google-Smtp-Source: ANB0VdanzaPzB9Rf0/o/v38m5gpLcfFmen8wwsR8wHiR3T/Tbg8ikCXMeimOmeNWe1dONehpOrTn X-Received: by 2002:a65:5b48:: with SMTP id y8-v6mr11110139pgr.125.1535655929214; Thu, 30 Aug 2018 12:05:29 -0700 (PDT) ARC-Seal: i=1; a=rsa-sha256; t=1535655929; cv=none; d=google.com; s=arc-20160816; b=HcicEkKLU46LzVyOhTlZvp+CU7SDpM5QZhCldAuBz2xjoNvyPDQPdABImiikmhduHi zssTU7D9NliDuwJvEQQ6Q+njFqkwOWJZhU/v2yALDVGPb/ZsMXryLTaHRX+jqRCFqb5B jNy365xaZQWszMcDQumn6W48Nbf59T1j7+I7RpXyUSE6gMGcCglNV2IkMVpLd6PfubX5 /3KLah9QVH0ptQFa9oijkLpPKcGx9bTRwX0zkg4MUeVRX4Mt3TTYDVy8iGnOsYzpxElx sBMQ//WwmDP7q1TygEkY1xJQOjhJXy+DNmK0kb0TotO2wlD4QEi5+s4xqHv9av3oUjD8 XvAA== ARC-Message-Signature: i=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com; s=arc-20160816; h=list-id:precedence:sender:references:in-reply-to:message-id:date :subject:cc:to:from:arc-authentication-results; bh=fBMJ862XEEIahgbuSdVZDN7DTE3GVasP4unDCjvFxdc=; b=DR2Vq4pVy+x7Xo42yplhiS5RcCOV4ClvUFKCYWgIuB+Qh9Jt7Nos/XasqvFcJ7Nmky DHOHKfitq2sKTEFTKpJ9TwrJiLO1BJnjkmFQD5S/Pf34je7Q2Za8bHSkBJF0OgaR2bf2 34fj7DRqKrzBBAjL09i0SVPAbo8IaWf2kIYDrR26sbydb45CjXWhQi5EfODgkahMH5Hn eLT8M+/169YolBFzAhC6uEhg5Cy2UQAxytcS3MVm8pGvtN6+n4bYxo0bnx+P/UwoIXc/ TJFilUxBjtSHtee4EXQoKugh0oKgwkGY5rLGgSdTAis8RwmC6zSzoIK9rjMVedmckbZE 066w== ARC-Authentication-Results: i=1; mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Return-Path: Received: from vger.kernel.org (vger.kernel.org. [209.132.180.67]) by mx.google.com with ESMTP id r16-v6si7397711pgg.254.2018.08.30.12.05.28; Thu, 30 Aug 2018 12:05:29 -0700 (PDT) Received-SPF: pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) client-ip=209.132.180.67; Authentication-Results: mx.google.com; spf=pass (google.com: best guess record for domain of linux-kernel-owner@vger.kernel.org designates 209.132.180.67 as permitted sender) smtp.mailfrom=linux-kernel-owner@vger.kernel.org; dmarc=fail (p=NONE sp=NONE dis=NONE) header.from=kernel.org Received: (majordomo@vger.kernel.org) by vger.kernel.org via listexpand id S1727544AbeH3XJD (ORCPT + 32 others); Thu, 30 Aug 2018 19:09:03 -0400 Received: from mail-oi0-f66.google.com ([209.85.218.66]:39816 "EHLO mail-oi0-f66.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1727426AbeH3XJC (ORCPT ); Thu, 30 Aug 2018 19:09:02 -0400 Received: by mail-oi0-f66.google.com with SMTP id c190-v6so17378691oig.6; Thu, 30 Aug 2018 12:05:25 -0700 (PDT) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:from:to:cc:subject:date:message-id:in-reply-to :references; bh=fBMJ862XEEIahgbuSdVZDN7DTE3GVasP4unDCjvFxdc=; b=KuPp9/ijSlclldTTh2zLqZwViGGXIkLzmMbqpj2hZywx7801NocSlNB7IaZhlMvy5R GV9y7u6t5dHU+u+/mq6kujDU4MtjtO89jDLM/+dSRuBFx70WWkQJmwYfSuubvZYPdBXC W0ilOhV8ZsJOutgZCKlbLWAZFGwlS5mrOvKZvyASnBK993KTpwjp/zCRWxpk8FTOyRbz MAfaYhKgyXFQ02yitTAuaOw6pf7p9s/u7+HQPd3kRxKGN1v9HuofJ519cis3Tvi5nGQV 9IXH6R++vA00vtCZkJeU4JoyMF1Uew/W1kRCOPOsrZQeCrPrJPhDuTyTDXuwfrAXZ+Xf JpfQ== X-Gm-Message-State: APzg51ChGGFSxnX7hAc+1CXO/tJlDV1FjzXYyf0s/+Td0BoNKfPfb55P ZzPANGRIy+9FnRdaYpw02LporK4= X-Received: by 2002:aca:c141:: with SMTP id r62-v6mr4048910oif.179.1535655925249; Thu, 30 Aug 2018 12:05:25 -0700 (PDT) Received: from xps15.herring.priv (24-155-109-49.dyn.grandenetworks.net. [24.155.109.49]) by smtp.googlemail.com with ESMTPSA id 22-v6sm4200423oix.58.2018.08.30.12.05.24 (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 30 Aug 2018 12:05:24 -0700 (PDT) From: Rob Herring To: Frank Rowand , devicetree@vger.kernel.org Cc: linux-kernel@vger.kernel.org Subject: [PATCH 1/3] of/fdt: Scan the root node properties earlier Date: Thu, 30 Aug 2018 14:05:21 -0500 Message-Id: <20180830190523.31474-2-robh@kernel.org> X-Mailer: git-send-email 2.17.1 In-Reply-To: <20180830190523.31474-1-robh@kernel.org> References: <20180830190523.31474-1-robh@kernel.org> Sender: linux-kernel-owner@vger.kernel.org Precedence: bulk List-ID: X-Mailing-List: linux-kernel@vger.kernel.org Scan the root node properties (#{size,address}-cells) earlier, so that the dt_root_addr_cells and dt_root_size_cells variables are initialized and can be used. Cc: Frank Rowand Signed-off-by: Rob Herring --- drivers/of/fdt.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) -- 2.17.1 diff --git a/drivers/of/fdt.c b/drivers/of/fdt.c index 800ad252cf9c..49abe18f1bde 100644 --- a/drivers/of/fdt.c +++ b/drivers/of/fdt.c @@ -1215,6 +1215,10 @@ bool __init early_init_dt_verify(void *params) initial_boot_params = params; of_fdt_crc32 = crc32_be(~0, initial_boot_params, fdt_totalsize(initial_boot_params)); + + /* Initialize {size,address}-cells info */ + of_scan_flat_dt(early_init_dt_scan_root, NULL); + return true; } @@ -1224,9 +1228,6 @@ void __init early_init_dt_scan_nodes(void) /* Retrieve various information from the /chosen node */ of_scan_flat_dt(early_init_dt_scan_chosen, boot_command_line); - /* Initialize {size,address}-cells info */ - of_scan_flat_dt(early_init_dt_scan_root, NULL); - /* Setup memory, calling early_init_dt_add_memory_arch */ of_scan_flat_dt(early_init_dt_scan_memory, NULL); }