diff mbox

[U-Boot,16/19] binman: Drop a special case related to fdt_fallback

Message ID 20170417022233.28101-17-sjg@chromium.org
State Accepted
Commit 515d3f08017d2f67fd2e400babadb2c192c5c055
Delegated to: Simon Glass
Headers show

Commit Message

Simon Glass April 17, 2017, 2:22 a.m. UTC
Previously we were sometimes forced to collate x86 microcode due to not
having access to the offset of each individual piece. Now that we never
use fdt_fallback, we don't have this problem. Drop this special case from
the code.

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

 tools/binman/etype/u_boot_dtb_with_ucode.py | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

Comments

Simon Glass May 2, 2017, 11:27 a.m. UTC | #1
Previously we were sometimes forced to collate x86 microcode due to not
having access to the offset of each individual piece. Now that we never
use fdt_fallback, we don't have this problem. Drop this special case from
the code.

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

 tools/binman/etype/u_boot_dtb_with_ucode.py | 13 ++++---------
 1 file changed, 4 insertions(+), 9 deletions(-)

Applied to u-boot-fdt/next, thanks!
diff mbox

Patch

diff --git a/tools/binman/etype/u_boot_dtb_with_ucode.py b/tools/binman/etype/u_boot_dtb_with_ucode.py
index fc02c67c14..95405c6473 100644
--- a/tools/binman/etype/u_boot_dtb_with_ucode.py
+++ b/tools/binman/etype/u_boot_dtb_with_ucode.py
@@ -57,17 +57,12 @@  class Entry_u_boot_dtb_with_ucode(Entry_blob):
             data_prop = node.props.get('data')
             if data_prop:
                 self.ucode_data += ''.join(data_prop.bytes)
-                if not self.collate:
-                    poffset = data_prop.GetOffset()
-                    if poffset is None:
-                        # We cannot obtain a property offset. Collate instead.
-                        self.collate = True
-                    else:
-                        # Find the offset in the device tree of the ucode data
-                        self.ucode_offset = poffset + 12
-                        self.ucode_size = len(data_prop.bytes)
                 if self.collate:
                     prop = node.DeleteProp('data')
+                else:
+                    # Find the offset in the device tree of the ucode data
+                    self.ucode_offset = data_prop.GetOffset() + 12
+                    self.ucode_size = len(data_prop.bytes)
         if self.collate:
             fdt.Pack()
             fdt.Flush()