mirror of
https://github.com/torvalds/linux.git
synced 2026-05-28 00:53:34 +02:00
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: Cezary Rojewski <cezary.rojewski@intel.com> Link: https://patch.msgid.link/20251212103858.110701-5-cezary.rojewski@intel.com Signed-off-by: Mark Brown <broonie@kernel.org>
This commit is contained in:
parent
d44f62b09b
commit
e97e07138f
|
|
@ -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;
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user