From 2c1c92a368f79d029d58ea3b103db415121f343f Mon Sep 17 00:00:00 2001 From: Jaejoon Yoo Date: Fri, 12 Aug 2016 12:53:26 +0900 Subject: [PATCH] [COMMON] exynos: DVFS Manager: Parse cal-id from DT. Change-Id: I244d06a50d1e15353c00fde8ba46c661aa960fb5 Signed-off-by: Jaejoon Yoo --- drivers/soc/samsung/exynos-dm.c | 5 ++++- include/soc/samsung/exynos-dm.h | 1 + 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/drivers/soc/samsung/exynos-dm.c b/drivers/soc/samsung/exynos-dm.c index 9dd149911b79..1e1e987d72b7 100644 --- a/drivers/soc/samsung/exynos-dm.c +++ b/drivers/soc/samsung/exynos-dm.c @@ -334,6 +334,9 @@ static int exynos_dm_parse_dt(struct device_node *np, struct exynos_dm_device *d if (!strcmp(policy_use, "true")) dm->dm_data[index].policy_use = true; } + + if (of_property_read_u32(child_np, "cal_id", &dm->dm_data[index].cal_id)) + return -ENODEV; } return ret; @@ -644,7 +647,7 @@ int policy_update_call_to_DM(enum exynos_dm_type dm_type, u32 min_freq, u32 max_ config.cmd = cmd; config.response = true; config.indirection = false; - config.cmd[0] = dm_type; + config.cmd[0] = dm->cal_id; config.cmd[1] = max_freq; config.cmd[2] = POLICY_REQ; diff --git a/include/soc/samsung/exynos-dm.h b/include/soc/samsung/exynos-dm.h index 170e4a54489b..bd740c7dafb2 100644 --- a/include/soc/samsung/exynos-dm.h +++ b/include/soc/samsung/exynos-dm.h @@ -105,6 +105,7 @@ struct exynos_dm_data { struct list_head min_clist; struct list_head max_clist; u32 constraint_checked; + u32 cal_id; }; struct exynos_dm_device { -- 2.20.1