Unverified Commit b3e29075 authored by Cezary Rojewski's avatar Cezary Rojewski Committed by Mark Brown
Browse files

ASoC: Intel: avs: SKL-based platforms support



Define handlers specific to cAVS 1.5 platforms, that is SKL, KBL, AML
and all other variants based on this very version of AudioDSP
architecture. Most are specific to SKL-alike platforms with only
skl_log_buffer_offset() being exposed and used later by younger
equivalents.

Signed-off-by: default avatarAmadeusz Sławiński <amadeuszx.slawinski@linux.intel.com>
Signed-off-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Link: https://lore.kernel.org/r/20220516101116.190192-15-cezary.rojewski@intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent cfbc100e
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -3,6 +3,7 @@
snd-soc-avs-objs := dsp.o ipc.o messages.o utils.o core.o loader.o \
		    topology.o path.o pcm.o board_selection.o
snd-soc-avs-objs += cldma.o
snd-soc-avs-objs += skl.o

snd-soc-avs-objs += trace.o
# tell define_trace.h where to find the trace header
+4 −0
Original line number Diff line number Diff line
@@ -56,6 +56,8 @@ struct avs_dsp_ops {
#define avs_dsp_op(adev, op, ...) \
	((adev)->spec->dsp_ops->op(adev, ## __VA_ARGS__))

extern const struct avs_dsp_ops skl_dsp_ops;

#define AVS_PLATATTR_CLDMA		BIT_ULL(0)
#define AVS_PLATATTR_IMR		BIT_ULL(1)

@@ -249,6 +251,8 @@ void avs_ipc_block(struct avs_ipc *ipc);
int avs_dsp_disable_d0ix(struct avs_dev *adev);
int avs_dsp_enable_d0ix(struct avs_dev *adev);

int skl_log_buffer_offset(struct avs_dev *adev, u32 core);

/* Firmware resources management */

int avs_get_module_entry(struct avs_dev *adev, const guid_t *uuid, struct avs_module_entry *entry);
+18 −0
Original line number Diff line number Diff line
@@ -634,7 +634,25 @@ static const struct dev_pm_ops avs_dev_pm = {
	SET_RUNTIME_PM_OPS(avs_runtime_suspend, avs_runtime_resume, NULL)
};

static const struct avs_spec skl_desc = {
	.name = "skl",
	.min_fw_version = {
		.major = 9,
		.minor = 21,
		.hotfix = 0,
		.build = 4732,
	},
	.dsp_ops = &skl_dsp_ops,
	.core_init_mask = 1,
	.attributes = AVS_PLATATTR_CLDMA,
	.sram_base_offset = SKL_ADSP_SRAM_BASE_OFFSET,
	.sram_window_size = SKL_ADSP_SRAM_WINDOW_SIZE,
	.rom_status = SKL_ADSP_SRAM_BASE_OFFSET,
};

static const struct pci_device_id avs_ids[] = {
	{ PCI_VDEVICE(INTEL, 0x9d70), (unsigned long)&skl_desc }, /* SKL */
	{ PCI_VDEVICE(INTEL, 0x9d71), (unsigned long)&skl_desc }, /* KBL */
	{ 0 }
};
MODULE_DEVICE_TABLE(pci, avs_ids);
+18 −0
Original line number Diff line number Diff line
@@ -347,6 +347,24 @@ enum avs_log_enable {
	AVS_LOG_ENABLE = 1
};

enum avs_skl_log_priority {
	AVS_SKL_LOG_CRITICAL = 1,
	AVS_SKL_LOG_HIGH,
	AVS_SKL_LOG_MEDIUM,
	AVS_SKL_LOG_LOW,
	AVS_SKL_LOG_VERBOSE,
};

struct skl_log_state {
	u32 enable;
	u32 min_priority;
} __packed;

struct skl_log_state_info {
	u32 core_mask;
	struct skl_log_state logs_core[];
} __packed;

int avs_ipc_set_enable_logs(struct avs_dev *adev, u8 *log_info, size_t size);

struct avs_fw_version {
+4 −0
Original line number Diff line number Diff line
@@ -48,6 +48,10 @@
#define SKL_ADSP_HIPCIE_DONE		BIT(30)
#define SKL_ADSP_HIPCT_BUSY		BIT(31)

/* Intel HD Audio SRAM windows base addresses */
#define SKL_ADSP_SRAM_BASE_OFFSET	0x8000
#define SKL_ADSP_SRAM_WINDOW_SIZE	0x2000

/* Constants used when accessing SRAM, space shared with firmware */
#define AVS_FW_REG_BASE(adev)		((adev)->spec->sram_base_offset)
#define AVS_FW_REG_STATUS(adev)		(AVS_FW_REG_BASE(adev) + 0x0)
Loading