script: Fix the gpio script for bit > 9
[glsdk/iodelay-config.git] / iodelay-autogen.py
index 3094328599df40884491bc9abc21f8a36e80e080..d6a8701f91a3a63ae3dd1b2be4c767ed6be36aba 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"
 
 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #