14 Nov, 2018
1 commit
-
commit d5269c4553a64b6882f2c019ae21b783a0984a83 upstream.
In the case that the interrupts fail to result because of the
interrupt-controller not yet being registered the
platform_get_irq_byname() call will fail with -EPROBE_DEFER, but passing
this into devm_request_threaded_irq() will result in -EINVAL being
returned, the driver is therefor not reprobed later.Fixes: 3b415c8fb263 ("remoteproc: q6v5: Extract common resource handling")
Cc: stable@vger.kernel.org
Reviewed-by: Sibi Sankar
Signed-off-by: Bjorn Andersson
Signed-off-by: Greg Kroah-Hartman
17 Aug, 2018
1 commit
-
Switch to using the reset framework instead of handcoded reset routines
we used so far.Reviewed-by: Sekhar Nori
Reviewed-by: Philipp Zabel
Signed-off-by: Bartosz Golaszewski
Signed-off-by: Bjorn Andersson
14 Aug, 2018
1 commit
-
The Davinci remoteproc driver does not support error recovery at
present, so mark the corresponding remoteproc flag appropriately
so that the debugfs flag shows the value as 'disabled' by default.Signed-off-by: Suman Anna
Signed-off-by: Bjorn Andersson
31 Jul, 2018
4 commits
-
The format specifier "%p" can leak kernel addresses.
Use "%pK" instead.Signed-off-by: Loic Pallardy
Signed-off-by: Bjorn Andersson -
The format specifier "%p" can leak kernel addresses.
Use "%pK" instead.This patch proposes changes for remoteproc core only.
Acked-by: Suman Anna
Signed-off-by: Loic Pallardy
Signed-off-by: Bjorn Andersson -
A new driver got added that depends on QCOM_SMD and fails to link
as built-in with CONFIG_QCOM_SMD=m:drivers/remoteproc/qcom_common.o: In function `smd_subdev_stop':
qcom_common.c:(.text+0x674): undefined reference to `qcom_smd_unregister_edge'
drivers/remoteproc/qcom_common.o: In function `smd_subdev_start':
qcom_common.c:(.text+0x700): undefined reference to `qcom_smd_register_edge'We've fixed the same thing several times before, so use the same
dependency here.Fixes: 3a3d4163e0bf ("remoteproc: qcom: Introduce Hexagon V5 based WCSS driver")
Acked-by: Sricharan R
Signed-off-by: Arnd Bergmann
Signed-off-by: Bjorn Andersson -
Unwind the modified table_ptr and restore it to the local copy
upon any subsequent failures in the rproc_start() function. This
keeps the function to remain balanced on failures without the need
to balance any modified variables elsewhere.While at this, do some minor cleanup of the extra lines between
the failure labels as well.Signed-off-by: Suman Anna
[bjorn: unconditionally set table_ptr to cached_table]
Signed-off-by: Bjorn Andersson
11 Jul, 2018
2 commits
-
GCC_MSS_AXIS2 clock is used for disabling boot IMEM (a part of
AP boot up). With Boot IMEM disable now a part TZ/ATF, AXIS2
clock is no longer required post AP boot up and expected to
remain untouched. However if the clock is turned ON after Q6
is brought out of reset and later turned off, it results in
modem hang. When Q6 attempts a power collapse the internal
handshaking to check if AXIS2 is idle never goes through since
it is turned off preventing the RSC from getting triggered,
leaving modem in a funky state. Hence removing AXIS2 clk
enable/disable from the driver.Reported-by: Bjorn Andersson
Signed-off-by: Sibi Sankar
Signed-off-by: Bjorn Andersson -
The new driver only works as built-in code at the moment but fails
with a link error when configured as a loadable module:WARNING: modpost: missing MODULE_LICENSE() in drivers/remoteproc/qcom_q6v5.o
see include/linux/module.h for more information
ERROR: "qcom_q6v5_init" [drivers/remoteproc/qcom_q6v5_pil.ko] undefined!
ERROR: "qcom_q6v5_wait_for_start" [drivers/remoteproc/qcom_q6v5_pil.ko] undefined!
ERROR: "qcom_q6v5_prepare" [drivers/remoteproc/qcom_q6v5_pil.ko] undefined!
ERROR: "qcom_q6v5_unprepare" [drivers/remoteproc/qcom_q6v5_pil.ko] undefined!
ERROR: "qcom_q6v5_request_stop" [drivers/remoteproc/qcom_q6v5_pil.ko] undefined!
ERROR: "qcom_q6v5_init" [drivers/remoteproc/qcom_adsp_pil.ko] undefined!
ERROR: "qcom_q6v5_wait_for_start" [drivers/remoteproc/qcom_adsp_pil.ko] undefined!
ERROR: "qcom_q6v5_prepare" [drivers/remoteproc/qcom_adsp_pil.ko] undefined!
ERROR: "qcom_q6v5_unprepare" [drivers/remoteproc/qcom_adsp_pil.ko] undefined!
ERROR: "qcom_q6v5_request_stop" [drivers/remoteproc/qcom_adsp_pil.ko] undefined!This exports the internal symbols as needed and adds the MODULE_LICENSE()
and MODULE_DESCRIPTION() tags. I could not figure out the author, so I
did not add a MODULE_AUTHOR() tag for now.Fixes: 3b415c8fb263 ("remoteproc: q6v5: Extract common resource handling")
Signed-off-by: Arnd Bergmann
Signed-off-by: Bjorn Andersson
27 Jun, 2018
5 commits
-
On rare occasions a subdevice might need to prepare some hardware
resources before a remote processor is booted, and clean up some
state after it has been shut down.One such example is the IP Accelerator found in various Qualcomm
platforms, which is accessed directly from both the modem remoteproc
and the application subsystem and requires an intricate lockstep
process when bringing the modem up and down.Tested-by: Fabien Dessenne
Signed-off-by: Bjorn Andersson
[elder@linaro.org: minor description and comment edits]
Signed-off-by Alex Elder
Signed-off-by: Bjorn Andersson -
Rename functions used when subdevices are started and stopped to
reflect the new naming scheme.Tested-by: Fabien Dessenne
Signed-off-by Alex Elder
Signed-off-by: Bjorn Andersson -
In preparation of adding the additional prepare and unprepare operations
make the client responsible for filling out the function pointers of the
rproc_subdev. This makes the arguments to rproc_add_subdev() more
manageable, in particular when some of the functions are left out.Tested-by: Fabien Dessenne
Signed-off-by: Bjorn Andersson
[elder@linaro.org: added comment about assigning function pointers]
Signed-off-by Alex Elder
Signed-off-by: Bjorn Andersson -
Some subdevices, such as glink ssr only care about the stop operation,
so make the operations optional to reduce client code.Tested-by: Fabien Dessenne
Signed-off-by: Bjorn Andersson
Signed-off-by Alex Elder
Signed-off-by: Bjorn Andersson -
"start" and "stop" are more suitable names for how these two operations
are used, and they fit better with the upcoming introduction of two
additional operations in the struct.Tested-by: Fabien Dessenne
Signed-off-by: Bjorn Andersson
[elder@linaro.org: minor comment edits]
Signed-off-by Alex Elder
Signed-off-by: Bjorn Andersson
19 Jun, 2018
4 commits
-
IPQ8074 has an integrated Hexagon dsp core q6v5 and a wireless lan
(Lithium) IP. An mdt type single image format is used for the
firmware. So the mdt_load function can be directly used to load
the firmware. Also add the relevant resets required for this core.Acked-by: Rob Herring (bindings)
Signed-off-by: Sricharan R
[bjorn: Rewrote as a separate driver, intead of extending q6v5_pil.c]
Signed-off-by: Bjorn Andersson -
Migrate the MSS remoteproc driver to use the newly extracted helper
functions.Reviewed-by: Sricharan R
Signed-off-by: Bjorn Andersson -
Migrate the Hexagon V5 PAS (ADSP) driver to using the newly extracted
helper functions. The use of the handover callback does introduce latent
disabling of proxy resources. But apart from this there should be no
change in functionality.Reviewed-by: Rohit kumar
Reviewed-by: Sricharan R
Tested-by: Rohit kumar
Signed-off-by: Bjorn Andersson -
Shared between all Hexagon V5 based remoteprocs is the handling of the 5
interrupts and the SMP2P stop request, so break this out into a separate
function in order to allow these drivers to be cleaned up.Reviewed-by: Rohit kumar
Tested-by: Rohit kumar
Signed-off-by: Bjorn Andersson
15 Jun, 2018
1 commit
-
With PHYS_ADDR_MAX there is now a type safe variant for all bits set.
Make use of it.Patch created using a semantic patch as follows:
//
@@
typedef phys_addr_t;
@@
-(phys_addr_t)ULLONG_MAX
+PHYS_ADDR_MAX
//Link: http://lkml.kernel.org/r/20180419214204.19322-1-stefan@agner.ch
Signed-off-by: Stefan Agner
Reviewed-by: Andrew Morton
Acked-by: Ard Biesheuvel
Acked-by: Catalin Marinas [arm64]
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
30 May, 2018
3 commits
-
Add GLINK subdevice to allow definition of GLINK edge as a
child of modem-pil.Signed-off-by: Sibi Sankar
Signed-off-by: Bjorn Andersson -
From SDM845, the Q6SS reset sequence on software side has been
simplified with the introduction of boot FSM which assists in
bringing the Q6 out of reset.SDM845 brings a new reset signal ALT_RESET which is a part of
the MSS subsystem hence requires reset clks to be enabled before
assert/deassert. Use the SoC specific reset helper function to
add support for ALT_RESET in SDM845.Signed-off-by: Sibi Sankar
Signed-off-by: Bjorn Andersson -
Adding reset assert/deassert helper functions to handle SoC
specific reset sequences. This wil be used by SDM845 to assert and
deassert ALT_RESET and MSS_RESET signals.Signed-off-by: Sibi Sankar
Signed-off-by: Bjorn Andersson
22 May, 2018
2 commits
-
Introduce interrupt handler for smp2p ready interrupt to
handle start completion. Move the proxy votes for clocks
and regulators to the handover interrupt context.Signed-off-by: Sibi Sankar
[bjorn: Only proxy unvote if handover irq has not fired]
Signed-off-by: Bjorn Andersson -
q6v5_request_irq() was supposed to return the irq number, but ret is
overwritten by the request_irq(), fix this and return the IRQ on
success.Signed-off-by: Bjorn Andersson
10 May, 2018
4 commits
-
Checkpatch recommends to use octal perms instead of S_IRUGO.
Signed-off-by: Bartosz Golaszewski
Reviewed-by: Sekhar Nori
Acked-by: Suman Anna
Signed-off-by: Bjorn Andersson -
We're currently switching the platform to using the common clock
framework. We need to explicitly prepare and unprepare the rproc
clock.Signed-off-by: Bartosz Golaszewski
Acked-by: Suman Anna
Reviewed-by: David Lechner
Reviewed-by: Sekhar Nori
Signed-off-by: Bjorn Andersson -
The davinci platform is being switched to using the common clock
framework, where clk_enable() can fail. Add the return value check.Signed-off-by: Bartosz Golaszewski
Acked-by: Suman Anna
Reviewed-by: David Lechner
Reviewed-by: Sekhar Nori
Signed-off-by: Bjorn Andersson -
Pick up fixes from rproc-v4.17-1
Signed-off-by: Bjorn Andersson
26 Apr, 2018
3 commits
-
Remove dependencies on HAS_DMA where a Kconfig symbol depends on another
symbol that implies HAS_DMA, and, optionally, on "|| COMPILE_TEST".
In most cases this other symbol is an architecture or platform specific
symbol, or PCI.Generic symbols and drivers without platform dependencies keep their
dependencies on HAS_DMA, to prevent compiling subsystems or drivers that
cannot work anyway.This simplifies the dependencies, and allows to improve compile-testing.
Signed-off-by: Geert Uytterhoeven
Reviewed-by: Mark Brown
Acked-by: Robin Murphy
Acked-by: Bjorn Andersson
Signed-off-by: Bjorn Andersson -
Add missing of_node_put()s at two places for device nodes returned by
of_parse_phandle().Fixes: 051fb70fd4ea ("remoteproc: qcom: Driver for the self-authenticating
Hexagon v5")
Signed-off-by: Tobias Jordan
Signed-off-by: Bjorn Andersson -
Fix rproc_add_subdev parameter name and inverse the crashed logic.
Fixes: 880f5b388252 ("remoteproc: Pass type of shutdown to subdev remove")
Reviewed-by: Alex Elder
Signed-off-by: Arnaud Pouliquen
Signed-off-by: Bjorn Andersson
18 Apr, 2018
1 commit
-
Any failure in the secure call for transferring mem ownership of mba
region to Q6 would result in reporting that the remoteproc device
is running. This is because the previous q6v5_clk_enable would have
been a success. Prevent this by updating variable 'ret' accordingly.Cc: stable@vger.kernel.org
Signed-off-by: Sibi Sankar
Signed-off-by: Bjorn Andersson
06 Apr, 2018
1 commit
-
Currently calling list_del on smd subdev remove path results in
null pointer dereference on glink only platforms. Fix this by
adding safety checks in glink/smd subdev remove paths.Signed-off-by: Sibi Sankar
Signed-off-by: Bjorn Andersson
28 Mar, 2018
1 commit
-
Access to the socket API and the root network namespace is only available
when networking is enabled:ERROR: "kernel_sendmsg" [drivers/soc/qcom/qmi_helpers.ko] undefined!
ERROR: "sock_release" [drivers/soc/qcom/qmi_helpers.ko] undefined!
ERROR: "sock_create_kern" [drivers/soc/qcom/qmi_helpers.ko] undefined!
ERROR: "kernel_getsockname" [drivers/soc/qcom/qmi_helpers.ko] undefined!
ERROR: "init_net" [drivers/soc/qcom/qmi_helpers.ko] undefined!
ERROR: "kernel_recvmsg" [drivers/soc/qcom/qmi_helpers.ko] undefined!Adding a dependency on CONFIG_NET lets us build it in all randconfig
builds.Fixes: 9b8a11e82615 ("soc: qcom: Introduce QMI encoder/decoder")
Acked-by: Andy Gross
Signed-off-by: Arnd Bergmann
Signed-off-by: Bjorn Andersson
19 Mar, 2018
3 commits
-
We can return directly at the beginning of the function and save the 'err'
label.
We can also explicitly return 0 when the probe succeed.Signed-off-by: Christophe JAILLET
Signed-off-by: Bjorn Andersson -
Avoid some code ducplication and be more future-proof.
Signed-off-by: Christophe JAILLET
Signed-off-by: Bjorn Andersson -
If 'of_device_get_match_data()' fails, we must undo the previous
'rproc_alloc()' call.Fixes: a0ff4aa6f010 ("remoteproc: imx_rproc: add a NXP/Freescale imx_rproc driver")
Signed-off-by: Christophe JAILLET
Signed-off-by: Bjorn Andersson
13 Feb, 2018
3 commits
-
The sysmon client communicates either via a dedicated SMD/GLINK channel
or via QMI encoded messages over IPCROUTER with remote processors in
order to perform graceful shutdown and inform about other remote
processors shutting down.Acked-By: Chris Lew
Signed-off-by: Bjorn Andersson -
remoteproc instances can be stopped either by invoking shutdown or by an
attempt to recover from a crash. For some subdev types it's expected to
clean up gracefully during a shutdown, but are unable to do so during a
crash - so pass this information to the subdev remove functions.Acked-By: Chris Lew
Signed-off-by: Bjorn Andersson -
Register MDT segments with the remoteproc core dump functionality in
order to include them in a core dump, in case of a recovery of the remote
processor.Signed-off-by: Sarangdhar Joshi
Signed-off-by: Bjorn Andersson