summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAppana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com>2023-02-10 23:26:16 +0530
committerMark Hatle <mark.hatle@amd.com>2023-02-10 10:46:55 -0800
commit57f512b26b7290654bfc7f28c74fadc1bcb2ebf4 (patch)
tree388211e044a8b25559f03b1a43ad45209d4ae945
parentca887b74648d703885271c7d4193a1fe32b19cfb (diff)
downloadmeta-xilinx-57f512b26b7290654bfc7f28c74fadc1bcb2ebf4.tar.gz
meta-xilinx-core: recipes-kernel: lopper: xilinx-lops: lop-xilinx-id-cpus: Update cpu core number by reading the cpu node reg property
This commit does the below 1) Update the cpu core number by reading the cpu node reg property. 2) Update the dict_key based on the cpu name instead of compatible string (As cpu name is unique). Signed-off-by: Appana Durga Kedareswara rao <appana.durga.kedareswara.rao@amd.com> Signed-off-by: Mark Hatle <mark.hatle@amd.com>
-rw-r--r--meta-xilinx-core/recipes-kernel/lopper/xilinx-lops/lop-xilinx-id-cpus.dts3
1 files changed, 2 insertions, 1 deletions
diff --git a/meta-xilinx-core/recipes-kernel/lopper/xilinx-lops/lop-xilinx-id-cpus.dts b/meta-xilinx-core/recipes-kernel/lopper/xilinx-lops/lop-xilinx-id-cpus.dts
index 45353ecf..1468801a 100644
--- a/meta-xilinx-core/recipes-kernel/lopper/xilinx-lops/lop-xilinx-id-cpus.dts
+++ b/meta-xilinx-core/recipes-kernel/lopper/xilinx-lops/lop-xilinx-id-cpus.dts
@@ -111,6 +111,7 @@
111 for c_node in c.subnodes( children_only = True ): 111 for c_node in c.subnodes( children_only = True ):
112 try: 112 try:
113 cpu_node = c_node['device_type'].value[0] 113 cpu_node = c_node['device_type'].value[0]
114 num_cpu = c_node['reg'].value[0]
114 num_cpu = num_cpu + 1 115 num_cpu = num_cpu + 1
115 except: 116 except:
116 cpu_node = None 117 cpu_node = None
@@ -119,7 +120,7 @@
119 cpu_name = match[0] 120 cpu_name = match[0]
120 if num_cpu != 0: 121 if num_cpu != 0:
121 cpu_type = c_node['compatible'].value[0] 122 cpu_type = c_node['compatible'].value[0]
122 dict_key = cpu_type + str(num_cpu) 123 dict_key = cpu_name + str(num_cpu)
123 cpu_output[dict_key] = '{} {} {} {} {}'.format(cpu_type, num_cpu-1, 'None', cpu_name, 'None') 124 cpu_output[dict_key] = '{} {} {} {} {}'.format(cpu_type, num_cpu-1, 'None', cpu_name, 'None')
124 125
125 if cpu_output: 126 if cpu_output: