mirror of
https://github.com/linux-msm/debugcc.git
synced 2026-02-25 13:12:32 -08:00
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>
62 lines
1.1 KiB
Meson
62 lines
1.1 KiB
Meson
# 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',
|
|
]
|
|
)
|
|
|
|
platforms = [
|
|
'ipq8064',
|
|
'msm8936',
|
|
'msm8994',
|
|
'msm8996',
|
|
'msm8998',
|
|
'qcs404',
|
|
'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)
|
|
|
|
executable('debugcc',
|
|
debugcc_srcs,
|
|
install: true)
|