From 94927676c741fe70d5270c92affdbc0cd4753fd3 Mon Sep 17 00:00:00 2001 From: Rob Herring Date: Mon, 27 Aug 2018 20:52:28 -0500 Subject: [PATCH 1/5] mailbox: Convert to using %pOFn instead of device_node.name In preparation to remove the node name pointer from struct device_node, convert printf users to use the %pOFn format specifier. Signed-off-by: Rob Herring Signed-off-by: Jassi Brar --- drivers/mailbox/ti-msgmgr.c | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/drivers/mailbox/ti-msgmgr.c b/drivers/mailbox/ti-msgmgr.c index 5bceafbf6699..713d701b6568 100644 --- a/drivers/mailbox/ti-msgmgr.c +++ b/drivers/mailbox/ti-msgmgr.c @@ -560,8 +560,8 @@ static struct mbox_chan *ti_msgmgr_of_xlate(struct mbox_controller *mbox, } err: - dev_err(inst->dev, "Queue ID %d, Proxy ID %d is wrong on %s\n", - req_qid, req_pid, p->np->name); + dev_err(inst->dev, "Queue ID %d, Proxy ID %d is wrong on %pOFn\n", + req_qid, req_pid, p->np); return ERR_PTR(-ENOENT); } From cfc0f7a8ea807bf318a1aa755a6a03d469e02725 Mon Sep 17 00:00:00 2001 From: Nishanth Menon Date: Mon, 27 Aug 2018 19:53:11 -0500 Subject: [PATCH 2/5] drivers: mailbox: Make ti-msgmr driver depend on ARCH_K3 ti-msgmr driver can support K3 platforms as well. Signed-off-by: Nishanth Menon Signed-off-by: Jassi Brar --- drivers/mailbox/Kconfig | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/drivers/mailbox/Kconfig b/drivers/mailbox/Kconfig index 841c005d8ebb..3eeb12e93e98 100644 --- a/drivers/mailbox/Kconfig +++ b/drivers/mailbox/Kconfig @@ -105,12 +105,12 @@ config STI_MBOX config TI_MESSAGE_MANAGER tristate "Texas Instruments Message Manager Driver" - depends on ARCH_KEYSTONE + depends on ARCH_KEYSTONE || ARCH_K3 help An implementation of Message Manager slave driver for Keystone - architecture SoCs from Texas Instruments. Message Manager is a - communication entity found on few of Texas Instrument's keystone - architecture SoCs. These may be used for communication between + and K3 architecture SoCs from Texas Instruments. Message Manager + is a communication entity found on few of Texas Instrument's keystone + and K3 architecture SoCs. These may be used for communication between multiple processors within the SoC. Select this driver if your platform has support for the hardware block. From 0a01fa940e7c1291476a65caecfbebf7beec1256 Mon Sep 17 00:00:00 2001 From: Bjorn Andersson Date: Wed, 19 Sep 2018 18:44:08 -0700 Subject: [PATCH 3/5] mailbox: qcom: Add QCS404 APPS Global compatible Add support for the QCS404 APPS Global block with IPC register at offset 8. Signed-off-by: Bjorn Andersson Reviewed-by: Vinod Koul Reviewed-by: Rob Herring Signed-off-by: Jassi Brar --- .../devicetree/bindings/mailbox/qcom,apcs-kpss-global.txt | 1 + drivers/mailbox/qcom-apcs-ipc-mailbox.c | 1 + 2 files changed, 2 insertions(+) diff --git a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.txt b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.txt index 6e8a9ab0fdae..1232fc9fc709 100644 --- a/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.txt +++ b/Documentation/devicetree/bindings/mailbox/qcom,apcs-kpss-global.txt @@ -11,6 +11,7 @@ platforms. "qcom,msm8916-apcs-kpss-global", "qcom,msm8996-apcs-hmss-global" "qcom,msm8998-apcs-hmss-global" + "qcom,qcs404-apcs-apps-global" "qcom,sdm845-apss-shared" - reg: diff --git a/drivers/mailbox/qcom-apcs-ipc-mailbox.c b/drivers/mailbox/qcom-apcs-ipc-mailbox.c index 333ed4a9d4b8..aed23ac9550d 100644 --- a/drivers/mailbox/qcom-apcs-ipc-mailbox.c +++ b/drivers/mailbox/qcom-apcs-ipc-mailbox.c @@ -126,6 +126,7 @@ static const struct of_device_id qcom_apcs_ipc_of_match[] = { { .compatible = "qcom,msm8916-apcs-kpss-global", .data = (void *)8 }, { .compatible = "qcom,msm8996-apcs-hmss-global", .data = (void *)16 }, { .compatible = "qcom,msm8998-apcs-hmss-global", .data = (void *)8 }, + { .compatible = "qcom,qcs404-apcs-apps-global", .data = (void *)8 }, { .compatible = "qcom,sdm845-apss-shared", .data = (void *)12 }, {} }; From 462f668e5c87e653a04de08e1de9a9ea86000164 Mon Sep 17 00:00:00 2001 From: Colin Ian King Date: Mon, 24 Sep 2018 17:42:48 +0100 Subject: [PATCH 4/5] mailbox: bcm-flexrm-mailbox: fix spelling mistake "toogle" -> "toggle" Trivial fix to spelling mistake in function name flexrm_flip_header_toogle, rename it to flexrm_flip_header_toggle. Signed-off-by: Colin Ian King Signed-off-by: Jassi Brar --- drivers/mailbox/bcm-flexrm-mailbox.c | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/drivers/mailbox/bcm-flexrm-mailbox.c b/drivers/mailbox/bcm-flexrm-mailbox.c index 8ab077ff58f4..d7a8ed7d8097 100644 --- a/drivers/mailbox/bcm-flexrm-mailbox.c +++ b/drivers/mailbox/bcm-flexrm-mailbox.c @@ -375,7 +375,7 @@ static u32 flexrm_estimate_header_desc_count(u32 nhcnt) return hcnt; } -static void flexrm_flip_header_toogle(void *desc_ptr) +static void flexrm_flip_header_toggle(void *desc_ptr) { u64 desc = flexrm_read_desc(desc_ptr); @@ -709,7 +709,7 @@ static void *flexrm_spu_write_descs(struct brcm_message *msg, u32 nhcnt, wmb(); /* Flip toggle bit in header */ - flexrm_flip_header_toogle(orig_desc_ptr); + flexrm_flip_header_toggle(orig_desc_ptr); return desc_ptr; } @@ -838,7 +838,7 @@ static void *flexrm_sba_write_descs(struct brcm_message *msg, u32 nhcnt, wmb(); /* Flip toggle bit in header */ - flexrm_flip_header_toogle(orig_desc_ptr); + flexrm_flip_header_toggle(orig_desc_ptr); return desc_ptr; } From 9f0a0a381c5db56e7922dbeea6831f27db58372f Mon Sep 17 00:00:00 2001 From: Houlong Wei Date: Tue, 21 Aug 2018 18:22:44 +0800 Subject: [PATCH 5/5] mailbox: mediatek: Add check for possible failure of kzalloc The patch 623a6143a845("mailbox: mediatek: Add Mediatek CMDQ driver") introduce the following static checker warning: drivers/mailbox/mtk-cmdq-mailbox.c:366 cmdq_mbox_send_data() error: potential null dereference 'task'. (kzalloc returns null) Fixes: 623a6143a845 ("mailbox: mediatek: Add Mediatek CMDQ driver") Reported-by: Dan Carpenter Signed-off-by: Houlong Wei Reviewed-by: Philipp Zabel Signed-off-by: Jassi Brar --- drivers/mailbox/mtk-cmdq-mailbox.c | 3 +++ 1 file changed, 3 insertions(+) diff --git a/drivers/mailbox/mtk-cmdq-mailbox.c b/drivers/mailbox/mtk-cmdq-mailbox.c index aec46d5d3506..f7cc29c00302 100644 --- a/drivers/mailbox/mtk-cmdq-mailbox.c +++ b/drivers/mailbox/mtk-cmdq-mailbox.c @@ -363,6 +363,9 @@ static int cmdq_mbox_send_data(struct mbox_chan *chan, void *data) WARN_ON(cmdq->suspended); task = kzalloc(sizeof(*task), GFP_ATOMIC); + if (!task) + return -ENOMEM; + task->cmdq = cmdq; INIT_LIST_HEAD(&task->list_entry); task->pa_base = pkt->pa_base;