Skip to content

Commit 7f2ff7b

Browse files
committed
Merge tag 'mailbox-v6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox
Pull mailbox updates from Jassi Brar: "Core: - misc rejig of header includes - minor const fixes Misc: - constify amba_id table pcc: - cleanup and refactoring of shmem and irq handling qcom: - add MSM8226 compatible fsl,mu: - add i.MX94 compatible mediatek: - remove cl in struct cmdq_pkt tegra: - define dimensioning masks in SoC data" * tag 'mailbox-v6.15' of git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox: (25 commits) mailbox: Remove unneeded semicolon mailbox: pcc: Refactor and simplify check_and_ack() mailbox: pcc: Always map the shared memory communication address mailbox: pcc: Refactor error handling in irq handler into separate function mailbox: pcc: Use acpi_os_ioremap() instead of ioremap() mailbox: pcc: Return early if no GAS register from pcc_mbox_cmd_complete_check mailbox: pcc: Drop unnecessary endianness conversion of pcc_hdr.flags mailbox: pcc: Always clear the platform ack interrupt first mailbox: pcc: Fix the possible race in updation of chan_in_use flag dt-bindings: mailbox: qcom: add compatible for MSM8226 SoC dt-bindings: mailbox: fsl,mu: Add i.MX94 compatible MAINTAINERS: add mailbox API's tree type and location mailbox: remove unused header files mailbox: explicitly include <linux/bits.h> mailbox: sort headers alphabetically mailbox: don't protect of_parse_phandle_with_args with con_mutex mailbox: use error ret code of of_parse_phandle_with_args() mailbox: arm_mhuv2: Constify amba_id table mailbox: arm_mhu_db: Constify amba_id table mailbox: arm_mhu: Constify amba_id table ...
2 parents 91481c4 + 1ec12fd commit 7f2ff7b

File tree

17 files changed

+149
-111
lines changed

17 files changed

+149
-111
lines changed

Documentation/devicetree/bindings/mailbox/fsl,mu.yaml

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,10 @@ properties:
5454
- fsl,imx8qm-mu
5555
- fsl,imx8qxp-mu
5656
- const: fsl,imx6sx-mu
57+
- items:
58+
- enum:
59+
- fsl,imx94-mu
60+
- const: fsl,imx95-mu
5761

5862
reg:
5963
maxItems: 1
@@ -142,7 +146,8 @@ allOf:
142146
not:
143147
properties:
144148
compatible:
145-
const: fsl,imx95-mu
149+
contains:
150+
const: fsl,imx95-mu
146151
then:
147152
patternProperties:
148153
"^sram@[a-f0-9]+": false

Documentation/devicetree/bindings/mailbox/mediatek,gce-mailbox.yaml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,7 @@ properties:
2525
- mediatek,mt8188-gce
2626
- mediatek,mt8192-gce
2727
- mediatek,mt8195-gce
28+
- mediatek,mt8196-gce
2829
- items:
2930
- const: mediatek,mt6795-gce
3031
- const: mediatek,mt8173-gce
@@ -49,6 +50,9 @@ properties:
4950
items:
5051
- const: gce
5152

53+
iommus:
54+
maxItems: 1
55+
5256
required:
5357
- compatible
5458
- "#mbox-cells"

Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.yaml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ properties:
2626
- const: qcom,ipq6018-apcs-apps-global
2727
- items:
2828
- enum:
29+
- qcom,msm8226-apcs-kpss-global
2930
- qcom,qcs404-apcs-apps-global
3031
- const: qcom,msm8916-apcs-kpss-global
3132
- const: syscon

MAINTAINERS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14090,6 +14090,7 @@ MAILBOX API
1409014090
M: Jassi Brar <jassisinghbrar@gmail.com>
1409114091
L: linux-kernel@vger.kernel.org
1409214092
S: Maintained
14093+
T: git git://git.kernel.org/pub/scm/linux/kernel/git/jassibrar/mailbox.git for-next
1409314094
F: Documentation/devicetree/bindings/mailbox/
1409414095
F: drivers/mailbox/
1409514096
F: include/dt-bindings/mailbox/

drivers/mailbox/arm_mhu.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -153,7 +153,7 @@ static int mhu_probe(struct amba_device *adev, const struct amba_id *id)
153153
return 0;
154154
}
155155

156-
static struct amba_id mhu_ids[] = {
156+
static const struct amba_id mhu_ids[] = {
157157
{
158158
.id = 0x1bb098,
159159
.mask = 0xffffff,

drivers/mailbox/arm_mhu_db.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -328,7 +328,7 @@ static int mhu_db_probe(struct amba_device *adev, const struct amba_id *id)
328328
return 0;
329329
}
330330

331-
static struct amba_id mhu_ids[] = {
331+
static const struct amba_id mhu_ids[] = {
332332
{
333333
.id = 0x1bb098,
334334
.mask = 0xffffff,

drivers/mailbox/arm_mhuv2.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1107,7 +1107,7 @@ static void mhuv2_remove(struct amba_device *adev)
11071107
writel_relaxed(0x0, &mhu->send->access_request);
11081108
}
11091109

1110-
static struct amba_id mhuv2_ids[] = {
1110+
static const struct amba_id mhuv2_ids[] = {
11111111
{
11121112
/* 2.0 */
11131113
.id = 0xbb0d1,

drivers/mailbox/exynos-mailbox.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -57,7 +57,7 @@ static int exynos_mbox_send_data(struct mbox_chan *chan, void *data)
5757
if (msg->chan_type != EXYNOS_MBOX_CHAN_TYPE_DOORBELL) {
5858
dev_err(dev, "Unsupported channel type [%d]\n", msg->chan_type);
5959
return -EINVAL;
60-
};
60+
}
6161

6262
writel(BIT(msg->chan_id), exynos_mbox->regs + EXYNOS_MBOX_INTGR1);
6363

drivers/mailbox/mailbox.c

Lines changed: 10 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -6,18 +6,15 @@
66
* Author: Jassi Brar <jassisinghbrar@gmail.com>
77
*/
88

9-
#include <linux/interrupt.h>
10-
#include <linux/spinlock.h>
11-
#include <linux/mutex.h>
129
#include <linux/delay.h>
13-
#include <linux/slab.h>
14-
#include <linux/err.h>
15-
#include <linux/module.h>
1610
#include <linux/device.h>
17-
#include <linux/bitops.h>
11+
#include <linux/err.h>
1812
#include <linux/mailbox_client.h>
1913
#include <linux/mailbox_controller.h>
14+
#include <linux/module.h>
15+
#include <linux/mutex.h>
2016
#include <linux/of.h>
17+
#include <linux/spinlock.h>
2118

2219
#include "mailbox.h"
2320

@@ -413,15 +410,15 @@ struct mbox_chan *mbox_request_channel(struct mbox_client *cl, int index)
413410
return ERR_PTR(-ENODEV);
414411
}
415412

416-
mutex_lock(&con_mutex);
417-
418-
if (of_parse_phandle_with_args(dev->of_node, "mboxes",
419-
"#mbox-cells", index, &spec)) {
413+
ret = of_parse_phandle_with_args(dev->of_node, "mboxes", "#mbox-cells",
414+
index, &spec);
415+
if (ret) {
420416
dev_dbg(dev, "%s: can't parse \"mboxes\" property\n", __func__);
421-
mutex_unlock(&con_mutex);
422-
return ERR_PTR(-ENODEV);
417+
return ERR_PTR(ret);
423418
}
424419

420+
mutex_lock(&con_mutex);
421+
425422
chan = ERR_PTR(-EPROBE_DEFER);
426423
list_for_each_entry(mbox, &mbox_cons, node)
427424
if (mbox->dev->of_node == spec.np) {

drivers/mailbox/mailbox.h

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,8 @@
33
#ifndef __MAILBOX_H
44
#define __MAILBOX_H
55

6+
#include <linux/bits.h>
7+
68
#define TXDONE_BY_IRQ BIT(0) /* controller has remote RTR irq */
79
#define TXDONE_BY_POLL BIT(1) /* controller can read status of last TX */
810
#define TXDONE_BY_ACK BIT(2) /* S/W ACK received by Client ticks the TX */

0 commit comments

Comments
 (0)