[COMMON] exynos: DVFS Manager: Add config to ACPM code in DM
authorJaejoon Yoo <joonyj7.yoo@samsung.com>
Mon, 15 Aug 2016 02:34:17 +0000 (11:34 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:26:02 +0000 (17:26 +0900)
Change-Id: Ie026c05b6e317a5351a45893896a4e20598918ea
Signed-off-by: Jaejoon Yoo <joonyj7.yoo@samsung.com>
drivers/soc/samsung/exynos-dm.c
include/soc/samsung/exynos-dm.h

index 1e1e987d72b7b6884c65be3164ed1c00556c93ad..0ae125fd3979051b145c54cc28680aaccd5ed76f 100644 (file)
@@ -304,8 +304,9 @@ static int exynos_dm_parse_dt(struct device_node *np, struct exynos_dm_device *d
        for_each_child_of_node(np, child_np) {
                int index;
                const char *available;
+#ifdef CONFIG_EXYNOS_ACPM
                const char *policy_use;
-
+#endif
                if (of_property_read_u32(child_np, "dm-index", &index))
                        return -ENODEV;
 
@@ -327,7 +328,7 @@ static int exynos_dm_parse_dt(struct device_node *np, struct exynos_dm_device *d
                } else {
                        dm->dm_data[index].available = false;
                }
-
+#ifdef CONFIG_EXYNOS_ACPM
                if (of_property_read_string(child_np, "policy_use", &policy_use)) {
                        dev_info(dm->dev, "This doesn't need to send policy to ACPM\n");
                } else {
@@ -337,6 +338,7 @@ static int exynos_dm_parse_dt(struct device_node *np, struct exynos_dm_device *d
 
                if (of_property_read_u32(child_np, "cal_id", &dm->dm_data[index].cal_id))
                        return -ENODEV;
+#endif
        }
 
        return ret;
@@ -618,9 +620,11 @@ int policy_update_call_to_DM(enum exynos_dm_type dm_type, u32 min_freq, u32 max_
 {
        struct exynos_dm_data *dm;
        struct timeval pre, before, after;
+#ifdef CONFIG_EXYNOS_ACPM
        struct ipc_config config;
        unsigned int cmd[4];
        int size, ch_num, ret;
+#endif
        s32 time = 0, pre_time = 0;
 
        do_gettimeofday(&pre);
@@ -637,6 +641,7 @@ int policy_update_call_to_DM(enum exynos_dm_type dm_type, u32 min_freq, u32 max_
        constraint_checker_max(get_max_constraint_list(dm), max_freq);
 
        /*Send policy to FVP*/
+#ifdef CONFIG_EXYNOS_ACPM
        if (dm->policy_use) {
                ret = acpm_ipc_request_channel(exynos_dm->dev->of_node, NULL, &ch_num, &size);
                if (ret) {
@@ -657,6 +662,7 @@ int policy_update_call_to_DM(enum exynos_dm_type dm_type, u32 min_freq, u32 max_
                        return -EINVAL;
                }
        }
+#endif
 
 out:
        do_gettimeofday(&after);
index bd740c7dafb262425f2cae6cbc80fa091721fad6..c5de0cc1d0889f8c1b80dde1adc2ca1989366da6 100644 (file)
@@ -84,8 +84,9 @@ struct exynos_dm_constraint {
 
 struct exynos_dm_data {
        bool                            available;              /* use for DVFS domain available */
+#ifdef CONFIG_EXYNOS_ACPM
        bool                            policy_use;
-
+#endif
        enum exynos_dm_type             dm_type;
        enum exynos_dvfs_type           dvfs_type;
        char                            dm_type_name[EXYNOS_DM_TYPE_NAME_LEN];
@@ -105,7 +106,9 @@ struct exynos_dm_data {
        struct list_head                min_clist;
        struct list_head                max_clist;
        u32                             constraint_checked;
+#ifdef CONFIG_EXYNOS_ACPM
        u32                             cal_id;
+#endif
 };
 
 struct exynos_dm_device {