summaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc
Commit message (Collapse)AuthorAgeFilesLines
...
* | remoteproc: Merge table_ptr and cached_table pointersBjorn Andersson2016-11-151-16/+10Star
| | | | | | | | | | | | | | | | | | | | | | | | As all vdev resources are allocated before we boot the remote processor we no longer need to support modifying the resource table while the remote is running. This saves us from the table_ptr dance, but more importantly allow the remote processor to enable security lock down of the loaded table memory region. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: Remove custom vdev handler listBjorn Andersson2016-11-151-11/+0Star
| | | | | | | | | | | | | | The vdev handler is now just another resource allocator, so handle all resource types in a single pass. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: Update max_notifyid as we allocate vringsBjorn Andersson2016-11-151-10/+5Star
| | | | | | | | | | | | | | | | Vrings are now allocated as we parse the resource table, before we boot the rproc or register any virtio devices, so it's safe to bump max_notifyid as part of this process. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: Decouple vdev resources and devicesBjorn Andersson2016-11-151-15/+20
| | | | | | | | | | | | | | | | Represent the virtio device part of the vdev resources as remoteproc subdevices to finalize the decoupling of the virtio resource and device handling. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: Further extend the vdev life cycleBjorn Andersson2016-11-151-1/+6
| | | | | | | | | | | | | | | | Tie the vdev (and hence vring) life cycle to the resource parsing and resource cleanup operations, allowing us to safely register and unregister virtio devices on the go. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: virtio: Anchor vring life cycle in vdevBjorn Andersson2016-11-152-6/+21
| | | | | | | | | | | | | | | | | | Instead of having the vrings being allocated and freed as they are requested by the virtio device tie their life cycle to the vdev resource. This allows us to decouple the vdev resource management from the virtio device management. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: Assign kref to rproc_vdevBjorn Andersson2016-11-153-4/+17
| | | | | | | | | | | | No functional change Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: wcnss: Bond SMD edge to remoteprocBjorn Andersson2016-11-151-0/+27
| | | | | | | | | | | | | | | | | | | | | | | | Allow the wcnss smd edge to be described as a child of the wcnss remoteproc node and make the edge life cycle follow the running state of the remoteproc. This bond is necessary to clean up the smd state when the remote processor is suddenly removed, and in some cases even when it shut down in a controlled fasion. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: Introduce subdevicesBjorn Andersson2016-11-101-0/+72
| | | | | | | | | | | | | | | | | | A subdevice is an abstract entity that can be used to tie actions to the booting and shutting down of a remote processor. The subdevice object is expected to be embedded in concrete implementations, allowing for a variety of use cases to be implemented. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: st: Fix error return code in st_rproc_probe()Wei Yongjun2016-11-011-1/+3
| | | | | | | | | | | | | | | | | | 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 <weiyongjun1@huawei.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: debugfs: Remove state entry which is duplicated is sysfsMatt Redfearn2016-11-011-71/+0Star
| | | | | | | | | | | | | | | | Since there is now an always available state file in sysfs with the same function as this one in debugfs, remove the redundant entry. Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: Add a sysfs interface for firmware and stateMatt Redfearn2016-11-014-0/+160
| | | | | | | | | | | | | | | | | | | | | | | | | | This patch adds a sysfs interface to rproc allowing the firmware name and processor state to be changed dynamically. State was previously available in debugfs, and is replicated here. The firmware file allows retrieval of the running firmware name, and a new one to be specified at run time, so long as the remote processor has been stopped. Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: qcom: wcnss_iris: Fix module autoloadJavier Martinez Canillas2016-10-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/remoteproc/qcom_wcnss_iris.ko | grep alias $ After this patch: $ modinfo drivers/remoteproc/qcom_wcnss_iris.ko | grep alias alias: of:N*T*Cqcom,wcn3680C* alias: of:N*T*Cqcom,wcn3680 alias: of:N*T*Cqcom,wcn3660C* alias: of:N*T*Cqcom,wcn3660 alias: of:N*T*Cqcom,wcn3620C* alias: of:N*T*Cqcom,wcn3620 Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: qcom: wcnss: Fix module autoloadJavier Martinez Canillas2016-10-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/remoteproc/qcom_wcnss.ko | grep alias $ After this patch: $ modinfo drivers/remoteproc/qcom_wcnss.ko | grep alias alias: of:N*T*Cqcom,pronto-v2-pilC* alias: of:N*T*Cqcom,pronto-v2-pil alias: of:N*T*Cqcom,pronto-v1-pilC* alias: of:N*T*Cqcom,pronto-v1-pil alias: of:N*T*Cqcom,riva-pilC* alias: of:N*T*Cqcom,riva-pil Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: qcom: q6v5_pil: Fix module autoloadJavier Martinez Canillas2016-10-191-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | If the driver is built as a module, autoload won't work because the module alias information is not filled. So user-space can't match the registered device with the corresponding module. Export the module alias information using the MODULE_DEVICE_TABLE() macro. Before this patch: $ modinfo drivers/remoteproc/qcom_q6v5_pil.ko | grep alias $ After this patch: $ modinfo drivers/remoteproc/qcom_q6v5_pil.ko | grep alias alias: of:N*T*Cqcom,q6v5-pilC* alias: of:N*T*Cqcom,q6v5-pil Signed-off-by: Javier Martinez Canillas <javier@osg.samsung.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: Keep local copy of firmware nameMatt Redfearn2016-10-191-15/+16
|/ | | | | | | | | | | | | Storage of the firmware name was inconsistent, either storing a pointer to a name stored with unknown ownership, or a variable length tacked onto the end of the struct proc allocated in rproc_alloc. In preparation for allowing the firmware of an already allocated struct rproc to be changed, instead always keep a locally maintained copy of the firmware name. Signed-off-by: Matt Redfearn <matt.redfearn@imgtec.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* Merge tag 'rpmsg-v4.9' of git://github.com/andersson/remoteprocLinus Torvalds2016-10-071-2/+2
|\ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 ...
| * rpmsg: Move rpmsg_device API to new fileBjorn Andersson2016-09-091-2/+2
| | | | | | | | | | | | | | Extract the now indirect rpmsg_create_ept() interface to a separate file and start building up a rpmsg core. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: Refactor rproc module lockingBjorn Andersson2016-10-031-12/+8Star
| | | | | | | | | | | | | | | | | | 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 <bjorn.andersson@linaro.org>
* | remoteproc: Split driver and consumer dereferencingBjorn Andersson2016-10-038-17/+32
| | | | | | | | | | | | | | | | | | | | 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 <bjorn.andersson@linaro.org>
* | remoteproc: Correct resource handling upon boot failureBjorn Andersson2016-10-031-4/+5
| | | | | | | | | | | | | | | | | | 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 <bjorn.andersson@linaro.org>
* | remoteproc: Drop unnecessary NULL checkBjorn Andersson2016-09-201-7/+0Star
| | | | | | | | | | | | | | | | 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 <bjorn.andersson@linaro.org>
* | remoteproc: core: transform struct fw_rsc_vdev_vring reserved field in paLoic PALLARDY2016-09-061-6/+0Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <loic.pallardy@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: qcom: wcnss: Fix return value check in wcnss_probe()Wei Yongjun2016-08-231-2/+2
| | | | | | | | | | | | | | | | | | 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 <weiyongjun1@huawei.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: qcom: Introduce WCNSS peripheral image loaderBjorn Andersson2016-08-185-0/+852
| | | | | | | | | | | | | | | | | | | | | | 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 <john.stultz@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: Only update table_ptr if we have a loaded tableBjorn Andersson2016-08-181-10/+6Star
| | | | | | | | | | | | | | | | 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 <bjorn.andersson@linaro.org>
* | remoteproc: Move handling of cached table to boot/shutdownBjorn Andersson2016-08-181-37/+18Star
| | | | | | | | | | | | | | | | | | | | | | 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 <lee.jones@linaro.org> Cc: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: Move vdev handling to boot/shutdownBjorn Andersson2016-08-181-22/+15Star
| | | | | | | | | | | | | | | | | | | | | | | | | | 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 <lee.jones@linaro.org> Cc: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: Calculate max_notifyid during loadBjorn Andersson2016-08-181-12/+4Star
| | | | | | | | | | | | | | | | | | | | 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 <lee.jones@linaro.org> Cc: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: Introduce auto-boot flagBjorn Andersson2016-08-183-14/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <lee.jones@linaro.org> Cc: Loic Pallardy <loic.pallardy@st.com> Cc: Suman Anna <s-anna@ti.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc/omap: revise a minor error trace messageAnna, Suman2016-08-131-1/+2
| | | | | | | | | | | | | | | | | | | | 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 <s-anna@ti.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc/omap: fix various code formatting issuesAnna, Suman2016-08-131-1/+1
| | | | | | | | | | | | | | | | | | | | | | 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 parenthesis Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: print hex numbers with a leading 0x formatAnna, Suman2016-08-131-4/+4
| | | | | | | | | | | | | | | | | | | | 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 <s-anna@ti.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: align code with open parenthesisAnna, Suman2016-08-135-39/+39
| | | | | | | | | | | | | | | | | | 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 <s-anna@ti.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: fix bare unsigned type usageAnna, Suman2016-08-131-6/+6
| | | | | | | | | | | | | | | | | | 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 <s-anna@ti.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: use variable names for sizeof() operatorAnna, Suman2016-08-131-2/+2
| | | | | | | | | | | | | | | | | | 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 <s-anna@ti.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: fix couple of minor typosAnna, Suman2016-08-132-2/+2
| | | | | | | | | | | | | | | | Fix couple of minor mis-spelled words in all the remoteproc source files. Signed-off-by: Suman Anna <s-anna@ti.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: use proper format-specifier for printing dma_addr_tAnna, Suman2016-08-131-6/+6
| | | | | | | | | | | | | | | | | | | | 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 <s-anna@ti.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: qcom: hexagon: Fix error return code in q6v5_probe()Wei Yongjun2016-08-101-1/+3
| | | | | | | | | | | | | | | | 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 <weiyj.lk@gmail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: core: Remove pointless OOM printLee Jones2016-08-101-1/+0Star
| | | | | | | | | | | | | | | | 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 <lee.jones@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: core: Trivial: Improve error checking, spelling and debug printsLee Jones2016-08-101-6/+6
| | | | | | | | | | | | | | Trivial patch to clean up a couple of minor misgivings. Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: core: Ensure error message is clearLee Jones2016-08-101-2/+3
|/ | | | | | | | | | | | | | | | | 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 <lee.jones@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* dma-mapping: use unsigned long for dma_attrsKrzysztof Kozlowski2016-08-041-4/+3Star
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <k.kozlowski@samsung.com> Acked-by: Vineet Gupta <vgupta@synopsys.com> Acked-by: Robin Murphy <robin.murphy@arm.com> Acked-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no> Acked-by: Mark Salter <msalter@redhat.com> [c6x] Acked-by: Jesper Nilsson <jesper.nilsson@axis.com> [cris] Acked-by: Daniel Vetter <daniel.vetter@ffwll.ch> [drm] Reviewed-by: Bart Van Assche <bart.vanassche@sandisk.com> Acked-by: Joerg Roedel <jroedel@suse.de> [iommu] Acked-by: Fabien Dessenne <fabien.dessenne@st.com> [bdisp] Reviewed-by: Marek Szyprowski <m.szyprowski@samsung.com> [vb2-core] Acked-by: David Vrabel <david.vrabel@citrix.com> [xen] Acked-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com> [xen swiotlb] Acked-by: Joerg Roedel <jroedel@suse.de> [iommu] Acked-by: Richard Kuo <rkuo@codeaurora.org> [hexagon] Acked-by: Geert Uytterhoeven <geert@linux-m68k.org> [m68k] Acked-by: Gerald Schaefer <gerald.schaefer@de.ibm.com> [s390] Acked-by: Bjorn Andersson <bjorn.andersson@linaro.org> Acked-by: Hans-Christian Noren Egtvedt <egtvedt@samfundet.no> [avr32] Acked-by: Vineet Gupta <vgupta@synopsys.com> [arc] Acked-by: Robin Murphy <robin.murphy@arm.com> [arm64 and dma-iommu] Signed-off-by: Andrew Morton <akpm@linux-foundation.org> Signed-off-by: Linus Torvalds <torvalds@linux-foundation.org>
* remoteproc: qcom: hexagon: Clean up mpss validationBjorn Andersson2016-07-151-11/+7Star
| | | | | | | | | | 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 <dan.carpenter@oracle.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: qcom: remove redundant dev_err call in q6v5_init_mem()Wei Yongjun2016-07-151-6/+2Star
| | | | | | | | | 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 <yongjun_wei@trendmicro.com.cn> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: qcom: Driver for the self-authenticating Hexagon v5Bjorn Andersson2016-07-135-0/+1124
| | | | | | | | | | 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 <bjorn.andersson@sonymobile.com> Acked-by: Srinivas Kandagatla <srinivas.kandagatla@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: Fix potential race condition in rproc_addDave Gerlach2016-06-141-6/+9
| | | | | | | | | | | | | | | 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 <d-gerlach@ti.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: Add additional crash reasonsBjorn Andersson2016-05-131-0/+2
| | | | | | | | 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 <bjorn.andersson@sonymobile.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: core: Make the loaded resource table optionalBjorn Andersson2016-05-131-6/+2Star
| | | | | | | | | 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 <bjorn.andersson@sonymobile.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: core: Task sync during rproc_fw_boot()Lee Jones2016-05-063-3/+29
| | | | | | | | | | | | | | | 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 <fabrice.gasnier@st.com> Signed-off-by: Lee Jones <lee.jones@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>