Linux kernel mirror (for testing) git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
kernel os linux

Merge tag 'rproc-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux

Pull remoteproc updates from Bjorn Andersson:
"This introduces support for controlling the Cortex R7 co-processor in
Renesas Gen3, support for R5F clusters and C71x DSPs on TI J721S2 and
compute, audio and modem subsystems on Qualcomm SM6350.

It fixes a couple of sparse errors related to memcpy_to/fromio and
corrects the kerneldoc spelling of "Return:".

The stm32 driver no longer attempts to communicate with the remote
after the firmware has crashed"

* tag 'rproc-v5.17' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (22 commits)
remoteproc: stm32: Improve crash recovery time
remoteproc: rcar_rproc: Remove trailing semicolon
remoteproc: rcar_rproc: Fix pm_runtime_get_sync error check
remoteproc: qcom: pas: Add SM6350 CDSP support
remoteproc: qcom: pas: Add SM6350 ADSP support
remoteproc: qcom: pas: Add SM6350 MPSS support
dt-bindings: remoteproc: qcom: pas: Add SM6350 adsp, cdsp & mpss
remoteproc: qcom: pas: Add missing power-domain "mxc" for CDSP
remoteproc: imx_rproc: correct firmware reload
remoteproc: qcom: pil_info: Don't memcpy_toio more than is provided
remoteproc: Add Renesas rcar driver
dt-bindings: remoteproc: Add Renesas R-Car
remoteproc: Fix remaining wrong return formatting in documentation
MAINTAINERS: Removing Ohad from remoteproc/rpmsg maintenance
remoteproc: ingenic: Request IRQ disabled
remoteproc: k3-r5: Extend support for R5F clusters on J721S2 SoCs
remoteproc: k3-dsp: Extend support for C71x DSPs on J721S2 SoCs
dt-bindings: remoteproc: k3-dsp: Update bindings for J721S2 SoCs
dt-bindings: remoteproc: k3-r5f: Update bindings for J721S2 SoCs
remoteproc: coredump: Correct argument 2 type for memcpy_fromio
...

+400 -21
+5
CREDITS
··· 315 315 S: Terni 05100 316 316 S: Italy 317 317 318 + N: Ohad Ben Cohen 319 + E: ohad@wizery.com 320 + D: Remote Processor (remoteproc) subsystem 321 + D: Remote Processor Messaging (rpmsg) subsystem 322 + 318 323 N: Krzysztof Benedyczak 319 324 E: golbi@mat.uni.torun.pl 320 325 W: http://www.mat.uni.torun.pl/~golbi
+28
Documentation/devicetree/bindings/remoteproc/qcom,adsp.yaml
··· 33 33 - qcom,sdm845-adsp-pas 34 34 - qcom,sdm845-cdsp-pas 35 35 - qcom,sdx55-mpss-pas 36 + - qcom,sm6350-adsp-pas 37 + - qcom,sm6350-cdsp-pas 38 + - qcom,sm6350-mpss-pas 36 39 - qcom,sm8150-adsp-pas 37 40 - qcom,sm8150-cdsp-pas 38 41 - qcom,sm8150-mpss-pas ··· 161 158 - qcom,sc8180x-mpss-pas 162 159 - qcom,sdm845-adsp-pas 163 160 - qcom,sdm845-cdsp-pas 161 + - qcom,sm6350-adsp-pas 162 + - qcom,sm6350-cdsp-pas 163 + - qcom,sm6350-mpss-pas 164 164 - qcom,sm8150-adsp-pas 165 165 - qcom,sm8150-cdsp-pas 166 166 - qcom,sm8150-mpss-pas ··· 272 266 - qcom,sc8180x-cdsp-pas 273 267 - qcom,sdm845-adsp-pas 274 268 - qcom,sdm845-cdsp-pas 269 + - qcom,sm6350-adsp-pas 270 + - qcom,sm6350-cdsp-pas 275 271 - qcom,sm8150-adsp-pas 276 272 - qcom,sm8150-cdsp-pas 277 273 - qcom,sm8150-slpi-pas ··· 309 301 - qcom,sc7280-mpss-pas 310 302 - qcom,sc8180x-mpss-pas 311 303 - qcom,sdx55-mpss-pas 304 + - qcom,sm6350-mpss-pas 312 305 - qcom,sm8150-mpss-pas 313 306 - qcom,sm8350-mpss-pas 314 307 then: ··· 399 390 compatible: 400 391 contains: 401 392 enum: 393 + - qcom,sm6350-cdsp-pas 394 + then: 395 + properties: 396 + power-domains: 397 + items: 398 + - description: CX power domain 399 + - description: MX power domain 400 + power-domain-names: 401 + items: 402 + - const: cx 403 + - const: mx 404 + 405 + - if: 406 + properties: 407 + compatible: 408 + contains: 409 + enum: 402 410 - qcom,sm8150-adsp-pas 403 411 - qcom,sm8150-cdsp-pas 404 412 then: ··· 431 405 enum: 432 406 - qcom,sc7280-mpss-pas 433 407 - qcom,sdx55-mpss-pas 408 + - qcom,sm6350-mpss-pas 434 409 - qcom,sm8150-mpss-pas 435 410 - qcom,sm8350-mpss-pas 436 411 then: ··· 452 425 enum: 453 426 - qcom,sc8180x-adsp-pas 454 427 - qcom,sc8180x-cdsp-pas 428 + - qcom,sm6350-adsp-pas 455 429 - qcom,sm8150-slpi-pas 456 430 - qcom,sm8250-adsp-pas 457 431 - qcom,sm8250-slpi-pas
+65
Documentation/devicetree/bindings/remoteproc/renesas,rcar-rproc.yaml
··· 1 + # SPDX-License-Identifier: (GPL-2.0 OR BSD-2-Clause) 2 + %YAML 1.2 3 + --- 4 + $id: "http://devicetree.org/schemas/remoteproc/renesas,rcar-rproc.yaml#" 5 + $schema: "http://devicetree.org/meta-schemas/core.yaml#" 6 + 7 + title: Renesas R-Car remote processor controller bindings 8 + 9 + maintainers: 10 + - Julien Massot <julien.massot@iot.bzh> 11 + 12 + description: | 13 + This document defines the bindings for the remoteproc component that loads and 14 + boots firmwares on the Renesas R-Car family chipset. 15 + R-Car gen3 family may have a realtime processor, this processor shares peripheral 16 + and RAM with the host processor with the same address map. 17 + 18 + properties: 19 + compatible: 20 + const: renesas,rcar-cr7 21 + 22 + resets: 23 + maxItems: 1 24 + 25 + power-domains: 26 + maxItems: 1 27 + 28 + memory-region: 29 + description: 30 + List of phandles to the reserved memory regions associated with the 31 + remoteproc device. This is variable and describes the memories shared with 32 + the remote processor (e.g. remoteproc firmware and carveouts, rpmsg 33 + vrings, ...). 34 + (see ../reserved-memory/reserved-memory.yaml) 35 + 36 + required: 37 + - compatible 38 + - resets 39 + - memory-region 40 + - power-domains 41 + 42 + additionalProperties: false 43 + 44 + examples: 45 + - | 46 + #include <dt-bindings/clock/r8a7795-cpg-mssr.h> 47 + #include <dt-bindings/power/r8a7795-sysc.h> 48 + reserved-memory { 49 + #address-cells = <2>; 50 + #size-cells = <2>; 51 + 52 + cr7_ram: cr7_ram@40040000 { 53 + no-map; 54 + reg = <0x0 0x40040000 0x0 0x1fc0000>; 55 + }; 56 + }; 57 + 58 + cr7_rproc: cr7 { 59 + compatible = "renesas,rcar-cr7"; 60 + memory-region = <&cr7_ram>; 61 + power-domains = <&sysc R8A7795_PD_CR7>; 62 + resets = <&cpg 222>; 63 + }; 64 + 65 + ...
+3
Documentation/devicetree/bindings/remoteproc/ti,k3-dsp-rproc.yaml
··· 33 33 enum: 34 34 - ti,j721e-c66-dsp 35 35 - ti,j721e-c71-dsp 36 + - ti,j721s2-c71-dsp 36 37 description: 37 38 Use "ti,j721e-c66-dsp" for C66x DSPs on K3 J721E SoCs 38 39 Use "ti,j721e-c71-dsp" for C71x DSPs on K3 J721E SoCs 40 + Use "ti,j721s2-c71-dsp" for C71x DSPs on K3 J721S2 SoCs 39 41 40 42 resets: 41 43 description: | ··· 108 106 compatible: 109 107 enum: 110 108 - ti,j721e-c71-dsp 109 + - ti,j721s2-c71-dsp 111 110 then: 112 111 properties: 113 112 reg:
+5 -3
Documentation/devicetree/bindings/remoteproc/ti,k3-r5f-rproc.yaml
··· 38 38 - ti,j721e-r5fss 39 39 - ti,j7200-r5fss 40 40 - ti,am64-r5fss 41 + - ti,j721s2-r5fss 41 42 42 43 power-domains: 43 44 description: | ··· 65 64 description: | 66 65 Configuration Mode for the Dual R5F cores within the R5F cluster. 67 66 Should be either a value of 1 (LockStep mode) or 0 (Split mode) on 68 - most SoCs (AM65x, J721E, J7200), default is LockStep mode if omitted; 69 - and should be either a value of 0 (Split mode) or 2 (Single-CPU mode) 70 - on AM64x SoCs, default is Split mode if omitted. 67 + most SoCs (AM65x, J721E, J7200, J721s2), default is LockStep mode if 68 + omitted; and should be either a value of 0 (Split mode) or 2 69 + (Single-CPU mode) on AM64x SoCs, default is Split mode if omitted. 71 70 72 71 # R5F Processor Child Nodes: 73 72 # ========================== ··· 105 104 - ti,j721e-r5f 106 105 - ti,j7200-r5f 107 106 - ti,am64-r5f 107 + - ti,j721s2-r5f 108 108 109 109 reg: 110 110 items:
-2
MAINTAINERS
··· 16400 16400 F: fs/reiserfs/ 16401 16401 16402 16402 REMOTE PROCESSOR (REMOTEPROC) SUBSYSTEM 16403 - M: Ohad Ben-Cohen <ohad@wizery.com> 16404 16403 M: Bjorn Andersson <bjorn.andersson@linaro.org> 16405 16404 M: Mathieu Poirier <mathieu.poirier@linaro.org> 16406 16405 L: linux-remoteproc@vger.kernel.org ··· 16413 16414 F: include/linux/remoteproc/ 16414 16415 16415 16416 REMOTE PROCESSOR MESSAGING (RPMSG) SUBSYSTEM 16416 - M: Ohad Ben-Cohen <ohad@wizery.com> 16417 16417 M: Bjorn Andersson <bjorn.andersson@linaro.org> 16418 16418 M: Mathieu Poirier <mathieu.poirier@linaro.org> 16419 16419 L: linux-remoteproc@vger.kernel.org
+11
drivers/remoteproc/Kconfig
··· 283 283 verified and booted with the help of the Peripheral Authentication 284 284 System (PAS) in TrustZone. 285 285 286 + config RCAR_REMOTEPROC 287 + tristate "Renesas R-Car Gen3 remoteproc support" 288 + depends on ARCH_RENESAS || COMPILE_TEST 289 + help 290 + Say y here to support R-Car realtime processor via the 291 + remote processor framework. An ELF firmware can be loaded 292 + thanks to sysfs remoteproc entries. The remote processor 293 + can be started and stopped. 294 + This can be either built-in or a loadable module. 295 + If compiled as module (M), the module name is rcar_rproc. 296 + 286 297 config ST_REMOTEPROC 287 298 tristate "ST remoteproc support" 288 299 depends on ARCH_STI
+1
drivers/remoteproc/Makefile
··· 32 32 obj-$(CONFIG_QCOM_WCNSS_PIL) += qcom_wcnss_pil.o 33 33 qcom_wcnss_pil-y += qcom_wcnss.o 34 34 qcom_wcnss_pil-y += qcom_wcnss_iris.o 35 + obj-$(CONFIG_RCAR_REMOTEPROC) += rcar_rproc.o 35 36 obj-$(CONFIG_ST_REMOTEPROC) += st_remoteproc.o 36 37 obj-$(CONFIG_ST_SLIM_REMOTEPROC) += st_slim_rproc.o 37 38 obj-$(CONFIG_STM32_RPROC) += stm32_rproc.o
+6 -3
drivers/remoteproc/imx_rproc.c
··· 34 34 35 35 #define IMX7D_M4_START (IMX7D_ENABLE_M4 | IMX7D_SW_M4P_RST \ 36 36 | IMX7D_SW_M4C_RST) 37 - #define IMX7D_M4_STOP IMX7D_SW_M4C_NON_SCLR_RST 37 + #define IMX7D_M4_STOP (IMX7D_ENABLE_M4 | IMX7D_SW_M4C_RST | \ 38 + IMX7D_SW_M4C_NON_SCLR_RST) 38 39 39 40 /* Address: 0x020D8000 */ 40 41 #define IMX6SX_SRC_SCR 0x00 ··· 46 45 47 46 #define IMX6SX_M4_START (IMX6SX_ENABLE_M4 | IMX6SX_SW_M4P_RST \ 48 47 | IMX6SX_SW_M4C_RST) 49 - #define IMX6SX_M4_STOP IMX6SX_SW_M4C_NON_SCLR_RST 48 + #define IMX6SX_M4_STOP (IMX6SX_ENABLE_M4 | IMX6SX_SW_M4C_RST | \ 49 + IMX6SX_SW_M4C_NON_SCLR_RST) 50 50 #define IMX6SX_M4_RST_MASK (IMX6SX_ENABLE_M4 | IMX6SX_SW_M4P_RST \ 51 51 | IMX6SX_SW_M4C_NON_SCLR_RST \ 52 52 | IMX6SX_SW_M4C_RST) ··· 686 684 return ret; 687 685 } 688 686 689 - if (!(val & dcfg->src_stop)) 687 + if ((val & dcfg->src_mask) != dcfg->src_stop) 690 688 priv->rproc->state = RPROC_DETACHED; 691 689 692 690 return 0; ··· 806 804 clk_disable_unprepare(priv->clk); 807 805 rproc_del(rproc); 808 806 imx_rproc_free_mbox(rproc); 807 + destroy_workqueue(priv->workqueue); 809 808 rproc_free(rproc); 810 809 811 810 return 0;
+2 -3
drivers/remoteproc/ingenic_rproc.c
··· 218 218 if (vpu->irq < 0) 219 219 return vpu->irq; 220 220 221 - ret = devm_request_irq(dev, vpu->irq, vpu_interrupt, 0, "VPU", rproc); 221 + ret = devm_request_irq(dev, vpu->irq, vpu_interrupt, IRQF_NO_AUTOEN, 222 + "VPU", rproc); 222 223 if (ret < 0) { 223 224 dev_err(dev, "Failed to request IRQ\n"); 224 225 return ret; 225 226 } 226 - 227 - disable_irq(vpu->irq); 228 227 229 228 ret = devm_rproc_add(dev, rproc); 230 229 if (ret) {
+2 -2
drivers/remoteproc/mtk_scp_ipi.c
··· 23 23 * 24 24 * Register an ipi function to receive ipi interrupt from SCP. 25 25 * 26 - * Returns 0 if ipi registers successfully, -error on error. 26 + * Return: 0 if ipi registers successfully, -error on error. 27 27 */ 28 28 int scp_ipi_register(struct mtk_scp *scp, 29 29 u32 id, ··· 150 150 * When the processing completes, IPI handler registered 151 151 * by scp_ipi_register will be called in interrupt context. 152 152 * 153 - * Returns 0 if sending data successfully, -error on error. 153 + * Return: 0 if sending data successfully, -error on error. 154 154 **/ 155 155 int scp_ipi_send(struct mtk_scp *scp, u32 id, void *buf, unsigned int len, 156 156 unsigned int wait)
+1 -1
drivers/remoteproc/qcom_pil_info.c
··· 104 104 return -ENOMEM; 105 105 106 106 found_unused: 107 - memcpy_toio(entry, image, PIL_RELOC_NAME_LEN); 107 + memcpy_toio(entry, image, strnlen(image, PIL_RELOC_NAME_LEN)); 108 108 found_existing: 109 109 /* Use two writel() as base is only aligned to 4 bytes on odd entries */ 110 110 writel(base, entry + PIL_RELOC_NAME_LEN);
+38
drivers/remoteproc/qcom_q6v5_pas.c
··· 524 524 .ssctl_id = 0x14, 525 525 }; 526 526 527 + static const struct adsp_data sm6350_adsp_resource = { 528 + .crash_reason_smem = 423, 529 + .firmware_name = "adsp.mdt", 530 + .pas_id = 1, 531 + .has_aggre2_clk = false, 532 + .auto_boot = true, 533 + .proxy_pd_names = (char*[]){ 534 + "lcx", 535 + "lmx", 536 + NULL 537 + }, 538 + .load_state = "adsp", 539 + .ssr_name = "lpass", 540 + .sysmon_name = "adsp", 541 + .ssctl_id = 0x14, 542 + }; 543 + 527 544 static const struct adsp_data sm8150_adsp_resource = { 528 545 .crash_reason_smem = 423, 529 546 .firmware_name = "adsp.mdt", ··· 629 612 .ssctl_id = 0x17, 630 613 }; 631 614 615 + static const struct adsp_data sm6350_cdsp_resource = { 616 + .crash_reason_smem = 601, 617 + .firmware_name = "cdsp.mdt", 618 + .pas_id = 18, 619 + .has_aggre2_clk = false, 620 + .auto_boot = true, 621 + .proxy_pd_names = (char*[]){ 622 + "cx", 623 + "mx", 624 + NULL 625 + }, 626 + .load_state = "cdsp", 627 + .ssr_name = "cdsp", 628 + .sysmon_name = "cdsp", 629 + .ssctl_id = 0x17, 630 + }; 631 + 632 632 static const struct adsp_data sm8150_cdsp_resource = { 633 633 .crash_reason_smem = 601, 634 634 .firmware_name = "cdsp.mdt", ··· 686 652 .auto_boot = true, 687 653 .proxy_pd_names = (char*[]){ 688 654 "cx", 655 + "mxc", 689 656 NULL 690 657 }, 691 658 .load_state = "cdsp", ··· 839 804 { .compatible = "qcom,sdm845-adsp-pas", .data = &sdm845_adsp_resource_init}, 840 805 { .compatible = "qcom,sdm845-cdsp-pas", .data = &sdm845_cdsp_resource_init}, 841 806 { .compatible = "qcom,sdx55-mpss-pas", .data = &sdx55_mpss_resource}, 807 + { .compatible = "qcom,sm6350-adsp-pas", .data = &sm6350_adsp_resource}, 808 + { .compatible = "qcom,sm6350-cdsp-pas", .data = &sm6350_cdsp_resource}, 809 + { .compatible = "qcom,sm6350-mpss-pas", .data = &mpss_resource_init}, 842 810 { .compatible = "qcom,sm8150-adsp-pas", .data = &sm8150_adsp_resource}, 843 811 { .compatible = "qcom,sm8150-cdsp-pas", .data = &sm8150_cdsp_resource}, 844 812 { .compatible = "qcom,sm8150-mpss-pas", .data = &mpss_resource_init},
+224
drivers/remoteproc/rcar_rproc.c
··· 1 + // SPDX-License-Identifier: GPL-2.0 2 + /* 3 + * Copyright (C) IoT.bzh 2021 4 + */ 5 + 6 + #include <linux/limits.h> 7 + #include <linux/module.h> 8 + #include <linux/of_device.h> 9 + #include <linux/of_reserved_mem.h> 10 + #include <linux/pm_runtime.h> 11 + #include <linux/remoteproc.h> 12 + #include <linux/reset.h> 13 + #include <linux/soc/renesas/rcar-rst.h> 14 + 15 + #include "remoteproc_internal.h" 16 + 17 + struct rcar_rproc { 18 + struct reset_control *rst; 19 + }; 20 + 21 + static int rcar_rproc_mem_alloc(struct rproc *rproc, 22 + struct rproc_mem_entry *mem) 23 + { 24 + struct device *dev = &rproc->dev; 25 + void *va; 26 + 27 + dev_dbg(dev, "map memory: %pa+%zx\n", &mem->dma, mem->len); 28 + va = ioremap_wc(mem->dma, mem->len); 29 + if (!va) { 30 + dev_err(dev, "Unable to map memory region: %pa+%zx\n", 31 + &mem->dma, mem->len); 32 + return -ENOMEM; 33 + } 34 + 35 + /* Update memory entry va */ 36 + mem->va = va; 37 + 38 + return 0; 39 + } 40 + 41 + static int rcar_rproc_mem_release(struct rproc *rproc, 42 + struct rproc_mem_entry *mem) 43 + { 44 + dev_dbg(&rproc->dev, "unmap memory: %pa\n", &mem->dma); 45 + iounmap(mem->va); 46 + 47 + return 0; 48 + } 49 + 50 + static int rcar_rproc_prepare(struct rproc *rproc) 51 + { 52 + struct device *dev = rproc->dev.parent; 53 + struct device_node *np = dev->of_node; 54 + struct of_phandle_iterator it; 55 + struct rproc_mem_entry *mem; 56 + struct reserved_mem *rmem; 57 + u32 da; 58 + 59 + /* Register associated reserved memory regions */ 60 + of_phandle_iterator_init(&it, np, "memory-region", NULL, 0); 61 + while (of_phandle_iterator_next(&it) == 0) { 62 + 63 + rmem = of_reserved_mem_lookup(it.node); 64 + if (!rmem) { 65 + dev_err(&rproc->dev, 66 + "unable to acquire memory-region\n"); 67 + return -EINVAL; 68 + } 69 + 70 + if (rmem->base > U32_MAX) 71 + return -EINVAL; 72 + 73 + /* No need to translate pa to da, R-Car use same map */ 74 + da = rmem->base; 75 + mem = rproc_mem_entry_init(dev, NULL, 76 + rmem->base, 77 + rmem->size, da, 78 + rcar_rproc_mem_alloc, 79 + rcar_rproc_mem_release, 80 + it.node->name); 81 + 82 + if (!mem) 83 + return -ENOMEM; 84 + 85 + rproc_add_carveout(rproc, mem); 86 + } 87 + 88 + return 0; 89 + } 90 + 91 + static int rcar_rproc_parse_fw(struct rproc *rproc, const struct firmware *fw) 92 + { 93 + int ret; 94 + 95 + ret = rproc_elf_load_rsc_table(rproc, fw); 96 + if (ret) 97 + dev_info(&rproc->dev, "No resource table in elf\n"); 98 + 99 + return 0; 100 + } 101 + 102 + static int rcar_rproc_start(struct rproc *rproc) 103 + { 104 + struct rcar_rproc *priv = rproc->priv; 105 + int err; 106 + 107 + if (!rproc->bootaddr) 108 + return -EINVAL; 109 + 110 + err = rcar_rst_set_rproc_boot_addr(rproc->bootaddr); 111 + if (err) { 112 + dev_err(&rproc->dev, "failed to set rproc boot addr\n"); 113 + return err; 114 + } 115 + 116 + err = reset_control_deassert(priv->rst); 117 + if (err) 118 + dev_err(&rproc->dev, "failed to deassert reset\n"); 119 + 120 + return err; 121 + } 122 + 123 + static int rcar_rproc_stop(struct rproc *rproc) 124 + { 125 + struct rcar_rproc *priv = rproc->priv; 126 + int err; 127 + 128 + err = reset_control_assert(priv->rst); 129 + if (err) 130 + dev_err(&rproc->dev, "failed to assert reset\n"); 131 + 132 + return err; 133 + } 134 + 135 + static struct rproc_ops rcar_rproc_ops = { 136 + .prepare = rcar_rproc_prepare, 137 + .start = rcar_rproc_start, 138 + .stop = rcar_rproc_stop, 139 + .load = rproc_elf_load_segments, 140 + .parse_fw = rcar_rproc_parse_fw, 141 + .find_loaded_rsc_table = rproc_elf_find_loaded_rsc_table, 142 + .sanity_check = rproc_elf_sanity_check, 143 + .get_boot_addr = rproc_elf_get_boot_addr, 144 + 145 + }; 146 + 147 + static int rcar_rproc_probe(struct platform_device *pdev) 148 + { 149 + struct device *dev = &pdev->dev; 150 + struct device_node *np = dev->of_node; 151 + struct rcar_rproc *priv; 152 + struct rproc *rproc; 153 + int ret; 154 + 155 + rproc = devm_rproc_alloc(dev, np->name, &rcar_rproc_ops, 156 + NULL, sizeof(*priv)); 157 + if (!rproc) 158 + return -ENOMEM; 159 + 160 + priv = rproc->priv; 161 + 162 + priv->rst = devm_reset_control_get_exclusive(dev, NULL); 163 + if (IS_ERR(priv->rst)) { 164 + ret = PTR_ERR(priv->rst); 165 + dev_err_probe(dev, ret, "fail to acquire rproc reset\n"); 166 + return ret; 167 + } 168 + 169 + pm_runtime_enable(dev); 170 + ret = pm_runtime_resume_and_get(dev); 171 + if (ret) { 172 + dev_err(dev, "failed to power up\n"); 173 + return ret; 174 + } 175 + 176 + dev_set_drvdata(dev, rproc); 177 + 178 + /* Manually start the rproc */ 179 + rproc->auto_boot = false; 180 + 181 + ret = devm_rproc_add(dev, rproc); 182 + if (ret) { 183 + dev_err(dev, "rproc_add failed\n"); 184 + goto pm_disable; 185 + } 186 + 187 + return 0; 188 + 189 + pm_disable: 190 + pm_runtime_disable(dev); 191 + 192 + return ret; 193 + } 194 + 195 + static int rcar_rproc_remove(struct platform_device *pdev) 196 + { 197 + struct device *dev = &pdev->dev; 198 + 199 + pm_runtime_disable(dev); 200 + 201 + return 0; 202 + } 203 + 204 + static const struct of_device_id rcar_rproc_of_match[] = { 205 + { .compatible = "renesas,rcar-cr7" }, 206 + {}, 207 + }; 208 + 209 + MODULE_DEVICE_TABLE(of, rcar_rproc_of_match); 210 + 211 + static struct platform_driver rcar_rproc_driver = { 212 + .probe = rcar_rproc_probe, 213 + .remove = rcar_rproc_remove, 214 + .driver = { 215 + .name = "rcar-rproc", 216 + .of_match_table = rcar_rproc_of_match, 217 + }, 218 + }; 219 + 220 + module_platform_driver(rcar_rproc_driver); 221 + 222 + MODULE_LICENSE("GPL v2"); 223 + MODULE_DESCRIPTION("Renesas R-Car Gen3 remote processor control driver"); 224 + MODULE_AUTHOR("Julien Massot <julien.massot@iot.bzh>");
+2 -2
drivers/remoteproc/remoteproc_core.c
··· 577 577 dma_get_mask(rproc->dev.parent)); 578 578 if (ret) { 579 579 dev_warn(dev, 580 - "Failed to set DMA mask %llx. Trying to continue... %x\n", 581 - dma_get_mask(rproc->dev.parent), ret); 580 + "Failed to set DMA mask %llx. Trying to continue... (%pe)\n", 581 + dma_get_mask(rproc->dev.parent), ERR_PTR(ret)); 582 582 } 583 583 584 584 /* parse the vrings */
+1 -1
drivers/remoteproc/remoteproc_coredump.c
··· 166 166 memset(dest, 0xff, size); 167 167 } else { 168 168 if (is_iomem) 169 - memcpy_fromio(dest, ptr, size); 169 + memcpy_fromio(dest, (void const __iomem *)ptr, size); 170 170 else 171 171 memcpy(dest, ptr, size); 172 172 }
+1 -1
drivers/remoteproc/st_slim_rproc.c
··· 216 216 * obtains and enables any clocks required by the SLIM core and also 217 217 * ioremaps the various IO. 218 218 * 219 - * Returns st_slim_rproc pointer or PTR_ERR() on error. 219 + * Return: st_slim_rproc pointer or PTR_ERR() on error. 220 220 */ 221 221 222 222 struct st_slim_rproc *st_slim_rproc_alloc(struct platform_device *pdev,
+1 -1
drivers/remoteproc/stm32_rproc.c
··· 494 494 int err, idx; 495 495 496 496 /* request shutdown of the remote processor */ 497 - if (rproc->state != RPROC_OFFLINE) { 497 + if (rproc->state != RPROC_OFFLINE && rproc->state != RPROC_CRASHED) { 498 498 idx = stm32_rproc_mbox_idx(rproc, STM32_MBX_SHUTDOWN); 499 499 if (idx >= 0 && ddata->mb[idx].chan) { 500 500 err = mbox_send_message(ddata->mb[idx].chan, "detach");
+1
drivers/remoteproc/ti_k3_dsp_remoteproc.c
··· 767 767 static const struct of_device_id k3_dsp_of_match[] = { 768 768 { .compatible = "ti,j721e-c66-dsp", .data = &c66_data, }, 769 769 { .compatible = "ti,j721e-c71-dsp", .data = &c71_data, }, 770 + { .compatible = "ti,j721s2-c71-dsp", .data = &c71_data, }, 770 771 { /* sentinel */ }, 771 772 }; 772 773 MODULE_DEVICE_TABLE(of, k3_dsp_of_match);
+3 -2
drivers/remoteproc/ti_k3_r5_remoteproc.c
··· 1535 1535 .single_cpu_mode = false, 1536 1536 }; 1537 1537 1538 - static const struct k3_r5_soc_data j7200_soc_data = { 1538 + static const struct k3_r5_soc_data j7200_j721s2_soc_data = { 1539 1539 .tcm_is_double = true, 1540 1540 .tcm_ecc_autoinit = true, 1541 1541 .single_cpu_mode = false, ··· 1550 1550 static const struct of_device_id k3_r5_of_match[] = { 1551 1551 { .compatible = "ti,am654-r5fss", .data = &am65_j721e_soc_data, }, 1552 1552 { .compatible = "ti,j721e-r5fss", .data = &am65_j721e_soc_data, }, 1553 - { .compatible = "ti,j7200-r5fss", .data = &j7200_soc_data, }, 1553 + { .compatible = "ti,j7200-r5fss", .data = &j7200_j721s2_soc_data, }, 1554 1554 { .compatible = "ti,am64-r5fss", .data = &am64_soc_data, }, 1555 + { .compatible = "ti,j721s2-r5fss", .data = &j7200_j721s2_soc_data, }, 1555 1556 { /* sentinel */ }, 1556 1557 }; 1557 1558 MODULE_DEVICE_TABLE(of, k3_r5_of_match);