{"id":807273,"url":"http://patchwork.ozlabs.org/api/1.0/patches/807273/?format=json","project":{"id":18,"url":"http://patchwork.ozlabs.org/api/1.0/projects/18/?format=json","name":"U-Boot","link_name":"uboot","list_id":"u-boot.lists.denx.de","list_email":"u-boot@lists.denx.de","web_url":null,"scm_url":null,"webscm_url":null},"msgid":"<20170829201601.64312-8-sjg@chromium.org>","date":"2017-08-29T20:15:52","name":"[U-Boot,v2,07/16] dtoc: Update the Fdt class to record phandles","commit_ref":"09264e04330479fbe5bdb647619be4fd90735bfc","pull_url":null,"state":"accepted","archived":false,"hash":"d9a10c473e856ee1e48c394545cb92d0dee9c8b3","submitter":{"id":6170,"url":"http://patchwork.ozlabs.org/api/1.0/people/6170/?format=json","name":"Simon Glass","email":"sjg@chromium.org"},"delegate":{"id":3184,"url":"http://patchwork.ozlabs.org/api/1.0/users/3184/?format=json","username":"sjg","first_name":"Simon","last_name":"Glass","email":"sjg@chromium.org"},"mbox":"http://patchwork.ozlabs.org/project/uboot/patch/20170829201601.64312-8-sjg@chromium.org/mbox/","series":[{"id":462,"url":"http://patchwork.ozlabs.org/api/1.0/series/462/?format=json","date":"2017-08-29T20:15:45","name":"dtoc: Add support for 64-bit addresses","version":2,"mbox":"http://patchwork.ozlabs.org/series/462/mbox/"}],"check":"pending","checks":"http://patchwork.ozlabs.org/api/patches/807273/checks/","tags":{},"headers":{"Return-Path":"<u-boot-bounces@lists.denx.de>","X-Original-To":"incoming@patchwork.ozlabs.org","Delivered-To":"patchwork-incoming@bilbo.ozlabs.org","Authentication-Results":["ozlabs.org;\n\tspf=none (mailfrom) smtp.mailfrom=lists.denx.de\n\t(client-ip=81.169.180.215; helo=lists.denx.de;\n\tenvelope-from=u-boot-bounces@lists.denx.de;\n\treceiver=<UNKNOWN>)","ozlabs.org;\n\tdkim=fail reason=\"signature verification failed\" (2048-bit key;\n\tunprotected) header.d=google.com header.i=@google.com\n\theader.b=\"WIUq/3wL\"; dkim-atps=neutral"],"Received":["from lists.denx.de (dione.denx.de [81.169.180.215])\n\tby ozlabs.org (Postfix) with ESMTP id 3xhg5r2kVLz9sD9\n\tfor <incoming@patchwork.ozlabs.org>;\n\tWed, 30 Aug 2017 06:21:52 +1000 (AEST)","by lists.denx.de (Postfix, from userid 105)\n\tid 06D66C22569; Tue, 29 Aug 2017 20:19:34 +0000 (UTC)","from lists.denx.de (localhost [IPv6:::1])\n\tby lists.denx.de (Postfix) with ESMTP id B2295C22664;\n\tTue, 29 Aug 2017 20:16:55 +0000 (UTC)","by lists.denx.de (Postfix, from userid 105)\n\tid 14F6AC22643; Tue, 29 Aug 2017 20:16:21 +0000 (UTC)","from mail-oi0-f48.google.com (mail-oi0-f48.google.com\n\t[209.85.218.48])\n\tby lists.denx.de (Postfix) with ESMTPS id F3581C225C6\n\tfor <u-boot@lists.denx.de>; Tue, 29 Aug 2017 20:16:17 +0000 (UTC)","by mail-oi0-f48.google.com with SMTP id r203so36447395oih.0\n\tfor <u-boot@lists.denx.de>; Tue, 29 Aug 2017 13:16:17 -0700 (PDT)","from kiwi.bld.corp.google.com ([100.101.164.89])\n\tby smtp.gmail.com with ESMTPSA id\n\ta190sm3829160oib.38.2017.08.29.13.16.14\n\t(version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128);\n\tTue, 29 Aug 2017 13:16:15 -0700 (PDT)","by kiwi.bld.corp.google.com (Postfix, from userid 121222)\n\tid 0A89413FC5F; Tue, 29 Aug 2017 14:16:14 -0600 (MDT)"],"X-Spam-Checker-Version":"SpamAssassin 3.4.0 (2014-02-07) on lists.denx.de","X-Spam-Level":"","X-Spam-Status":"No, score=0.0 required=5.0 tests=RCVD_IN_DNSWL_NONE,\n\tRCVD_IN_MSPIKE_H2,\n\tT_DKIM_INVALID autolearn=unavailable autolearn_force=no\n\tversion=3.4.0","DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed; d=google.com;\n\ts=20161025; \n\th=sender:from:to:cc:subject:date:message-id:in-reply-to:references;\n\tbh=S9njrX30Cv26sVygdaT8wG4WkVFfpLiMAS8Dp7kdpME=;\n\tb=WIUq/3wLOuH6VZ/jf59eyBOhY3bxe97YTcQ3VOLR2R/EmSGYxiAjmYg1HSvnMSipYb\n\t3HYcvu+xoT0LsvAy0cIW3A1EqHJxm9q75BzEMZr82YjddpkVv6g8YQtbRf9QclW8P54w\n\tRBhY7+uhGTur7DwQweVZoycpsaXDLbcHOgOtiNCSSzrlLN45NHbj4RJdKTnqYmQDlDGv\n\t9JERS+MfJRmbNCSuhtBY7p3PmjC6jREQQdsyd0RmNlPJv9lvtZhZQ17arHqLoygMpYJ7\n\t9G4EVixH5u1HdcGo5+NKr5Yc7sip/ldmBUXrk5HBBbjIR1SftE3U2bXloZtWcE2d6Uut\n\tcIEg==","X-Google-DKIM-Signature":"v=1; a=rsa-sha256; c=relaxed/relaxed;\n\td=1e100.net; s=20161025;\n\th=x-gm-message-state:sender:from:to:cc:subject:date:message-id\n\t:in-reply-to:references;\n\tbh=S9njrX30Cv26sVygdaT8wG4WkVFfpLiMAS8Dp7kdpME=;\n\tb=gvOt3lQI/RZ+YPfWu/8W+NUuGgnpF9zbIp7tyztoYCgkRNKwK9cnsVJUOIwsZ8RI2A\n\t5WMphQ8RF2WoHpyzixF4HPwCiUOZu2nt6UpXZmbIqNk+o0/9fzrAb+R4S5zCIz1fyR2z\n\tr2Zquz6efYdGDUYnuxRMmjSLLLxB50Mkf5+ci8jdGv01Y6CAvVx3zEBJopQ3Adchg8WD\n\tRwyLWfAHnz7SKNo8AdBuOi/l0gEgvIkPu+JCm9lpk3T9zo+g5Aae7Xvcen0jSg2SvEmS\n\tUlHLngGep9u22iWvgoYJ6oM11h3s5bjca94A/FNk53Bk90YgybzJEdJA89m3WC8JGhft\n\tORCA==","X-Gm-Message-State":"AHYfb5if1bOwzrt3eVR/GEInxE12jaaTFTFb/Gdegv9hgPSUzCYcKTZA\n\t29Oz5DCnm8sMIckxkJAJeg==","X-Google-Smtp-Source":"ADKCNb6z28g0O/OQO/pQ2A0TdSv74HRZuMGpbTFf3Hfu0r1eaBWCnMpjhjfm5WcT9aDpQlTOlrlyUg==","X-Received":"by 10.202.229.198 with SMTP id c189mr1314960oih.5.1504037776491; \n\tTue, 29 Aug 2017 13:16:16 -0700 (PDT)","From":"Simon Glass <sjg@chromium.org>","To":"U-Boot Mailing List <u-boot@lists.denx.de>","Date":"Tue, 29 Aug 2017 14:15:52 -0600","Message-Id":"<20170829201601.64312-8-sjg@chromium.org>","X-Mailer":"git-send-email 2.14.1.342.g6490525c54-goog","In-Reply-To":"<20170829201601.64312-1-sjg@chromium.org>","References":"<20170829201601.64312-1-sjg@chromium.org>","Cc":"Tom Rini <trini@konsulko.com>","Subject":"[U-Boot] [PATCH v2 07/16] dtoc: Update the Fdt class to record\n\tphandles","X-BeenThere":"u-boot@lists.denx.de","X-Mailman-Version":"2.1.18","Precedence":"list","List-Id":"U-Boot discussion <u-boot.lists.denx.de>","List-Unsubscribe":"<https://lists.denx.de/options/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=unsubscribe>","List-Archive":"<http://lists.denx.de/pipermail/u-boot/>","List-Post":"<mailto:u-boot@lists.denx.de>","List-Help":"<mailto:u-boot-request@lists.denx.de?subject=help>","List-Subscribe":"<https://lists.denx.de/listinfo/u-boot>,\n\t<mailto:u-boot-request@lists.denx.de?subject=subscribe>","MIME-Version":"1.0","Content-Type":"text/plain; charset=\"utf-8\"","Content-Transfer-Encoding":"base64","Errors-To":"u-boot-bounces@lists.denx.de","Sender":"\"U-Boot\" <u-boot-bounces@lists.denx.de>"},"content":"Add a map from phandles to nodes. This can be used by clients of the the\nclass instead of maintaining this themselves.\n\nSigned-off-by: Simon Glass <sjg@chromium.org>\n---\n\nChanges in v2: None\n\n tools/dtoc/fdt.py | 5 +++++\n 1 file changed, 5 insertions(+)","diff":"diff --git a/tools/dtoc/fdt.py b/tools/dtoc/fdt.py\nindex ffd42ce541..dbc338653b 100644\n--- a/tools/dtoc/fdt.py\n+++ b/tools/dtoc/fdt.py\n@@ -212,6 +212,10 @@ class Node:\n         searching into subnodes so that the entire tree is built.\n         \"\"\"\n         self.props = self._fdt.GetProps(self)\n+        phandle = self.props.get('phandle')\n+        if phandle:\n+            val = fdt_util.fdt32_to_cpu(phandle.value)\n+            self._fdt.phandle_to_node[val] = self\n \n         offset = libfdt.fdt_first_subnode(self._fdt.GetFdt(), self.Offset())\n         while offset >= 0:\n@@ -263,6 +267,7 @@ class Fdt:\n     def __init__(self, fname):\n         self._fname = fname\n         self._cached_offsets = False\n+        self.phandle_to_node = {}\n         if self._fname:\n             self._fname = fdt_util.EnsureCompiled(self._fname)\n \n","prefixes":["U-Boot","v2","07/16"]}