* AVS_BASE can use 172\r
*/\r
\r
-int avs_scale_volt = 0;\r
-int avs_get_scal_val(int vol);\r
+static int avs_scale_volt = 0;\r
+static int avs_get_scal_val(int vol);\r
\r
int dvfs_avs_scale_table(struct clk *clk, char *depend_vd_name)\r
{\r
return 0;\r
}\r
\r
-void __iomem *rk30_nandc_base;\r
+static void __iomem *rk30_nandc_base;\r
\r
#define nandc_readl(offset) readl_relaxed(rk30_nandc_base + offset)\r
#define nandc_writel(v, offset) do { writel_relaxed(v, rk30_nandc_base + offset); dsb(); } while (0)\r
-u8 rk30_get_avs_val(void)\r
+static u8 rk30_get_avs_val(void)\r
{\r
u32 nanc_save_reg[4];\r
unsigned long flags;\r
char *s;\r
};\r
\r
-struct init_avs_st init_avs_paramet[init_avs_st_num];\r
+static struct init_avs_st init_avs_paramet[init_avs_st_num];\r
\r
void avs_init_val_get(int index, int vol, char *s)\r
{\r
#define VOL_DYN_STEP (12500) //mv\r
#define AVS_VAL_PER_STEP (4) //mv\r
\r
-u8 avs_init_get_min_val(void)\r
+static u8 avs_init_get_min_val(void)\r
{\r
int i, j;\r
u8 min_avs = 0xff;\r
return min_avs;\r
}\r
\r
-int avs_get_scal_val(int vol)\r
+static int avs_get_scal_val(int vol)\r
{\r
vol += avs_scale_volt;\r
if(vol < 1000 * 1000)\r
return 0;\r
}\r
\r
-u32 print_avs_init(char *buf)\r
+/*************************interface to get avs value and dvfs tree*************************/\r
+#define USE_NORMAL_TIME\r
+#ifdef USE_NORMAL_TIME\r
+static struct timer_list avs_timer;\r
+#else\r
+static struct hrtimer dvfs_hrtimer;\r
+#endif\r
+\r
+static u32 avs_dyn_start = 0;\r
+static u32 avs_dyn_data_cnt;\r
+static u8 *avs_dyn_data = NULL;\r
+static u32 show_line_cnt = 0;\r
+static u8 dly_min;\r
+static u8 dly_max;\r
+\r
+#define val_per_line (30)\r
+#define line_pre_show (30)\r
+#define avs_dyn_data_num (3*1000*1000)\r
+\r
+static u32 print_avs_init(char *buf)\r
{\r
char *s = buf;\r
int i, j;\r
{\r
return n;\r
}\r
-extern struct timer_list avs_timer;\r
-u32 avs_dyn_start = 0;\r
-extern u32 avs_dyn_data_cnt;\r
-u8 *avs_dyn_data = NULL;\r
-u32 show_line_cnt = 0;\r
-#define val_per_line (30)\r
-#define line_pre_show (30)\r
-u8 dly_min;\r
-u8 dly_max;\r
-#define USE_NORMAL_TIME\r
static ssize_t avs_dyn_show(struct kobject *kobj, struct kobj_attribute *attr,\r
char *buf)\r
{\r
}\r
return (s - buf);\r
}\r
-extern struct hrtimer dvfs_hrtimer;\r
\r
static ssize_t avs_dyn_store(struct kobject *kobj, struct kobj_attribute *attr,\r
const char *buf, size_t n)\r
\r
}\r
\r
-struct timer_list avs_timer;\r
-\r
-#define avs_dyn_data_num (3*1000*1000)\r
-//char *avs_dyn_data;\r
-u32 avs_dyn_data_cnt = 0;\r
-\r
-\r
static void avs_timer_fn(unsigned long data)\r
{\r
int i;\r
}\r
#endif\r
/*********************************************************************************/\r
-struct kobject *dvfs_kobj;\r
+static struct kobject *dvfs_kobj;\r
struct dvfs_attribute {\r
struct attribute attr;\r
ssize_t (*show)(struct kobject *kobj, struct kobj_attribute *attr,\r