script: Add support for SLEWCONTROL in the pad generation
authorNikhil Devshatwar <nikhil.nd@ti.com>
Wed, 25 Nov 2015 09:17:02 +0000 (14:47 +0530)
committerNikhil Devshatwar <nikhil.nd@ti.com>
Wed, 25 Nov 2015 09:17:02 +0000 (14:47 +0530)
Bit number 19 of pad registers allow setting slewrate for that pad.
Interprete the bit and generate the SLEWCONTROL macro whenever required.
Same macro is used for linux and uboot formats.

Signed-off-by: Nikhil Devshatwar <nikhil.nd@ti.com>
iodelay-autogen.py

index 393a2d948635358a21e01f892bfc31da6c70fd84..f1a79ebd9af96d80b573d4ac5f53970f7d75ebbf 100755 (executable)
@@ -405,6 +405,7 @@ def format_delay_regs(delayconf, per_delayconf):
                print "ERR: Format %s not suppported" % args.format
 
 def get_pin_info(val):
                print "ERR: Format %s not suppported" % args.format
 
 def get_pin_info(val):
+       slew_fast = (val >> 19) & 0x1
        inp_en = (val >> 18) & 0x1
        pulltype = (val >> 17) & 0x1
        pull_dis = (val >> 16) & 0x1
        inp_en = (val >> 18) & 0x1
        pulltype = (val >> 17) & 0x1
        pull_dis = (val >> 16) & 0x1
@@ -418,6 +419,8 @@ def get_pin_info(val):
                        pin += "_PULLUP"
                else:
                        pin += "_PULLDOWN"
                        pin += "_PULLUP"
                else:
                        pin += "_PULLDOWN"
+       if (slew_fast):
+               pin += " | SLEWCONTROL"
        return pin
 
 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #
        return pin
 
 # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # # #