Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

ASoC: SOF: Intel: Create ptl.c as placeholder for Panther Lake features

Create a minimal placeholder to make it possible to add code to handle
the new features of Panther Lake compared to MTL/LNL.

Signed-off-by: Peter Ujfalusi <peter.ujfalusi@linux.intel.com>
Reviewed-by: Ranjani Sridharan <ranjani.sridharan@linux.intel.com>
Reviewed-by: Liam Girdwood <liam.r.girdwood@intel.com>
Reviewed-by: Kai Vehmanen <kai.vehmanen@linux.intel.com>
Link: https://patch.msgid.link/20250307112816.1495-5-peter.ujfalusi@linux.intel.com
Signed-off-by: Mark Brown <broonie@kernel.org>

authored by

Peter Ujfalusi and committed by
Mark Brown
8aeb7d2c 80416226

+79 -32
+1 -1
sound/soc/sof/intel/Makefile
··· 34 34 snd-sof-pci-intel-tgl-y := pci-tgl.o tgl.o 35 35 snd-sof-pci-intel-mtl-y := pci-mtl.o mtl.o 36 36 snd-sof-pci-intel-lnl-y := pci-lnl.o lnl.o 37 - snd-sof-pci-intel-ptl-y := pci-ptl.o 37 + snd-sof-pci-intel-ptl-y := pci-ptl.o ptl.o 38 38 39 39 obj-$(CONFIG_SND_SOC_SOF_MERRIFIELD) += snd-sof-pci-intel-tng.o 40 40 obj-$(CONFIG_SND_SOC_SOF_INTEL_SKL) += snd-sof-pci-intel-skl.o
+6 -27
sound/soc/sof/intel/lnl.c
··· 128 128 EXPORT_SYMBOL_NS(sof_lnl_set_ops, "SND_SOC_SOF_INTEL_LNL"); 129 129 130 130 /* Check if an SDW IRQ occurred */ 131 - static bool lnl_dsp_check_sdw_irq(struct snd_sof_dev *sdev) 131 + bool lnl_dsp_check_sdw_irq(struct snd_sof_dev *sdev) 132 132 { 133 133 struct hdac_bus *bus = sof_to_bus(sdev); 134 134 135 135 return hdac_bus_eml_check_interrupt(bus, true, AZX_REG_ML_LEPTR_ID_SDW); 136 136 } 137 + EXPORT_SYMBOL_NS(lnl_dsp_check_sdw_irq, "SND_SOC_SOF_INTEL_LNL"); 137 138 138 - static int lnl_dsp_disable_interrupts(struct snd_sof_dev *sdev) 139 + int lnl_dsp_disable_interrupts(struct snd_sof_dev *sdev) 139 140 { 140 141 mtl_disable_ipc_interrupts(sdev); 141 142 return mtl_enable_interrupts(sdev, false); 142 143 } 144 + EXPORT_SYMBOL_NS(lnl_dsp_disable_interrupts, "SND_SOC_SOF_INTEL_LNL"); 143 145 144 - static bool lnl_sdw_check_wakeen_irq(struct snd_sof_dev *sdev) 146 + bool lnl_sdw_check_wakeen_irq(struct snd_sof_dev *sdev) 145 147 { 146 148 struct hdac_bus *bus = sof_to_bus(sdev); 147 149 u16 wake_sts; ··· 159 157 /* filter out the range of SDIs that can be set for SoundWire */ 160 158 return wake_sts & GENMASK(SDW_MAX_DEVICES, SDW_INTEL_DEV_NUM_IDA_MIN); 161 159 } 160 + EXPORT_SYMBOL_NS(lnl_sdw_check_wakeen_irq, "SND_SOC_SOF_INTEL_LNL"); 162 161 163 162 const struct sof_intel_dsp_desc lnl_chip_info = { 164 163 .cores_num = 5, ··· 184 181 .disable_interrupts = lnl_dsp_disable_interrupts, 185 182 .hw_ip_version = SOF_INTEL_ACE_2_0, 186 183 }; 187 - 188 - const struct sof_intel_dsp_desc ptl_chip_info = { 189 - .cores_num = 5, 190 - .init_core_mask = BIT(0), 191 - .host_managed_cores_mask = BIT(0), 192 - .ipc_req = MTL_DSP_REG_HFIPCXIDR, 193 - .ipc_req_mask = MTL_DSP_REG_HFIPCXIDR_BUSY, 194 - .ipc_ack = MTL_DSP_REG_HFIPCXIDA, 195 - .ipc_ack_mask = MTL_DSP_REG_HFIPCXIDA_DONE, 196 - .ipc_ctl = MTL_DSP_REG_HFIPCXCTL, 197 - .rom_status_reg = LNL_DSP_REG_HFDSC, 198 - .rom_init_timeout = 300, 199 - .ssp_count = MTL_SSP_COUNT, 200 - .d0i3_offset = MTL_HDA_VS_D0I3C, 201 - .read_sdw_lcount = hda_sdw_check_lcount_ext, 202 - .check_sdw_irq = lnl_dsp_check_sdw_irq, 203 - .check_sdw_wakeen_irq = lnl_sdw_check_wakeen_irq, 204 - .check_ipc_irq = mtl_dsp_check_ipc_irq, 205 - .cl_init = mtl_dsp_cl_init, 206 - .power_down_dsp = mtl_power_down_dsp, 207 - .disable_interrupts = lnl_dsp_disable_interrupts, 208 - .hw_ip_version = SOF_INTEL_ACE_3_0, 209 - }; 210 - EXPORT_SYMBOL_NS(ptl_chip_info, "SND_SOC_SOF_INTEL_LNL"); 211 184 212 185 MODULE_IMPORT_NS("SND_SOC_SOF_INTEL_MTL"); 213 186 MODULE_IMPORT_NS("SND_SOC_SOF_HDA_MLINK");
+4
sound/soc/sof/intel/lnl.h
··· 14 14 15 15 int sof_lnl_set_ops(struct snd_sof_dev *sdev, struct snd_sof_dsp_ops *dsp_ops); 16 16 17 + bool lnl_dsp_check_sdw_irq(struct snd_sof_dev *sdev); 18 + int lnl_dsp_disable_interrupts(struct snd_sof_dev *sdev); 19 + bool lnl_sdw_check_wakeen_irq(struct snd_sof_dev *sdev); 20 + 17 21 #endif /* __SOF_INTEL_LNL_H */
+2 -4
sound/soc/sof/intel/pci-ptl.c
··· 16 16 17 17 /* platform specific devices */ 18 18 #include "hda.h" 19 - #include "lnl.h" 19 + #include "ptl.h" 20 20 21 21 /* PantherLake ops */ 22 22 static struct snd_sof_dsp_ops sof_ptl_ops; 23 23 24 24 static int sof_ptl_ops_init(struct snd_sof_dev *sdev) 25 25 { 26 - return sof_lnl_set_ops(sdev, &sof_ptl_ops); 26 + return sof_ptl_set_ops(sdev, &sof_ptl_ops); 27 27 } 28 28 29 29 static const struct sof_dev_desc ptl_desc = { ··· 80 80 MODULE_DESCRIPTION("SOF support for PantherLake platforms"); 81 81 MODULE_IMPORT_NS("SND_SOC_SOF_INTEL_HDA_GENERIC"); 82 82 MODULE_IMPORT_NS("SND_SOC_SOF_INTEL_HDA_COMMON"); 83 - MODULE_IMPORT_NS("SND_SOC_SOF_INTEL_LNL"); 84 - MODULE_IMPORT_NS("SND_SOC_SOF_HDA_MLINK"); 85 83 MODULE_IMPORT_NS("SND_SOC_SOF_PCI_DEV");
+52
sound/soc/sof/intel/ptl.c
··· 1 + // SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) 2 + // 3 + // Copyright(c) 2025 Intel Corporation 4 + 5 + /* 6 + * Hardware interface for audio DSP on PantherLake. 7 + */ 8 + 9 + #include <sound/hda_register.h> 10 + #include <sound/hda-mlink.h> 11 + #include <sound/sof/ipc4/header.h> 12 + #include "../ipc4-priv.h" 13 + #include "../ops.h" 14 + #include "hda.h" 15 + #include "hda-ipc.h" 16 + #include "../sof-audio.h" 17 + #include "mtl.h" 18 + #include "lnl.h" 19 + #include "ptl.h" 20 + 21 + int sof_ptl_set_ops(struct snd_sof_dev *sdev, struct snd_sof_dsp_ops *dsp_ops) 22 + { 23 + return sof_lnl_set_ops(sdev, dsp_ops); 24 + } 25 + EXPORT_SYMBOL_NS(sof_ptl_set_ops, "SND_SOC_SOF_INTEL_PTL"); 26 + 27 + const struct sof_intel_dsp_desc ptl_chip_info = { 28 + .cores_num = 5, 29 + .init_core_mask = BIT(0), 30 + .host_managed_cores_mask = BIT(0), 31 + .ipc_req = MTL_DSP_REG_HFIPCXIDR, 32 + .ipc_req_mask = MTL_DSP_REG_HFIPCXIDR_BUSY, 33 + .ipc_ack = MTL_DSP_REG_HFIPCXIDA, 34 + .ipc_ack_mask = MTL_DSP_REG_HFIPCXIDA_DONE, 35 + .ipc_ctl = MTL_DSP_REG_HFIPCXCTL, 36 + .rom_status_reg = LNL_DSP_REG_HFDSC, 37 + .rom_init_timeout = 300, 38 + .ssp_count = MTL_SSP_COUNT, 39 + .d0i3_offset = MTL_HDA_VS_D0I3C, 40 + .read_sdw_lcount = hda_sdw_check_lcount_ext, 41 + .check_sdw_irq = lnl_dsp_check_sdw_irq, 42 + .check_sdw_wakeen_irq = lnl_sdw_check_wakeen_irq, 43 + .check_ipc_irq = mtl_dsp_check_ipc_irq, 44 + .cl_init = mtl_dsp_cl_init, 45 + .power_down_dsp = mtl_power_down_dsp, 46 + .disable_interrupts = lnl_dsp_disable_interrupts, 47 + .hw_ip_version = SOF_INTEL_ACE_3_0, 48 + }; 49 + 50 + MODULE_IMPORT_NS("SND_SOC_SOF_INTEL_MTL"); 51 + MODULE_IMPORT_NS("SND_SOC_SOF_INTEL_LNL"); 52 + MODULE_IMPORT_NS("SND_SOC_SOF_HDA_MLINK");
+14
sound/soc/sof/intel/ptl.h
··· 1 + /* SPDX-License-Identifier: (GPL-2.0-only OR BSD-3-Clause) */ 2 + /* 3 + * This file is provided under a dual BSD/GPLv2 license. When using or 4 + * redistributing this file, you may do so under either license. 5 + * 6 + * Copyright(c) 2025 Intel Corporation 7 + */ 8 + 9 + #ifndef __SOF_INTEL_PTL_H 10 + #define __SOF_INTEL_PTL_H 11 + 12 + int sof_ptl_set_ops(struct snd_sof_dev *sdev, struct snd_sof_dsp_ops *dsp_ops); 13 + 14 + #endif /* __SOF_INTEL_PTL_H */