kernel-brax3-ubuntu-touch/drivers/misc/mediatek/apusys/apusys_rv/apu_mbox.h
erascape f319b992b1 kernel-5.15: Initial import brax3 UT kernel
* halium configs enabled

Signed-off-by: erascape <erascape@proton.me>
2025-09-23 15:17:10 +00:00

28 lines
745 B
C

/* SPDX-License-Identifier: GPL-2.0 */
/*
* Copyright (c) 2020 MediaTek Inc.
*/
#ifndef APU_MBOX_H
#define APU_MBOX_H
struct apu_mbox_hdr {
unsigned int id;
unsigned int len;
unsigned int serial_no;
unsigned int csum;
};
#define APU_MBOX_SLOT_SIZE (4)
#define APU_MBOX_HDR_SLOTS \
(sizeof(struct apu_mbox_hdr) / APU_MBOX_SLOT_SIZE)
void apu_mbox_ack_outbox(struct mtk_apu *apu);
void apu_mbox_read_outbox(struct mtk_apu *apu, struct apu_mbox_hdr *hdr);
int apu_mbox_wait_inbox(struct mtk_apu *apu);
void apu_mbox_write_inbox(struct mtk_apu *apu, struct apu_mbox_hdr *hdr);
void apu_mbox_inbox_init(struct mtk_apu *apu);
void apu_mbox_hw_init(struct mtk_apu *apu);
void apu_mbox_hw_exit(struct mtk_apu *apu);
#endif /* APU_MBOX_H */