Skip to content

Commit cd5a0af

Browse files
committed
Merge tag 'mailbox-v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox
Pull mailbox updates from Jassi Brar: - Qualcomm: add Glymur CPUCP mailbox binding - Xilinx Zynq: misc cleanup - MediaTek: - add new GPUEB mailbox driver - cmdq: remove pm_runtime calls from send_data - gce: make clock-names optional - misc: - change mailbox-altera maintainer - remove redundant 'fast_io' in regmap_config - mhuv3: Remove no_free_ptr * tag 'mailbox-v6.18' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox: mailbox: mtk-cmdq: Remove pm_runtime APIs from cmdq_mbox_send_data() mailbox: add MediaTek GPUEB IPI mailbox dt-bindings: mailbox: Add MT8196 GPUEB Mailbox mailbox: zynqmp-ipi: Fix SGI cleanup on unbind mailbox: zynqmp-ipi: Fix out-of-bounds access in mailbox cleanup loop mailbox: zynqmp-ipi: Remove dev.parent check in zynqmp_ipi_free_mboxes mailbox: zynqmp-ipi: Remove redundant mbox_controller_unregister() call mailbox: remove unneeded 'fast_io' parameter in regmap_config dt-bindings: mailbox: mediatek,gce-mailbox: Make clock-names optional dt-bindings: mailbox: qcom: Document Glymur CPUCP mailbox controller binding MAINTAINERS: Change mailbox-altera maintainer mailbox: arm_mhuv3: Remove no_free_ptr() to maintain the original form of the pointer
2 parents ed4d6e9 + 3f39f56 commit cd5a0af

File tree

10 files changed

+418
-27
lines changed

10 files changed

+418
-27
lines changed
Lines changed: 64 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,64 @@
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-gpueb-mbox.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
6+
7+
title: MediaTek MFlexGraphics GPUEB Mailbox Controller
8+
9+
maintainers:
10+
- Nicolas Frattaroli <nicolas.frattaroli@collabora.com>
11+
12+
properties:
13+
compatible:
14+
enum:
15+
- mediatek,mt8196-gpueb-mbox
16+
17+
reg:
18+
items:
19+
- description: mailbox data registers
20+
- description: mailbox control registers
21+
22+
reg-names:
23+
items:
24+
- const: data
25+
- const: ctl
26+
27+
clocks:
28+
items:
29+
- description: main clock of the GPUEB MCU
30+
31+
interrupts:
32+
items:
33+
- description: fires when a new message is received
34+
35+
"#mbox-cells":
36+
const: 1
37+
description:
38+
The number of the mailbox channel.
39+
40+
required:
41+
- compatible
42+
- reg
43+
- reg-names
44+
- clocks
45+
- interrupts
46+
- "#mbox-cells"
47+
48+
additionalProperties: false
49+
50+
examples:
51+
- |
52+
#include <dt-bindings/clock/mediatek,mt8196-clock.h>
53+
#include <dt-bindings/interrupt-controller/arm-gic.h>
54+
#include <dt-bindings/interrupt-controller/irq.h>
55+
56+
mailbox@4b09fd80 {
57+
compatible = "mediatek,mt8196-gpueb-mbox";
58+
reg = <0x4b09fd80 0x280>,
59+
<0x4b170000 0x7c>;
60+
reg-names = "data", "ctl";
61+
clocks = <&topckgen CLK_TOP_MFG_EB>;
62+
interrupts = <GIC_SPI 608 IRQ_TYPE_LEVEL_HIGH 0>;
63+
#mbox-cells = <1>;
64+
};

Documentation/devicetree/bindings/mailbox/qcom,cpucp-mbox.yaml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,8 +15,13 @@ description:
1515

1616
properties:
1717
compatible:
18-
items:
19-
- const: qcom,x1e80100-cpucp-mbox
18+
oneOf:
19+
- items:
20+
- enum:
21+
- qcom,glymur-cpucp-mbox
22+
- const: qcom,x1e80100-cpucp-mbox
23+
- enum:
24+
- qcom,x1e80100-cpucp-mbox
2025

2126
reg:
2227
items:

MAINTAINERS

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -924,7 +924,7 @@ R: Pali Rohár <pali@kernel.org>
924924
F: drivers/input/mouse/alps.*
925925

926926
ALTERA MAILBOX DRIVER
927-
M: Mun Yew Tham <mun.yew.tham@intel.com>
927+
M: Tien Sung Ang <tiensung.ang@altera.com>
928928
S: Maintained
929929
F: drivers/mailbox/mailbox-altera.c
930930

drivers/mailbox/Kconfig

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -294,6 +294,16 @@ config MTK_CMDQ_MBOX
294294
critical time limitation, such as updating display configuration
295295
during the vblank.
296296

297+
config MTK_GPUEB_MBOX
298+
tristate "MediaTek GPUEB Mailbox Support"
299+
depends on ARCH_MEDIATEK || COMPILE_TEST
300+
help
301+
The MediaTek GPUEB mailbox is used to communicate with the embedded
302+
controller in charge of GPU frequency and power management on some
303+
MediaTek SoCs, such as the MT8196.
304+
Say Y or m here if you want to support the MT8196 SoC in your kernel
305+
build.
306+
297307
config ZYNQMP_IPI_MBOX
298308
tristate "Xilinx ZynqMP IPI Mailbox"
299309
depends on ARCH_ZYNQMP && OF

drivers/mailbox/Makefile

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ obj-$(CONFIG_MTK_ADSP_MBOX) += mtk-adsp-mailbox.o
6363

6464
obj-$(CONFIG_MTK_CMDQ_MBOX) += mtk-cmdq-mailbox.o
6565

66+
obj-$(CONFIG_MTK_GPUEB_MBOX) += mtk-gpueb-mailbox.o
67+
6668
obj-$(CONFIG_ZYNQMP_IPI_MBOX) += zynqmp-ipi-mailbox.o
6769

6870
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
@@ -945,7 +945,7 @@ static irqreturn_t mhuv3_mbx_comb_interrupt(int irq, void *arg)
945945
if (IS_ERR(data)) {
946946
dev_err(dev,
947947
"Failed to read in-band data. err:%ld\n",
948-
PTR_ERR(no_free_ptr(data)));
948+
PTR_ERR(data));
949949
goto rx_ack;
950950
}
951951
}

drivers/mailbox/mtk-cmdq-mailbox.c

Lines changed: 1 addition & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -379,20 +379,13 @@ static int cmdq_mbox_send_data(struct mbox_chan *chan, void *data)
379379
struct cmdq *cmdq = dev_get_drvdata(chan->mbox->dev);
380380
struct cmdq_task *task;
381381
unsigned long curr_pa, end_pa;
382-
int ret;
383382

384383
/* Client should not flush new tasks if suspended. */
385384
WARN_ON(cmdq->suspended);
386385

387-
ret = pm_runtime_get_sync(cmdq->mbox.dev);
388-
if (ret < 0)
389-
return ret;
390-
391386
task = kzalloc(sizeof(*task), GFP_ATOMIC);
392-
if (!task) {
393-
pm_runtime_put_autosuspend(cmdq->mbox.dev);
387+
if (!task)
394388
return -ENOMEM;
395-
}
396389

397390
task->cmdq = cmdq;
398391
INIT_LIST_HEAD(&task->list_entry);
@@ -439,9 +432,6 @@ static int cmdq_mbox_send_data(struct mbox_chan *chan, void *data)
439432
}
440433
list_move_tail(&task->list_entry, &thread->task_busy_list);
441434

442-
pm_runtime_mark_last_busy(cmdq->mbox.dev);
443-
pm_runtime_put_autosuspend(cmdq->mbox.dev);
444-
445435
return 0;
446436
}
447437

0 commit comments

Comments
 (0)