20 Jan, 2017
2 commits
-
commit 1d701d3dd8caf6660ff33c3c23a115b4649c5cdb upstream.
Fix to return a negative error code from the st_rproc_state() error
handling case instead of 0, as done elsewhere in this function.Fixes: 63edb0310a5c ("remoteproc: Supply controller driver for ST's Remote Processors")
Signed-off-by: Wei Yongjun
Signed-off-by: Bjorn Andersson
Signed-off-by: Greg Kroah-Hartman -
commit 6de1a507c46bf22ed97043495b9ab96e4d5c213b upstream.
The tie between the main WCNSS driver and the IRIS driver causes a
circular dependency between the two modules. Neither part makes sense to
have on their own so lets merge them into one module.For the sake of picking up the clock and regulator resources described
in the iris of_node we need an associated struct device. But, to keep
the size of the patch down we continue to represent the IRIS part as its
own platform_driver, within the same module, rather than setting up a
dummy device.Fixes: aed361adca9f ("remoteproc: qcom: Introduce WCNSS peripheral image loader")
Reported-by: Andreas Färber
Signed-off-by: Bjorn Andersson
Signed-off-by: Greg Kroah-Hartman
07 Oct, 2016
1 commit
-
Pull rpmsg updates from Bjorn Andersson:
"The bulk of these patches involve splitting the rpmsg implementation
into a framework/API part and a virtio specific backend part. It then
adds the Qualcomm Shared Memory Device (SMD) as an additional
supported wire format.Also included is a set of code style cleanups that have been lingering
for a while"* tag 'rpmsg-v4.9' of git://github.com/andersson/remoteproc: (26 commits)
rpmsg: smd: fix dependency on QCOM_SMD=n
rpmsg: Introduce Qualcomm SMD backend
rpmsg: Allow callback to return errors
rpmsg: Move virtio specifics from public header
rpmsg: virtio: Hide vrp pointer from the public API
rpmsg: Hide rpmsg indirection tables
rpmsg: Split rpmsg core and virtio backend
rpmsg: Split off generic tail of create_channel()
rpmsg: Move helper for finding rpmsg devices to core
rpmsg: Move endpoint related interface to rpmsg core
rpmsg: Indirection table for rpmsg_endpoint operations
rpmsg: Move rpmsg_device API to new file
rpmsg: Introduce indirection table for rpmsg_device operations
rpmsg: Clean up rpmsg device vs channel naming
rpmsg: Make rpmsg_create_ept() take channel_info struct
rpmsg: rpmsg_send() operations takes rpmsg_endpoint
rpmsg: Name rpmsg devices based on channel id
rpmsg: Enable matching devices with drivers based on DT
rpmsg: Drop prototypes for non-existing functions
samples/rpmsg: add support for multiple instances
...
03 Oct, 2016
3 commits
-
Lock the implementation as we hand out references to client drivers
rather than when they try to boot the remote processor. This allows
auto-booting remote processors to be shut down by unloading their
module, in addition to first unbinding them.Signed-off-by: Bjorn Andersson
-
In order to be able to lock a rproc driver implementations only when
used by a client, we must differ between the dereference operation of a
client and the implementation itself.This patch brings no functional change.
Signed-off-by: Bjorn Andersson
-
The freeing of resources will attempt to clear values previously set in
the cached resource table, so make sure to free the table after we have
cleaned up the resources.Fixes: 988d204cdaf6 ("remoteproc: Move handling of cached table to boot/shutdown")
Signed-off-by: Bjorn Andersson
20 Sep, 2016
1 commit
-
rproc_alloc() will make sure that the "firmware" pointer is either a
driver supplied value or pointing to a generated firmware filename, it
can't be NULL. So drop the extra check in the rproc_boot() path.Signed-off-by: Bjorn Andersson
09 Sep, 2016
1 commit
-
Extract the now indirect rpmsg_create_ept() interface to a separate
file and start building up a rpmsg core.Signed-off-by: Bjorn Andersson
07 Sep, 2016
1 commit
-
In current implementation, struct fw_rsc_vdev_vring which describes
vring resource in firmware resource table owns only device address,
because it assumes that host is responsible of vring allocation and
only device address is needed by coprocessor.
But if vrings need to be fixed in system memory map for any reasons
(security, SoC charactieristics...), physical address is needed exatly
identified the memory chunck by host.For that let's transform reserved field of struct fw_rsc_vdev_vring
to pa (physical address).Signed-off-by: Loic Pallardy
Signed-off-by: Bjorn Andersson
23 Aug, 2016
1 commit
-
In case of error, the function devm_ioremap_resource() returns ERR_PTR()
and never returns NULL. The NULL test in the return value check should
be replaced with IS_ERR().Signed-off-by: Wei Yongjun
Signed-off-by: Bjorn Andersson
19 Aug, 2016
2 commits
-
This introduces the peripheral image loader, for loading WCNSS firmware
and boot the core on e.g. MSM8974. The firmware is verified and booted
with the help of the Peripheral Authentication System (PAS) in
TrustZone.Tested-by: John Stultz
Signed-off-by: Bjorn Andersson
Signed-off-by: Bjorn Andersson -
In the case that we have a resource table, but not a loaded one we
should leave the table_ptr intact, as subsequent resource handling could
otherwise dereference the NULL pointer.Signed-off-by: Bjorn Andersson
18 Aug, 2016
4 commits
-
As we moved the vdev handling to the main boot/shutdown code path we can
further simplify the resource table handling by moving the parsing spet
to boot as well. The lifespan of the resource table is changed to live
from rproc_boot() to rproc_shutdown().Cc: Lee Jones
Cc: Loic Pallardy
Signed-off-by: Bjorn Andersson -
The newly introduced "always-on" flag allows us to stop giving the vdevs
special treatment. The ordering of resource allocation and life cycle of
the remote processor is kept intact.This allows us to mark a remote processor with vdevs to not boot unless
explicitly requested to do so by a client driver.Cc: Lee Jones
Cc: Loic Pallardy
Signed-off-by: Bjorn Andersson -
The calculation of max_notifyid must only be done before we call start()
on the remoteproc drivers, so move the calculation to be part of the
loading steps.Cc: Lee Jones
Cc: Loic Pallardy
Signed-off-by: Bjorn Andersson -
Introduce an "auto-boot" flag on rprocs to make it possible to flag
remote processors without vdevs to automatically boot once the firmware
is found.Preserve previous behavior of the wkup_m3 processor being explicitly
booted by a consumer.Cc: Lee Jones
Cc: Loic Pallardy
Cc: Suman Anna
Signed-off-by: Bjorn Andersson
13 Aug, 2016
8 commits
-
The omap_mbox_msg_send() is the legacy API for sending a mailbox
message. It has been replaced with the mbox_send_message() from
the mailbox framework. Revise the failure trace to print a generic
failure message instead of referencing the actual function name.Signed-off-by: Suman Anna
Signed-off-by: Bjorn Andersson -
This patch fixes some of the existing checkpatch warnings in OMAP
remoteproc code. The fixes are to the following warnings:
1. WARNING: missing space after return type
2. WARNING: Unnecessary space after function pointer name
3. CHECK: Alignment should match open parenthesisSigned-off-by: Suman Anna
Signed-off-by: Bjorn Andersson -
There are couple of debug statements that are printing hexadecimal
numbers without the leading 0x. Fix these and use the standard 0x%x
format specifier so that there is no confusion when looking at the
traces.Signed-off-by: Suman Anna
Signed-off-by: Bjorn Andersson -
This patch fixes the existing alignment checkpatch check
warnings of the type "Alignment should match open parenthesis"
in the remoteproc core source files.Signed-off-by: Suman Anna
Signed-off-by: Bjorn Andersson -
While there is nothing wrong with defining an unsigned integer
variable or argument using the bare unsigned type, it is better
to use the checkpatch preferred 'unsigned int' type.Signed-off-by: Suman Anna
Signed-off-by: Bjorn Andersson -
Fix the code formatting to use the kernel preferred style
of using the actual variables to determize the size using
the sizeof() operator.Signed-off-by: Suman Anna
Signed-off-by: Bjorn Andersson -
Fix couple of minor mis-spelled words in all the remoteproc
source files.Signed-off-by: Suman Anna
Signed-off-by: Bjorn Andersson -
The dma_addr_t types can be printed properly using the %pad
printk format-specifier, there is no need to resort to the
unsigned long long type-casting to deal with different possible
type sizes.Signed-off-by: Suman Anna
Signed-off-by: Bjorn Andersson
11 Aug, 2016
4 commits
-
Fix to return a negative error code from the state get failed error
handling case instead of 0, as done elsewhere in this function.Signed-off-by: Wei Yongjun
Signed-off-by: Bjorn Andersson -
These types of error prints are superfluous. The system will
pick up on OOM issues and let the user know.Signed-off-by: Lee Jones
Signed-off-by: Bjorn Andersson -
Trivial patch to clean up a couple of minor misgivings.
Signed-off-by: Lee Jones
Signed-off-by: Bjorn Andersson -
Before this patch, the dma_alloc_coherent() failure path printed out:
"dma_alloc_coherent err: 16760832"
... alluding to the Linux error code being 16760832, but seeing as
Linux error codes are all negative, this looks like a signed/unsigned
issue. In fact, the message is trying to print the length of the
requested memory region. Let's clear that up.While we're at it, let's standardise the way 'len' is printed. In
all other locations 'len' is in hex prefixed by a '0x' for clarity.Signed-off-by: Lee Jones
Signed-off-by: Bjorn Andersson
04 Aug, 2016
1 commit
-
The dma-mapping core and the implementations do not change the DMA
attributes passed by pointer. Thus the pointer can point to const data.
However the attributes do not have to be a bitfield. Instead unsigned
long will do fine:1. This is just simpler. Both in terms of reading the code and setting
attributes. Instead of initializing local attributes on the stack
and passing pointer to it to dma_set_attr(), just set the bits.2. It brings safeness and checking for const correctness because the
attributes are passed by value.Semantic patches for this change (at least most of them):
virtual patch
virtual context@r@
identifier f, attrs;@@
f(...,
- struct dma_attrs *attrs
+ unsigned long attrs
, ...)
{
...
}@@
identifier r.f;
@@
f(...,
- NULL
+ 0
)and
// Options: --all-includes
virtual patch
virtual context@r@
identifier f, attrs;
type t;@@
t f(..., struct dma_attrs *attrs);@@
identifier r.f;
@@
f(...,
- NULL
+ 0
)Link: http://lkml.kernel.org/r/1468399300-5399-2-git-send-email-k.kozlowski@samsung.com
Signed-off-by: Krzysztof Kozlowski
Acked-by: Vineet Gupta
Acked-by: Robin Murphy
Acked-by: Hans-Christian Noren Egtvedt
Acked-by: Mark Salter [c6x]
Acked-by: Jesper Nilsson [cris]
Acked-by: Daniel Vetter [drm]
Reviewed-by: Bart Van Assche
Acked-by: Joerg Roedel [iommu]
Acked-by: Fabien Dessenne [bdisp]
Reviewed-by: Marek Szyprowski [vb2-core]
Acked-by: David Vrabel [xen]
Acked-by: Konrad Rzeszutek Wilk [xen swiotlb]
Acked-by: Joerg Roedel [iommu]
Acked-by: Richard Kuo [hexagon]
Acked-by: Geert Uytterhoeven [m68k]
Acked-by: Gerald Schaefer [s390]
Acked-by: Bjorn Andersson
Acked-by: Hans-Christian Noren Egtvedt [avr32]
Acked-by: Vineet Gupta [arc]
Acked-by: Robin Murphy [arm64 and dma-iommu]
Signed-off-by: Andrew Morton
Signed-off-by: Linus Torvalds
15 Jul, 2016
2 commits
-
As reported by Dan the unsigned "val" can't be negative. But instead
correcting the check for early errors here followed by a wait for the
validation result to show the error or success we can consolidate these
two parts of the validation process into the validation function.Reported-by: Dan Carpenter
Signed-off-by: Bjorn Andersson -
There is a error message within devm_ioremap_resource
already, so remove the dev_err call to avoid redundant
error message.Signed-off-by: Wei Yongjun
Signed-off-by: Bjorn Andersson
14 Jul, 2016
1 commit
-
This driver supports bringing the Q6V5 out of reset, load and drive
the self-authenticating boot loader and use this to load the mdt and
subsequent bXX files.Signed-off-by: Bjorn Andersson
Acked-by: Srinivas Kandagatla
Signed-off-by: Bjorn Andersson
15 Jun, 2016
1 commit
-
rproc_add adds the newly created remoteproc to a list for use by
rproc_get_by_phandle and then does some additional processing to finish
adding the remoteproc. This leaves a small window of time in which the
rproc is available in the list but not yet fully initialized, so if
another driver comes along and gets a handle to the rproc, it will be
invalid. Rearrange the code in rproc_add to make sure the rproc is added
to the list only after it has been successfuly initialized.Fixes: fec47d863587 ("remoteproc: introduce rproc_get_by_phandle API")
Cc: stable@vger.kernel.org
Signed-off-by: Dave Gerlach
Signed-off-by: Bjorn Andersson
13 May, 2016
2 commits
-
The Qualcomm WCNSS can crash by watchdog or a fatal software error. Add
these types to the list of remoteproc crash reasons.Signed-off-by: Bjorn Andersson
Signed-off-by: Bjorn Andersson -
Remote processors like the ones found in the Qualcomm SoCs does not have
a resource table passed to them, so make it optional by only populating
it if it does exist.Signed-off-by: Bjorn Andersson
Signed-off-by: Bjorn Andersson
07 May, 2016
1 commit
-
By default, rproc_fw_boot() needs to wait for rproc to be configured,
but a race may occur when using rpmsg/virtio. In this case, it can
be called locally in a safe manor.This patch represents two usecases:
- External call (via exported rproc_boot()), which waits
- Internal call can use 'nowait' version of rproc_boot()Signed-off-by: Fabrice Gasnier
Signed-off-by: Lee Jones
Signed-off-by: Bjorn Andersson
29 Mar, 2016
1 commit
-
syscon_regmap_lookup_by_phandle() returns either a valid pointer to
struct regmap or ERR_PTR() error value, check for NULL is invalid and
on error path may lead to oops, the change corrects the check.Signed-off-by: Vladimir Zapolskiy
Acked-by: Lee Jones
Signed-off-by: Bjorn Andersson
30 Jan, 2016
3 commits
-
Signed-off-by: Ludovic Barre
Signed-off-by: Lee Jones
Signed-off-by: Bjorn Andersson -
This functionality is especially useful during the testing phase. When
used in conjunction with Mailbox's Test Framework we can trivially conduct
end-to-end testing i.e. boot co-processor, send and receive messages to
the co-processor, then shut it down again (repeat as required).Signed-off-by: Ludovic Barre
Signed-off-by: Lee Jones
Signed-off-by: Bjorn Andersson -
If 'count' value is invalid, return -EINVAL.
Signed-off-by: Lee Jones
[bjorn: changed commit message]
Signed-off-by: Bjorn Andersson