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

// SPDX-License-Identifier: GPL-2.0-only
//
// Copyright(c) 2020 Intel Corporation
//
// Author: Cezary Rojewski <[email protected]>
//

#include <linux/dma-mapping.h>
#include <linux/firmware.h>
#include <linux/slab.h>
#include "core.h"
#include "registers.h"

/* FW load (200ms) plus operational delays */
#define FW_READY_TIMEOUT_MS

#define FW_SIGNATURE
#define FW_SIGNATURE_SIZE

struct catpt_fw_hdr {} __packed;

struct catpt_fw_mod_hdr {} __packed;

enum catpt_ram_type {};

struct catpt_fw_block_hdr {} __packed;

void catpt_sram_init(struct resource *sram, u32 start, u32 size)
{}

void catpt_sram_free(struct resource *sram)
{}

struct resource *
catpt_request_region(struct resource *root, resource_size_t size)
{}

int catpt_store_streams_context(struct catpt_dev *cdev, struct dma_chan *chan)
{}

int catpt_store_module_states(struct catpt_dev *cdev, struct dma_chan *chan)
{}

int catpt_store_memdumps(struct catpt_dev *cdev, struct dma_chan *chan)
{}

static int
catpt_restore_streams_context(struct catpt_dev *cdev, struct dma_chan *chan)
{}

static int catpt_restore_memdumps(struct catpt_dev *cdev, struct dma_chan *chan)
{}

static int catpt_restore_fwimage(struct catpt_dev *cdev,
				 struct dma_chan *chan, dma_addr_t paddr,
				 struct catpt_fw_block_hdr *blk)
{}

static int catpt_load_block(struct catpt_dev *cdev,
			    struct dma_chan *chan, dma_addr_t paddr,
			    struct catpt_fw_block_hdr *blk, bool alloc)
{}

static int catpt_restore_basefw(struct catpt_dev *cdev,
				struct dma_chan *chan, dma_addr_t paddr,
				struct catpt_fw_mod_hdr *basefw)
{}

static int catpt_restore_module(struct catpt_dev *cdev,
				struct dma_chan *chan, dma_addr_t paddr,
				struct catpt_fw_mod_hdr *mod)
{}

static int catpt_load_module(struct catpt_dev *cdev,
			     struct dma_chan *chan, dma_addr_t paddr,
			     struct catpt_fw_mod_hdr *mod)
{}

static int catpt_restore_firmware(struct catpt_dev *cdev,
				  struct dma_chan *chan, dma_addr_t paddr,
				  struct catpt_fw_hdr *fw)
{}

static int catpt_load_firmware(struct catpt_dev *cdev,
			       struct dma_chan *chan, dma_addr_t paddr,
			       struct catpt_fw_hdr *fw)
{}

static int catpt_load_image(struct catpt_dev *cdev, struct dma_chan *chan,
			    const char *name, const char *signature,
			    bool restore)
{}

static int catpt_load_images(struct catpt_dev *cdev, bool restore)
{}

int catpt_boot_firmware(struct catpt_dev *cdev, bool restore)
{}

int catpt_first_boot_firmware(struct catpt_dev *cdev)
{}