summaryrefslogtreecommitdiff
path: root/drivers/remoteproc/qcom_q6v5_wcss.c
AgeCommit message (Collapse)AuthorFilesLines
2022-12-07remoteproc: qcom: q6v5: Fix missing clk_disable_unprepare() in ↵Shang XiaoJing1-1/+2
q6v5_wcss_qcs404_power_on() q6v5_wcss_qcs404_power_on() have no fail path for readl_poll_timeout(). Add fail path for readl_poll_timeout(). Fixes: 0af65b9b915e ("remoteproc: qcom: wcss: Add non pas wcss Q6 support for QCS404") Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20221204082757.18850-1-shangxiaojing@huawei.com
2022-12-07remoteproc: qcom: q6v5: Fix potential null-ptr-deref in q6v5_wcss_init_mmio()Shang XiaoJing1-0/+3
q6v5_wcss_init_mmio() will call platform_get_resource_byname() that may fail and return NULL. devm_ioremap() will use res->start as input, which may causes null-ptr-deref. Check the ret value of platform_get_resource_byname() to avoid the null-ptr-deref. Fixes: 0af65b9b915e ("remoteproc: qcom: wcss: Add non pas wcss Q6 support for QCS404") Signed-off-by: Shang XiaoJing <shangxiaojing@huawei.com> Signed-off-by: Bjorn Andersson <andersson@kernel.org> Link: https://lore.kernel.org/r/20221125021641.29392-1-shangxiaojing@huawei.com
2021-09-27remoteproc: qcom: q6v5: Use qmp_send to update co-processor load stateSibi Sankar1-2/+3
The power domains exposed by the AOSS QMP driver control the load state resources linked to modem, adsp, cdsp remoteprocs. These are used to notify the Always on Subsystem (AOSS) that a particular co-processor is up/down. AOSS uses this information to wait for the co-processors to suspend before starting its sleep sequence. These co-processors enter low-power modes independent to that of the application processor and the load state resources linked to them are expected to remain unaltered across system suspend/resume cycles. To achieve this behavior lets stop using the power-domains exposed by the AOSS QMP node and replace them with generic qmp_send interface instead. Signed-off-by: Sibi Sankar <sibis@codeaurora.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> [bjorn: Fixed up build error in q6v5_wcss_remove()] Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/1631800770-371-5-git-send-email-sibis@codeaurora.org
2021-04-14remoteproc: qcom: wcss: Remove unnecessary PTR_ERR()Junlin Yang1-8/+8
Remove unnecessary PTR_ERR(), it has been assigned to ret before, so return ret directly. Signed-off-by: Junlin Yang <yangjunlin@yulong.com> Link: https://lore.kernel.org/r/20210408143322.1647-1-angkery@163.com Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2021-04-14remoteproc: qcom: wcss: Fix wrong pointer passed to PTR_ERR()Wei Yongjun1-1/+1
PTR_ERR should access the value just tested by IS_ERR, otherwise the wrong error code will be returned. This commit fix it by return 'ret' directly. Reviewed-by: Dan Carpenter <dan.carpenter@oracle.com> Fixes: 0af65b9b915e ("remoteproc: qcom: wcss: Add non pas wcss Q6 support for QCS404") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Link: https://lore.kernel.org/r/20210326024741.841267-1-weiyongjun1@huawei.com Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2021-04-13remoteproc: qcom: wcss: Fix return value check in q6v5_wcss_init_mmio()Wei Yongjun1-2/+2
In case of error, the function devm_ioremap() returns NULL pointer not ERR_PTR(). The IS_ERR() test in the return value check should be replaced with NULL test. Fixes: 0af65b9b915e ("remoteproc: qcom: wcss: Add non pas wcss Q6 support for QCS404") Reported-by: Hulk Robot <hulkci@huawei.com> Signed-off-by: Wei Yongjun <weiyongjun1@huawei.com> Link: https://lore.kernel.org/r/20210319094100.4185044-1-weiyongjun1@huawei.com Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2021-03-18remoteproc: qcom: wcss: explicitly request exclusive reset controlGovind Singh1-3/+3
Use request exclusive reset control for wcss reset controls. Signed-off-by: Govind Singh <govinds@codeaurora.org> Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org> Link: https://lore.kernel.org/r/1611859695-11824-5-git-send-email-gokulsri@codeaurora.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2021-03-18remoteproc: qcom: wcss: Add non pas wcss Q6 support for QCS404Govind Singh1-38/+528
Add non PAS WCSS remoteproc driver support for QCS404 SOC. Add WCSS q6 bootup and shutdown sequence handled from Application Processor SubSystem(APSS). Signed-off-by: Govind Singh <govinds@codeaurora.org> Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org> Link: https://lore.kernel.org/r/1611859695-11824-4-git-send-email-gokulsri@codeaurora.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2021-03-18remoteproc: qcom: wcss: populate hardcoded param using driver dataGovind Singh1-5/+24
Q6 based WiFi fw loading is supported across different targets, ex: IPQ8074/QCS404. In order to support different fw names/pas id etc, populate hardcoded param using driver data. Signed-off-by: Govind Singh <govinds@codeaurora.org> Signed-off-by: Gokul Sriram Palanisamy <gokulsri@codeaurora.org> Link: https://lore.kernel.org/r/1611859695-11824-2-git-send-email-gokulsri@codeaurora.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2021-03-11remoteproc: add is_iomem to da_to_vaPeng Fan1-1/+1
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>
2020-11-26remoteproc: qcom: q6v5: Query sysmon before graceful shutdownBjorn Andersson1-1/+1
Requesting a graceful shutdown through the shared memory state signals will not be acked in the event that sysmon has already successfully shut down the remote firmware. So extend the stop request API to optionally take the remoteproc's sysmon instance and query if there's already been a successful shutdown attempt, before doing the signal dance. Tested-by: Steev Klimaszewski <steev@kali.org> Reviewed-by: Rishabh Bhatnagar <rishabhb@codeaurora.org> Link: https://lore.kernel.org/r/20201122054135.802935-4-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-07-02remoteproc: qcom: Update PIL relocation info on loadBjorn Andersson1-3/+11
Update the PIL relocation information in IMEM with information about where the firmware for various remoteprocs are loaded. Reviewed-by: Vinod Koul <vkoul@kernel.org> Reviewed-by: Stephen Boyd <swboyd@chromium.org> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20200622191942.255460-4-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-14remoteproc: wcss: Fix arguments passed to qcom_add_glink_subdev()Bjorn Andersson1-1/+1
Recently qcom_add_glink_subdev() was extended to also take the glink_ssr identifier as an argument and I missed this while applying '8a226e2c71bb ("remoteproc: wcss: add support for rpmsg communication")'. Fixes: 8a226e2c71bb ("remoteproc: wcss: add support for rpmsg communication") Reported-by: kbuild test robot <lkp@intel.com> Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org> Link: https://lore.kernel.org/r/20200514185856.1598945-1-bjorn.andersson@linaro.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-05-12remoteproc: wcss: add support for rpmsg communicationSivaprakash Murugesan1-0/+6
add glink and ssr subdevices for wcss rproc to enable rpmsg communication. Signed-off-by: Sivaprakash Murugesan <sivaprak@codeaurora.org> Link: https://lore.kernel.org/r/1588350492-4663-1-git-send-email-sivaprak@codeaurora.org Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2020-03-26remoteproc: Use size_t type for len in da_to_vaClement Leger1-1/+1
With upcoming changes in elf loader for elf64 support, section size will be a u64. When used with da_to_va, this will potentially lead to overflow if using the current "int" type for len argument. Change da_to_va prototype to use a size_t for len and fix all users of this function. Reviewed-by: Bjorn Andersson <bjorn.andersson@linaro.org> Reviewed-by: Mathieu Poirier <mathieu.poirier@linaro.org> Signed-off-by: Clement Leger <cleger@kalray.eu> Link: https://lore.kernel.org/r/20200302093902.27849-2-cleger@kalray.eu Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>
2018-06-19remoteproc: qcom: Introduce Hexagon V5 based WCSS driverSricharan R1-0/+601
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 <robh@kernel.org> (bindings) Signed-off-by: Sricharan R <sricharan@codeaurora.org> [bjorn: Rewrote as a separate driver, intead of extending q6v5_pil.c] Signed-off-by: Bjorn Andersson <bjorn.andersson@linaro.org>