summary | shortlog | log | commit | commitdiff | tree
raw | patch | inline | side by side (parent: 6bf03d0)
raw | patch | inline | side by side (parent: 6bf03d0)
author | Nikhil Devshatwar <nikhil.nd@ti.com> | |
Fri, 21 Aug 2015 12:27:55 +0000 (17:57 +0530) | ||
committer | Nikhil Devshatwar <nikhil.nd@ti.com> | |
Fri, 21 Aug 2015 12:34:01 +0000 (18:04 +0530) |
For some peripherals, only one delaymode cannot be used for all pads.
In this case, it is not good to remember the delaymode and select it
automatically for other pads.
e.g. ethernet or mcasp peripherals may use different delaymodes for
RX pads and different delaymodes for TX pads. With strict mode, the
script won't assume anything and ask questions for all the pads.
With this, it's possible to generate data for peripherals using
multiple delaymodes.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
In this case, it is not good to remember the delaymode and select it
automatically for other pads.
e.g. ethernet or mcasp peripherals may use different delaymodes for
RX pads and different delaymodes for TX pads. With strict mode, the
script won't assume anything and ask questions for all the pads.
With this, it's possible to generate data for peripherals using
multiple delaymodes.
Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
iodelay-autogen.py | patch | blob | history |
diff --git a/iodelay-autogen.py b/iodelay-autogen.py
index c472a5ddc82284036fe193a0265d3182a6af3722..0c36c71d3a062ff0028608bb02452d4678b9a1ad 100755 (executable)
--- a/iodelay-autogen.py
+++ b/iodelay-autogen.py
action='store', type=str, default="",
help='generate only for this module')
+parser.add_argument('-s', '--strict', dest='strict',
+ action='store_true',
+ help='strict mode - ask for each pad of the group, do not save selection.\n' \
+ 'For some peripherals, same delaymode cannot be used for all the pads.\n' \
+ 'Use this mode to select different modes for each pad')
+
parser.add_argument('-g', '--gpio', dest='gpio',
action='store_true',
help='generate script to read pad data from GPIO')
print "MENU: Selected mode is %s" % mode
print ""
- # Remember the selection for that module, for later reuse
- sel[module] = mode
return mode
# # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
(pad_name, pin_name, regname, del_offset, man_name, adel, gdel) = i
if (re.match("MMC.*", pin_name) != None):
- print "WARN: Skipping MMC padconf in uboot"
+ print "WARN: Skipping MMC delayconf in uboot"
continue
print "\t{ 0x%04X, %5d, %5d },\t/* %s */" % (del_offset, adel, gdel, regname)
# Need to select one out of allowed modes
mode = select_mode(pad_name, pin_name, module, virt, man, modehelp, sel)
+
+ # Remember the selection for that module, for later reuse
+ if (args.strict == False):
+ sel[module] = mode
+
if (mode == "SKIP"):
continue
-
- if (mode == "LEGACY"):
+ elif (mode == "LEGACY"):
delayinfo = ("LEGACY", "")
elif (mode in virt):
delayinfo = ("VIRTUAL", virt[mode])