U-Boot Archive on lore.kernel.org
 help / color / mirror / Atom feed
From: Simon Glass <sjg@chromium.org>
To: u-boot@lists.denx.de
Subject: [U-Boot] [PATCH 19/19] fdt: Drop fdt_select.py
Date: Sun, 16 Apr 2017 20:22:33 -0600	[thread overview]
Message-ID: <20170417022233.28101-20-sjg@chromium.org> (raw)
In-Reply-To: <20170417022233.28101-1-sjg@chromium.org>

This file was used to select between the normal and fallback libfdt
implementations. Now that we only have one, it is not needed.

Drop it and fix up all users.

Signed-off-by: Simon Glass <sjg@chromium.org>
---

 tools/binman/control.py                     |  2 +-
 tools/binman/etype/u_boot_dtb_with_ucode.py |  2 +-
 tools/binman/fdt_test.py                    |  2 +-
 tools/binman/func_test.py                   |  2 +-
 tools/dtoc/dtoc.py                          |  3 +--
 tools/dtoc/fdt.py                           | 10 ++++++++--
 tools/dtoc/fdt_select.py                    | 16 ----------------
 7 files changed, 13 insertions(+), 24 deletions(-)
 delete mode 100644 tools/dtoc/fdt_select.py

diff --git a/tools/binman/control.py b/tools/binman/control.py
index 42d75efbcd..e9d48df030 100644
--- a/tools/binman/control.py
+++ b/tools/binman/control.py
@@ -12,7 +12,7 @@ import sys
 import tools
 
 import command
-import fdt_select
+import fdt
 import fdt_util
 from image import Image
 import tout
diff --git a/tools/binman/etype/u_boot_dtb_with_ucode.py b/tools/binman/etype/u_boot_dtb_with_ucode.py
index 01ee36fb0d..a384a759c4 100644
--- a/tools/binman/etype/u_boot_dtb_with_ucode.py
+++ b/tools/binman/etype/u_boot_dtb_with_ucode.py
@@ -6,7 +6,7 @@
 # Entry-type module for U-Boot device tree with the microcode removed
 #
 
-import fdt_select
+import fdt
 from entry import Entry
 from blob import Entry_blob
 import tools
diff --git a/tools/binman/fdt_test.py b/tools/binman/fdt_test.py
index df2b0a6af7..249a9ea388 100644
--- a/tools/binman/fdt_test.py
+++ b/tools/binman/fdt_test.py
@@ -12,7 +12,7 @@ import tempfile
 import unittest
 
 import fdt
-from fdt_select import FdtScan
+from fdt import FdtScan
 import fdt_util
 import tools
 
diff --git a/tools/binman/func_test.py b/tools/binman/func_test.py
index 8960e23f2c..8b4db41659 100644
--- a/tools/binman/func_test.py
+++ b/tools/binman/func_test.py
@@ -21,7 +21,7 @@ import cmdline
 import command
 import control
 import entry
-import fdt_select
+import fdt
 import fdt_util
 import tools
 import tout
diff --git a/tools/dtoc/dtoc.py b/tools/dtoc/dtoc.py
index afc5171c2a..4b10e5e0f0 100755
--- a/tools/dtoc/dtoc.py
+++ b/tools/dtoc/dtoc.py
@@ -17,7 +17,6 @@ our_path = os.path.dirname(os.path.realpath(__file__))
 sys.path.append(os.path.join(our_path, '../patman'))
 
 import fdt
-import fdt_select
 import fdt_util
 
 # When we see these properties we ignore them - i.e. do not create a structure member
@@ -170,7 +169,7 @@ class DtbPlatdata:
         Once this is done, self.fdt.GetRoot() can be called to obtain the
         device tree root node, and progress from there.
         """
-        self.fdt = fdt_select.FdtScan(self._dtb_fname)
+        self.fdt = fdt.FdtScan(self._dtb_fname)
 
     def ScanNode(self, root):
         for node in root.subnodes:
diff --git a/tools/dtoc/fdt.py b/tools/dtoc/fdt.py
index bff31d1c92..63a32ea2d7 100644
--- a/tools/dtoc/fdt.py
+++ b/tools/dtoc/fdt.py
@@ -14,8 +14,8 @@ import libfdt
 
 # This deals with a device tree, presenting it as an assortment of Node and
 # Prop objects, representing nodes and properties, respectively. This file
-# contains the base classes and defines the high-level API. See fdt_select.py
-# for how to create an Fdt object.
+# contains the base classes and defines the high-level API. You can use
+# FdtScan() as a convenience function to create and scan an Fdt.
 
 # This implementation uses a libfdt Python library to access the device tree,
 # so it is fairly efficient.
@@ -400,3 +400,9 @@ class Fdt:
         """
         node = Node(fdt, offset, name, path)
         return node
+
+def FdtScan(fname):
+    """Returns a new Fdt object from the implementation we are using"""
+    dtb = Fdt(fname)
+    dtb.Scan()
+    return dtb
diff --git a/tools/dtoc/fdt_select.py b/tools/dtoc/fdt_select.py
deleted file mode 100644
index d6337ea227..0000000000
--- a/tools/dtoc/fdt_select.py
+++ /dev/null
@@ -1,16 +0,0 @@
-#!/usr/bin/python
-#
-# Copyright (C) 2016 Google, Inc
-# Written by Simon Glass <sjg@chromium.org>
-#
-# SPDX-License-Identifier:      GPL-2.0+
-#
-
-# Bring in the normal fdt library (which relies on libfdt)
-import fdt
-
-def FdtScan(fname):
-    """Returns a new Fdt object from the implementation we are using"""
-    dtb = fdt.Fdt(fname)
-    dtb.Scan()
-    return dtb
-- 
2.12.2.762.g0e3151a226-goog

  parent reply	other threads:[~2017-04-17  2:22 UTC|newest]

Thread overview: 50+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2017-04-17  2:22 [U-Boot] [PATCH 00/19] fdt: Move to the new upstream pylibfdt library Simon Glass
2017-04-17  2:22 ` [U-Boot] [PATCH 01/19] pci: Correct cast for sandbox Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 02/19] fdt: Correct cast for sandbox in fdtdec_setup_memory_size() Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 03/19] fdt: Use SPDX format for licenses in the libfdt headers Simon Glass
2017-04-17 13:05   ` Tom Rini
2017-04-17 13:13     ` Masahiro Yamada
2017-04-17 13:33       ` Tom Rini
2017-04-17 13:47         ` Simon Glass
2017-04-17 14:01           ` Tom Rini
2017-05-02 11:27             ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 04/19] fdt: Move header files into lib/libfdt Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 05/19] fdt: Allow swig options to be provided by Makefile Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 06/19] fdt: Add all source files to the libfdt build Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 07/19] fdt: Rename existing python libfdt module Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 08/19] fdt: Build the new " Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 09/19] fdt: Update fdt_test to use 'dt' instead of 'fdt' Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 10/19] fdt: dtoc: Add a full set of property tests Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 11/19] fdt: Support use of the new python libfdt library Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 12/19] fdt: Makefile: Build python libfdt library if needed Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 13/19] fdt: Stop building the old python libfdt module Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 14/19] fdt: Drop use of the legacy libfdt python module Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 15/19] fdt: Drop fdt_fallback library Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 16/19] binman: Drop a special case related to fdt_fallback Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 17/19] fdt: Merge fdt_normal with its base class Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` [U-Boot] [PATCH 18/19] binman: Rename fdt variable to dtb Simon Glass
2017-05-02 11:27   ` sjg at google.com
2017-04-17  2:22 ` Simon Glass [this message]
2017-05-02 11:27   ` [U-Boot] [PATCH 19/19] fdt: Drop fdt_select.py sjg at google.com
2017-04-18 16:25 ` [U-Boot] [PATCH 00/19] fdt: Move to the new upstream pylibfdt library Tom Rini
2017-04-18 16:27   ` Simon Glass
2017-04-18 16:33     ` Tom Rini
2017-04-18 16:48       ` Simon Glass
2017-04-19 14:27         ` Tom Rini
2017-05-02 11:31           ` Simon Glass

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20170417022233.28101-20-sjg@chromium.org \
    --to=sjg@chromium.org \
    --cc=u-boot@lists.denx.de \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox