Commit Graph

6 Commits

Author SHA1 Message Date
Lars-Peter Clausen c768968f13 remoteproc: ingenic: Request IRQ disabled
The ingenic remoteproc driver requests its IRQ and then immediately
disables it.

The disable is necessary since irq_request() normally enables the IRQ. But
there is a new flag IRQF_NO_AUTOEN that when specified keeps the IRQ
disabled. Use this new flag rather than calling disable_irq().

This slightly reduce the boilerplate code and also avoids a theoretical
race condition where the IRQ could fire between irq_request() and
disable_irq().

Signed-off-by: Lars-Peter Clausen <lars@metafoo.de>
Acked-by: Paul Cercueil <paul@crapouillou.net>
Link: https://lore.kernel.org/r/20211205111349.51213-1-lars@metafoo.de
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
2021-12-06 10:17:44 -07:00
Peng Fan 40df0a91b2 remoteproc: add is_iomem to da_to_va
Introduce an extra parameter is_iomem to da_to_va, then the caller
could take the memory as normal memory or io mapped memory.

Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org>
Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Reported-by: kernel test robot <lkp@intel.com>
Signed-off-by: Peng Fan <peng.fan@nxp.com>
Link: https://lore.kernel.org/r/1615029865-23312-5-git-send-email-peng.fan@oss.nxp.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2021-03-11 12:02:41 -06:00
Paul Cercueil ec8207ae39 remoteproc: ingenic: Add module parameter 'auto_boot'
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>
2021-02-09 09:03:27 -06:00
Rikard Falkeborn bb7eda7edd remoteproc: ingenic: Constify ingenic_rproc_ops
The only usage of ingenic_rproc_ops is to pass its address to
devm_rproc_alloc(), which accepts a const pointer. Make it const to
allow the compiler to put it in read-only memory.

Acked-by: Paul Cercueil <paul@crapouillou.net>
Signed-off-by: Rikard Falkeborn <rikard.falkeborn@gmail.com>
Link: https://lore.kernel.org/r/20201107233630.9728-2-rikard.falkeborn@gmail.com
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-11-17 21:46:49 -06:00
Mathieu Poirier 4605ad8f45 remoteproc: ingenic: Move clock handling to prepare/unprepare callbacks
This patch moves clock related operations to the remoteproc prepare()
and unprepare() callbacks so that the PM runtime framework doesn't
have to be involved needlessly.  This provides a simpler approach and
requires less code.

Based on the work from Paul Cercueil published here:
https://lore.kernel.org/linux-remoteproc/20191116170846.67220-4-paul@crapouillou.net/

Reviewed-by: Suman Anna <s-anna@ti.com>
Signed-off-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20200630163118.3830422-2-mathieu.poirier@linaro.org
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-07-01 16:05:18 -07:00
Paul Cercueil 48f0a1bbb7 remoteproc: ingenic: Added remoteproc driver
This driver is used to boot, communicate with and load firmwares to the
MIPS co-processor found in the VPU hardware of the JZ47xx SoCs from
Ingenic.

Signed-off-by: Paul Cercueil <paul@crapouillou.net>
Acked-by: Mathieu Poirier <mathieu.poirier@linaro.org>
Link: https://lore.kernel.org/r/20200515104340.10473-4-paul@crapouillou.net
Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-18 16:54:26 -07:00