[COMMON] exynos: DVFS Manager: Parse cal-id from DT.
authorJaejoon Yoo <joonyj7.yoo@samsung.com>
Fri, 12 Aug 2016 03:53:26 +0000 (12:53 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:26:02 +0000 (17:26 +0900)
Change-Id: I244d06a50d1e15353c00fde8ba46c661aa960fb5
Signed-off-by: Jaejoon Yoo <joonyj7.yoo@samsung.com>
drivers/soc/samsung/exynos-dm.c
include/soc/samsung/exynos-dm.h

index 9dd149911b79142397238a2bbb20b0fae289ff01..1e1e987d72b7b6884c65be3164ed1c00556c93ad 100644 (file)
@@ -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;
 
index 170e4a54489b2a909719c7aaf26ef02416e916ab..bd740c7dafb262425f2cae6cbc80fa091721fad6 100644 (file)
@@ -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 {