From patchwork Sat Jul 20 18:23:30 2019 Content-Type: text/plain; charset="utf-8" MIME-Version: 1.0 Content-Transfer-Encoding: 7bit X-Patchwork-Submitter: Simon Glass X-Patchwork-Id: 1134438 X-Patchwork-Delegate: sjg@chromium.org Return-Path: X-Original-To: incoming@patchwork.ozlabs.org Delivered-To: patchwork-incoming@bilbo.ozlabs.org Authentication-Results: ozlabs.org; spf=none (mailfrom) smtp.mailfrom=lists.denx.de (client-ip=81.169.180.215; helo=lists.denx.de; envelope-from=u-boot-bounces@lists.denx.de; receiver=) Authentication-Results: ozlabs.org; dmarc=fail (p=none dis=none) header.from=chromium.org Authentication-Results: ozlabs.org; dkim=fail reason="signature verification failed" (1024-bit key; unprotected) header.d=chromium.org header.i=@chromium.org header.b="VBJNkTwB"; dkim-atps=neutral Received: from lists.denx.de (dione.denx.de [81.169.180.215]) by ozlabs.org (Postfix) with ESMTP id 45rc7L4N5zz9s4Y for ; Sun, 21 Jul 2019 04:37:50 +1000 (AEST) Received: by lists.denx.de (Postfix, from userid 105) id 54816C21C6A; Sat, 20 Jul 2019 18:28:33 +0000 (UTC) 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=T_DKIM_INVALID autolearn=unavailable autolearn_force=no version=3.4.0 Received: from lists.denx.de (localhost [IPv6:::1]) by lists.denx.de (Postfix) with ESMTP id 0E153C21E3A; Sat, 20 Jul 2019 18:25:33 +0000 (UTC) Received: by lists.denx.de (Postfix, from userid 105) id 046E3C21E2F; Sat, 20 Jul 2019 18:25:09 +0000 (UTC) Received: from mail-io1-f67.google.com (mail-io1-f67.google.com [209.85.166.67]) by lists.denx.de (Postfix) with ESMTPS id 3B5FCC21D4A for ; Sat, 20 Jul 2019 18:25:05 +0000 (UTC) Received: by mail-io1-f67.google.com with SMTP id i10so65180106iol.13 for ; Sat, 20 Jul 2019 11:25:05 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=chromium.org; s=google; h=from:to:cc:subject:date:message-id:in-reply-to:references :mime-version:content-transfer-encoding; bh=QyHRdGFrZ4Tm3DeA78YseF5ivGOw0d4DKJNgXkngVu0=; b=VBJNkTwBClBwXMBAhAZl/qXGVNIFztIYXd2DqOtW8TKWatD4aNvZALYafbbLLpbEmL NOx4Qf0agK7+kILFJGX6wna0SaMoum455caBq+ge8Sv8WtF36vWWgpY5x7C4dwCxyq8A BdfPgdCpNk1gCR0vJswxrnQxY5XRRMoAIy9og= 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:mime-version:content-transfer-encoding; bh=QyHRdGFrZ4Tm3DeA78YseF5ivGOw0d4DKJNgXkngVu0=; b=MxsFQEXyU4MeJGS0WkyngHP9XQoW2KPDIneznvcdMmyk3XEpZJXzxwSboPto1ZS7LH SoN+r55/7q/Q2J+CsLK7XgDVhG1wNN+5Ys3wfDkjyjoC1ugX3xLvmRTaUz/ANtKKiyPd sev7ZGH268nIztmzSrW40VtrS7Y0f5treXuYO+KzDDjfLG4p3vdaywKeBD5gGzblrwMI /PHttHYF2owqGewF/p1jrLPXmfptJIRqKaLxQEETzhmE9E0yKFsTg2ksRMYVMUM4ozU1 VrLNDxBFSN8eWsMm9Uzfpqtm8e2IcFg9Qpacfgu01SblvwmBIDyVKv1YIGmklkoRpkx5 4AFQ== X-Gm-Message-State: APjAAAVt7YtI0rJWhGFi4ovigZH+kG5fJcy18S86SohsgAG7+GM/xn+V b6B5/IlRZOfRZJrpGncz36N4s60HdIo= X-Google-Smtp-Source: APXvYqx9YRIGRUitffsGrMUX7GkS/jE0ai1+XRWqRccWYz2LpLAUVc02hN2SOsw+btxG9+bC0NilBw== X-Received: by 2002:a02:662f:: with SMTP id k47mr62191882jac.4.1563647104141; Sat, 20 Jul 2019 11:25:04 -0700 (PDT) Received: from kiwi.bld.corp.google.com ([2620:15c:183:0:8223:87c:a681:66aa]) by smtp.gmail.com with ESMTPSA id z17sm49778933iol.73.2019.07.20.11.25.03 (version=TLS1_3 cipher=AEAD-AES256-GCM-SHA384 bits=256/256); Sat, 20 Jul 2019 11:25:03 -0700 (PDT) From: Simon Glass To: U-Boot Mailing List Date: Sat, 20 Jul 2019 12:23:30 -0600 Message-Id: <20190720182416.183626-9-sjg@chromium.org> X-Mailer: git-send-email 2.22.0.657.g960e92d24f-goog In-Reply-To: <20190720182416.183626-1-sjg@chromium.org> References: <20190720182416.183626-1-sjg@chromium.org> MIME-Version: 1.0 Subject: [U-Boot] [PATCH 08/53] binman: Rename state.GetFdt() X-BeenThere: u-boot@lists.denx.de X-Mailman-Version: 2.1.18 Precedence: list List-Id: U-Boot discussion List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: u-boot-bounces@lists.denx.de Sender: "U-Boot" This function name conflicts with Fdt.Node.GetFdt() which has a different purpose. Rename it to avoid confusion. The new name suggests it is indexed by entry type rather than filename. This will be tidied up in a future commit. Signed-off-by: Simon Glass Signed-off-by: Simon Glass --- tools/binman/etype/u_boot_dtb_with_ucode.py | 2 +- tools/binman/state.py | 7 ++++--- 2 files changed, 5 insertions(+), 4 deletions(-) diff --git a/tools/binman/etype/u_boot_dtb_with_ucode.py b/tools/binman/etype/u_boot_dtb_with_ucode.py index 188888e022b..9224004efeb 100644 --- a/tools/binman/etype/u_boot_dtb_with_ucode.py +++ b/tools/binman/etype/u_boot_dtb_with_ucode.py @@ -54,7 +54,7 @@ class Entry_u_boot_dtb_with_ucode(Entry_blob_dtb): # Remove the microcode fname = self.GetDefaultFilename() - fdt = state.GetFdt(fname) + fdt = state.GetFdtForEtype(fname) self.ucode = fdt.GetNode('/microcode') if not self.ucode: raise self.Raise("No /microcode node found in '%s'" % fname) diff --git a/tools/binman/state.py b/tools/binman/state.py index 77c7024f5a7..c8175a30334 100644 --- a/tools/binman/state.py +++ b/tools/binman/state.py @@ -33,7 +33,7 @@ main_dtb = None # Entry.ProcessContentsUpdate() allow_entry_expansion = True -def GetFdt(fname): +def GetFdtForEtype(fname): """Get the Fdt object for a particular device-tree filename Binman keeps track of at least one device-tree file called u-boot.dtb but @@ -51,7 +51,8 @@ def GetFdt(fname): def GetFdtPath(fname): """Get the full pathname of a particular Fdt object - Similar to GetFdt() but returns the pathname associated with the Fdt. + Similar to GetFdtForEtype() but returns the pathname associated with the + Fdt. Args: fname: Filename to look up (e.g. 'u-boot.dtb'). @@ -78,7 +79,7 @@ def GetFdtContents(fname='u-boot.dtb'): """ if fname in fdt_files and not use_fake_dtb: pathname = GetFdtPath(fname) - data = GetFdt(fname).GetContents() + data = GetFdtForEtype(fname).GetContents() else: pathname = tools.GetInputFilename(fname) data = tools.ReadFile(pathname)