From d3c5f9f2f4ac1bcbbf5e51a83648f458fb327691 Mon Sep 17 00:00:00 2001 From: chenxing Date: Mon, 12 Nov 2012 14:41:25 +0800 Subject: [PATCH] rk30/rk2928: disable dvfs tree debug and avs debug --- arch/arm/mach-rk2928/dvfs.c | 6 +++++- arch/arm/mach-rk30/dvfs.c | 8 ++++++-- arch/arm/plat-rk/Kconfig | 8 ++++++++ 3 files changed, 19 insertions(+), 3 deletions(-) diff --git a/arch/arm/mach-rk2928/dvfs.c b/arch/arm/mach-rk2928/dvfs.c index acdf8502420e..d3ff6cf6eeb2 100644 --- a/arch/arm/mach-rk2928/dvfs.c +++ b/arch/arm/mach-rk2928/dvfs.c @@ -1869,10 +1869,14 @@ struct dvfs_attribute { static struct dvfs_attribute dvfs_attrs[] = { /* node_name permision show_func store_func */ +#ifdef CONFIG_RK_DVFS_TREE_DBG __ATTR(dvfs_tree, S_IRUGO | S_IWUSR, dvfs_tree_show, dvfs_tree_store), +#endif +#ifdef CONFIG_RK_AVS_DBG __ATTR(avs_init, S_IRUGO | S_IWUSR, avs_init_show, avs_init_store), - //__ATTR(avs_dyn, S_IRUGO | S_IWUSR, avs_dyn_show, avs_dyn_store), + __ATTR(avs_dyn, S_IRUGO | S_IWUSR, avs_dyn_show, avs_dyn_store), __ATTR(avs_now, S_IRUGO | S_IWUSR, avs_now_show, avs_now_store), +#endif }; static int __init dvfs_init(void) diff --git a/arch/arm/mach-rk30/dvfs.c b/arch/arm/mach-rk30/dvfs.c index b47ca9df06d3..3753dfdd8d22 100755 --- a/arch/arm/mach-rk30/dvfs.c +++ b/arch/arm/mach-rk30/dvfs.c @@ -267,7 +267,7 @@ void dvfs_clk_register_set_rate_callback(struct clk *clk, clk_dvfs_target_callba struct clk_node *dvfs_clk = clk_get_dvfs_info(clk); if (IS_ERR_OR_NULL(dvfs_clk)){ DVFS_ERR("%s %s get dvfs_clk err\n", __func__, clk->name); - return -1; + return ; } dvfs_clk->clk_dvfs_target = clk_dvfs_target; } @@ -1865,10 +1865,14 @@ struct dvfs_attribute { static struct dvfs_attribute dvfs_attrs[] = { /* node_name permision show_func store_func */ +#ifdef CONFIG_RK_DVFS_TREE_DBG __ATTR(dvfs_tree, S_IRUGO | S_IWUSR, dvfs_tree_show, dvfs_tree_store), +#endif +#ifdef CONFIG_RK_AVS_DBG __ATTR(avs_init, S_IRUGO | S_IWUSR, avs_init_show, avs_init_store), - //__ATTR(avs_dyn, S_IRUGO | S_IWUSR, avs_dyn_show, avs_dyn_store), + __ATTR(avs_dyn, S_IRUGO | S_IWUSR, avs_dyn_show, avs_dyn_store), __ATTR(avs_now, S_IRUGO | S_IWUSR, avs_now_show, avs_now_store), +#endif }; static int __init dvfs_init(void) diff --git a/arch/arm/plat-rk/Kconfig b/arch/arm/plat-rk/Kconfig index 68960de88248..5dd3f06be381 100755 --- a/arch/arm/plat-rk/Kconfig +++ b/arch/arm/plat-rk/Kconfig @@ -101,6 +101,14 @@ config DVFS depends on REGULATOR&&CPU_FREQ default y +config RK_DVFS_TREE_DBG + bool "Enable dvfs tree debug" + depends on DVFS + +config RK_AVS_DBG + bool "Enable avs(auto voltage scale) debug" + depends on DVFS + config RK_CLOCK_PROC bool "/proc/clocks support" depends on PROC_FS -- 2.34.1