Skip to content

Commit

Permalink
Merge tag 'rproc-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/…
Browse files Browse the repository at this point in the history
…git/remoteproc/linux

Pull remoteproc updates from Bjorn Andersson:
 "Make Qualcomm TrustZone Peripherial Authentication Service-remoteproc
  identifier/name human friendly. Add audio DSP support for the Qualcomm
  SAR2130P. Ensure IMEM access in the Qualcomm modem remoteproc driver
  is performed prior to the firmware enabling the XPU and locking us
  out.

  Improve error handling, error logging, compile testing support, and a
  few other stylistic things across a variety of the drivers"

* tag 'rproc-v6.13' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (30 commits)
  remoteproc: qcom: wcss: Remove double assignment in q6v5_wcss_probe()
  remoteproc: qcom_q6v5_mss: Re-order writes to the IMEM region
  remoteproc: qcom_wcnss_iris: Simplify with dev_err_probe()
  remoteproc: qcom_q6v5_wcss: Simplify with dev_err_probe()
  remoteproc: qcom_q6v5_pas: Simplify with dev_err_probe()
  remoteproc: qcom_q6v5_mss: Drop redundant error printks in probe
  remoteproc: qcom_q6v5_mss: Simplify with dev_err_probe()
  remoteproc: qcom_q6v5_adsp: Simplify with dev_err_probe()
  remoteproc: qcom_q6v5_pas: disable auto boot for wpss
  remoteproc: qcom: pas: Make remoteproc name human friendly
  remoteproc: qcom: pas: enable SAR2130P audio DSP support
  remoteproc: qcom: pas: add minidump_id to SM8350 resources
  dt-bindings: remoteproc: qcom,sm8350-pas: add SAR2130P aDSP compatible
  dt-bindings: remoteproc: qcom,sm8550-pas: Add SM8750 ADSP
  remoteproc: qcom: wcss: Remove subdevs on the error path of q6v5_wcss_probe()
  remoteproc: qcom: adsp: Remove subdevs on the error path of adsp_probe()
  remoteproc: qcom: pas: Remove subdevs on the error path of adsp_probe()
  remoteproc: Switch back to struct platform_driver::remove()
  remoteproc: k3-dsp: Force cast from iomem address space
  remoteproc: k3-r5: Force cast from iomem address space
  ...
  • Loading branch information
Linus Torvalds committed Nov 27, 2024
2 parents 727968f + 44024eb commit 08906ab
Show file tree
Hide file tree
Showing 24 changed files with 212 additions and 261 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ description:
properties:
compatible:
enum:
- qcom,sar2130p-adsp-pas
- qcom,sm8350-adsp-pas
- qcom,sm8350-cdsp-pas
- qcom,sm8350-slpi-pas
Expand Down Expand Up @@ -61,6 +62,7 @@ allOf:
properties:
compatible:
enum:
- qcom,sar2130p-adsp-pas
- qcom,sm8350-adsp-pas
- qcom,sm8350-cdsp-pas
- qcom,sm8350-slpi-pas
Expand Down Expand Up @@ -101,6 +103,7 @@ allOf:
properties:
compatible:
enum:
- qcom,sar2130p-adsp-pas
- qcom,sm8350-adsp-pas
- qcom,sm8350-slpi-pas
- qcom,sm8450-adsp-pas
Expand Down
48 changes: 34 additions & 14 deletions Documentation/devicetree/bindings/remoteproc/qcom,sm8550-pas.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,16 +15,20 @@ description:

properties:
compatible:
enum:
- qcom,sdx75-mpss-pas
- qcom,sm8550-adsp-pas
- qcom,sm8550-cdsp-pas
- qcom,sm8550-mpss-pas
- qcom,sm8650-adsp-pas
- qcom,sm8650-cdsp-pas
- qcom,sm8650-mpss-pas
- qcom,x1e80100-adsp-pas
- qcom,x1e80100-cdsp-pas
oneOf:
- enum:
- qcom,sdx75-mpss-pas
- qcom,sm8550-adsp-pas
- qcom,sm8550-cdsp-pas
- qcom,sm8550-mpss-pas
- qcom,sm8650-adsp-pas
- qcom,sm8650-cdsp-pas
- qcom,sm8650-mpss-pas
- qcom,x1e80100-adsp-pas
- qcom,x1e80100-cdsp-pas
- items:
- const: qcom,sm8750-adsp-pas
- const: qcom,sm8550-adsp-pas

reg:
maxItems: 1
Expand Down Expand Up @@ -82,6 +86,20 @@ allOf:
maxItems: 5
memory-region:
maxItems: 2
- if:
properties:
compatible:
contains:
enum:
- qcom,sm8750-adsp-pas
then:
properties:
interrupts:
maxItems: 6
interrupt-names:
maxItems: 6
memory-region:
maxItems: 2
- if:
properties:
compatible:
Expand Down Expand Up @@ -129,10 +147,12 @@ allOf:
- if:
properties:
compatible:
enum:
- qcom,sm8550-adsp-pas
- qcom,sm8650-adsp-pas
- qcom,x1e80100-adsp-pas
contains:
enum:
- qcom,sm8550-adsp-pas
- qcom,sm8650-adsp-pas
- qcom,sm8750-adsp-pas
- qcom,x1e80100-adsp-pas
then:
properties:
power-domains:
Expand Down
12 changes: 7 additions & 5 deletions drivers/remoteproc/Kconfig
Original file line number Diff line number Diff line change
Expand Up @@ -329,7 +329,8 @@ config STM32_RPROC

config TI_K3_DSP_REMOTEPROC
tristate "TI K3 DSP remoteproc support"
depends on ARCH_K3
depends on ARCH_K3 || COMPILE_TEST
depends on TI_SCI_PROTOCOL || (COMPILE_TEST && TI_SCI_PROTOCOL=n)
depends on OMAP2PLUS_MBOX
help
Say m here to support TI's C66x and C71x DSP remote processor
Expand All @@ -341,9 +342,9 @@ config TI_K3_DSP_REMOTEPROC

config TI_K3_M4_REMOTEPROC
tristate "TI K3 M4 remoteproc support"
depends on ARCH_OMAP2PLUS || ARCH_K3
select MAILBOX
select OMAP2PLUS_MBOX
depends on ARCH_K3 || COMPILE_TEST
depends on TI_SCI_PROTOCOL || (COMPILE_TEST && TI_SCI_PROTOCOL=n)
depends on OMAP2PLUS_MBOX
help
Say m here to support TI's M4 remote processor subsystems
on various TI K3 family of SoCs through the remote processor
Expand All @@ -354,7 +355,8 @@ config TI_K3_M4_REMOTEPROC

config TI_K3_R5_REMOTEPROC
tristate "TI K3 R5 remoteproc support"
depends on ARCH_K3
depends on ARCH_K3 || COMPILE_TEST
depends on TI_SCI_PROTOCOL || (COMPILE_TEST && TI_SCI_PROTOCOL=n)
depends on OMAP2PLUS_MBOX
help
Say m here to support TI's R5F remote processor subsystems
Expand Down
31 changes: 9 additions & 22 deletions drivers/remoteproc/da8xx_remoteproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -251,10 +251,8 @@ static int da8xx_rproc_probe(struct platform_device *pdev)
return irq;

irq_data = irq_get_irq_data(irq);
if (!irq_data) {
dev_err(dev, "irq_get_irq_data(%d): NULL\n", irq);
return -EINVAL;
}
if (!irq_data)
return dev_err_probe(dev, -EINVAL, "irq_get_irq_data(%d): NULL\n", irq);

bootreg = devm_platform_ioremap_resource_byname(pdev, "host1cfg");
if (IS_ERR(bootreg))
Expand All @@ -265,28 +263,17 @@ static int da8xx_rproc_probe(struct platform_device *pdev)
return PTR_ERR(chipsig);

dsp_clk = devm_clk_get(dev, NULL);
if (IS_ERR(dsp_clk)) {
dev_err(dev, "clk_get error: %ld\n", PTR_ERR(dsp_clk));

return PTR_ERR(dsp_clk);
}
if (IS_ERR(dsp_clk))
return dev_err_probe(dev, PTR_ERR(dsp_clk), "clk_get error\n");

dsp_reset = devm_reset_control_get_exclusive(dev, NULL);
if (IS_ERR(dsp_reset)) {
if (PTR_ERR(dsp_reset) != -EPROBE_DEFER)
dev_err(dev, "unable to get reset control: %ld\n",
PTR_ERR(dsp_reset));

return PTR_ERR(dsp_reset);
}
if (IS_ERR(dsp_reset))
return dev_err_probe(dev, PTR_ERR(dsp_reset), "unable to get reset control\n");

if (dev->of_node) {
ret = of_reserved_mem_device_init(dev);
if (ret) {
dev_err(dev, "device does not have specific CMA pool: %d\n",
ret);
return ret;
}
if (ret)
return dev_err_probe(dev, ret, "device does not have specific CMA pool\n");
}

rproc = rproc_alloc(dev, "dsp", &da8xx_rproc_ops, da8xx_fw_name,
Expand Down Expand Up @@ -378,7 +365,7 @@ MODULE_DEVICE_TABLE(of, davinci_rproc_of_match);

static struct platform_driver da8xx_rproc_driver = {
.probe = da8xx_rproc_probe,
.remove_new = da8xx_rproc_remove,
.remove = da8xx_rproc_remove,
.driver = {
.name = "davinci-rproc",
.of_match_table = of_match_ptr(davinci_rproc_of_match),
Expand Down
2 changes: 1 addition & 1 deletion drivers/remoteproc/imx_dsp_rproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1258,7 +1258,7 @@ MODULE_DEVICE_TABLE(of, imx_dsp_rproc_of_match);

static struct platform_driver imx_dsp_rproc_driver = {
.probe = imx_dsp_rproc_probe,
.remove_new = imx_dsp_rproc_remove,
.remove = imx_dsp_rproc_remove,
.driver = {
.name = "imx-dsp-rproc",
.of_match_table = imx_dsp_rproc_of_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/remoteproc/imx_rproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1198,7 +1198,7 @@ MODULE_DEVICE_TABLE(of, imx_rproc_of_match);

static struct platform_driver imx_rproc_driver = {
.probe = imx_rproc_probe,
.remove_new = imx_rproc_remove,
.remove = imx_rproc_remove,
.driver = {
.name = "imx-rproc",
.of_match_table = imx_rproc_of_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/remoteproc/keystone_remoteproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -490,7 +490,7 @@ MODULE_DEVICE_TABLE(of, keystone_rproc_of_match);

static struct platform_driver keystone_rproc_driver = {
.probe = keystone_rproc_probe,
.remove_new = keystone_rproc_remove,
.remove = keystone_rproc_remove,
.driver = {
.name = "keystone-rproc",
.of_match_table = keystone_rproc_of_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/remoteproc/meson_mx_ao_arc.c
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ MODULE_DEVICE_TABLE(of, meson_mx_ao_arc_rproc_match);

static struct platform_driver meson_mx_ao_arc_rproc_driver = {
.probe = meson_mx_ao_arc_rproc_probe,
.remove_new = meson_mx_ao_arc_rproc_remove,
.remove = meson_mx_ao_arc_rproc_remove,
.driver = {
.name = "meson-mx-ao-arc-rproc",
.of_match_table = meson_mx_ao_arc_rproc_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/remoteproc/mtk_scp.c
Original file line number Diff line number Diff line change
Expand Up @@ -1521,7 +1521,7 @@ MODULE_DEVICE_TABLE(of, mtk_scp_of_match);

static struct platform_driver mtk_scp_driver = {
.probe = scp_probe,
.remove_new = scp_remove,
.remove = scp_remove,
.driver = {
.name = "mtk-scp",
.of_match_table = mtk_scp_of_match,
Expand Down
2 changes: 1 addition & 1 deletion drivers/remoteproc/pru_rproc.c
Original file line number Diff line number Diff line change
Expand Up @@ -1132,7 +1132,7 @@ static struct platform_driver pru_rproc_driver = {
.suppress_bind_attrs = true,
},
.probe = pru_rproc_probe,
.remove_new = pru_rproc_remove,
.remove = pru_rproc_remove,
};
module_platform_driver(pru_rproc_driver);

Expand Down
30 changes: 16 additions & 14 deletions drivers/remoteproc/qcom_q6v5_adsp.c
Original file line number Diff line number Diff line change
Expand Up @@ -534,15 +534,11 @@ static const struct rproc_ops adsp_ops = {
static int adsp_init_clock(struct qcom_adsp *adsp, const char **clk_ids)
{
int num_clks = 0;
int i, ret;
int i;

adsp->xo = devm_clk_get(adsp->dev, "xo");
if (IS_ERR(adsp->xo)) {
ret = PTR_ERR(adsp->xo);
if (ret != -EPROBE_DEFER)
dev_err(adsp->dev, "failed to get xo clock");
return ret;
}
if (IS_ERR(adsp->xo))
return dev_err_probe(adsp->dev, PTR_ERR(adsp->xo), "failed to get xo clock");

for (i = 0; clk_ids[i]; i++)
num_clks++;
Expand Down Expand Up @@ -708,10 +704,9 @@ static int adsp_probe(struct platform_device *pdev)
return ret;

ret = qcom_rproc_pds_attach(adsp, desc->pd_names, desc->num_pds);
if (ret < 0) {
dev_err(&pdev->dev, "Failed to attach proxy power domains\n");
return ret;
}
if (ret < 0)
return dev_err_probe(&pdev->dev, ret,
"Failed to attach proxy power domains\n");

ret = adsp_init_reset(adsp);
if (ret)
Expand All @@ -734,15 +729,22 @@ static int adsp_probe(struct platform_device *pdev)
desc->ssctl_id);
if (IS_ERR(adsp->sysmon)) {
ret = PTR_ERR(adsp->sysmon);
goto disable_pm;
goto deinit_remove_glink_pdm_ssr;
}

ret = rproc_add(rproc);
if (ret)
goto disable_pm;
goto remove_sysmon;

return 0;

remove_sysmon:
qcom_remove_sysmon_subdev(adsp->sysmon);
deinit_remove_glink_pdm_ssr:
qcom_q6v5_deinit(&adsp->q6v5);
qcom_remove_glink_subdev(rproc, &adsp->glink_subdev);
qcom_remove_pdm_subdev(rproc, &adsp->pdm_subdev);
qcom_remove_ssr_subdev(rproc, &adsp->ssr_subdev);
disable_pm:
qcom_rproc_pds_detach(adsp);

Expand Down Expand Up @@ -840,7 +842,7 @@ MODULE_DEVICE_TABLE(of, adsp_of_match);

static struct platform_driver adsp_pil_driver = {
.probe = adsp_probe,
.remove_new = adsp_remove,
.remove = adsp_remove,
.driver = {
.name = "qcom_q6v5_adsp",
.of_match_table = adsp_of_match,
Expand Down
Loading

0 comments on commit 08906ab

Please sign in to comment.