* 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;
/*
* 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;
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;
* 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;
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;
* 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;
/*
* 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;
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;
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;
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;
#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,
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;
#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;
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;
/* 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;
}