mirror of
https://github.com/torvalds/linux.git
synced 2026-07-28 18:21:24 +02:00
remoteproc fixes for v7.0
Correct the early return from the i.MX remoteproc prepare operation, which prevented the platform-specific prepare function to be 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. -----BEGIN PGP SIGNATURE----- iQIzBAABCgAdFiEEBd4DzF816k8JZtUlCx85Pw2ZrcUFAmmw5noACgkQCx85Pw2Z rcXcGhAAjx1XIq6DQIXHgmKICMTJNmvx6v4qeWd5Yb7F9BqJ3Y9vJYTdA124sHJR okln8ilAGe/+t7Rid1TNoqpkCIm8fqBK62kMvVggtrpaSah2WnNp1fJp0OGFgCik DRjVNuPvr3x4aFs7Zp3iBFt2Vf7XebW7Y58gal4/22nEXErLou0nAIwAZHT+ypEE EGyb/TDV1KxjLjx7csk/LRTGlZMDFI0i5owIL5FUdGIStemt+RhrJiQUGR/kaIh6 3qjhSC6sf+jixQ61bTgGsPODWMpJBW+0Ir5GTQpSnirIikZAZdLCcbgVahfwK8Et VJsadN8H0gREF3uis/IHRglNBPJ0TQtO2JHE0oqUSDevvHBaDLe8SeXYmLxlo8m/ hIRvpnvUaprr2jc3XMVOEzRr+XCmRP5HVSnzChApY43UZwGHln4ViEckcl8Qpzav ccCmWc28s6BN1iXvEP7rwg15RfEClNiVXG5Oazuonkl8EN5NbZ0cBApEBFQhZ+1s 6V6XEdIQclAX0t9SF1H8slAENG0Xe2zpht6p6eFlks9SRxtIRKHVSloX0020qKoh OiPB+K2HOHBVSqcCw+BSJlvpptu/aJNIID8edrlhQZOjg7sl1oxhP39gkLUJr+0a TZfPTlOqnJc3NXce9RuuqCamYbLB3cC4zY4/x+JaEOePJp3wnmw= =7ekE -----END PGP SIGNATURE----- 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:
commit
80234b5ab2
|
|
@ -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);
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user