RM-autogen.py: Update template for boarcfg_sciclient
authorNikhil Devshatwar <nikhil.nd@ti.com>
Mon, 18 May 2020 17:31:44 +0000 (23:01 +0530)
committerNikhil Devshatwar <nikhil.nd@ti.com>
Mon, 18 May 2020 17:31:47 +0000 (23:01 +0530)
Update the template for sciclient RM board config to
reflect coding practices as expected in the pdk

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

index a19f32fd525e97fb8737e6667158183ea96cba8c..d181eec6e675f664cca3e2cdff0319faa1270e42 100755 (executable)
@@ -82,7 +82,7 @@ def gen_rmcfg_data(sharing):
 def print_rmcfg(rmcfg, prefix=""):
        comment_templ = '''
                /* %s */\n'''
-       rmconfig_templ = '''\
+       kig_rmconfig_templ = '''\
                {
                        .start_resource = %d,
                        .num_resource = %d,
@@ -90,6 +90,20 @@ def print_rmcfg(rmcfg, prefix=""):
                                        %s),
                        .host_id = %s,
                },\n'''
+       sciclient_rmconfig_templ = '''\
+        {
+            .start_resource = %d,
+            .num_resource = %d,
+            .type = RESASG_UTYPE (%s, %s),
+            .host_id = %s,
+        },\n'''
+
+       if (args.format == "boardcfg_kig"):
+               rmconfig_templ = kig_rmconfig_templ
+       elif (args.format == "boardcfg_sciclient"):
+               rmconfig_templ = sciclient_rmconfig_templ
+               comment_templ = comment_templ.replace('\t', '    ')
+
        output = ""
        rmconfig_templ = rmconfig_templ.replace("RESASG_UTYPE", "%sRESASG_UTYPE" % prefix)