Skip to content

Commit f0a475a

Browse files
committed
Merge tag 'mailbox-v6.20' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox
Pull mailbox updates from Jassi Brar: "Platform and core updates PCC: - Updates to transmission and interrupt handling, including dynamic txdone configuration, ->last_tx_done() wiring, and SHMEM initialization fixes. Reverted previous shared buffer patch MediaTek - Introduce mtk-vcp-mailbox driver and bindings for MT8196 VCP - Expand mtk-cmdq for MT8196 with GCE virtualization, mminfra_offset, and instruction generation data Spreadtrum (SPRD) - Add Mailbox Revision 2 support and UMS9230 bindings - Fix unhandled interrupt masking and TX done delivery flags Microchip - Add pic64gx compatibility to MPFS - Fix out-of-bounds access and smatch warnings in mchp-ipc-sbi Core & Misc Platform Updates - Prevent out-of-bounds access in fw_mbox_index_xlate() - Add bindings for Qualcomm CPUCP (Kaanapali) - Simplify mtk-cmdq and zynqmp-ipi with scoped OF child iterators - Consolidate various minor fixes, dead code removal, and typo corrections across Broadcom, NXP, Samsung, Xilinx, ARM, and core headers" * tag 'mailbox-v6.20' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox: (34 commits) mailbox: sprd: mask interrupts that are not handled mailbox: sprd: add support for mailbox revision 2 mailbox: sprd: clear delivery flag before handling TX done dt-bindings: mailbox: sprd: add compatible for UMS9230 mailbox: bcm-ferxrm-mailbox: Use default primary handler mailbox: Remove mailbox_client.h from controller drivers mailbox: zynqmp-ipi: Simplify with scoped for each OF child loop mailbox: mtk-cmdq: Simplify with scoped for each OF child loop dt-bindings: mailbox: xlnx,zynqmp-ipi-mailbox: Document msg region requirement mailbox: Improve RISCV_SBI_MPXY_MBOX guidance mailbox: mchp-ipc-sbi: fix uninitialized symbol and other smatch warnings mailbox: arm_mhuv3: fix typo in comment mailbox: cix: fix typo in error message mailbox: imx: Skip the suspend flag for i.MX7ULP mailbox: exynos: drop unneeded runtime pointer (pclk) mailbox: pcc: Remove spurious IRQF_ONESHOT usage mailbox: mtk-cmdq: Add driver data to support for MT8196 mailbox: mtk-cmdq: Add mminfra_offset configuration for DRAM transaction mailbox: mtk-cmdq: Add GCE hardware virtualization configuration mailbox: mtk-cmdq: Add cmdq private data to cmdq_pkt for generating instruction ...
2 parents dd53059 + 75df94d commit f0a475a

22 files changed

Lines changed: 434 additions & 208 deletions
Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
2+
%YAML 1.2
3+
---
4+
$id: http://devicetree.org/schemas/mailbox/mediatek,mt8196-vcp-mbox.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MediaTek Video Companion Processor (VCP) mailbox
8+
9+
maintainers:
10+
- Jjian Zhou <Jjian.Zhou@mediatek.com>
11+
12+
description:
13+
The MTK VCP mailbox enables the SoC to communicate with the VCP by passing
14+
messages through 64 32-bit wide registers. It has 32 interrupt vectors in
15+
either direction for signalling purposes.
16+
17+
properties:
18+
compatible:
19+
enum:
20+
- mediatek,mt8196-vcp-mbox
21+
22+
reg:
23+
maxItems: 1
24+
25+
interrupts:
26+
maxItems: 1
27+
28+
"#mbox-cells":
29+
const: 0
30+
31+
required:
32+
- compatible
33+
- reg
34+
- interrupts
35+
- "#mbox-cells"
36+
37+
additionalProperties: false
38+
39+
examples:
40+
- |
41+
#include <dt-bindings/interrupt-controller/arm-gic.h>
42+
#include <dt-bindings/interrupt-controller/irq.h>
43+
44+
mailbox@31b80000 {
45+
compatible = "mediatek,mt8196-vcp-mbox";
46+
reg = <0x31b80000 0x1000>;
47+
interrupts = <GIC_SPI 789 IRQ_TYPE_LEVEL_HIGH 0>;
48+
#mbox-cells = <0>;
49+
};

Documentation/devicetree/bindings/mailbox/microchip,mpfs-mailbox.yaml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ maintainers:
1111

1212
properties:
1313
compatible:
14-
const: microchip,mpfs-mailbox
14+
oneOf:
15+
- items:
16+
- const: microchip,pic64gx-mailbox
17+
- const: microchip,mpfs-mailbox
18+
- const: microchip,mpfs-mailbox
1519

1620
reg:
1721
oneOf:

Documentation/devicetree/bindings/mailbox/sprd-mailbox.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ properties:
1616
enum:
1717
- sprd,sc9860-mailbox
1818
- sprd,sc9863a-mailbox
19+
- sprd,ums9230-mailbox
1920

2021
reg:
2122
items:

Documentation/devicetree/bindings/mailbox/xlnx,zynqmp-ipi-mailbox.yaml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,17 @@ description: |
1111
messaging between two Xilinx Zynq UltraScale+ MPSoC IPI agents. Each IPI
1212
agent owns registers used for notification and buffers for message.
1313
14+
For Versal devices, there are two types of IPI channels:
15+
- Buffered channels: Support message passing and require the "msg"
16+
register region to be present on both the host and remote IPI agents.
17+
- Buffer-less channels: Support notification only and do not require the
18+
"msg" register region. For these channels, the "msg" region should be
19+
omitted.
20+
21+
For message passing, both the host and remote IPI agents must define the "msg"
22+
register region. If either agent omits the "msg" region, only notification
23+
based communication is possible.
24+
1425
+-------------------------------------+
1526
| Xilinx ZynqMP IPI Controller |
1627
+-------------------------------------+

drivers/mailbox/Kconfig

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -199,7 +199,7 @@ config POLARFIRE_SOC_MAILBOX
199199
tristate "PolarFire SoC (MPFS) Mailbox"
200200
depends on HAS_IOMEM
201201
depends on MFD_SYSCON
202-
depends on ARCH_MICROCHIP_POLARFIRE || COMPILE_TEST
202+
depends on ARCH_MICROCHIP || COMPILE_TEST
203203
help
204204
This driver adds support for the PolarFire SoC (MPFS) mailbox controller.
205205

@@ -279,7 +279,7 @@ config MTK_ADSP_MBOX
279279
tristate "MediaTek ADSP Mailbox Controller"
280280
depends on ARCH_MEDIATEK || COMPILE_TEST
281281
help
282-
Say yes here to add support for "MediaTek ADSP Mailbox Controller.
282+
Say yes here to add support for MediaTek ADSP Mailbox Controller.
283283
This mailbox driver is used to send notification or short message
284284
between processors with ADSP. It will place the message to share
285285
buffer and will access the ipc control.
@@ -304,6 +304,15 @@ config MTK_GPUEB_MBOX
304304
Say Y or m here if you want to support the MT8196 SoC in your kernel
305305
build.
306306

307+
config MTK_VCP_MBOX
308+
tristate "MediaTek VCP Mailbox Support"
309+
depends on ARCH_MEDIATEK || COMPILE_TEST
310+
help
311+
Say yes here to add support for the MediaTek VCP mailbox driver.
312+
The mailbox implementation provides access from the application
313+
processor to Video Companion Processor Unit.
314+
If unsure say N.
315+
307316
config ZYNQMP_IPI_MBOX
308317
tristate "Xilinx ZynqMP IPI Mailbox"
309318
depends on ARCH_ZYNQMP && OF
@@ -387,7 +396,7 @@ config RISCV_SBI_MPXY_MBOX
387396
Mailbox driver implementation for RISC-V SBI Message Proxy (MPXY)
388397
extension. This mailbox driver is used to send messages to the
389398
remote processor through the SBI implementation (M-mode firmware
390-
or HS-mode hypervisor). Say Y here if you want to have this support.
391-
If unsure say N.
399+
or HS-mode hypervisor). Say Y here, unless you are sure you do not
400+
need this.
392401

393402
endif

drivers/mailbox/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -65,6 +65,8 @@ obj-$(CONFIG_MTK_CMDQ_MBOX) += mtk-cmdq-mailbox.o
6565

6666
obj-$(CONFIG_MTK_GPUEB_MBOX) += mtk-gpueb-mailbox.o
6767

68+
obj-$(CONFIG_MTK_VCP_MBOX) += mtk-vcp-mailbox.o
69+
6870
obj-$(CONFIG_ZYNQMP_IPI_MBOX) += zynqmp-ipi-mailbox.o
6971

7072
obj-$(CONFIG_SUN6I_MSGBOX) += sun6i-msgbox.o

drivers/mailbox/arm_mhuv3.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -333,7 +333,7 @@ struct mhuv3_extension {
333333
* @rev: MHUv3 controller IIDR revision.
334334
* @var: MHUv3 controller IIDR variant.
335335
* @prod_id: MHUv3 controller IIDR product_id.
336-
* @num_chans: The total number of channnels discovered across all extensions.
336+
* @num_chans: The total number of channels discovered across all extensions.
337337
* @cmb_irq: Combined IRQ number if any found defined.
338338
* @ctrl: A reference to the MHUv3 control page for this block.
339339
* @pbx: Base address of the PBX register mapping region.

drivers/mailbox/bcm-flexrm-mailbox.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,6 @@
2626
#include <linux/interrupt.h>
2727
#include <linux/kernel.h>
2828
#include <linux/mailbox_controller.h>
29-
#include <linux/mailbox_client.h>
3029
#include <linux/mailbox/brcm-message.h>
3130
#include <linux/module.h>
3231
#include <linux/msi.h>

drivers/mailbox/cix-mailbox.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -346,7 +346,7 @@ static void cix_mbox_isr_fifo(struct mbox_chan *chan)
346346
/* FIFO overflow is generated */
347347
if (int_status & CIX_FIFO_OFLOW_INT) {
348348
status = cix_mbox_read(priv, CIX_FIFO_STAS);
349-
dev_err(priv->dev, "fifo overlow: int_stats %d\n", status);
349+
dev_err(priv->dev, "fifo overflow: int_stats %d\n", status);
350350
cix_mbox_write(priv, CIX_FIFO_OFLOW_INT, CIX_INT_CLEAR);
351351
}
352352
}

drivers/mailbox/cv1800-mailbox.c

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,6 @@
1111
#include <linux/interrupt.h>
1212
#include <linux/io.h>
1313
#include <linux/kfifo.h>
14-
#include <linux/mailbox_client.h>
1514
#include <linux/mailbox_controller.h>
1615
#include <linux/module.h>
1716
#include <linux/platform_device.h>

0 commit comments

Comments
 (0)