linux/drivers/soc/mediatek/mtk-cmdq-helper.c

// SPDX-License-Identifier: GPL-2.0
//
// Copyright (c) 2018 MediaTek Inc.

#include <linux/completion.h>
#include <linux/errno.h>
#include <linux/dma-mapping.h>
#include <linux/module.h>
#include <linux/mailbox_controller.h>
#include <linux/of.h>
#include <linux/soc/mediatek/mtk-cmdq.h>

#define CMDQ_WRITE_ENABLE_MASK
#define CMDQ_POLL_ENABLE_MASK
/* dedicate the last GPR_R15 to assign the register address to be poll */
#define CMDQ_POLL_ADDR_GPR
#define CMDQ_EOC_IRQ_EN
#define CMDQ_IMMEDIATE_VALUE
#define CMDQ_REG_TYPE
#define CMDQ_JUMP_RELATIVE
#define CMDQ_JUMP_ABSOLUTE

struct cmdq_instruction {};

static inline u8 cmdq_operand_get_type(struct cmdq_operand *op)
{}

static inline u16 cmdq_operand_get_idx_value(struct cmdq_operand *op)
{}

int cmdq_dev_get_client_reg(struct device *dev,
			    struct cmdq_client_reg *client_reg, int idx)
{}
EXPORT_SYMBOL();

struct cmdq_client *cmdq_mbox_create(struct device *dev, int index)
{}
EXPORT_SYMBOL();

void cmdq_mbox_destroy(struct cmdq_client *client)
{}
EXPORT_SYMBOL();

int cmdq_pkt_create(struct cmdq_client *client, struct cmdq_pkt *pkt, size_t size)
{}
EXPORT_SYMBOL();

void cmdq_pkt_destroy(struct cmdq_client *client, struct cmdq_pkt *pkt)
{}
EXPORT_SYMBOL();

static int cmdq_pkt_append_command(struct cmdq_pkt *pkt,
				   struct cmdq_instruction inst)
{}

int cmdq_pkt_write(struct cmdq_pkt *pkt, u8 subsys, u16 offset, u32 value)
{}
EXPORT_SYMBOL();

int cmdq_pkt_write_mask(struct cmdq_pkt *pkt, u8 subsys,
			u16 offset, u32 value, u32 mask)
{}
EXPORT_SYMBOL();

int cmdq_pkt_read_s(struct cmdq_pkt *pkt, u16 high_addr_reg_idx, u16 addr_low,
		    u16 reg_idx)
{}
EXPORT_SYMBOL();

int cmdq_pkt_write_s(struct cmdq_pkt *pkt, u16 high_addr_reg_idx,
		     u16 addr_low, u16 src_reg_idx)
{}
EXPORT_SYMBOL();

int cmdq_pkt_write_s_mask(struct cmdq_pkt *pkt, u16 high_addr_reg_idx,
			  u16 addr_low, u16 src_reg_idx, u32 mask)
{}
EXPORT_SYMBOL();

int cmdq_pkt_write_s_value(struct cmdq_pkt *pkt, u8 high_addr_reg_idx,
			   u16 addr_low, u32 value)
{}
EXPORT_SYMBOL();

int cmdq_pkt_write_s_mask_value(struct cmdq_pkt *pkt, u8 high_addr_reg_idx,
				u16 addr_low, u32 value, u32 mask)
{}
EXPORT_SYMBOL();

int cmdq_pkt_mem_move(struct cmdq_pkt *pkt, dma_addr_t src_addr, dma_addr_t dst_addr)
{}
EXPORT_SYMBOL();

int cmdq_pkt_wfe(struct cmdq_pkt *pkt, u16 event, bool clear)
{}
EXPORT_SYMBOL();

int cmdq_pkt_acquire_event(struct cmdq_pkt *pkt, u16 event)
{}
EXPORT_SYMBOL();

int cmdq_pkt_clear_event(struct cmdq_pkt *pkt, u16 event)
{}
EXPORT_SYMBOL();

int cmdq_pkt_set_event(struct cmdq_pkt *pkt, u16 event)
{}
EXPORT_SYMBOL();

int cmdq_pkt_poll(struct cmdq_pkt *pkt, u8 subsys,
		  u16 offset, u32 value)
{}
EXPORT_SYMBOL();

int cmdq_pkt_poll_mask(struct cmdq_pkt *pkt, u8 subsys,
		       u16 offset, u32 value, u32 mask)
{}
EXPORT_SYMBOL();

int cmdq_pkt_poll_addr(struct cmdq_pkt *pkt, dma_addr_t addr, u32 value, u32 mask)
{}
EXPORT_SYMBOL();

int cmdq_pkt_logic_command(struct cmdq_pkt *pkt, u16 result_reg_idx,
			   struct cmdq_operand *left_operand,
			   enum cmdq_logic_op s_op,
			   struct cmdq_operand *right_operand)
{}
EXPORT_SYMBOL();

int cmdq_pkt_assign(struct cmdq_pkt *pkt, u16 reg_idx, u32 value)
{}
EXPORT_SYMBOL();

int cmdq_pkt_jump_abs(struct cmdq_pkt *pkt, dma_addr_t addr, u8 shift_pa)
{}
EXPORT_SYMBOL();

int cmdq_pkt_jump_rel(struct cmdq_pkt *pkt, s32 offset, u8 shift_pa)
{}
EXPORT_SYMBOL();

int cmdq_pkt_eoc(struct cmdq_pkt *pkt)
{}
EXPORT_SYMBOL();

int cmdq_pkt_finalize(struct cmdq_pkt *pkt)
{}
EXPORT_SYMBOL();

MODULE_DESCRIPTION();
MODULE_LICENSE();