Commit 60c6119c authored by Linus Torvalds's avatar Linus Torvalds
Browse files
Pull remoteproc updates from Bjorn Andersson:

 - The maximum amount of DDR memory used by the Mediatek MT8188/MT8195
   SCP is increased to handle new use cases. Handling of optional L1TCM
   memory is made actually optional.

 - An optimization is introduced to only clear the unused portion of IPI
   shared buffers, rather than the entire buffer before writing the
   message.

 - Detection for IPC-only mode in the TI K3 DSP remoteproc driver is
   corrected. The loglevel of a debug print in the same is lowered from
   error.

 - Support for attaching to an running remote processor is added to the
   Xilinx R5F.

 - An in-kernel implementation of the Qualcomm "protected domain mapper"
   (aka service registry) service is introduced, to remove the
   dependency on a userspace implementation to detect when the battery
   monitor and USB Type-C port manager becomes available. This is then
   integrated with the Qualcomm remoteproc driver.

 - The Qualcomm PAS remoteproc driver gains support for attempting to
   bust hwspinlocks held by the remote processor when it
   crashed/stopped.

 - The TI OMAP remoteproc driver is transitioned to use devres helpers
   for various forms of allocations.

 - Parsing of memory-regions in the i.MX remoteproc driver is improved
   to avoid a NULL pointer dereference if the phandle reference is
   empty. of_node reference counting is corrected in the same.

* tag 'rproc-v6.11' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux:
  remoteproc: mediatek: Increase MT8188/MT8195 SCP core0 DRAM size
  remoteproc: k3-dsp: Fix log levels where appropriate
  remoteproc: xlnx: Add attach detach support
  remoteproc: qcom: select AUXILIARY_BUS
  remoteproc: k3-r5: Fix IPC-only mode detection
  remoteproc: mediatek: Don't attempt to remap l1tcm memory if missing
  remoteproc: qcom: enable in-kernel PD mapper
  dt-bindings: remoteproc: imx_rproc: Add minItems for power-domain
  remoteproc: imx_rproc: Fix refcount mistake in imx_rproc_addr_init
  remoteproc: omap: Use devm_rproc_add() helper
  remoteproc: omap: Use devm action to release reserved memory
  remoteproc: omap: Use devm_rproc_alloc() helper
  remoteproc: imx_rproc: Skip over memory region when node value is NULL
  dt-bindings: remoteproc: k3-dsp: Correct optional sram properties for AM62A SoCs
  remoteproc: qcom_q6v5_pas: Add hwspinlock bust on stop
  soc: qcom: smem: Add qcom_smem_bust_hwspin_lock_by_host()
  remoteproc: mediatek: Zero out only remaining bytes of IPI buffer
parents 58bffbac 19cb6058
Loading
Loading
Loading
Loading
+15 −0
Original line number Diff line number Diff line
@@ -59,6 +59,7 @@ properties:
    maxItems: 32

  power-domains:
    minItems: 2
    maxItems: 8

  fsl,auto-boot:
@@ -99,6 +100,20 @@ allOf:
      properties:
        fsl,iomuxc-gpr: false

  - if:
      properties:
        compatible:
          contains:
            enum:
              - fsl,imx8qxp-cm4
              - fsl,imx8qm-cm4
    then:
      required:
        - power-domains
    else:
      properties:
        power-domains: false

additionalProperties: false

examples:
+51 −38
Original line number Diff line number Diff line
@@ -25,9 +25,6 @@ description: |
  host processor (Arm CorePac) to perform the device management of the remote
  processor and to communicate with the remote processor.

allOf:
  - $ref: /schemas/arm/keystone/ti,k3-sci-common.yaml#

properties:
  compatible:
    enum:
@@ -89,7 +86,8 @@ properties:
      should be defined as per the generic bindings in,
      Documentation/devicetree/bindings/sram/sram.yaml

if:
allOf:
  - if:
      properties:
        compatible:
          enum:
@@ -106,12 +104,11 @@ then:
            - const: l2sram
            - const: l1pram
            - const: l1dram
else:
  if:

  - if:
      properties:
        compatible:
          enum:
          - ti,am62a-c7xv-dsp
            - ti,j721e-c71-dsp
            - ti,j721s2-c71-dsp
    then:
@@ -125,6 +122,22 @@ else:
            - const: l2sram
            - const: l1dram

  - if:
      properties:
        compatible:
          enum:
            - ti,am62a-c7xv-dsp
    then:
      properties:
        reg:
          items:
            - description: Address and Size of the L2 SRAM internal memory region
        reg-names:
          items:
            - const: l2sram

  - $ref: /schemas/arm/keystone/ti,k3-sci-common.yaml#

required:
  - compatible
  - reg
+1 −0
Original line number Diff line number Diff line
@@ -166,6 +166,7 @@ config QCOM_PIL_INFO

config QCOM_RPROC_COMMON
	tristate
	select AUXILIARY_BUS

config QCOM_Q6V5_COMMON
	tristate
+8 −2
Original line number Diff line number Diff line
@@ -726,31 +726,37 @@ static int imx_rproc_addr_init(struct imx_rproc *priv,
		struct resource res;

		node = of_parse_phandle(np, "memory-region", a);
		if (!node)
			continue;
		/* Not map vdevbuffer, vdevring region */
		if (!strncmp(node->name, "vdev", strlen("vdev"))) {
			of_node_put(node);
			continue;
		}
		err = of_address_to_resource(node, 0, &res);
		of_node_put(node);
		if (err) {
			dev_err(dev, "unable to resolve memory region\n");
			of_node_put(node);
			return err;
		}

		if (b >= IMX_RPROC_MEM_MAX)
		if (b >= IMX_RPROC_MEM_MAX) {
			of_node_put(node);
			break;
		}

		/* Not use resource version, because we might share region */
		priv->mem[b].cpu_addr = devm_ioremap_wc(&pdev->dev, res.start, resource_size(&res));
		if (!priv->mem[b].cpu_addr) {
			dev_err(dev, "failed to remap %pr\n", &res);
			of_node_put(node);
			return -ENOMEM;
		}
		priv->mem[b].sys_addr = res.start;
		priv->mem[b].size = resource_size(&res);
		if (!strcmp(node->name, "rsc-table"))
			priv->rsc_table = priv->mem[b].cpu_addr;
		of_node_put(node);
		b++;
	}

+13 −10
Original line number Diff line number Diff line
@@ -117,8 +117,8 @@ static void scp_ipi_handler(struct mtk_scp *scp)
		return;
	}

	memset(scp->share_buf, 0, scp_sizes->ipi_share_buffer_size);
	memcpy_fromio(scp->share_buf, &rcv_obj->share_buf, len);
	memset(&scp->share_buf[len], 0, scp_sizes->ipi_share_buffer_size - len);
	handler(scp->share_buf, len, ipi_desc[id].priv);
	scp_ipi_unlock(scp, id);

@@ -1344,14 +1344,12 @@ static int scp_probe(struct platform_device *pdev)

	/* l1tcm is an optional memory region */
	res = platform_get_resource_byname(pdev, IORESOURCE_MEM, "l1tcm");
	if (res) {
		scp_cluster->l1tcm_base = devm_ioremap_resource(dev, res);
	if (IS_ERR(scp_cluster->l1tcm_base)) {
		ret = PTR_ERR(scp_cluster->l1tcm_base);
		if (ret != -EINVAL)
			return dev_err_probe(dev, ret, "Failed to map l1tcm memory\n");
		if (IS_ERR(scp_cluster->l1tcm_base))
			return dev_err_probe(dev, PTR_ERR(scp_cluster->l1tcm_base),
					     "Failed to map l1tcm memory\n");

		scp_cluster->l1tcm_base = NULL;
	} else {
		scp_cluster->l1tcm_size = resource_size(res);
		scp_cluster->l1tcm_phys = res->start;
	}
@@ -1390,7 +1388,7 @@ static const struct mtk_scp_sizes_data default_scp_sizes = {
};

static const struct mtk_scp_sizes_data mt8188_scp_sizes = {
	.max_dram_size = 0x500000,
	.max_dram_size = 0x800000,
	.ipi_share_buffer_size = 600,
};

@@ -1399,6 +1397,11 @@ static const struct mtk_scp_sizes_data mt8188_scp_c1_sizes = {
	.ipi_share_buffer_size = 600,
};

static const struct mtk_scp_sizes_data mt8195_scp_sizes = {
	.max_dram_size = 0x800000,
	.ipi_share_buffer_size = 288,
};

static const struct mtk_scp_of_data mt8183_of_data = {
	.scp_clk_get = mt8183_scp_clk_get,
	.scp_before_load = mt8183_scp_before_load,
@@ -1476,7 +1479,7 @@ static const struct mtk_scp_of_data mt8195_of_data = {
	.scp_da_to_va = mt8192_scp_da_to_va,
	.host_to_scp_reg = MT8192_GIPC_IN_SET,
	.host_to_scp_int_bit = MT8192_HOST_IPC_INT_BIT,
	.scp_sizes = &default_scp_sizes,
	.scp_sizes = &mt8195_scp_sizes,
};

static const struct mtk_scp_of_data mt8195_of_data_c1 = {
Loading