From bfd629b3c138e4914904f88b88207f54bf1c073f Mon Sep 17 00:00:00 2001 From: Jaejoon Yoo Date: Mon, 15 Aug 2016 11:34:17 +0900 Subject: [PATCH] [COMMON] exynos: DVFS Manager: Add config to ACPM code in DM Change-Id: Ie026c05b6e317a5351a45893896a4e20598918ea Signed-off-by: Jaejoon Yoo --- drivers/soc/samsung/exynos-dm.c | 10 ++++++++-- include/soc/samsung/exynos-dm.h | 5 ++++- 2 files changed, 12 insertions(+), 3 deletions(-) diff --git a/drivers/soc/samsung/exynos-dm.c b/drivers/soc/samsung/exynos-dm.c index 1e1e987d72b7..0ae125fd3979 100644 --- a/drivers/soc/samsung/exynos-dm.c +++ b/drivers/soc/samsung/exynos-dm.c @@ -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); diff --git a/include/soc/samsung/exynos-dm.h b/include/soc/samsung/exynos-dm.h index bd740c7dafb2..c5de0cc1d088 100644 --- a/include/soc/samsung/exynos-dm.h +++ b/include/soc/samsung/exynos-dm.h @@ -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 { -- 2.20.1