]> Git Repo - J-linux.git/commitdiff
Merge tag 'rproc-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc...
authorLinus Torvalds <[email protected]>
Wed, 30 Mar 2022 17:50:48 +0000 (10:50 -0700)
committerLinus Torvalds <[email protected]>
Wed, 30 Mar 2022 17:50:48 +0000 (10:50 -0700)
Pull remoteproc updates from Bjorn Andersson:
 "In the remoteproc core, it's now possible to mark the sysfs attributes
  read only on a per-instance basis, which is then used by the TI wkup
  M3 driver.

  Also, the rproc_shutdown() interface propagates errors to the caller
  and an array underflow is fixed in the debugfs interface. The
  rproc_da_to_va() API is moved to the public API to allow e.g. child
  rpmsg devices to acquire pointers to memory shared with the remote
  processor.

  The TI K3 R5F and DSP drivers gains support for attaching to instances
  already started by the bootloader, aka IPC-only mode.

  The Mediatek remoteproc driver gains support for the MT8186 SCP. The
  driver's probe function is reordered and moved to use the devres
  version of rproc_alloc() to save a few gotos. The driver's probe
  function is also transitioned to use dev_err_probe() to provide better
  debug support.

  Support for the Qualcomm SC7280 Wireless Subsystem (WPSS) is
  introduced. The Hexagon based remoteproc drivers gains support for
  voting for interconnect bandwidth during launch of the remote
  processor. The modem subsystem (MSS) driver gains support for probing
  the BAM-DMUX driver, which provides the network interface towards the
  modem on a set of older Qualcomm platforms. In addition a number a bug
  fixes are introduces in the Qualcomm drivers.

  Lastly Qualcomm ADSP DeviceTree binding is converted to YAML format,
  to allow validation of DeviceTree source files"

* tag 'rproc-v5.18' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (22 commits)
  remoteproc: qcom_q6v5_mss: Create platform device for BAM-DMUX
  remoteproc: qcom: q6v5_wpss: Add support for sc7280 WPSS
  dt-bindings: remoteproc: qcom: Add SC7280 WPSS support
  dt-bindings: remoteproc: qcom: adsp: Convert binding to YAML
  remoteproc: k3-dsp: Add support for IPC-only mode for all K3 DSPs
  remoteproc: k3-dsp: Refactor mbox request code in start
  remoteproc: k3-r5: Add support for IPC-only mode for all R5Fs
  remoteproc: k3-r5: Refactor mbox request code in start
  remoteproc: Change rproc_shutdown() to return a status
  remoteproc: qcom: q6v5: Add interconnect path proxy vote
  remoteproc: mediatek: Support mt8186 scp
  dt-bindings: remoteproc: mediatek: Add binding for mt8186 scp
  remoteproc: qcom_q6v5_mss: Fix some leaks in q6v5_alloc_memory_region
  remoteproc: qcom_wcnss: Add missing of_node_put() in wcnss_alloc_memory_region
  remoteproc: qcom: Fix missing of_node_put in adsp_alloc_memory_region
  remoteproc: move rproc_da_to_va declaration to remoteproc.h
  remoteproc: wkup_m3: Set sysfs_read_only flag
  remoteproc: Introduce sysfs_read_only flag
  remoteproc: Fix count check in rproc_coredump_write()
  remoteproc: mtk_scp: Use dev_err_probe() where possible
  ...

1  2 
drivers/remoteproc/qcom_q6v5_mss.c

index a2c231a17b2ba4a9c9ba04eb6fbca7da9216bf65,40f4cd155a5b4f34b67f7d42bd14fbb4fd49c262..af217de75e4d9179ed73ab3319e7642b33262f84
@@@ -218,6 -218,7 +218,7 @@@ struct q6v5 
        struct qcom_rproc_subdev smd_subdev;
        struct qcom_rproc_ssr ssr_subdev;
        struct qcom_sysmon *sysmon;
+       struct platform_device *bam_dmux;
        bool need_mem_protection;
        bool has_alt_reset;
        bool has_mba_logs;
@@@ -928,8 -929,7 +929,8 @@@ static void q6v5proc_halt_axi_port(stru
        regmap_write(halt_map, offset + AXI_HALTREQ_REG, 0);
  }
  
 -static int q6v5_mpss_init_image(struct q6v5 *qproc, const struct firmware *fw)
 +static int q6v5_mpss_init_image(struct q6v5 *qproc, const struct firmware *fw,
 +                              const char *fw_name)
  {
        unsigned long dma_attrs = DMA_ATTR_FORCE_CONTIGUOUS;
        dma_addr_t phys;
        void *ptr;
        int ret;
  
 -      metadata = qcom_mdt_read_metadata(fw, &size);
 +      metadata = qcom_mdt_read_metadata(fw, &size, fw_name, qproc->dev);
        if (IS_ERR(metadata))
                return PTR_ERR(metadata);
  
@@@ -1290,7 -1290,7 +1291,7 @@@ static int q6v5_mpss_load(struct q6v5 *
        /* Initialize the RMB validator */
        writel(0, qproc->rmb_base + RMB_PMI_CODE_LENGTH_REG);
  
 -      ret = q6v5_mpss_init_image(qproc, fw);
 +      ret = q6v5_mpss_init_image(qproc, fw, qproc->hexagon_mdt_image);
        if (ret)
                goto release_firmware;
  
@@@ -1807,18 -1807,20 +1808,20 @@@ static int q6v5_alloc_memory_region(str
         * reserved memory regions from device's memory-region property.
         */
        child = of_get_child_by_name(qproc->dev->of_node, "mba");
-       if (!child)
+       if (!child) {
                node = of_parse_phandle(qproc->dev->of_node,
                                        "memory-region", 0);
-       else
+       } else {
                node = of_parse_phandle(child, "memory-region", 0);
+               of_node_put(child);
+       }
  
        ret = of_address_to_resource(node, 0, &r);
+       of_node_put(node);
        if (ret) {
                dev_err(qproc->dev, "unable to resolve mba region\n");
                return ret;
        }
-       of_node_put(node);
  
        qproc->mba_phys = r.start;
        qproc->mba_size = resource_size(&r);
        } else {
                child = of_get_child_by_name(qproc->dev->of_node, "mpss");
                node = of_parse_phandle(child, "memory-region", 0);
+               of_node_put(child);
        }
  
        ret = of_address_to_resource(node, 0, &r);
+       of_node_put(node);
        if (ret) {
                dev_err(qproc->dev, "unable to resolve mpss region\n");
                return ret;
        }
-       of_node_put(node);
  
        qproc->mpss_phys = qproc->mpss_reloc = r.start;
        qproc->mpss_size = resource_size(&r);
  static int q6v5_probe(struct platform_device *pdev)
  {
        const struct rproc_hexagon_res *desc;
+       struct device_node *node;
        struct q6v5 *qproc;
        struct rproc *rproc;
        const char *mba_image;
        if (ret)
                goto remove_sysmon_subdev;
  
+       node = of_get_compatible_child(pdev->dev.of_node, "qcom,bam-dmux");
+       qproc->bam_dmux = of_platform_device_create(node, NULL, &pdev->dev);
+       of_node_put(node);
        return 0;
  
  remove_sysmon_subdev:
@@@ -2011,6 -2019,8 +2020,8 @@@ static int q6v5_remove(struct platform_
        struct q6v5 *qproc = platform_get_drvdata(pdev);
        struct rproc *rproc = qproc->rproc;
  
+       if (qproc->bam_dmux)
+               of_platform_device_destroy(&qproc->bam_dmux->dev, NULL);
        rproc_del(rproc);
  
        qcom_q6v5_deinit(&qproc->q6v5);
This page took 0.077896 seconds and 4 git commands to generate.