Drop this now-unused library and associated tests.
Signed-off-by: Simon Glass
---
tools/binman/fdt_test.py | 10 ---
tools/binman/func_test.py | 42 ---
tools/dtoc/fdt.py | 4 +-
tools/dtoc/fdt_fallback.py | 181 -
tools/dtoc/fdt_select.py | 24 +-
5 files changed, 18 insertions(+), 243 deletions(-)
delete mode 100644 tools/dtoc/fdt_fallback.py
diff --git a/tools/binman/fdt_test.py b/tools/binman/fdt_test.py
index 65fb947386..df2b0a6af7 100644
--- a/tools/binman/fdt_test.py
+++ b/tools/binman/fdt_test.py
@@ -82,13 +82,3 @@ class TestFdt(unittest.TestCase):
self.assertEquals(list, type(prop.value))
self.assertEquals(3, len(prop.value))
self.assertEquals(['another', 'multi-word', 'message'], prop.value)
-
-def testFdtFallback(self):
-fname = self.GetCompiled('34_x86_ucode.dts')
-dt = FdtScan(fname, True)
-dt.GetProp('/microcode/update@0', 'data')
-self.assertEqual('fred',
-dt.GetProp('/microcode/update@0', 'none', default='fred'))
-self.assertEqual('12345678 12345679',
-dt.GetProp('/microcode/update@0', 'data', typespec='x'))
-self._DeleteProp(dt)
diff --git a/tools/binman/func_test.py b/tools/binman/func_test.py
index 740fa9e4e2..7328d03b5c 100644
--- a/tools/binman/func_test.py
+++ b/tools/binman/func_test.py
@@ -683,7 +683,7 @@ class TestFunctional(unittest.TestCase):
self.assertEqual('nodtb with microcode' + pos_and_size +
' somewhere in here', first)
-def _RunPackUbootSingleMicrocode(self, collate):
+def _RunPackUbootSingleMicrocode(self):
"""Test that x86 microcode can be handled correctly
We expect to see the following in the image, in order:
@@ -695,8 +695,6 @@ class TestFunctional(unittest.TestCase):
# We need the libfdt library to run this test since only that allows
# finding the offset of a property. This is required by
# Entry_u_boot_dtb_with_ucode.ObtainContents().
-if not fdt_select.have_libfdt:
-return
data = self._DoReadFile('35_x86_single_ucode.dts', True)
second = data[len(U_BOOT_NODTB_DATA):]
@@ -705,34 +703,22 @@ class TestFunctional(unittest.TestCase):
third = second[fdt_len:]
second = second[:fdt_len]
-if not collate:
-ucode_data = struct.pack('>2L', 0x12345678, 0x12345679)
-self.assertIn(ucode_data, second)
-ucode_pos = second.find(ucode_data) + len(U_BOOT_NODTB_DATA)
+ucode_data = struct.pack('>2L', 0x12345678, 0x12345679)
+self.assertIn(ucode_data, second)
+ucode_pos = second.find(ucode_data) + len(U_BOOT_NODTB_DATA)
-# Check that the microcode pointer was inserted. It should match
the
-# expected position and size
-pos_and_size = struct.pack('<2L', 0xfe00 + ucode_pos,
-len(ucode_data))
-first = data[:len(U_BOOT_NODTB_DATA)]
-self.assertEqual('nodtb with microcode' + pos_and_size +
-' somewhere in here', first)
+# Check that the microcode pointer was inserted. It should match the
+# expected position and size
+pos_and_size = struct.pack('<2L', 0xfe00 + ucode_pos,
+ len(ucode_data))
+first = data[:len(U_BOOT_NODTB_DATA)]
+self.assertEqual('nodtb with microcode' + pos_and_size +
+ ' somewhere in here', first)
def testPackUbootSingleMicrocode(self):
"""Test that x86 microcode can be handled correctly with fdt_normal.
"""
-self._RunPackUbootSingleMicrocode(False)
-
-def testPackUbootSingleMicrocodeFallback(self):
-"""Test that x86 microcode can be handled correctly with fdt_fallback.
-
-This only supports collating the microcode.
-"""
-try:
-old_val = fdt_select.UseFallback(True)
-self._RunPackUbootSingleMicrocode(True)
-finally:
-fdt_select.UseFallback(old_val)
+self._RunPackUbootSingleMicrocode()
def testUBootImg(self):
"""Test that u-boot.img can be put in a file"""
@@ -763,14 +749,12 @@ class TestFunctional(unittest.TestCase):
def testMicrocodeWithoutPtrInElf(self):
"""Test that a U-Boot binary without the microcode symbol is
detected"""
# ELF file without a '_dt_ucode_base_size' symbol
-if not fdt_select.have_libfdt:
-return
try:
with open(self.TestFile('u_boot_no_ucode_ptr')) as fd:
TestFunctional._MakeInputFile('u-boot', fd.read())
with self.assertRaises(ValueError) as e:
-self._RunPackUbootSingleMicrocode(False)
+self._RunPackUbootSingleMicrocode()