diff --git a/iodelay-autogen.py b/iodelay-autogen.py
index f1a79ebd9af96d80b573d4ac5f53970f7d75ebbf..21bec3a993b386739d1da39e56fe3b36ba24b52b 100755 (executable)
--- a/iodelay-autogen.py
+++ b/iodelay-autogen.py
parser.add_argument('-m', '--module', dest='module',
action='store', type=str, default="",
- help='generate only for this module')
+ help='generate only for modules matching the provided RE')
parser.add_argument('-s', '--strict', dest='strict',
action='store_true',
help='check consistency of the XML files and other data')
args = parser.parse_args()
+
+# Some more knobs for developers, Don't want to expose them to cmd line
+args.resetslew = True
+
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
VERSION = "2.4"
if (args.part == "dra74x" or args.part == "dra75x"):
XML_PATH = "XMLFiles/DRA75x_DRA74x"
PART = "DRA75x_DRA74x"
- PCT_VERSION = "v1.0.9"
+ PCT_VERSION = "v1.0.10"
elif (args.part == "dra72x"):
XML_PATH = "XMLFiles/DRA72x"
PART = "DRA72x"
- PCT_VERSION = "v1.0.5"
+ PCT_VERSION = "v1.0.6"
pad_data_xml = XML_PATH + "/CTRL_MODULE_CORE.xml"
iod_data_xml = XML_PATH + "/IODELAYCONFIG.xml"
else:
return padlist[0].get("id")
+def xml_pad_get_slew(offset):
+ padlist = pad_xml.findall("register[@offset='0x%X']" % offset)
+ if (len(padlist) == 0):
+ return 0x0
+ else:
+ bitlist = padlist[0].findall("bitfield[@begin='19']")
+ if (len(bitlist) == 0):
+ return 0x0
+ else:
+ return int(bitlist[0].get("resetval"), 16)
+
def xml_pad_get_pin(offset, muxmode):
padlist = pad_xml.findall("register[@offset='0x%X']" % offset)
if (len(padlist) == 0):
for i in padconf:
(pad_name, pin_name, addr, val, mode, delayinfo) = i
- if (re.match("MMC.*", pin_name) != None):
- print "WARN: Skipping MMC padconf in uboot"
-
muxmode = val & 0xf
(method, data) = delayinfo
if (method == "LEGACY"):
for i in delayconf:
(pad_name, pin_name, regname, del_offset, man_name, adel, gdel) = i
- if (re.match("MMC.*", pin_name) != None):
- print "WARN: Skipping MMC delayconf in uboot"
- continue
-
entry = (del_offset, adel, gdel, regname, pin_name, man_name)
manual_del.append(entry)
for per in per_padconf:
if (re.match("MMC.*", per) == None):
- print "ERR: Only MMC padconf is recommended in kernel"
- continue
+ print "WARN: Only MMC padconf is recommended in kernel"
# Get the mode from the first entry
(pad_name, pin_name, addr, val, mode, delayinfo) = per_padconf[per][0]
for per in per_delayconf.keys():
if (re.match("MMC.*", per) == None):
- print "ERR: Only MMC delayconf is recommended in kernel"
- continue
+ print "WARN: Only MMC delayconf is recommended in kernel"
# Get the mode from the first entry
(pad_name, pin_name, regname, del_offset, mode, adel, gdel) = per_delayconf[per][0]
# Find out if the delaymode for this module is already selected
module = re.match("([^_]+)_.*", pin_name).groups(0)[0]
- if (args.module != "" and args.module != module):
+ if (args.module != "" and re.match("%s" % args.module, module) == None):
continue
+ # It is recommended to keep the reset value of the slewcontrol bit
+ # Find out the reset value from XML and update if required
+ if (args.resetslew):
+ val |= (xml_pad_get_slew(offset) & 0x1) << 19
+
if (args.debug >= 1):
print "\nPAD: %s: Addr= 0x%08X Value = 0x%08X \"%s\"" \
% (pad_name, addr, val, pin_name)