summaryrefslogtreecommitdiff
path: root/arch/arm/include
diff options
context:
space:
mode:
authorMark Kettenis <[email protected]>2022-01-22 20:38:14 +0100
committerTom Rini <[email protected]>2022-02-10 16:44:23 -0500
commit02e2588d3f8fed7bf25ac1677072dd607c4dd72e (patch)
tree48e35dbdbdc8aa221968d62db81d5843d180bb78 /arch/arm/include
parenta4bd5e4120d6389476c078076ce2746e3058037a (diff)
arm: apple: Add RTKit support
Most Apple IOPs run a firmware that is based on what Apple calls RTKit. RTKit implements a common mailbox protocol. This code provides an implementation of the AP side of this protocol, providing a function to initialize RTKit-based firmwares as well as a function to do a clean shutdown of this firmware. Signed-off-by: Mark Kettenis <[email protected]> Reviewed-by: Simon Glass <[email protected]> Tested on: Macbook Air M1 Tested-by: Simon Glass <[email protected]>
Diffstat (limited to 'arch/arm/include')
-rw-r--r--arch/arm/include/asm/arch-apple/rtkit.h11
1 files changed, 11 insertions, 0 deletions
diff --git a/arch/arm/include/asm/arch-apple/rtkit.h b/arch/arm/include/asm/arch-apple/rtkit.h
new file mode 100644
index 00000000000..51f77f298c0
--- /dev/null
+++ b/arch/arm/include/asm/arch-apple/rtkit.h
@@ -0,0 +1,11 @@
+// SPDX-License-Identifier: GPL-2.0+
+/*
+ * (C) Copyright 2021 Mark Kettenis <[email protected]>
+ */
+
+#define APPLE_RTKIT_PWR_STATE_SLEEP 0x01
+#define APPLE_RTKIT_PWR_STATE_QUIESCED 0x10
+#define APPLE_RTKIT_PWR_STATE_ON 0x20
+
+int apple_rtkit_init(struct mbox_chan *);
+int apple_rtkit_shutdown(struct mbox_chan *, int);