summaryrefslogtreecommitdiffstats
path: root/drivers/remoteproc
Commit message (Collapse)AuthorAgeFilesLines
...
* | remoteproc: qcom: q6v5: Decouple driver from MDT loaderBjorn Andersson2017-02-062-57/+90
| | | | | | | | | | | | | | | | | | | | Rather than duplicating half of the MDT loader in the validation step move the entire MDT parser into the q6v5 driver. This allows us to make the shared MDT-loader call the SCM PAS operations directly which simplifies the client code and allows for better reuse of the code. Cc: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: qcom: q6v5: Remove mss supply from 8916Bjorn Andersson2017-02-061-8/+3
| | | | | | | | | | | | | | The Q6V5 in MSM8916 doesn't have a mss supply, so remove this and update the code to support cases without proxy or active supplies. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: qcom: fix initializers for qcom_mss_reg_res arrayArnd Bergmann2017-02-011-2/+2
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | The recently added initialization is rather unusual because it uses a constructor for a variable-length array to assign a constant structure to a member that uses a fixed-length array. This confuses clang and breaks the build. drivers/remoteproc/qcom_q6v5_pil.c:1024:18: error: incompatible pointer types initializing 'const char *' with an expression of type :%s 'struct qcom_mss_reg_res [4]' [-Werror,-Wincompatible-pointer-types] .proxy_supply = (struct qcom_mss_reg_res[]) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ drivers/remoteproc/qcom_q6v5_pil.c:1024:18: warning: suggest braces around initialization of subobject [-Wmissing-braces] .proxy_supply = (struct qcom_mss_reg_res[]) { ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~ We can either turn this constructor into a regular initializer by removing the 'struct qcom_mss_reg_res[])', or we can make the array variable length. The latter approach is used for the arrays of strings in the same structure, so let's use that here too. Fixes: 19f902b53b47 ("remoteproc: qcom: Initialize and enable proxy and active regulators.") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: Drop firmware_loading_completeSarangdhar Joshi2017-01-301-11/+11
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | firmware_loading_complete is used to synchronize operations on rproc while asynchronous firmware loading is in progress. However, rproc_boot() no longer waits on firmware_loading_complete. Hence drop this completion variable altogether and handle the race between rproc_del() and rproc_boot() using new state RPROC_DELETED. The request_firmware_nowait() will hold the reference to rproc device by using a get_device()/put_device(), so the rproc struct will remain valid even when we return from rproc_del() before the asynchronous call to rproc_fw_config_virtio() completes. CC: Loic Pallardy <loic.pallardy@st.com> CC: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: Add RPROC_DELETED stateSarangdhar Joshi2017-01-301-0/+1
| | | | | | | | | | | | | | | | | | | | | | Add new state RPROC_DELETED to handle synchronization between rproc_del() and other operations on rproc. This state represents the rproc device that has been "deleted". CC: Loic Pallardy <loic.pallardy@st.com> CC: Bjorn Andersson <bjorn.andersson@linaro.org> Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: Move rproc_delete_debug_dir() to rproc_del()Sarangdhar Joshi2017-01-301-2/+2
| | | | | | | | | | | | | | | | | | | | | | The "remoteproc{0,1...}" sysfs entries are added in rproc_add() and deleted in rproc_type_release() instead of in rproc_del(). That leaves these lingering entries sticking around after we return from rproc_del(). Move the rproc_delete_debug_dir() to rproc_del() to fix this. Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: qcom: Add SLPI rproc support to load and boot slpi proc.Avaneesh Kumar Dwivedi2017-01-301-1/+9
| | | | | | | | | | | | | | | | This patch add slpi remoteproc support in existing adsp rproc driver. Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org> [bjorn: documented aggre2 and px-supply] Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: qcom: Add additional agree2_clk and px regulator resource.Avaneesh Kumar Dwivedi2017-01-301-5/+38
| | | | | | | | | | | | | | | | | | | | This patch add additional clock and regulator resource which are initialized based on compatible and has no impact on existing driver working. This resourse addition enable the existing driver to handle. low pass sensor processor device also. Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: qcom: Compatible string based resource initialization.Avaneesh Kumar Dwivedi2017-01-301-14/+33
| | | | | | | | | | | | | | | | | | This patch initialize certain driver related data based on compatible string. This enable driver to handle more than one similar device in by differentiating in probe their private data. Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | drivers: remoteproc: constify rproc_ops structuresBhumika Goyal2017-01-185-5/+5
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Declare rproc_ops structures as const as they are only passed as an argument to the function rproc_alloc. This argument is of type const, so rproc_ops structures having this property can be declared const too. Done using Coccinelle: @r1 disable optional_qualifier @ identifier i; position p; @@ static struct rproc_ops i@p = {...}; @ok1@ identifier r1.i; position p; @@ rproc_alloc(...,&i@p,...) @bad@ position p!={r1.p,ok1.p}; identifier r1.i; @@ i@p @depends on !bad disable optional_qualifier@ identifier r1.i; @@ +const struct rproc_ops i; File size details: Size of the file remoteproc/da8xx_remoteproc.o remains the same before and after applying the changes. text data bss dec hex filename 1312 100 4 1416 588 remoteproc/da8xx_remoteproc.o 1312 100 4 1416 588 remoteproc/da8xx_remoteproc.o 970 240 0 1210 4ba remoteproc/omap_remoteproc.o 1002 192 0 1194 4aa remoteproc/omap_remoteproc.o 1901 240 0 2141 85d remoteproc/st_remoteproc.o 1933 192 0 2125 84d remoteproc/st_remoteproc.o 1288 96 0 1384 568 remoteproc/st_slim_rproc.o 1320 64 0 1384 568 remoteproc/st_slim_rproc.o 2121 240 0 2361 939 remoteproc/wkup_m3_rproc.o 2161 192 0 2353 931 remoteproc/wkup_m3_rproc.o Signed-off-by: Bhumika Goyal <bhumirks@gmail.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: qcom: Initialize and enable proxy and active regulators.Avaneesh Kumar Dwivedi2017-01-181-50/+169
| | | | | | | | | | | | | | | | | | | | | | | | Certain regulators need voting by rproc on behalf of hexagon only during restart operation but certain regulator need to be voted till hexagon is up, these regulators are identified as proxy and active regulators respectively. This patch provide interface to initialize, enable and disable proxy and active regulators separately. Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org> [bjorn: dropped disable of proxy regulators from stop] Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: qcom: Initialize and enable proxy and active clocks.Avaneesh Kumar Dwivedi2017-01-181-42/+109
| | | | | | | | | | | | | | | | | | | | | | | | Certain clocks need voting by rproc on behalf of hexagon only during restart operation but certain clocks need to be voted till hexagon is up, these clocks are identified as proxy and active clocks respectively. This patch provide interface to initialize, enable and disable proxy and active clocks separately. Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org> [bjorn: dropped disable of proxy clocks on stop] Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: qcom: Compatible string based private resource initialization.Avaneesh Kumar Dwivedi2017-01-181-3/+22
| | | | | | | | | | | | | | | | | | | | | | | | MSS rproc loader need chip specific resources initialization during probe to load and boot modem firmware, this need compatible string based differentiation in resources to be initialized. This patch add and provide a template struct whose fields represent all those resources which are needed to load and boot modem fw and which may differ from chip to chip. This patch also add new compatible string for msm8916, msm8974 platform. Signed-off-by: Avaneesh Kumar Dwivedi <akdwived@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: add some kind of helpPavel Machek2017-01-181-2/+5
|/ | | | | | | | | Top level config option without any kind of help... is kind of strange. Remote processors could also mean some kind of distributed computing... Signed-off-by: Pavel Machek <pavel@ucw.cz> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* Revert "remoteproc: Merge table_ptr and cached_table pointers"Bjorn Andersson2016-12-301-10/+16
| | | | | | | | | | | | | | | Following any fw_rsc_vdev entries in the resource table are two variable length arrays, the first one reference vring resources and the second one is the virtio config space. The virtio config space is used by virtio to communicate status and configuration changes and must as such be shared with the remote. The reverted commit incorrectly made any changes to the virtio config space only affect the local copy, in an attempt to allowing memory protection of the shared resource table. This reverts commit cda8529346935fc86f476999ac4fbfe4e17abf11. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: fix vdev reference managementLoic Pallardy2016-12-301-3/+0
| | | | | | | | | | | | | | | | | | | Commit 2b45cef5868a ("remoteproc: Further extend the vdev life cycle") extends kref support for vdev management. It introduces a regression when following sequence is executed: rproc_boot --> rproc_shutdown --> rproc_boot Second rproc_boot call crashes on register_virtio_device as device is already existing. Issue is previous vdev is never released when rproc is stop because associated refcount is too high. kref_get introduces is not needed as kref_init already initializes krefcount to 1 because it considers associated variable as used. This introduces a misalignment between kref_get and kref_put calls. Fixes: 2b45cef5868a ("remoteproc: Further extend the vdev life cycle") Signed-off-by: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: qcom_adsp_pil: select qcom_scmArnd Bergmann2016-12-091-0/+1
| | | | | | | | | | | | | | | | | | The adsp-pil driver relies on SCM and causes a build error without it: ERROR: "qcom_scm_pas_supported" [drivers/remoteproc/qcom_adsp_pil.ko] undefined! ERROR: "qcom_scm_is_available" [drivers/remoteproc/qcom_adsp_pil.ko] undefined! ERROR: "qcom_scm_pas_auth_and_reset" [drivers/remoteproc/qcom_adsp_pil.ko] undefined! ERROR: "qcom_scm_pas_shutdown" [drivers/remoteproc/qcom_adsp_pil.ko] undefined! ERROR: "qcom_scm_pas_mem_setup" [drivers/remoteproc/qcom_adsp_pil.ko] undefined! ERROR: "qcom_scm_pas_init_image" [drivers/remoteproc/qcom_adsp_pil.ko] undefined! This adds a 'select', as SCM is a silent Kconfig symbol that gets enabled implicitly by all its users. Fixes: b9e718e950c3 ("remoteproc: Introduce Qualcomm ADSP PIL") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: Drop wait in __rproc_boot()Bjorn Andersson2016-12-091-19/+3
| | | | | | | | | | | | | | In the event that rproc_boot() is called before the firmware loaded completion has been flagged it will wait with the mutex held, obstructing the request_firmware_nowait() callback from completing the wait. As rproc_fw_config_virtio() has been reduced to only triggering auto-boot there is no longer a reason for waiting in rproc_boot(), so drop this. Cc: Sarangdhar Joshi <spjoshi@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc/ste: Delete unused driverJean Delvare2016-12-093-353/+0
| | | | | | | | | | | | | | | | | | | | Back in July 2014 I asked around what was the intended target platform for the STE Modem remoteproc driver, so that I could add the proper hardware dependency to its config option. The answer I got was that there was no known publicly available hardware needing it and it was unlikely that there ever would. So I think it's time to delete this driver to lower the maintenance burden. Signed-off-by: Jean Delvare <jdelvare@suse.de> Cc: Linus Walleij <linus.walleij@linaro.org> Cc: Ohad Ben-Cohen <ohad@wizery.com> Cc: Bjorn Andersson <bjorn.andersson@linaro.org> Cc: Suman Anna <s-anna@ti.com> Acked-by: Linus Walleij <linus.walleij@linaro.org> Acked-by: Loic Pallardy <loic.pallardy@st.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: Remove "experimental" warningBjorn Andersson2016-12-091-3/+0
| | | | | | | | | | | Warning users that remoteproc and it's binary format are under development doesn't serve much of a purpose. Different drivers support different image formats and the resource table has a version field that would need to be bumped when incompatible changes are introduced. So lets drop this warning to clean up the kernel log. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: qcom_adsp_pil: select qcom_scmArnd Bergmann2016-12-091-0/+1
| | | | | | | | | | | | | | | | | | The adsp-pil driver relies on SCM and causes a build error without it: ERROR: "qcom_scm_pas_supported" [drivers/remoteproc/qcom_adsp_pil.ko] undefined! ERROR: "qcom_scm_is_available" [drivers/remoteproc/qcom_adsp_pil.ko] undefined! ERROR: "qcom_scm_pas_auth_and_reset" [drivers/remoteproc/qcom_adsp_pil.ko] undefined! ERROR: "qcom_scm_pas_shutdown" [drivers/remoteproc/qcom_adsp_pil.ko] undefined! ERROR: "qcom_scm_pas_mem_setup" [drivers/remoteproc/qcom_adsp_pil.ko] undefined! ERROR: "qcom_scm_pas_init_image" [drivers/remoteproc/qcom_adsp_pil.ko] undefined! This adds a 'select', as SCM is a silent Kconfig symbol that gets enabled implicitly by all its users. Fixes: b9e718e950c3 ("remoteproc: Introduce Qualcomm ADSP PIL") Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: qcom: mdt_loader: add include for sizesStanimir Varbanov2016-12-021-0/+1
| | | | | | | | | | | | | | | | | | | | | | | | Add linux/sizes.h to prevent build failure on non ARM architectures as: CC [M] drivers/remoteproc/qcom_mdt_loader.o In file included from include/linux/cache.h:4:0, from include/linux/printk.h:8, from include/linux/kernel.h:13, from include/asm-generic/bug.h:13, from arch/x86/include/asm/bug.h:35, from include/linux/bug.h:4, from include/linux/thread_info.h:11, from arch/x86/include/asm/elf.h:7, from include/linux/elf.h:4, from drivers/remoteproc/qcom_mdt_loader.c:18: drivers/remoteproc/qcom_mdt_loader.c: In function ‘qcom_mdt_parse’: drivers/remoteproc/qcom_mdt_loader.c:90:52: error: ‘SZ_4K’ undeclared (first use in this function) Reviewed-by: Stephen Boyd <sboyd@codeaurora.org> Signed-off-by: Stanimir Varbanov <stanimir.varbanov@linaro.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: Update last rproc_put users to rproc_freeBjorn Andersson2016-11-192-4/+4
| | | | | | | | The transition from rproc_put to rproc_free raced with the review of the Qualcomm ADSP and ST SLIMproc drivers and these where not updated accordingly. Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: qcom: adsp: Add missing MODULE_DEVICE_TABLEBjorn Andersson2016-11-191-0/+1
| | | | Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: wcnss-pil: add QCOM_SMD dependencyArnd Bergmann2016-11-181-0/+1
| | | | | | | | | | | | | | | | When qcom_smd is a loadable module and wcnss-pil is built-in, we get a link error: drivers/remoteproc/qcom_wcnss_pil.o: In function `wcnss_smd_remove': qcom_wcnss_iris.c:(.text.wcnss_smd_remove+0x10): undefined reference to `qcom_smd_unregister_edge' drivers/remoteproc/qcom_wcnss_pil.o: In function `wcnss_smd_probe': qcom_wcnss_iris.c:(.text.wcnss_smd_probe+0x12): undefined reference to `qcom_smd_register_edge' This adds a Kconfig dependency to avoid this. We can still allow build-testing with SMD disabled. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: Add support for xo clockSarangdhar Joshi2016-11-161-1/+29
| | | | | | | | | | Add xo clock support required to boot up Qualcomm ADSP processor. The ADSP remoteproc driver keeps xo clock enabled until the driver receives "handover" irq, in order to allow ADSP processor to vote for xo clock with rpm. Signed-off-by: Sarangdhar Joshi <spjoshi@codeaurora.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* remoteproc: adsp-pil: fix recursive dependencyArnd Bergmann2016-11-161-1/+1
| | | | | | | | | | | | | | The newly added driver tries to 'select' a symbol that it has an implicit dependency on, which confuses Kconfig: subsection "Kconfig recursive dependency limitations" drivers/remoteproc/Kconfig:3: symbol REMOTEPROC is selected by QCOM_ADSP_PIL As REMOTEPROC is itself user-visible, we clearly should not select it from a driver, removing the line fixes the problem. Signed-off-by: Arnd Bergmann <arnd@arndb.de> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* Merge branch 'topic/st_fdma' of ↵Bjorn Andersson2016-11-163-9/+381
|\ | | | | | | git://git.kernel.org/pub/scm/linux/kernel/git/vkoul/slave-dma into rproc-next
| * remoteproc: Update Kconfig setup to 'depends on REMOTEPROC'Peter Griffin2016-10-181-8/+12
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Make REMOTEPROC core a selectable kconfig option, and update remoteproc client drivers to 'depends on' the core. This avoids some nasty Kconfig recursive dependency issues. Also when using menuconfig client drivers will be hidden until the core has been enabled. Documentation/kbuild/kconfig-language.txt: Note: select should be used with care. select will force a symbol to a value without visiting the dependencies. By abusing select you are able to select a symbol FOO even if FOO depends on BAR that is not set. In general use select only for non-visible symbols (no prompts anywhere) and for symbols with no dependencies. That will limit the usefulness but on the other hand avoid the illegal configurations all over. Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
| * remoteproc: st_slim_rproc: add a slimcore rproc driverPeter Griffin2016-10-183-2/+370
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | slim core is used as a basis for many IPs in the STi chipsets such as fdma and demux. To avoid duplicating the elf loading code in each device driver a slim rproc driver has been created. This driver is designed to be used by other device drivers such as fdma, or demux whose IP is based around a slim core. The device driver can call slim_rproc_alloc() to allocate a slim rproc and slim_rproc_put() when finished. This driver takes care of ioremapping the slim registers (dmem, imem, slimcore, peripherals), whose offsets and sizes can change between IP's. It also obtains and enables any clocks used by the device. This approach avoids having a double mapping of the registers as slim_rproc does not register its own platform device. It also maps well to device tree abstraction as it allows us to have one dt node for the whole device. All of the generic rproc elf loading code can be reused, and we provide start() stop() hooks to start and stop the slim core once the firmware has been loaded. This has been tested successfully with fdma driver. Signed-off-by: Peter Griffin <peter.griffin@linaro.org> Signed-off-by: Vinod Koul <vinod.koul@intel.com>
* | remoteproc: Introduce Qualcomm ADSP PILBjorn Andersson2016-11-153-0/+411
| | | | | | | | | | | | | | | | | | The Qualcomm ADSP Peripheral Image Loader is used on a variety of different Qualcomm platforms for loading firmware into and controlling the Hexagon based ADSP. Signed-off-by: Bjorn Andersson <bjorn.andersson@sonymobile.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: qcom_wcnss: Fix circular module dependencyBjorn Andersson2016-11-145-16/+29
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | 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 <afaerber@suse.de> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: Merge table_ptr and cached_table pointersBjorn Andersson2016-11-141-16/+10
| | | | | | | | | | | | | | | | | | | | | | | | 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-141-11/+0
| | | | | | | | | | | | | | 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-141-10/+5
| | | | | | | | | | | | | | | | 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-141-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-141-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-142-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-143-4/+17
| | | | | | | | | | | | No functional change Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
* | remoteproc: wcnss: Bond SMD edge to remoteprocBjorn Andersson2016-11-141-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-091-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-10-311-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-10-311-71/+0
| | | | | | | | | | | | | | | | 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-10-314-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-181-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-181-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-181-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-181-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-061-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-081-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>
OpenPOWER on IntegriCloud