Squashed backup commit (no shallow-clone history issues) of xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2 branch, upstream commit 9eece662e) plus all fixes applied to get everpal_defconfig building clean against a modern (GCC 15.2.0) toolchain -- see the previous commit message on the lineage-23.2 branch (also in this repo history is not available here since this is a squashed snapshot; full incremental history lives in the local DL380 checkout and the upstream GitHub remote). Upstream: https://github.com/xiaomi-mt6833-dev/kernel_xiaomi_mt6833 (lineage-23.2)
49 lines
1.3 KiB
C
49 lines
1.3 KiB
C
/*
|
|
* Copyright (c) 2019 MediaTek Inc.
|
|
*
|
|
* This program is free software; you can redistribute it and/or modify
|
|
* it under the terms of the GNU General Public License version 2 as
|
|
* published by the Free Software Foundation.
|
|
*
|
|
* This program is distributed in the hope that it will be useful,
|
|
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
* GNU General Public License for more details.
|
|
*/
|
|
|
|
#ifndef __MTK_RPMSG_MAILBOX_H__
|
|
#define __MTK_RPMSG_MAILBOX_H__
|
|
|
|
#include <linux/mailbox_controller.h>
|
|
#include <linux/mailbox_client.h>
|
|
|
|
enum MTK_MBOX_STATUS {
|
|
LAST_TX_DONE = 0,
|
|
LAST_TX_BUSY = 1,
|
|
};
|
|
|
|
struct mtk_mbox_chan {
|
|
struct mbox_chan *chan;
|
|
struct mtk_mbox_device *mbdev;
|
|
struct mtk_mbox_operations *ops;
|
|
struct mtk_ipi_msg *ipimsg;
|
|
unsigned int mbox;
|
|
unsigned int send_slot;
|
|
unsigned int send_slot_size;
|
|
unsigned int send_pin_index;
|
|
unsigned int send_pin_offset;
|
|
};
|
|
|
|
|
|
struct mtk_mbox_operations {
|
|
int (*mtk_send_ipi)(struct mtk_mbox_chan *mchan, void *data);
|
|
bool (*mtk_tx_done)(struct mtk_mbox_chan *chan);
|
|
int (*mtk_startup)(struct mtk_mbox_chan *chan);
|
|
void (*mtk_shutdown)(struct mtk_mbox_chan *chan);
|
|
};
|
|
|
|
int mtk_mbox_chan_create(struct mbox_controller *mboxctrl,
|
|
struct mtk_mbox_device *mbdev, int num);
|
|
|
|
#endif /* __MTK_RPMSG_MAILBOX_H__ */
|