From 456305ec597908536e8e0de32dade43f9db00e8c Mon Sep 17 00:00:00 2001 From: Mark Kettenis Date: Sat, 22 Jan 2022 20:38:12 +0100 Subject: mailbox: apple: Add driver for Apple IOP mailbox This mailbox driver provides a communication channel with the Apple IOP controllers found on Apple SoCs. These IOP controllers are used to implement various functions such as the System Manegement Controller (SMC) and NVMe storage. It allows sending and receiving a 96-bit message over a single channel. The header file with the struct used for mailbox messages is taken straight from Linux. Signed-off-by: Mark Kettenis Signed-off-by: Sven Peter Reviewed-by: Simon Glass Tested on: Macbook Air M1 Tested-by: Simon Glass --- include/linux/apple-mailbox.h | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100644 include/linux/apple-mailbox.h (limited to 'include/linux') diff --git a/include/linux/apple-mailbox.h b/include/linux/apple-mailbox.h new file mode 100644 index 00000000000..720fbb70294 --- /dev/null +++ b/include/linux/apple-mailbox.h @@ -0,0 +1,19 @@ +/* SPDX-License-Identifier: GPL-2.0-only OR MIT */ +/* + * Apple mailbox message format + * + * Copyright (C) 2021 The Asahi Linux Contributors + */ + +#ifndef _LINUX_APPLE_MAILBOX_H_ +#define _LINUX_APPLE_MAILBOX_H_ + +#include + +/* encodes a single 96bit message sent over the single channel */ +struct apple_mbox_msg { + u64 msg0; + u32 msg1; +}; + +#endif -- cgit v1.2.3