]> git.ipfire.org Git - people/ms/u-boot.git/blobdiff - tools/microcode-tool.py
mmc: omap_hsmmc: allow mmc clock to be gated
[people/ms/u-boot.git] / tools / microcode-tool.py
index 71c2e91566b54605282a35d4394fc5d5a3c204cd..069d961d80d00430b03ceba2e6f89edc50499fdd 100755 (executable)
@@ -1,4 +1,4 @@
-#!/usr/bin/env python
+#!/usr/bin/env python2
 #
 # Copyright (c) 2014 Google, Inc
 #
@@ -95,9 +95,23 @@ def ParseHeaderFiles(fname_list):
         name = os.path.splitext(name)[0]
         data = []
         with open(fname) as fd:
+            license_start = False
+            license_end = False
             for line in fd:
                 line = line.rstrip()
 
+                if len(line) >= 2:
+                    if line[0] == '/' and line[1] == '*':
+                        license_start = True
+                        continue
+                    if line[0] == '*' and line[1] == '/':
+                        license_end = True
+                        continue
+                if license_start and not license_end:
+                    # Ignore blank line
+                    if len(line) > 0:
+                        license_text.append(line)
+                    continue
                 # Omit anything after the last comma
                 words = line.split(',')[:-1]
                 data += [word + ',' for word in words]