[PATCH v7 072/120] ASoC: Intel: avs: Use parsed CPUID(0x15)
"Ahmed S. Darwish" <[email protected]> Thu, 28 May 2026 17:38:34 +0200
| Newsgroups | dev.linux.lists.x86-cpuid,org.kernel.vger.linux-kernel |
|---|---|
| Message-ID | <[email protected]> |
Use parsed CPUID(0x15) instead of doing a direct CPUID query and manual registers access on the output. Remove the max CPUID level check as it is already implied by the CPUID APIs returning NULL. Signed-off-by: Ahmed S. Darwish <[email protected]> --- sound/soc/intel/avs/tgl.c | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/sound/soc/intel/avs/tgl.c b/sound/soc/intel/avs/tgl.c index a7123639de43..d691ba06a4f7 100644 --- a/sound/soc/intel/avs/tgl.c +++ b/sound/soc/intel/avs/tgl.c @@ -45,13 +45,14 @@ static int avs_tgl_dsp_core_stall(struct avs_dev *adev, u32 core_mask, bool stal */ static int avs_tgl_set_xtal_freq(struct avs_dev *adev) { + const struct leaf_0x15_0 *l = cpuid_leaf(&boot_cpu_data, 0x15); unsigned int freq; int ret; - if (boot_cpu_data.cpuid_level < CPUID_LEAF_TSC) + if (!l) return 0; - freq = cpuid_ecx(CPUID_LEAF_TSC); + freq = l->cpu_crystal_hz; if (freq) { ret = avs_ipc_set_fw_config(adev, 1, AVS_FW_CFG_XTAL_FREQ_HZ, sizeof(freq), &freq); if (ret) -- 2.54.0