mirror of
https://github.com/AsahiLinux/u-boot
synced 2024-11-25 06:00:43 +00:00
fdt: Drop fdt_select.py
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>
This commit is contained in:
parent
ec3f378a31
commit
99ed4a2e97
7 changed files with 13 additions and 24 deletions
|
@ -12,7 +12,7 @@ import sys
|
||||||
import tools
|
import tools
|
||||||
|
|
||||||
import command
|
import command
|
||||||
import fdt_select
|
import fdt
|
||||||
import fdt_util
|
import fdt_util
|
||||||
from image import Image
|
from image import Image
|
||||||
import tout
|
import tout
|
||||||
|
|
|
@ -6,7 +6,7 @@
|
||||||
# Entry-type module for U-Boot device tree with the microcode removed
|
# Entry-type module for U-Boot device tree with the microcode removed
|
||||||
#
|
#
|
||||||
|
|
||||||
import fdt_select
|
import fdt
|
||||||
from entry import Entry
|
from entry import Entry
|
||||||
from blob import Entry_blob
|
from blob import Entry_blob
|
||||||
import tools
|
import tools
|
||||||
|
|
|
@ -12,7 +12,7 @@ import tempfile
|
||||||
import unittest
|
import unittest
|
||||||
|
|
||||||
import fdt
|
import fdt
|
||||||
from fdt_select import FdtScan
|
from fdt import FdtScan
|
||||||
import fdt_util
|
import fdt_util
|
||||||
import tools
|
import tools
|
||||||
|
|
||||||
|
|
|
@ -21,7 +21,7 @@ import cmdline
|
||||||
import command
|
import command
|
||||||
import control
|
import control
|
||||||
import entry
|
import entry
|
||||||
import fdt_select
|
import fdt
|
||||||
import fdt_util
|
import fdt_util
|
||||||
import tools
|
import tools
|
||||||
import tout
|
import tout
|
||||||
|
|
|
@ -17,7 +17,6 @@ our_path = os.path.dirname(os.path.realpath(__file__))
|
||||||
sys.path.append(os.path.join(our_path, '../patman'))
|
sys.path.append(os.path.join(our_path, '../patman'))
|
||||||
|
|
||||||
import fdt
|
import fdt
|
||||||
import fdt_select
|
|
||||||
import fdt_util
|
import fdt_util
|
||||||
|
|
||||||
# When we see these properties we ignore them - i.e. do not create a structure member
|
# 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
|
Once this is done, self.fdt.GetRoot() can be called to obtain the
|
||||||
device tree root node, and progress from there.
|
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):
|
def ScanNode(self, root):
|
||||||
for node in root.subnodes:
|
for node in root.subnodes:
|
||||||
|
|
|
@ -14,8 +14,8 @@ import libfdt
|
||||||
|
|
||||||
# This deals with a device tree, presenting it as an assortment of Node and
|
# This deals with a device tree, presenting it as an assortment of Node and
|
||||||
# Prop objects, representing nodes and properties, respectively. This file
|
# Prop objects, representing nodes and properties, respectively. This file
|
||||||
# contains the base classes and defines the high-level API. See fdt_select.py
|
# contains the base classes and defines the high-level API. You can use
|
||||||
# for how to create an Fdt object.
|
# FdtScan() as a convenience function to create and scan an Fdt.
|
||||||
|
|
||||||
# This implementation uses a libfdt Python library to access the device tree,
|
# This implementation uses a libfdt Python library to access the device tree,
|
||||||
# so it is fairly efficient.
|
# so it is fairly efficient.
|
||||||
|
@ -400,3 +400,9 @@ class Fdt:
|
||||||
"""
|
"""
|
||||||
node = Node(fdt, offset, name, path)
|
node = Node(fdt, offset, name, path)
|
||||||
return node
|
return node
|
||||||
|
|
||||||
|
def FdtScan(fname):
|
||||||
|
"""Returns a new Fdt object from the implementation we are using"""
|
||||||
|
dtb = Fdt(fname)
|
||||||
|
dtb.Scan()
|
||||||
|
return dtb
|
||||||
|
|
|
@ -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
|
|
Loading…
Reference in a new issue