script: kernel: Fix delay format to avoid build error
[glsdk/iodelay-config.git] / iodelay-autogen.py
index 3094328599df40884491bc9abc21f8a36e80e080..3e887de13df0cc1efd0fbf0c3edaae5c17e5159e 100755 (executable)
@@ -336,7 +336,7 @@ def pad_dump_gpio(padconf, per_padconf):
 
                offset = addr - 0x4a002000
                gpio_name = xml_pad_get_pin(offset, 14)
-               matchlist = re.match("GPIO(.)_(.)", gpio_name)
+               matchlist = re.match("GPIO(.)_(.*)", gpio_name)
                if (matchlist == None):
                        print "ERR: No GPIO for pad %s" % pad_name
                        continue
@@ -437,13 +437,13 @@ def uboot_format_delay_regs(delayconf, per_delayconf):
                        print "WARN: Skipping MMC delayconf in uboot"
                        continue
 
-               entry = (del_offset, adel, gdel, regname)
+               entry = (del_offset, adel, gdel, regname, pin_name, man_name)
                manual_del.append(entry)
 
        es_rev = args.revision.replace('.', '_')
        print "\nconst struct iodelay_cfg_entry dra742_es" + es_rev + "_iodelay_cfg_array[] = {"
        for entry in sorted(manual_del):
-               print "\t{ 0x%04X, %5d, %5d },\t/* %s */" % entry
+               print "\t{ 0x%04X, %5d, %5d },\t/* %s : %s - %s */" % entry
        print "};\n"
 
 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
@@ -504,7 +504,7 @@ def linux_format_delay_regs(delayconf, per_delayconf):
                for i in per_delayconf[per]:
                        (pad_name, pin_name, regname, del_offset, mode, adel, gdel) = i
 
-                       print "\t\t\t0x%03X A_DELAY(%d) | G_DELAY(%d)\t/* %s */" % (del_offset, adel, gdel, regname)
+                       print "\t\t\t0x%03X (A_DELAY(%d) | G_DELAY(%d))\t/* %s */" % (del_offset, adel, gdel, regname)
                print "\t\t>;"
                print "\t};"
        print "};\n"