From: Hyeonseong Gil Date: Wed, 28 Feb 2018 00:28:28 +0000 (+0900) Subject: [COMMON] soc: samsung: exynos-dm: remove enum dm_type X-Git-Url: https://git.stricted.de/?a=commitdiff_plain;h=2d4b53aa4891c5a92aff8cf706372aac6923a009;p=GitHub%2FLineageOS%2Fandroid_kernel_motorola_exynos9610.git [COMMON] soc: samsung: exynos-dm: remove enum dm_type Change-Id: I29bd9741b9a5f642abc0132c042684e285efed7c Signed-off-by: Hyeonseong Gil --- diff --git a/drivers/soc/samsung/exynos-dm.c b/drivers/soc/samsung/exynos-dm.c index 5fd4429a2876..8c6697fc800e 100644 --- a/drivers/soc/samsung/exynos-dm.c +++ b/drivers/soc/samsung/exynos-dm.c @@ -405,7 +405,7 @@ static struct list_head *get_max_constraint_list(struct exynos_dm_data *dm_data) * before DVFS driver registration to DVFS framework. * Initialize sequence Step.1 */ -int exynos_dm_data_init(enum exynos_dm_type dm_type, void *data, +int exynos_dm_data_init(int dm_type, void *data, u32 min_freq, u32 max_freq, u32 cur_freq) { int ret = 0; @@ -445,7 +445,7 @@ out: /* * Initialize sequence Step.2 */ -int register_exynos_dm_constraint_table(enum exynos_dm_type dm_type, +int register_exynos_dm_constraint_table(int dm_type, struct exynos_dm_constraint *constraint) { struct exynos_dm_constraint *sub_constraint; @@ -545,7 +545,7 @@ err_sub_const: return ret; } -int unregister_exynos_dm_constraint_table(enum exynos_dm_type dm_type, +int unregister_exynos_dm_constraint_table(int dm_type, struct exynos_dm_constraint *constraint) { struct exynos_dm_constraint *sub_constraint; @@ -581,8 +581,8 @@ int unregister_exynos_dm_constraint_table(enum exynos_dm_type dm_type, * before return to corresponding DVFS drvier. * Initialize sequence Step.3 */ -int register_exynos_dm_freq_scaler(enum exynos_dm_type dm_type, - int (*scaler_func)(enum exynos_dm_type dm_type, void *devdata, u32 target_freq, unsigned int relation)) +int register_exynos_dm_freq_scaler(int dm_type, + int (*scaler_func)(int dm_type, void *devdata, u32 target_freq, unsigned int relation)) { int ret = 0; @@ -613,7 +613,7 @@ out: return 0; } -int unregister_exynos_dm_freq_scaler(enum exynos_dm_type dm_type) +int unregister_exynos_dm_freq_scaler(int dm_type) { int ret = 0; @@ -650,18 +650,18 @@ out: * After that, DVFS Manager will decide min/max freq. of current domain * and check dependent domains whether update is necessary. */ -static int dm_data_updater(enum exynos_dm_type dm_type); +static int dm_data_updater(int dm_type); static int constraint_checker_min(struct list_head *head, u32 freq); static int constraint_checker_max(struct list_head *head, u32 freq); -static int constraint_data_updater(enum exynos_dm_type dm_type, int cnt); -static int max_constraint_data_updater(enum exynos_dm_type dm_type, int cnt); +static int constraint_data_updater(int dm_type, int cnt); +static int max_constraint_data_updater(int dm_type, int cnt); static int scaling_callback(enum dvfs_direction dir, unsigned int relation); static bool max_flag = false; #define POLICY_REQ 4 -int policy_update_call_to_DM(enum exynos_dm_type dm_type, u32 min_freq, u32 max_freq) +int policy_update_call_to_DM(int dm_type, u32 min_freq, u32 max_freq) { struct exynos_dm_data *dm; struct timeval pre, before, after; @@ -776,7 +776,7 @@ static int constraint_checker_max(struct list_head *head, u32 freq) /* * DM CALL */ -int DM_CALL(enum exynos_dm_type dm_type, unsigned long *target_freq) +int DM_CALL(int dm_type, unsigned long *target_freq) { struct exynos_dm_data *dm; int i; @@ -854,7 +854,7 @@ int DM_CALL(enum exynos_dm_type dm_type, unsigned long *target_freq) return 0; } -static int dm_data_updater(enum exynos_dm_type dm_type) +static int dm_data_updater(int dm_type) { struct exynos_dm_data *dm; struct exynos_dm_constraint *constraint; @@ -900,7 +900,7 @@ static int dm_data_updater(enum exynos_dm_type dm_type) return 0; } -static int constraint_data_updater(enum exynos_dm_type dm_type, int cnt) +static int constraint_data_updater(int dm_type, int cnt) { struct exynos_dm_data *dm; struct exynos_dm_constraint *constraint; @@ -936,7 +936,7 @@ static int constraint_data_updater(enum exynos_dm_type dm_type, int cnt) return 0; } -static int max_constraint_data_updater(enum exynos_dm_type dm_type, int cnt) +static int max_constraint_data_updater(int dm_type, int cnt) { struct exynos_dm_data *dm; struct exynos_dm_constraint *constraint; diff --git a/include/soc/samsung/exynos-dm.h b/include/soc/samsung/exynos-dm.h index 645e59e54b4a..f4f87c0351e5 100644 --- a/include/soc/samsung/exynos-dm.h +++ b/include/soc/samsung/exynos-dm.h @@ -20,22 +20,6 @@ #define EXYNOS_DM_RELATION_L 0 #define EXYNOS_DM_RELATION_H 1 -enum exynos_dm_type { - DM_CPU_CL0 = 0, - DM_CPU_CL1, - DM_MIF, - DM_INT, - DM_INTCAM, - DM_FSYS0, - DM_CAM, - DM_DISP, - DM_AUD, - DM_IVA, - DM_SCORE, - DM_GPU, - DM_TYPE_END -}; - enum exynos_constraint_type { CONSTRAINT_MIN = 0, CONSTRAINT_MAX, @@ -65,7 +49,7 @@ struct exynos_dm_constraint { u32 table_length; enum exynos_constraint_type constraint_type; - enum exynos_dm_type constraint_dm_type; + int constraint_dm_type; char dm_type_name[EXYNOS_DM_TYPE_NAME_LEN]; struct exynos_dm_freq *freq_table; u32 min_freq; @@ -80,7 +64,7 @@ struct exynos_dm_data { #ifdef CONFIG_EXYNOS_ACPM bool policy_use; #endif - enum exynos_dm_type dm_type; + int dm_type; char dm_type_name[EXYNOS_DM_TYPE_NAME_LEN]; u32 min_freq; @@ -93,7 +77,7 @@ struct exynos_dm_data { u32 policy_min_freq; u32 policy_max_freq; - int (*freq_scaler)(enum exynos_dm_type dm_type, void *devdata, u32 target_freq, unsigned int relation); + int (*freq_scaler)(int dm_type, void *devdata, u32 target_freq, unsigned int relation); struct list_head min_clist; struct list_head max_clist; @@ -117,54 +101,54 @@ struct exynos_dm_device { /* External Function call */ #if defined(CONFIG_EXYNOS_DVFS_MANAGER) -int exynos_dm_data_init(enum exynos_dm_type dm_type, void *data, +int exynos_dm_data_init(int dm_type, void *data, u32 min_freq, u32 max_freq, u32 cur_freq); -int register_exynos_dm_constraint_table(enum exynos_dm_type dm_type, +int register_exynos_dm_constraint_table(int dm_type, struct exynos_dm_constraint *constraint); -int unregister_exynos_dm_constraint_table(enum exynos_dm_type dm_type, +int unregister_exynos_dm_constraint_table(int dm_type, struct exynos_dm_constraint *constraint); -int register_exynos_dm_freq_scaler(enum exynos_dm_type dm_type, - int (*scaler_func)(enum exynos_dm_type dm_type, void *devdata, u32 target_freq, unsigned int relation)); -int unregister_exynos_dm_freq_scaler(enum exynos_dm_type dm_type); -int policy_update_call_to_DM(enum exynos_dm_type dm_type, u32 min_freq, u32 max_freq); -int DM_CALL(enum exynos_dm_type dm_type, unsigned long *target_freq); +int register_exynos_dm_freq_scaler(int dm_type, + int (*scaler_func)(int dm_type, void *devdata, u32 target_freq, unsigned int relation)); +int unregister_exynos_dm_freq_scaler(int dm_type); +int policy_update_call_to_DM(int dm_type, u32 min_freq, u32 max_freq); +int DM_CALL(int dm_type, unsigned long *target_freq); #else static inline -int exynos_dm_data_init(enum exynos_dm_type dm_type, void *data, +int exynos_dm_data_init(int dm_type, void *data, u32 min_freq, u32 max_freq, u32 cur_freq) { return 0; } static inline -int register_exynos_dm_constraint_table(enum exynos_dm_type dm_type, +int register_exynos_dm_constraint_table(int dm_type, struct exynos_dm_constraint *constraint) { return 0; } static inline -int unregister_exynos_dm_constraint_table(enum exynos_dm_type dm_type, +int unregister_exynos_dm_constraint_table(int dm_type, struct exynos_dm_constraint *constraint) { return 0; } static inline -int register_exynos_dm_freq_scaler(enum exynos_dm_type dm_type, - int (*scaler_func)(enum exynos_dm_type dm_type, void *devdata, u32 target_freq, unsigned int relation)) +int register_exynos_dm_freq_scaler(int dm_type, + int (*scaler_func)(int dm_type, void *devdata, u32 target_freq, unsigned int relation)) { return 0; } static inline -int unregister_exynos_dm_freq_scaler(enum exynos_dm_type dm_type) +int unregister_exynos_dm_freq_scaler(int dm_type) { return 0; } static inline -int policy_update_call_to_DM(enum exynos_dm_type dm_type, u32 min_freq, u32 max_freq) +int policy_update_call_to_DM(int dm_type, u32 min_freq, u32 max_freq) { return 0; } static inline -int DM_CALL(enum exynos_dm_type dm_type, unsigned long *target_freq) +int DM_CALL(int dm_type, unsigned long *target_freq) { return 0; }