Skip to content

Commit

Permalink
Merge tag 'rproc-v6.4' of git://git.kernel.org/pub/scm/linux/kernel/g…
Browse files Browse the repository at this point in the history
…it/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
  ...
  • Loading branch information
torvalds committed Apr 26, 2023
2 parents fe89e9b + 1f6fa39 commit 3361e9a
Show file tree
Hide file tree
Showing 25 changed files with 710 additions and 229 deletions.
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# SPDX-License-Identifier: (GPL-2.0-only OR BSD-2-Clause)
%YAML 1.2
---
$id: "http://devicetree.org/schemas/remoteproc/amlogic,meson-mx-ao-arc.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
$id: http://devicetree.org/schemas/remoteproc/amlogic,meson-mx-ao-arc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Amlogic Meson AO ARC Remote Processor

Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: "http://devicetree.org/schemas/remoteproc/fsl,imx-rproc.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
$id: http://devicetree.org/schemas/remoteproc/fsl,imx-rproc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: NXP i.MX Co-Processor

Expand Down
4 changes: 2 additions & 2 deletions Documentation/devicetree/bindings/remoteproc/ingenic,vpu.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: "http://devicetree.org/schemas/remoteproc/ingenic,vpu.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
$id: http://devicetree.org/schemas/remoteproc/ingenic,vpu.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Ingenic Video Processing Unit

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ description:

properties:
$nodename:
const: "glink-edge"
const: glink-edge

apr:
$ref: /schemas/soc/qcom/qcom,apr.yaml#
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ description:

properties:
$nodename:
const: "smd-edge"
const: smd-edge

apr:
$ref: /schemas/soc/qcom/qcom,apr.yaml#
Expand Down
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: "http://devicetree.org/schemas/remoteproc/renesas,rcar-rproc.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
$id: http://devicetree.org/schemas/remoteproc/renesas,rcar-rproc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: Renesas R-Car remote processor controller

Expand Down
18 changes: 9 additions & 9 deletions Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
# SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause)
%YAML 1.2
---
$id: "http://devicetree.org/schemas/remoteproc/st,stm32-rproc.yaml#"
$schema: "http://devicetree.org/meta-schemas/core.yaml#"
$id: http://devicetree.org/schemas/remoteproc/st,stm32-rproc.yaml#
$schema: http://devicetree.org/meta-schemas/core.yaml#

title: STMicroelectronics STM32 remote processor controller

Expand All @@ -29,7 +29,7 @@ properties:

st,syscfg-holdboot:
description: remote processor reset hold boot
$ref: "/schemas/types.yaml#/definitions/phandle-array"
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
- items:
- description: Phandle of syscon block
Expand All @@ -39,7 +39,7 @@ properties:
st,syscfg-tz:
description:
Reference to the system configuration which holds the RCC trust zone mode
$ref: "/schemas/types.yaml#/definitions/phandle-array"
$ref: /schemas/types.yaml#/definitions/phandle-array
items:
- items:
- description: Phandle of syscon block
Expand Down Expand Up @@ -72,9 +72,9 @@ properties:
ready for shutdown
- description: |
A channel (d) used by the local proc to notify the remote proc that it
has to stop interprocessor communnication.
has to stop interprocessor communication.
Unidirectional channel:
- from local to remote, where ACK from the remote means that communnication
- from local to remote, where ACK from the remote means that communication
as been stopped on the remote side.
minItems: 1

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

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

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

st,syscfg-rsc-tbl:
$ref: "/schemas/types.yaml#/definitions/phandle-array"
$ref: /schemas/types.yaml#/definitions/phandle-array
description: |
Reference to the tamp register which references the Cortex-M4
resource table address.
Expand Down
76 changes: 55 additions & 21 deletions Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,9 @@ description: |
called "Single-CPU" mode, where only Core0 is used, but with ability to use
Core1's TCMs as well.
AM62 SoC family support a single R5F core only which runs Device Manager
firmware and can also be used as a remote processor with IPC communication.
Each Dual-Core R5F sub-system is represented as a single DTS node
representing the cluster, with a pair of child DT nodes representing
the individual R5F cores. Each node has a number of required or optional
Expand All @@ -34,10 +37,11 @@ properties:

compatible:
enum:
- ti,am62-r5fss
- ti,am64-r5fss
- ti,am654-r5fss
- ti,j721e-r5fss
- ti,j7200-r5fss
- ti,am64-r5fss
- ti,j721e-r5fss
- ti,j721s2-r5fss

power-domains:
Expand All @@ -64,10 +68,17 @@ properties:
$ref: /schemas/types.yaml#/definitions/uint32
description: |
Configuration Mode for the Dual R5F cores within the R5F cluster.
Should be either a value of 1 (LockStep mode) or 0 (Split mode) on
For most SoCs (AM65x, J721E, J7200, J721s2),
It should be either a value of 1 (LockStep mode) or 0 (Split mode) on
most SoCs (AM65x, J721E, J7200, J721s2), default is LockStep mode if
omitted; and should be either a value of 0 (Split mode) or 2
(Single-CPU mode) on AM64x SoCs, default is Split mode if omitted.
omitted.
For AM64x SoCs,
It should be either a value of 0 (Split mode) or 2 (Single-CPU mode) and
default is Split mode if omitted.
For AM62x SoCs,
It should be set as 3 (Single-Core mode) which is also the default if
omitted.
# R5F Processor Child Nodes:
# ==========================
Expand All @@ -80,7 +91,9 @@ patternProperties:
node representing a TI instantiation of the Arm Cortex R5F core. There
are some specific integration differences for the IP like the usage of
a Region Address Translator (RAT) for translating the larger SoC bus
addresses into a 32-bit address space for the processor.
addresses into a 32-bit address space for the processor. For AM62x,
the R5F Sub-System device node should only define one R5F child node
as it has only one core available.
Each R5F core has an associated 64 KB of Tightly-Coupled Memory (TCM)
internal memories split between two banks - TCMA and TCMB (further
Expand All @@ -100,10 +113,11 @@ patternProperties:
properties:
compatible:
enum:
- ti,am62-r5f
- ti,am64-r5f
- ti,am654-r5f
- ti,j721e-r5f
- ti,j7200-r5f
- ti,am64-r5f
- ti,j721e-r5f
- ti,j721s2-r5f

reg:
Expand Down Expand Up @@ -208,19 +222,39 @@ patternProperties:

unevaluatedProperties: false

if:
properties:
compatible:
enum:
- ti,am64-r5fss
then:
properties:
ti,cluster-mode:
enum: [0, 2]
else:
properties:
ti,cluster-mode:
enum: [0, 1]
allOf:
- if:
properties:
compatible:
enum:
- ti,am64-r5fss
then:
properties:
ti,cluster-mode:
enum: [0, 2]

- if:
properties:
compatible:
enum:
- ti,am654-r5fss
- ti,j7200-r5fss
- ti,j721e-r5fss
- ti,j721s2-r5fss
then:
properties:
ti,cluster-mode:
enum: [0, 1]

- if:
properties:
compatible:
enum:
- ti,am62-r5fss
then:
properties:
ti,cluster-mode:
enum: [3]

required:
- compatible
Expand Down
13 changes: 9 additions & 4 deletions drivers/mailbox/zynqmp-ipi-mailbox.c
Original file line number Diff line number Diff line change
Expand Up @@ -152,7 +152,7 @@ static irqreturn_t zynqmp_ipi_interrupt(int irq, void *data)
struct zynqmp_ipi_message *msg;
u64 arg0, arg3;
struct arm_smccc_res res;
int ret, i;
int ret, i, status = IRQ_NONE;

(void)irq;
arg0 = SMC_IPI_MAILBOX_STATUS_ENQUIRY;
Expand All @@ -170,11 +170,11 @@ static irqreturn_t zynqmp_ipi_interrupt(int irq, void *data)
memcpy_fromio(msg->data, mchan->req_buf,
msg->len);
mbox_chan_received_data(chan, (void *)msg);
return IRQ_HANDLED;
status = IRQ_HANDLED;
}
}
}
return IRQ_NONE;
return status;
}

/**
Expand Down Expand Up @@ -634,7 +634,12 @@ static int zynqmp_ipi_probe(struct platform_device *pdev)
struct zynqmp_ipi_mbox *mbox;
int num_mboxes, ret = -EINVAL;

num_mboxes = of_get_child_count(np);
num_mboxes = of_get_available_child_count(np);
if (num_mboxes == 0) {
dev_err(dev, "mailbox nodes not available\n");
return -EINVAL;
}

pdata = devm_kzalloc(dev, struct_size(pdata, ipi_mboxes, num_mboxes),
GFP_KERNEL);
if (!pdata)
Expand Down
12 changes: 6 additions & 6 deletions drivers/remoteproc/da8xx_remoteproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ struct da8xx_rproc {
*/
static irqreturn_t handle_event(int irq, void *p)
{
struct rproc *rproc = (struct rproc *)p;
struct rproc *rproc = p;

/* Process incoming buffers on all our vrings */
rproc_vq_interrupt(rproc, 0);
Expand All @@ -104,8 +104,8 @@ static irqreturn_t handle_event(int irq, void *p)
*/
static irqreturn_t da8xx_rproc_callback(int irq, void *p)
{
struct rproc *rproc = (struct rproc *)p;
struct da8xx_rproc *drproc = (struct da8xx_rproc *)rproc->priv;
struct rproc *rproc = p;
struct da8xx_rproc *drproc = rproc->priv;
u32 chipsig;

chipsig = readl(drproc->chipsig);
Expand Down Expand Up @@ -133,7 +133,7 @@ static irqreturn_t da8xx_rproc_callback(int irq, void *p)
static int da8xx_rproc_start(struct rproc *rproc)
{
struct device *dev = rproc->dev.parent;
struct da8xx_rproc *drproc = (struct da8xx_rproc *)rproc->priv;
struct da8xx_rproc *drproc = rproc->priv;
struct clk *dsp_clk = drproc->dsp_clk;
struct reset_control *dsp_reset = drproc->dsp_reset;
int ret;
Expand Down Expand Up @@ -183,7 +183,7 @@ static int da8xx_rproc_stop(struct rproc *rproc)
/* kick a virtqueue */
static void da8xx_rproc_kick(struct rproc *rproc, int vqid)
{
struct da8xx_rproc *drproc = (struct da8xx_rproc *)rproc->priv;
struct da8xx_rproc *drproc = rproc->priv;

/* Interrupt remote proc */
writel(SYSCFG_CHIPSIG2, drproc->chipsig);
Expand Down Expand Up @@ -360,7 +360,7 @@ static int da8xx_rproc_probe(struct platform_device *pdev)
static int da8xx_rproc_remove(struct platform_device *pdev)
{
struct rproc *rproc = platform_get_drvdata(pdev);
struct da8xx_rproc *drproc = (struct da8xx_rproc *)rproc->priv;
struct da8xx_rproc *drproc = rproc->priv;
struct device *dev = &pdev->dev;

/*
Expand Down
Loading

0 comments on commit 3361e9a

Please sign in to comment.