Commit 5a6338cc authored by Viresh Kumar's avatar Viresh Kumar Committed by Jassi Brar
Browse files

mailbox: arm_mhuv2: Add driver



This adds driver for the ARM MHUv2 (Message Handling Unit) mailbox
controller.

This is based on the accepted DT bindings of the controller and supports
combination of both transport protocols, i.e. doorbell and data-transfer.

Transmitting and receiving data through the mailbox framework is done
through struct arm_mhuv2_mbox_msg.

Based on the initial work done by Morten Borup Petersen from ARM.

Co-developed-by: default avatarTushar Khandelwal <tushar.khandelwal@arm.com>
Signed-off-by: default avatarTushar Khandelwal <tushar.khandelwal@arm.com>
Tested-by: default avatarUsama Arif <usama.arif@arm.com>
Signed-off-by: default avatarViresh Kumar <viresh.kumar@linaro.org>
Signed-off-by: default avatarJassi Brar <jaswinder.singh@linaro.org>
parent aa80be50
Loading
Loading
Loading
Loading
+9 −0
Original line number Diff line number Diff line
@@ -10418,6 +10418,15 @@ F: drivers/mailbox/
F:	include/linux/mailbox_client.h
F:	include/linux/mailbox_controller.h
MAILBOX ARM MHUv2
M:	Viresh Kumar <viresh.kumar@linaro.org>
M:	Tushar Khandelwal <Tushar.Khandelwal@arm.com>
L:	linux-kernel@vger.kernel.org
S:	Maintained
F:	drivers/mailbox/arm_mhuv2.c
F:	include/linux/mailbox/arm_mhuv2_message.h
F:	Documentation/devicetree/bindings/mailbox/arm,mhuv2.yaml
MAN-PAGES: MANUAL PAGES FOR LINUX -- Sections 2, 3, 4, 5, and 7
M:	Michael Kerrisk <mtk.manpages@gmail.com>
L:	linux-man@vger.kernel.org
+7 −0
Original line number Diff line number Diff line
@@ -16,6 +16,13 @@ config ARM_MHU
	  The controller has 3 mailbox channels, the last of which can be
	  used in Secure mode only.

config ARM_MHU_V2
	tristate "ARM MHUv2 Mailbox"
	depends on ARM_AMBA
	help
	  Say Y here if you want to build the ARM MHUv2 controller driver,
	  which provides unidirectional mailboxes between processing elements.

config IMX_MBOX
	tristate "i.MX Mailbox"
	depends on ARCH_MXC || COMPILE_TEST
+2 −0
Original line number Diff line number Diff line
@@ -7,6 +7,8 @@ obj-$(CONFIG_MAILBOX_TEST) += mailbox-test.o

obj-$(CONFIG_ARM_MHU)	+= arm_mhu.o arm_mhu_db.o

obj-$(CONFIG_ARM_MHU_V2)	+= arm_mhuv2.o

obj-$(CONFIG_IMX_MBOX)	+= imx-mailbox.o

obj-$(CONFIG_ARMADA_37XX_RWTM_MBOX)	+= armada-37xx-rwtm-mailbox.o
+1136 −0

File added.

Preview size limit exceeded, changes collapsed.

+20 −0
Original line number Diff line number Diff line
// SPDX-License-Identifier: GPL-2.0
/*
 * ARM MHUv2 Mailbox Message
 *
 * Copyright (C) 2020 Arm Ltd.
 * Copyright (C) 2020 Linaro Ltd.
 */

#ifndef _LINUX_ARM_MHUV2_MESSAGE_H_
#define _LINUX_ARM_MHUV2_MESSAGE_H_

#include <linux/types.h>

/* Data structure for data-transfer protocol */
struct arm_mhuv2_mbox_msg {
	void *data;
	size_t len;
};

#endif /* _LINUX_ARM_MHUV2_MESSAGE_H_ */