diff --git a/iodelay-autogen.py b/iodelay-autogen.py
index 0c36c71d3a062ff0028608bb02452d4678b9a1ad..3e887de13df0cc1efd0fbf0c3edaae5c17e5159e 100755 (executable)
--- a/iodelay-autogen.py
+++ b/iodelay-autogen.py
'This script refers to the XML data and automatically generates\n' \
'PAD and DELAY data for the same use case.\n' \
'Note that only the PADs which are used in the dump are configured.',
'This script refers to the XML data and automatically generates\n' \
'PAD and DELAY data for the same use case.\n' \
'Note that only the PADs which are used in the dump are configured.',
- epilog='Generate the pad and delay data using pad regdump')
+ epilog='Generate the pad and delay data using pad register dumps. For this,\n' \
+ 'Run omapconf dump 0x4a003400 0x4a00380c and save the output')
parser.add_argument('-d', '--debug', dest='debug',
action='store', type=int, choices=[0, 1, 2], default=0,
parser.add_argument('-d', '--debug', dest='debug',
action='store', type=int, choices=[0, 1, 2], default=0,
offset = addr - 0x4a002000
gpio_name = xml_pad_get_pin(offset, 14)
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
if (matchlist == None):
print "ERR: No GPIO for pad %s" % pad_name
continue
print "};\n"
def uboot_format_delay_regs(delayconf, per_delayconf):
print "};\n"
def uboot_format_delay_regs(delayconf, per_delayconf):
- print "\nconst struct iodelay_cfg_entry dra742_iodelay_cfg_array[] = {"
+ manual_del = []
for i in delayconf:
(pad_name, pin_name, regname, del_offset, man_name, adel, gdel) = i
for i in delayconf:
(pad_name, pin_name, regname, del_offset, man_name, adel, gdel) = i
print "WARN: Skipping MMC delayconf in uboot"
continue
print "WARN: Skipping MMC delayconf in uboot"
continue
- print "\t{ 0x%04X, %5d, %5d },\t/* %s */" % (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 : %s - %s */" % entry
print "};\n"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
print "};\n"
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
for i in per_delayconf[per]:
(pad_name, pin_name, regname, del_offset, mode, adel, gdel) = i
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"
print "\t\t>;"
print "\t};"
print "};\n"