Skip to content

Commit 3361e9a

Browse files
committed
Merge tag 'rproc-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux
Pull remoteproc updates from Bjorn Andersson: - Unnecessary type casts from the 'void *' rproc->priv pointer are dropped throughout the subsystem. - A kernel-doc error is corrected in the Mediatek SCPI IPI implementation - The firmware loading onto the IMX DSP remote processors is reworked to avoid non-32bit memory operations. A module parameter is introduced to assist development of firmware without communication abilities in place. Error paths in imx_dsp_rproc_mbox_alloc() is cleaned up - The cluster configuration handling in the TI K3 R5 driver is corrected and support for the single-R5 core found in the TI AM62x SoC family is introduced - The TI PRU driver device- to virtual-address translation is updated to avoid compiler warning about the unsigned device-address always being larger than 0 - The ST remoteproc driver is transitioned to use of_property_present() - Issues with kicks arriving after the STM32 remote processor has been shut down are mitigated by checking the processor's state before handling them. - Support for mailbox channels for communication with the remote processors are added to the Xilinx R5 remoteproc driver. The naming of carveouts are corrected and their parsing is reworked. For this a couple of fixes targeting the mailbox subsystem are picked up here as well. - Reference counting of of_nodes are corrected in the ST, STM32, RCAR and IMX remoteproc drivers * tag 'rproc-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (24 commits) remoteproc: st: Use of_property_present() for testing DT property presence dt-bindings: remoteproc: Drop unneeded quotes remoteproc: imx_dsp_rproc: Fix kernel test robot sparse warning remoteproc: imx_dsp_rproc: Improve exception handling in imx_dsp_rproc_mbox_alloc() remoteproc: pru: Remove always true check positive unsigned value dt-bindings: remoteproc: stm32-rproc: Typo fix remoteproc: stm32_rproc: Add mutex protection for workqueue remoteproc: Remove unnecessary (void*) conversions remoteproc: imx_dsp_rproc: Call of_node_put() on iteration error remoteproc: imx_rproc: Call of_node_put() on iteration error remoteproc: rcar_rproc: Call of_node_put() on iteration error remoteproc: st: Call of_node_put() on iteration error remoteproc: stm32: Call of_node_put() on iteration error remoteproc: k3-r5: Use separate compatible string for TI AM62x SoC family dt-bindings: remoteproc: ti: Add new compatible for AM62 SoC family remoteproc: k3-r5: Simplify cluster mode setting usage remoteproc/mtk_scpi_ipi: Fix one kernel-doc comment remoteproc: xilinx: Add mailbox channels for rpmsg drivers: remoteproc: xilinx: Fix carveout names mailbox: zynqmp: Fix typo in IPI documentation ...
2 parents fe89e9b + 1f6fa39 commit 3361e9a

25 files changed

Lines changed: 710 additions & 229 deletions

Documentation/devicetree/bindings/remoteproc/amlogic,meson-mx-ao-arc.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
22
%YAML 1.2
33
---
4-
$id: "http://devicetree.org/schemas/remoteproc/amlogic,meson-mx-ao-arc.yaml#"
5-
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
4+
$id: http://devicetree.org/schemas/remoteproc/amlogic,meson-mx-ao-arc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

77
title: Amlogic Meson AO ARC Remote Processor
88

Documentation/devicetree/bindings/remoteproc/fsl,imx-rproc.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
22
%YAML 1.2
33
---
4-
$id: "http://devicetree.org/schemas/remoteproc/fsl,imx-rproc.yaml#"
5-
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
4+
$id: http://devicetree.org/schemas/remoteproc/fsl,imx-rproc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

77
title: NXP i.MX Co-Processor
88

Documentation/devicetree/bindings/remoteproc/ingenic,vpu.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
22
%YAML 1.2
33
---
4-
$id: "http://devicetree.org/schemas/remoteproc/ingenic,vpu.yaml#"
5-
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
4+
$id: http://devicetree.org/schemas/remoteproc/ingenic,vpu.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

77
title: Ingenic Video Processing Unit
88

Documentation/devicetree/bindings/remoteproc/qcom,glink-edge.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ description:
1515

1616
properties:
1717
$nodename:
18-
const: "glink-edge"
18+
const: glink-edge
1919

2020
apr:
2121
$ref: /schemas/soc/qcom/qcom,apr.yaml#

Documentation/devicetree/bindings/remoteproc/qcom,smd-edge.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ description:
2121

2222
properties:
2323
$nodename:
24-
const: "smd-edge"
24+
const: smd-edge
2525

2626
apr:
2727
$ref: /schemas/soc/qcom/qcom,apr.yaml#

Documentation/devicetree/bindings/remoteproc/renesas,rcar-rproc.yaml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
22
%YAML 1.2
33
---
4-
$id: "http://devicetree.org/schemas/remoteproc/renesas,rcar-rproc.yaml#"
5-
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
4+
$id: http://devicetree.org/schemas/remoteproc/renesas,rcar-rproc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

77
title: Renesas R-Car remote processor controller
88

Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml

Lines changed: 9 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
22
%YAML 1.2
33
---
4-
$id: "http://devicetree.org/schemas/remoteproc/st,stm32-rproc.yaml#"
5-
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
4+
$id: http://devicetree.org/schemas/remoteproc/st,stm32-rproc.yaml#
5+
$schema: http://devicetree.org/meta-schemas/core.yaml#
66

77
title: STMicroelectronics STM32 remote processor controller
88

@@ -29,7 +29,7 @@ properties:
2929

3030
st,syscfg-holdboot:
3131
description: remote processor reset hold boot
32-
$ref: "/schemas/types.yaml#/definitions/phandle-array"
32+
$ref: /schemas/types.yaml#/definitions/phandle-array
3333
items:
3434
- items:
3535
- description: Phandle of syscon block
@@ -39,7 +39,7 @@ properties:
3939
st,syscfg-tz:
4040
description:
4141
Reference to the system configuration which holds the RCC trust zone mode
42-
$ref: "/schemas/types.yaml#/definitions/phandle-array"
42+
$ref: /schemas/types.yaml#/definitions/phandle-array
4343
items:
4444
- items:
4545
- description: Phandle of syscon block
@@ -72,9 +72,9 @@ properties:
7272
ready for shutdown
7373
- description: |
7474
A channel (d) used by the local proc to notify the remote proc that it
75-
has to stop interprocessor communnication.
75+
has to stop interprocessor communication.
7676
Unidirectional channel:
77-
- from local to remote, where ACK from the remote means that communnication
77+
- from local to remote, where ACK from the remote means that communication
7878
as been stopped on the remote side.
7979
minItems: 1
8080

@@ -95,7 +95,7 @@ properties:
9595
(see ../reserved-memory/reserved-memory.txt)
9696

9797
st,syscfg-pdds:
98-
$ref: "/schemas/types.yaml#/definitions/phandle-array"
98+
$ref: /schemas/types.yaml#/definitions/phandle-array
9999
description: |
100100
Reference to the system configuration which holds the remote
101101
items:
@@ -105,7 +105,7 @@ properties:
105105
- description: The field mask of the PDDS selection
106106

107107
st,syscfg-m4-state:
108-
$ref: "/schemas/types.yaml#/definitions/phandle-array"
108+
$ref: /schemas/types.yaml#/definitions/phandle-array
109109
description: |
110110
Reference to the tamp register which exposes the Cortex-M4 state.
111111
items:
@@ -115,7 +115,7 @@ properties:
115115
- description: The field mask of the Cortex-M4 state
116116

117117
st,syscfg-rsc-tbl:
118-
$ref: "/schemas/types.yaml#/definitions/phandle-array"
118+
$ref: /schemas/types.yaml#/definitions/phandle-array
119119
description: |
120120
Reference to the tamp register which references the Cortex-M4
121121
resource table address.

Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml

Lines changed: 55 additions & 21 deletions
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,9 @@ description: |
2121
called "Single-CPU" mode, where only Core0 is used, but with ability to use
2222
Core1's TCMs as well.
2323
24+
AM62 SoC family support a single R5F core only which runs Device Manager
25+
firmware and can also be used as a remote processor with IPC communication.
26+
2427
Each Dual-Core R5F sub-system is represented as a single DTS node
2528
representing the cluster, with a pair of child DT nodes representing
2629
the individual R5F cores. Each node has a number of required or optional
@@ -34,10 +37,11 @@ properties:
3437

3538
compatible:
3639
enum:
40+
- ti,am62-r5fss
41+
- ti,am64-r5fss
3742
- ti,am654-r5fss
38-
- ti,j721e-r5fss
3943
- ti,j7200-r5fss
40-
- ti,am64-r5fss
44+
- ti,j721e-r5fss
4145
- ti,j721s2-r5fss
4246

4347
power-domains:
@@ -64,10 +68,17 @@ properties:
6468
$ref: /schemas/types.yaml#/definitions/uint32
6569
description: |
6670
Configuration Mode for the Dual R5F cores within the R5F cluster.
67-
Should be either a value of 1 (LockStep mode) or 0 (Split mode) on
71+
For most SoCs (AM65x, J721E, J7200, J721s2),
72+
It should be either a value of 1 (LockStep mode) or 0 (Split mode) on
6873
most SoCs (AM65x, J721E, J7200, J721s2), default is LockStep mode if
69-
omitted; and should be either a value of 0 (Split mode) or 2
70-
(Single-CPU mode) on AM64x SoCs, default is Split mode if omitted.
74+
omitted.
75+
For AM64x SoCs,
76+
It should be either a value of 0 (Split mode) or 2 (Single-CPU mode) and
77+
default is Split mode if omitted.
78+
For AM62x SoCs,
79+
It should be set as 3 (Single-Core mode) which is also the default if
80+
omitted.
81+
7182
7283
# R5F Processor Child Nodes:
7384
# ==========================
@@ -80,7 +91,9 @@ patternProperties:
8091
node representing a TI instantiation of the Arm Cortex R5F core. There
8192
are some specific integration differences for the IP like the usage of
8293
a Region Address Translator (RAT) for translating the larger SoC bus
83-
addresses into a 32-bit address space for the processor.
94+
addresses into a 32-bit address space for the processor. For AM62x,
95+
the R5F Sub-System device node should only define one R5F child node
96+
as it has only one core available.
8497
8598
Each R5F core has an associated 64 KB of Tightly-Coupled Memory (TCM)
8699
internal memories split between two banks - TCMA and TCMB (further
@@ -100,10 +113,11 @@ patternProperties:
100113
properties:
101114
compatible:
102115
enum:
116+
- ti,am62-r5f
117+
- ti,am64-r5f
103118
- ti,am654-r5f
104-
- ti,j721e-r5f
105119
- ti,j7200-r5f
106-
- ti,am64-r5f
120+
- ti,j721e-r5f
107121
- ti,j721s2-r5f
108122

109123
reg:
@@ -208,19 +222,39 @@ patternProperties:
208222

209223
unevaluatedProperties: false
210224

211-
if:
212-
properties:
213-
compatible:
214-
enum:
215-
- ti,am64-r5fss
216-
then:
217-
properties:
218-
ti,cluster-mode:
219-
enum: [0, 2]
220-
else:
221-
properties:
222-
ti,cluster-mode:
223-
enum: [0, 1]
225+
allOf:
226+
- if:
227+
properties:
228+
compatible:
229+
enum:
230+
- ti,am64-r5fss
231+
then:
232+
properties:
233+
ti,cluster-mode:
234+
enum: [0, 2]
235+
236+
- if:
237+
properties:
238+
compatible:
239+
enum:
240+
- ti,am654-r5fss
241+
- ti,j7200-r5fss
242+
- ti,j721e-r5fss
243+
- ti,j721s2-r5fss
244+
then:
245+
properties:
246+
ti,cluster-mode:
247+
enum: [0, 1]
248+
249+
- if:
250+
properties:
251+
compatible:
252+
enum:
253+
- ti,am62-r5fss
254+
then:
255+
properties:
256+
ti,cluster-mode:
257+
enum: [3]
224258

225259
required:
226260
- compatible

drivers/mailbox/zynqmp-ipi-mailbox.c

Lines changed: 9 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -152,7 +152,7 @@ static irqreturn_t zynqmp_ipi_interrupt(int irq, void *data)
152152
struct zynqmp_ipi_message *msg;
153153
u64 arg0, arg3;
154154
struct arm_smccc_res res;
155-
int ret, i;
155+
int ret, i, status = IRQ_NONE;
156156

157157
(void)irq;
158158
arg0 = SMC_IPI_MAILBOX_STATUS_ENQUIRY;
@@ -170,11 +170,11 @@ static irqreturn_t zynqmp_ipi_interrupt(int irq, void *data)
170170
memcpy_fromio(msg->data, mchan->req_buf,
171171
msg->len);
172172
mbox_chan_received_data(chan, (void *)msg);
173-
return IRQ_HANDLED;
173+
status = IRQ_HANDLED;
174174
}
175175
}
176176
}
177-
return IRQ_NONE;
177+
return status;
178178
}
179179

180180
/**
@@ -634,7 +634,12 @@ static int zynqmp_ipi_probe(struct platform_device *pdev)
634634
struct zynqmp_ipi_mbox *mbox;
635635
int num_mboxes, ret = -EINVAL;
636636

637-
num_mboxes = of_get_child_count(np);
637+
num_mboxes = of_get_available_child_count(np);
638+
if (num_mboxes == 0) {
639+
dev_err(dev, "mailbox nodes not available\n");
640+
return -EINVAL;
641+
}
642+
638643
pdata = devm_kzalloc(dev, struct_size(pdata, ipi_mboxes, num_mboxes),
639644
GFP_KERNEL);
640645
if (!pdata)

drivers/remoteproc/da8xx_remoteproc.c

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -84,7 +84,7 @@ struct da8xx_rproc {
8484
*/
8585
static irqreturn_t handle_event(int irq, void *p)
8686
{
87-
struct rproc *rproc = (struct rproc *)p;
87+
struct rproc *rproc = p;
8888

8989
/* Process incoming buffers on all our vrings */
9090
rproc_vq_interrupt(rproc, 0);
@@ -104,8 +104,8 @@ static irqreturn_t handle_event(int irq, void *p)
104104
*/
105105
static irqreturn_t da8xx_rproc_callback(int irq, void *p)
106106
{
107-
struct rproc *rproc = (struct rproc *)p;
108-
struct da8xx_rproc *drproc = (struct da8xx_rproc *)rproc->priv;
107+
struct rproc *rproc = p;
108+
struct da8xx_rproc *drproc = rproc->priv;
109109
u32 chipsig;
110110

111111
chipsig = readl(drproc->chipsig);
@@ -133,7 +133,7 @@ static irqreturn_t da8xx_rproc_callback(int irq, void *p)
133133
static int da8xx_rproc_start(struct rproc *rproc)
134134
{
135135
struct device *dev = rproc->dev.parent;
136-
struct da8xx_rproc *drproc = (struct da8xx_rproc *)rproc->priv;
136+
struct da8xx_rproc *drproc = rproc->priv;
137137
struct clk *dsp_clk = drproc->dsp_clk;
138138
struct reset_control *dsp_reset = drproc->dsp_reset;
139139
int ret;
@@ -183,7 +183,7 @@ static int da8xx_rproc_stop(struct rproc *rproc)
183183
/* kick a virtqueue */
184184
static void da8xx_rproc_kick(struct rproc *rproc, int vqid)
185185
{
186-
struct da8xx_rproc *drproc = (struct da8xx_rproc *)rproc->priv;
186+
struct da8xx_rproc *drproc = rproc->priv;
187187

188188
/* Interrupt remote proc */
189189
writel(SYSCFG_CHIPSIG2, drproc->chipsig);
@@ -360,7 +360,7 @@ static int da8xx_rproc_probe(struct platform_device *pdev)
360360
static int da8xx_rproc_remove(struct platform_device *pdev)
361361
{
362362
struct rproc *rproc = platform_get_drvdata(pdev);
363-
struct da8xx_rproc *drproc = (struct da8xx_rproc *)rproc->priv;
363+
struct da8xx_rproc *drproc = rproc->priv;
364364
struct device *dev = &pdev->dev;
365365

366366
/*

0 commit comments

Comments
 (0)