mirror of
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
synced 2026-04-02 03:30:08 -04:00
Merge tag 'rproc-v7.0-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux
Pull remoteproc fixes from Bjorn Andersson: - Correct the early return from the i.MX remoteproc prepare operation, which prevented the platform-specific prepare function from being reached - Ensure that the Mediatek SCP clock is released during system suspend after the recent refactoring to avoid issues with the clock framework's prepare lock. - Correct the type of the subsys_name_len field in the sysmon event QMI message, as the recent introduction of big endian support in the QMI encoder highlighted the type mismatch and resulted in a failure to encode the message - Roll back the devm_ioremap_resource_wc() to a devm_ioremap_wc() in the Qualcomm WCNSS remoteproc driver, after reports that requesting this resource fails on some platforms * tag 'rproc-v7.0-fixes' of git://git.kernel.org/pub/scm/linux/kernel/git/remoteproc/linux: remoteproc: imx_rproc: Fix unreachable platform prepare_ops remoteproc: mediatek: Unprepare SCP clock during system suspend remoteproc: sysmon: Correct subsys_name_len type in QMI request remoteproc: qcom_wcnss: Fix reserved region mapping failure
This commit is contained in:
@@ -617,7 +617,7 @@ static int imx_rproc_prepare(struct rproc *rproc)
|
||||
|
||||
err = of_reserved_mem_region_to_resource(np, i++, &res);
|
||||
if (err)
|
||||
return 0;
|
||||
break;
|
||||
|
||||
/*
|
||||
* Ignore the first memory region which will be used vdev buffer.
|
||||
|
||||
@@ -1592,12 +1592,51 @@ static const struct of_device_id mtk_scp_of_match[] = {
|
||||
};
|
||||
MODULE_DEVICE_TABLE(of, mtk_scp_of_match);
|
||||
|
||||
static int __maybe_unused scp_suspend(struct device *dev)
|
||||
{
|
||||
struct mtk_scp *scp = dev_get_drvdata(dev);
|
||||
struct rproc *rproc = scp->rproc;
|
||||
|
||||
/*
|
||||
* Only unprepare if the SCP is running and holding the clock.
|
||||
*
|
||||
* Note: `scp_ops` doesn't implement .attach() callback, hence
|
||||
* `rproc->state` can never be RPROC_ATTACHED. Otherwise, it
|
||||
* should also be checked here.
|
||||
*/
|
||||
if (rproc->state == RPROC_RUNNING)
|
||||
clk_unprepare(scp->clk);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static int __maybe_unused scp_resume(struct device *dev)
|
||||
{
|
||||
struct mtk_scp *scp = dev_get_drvdata(dev);
|
||||
struct rproc *rproc = scp->rproc;
|
||||
|
||||
/*
|
||||
* Only prepare if the SCP was running and holding the clock.
|
||||
*
|
||||
* Note: `scp_ops` doesn't implement .attach() callback, hence
|
||||
* `rproc->state` can never be RPROC_ATTACHED. Otherwise, it
|
||||
* should also be checked here.
|
||||
*/
|
||||
if (rproc->state == RPROC_RUNNING)
|
||||
return clk_prepare(scp->clk);
|
||||
return 0;
|
||||
}
|
||||
|
||||
static const struct dev_pm_ops scp_pm_ops = {
|
||||
SET_SYSTEM_SLEEP_PM_OPS(scp_suspend, scp_resume)
|
||||
};
|
||||
|
||||
static struct platform_driver mtk_scp_driver = {
|
||||
.probe = scp_probe,
|
||||
.remove = scp_remove,
|
||||
.driver = {
|
||||
.name = "mtk-scp",
|
||||
.of_match_table = mtk_scp_of_match,
|
||||
.pm = &scp_pm_ops,
|
||||
},
|
||||
};
|
||||
|
||||
|
||||
@@ -203,7 +203,7 @@ static const struct qmi_elem_info ssctl_shutdown_resp_ei[] = {
|
||||
};
|
||||
|
||||
struct ssctl_subsys_event_req {
|
||||
u8 subsys_name_len;
|
||||
u32 subsys_name_len;
|
||||
char subsys_name[SSCTL_SUBSYS_NAME_LENGTH];
|
||||
u32 event;
|
||||
u8 evt_driven_valid;
|
||||
|
||||
@@ -537,7 +537,7 @@ static int wcnss_alloc_memory_region(struct qcom_wcnss *wcnss)
|
||||
|
||||
wcnss->mem_phys = wcnss->mem_reloc = res.start;
|
||||
wcnss->mem_size = resource_size(&res);
|
||||
wcnss->mem_region = devm_ioremap_resource_wc(wcnss->dev, &res);
|
||||
wcnss->mem_region = devm_ioremap_wc(wcnss->dev, wcnss->mem_phys, wcnss->mem_size);
|
||||
if (IS_ERR(wcnss->mem_region)) {
|
||||
dev_err(wcnss->dev, "unable to map memory region: %pR\n", &res);
|
||||
return PTR_ERR(wcnss->mem_region);
|
||||
|
||||
Reference in New Issue
Block a user