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)
50 lines
1.4 KiB
C
50 lines
1.4 KiB
C
/*
|
|
* Copyright (C) 2017 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 http://www.gnu.org/licenses/gpl-2.0.html for more details.
|
|
*/
|
|
|
|
#ifndef _SCP_IPI_H_
|
|
#define _SCP_IPI_H_
|
|
|
|
#include "scp_ipi_wrapper.h"
|
|
|
|
enum scp_ipi_status {
|
|
SCP_IPI_NOT_READY = -2,
|
|
SCP_IPI_ERROR = -1,
|
|
SCP_IPI_DONE,
|
|
SCP_IPI_BUSY,
|
|
};
|
|
|
|
struct scp_ipi_wrapper {
|
|
uint32_t out_id_0;
|
|
uint32_t out_id_1;
|
|
uint32_t in_id_0;
|
|
uint32_t in_id_1;
|
|
uint32_t out_size;
|
|
uint32_t in_size;
|
|
void *msg_0;
|
|
void *msg_1;
|
|
};
|
|
|
|
extern struct mtk_mbox_device scp_mboxdev;
|
|
extern struct mtk_ipi_device scp_ipidev;
|
|
extern struct mtk_mbox_info scp_mbox_info[SCP_MBOX_TOTAL];
|
|
|
|
extern enum scp_ipi_status scp_ipi_registration(enum ipi_id id,
|
|
void (*ipi_handler)(int id, void *data, unsigned int len),
|
|
const char *name);
|
|
extern enum scp_ipi_status scp_ipi_send(enum ipi_id id, void *buf,
|
|
unsigned int len, unsigned int wait, enum scp_core_id scp_id);
|
|
extern enum scp_ipi_status scp_ipi_unregistration(enum ipi_id id);
|
|
extern enum scp_ipi_status scp_legacy_ipi_init(void);
|
|
|
|
#endif
|