Skip to content

Commit

Permalink
soc: apple: mailbox: Add ASC/M3 mailbox driver
Browse files Browse the repository at this point in the history
This new driver is based on the existing apple-mailbox driver, but
replaces the usage of the mailbox subsystem with directly exported
symbols.

As part of this refactor, this adds support for using the hardware FIFOs
(not supported in mailbox) and implicitly fixes a bunch of bugs caused
by bad interactions with the mailbox subsystem. It also adds runtime-PM
support.

The new config symbol is APPLE_MBOX, while the module name remains
identical ("apple-mailbox"). The configs are mutually exclusive in
Kconfig, to avoid conflicts.

Acked-by: Eric Curtin <ecurtin@redhat.com>
Acked-by: Neal Gompa <neal@gompa.dev>
Acked-by: Alyssa Rosenzweig <alyssa@rosenzweig.io>
Signed-off-by: Hector Martin <marcan@marcan.st>
  • Loading branch information
marcan committed Jun 5, 2023
1 parent df814db commit 6fca0ad
Show file tree
Hide file tree
Showing 4 changed files with 501 additions and 0 deletions.
14 changes: 14 additions & 0 deletions drivers/soc/apple/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,20 @@ config APPLE_PMGR_PWRSTATE
controls for SoC devices. This driver manages them through the
generic power domain framework, and also provides reset support.

config APPLE_MBOX
tristate "Apple SoC mailboxes"
depends on PM
depends on ARCH_APPLE || (64BIT && COMPILE_TEST)
depends on !APPLE_MAILBOX
default ARCH_APPLE
help
Apple SoCs have various co-processors required for certain
peripherals to work (NVMe, display controller, etc.). This
driver adds support for the mailbox controller used to
communicate with those.

Say Y here if you have an Apple SoC.

config APPLE_RTKIT
tristate "Apple RTKit co-processor IPC protocol"
depends on MAILBOX
Expand Down
3 changes: 3 additions & 0 deletions drivers/soc/apple/Makefile
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# SPDX-License-Identifier: GPL-2.0-only
obj-$(CONFIG_APPLE_PMGR_PWRSTATE) += apple-pmgr-pwrstate.o

obj-$(CONFIG_APPLE_MBOX) += apple-mailbox.o
apple-mailbox-y = mailbox.o

obj-$(CONFIG_APPLE_RTKIT) += apple-rtkit.o
apple-rtkit-y = rtkit.o rtkit-crashlog.o

Expand Down
Loading

0 comments on commit 6fca0ad

Please sign in to comment.