tools: sof_ri_info: fix memory layout match

For sof-tgl.ri and sof-tgl-h.ri the old match function will
always return tgl layout. Add suffix in match to make sure
we always match the right name.

Signed-off-by: Pan Xiuli <xiuli.pan@linux.intel.com>
This commit is contained in:
Pan Xiuli 2021-01-12 09:14:45 +00:00 committed by Liam Girdwood
parent 586caa79f5
commit 0767ffaf85
1 changed files with 2 additions and 1 deletions

View File

@ -1203,7 +1203,8 @@ def get_mem_map(ri_path):
""" Retrieves memory map for platform determined by the file name
"""
for plat_name in DSP_MEM_SPACE_EXT:
if plat_name in ri_path:
# use full firmware name for match
if "sof-{}.ri".format(plat_name) in ri_path:
return DSP_MEM_SPACE_EXT[plat_name]
return DspMemory('Memory layout undefined', [])