coresight: CTI: CTI supports suspend & hibernation
In the suspend & hibernation entry, clear the qdss_clk_cnt by disabling CTI which has been enabled. And re-enable it in QB. Allowing QDSS work post suspend & hibernation. Change-Id: I24c0783130eed8ff1903d3ffd84dce6c144afa28 Signed-off-by: Xiaoqi Zhuang <quic_xiaozhua@quicinc.com> Signed-off-by: songchai <quic_songchai@quicinc.com>
This commit is contained in:
parent
c4a81a6dd5
commit
1cf3647dc3
@ -20,6 +20,7 @@
|
||||
#include <linux/property.h>
|
||||
#include <linux/spinlock.h>
|
||||
#include <linux/pinctrl/consumer.h>
|
||||
#include <linux/suspend.h>
|
||||
|
||||
#include "coresight-priv.h"
|
||||
#include "coresight-cti.h"
|
||||
@ -1142,6 +1143,27 @@ static int cti_probe(struct amba_device *adev, const struct amba_id *id)
|
||||
return ret;
|
||||
}
|
||||
|
||||
|
||||
#ifdef CONFIG_HIBERNATION
|
||||
static int cti_freeze(struct device *dev)
|
||||
{
|
||||
int rc = 0;
|
||||
struct cti_drvdata *drvdata = dev_get_drvdata(dev);
|
||||
|
||||
if (drvdata->config.hw_enabled)
|
||||
rc = cti_disable(drvdata->csdev);
|
||||
|
||||
|
||||
return rc;
|
||||
}
|
||||
|
||||
#endif
|
||||
|
||||
static const struct dev_pm_ops cti_dev_pm_ops = {
|
||||
#ifdef CONFIG_HIBERNATION
|
||||
.freeze = cti_freeze,
|
||||
#endif
|
||||
};
|
||||
static struct amba_cs_uci_id uci_id_cti[] = {
|
||||
{
|
||||
/* CTI UCI data */
|
||||
@ -1167,6 +1189,7 @@ static struct amba_driver cti_driver = {
|
||||
.drv = {
|
||||
.name = "coresight-cti",
|
||||
.owner = THIS_MODULE,
|
||||
.pm = &cti_dev_pm_ops,
|
||||
.suppress_bind_attrs = true,
|
||||
},
|
||||
.probe = cti_probe,
|
||||
|
Loading…
Reference in New Issue
Block a user