linux/drivers/mailbox/mtk-cmdq-mailbox.c

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

#include <linux/bitops.h>
#include <linux/clk.h>
#include <linux/clk-provider.h>
#include <linux/dma-mapping.h>
#include <linux/errno.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/iopoll.h>
#include <linux/kernel.h>
#include <linux/module.h>
#include <linux/platform_device.h>
#include <linux/pm_runtime.h>
#include <linux/mailbox_controller.h>
#include <linux/mailbox/mtk-cmdq-mailbox.h>
#include <linux/of.h>

#define CMDQ_MBOX_AUTOSUSPEND_DELAY_MS

#define CMDQ_OP_CODE_MASK
#define CMDQ_NUM_CMD(t)

#define CMDQ_CURR_IRQ_STATUS
#define CMDQ_SYNC_TOKEN_UPDATE
#define CMDQ_THR_SLOT_CYCLES
#define CMDQ_THR_BASE
#define CMDQ_THR_SIZE
#define CMDQ_THR_WARM_RESET
#define CMDQ_THR_ENABLE_TASK
#define CMDQ_THR_SUSPEND_TASK
#define CMDQ_THR_CURR_STATUS
#define CMDQ_THR_IRQ_STATUS
#define CMDQ_THR_IRQ_ENABLE
#define CMDQ_THR_CURR_ADDR
#define CMDQ_THR_END_ADDR
#define CMDQ_THR_WAIT_TOKEN
#define CMDQ_THR_PRIORITY

#define GCE_GCTL_VALUE
#define GCE_CTRL_BY_SW
#define GCE_DDR_EN

#define CMDQ_THR_ACTIVE_SLOT_CYCLES
#define CMDQ_THR_ENABLED
#define CMDQ_THR_DISABLED
#define CMDQ_THR_SUSPEND
#define CMDQ_THR_RESUME
#define CMDQ_THR_STATUS_SUSPENDED
#define CMDQ_THR_DO_WARM_RESET
#define CMDQ_THR_IRQ_DONE
#define CMDQ_THR_IRQ_ERROR
#define CMDQ_THR_IRQ_EN
#define CMDQ_THR_IS_WAITING

#define CMDQ_JUMP_BY_OFFSET
#define CMDQ_JUMP_BY_PA

struct cmdq_thread {};

struct cmdq_task {};

struct cmdq {};

struct gce_plat {};

static void cmdq_sw_ddr_enable(struct cmdq *cmdq, bool enable)
{}

u8 cmdq_get_shift_pa(struct mbox_chan *chan)
{}
EXPORT_SYMBOL();

static int cmdq_thread_suspend(struct cmdq *cmdq, struct cmdq_thread *thread)
{}

static void cmdq_thread_resume(struct cmdq_thread *thread)
{}

static void cmdq_init(struct cmdq *cmdq)
{}

static int cmdq_thread_reset(struct cmdq *cmdq, struct cmdq_thread *thread)
{}

static void cmdq_thread_disable(struct cmdq *cmdq, struct cmdq_thread *thread)
{}

/* notify GCE to re-fetch commands by setting GCE thread PC */
static void cmdq_thread_invalidate_fetched_data(struct cmdq_thread *thread)
{}

static void cmdq_task_insert_into_thread(struct cmdq_task *task)
{}

static bool cmdq_thread_is_in_wfe(struct cmdq_thread *thread)
{}

static void cmdq_task_exec_done(struct cmdq_task *task, int sta)
{}

static void cmdq_task_handle_error(struct cmdq_task *task)
{}

static void cmdq_thread_irq_handler(struct cmdq *cmdq,
				    struct cmdq_thread *thread)
{}

static irqreturn_t cmdq_irq_handler(int irq, void *dev)
{}

static int cmdq_runtime_resume(struct device *dev)
{}

static int cmdq_runtime_suspend(struct device *dev)
{}

static int cmdq_suspend(struct device *dev)
{}

static int cmdq_resume(struct device *dev)
{}

static void cmdq_remove(struct platform_device *pdev)
{}

static int cmdq_mbox_send_data(struct mbox_chan *chan, void *data)
{}

static int cmdq_mbox_startup(struct mbox_chan *chan)
{}

static void cmdq_mbox_shutdown(struct mbox_chan *chan)
{}

static int cmdq_mbox_flush(struct mbox_chan *chan, unsigned long timeout)
{}

static const struct mbox_chan_ops cmdq_mbox_chan_ops =;

static struct mbox_chan *cmdq_xlate(struct mbox_controller *mbox,
		const struct of_phandle_args *sp)
{}

static int cmdq_get_clocks(struct device *dev, struct cmdq *cmdq)
{}

static int cmdq_probe(struct platform_device *pdev)
{}

static const struct dev_pm_ops cmdq_pm_ops =;

static const struct gce_plat gce_plat_mt6779 =;

static const struct gce_plat gce_plat_mt8173 =;

static const struct gce_plat gce_plat_mt8183 =;

static const struct gce_plat gce_plat_mt8186 =;

static const struct gce_plat gce_plat_mt8188 =;

static const struct gce_plat gce_plat_mt8192 =;

static const struct gce_plat gce_plat_mt8195 =;

static const struct of_device_id cmdq_of_ids[] =;
MODULE_DEVICE_TABLE(of, cmdq_of_ids);

static struct platform_driver cmdq_drv =;

static int __init cmdq_drv_init(void)
{}

static void __exit cmdq_drv_exit(void)
{}

subsys_initcall(cmdq_drv_init);
module_exit(cmdq_drv_exit);

MODULE_DESCRIPTION();
MODULE_LICENSE();