Files
debugcc/meson.build

72 lines
1.3 KiB
Meson
Raw Permalink Normal View History

# SPDX-License-Identifier: BSD-3-Clause
project('debugcc',
'c',
license: ['BSD-3-Clause'],
meson_version : '>= 0.61.0', # for install_symlink
default_options: [
'buildtype=release',
],
version: '0.1.0',
)
platforms = [
Add support for IPQ8064 SoC Add support for IPQ8064 SoC. All the debug vector are taken from old pre-dt linux-msm source. To correctly setup the debug oscillator, it's required to operate on 2 different clk, the CXO oscillator and the PDM clock. Then we operate ton the CLK_TEST reg and we setup the required vector. With the use of define we abstract everything for the high speed and the low speed clocks. The CXO oscillator runs at 25Mhz and a different xo_rate is required than the current default one. We can also test the 2 CPU speed and the current L2 speed using the APCS CLK_DIAG reg. To test this we need to setup a special test vector in CLK_TEST and then operate on the APCS reg. For these special clock a different fixed_div is needed to be set. There is currently a bug (probably a hw bug) where the CPU clock of the 2 core is half broken, the correct clock is reported but only for one of the core, the other core will always report a wrong clock. Operating on the CPU mux makes the CLK_DIAG report the correct freq on one of the 2 core from the test vector. Also the L2 clock seems to be half broken with high speed freq. (still has to be confirmed and maybe it's the L2 HFPLL wrongly configured for some reason and on high frequency > 1GHz reports not precise frequency) Note that we currently use a fixed_div of 8 for these special clock. This should be used only for ipq8064 v3 SoC but it was never found an ipq8064 v1 SoC, where 2 should be used as fixed_div. Signed-off-by: Christian Marangi <ansuelsmth@gmail.com>
2023-06-13 17:38:16 +02:00
'ipq8064',
'msm8936',
'msm8974',
'msm8994',
'msm8996',
'msm8998',
'qcm2290',
'qcs404',
'sc7180',
'sc8280xp',
'sdm845',
'sm6115',
'sm6125',
'sm6350',
'sm6375',
'sm8150',
'sm8250',
'sm8350',
'sm8450',
'sm8550',
'sm8650',
]
debugcc_srcs = [
'debugcc.c',
]
platform_defs = []
platform_array = []
foreach p: platforms
debugcc_srcs += p + '.c'
platform_defs += 'extern struct debugcc_platform ' + p + '_debugcc;'
platform_array += '\t&' + p + '_debugcc,'
install_symlink(p + '-debugcc',
install_dir: get_option('bindir'),
pointing_to: 'debugcc')
endforeach
platforms = configuration_data()
platforms.set('PLATFORM_DEFS', '\n'.join(platform_defs))
platforms.set('PLATFORM_ARRAY', '\n'.join(platform_array))
debugcc_srcs += configure_file(
input: 'platforms.c.in',
output: 'platforms.c',
configuration: platforms)
debugcc_link_args = []
if not get_option('dynamic-linking')
debugcc_link_args += ['-static', '-static-libgcc']
endif
executable('debugcc',
debugcc_srcs,
link_args: debugcc_link_args,
install: true)