summaryrefslogtreecommitdiff
path: root/include/linux/mailbox_controller.h
diff options
context:
space:
mode:
authorAnup Patel <apatel@ventanamicro.com>2025-08-18 07:09:01 +0300
committerGreg Kroah-Hartman <gregkh@linuxfoundation.org>2026-03-25 13:05:34 +0300
commitc42ffd816c0f25e36a5585220fcda924632e9b29 (patch)
tree885e9c1ad37c4a5d50bcd3fce740cade0ca2df6b /include/linux/mailbox_controller.h
parentcfdb216691ec0a392aaf8037ca3dc6fff9cfd6a0 (diff)
downloadlinux-c42ffd816c0f25e36a5585220fcda924632e9b29.tar.xz
mailbox: Allow controller specific mapping using fwnode
[ Upstream commit ba879dfc0574878f3e08f217b2b4fdf845c426c0 ] Introduce optional fw_node() callback which allows a mailbox controller driver to provide controller specific mapping using fwnode. The Linux OF framework already implements fwnode operations for the Linux DD framework so the fw_xlate() callback works fine with device tree as well. Acked-by: Jassi Brar <jassisinghbrar@gmail.com> Reviewed-by: Andy Shevchenko <andriy.shevchenko@linux.intel.com> Signed-off-by: Anup Patel <apatel@ventanamicro.com> Link: https://lore.kernel.org/r/20250818040920.272664-6-apatel@ventanamicro.com Signed-off-by: Paul Walmsley <pjw@kernel.org> Stable-dep-of: fcd7f96c7836 ("mailbox: Prevent out-of-bounds access in fw_mbox_index_xlate()") Signed-off-by: Sasha Levin <sashal@kernel.org>
Diffstat (limited to 'include/linux/mailbox_controller.h')
-rw-r--r--include/linux/mailbox_controller.h3
1 files changed, 3 insertions, 0 deletions
diff --git a/include/linux/mailbox_controller.h b/include/linux/mailbox_controller.h
index 5fb0b65f45a2..b91379922cb3 100644
--- a/include/linux/mailbox_controller.h
+++ b/include/linux/mailbox_controller.h
@@ -66,6 +66,7 @@ struct mbox_chan_ops {
* no interrupt rises. Ignored if 'txdone_irq' is set.
* @txpoll_period: If 'txdone_poll' is in effect, the API polls for
* last TX's status after these many millisecs
+ * @fw_xlate: Controller driver specific mapping of channel via fwnode
* @of_xlate: Controller driver specific mapping of channel via DT
* @poll_hrt: API private. hrtimer used to poll for TXDONE on all
* channels.
@@ -79,6 +80,8 @@ struct mbox_controller {
bool txdone_irq;
bool txdone_poll;
unsigned txpoll_period;
+ struct mbox_chan *(*fw_xlate)(struct mbox_controller *mbox,
+ const struct fwnode_reference_args *sp);
struct mbox_chan *(*of_xlate)(struct mbox_controller *mbox,
const struct of_phandle_args *sp);
/* Internal to API */