From 0e9ad31c89567a962a35c2cd4cf67ed4edec01bf Mon Sep 17 00:00:00 2001 From: chenxing Date: Sat, 26 Jan 2013 15:03:34 +0800 Subject: [PATCH] rk30xx: fix compiled error when disable dvfs --- arch/arm/mach-rk30/clock_data-rk3066b.c | 3 +-- arch/arm/mach-rk30/clock_data.c | 4 ++-- arch/arm/mach-rk30/dvfs.c | 2 +- arch/arm/mach-rk30/include/mach/dvfs.h | 12 ++++++++++++ arch/arm/plat-rk/include/plat/dvfs.h | 4 ++-- 5 files changed, 18 insertions(+), 7 deletions(-) diff --git a/arch/arm/mach-rk30/clock_data-rk3066b.c b/arch/arm/mach-rk30/clock_data-rk3066b.c index 3d6e1b7f374d..8920de191af4 100644 --- a/arch/arm/mach-rk30/clock_data-rk3066b.c +++ b/arch/arm/mach-rk30/clock_data-rk3066b.c @@ -3268,11 +3268,10 @@ void __init _rk30_clock_data_init(unsigned long gpll, unsigned long cpll, int fl } -int rk30_dvfs_init(void); void __init rk30_clock_data_init(unsigned long gpll, unsigned long cpll, u32 flags) { _rk30_clock_data_init(gpll, cpll, flags); - rk30_dvfs_init(); + rk_dvfs_init(); } /* diff --git a/arch/arm/mach-rk30/clock_data.c b/arch/arm/mach-rk30/clock_data.c index 76432c8d1ac5..69fcb5eea65c 100644 --- a/arch/arm/mach-rk30/clock_data.c +++ b/arch/arm/mach-rk30/clock_data.c @@ -3422,12 +3422,12 @@ void __init _rk30_clock_data_init(unsigned long gpll,unsigned long cpll,int flag //cru_writel(0x07000000,CRU_MISC_CON); } -int rk30_dvfs_init(void); +int rk_dvfs_init(void); void __init rk30_clock_data_init(unsigned long gpll,unsigned long cpll,u32 flags) { _rk30_clock_data_init(gpll,cpll,flags); - rk30_dvfs_init(); + rk_dvfs_init(); } /* diff --git a/arch/arm/mach-rk30/dvfs.c b/arch/arm/mach-rk30/dvfs.c index 01e56220b730..caa54218c385 100755 --- a/arch/arm/mach-rk30/dvfs.c +++ b/arch/arm/mach-rk30/dvfs.c @@ -577,7 +577,7 @@ static struct depend_lookup rk30_depends[] = { }; static struct avs_ctr_st rk30_avs_ctr; -int rk30_dvfs_init(void) +int rk_dvfs_init(void) { int i = 0; for (i = 0; i < ARRAY_SIZE(rk30_vds); i++) { diff --git a/arch/arm/mach-rk30/include/mach/dvfs.h b/arch/arm/mach-rk30/include/mach/dvfs.h index 0e88605f06c4..cd9f96bbb613 100644 --- a/arch/arm/mach-rk30/include/mach/dvfs.h +++ b/arch/arm/mach-rk30/include/mach/dvfs.h @@ -1 +1,13 @@ +#ifndef RK_MACH_DVFS_H +#define RK_MACH_DVFS_H + #include + +#ifdef CONFIG_DVFS +int rk_dvfs_init(void); +#else +static inline int rk_dvfs_init(void){ return 0; } +#endif + +#endif + diff --git a/arch/arm/plat-rk/include/plat/dvfs.h b/arch/arm/plat-rk/include/plat/dvfs.h index 71a6905688fa..d9f546dd329d 100755 --- a/arch/arm/plat-rk/include/plat/dvfs.h +++ b/arch/arm/plat-rk/include/plat/dvfs.h @@ -238,12 +238,12 @@ static inline int dvfs_set_arm_logic_volt(struct dvfs_arm_table *dvfs_cpu_logic_ static inline struct regulator* dvfs_get_regulator(char *regulator_name){ return NULL; } static inline int dvfs_clk_enable_limit(struct clk *clk, unsigned int min_rate, unsigned max_rate){ return 0; } static inline int dvfs_clk_disable_limit(struct clk *clk){ return 0; }; -int dvfs_scale_volt_direct(struct vd_node *vd_clk, int volt_new){}; +static inline int dvfs_scale_volt_direct(struct vd_node *vd_clk, int volt_new){ return 0; }; static inline void avs_init(void){}; static inline void avs_init_val_get(int index, int vol, char *s){}; static inline int avs_set_scal_val(u8 avs_base){ return 0; }; -void avs_board_init(struct avs_ctr_st *data){}; +static inline void avs_board_init(struct avs_ctr_st *data){}; #endif #endif -- 2.34.1