Skip to content

Commit 02676ec

Browse files
committed
Merge tag 'rproc-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux
Pull remoteproc updates from Bjorn Andersson: "The bulk of these patches relates to the moving to a void-returning remove callback. The i.MX HiFi remoteproc driver gets its pm_ops helpers updated to resolve build warnings about 'defined but not used' variables in certain configurations. The ST STM32 remoteproc driver is extended to allow using a SCMI reset controller to hold boot, and has an error message corrected. The Qualcomm Q6V5 PAS driver gains a missing 'static' qualifier on adsp_segment_dump()" * tag 'rproc-v6.5' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: (23 commits) remoteproc: qcom_q6v5_pas: staticize adsp_segment_dump() remoteproc: stm32: Fix error code in stm32_rproc_parse_dt() remoteproc: stm32: Allow hold boot management by the SCMI reset controller dt-bindings: remoteproc: st,stm32-rproc: Rework reset declarations remoteproc: imx_dsp_rproc: use modern pm_ops remoteproc: wkup_m3: Convert to platform remove callback returning void remoteproc: stm32: Convert to platform remove callback returning void remoteproc: st: Convert to platform remove callback returning void remoteproc: virtio: Convert to platform remove callback returning void remoteproc: rcar: Convert to platform remove callback returning void remoteproc: qcom_wcnss: Convert to platform remove callback returning void remoteproc: qcom_q6v5_wcss: Convert to platform remove callback returning void remoteproc: qcom_q6v5_pas: Convert to platform remove callback returning void remoteproc: qcom_q6v5_mss: Convert to platform remove callback returning void remoteproc: qcom_q6v5_adsp: Convert to platform remove callback returning void remoteproc: pru: Convert to platform remove callback returning void remoteproc: omap: Convert to platform remove callback returning void remoteproc: mtk_scp: Convert to platform remove callback returning void remoteproc: meson_mx_ao_arc: Convert to platform remove callback returning void remoteproc: keystone: Convert to platform remove callback returning void ...
2 parents 6afb24a + 181da4b commit 02676ec

19 files changed

Lines changed: 136 additions & 105 deletions

Documentation/devicetree/bindings/remoteproc/st,stm32-rproc.yaml

Lines changed: 39 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,14 @@ properties:
2525
maxItems: 3
2626

2727
resets:
28-
maxItems: 1
28+
minItems: 1
29+
maxItems: 2
30+
31+
reset-names:
32+
items:
33+
- const: mcu_rst
34+
- const: hold_boot
35+
minItems: 1
2936

3037
st,syscfg-holdboot:
3138
description: remote processor reset hold boot
@@ -37,6 +44,7 @@ properties:
3744
- description: The field mask of the hold boot
3845

3946
st,syscfg-tz:
47+
deprecated: true
4048
description:
4149
Reference to the system configuration which holds the RCC trust zone mode
4250
$ref: /schemas/types.yaml#/definitions/phandle-array
@@ -135,22 +143,48 @@ required:
135143
- compatible
136144
- reg
137145
- resets
138-
- st,syscfg-holdboot
139-
- st,syscfg-tz
146+
147+
allOf:
148+
- if:
149+
properties:
150+
reset-names:
151+
not:
152+
contains:
153+
const: hold_boot
154+
then:
155+
required:
156+
- st,syscfg-holdboot
157+
else:
158+
properties:
159+
st,syscfg-holdboot: false
140160

141161
additionalProperties: false
142162

143163
examples:
144164
- |
145165
#include <dt-bindings/reset/stm32mp1-resets.h>
146-
m4_rproc: m4@10000000 {
166+
m4@10000000 {
147167
compatible = "st,stm32mp1-m4";
148168
reg = <0x10000000 0x40000>,
149169
<0x30000000 0x40000>,
150170
<0x38000000 0x10000>;
151171
resets = <&rcc MCU_R>;
172+
reset-names = "mcu_rst";
173+
/* Hold boot managed using system config*/
152174
st,syscfg-holdboot = <&rcc 0x10C 0x1>;
153-
st,syscfg-tz = <&rcc 0x000 0x1>;
175+
st,syscfg-rsc-tbl = <&tamp 0x144 0xFFFFFFFF>;
176+
st,syscfg-m4-state = <&tamp 0x148 0xFFFFFFFF>;
177+
};
178+
- |
179+
#include <dt-bindings/reset/stm32mp1-resets.h>
180+
m4@10000000 {
181+
compatible = "st,stm32mp1-m4";
182+
reg = <0x10000000 0x40000>,
183+
<0x30000000 0x40000>,
184+
<0x38000000 0x10000>;
185+
/* Hold boot managed using SCMI reset controller */
186+
resets = <&scmi MCU_R>, <&scmi MCU_HOLD_BOOT_R>;
187+
reset-names = "mcu_rst", "hold_boot";
154188
st,syscfg-rsc-tbl = <&tamp 0x144 0xFFFFFFFF>;
155189
st,syscfg-m4-state = <&tamp 0x148 0xFFFFFFFF>;
156190
};

drivers/remoteproc/da8xx_remoteproc.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -357,7 +357,7 @@ static int da8xx_rproc_probe(struct platform_device *pdev)
357357
return ret;
358358
}
359359

360-
static int da8xx_rproc_remove(struct platform_device *pdev)
360+
static void da8xx_rproc_remove(struct platform_device *pdev)
361361
{
362362
struct rproc *rproc = platform_get_drvdata(pdev);
363363
struct da8xx_rproc *drproc = rproc->priv;
@@ -374,8 +374,6 @@ static int da8xx_rproc_remove(struct platform_device *pdev)
374374
rproc_free(rproc);
375375
if (dev->of_node)
376376
of_reserved_mem_device_release(dev);
377-
378-
return 0;
379377
}
380378

381379
static const struct of_device_id davinci_rproc_of_match[] __maybe_unused = {
@@ -386,7 +384,7 @@ MODULE_DEVICE_TABLE(of, davinci_rproc_of_match);
386384

387385
static struct platform_driver da8xx_rproc_driver = {
388386
.probe = da8xx_rproc_probe,
389-
.remove = da8xx_rproc_remove,
387+
.remove_new = da8xx_rproc_remove,
390388
.driver = {
391389
.name = "davinci-rproc",
392390
.of_match_table = of_match_ptr(davinci_rproc_of_match),

drivers/remoteproc/imx_dsp_rproc.c

Lines changed: 7 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1161,7 +1161,7 @@ static int imx_dsp_rproc_probe(struct platform_device *pdev)
11611161
return ret;
11621162
}
11631163

1164-
static int imx_dsp_rproc_remove(struct platform_device *pdev)
1164+
static void imx_dsp_rproc_remove(struct platform_device *pdev)
11651165
{
11661166
struct rproc *rproc = platform_get_drvdata(pdev);
11671167
struct imx_dsp_rproc *priv = rproc->priv;
@@ -1170,8 +1170,6 @@ static int imx_dsp_rproc_remove(struct platform_device *pdev)
11701170
rproc_del(rproc);
11711171
imx_dsp_detach_pm_domains(priv);
11721172
rproc_free(rproc);
1173-
1174-
return 0;
11751173
}
11761174

11771175
/* pm runtime functions */
@@ -1243,7 +1241,7 @@ static void imx_dsp_load_firmware(const struct firmware *fw, void *context)
12431241
release_firmware(fw);
12441242
}
12451243

1246-
static __maybe_unused int imx_dsp_suspend(struct device *dev)
1244+
static int imx_dsp_suspend(struct device *dev)
12471245
{
12481246
struct rproc *rproc = dev_get_drvdata(dev);
12491247
struct imx_dsp_rproc *priv = rproc->priv;
@@ -1278,7 +1276,7 @@ static __maybe_unused int imx_dsp_suspend(struct device *dev)
12781276
return pm_runtime_force_suspend(dev);
12791277
}
12801278

1281-
static __maybe_unused int imx_dsp_resume(struct device *dev)
1279+
static int imx_dsp_resume(struct device *dev)
12821280
{
12831281
struct rproc *rproc = dev_get_drvdata(dev);
12841282
int ret = 0;
@@ -1312,9 +1310,8 @@ static __maybe_unused int imx_dsp_resume(struct device *dev)
13121310
}
13131311

13141312
static const struct dev_pm_ops imx_dsp_rproc_pm_ops = {
1315-
SET_SYSTEM_SLEEP_PM_OPS(imx_dsp_suspend, imx_dsp_resume)
1316-
SET_RUNTIME_PM_OPS(imx_dsp_runtime_suspend,
1317-
imx_dsp_runtime_resume, NULL)
1313+
SYSTEM_SLEEP_PM_OPS(imx_dsp_suspend, imx_dsp_resume)
1314+
RUNTIME_PM_OPS(imx_dsp_runtime_suspend, imx_dsp_runtime_resume, NULL)
13181315
};
13191316

13201317
static const struct of_device_id imx_dsp_rproc_of_match[] = {
@@ -1328,11 +1325,11 @@ MODULE_DEVICE_TABLE(of, imx_dsp_rproc_of_match);
13281325

13291326
static struct platform_driver imx_dsp_rproc_driver = {
13301327
.probe = imx_dsp_rproc_probe,
1331-
.remove = imx_dsp_rproc_remove,
1328+
.remove_new = imx_dsp_rproc_remove,
13321329
.driver = {
13331330
.name = "imx-dsp-rproc",
13341331
.of_match_table = imx_dsp_rproc_of_match,
1335-
.pm = &imx_dsp_rproc_pm_ops,
1332+
.pm = pm_ptr(&imx_dsp_rproc_pm_ops),
13361333
},
13371334
};
13381335
module_platform_driver(imx_dsp_rproc_driver);

drivers/remoteproc/imx_rproc.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1112,7 +1112,7 @@ static int imx_rproc_probe(struct platform_device *pdev)
11121112
return ret;
11131113
}
11141114

1115-
static int imx_rproc_remove(struct platform_device *pdev)
1115+
static void imx_rproc_remove(struct platform_device *pdev)
11161116
{
11171117
struct rproc *rproc = platform_get_drvdata(pdev);
11181118
struct imx_rproc *priv = rproc->priv;
@@ -1123,8 +1123,6 @@ static int imx_rproc_remove(struct platform_device *pdev)
11231123
imx_rproc_free_mbox(rproc);
11241124
destroy_workqueue(priv->workqueue);
11251125
rproc_free(rproc);
1126-
1127-
return 0;
11281126
}
11291127

11301128
static const struct of_device_id imx_rproc_of_match[] = {
@@ -1145,7 +1143,7 @@ MODULE_DEVICE_TABLE(of, imx_rproc_of_match);
11451143

11461144
static struct platform_driver imx_rproc_driver = {
11471145
.probe = imx_rproc_probe,
1148-
.remove = imx_rproc_remove,
1146+
.remove_new = imx_rproc_remove,
11491147
.driver = {
11501148
.name = "imx-rproc",
11511149
.of_match_table = imx_rproc_of_match,

drivers/remoteproc/keystone_remoteproc.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,7 @@ static int keystone_rproc_probe(struct platform_device *pdev)
476476
return ret;
477477
}
478478

479-
static int keystone_rproc_remove(struct platform_device *pdev)
479+
static void keystone_rproc_remove(struct platform_device *pdev)
480480
{
481481
struct keystone_rproc *ksproc = platform_get_drvdata(pdev);
482482

@@ -486,8 +486,6 @@ static int keystone_rproc_remove(struct platform_device *pdev)
486486
pm_runtime_disable(&pdev->dev);
487487
rproc_free(ksproc->rproc);
488488
of_reserved_mem_device_release(&pdev->dev);
489-
490-
return 0;
491489
}
492490

493491
static const struct of_device_id keystone_rproc_of_match[] = {
@@ -501,7 +499,7 @@ MODULE_DEVICE_TABLE(of, keystone_rproc_of_match);
501499

502500
static struct platform_driver keystone_rproc_driver = {
503501
.probe = keystone_rproc_probe,
504-
.remove = keystone_rproc_remove,
502+
.remove_new = keystone_rproc_remove,
505503
.driver = {
506504
.name = "keystone-rproc",
507505
.of_match_table = keystone_rproc_of_match,

drivers/remoteproc/meson_mx_ao_arc.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -228,15 +228,13 @@ static int meson_mx_ao_arc_rproc_probe(struct platform_device *pdev)
228228
return ret;
229229
}
230230

231-
static int meson_mx_ao_arc_rproc_remove(struct platform_device *pdev)
231+
static void meson_mx_ao_arc_rproc_remove(struct platform_device *pdev)
232232
{
233233
struct rproc *rproc = platform_get_drvdata(pdev);
234234
struct meson_mx_ao_arc_rproc_priv *priv = rproc->priv;
235235

236236
rproc_del(rproc);
237237
gen_pool_free(priv->sram_pool, priv->sram_va, priv->sram_size);
238-
239-
return 0;
240238
}
241239

242240
static const struct of_device_id meson_mx_ao_arc_rproc_match[] = {
@@ -248,7 +246,7 @@ MODULE_DEVICE_TABLE(of, meson_mx_ao_arc_rproc_match);
248246

249247
static struct platform_driver meson_mx_ao_arc_rproc_driver = {
250248
.probe = meson_mx_ao_arc_rproc_probe,
251-
.remove = meson_mx_ao_arc_rproc_remove,
249+
.remove_new = meson_mx_ao_arc_rproc_remove,
252250
.driver = {
253251
.name = "meson-mx-ao-arc-rproc",
254252
.of_match_table = meson_mx_ao_arc_rproc_match,

drivers/remoteproc/mtk_scp.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -913,7 +913,7 @@ static int scp_probe(struct platform_device *pdev)
913913
return ret;
914914
}
915915

916-
static int scp_remove(struct platform_device *pdev)
916+
static void scp_remove(struct platform_device *pdev)
917917
{
918918
struct mtk_scp *scp = platform_get_drvdata(pdev);
919919
int i;
@@ -925,8 +925,6 @@ static int scp_remove(struct platform_device *pdev)
925925
for (i = 0; i < SCP_IPI_MAX; i++)
926926
mutex_destroy(&scp->ipi_desc[i].lock);
927927
mutex_destroy(&scp->send_lock);
928-
929-
return 0;
930928
}
931929

932930
static const struct mtk_scp_of_data mt8183_of_data = {
@@ -1003,7 +1001,7 @@ MODULE_DEVICE_TABLE(of, mtk_scp_of_match);
10031001

10041002
static struct platform_driver mtk_scp_driver = {
10051003
.probe = scp_probe,
1006-
.remove = scp_remove,
1004+
.remove_new = scp_remove,
10071005
.driver = {
10081006
.name = "mtk-scp",
10091007
.of_match_table = mtk_scp_of_match,

drivers/remoteproc/omap_remoteproc.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1363,15 +1363,13 @@ static int omap_rproc_probe(struct platform_device *pdev)
13631363
return ret;
13641364
}
13651365

1366-
static int omap_rproc_remove(struct platform_device *pdev)
1366+
static void omap_rproc_remove(struct platform_device *pdev)
13671367
{
13681368
struct rproc *rproc = platform_get_drvdata(pdev);
13691369

13701370
rproc_del(rproc);
13711371
rproc_free(rproc);
13721372
of_reserved_mem_device_release(&pdev->dev);
1373-
1374-
return 0;
13751373
}
13761374

13771375
static const struct dev_pm_ops omap_rproc_pm_ops = {
@@ -1382,7 +1380,7 @@ static const struct dev_pm_ops omap_rproc_pm_ops = {
13821380

13831381
static struct platform_driver omap_rproc_driver = {
13841382
.probe = omap_rproc_probe,
1385-
.remove = omap_rproc_remove,
1383+
.remove_new = omap_rproc_remove,
13861384
.driver = {
13871385
.name = "omap-rproc",
13881386
.pm = &omap_rproc_pm_ops,

drivers/remoteproc/pru_rproc.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1056,14 +1056,12 @@ static int pru_rproc_probe(struct platform_device *pdev)
10561056
return 0;
10571057
}
10581058

1059-
static int pru_rproc_remove(struct platform_device *pdev)
1059+
static void pru_rproc_remove(struct platform_device *pdev)
10601060
{
10611061
struct device *dev = &pdev->dev;
10621062
struct rproc *rproc = platform_get_drvdata(pdev);
10631063

10641064
dev_dbg(dev, "%s: removing rproc %s\n", __func__, rproc->name);
1065-
1066-
return 0;
10671065
}
10681066

10691067
static const struct pru_private_data pru_data = {
@@ -1111,7 +1109,7 @@ static struct platform_driver pru_rproc_driver = {
11111109
.suppress_bind_attrs = true,
11121110
},
11131111
.probe = pru_rproc_probe,
1114-
.remove = pru_rproc_remove,
1112+
.remove_new = pru_rproc_remove,
11151113
};
11161114
module_platform_driver(pru_rproc_driver);
11171115

drivers/remoteproc/qcom_q6v5_adsp.c

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -763,7 +763,7 @@ static int adsp_probe(struct platform_device *pdev)
763763
return ret;
764764
}
765765

766-
static int adsp_remove(struct platform_device *pdev)
766+
static void adsp_remove(struct platform_device *pdev)
767767
{
768768
struct qcom_adsp *adsp = platform_get_drvdata(pdev);
769769

@@ -775,8 +775,6 @@ static int adsp_remove(struct platform_device *pdev)
775775
qcom_remove_ssr_subdev(adsp->rproc, &adsp->ssr_subdev);
776776
qcom_rproc_pds_detach(adsp, adsp->proxy_pds, adsp->proxy_pd_count);
777777
rproc_free(adsp->rproc);
778-
779-
return 0;
780778
}
781779

782780
static const struct adsp_pil_data adsp_resource_init = {
@@ -859,7 +857,7 @@ MODULE_DEVICE_TABLE(of, adsp_of_match);
859857

860858
static struct platform_driver adsp_pil_driver = {
861859
.probe = adsp_probe,
862-
.remove = adsp_remove,
860+
.remove_new = adsp_remove,
863861
.driver = {
864862
.name = "qcom_q6v5_adsp",
865863
.of_match_table = adsp_of_match,

0 commit comments

Comments
 (0)