linux/drivers/mailbox/hi6220-mailbox.c

// SPDX-License-Identifier: GPL-2.0-only
/*
 * Hisilicon's Hi6220 mailbox driver
 *
 * Copyright (c) 2015 HiSilicon Limited.
 * Copyright (c) 2015 Linaro Limited.
 *
 * Author: Leo Yan <[email protected]>
 */

#include <linux/device.h>
#include <linux/err.h>
#include <linux/interrupt.h>
#include <linux/io.h>
#include <linux/kfifo.h>
#include <linux/mailbox_controller.h>
#include <linux/module.h>
#include <linux/of.h>
#include <linux/platform_device.h>
#include <linux/slab.h>

#define MBOX_CHAN_MAX

#define MBOX_TX

/* Mailbox message length: 8 words */
#define MBOX_MSG_LEN

/* Mailbox Registers */
#define MBOX_OFF(m)
#define MBOX_MODE_REG(m)
#define MBOX_DATA_REG(m)

#define MBOX_STATE_MASK
#define MBOX_STATE_IDLE
#define MBOX_STATE_TX
#define MBOX_STATE_RX
#define MBOX_STATE_ACK
#define MBOX_ACK_CONFIG_MASK
#define MBOX_ACK_AUTOMATIC
#define MBOX_ACK_IRQ

/* IPC registers */
#define ACK_INT_RAW_REG(i)
#define ACK_INT_MSK_REG(i)
#define ACK_INT_STAT_REG(i)
#define ACK_INT_CLR_REG(i)
#define ACK_INT_ENA_REG(i)
#define ACK_INT_DIS_REG(i)
#define DST_INT_RAW_REG(i)


struct hi6220_mbox_chan {};

struct hi6220_mbox {};

static void mbox_set_state(struct hi6220_mbox *mbox,
			   unsigned int slot, u32 val)
{}

static void mbox_set_mode(struct hi6220_mbox *mbox,
			  unsigned int slot, u32 val)
{}

static bool hi6220_mbox_last_tx_done(struct mbox_chan *chan)
{}

static int hi6220_mbox_send_data(struct mbox_chan *chan, void *msg)
{}

static irqreturn_t hi6220_mbox_interrupt(int irq, void *p)
{}

static int hi6220_mbox_startup(struct mbox_chan *chan)
{}

static void hi6220_mbox_shutdown(struct mbox_chan *chan)
{}

static const struct mbox_chan_ops hi6220_mbox_ops =;

static struct mbox_chan *hi6220_mbox_xlate(struct mbox_controller *controller,
					   const struct of_phandle_args *spec)
{}

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

static int hi6220_mbox_probe(struct platform_device *pdev)
{}

static struct platform_driver hi6220_mbox_driver =;

static int __init hi6220_mbox_init(void)
{}
core_initcall(hi6220_mbox_init);

static void __exit hi6220_mbox_exit(void)
{}
module_exit(hi6220_mbox_exit);

MODULE_AUTHOR();
MODULE_DESCRIPTION();
MODULE_LICENSE();