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

ASoC: Intel: catpt: Specify image names in the device descriptor



State files to load explicitly in the device descriptor instead of
hiding the details within a loading function. Apart from readability,
this also reduces the catpt module size slightly.

Signed-off-by: default avatarCezary Rojewski <cezary.rojewski@intel.com>
Link: https://patch.msgid.link/20251212103858.110701-5-cezary.rojewski@intel.com


Signed-off-by: default avatarMark Brown <broonie@kernel.org>
parent d44f62b0
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -62,6 +62,7 @@ struct catpt_module_type {
struct catpt_spec {
	struct snd_soc_acpi_mach *machines;
	u8 core_id;
	const char *fw_name;
	u32 host_dram_offset;
	u32 host_iram_offset;
	u32 host_shim_offset;
+2 −0
Original line number Diff line number Diff line
@@ -348,6 +348,7 @@ static struct snd_soc_acpi_mach wpt_machines[] = {
static struct catpt_spec lpt_desc = {
	.machines = lpt_machines,
	.core_id = 0x01,
	.fw_name = "intel/IntcSST1.bin",
	.host_dram_offset = 0x000000,
	.host_iram_offset = 0x080000,
	.host_shim_offset = 0x0E7000,
@@ -363,6 +364,7 @@ static struct catpt_spec lpt_desc = {
static struct catpt_spec wpt_desc = {
	.machines = wpt_machines,
	.core_id = 0x02,
	.fw_name = "intel/IntcSST2.bin",
	.host_dram_offset = 0x000000,
	.host_iram_offset = 0x0A0000,
	.host_shim_offset = 0x0FB000,
+1 −5
Original line number Diff line number Diff line
@@ -580,10 +580,6 @@ static int catpt_load_image(struct catpt_dev *cdev, struct dma_chan *chan,

static int catpt_load_images(struct catpt_dev *cdev, bool restore)
{
	static const char *const names[] = {
		"intel/IntcSST1.bin",
		"intel/IntcSST2.bin",
	};
	struct dma_chan *chan;
	int ret;

@@ -591,7 +587,7 @@ static int catpt_load_images(struct catpt_dev *cdev, bool restore)
	if (IS_ERR(chan))
		return PTR_ERR(chan);

	ret = catpt_load_image(cdev, chan, names[cdev->spec->core_id - 1],
	ret = catpt_load_image(cdev, chan, cdev->spec->fw_name,
			       FW_SIGNATURE, restore);
	if (ret)
		goto release_dma_chan;