From: Jaejoon Yoo Date: Thu, 11 Aug 2016 07:16:37 +0000 (+0900) Subject: [COMMON] exynos: DVFS Manager: Parse policy use data from DT. X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=b63c88898febf9fa4bc6e3117ff9fc0adbea482b;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] exynos: DVFS Manager: Parse policy use data from DT. Change-Id: Ibd874c4582b2f6b80adcafd3dae176623db64b0f Signed-off-by: Jaejoon Yoo --- diff --git a/drivers/soc/samsung/exynos-dm.c b/drivers/soc/samsung/exynos-dm.c index 654a7da3ed45..9dd149911b79 100644 --- a/drivers/soc/samsung/exynos-dm.c +++ b/drivers/soc/samsung/exynos-dm.c @@ -304,6 +304,7 @@ 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; + const char *policy_use; if (of_property_read_u32(child_np, "dm-index", &index)) return -ENODEV; @@ -326,6 +327,13 @@ static int exynos_dm_parse_dt(struct device_node *np, struct exynos_dm_device *d } else { dm->dm_data[index].available = false; } + + 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 { + if (!strcmp(policy_use, "true")) + dm->dm_data[index].policy_use = true; + } } return ret; @@ -626,7 +634,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*/ - if (dm_type == DM_MIF || dm_type == DM_INT) { + if (dm->policy_use) { ret = acpm_ipc_request_channel(exynos_dm->dev->of_node, NULL, &ch_num, &size); if (ret) { dev_err(exynos_dm->dev, @@ -636,10 +644,9 @@ 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] = 0x0B040000; + config.cmd[0] = dm_type; config.cmd[1] = max_freq; config.cmd[2] = POLICY_REQ; - config.cmd[3] = dm_type; ret = acpm_ipc_send_data(ch_num, &config); if (ret) { diff --git a/include/soc/samsung/exynos-dm.h b/include/soc/samsung/exynos-dm.h index 70f6c33659a5..170e4a54489b 100644 --- a/include/soc/samsung/exynos-dm.h +++ b/include/soc/samsung/exynos-dm.h @@ -84,6 +84,7 @@ struct exynos_dm_constraint { struct exynos_dm_data { bool available; /* use for DVFS domain available */ + bool policy_use; enum exynos_dm_type dm_type; enum exynos_dvfs_type dvfs_type;