linux/sound/soc/intel/avs/loader.c

// SPDX-License-Identifier: GPL-2.0-only
//
// Copyright(c) 2021-2022 Intel Corporation
//
// Authors: Cezary Rojewski <[email protected]>
//          Amadeusz Slawinski <[email protected]>
//

#include <linux/firmware.h>
#include <linux/module.h>
#include <linux/slab.h>
#include <sound/hdaudio.h>
#include <sound/hdaudio_ext.h>
#include "avs.h"
#include "cldma.h"
#include "messages.h"
#include "registers.h"
#include "topology.h"

#define AVS_ROM_STS_MASK
#define AVS_ROM_INIT_DONE
#define SKL_ROM_BASEFW_ENTERED
#define APL_ROM_FW_ENTERED
#define AVS_ROM_INIT_POLLING_US
#define SKL_ROM_INIT_TIMEOUT_US
#define APL_ROM_INIT_TIMEOUT_US
#define APL_ROM_INIT_RETRIES

#define AVS_FW_INIT_POLLING_US
#define AVS_FW_INIT_TIMEOUT_MS
#define AVS_FW_INIT_TIMEOUT_US

#define AVS_CLDMA_START_DELAY_MS

#define AVS_ROOT_DIR
#define AVS_BASEFW_FILENAME
#define AVS_EXT_MANIFEST_MAGIC
#define SKL_MANIFEST_MAGIC
#define SKL_ADSPFW_OFFSET
#define APL_MANIFEST_MAGIC
#define APL_ADSPFW_OFFSET

/* Occasionally, engineering (release candidate) firmware is provided for testing. */
static bool debug_ignore_fw_version;
module_param_named(ignore_fw_version, debug_ignore_fw_version, bool, 0444);
MODULE_PARM_DESC();

#define AVS_LIB_NAME_SIZE

struct avs_fw_manifest {} __packed;
static_assert();

struct avs_fw_ext_manifest {} __packed;
static_assert();

static int avs_fw_ext_manifest_strip(struct firmware *fw)
{}

static int avs_fw_manifest_offset(struct firmware *fw)
{}

static int avs_fw_manifest_strip_verify(struct avs_dev *adev, struct firmware *fw,
					const struct avs_fw_version *min)
{}

int avs_cldma_load_basefw(struct avs_dev *adev, struct firmware *fw)
{}

int avs_cldma_load_library(struct avs_dev *adev, struct firmware *lib, u32 id)
{}

static int avs_cldma_load_module(struct avs_dev *adev, struct avs_module_entry *mentry)
{}

int avs_cldma_transfer_modules(struct avs_dev *adev, bool load,
			       struct avs_module_entry *mods, u32 num_mods)
{}

static int
avs_hda_init_rom(struct avs_dev *adev, unsigned int dma_id, bool purge)
{}

static int avs_imr_load_basefw(struct avs_dev *adev)
{}

int avs_hda_load_basefw(struct avs_dev *adev, struct firmware *fw)
{}

int avs_hda_load_library(struct avs_dev *adev, struct firmware *lib, u32 id)
{}

int avs_hda_transfer_modules(struct avs_dev *adev, bool load,
			     struct avs_module_entry *mods, u32 num_mods)
{}

int avs_dsp_load_libraries(struct avs_dev *adev, struct avs_tplg_library *libs, u32 num_libs)
{}

static int avs_dsp_load_basefw(struct avs_dev *adev)
{}

int avs_dsp_boot_firmware(struct avs_dev *adev, bool purge)
{}

int avs_dsp_first_boot_firmware(struct avs_dev *adev)
{}