[COMMON] soc: samsung: exynos-dm: Remove unsued dvfs_type
authorHyeonseong Gil <hs.gil@samsung.com>
Mon, 5 Feb 2018 04:40:01 +0000 (13:40 +0900)
committerChungwoo Park <cww.park@samsung.com>
Mon, 21 May 2018 08:26:11 +0000 (17:26 +0900)
Change-Id: I92aecf3261c33dc9f533122ac7e3ee430564f443
Signed-off-by: Hyeonseong Gil <hs.gil@samsung.com>
drivers/soc/samsung/exynos-dm.c
include/soc/samsung/exynos-dm.h

index 76758122863d5442f46bf86894a4a0cbbeb8fef3..72a7772f99a80fd5c898c2bf84d388c55ca9f2a7 100644 (file)
@@ -53,9 +53,8 @@ static ssize_t show_available(struct device *dev,
                        continue;
 
                count += snprintf(buf + count, PAGE_SIZE,
-                               "dm_type: %d(%s), dvfs_type: %d, available = %s\n",
+                               "dm_type: %d(%s), available = %s\n",
                                dm->dm_data[i].dm_type, dm->dm_data[i].dm_type_name,
-                               dm->dm_data[i].dvfs_type,
                                dm->dm_data[i].available ? "true" : "false");
        }
 
@@ -282,16 +281,15 @@ static void print_available_dm_data(struct exynos_dm_device *dm)
                if (!dm->dm_data[i].available)
                        continue;
 
-               dev_info(dm->dev, "dm_type: %d(%s), dvfs_type: %d, available = %s\n",
+               dev_info(dm->dev, "dm_type: %d(%s), available = %s\n",
                                dm->dm_data[i].dm_type, dm->dm_data[i].dm_type_name,
-                               dm->dm_data[i].dvfs_type,
                                dm->dm_data[i].available ? "true" : "false");
        }
 }
 
 static int exynos_dm_index_validate(enum exynos_dm_type index)
 {
-       if ((index < DM_CPU_CL0) || (index >= DM_TYPE_END)) {
+       if ((index < 0) || (index >= DM_TYPE_END)) {
                dev_err(exynos_dm->dev, "invalid dm_index (%d)\n", index);
                return -EINVAL;
        }
@@ -299,29 +297,6 @@ static int exynos_dm_index_validate(enum exynos_dm_type index)
        return 0;
 }
 
-static enum exynos_dvfs_type exynos_dm_dvfs_type(enum exynos_dm_type dm_type)
-{
-       enum exynos_dvfs_type dvfs_type;
-
-       switch (dm_type) {
-       case DM_CPU_CL0...DM_CPU_CL1:
-               dvfs_type = DVFS_CPUFREQ;
-               break;
-       case DM_MIF...DM_SCORE:
-               dvfs_type = DVFS_DEVFREQ;
-               break;
-       case DM_GPU:
-               dvfs_type = DVFS_GPU;
-               break;
-       default:
-               dvfs_type = DVFS_TYPE_END;
-               dev_err(exynos_dm->dev, "invalid dm_type (%d)\n", dm_type);
-               break;
-       }
-
-       return dvfs_type;
-}
-
 #ifdef CONFIG_OF
 static int exynos_dm_parse_dt(struct device_node *np, struct exynos_dm_device *dm)
 {
@@ -351,7 +326,6 @@ static int exynos_dm_parse_dt(struct device_node *np, struct exynos_dm_device *d
                if (!strcmp(available, "true")) {
                        dm->dm_data[index].dm_type = index;
                        dm->dm_data[index].available = true;
-                       dm->dm_data[index].dvfs_type = exynos_dm_dvfs_type(index);
 
                        if (!of_property_read_string(child_np, "dm_type_name", &name))
                                strncpy(dm->dm_data[index].dm_type_name, name, EXYNOS_DM_TYPE_NAME_LEN);
index db6107bbf77033bbd47b11764af2ac51bfc6187b..09a1301003e03f34b5250e4b64ea5c74ae4ceaf5 100644 (file)
@@ -36,13 +36,6 @@ enum exynos_dm_type {
        DM_TYPE_END
 };
 
-enum exynos_dvfs_type {
-       DVFS_CPUFREQ = 0,
-       DVFS_DEVFREQ,
-       DVFS_GPU,
-       DVFS_TYPE_END
-};
-
 enum exynos_constraint_type {
        CONSTRAINT_MIN = 0,
        CONSTRAINT_MAX,
@@ -88,7 +81,6 @@ struct exynos_dm_data {
        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];
 
        u32                             min_freq;