PM / devfreq: hisi: add ddr devfreq support for kirin970

This patch adds the support for ddr devfreq on the kirin970 SoC,
make it possible to control the ddr frequency through devfreq
interface or PMQOS.

Signed-off-by: Kevin Wangtao <kevin.wangtao@hisilicon.com>
This commit is contained in:
Kevin Wangtao
2018-02-12 15:28:59 +08:00
committed by Guodong Xu
parent 9e266823ff
commit 4248d89046
+12
View File
@@ -194,11 +194,23 @@ static struct ddr_devfreq_pdata hi3660_pdata = {
.governor_data = &ddr_ondemand, .governor_data = &ddr_ondemand,
}; };
static struct ddr_devfreq_pdata kirin970_pdata = {
.pm_qos_constraint = PM_QOS_MEMORY_BANDWIDTH,
.bytes_per_cycle = 16,
.polling_ms = 0,
.governor = "simple_ondemand",
.governor_data = &ddr_ondemand,
};
static const struct of_device_id ddr_devfreq_of_match[] = { static const struct of_device_id ddr_devfreq_of_match[] = {
{ {
.compatible = "hisilicon,hi3660-ddrfreq", .compatible = "hisilicon,hi3660-ddrfreq",
.data = &hi3660_pdata, .data = &hi3660_pdata,
}, },
{
.compatible = "hisilicon,kirin970-ddrfreq",
.data = &kirin970_pdata,
},
{}, {},
}; };
MODULE_DEVICE_TABLE(of, ddr_devfreq_of_match); MODULE_DEVICE_TABLE(of, ddr_devfreq_of_match);