#include <linux/firmware.h>
#include <linux/highmem.h>
#include <linux/moduleparam.h>
#include <linux/pci.h>
#include "vpu_boot_api.h"
#include "ivpu_drv.h"
#include "ivpu_fw.h"
#include "ivpu_fw_log.h"
#include "ivpu_gem.h"
#include "ivpu_hw.h"
#include "ivpu_ipc.h"
#include "ivpu_pm.h"
#define FW_GLOBAL_MEM_START …
#define FW_GLOBAL_MEM_END …
#define FW_SHARED_MEM_SIZE …
#define FW_SHARED_MEM_ALIGNMENT …
#define FW_RUNTIME_MAX_SIZE …
#define FW_SHAVE_NN_MAX_SIZE …
#define FW_RUNTIME_MIN_ADDR …
#define FW_RUNTIME_MAX_ADDR …
#define FW_VERSION_HEADER_SIZE …
#define FW_FILE_IMAGE_OFFSET …
#define WATCHDOG_MSS_REDIRECT …
#define WATCHDOG_NCE_REDIRECT …
#define ADDR_TO_L2_CACHE_CFG(addr) …
#define IVPU_FW_CHECK_API_COMPAT(vdev, fw_hdr, name, min_major) …
#define IVPU_FW_CHECK_API_VER_LT(vdev, fw_hdr, name, major, minor) …
#define IVPU_FOCUS_PRESENT_TIMER_MS …
static char *ivpu_firmware;
module_param_named_unsafe(firmware, ivpu_firmware, charp, 0644);
MODULE_PARM_DESC(…) …;
static struct { … } fw_names[] = …;
MODULE_FIRMWARE(…) …;
MODULE_FIRMWARE(…) …;
static int ivpu_fw_request(struct ivpu_device *vdev)
{ … }
static int
ivpu_fw_check_api(struct ivpu_device *vdev, const struct vpu_firmware_header *fw_hdr,
const char *str, int index, u16 expected_major, u16 expected_minor,
u16 min_major)
{ … }
static bool
ivpu_fw_check_api_ver_lt(struct ivpu_device *vdev, const struct vpu_firmware_header *fw_hdr,
const char *str, int index, u16 major, u16 minor)
{ … }
static bool is_within_range(u64 addr, size_t size, u64 range_start, size_t range_size)
{ … }
static int ivpu_fw_parse(struct ivpu_device *vdev)
{ … }
static void ivpu_fw_release(struct ivpu_device *vdev)
{ … }
static void
ivpu_fw_init_wa(struct ivpu_device *vdev)
{ … }
static int ivpu_fw_update_global_range(struct ivpu_device *vdev)
{ … }
static int ivpu_fw_mem_init(struct ivpu_device *vdev)
{ … }
static void ivpu_fw_mem_fini(struct ivpu_device *vdev)
{ … }
int ivpu_fw_init(struct ivpu_device *vdev)
{ … }
void ivpu_fw_fini(struct ivpu_device *vdev)
{ … }
void ivpu_fw_load(struct ivpu_device *vdev)
{ … }
static void ivpu_fw_boot_params_print(struct ivpu_device *vdev, struct vpu_boot_params *boot_params)
{ … }
void ivpu_fw_boot_params_setup(struct ivpu_device *vdev, struct vpu_boot_params *boot_params)
{ … }