remoteproc: ingenic: Add module parameter 'auto_boot'
authorPaul Cercueil <paul@crapouillou.net>
Sat, 23 Jan 2021 14:29:56 +0000 (14:29 +0000)
committerBjorn Andersson <bjorn.andersson@linaro.org>
Tue, 9 Feb 2021 15:03:27 +0000 (09:03 -0600)
Add a 'auto_boot' module parameter that instructs the remoteproc driver
whether or not it should auto-boot the remote processor, which will
default to "false", since the VPU in Ingenic SoCs does not really have
any predetermined function.

Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/20210123142956.17865-1-paul@crapouillou.net
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
drivers/remoteproc/ingenic_rproc.c

index 26e19e6143b77c635c73e729e474a2dbbff3abb4..e2618c36eaabc5379eeee01058d50542272567e3 100644 (file)
 #define AUX_CTRL_NMI           BIT(1)
 #define AUX_CTRL_SW_RESET      BIT(0)
 
+static bool auto_boot;
+module_param(auto_boot, bool, 0400);
+MODULE_PARM_DESC(auto_boot,
+                "Auto-boot the remote processor [default=false]");
+
 struct vpu_mem_map {
        const char *name;
        unsigned int da;
@@ -172,6 +177,8 @@ static int ingenic_rproc_probe(struct platform_device *pdev)
        if (!rproc)
                return -ENOMEM;
 
+       rproc->auto_boot = auto_boot;
+
        vpu = rproc->priv;
        vpu->dev = &pdev->dev;
        platform_set_drvdata(pdev, vpu);