From 6d25a993d30f94d6287d795e19ea25690a8a15e9 Mon Sep 17 00:00:00 2001 From: Tao Huang Date: Tue, 17 Sep 2019 17:53:18 +0800 Subject: [PATCH] clk: Add COMMON_CLK_DEBUGFS Make clk debugfs interface selectable. Save about 15ms of boot time on RK1808 EVB if unselected. Change-Id: Ie0095164d31f85491da755284f3a347dfb24cfdc Signed-off-by: Tao Huang --- drivers/clk/Kconfig | 7 +++++++ drivers/clk/clk.c | 4 ++-- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/drivers/clk/Kconfig b/drivers/clk/Kconfig index f64bb78cd158..87320736bd5c 100644 --- a/drivers/clk/Kconfig +++ b/drivers/clk/Kconfig @@ -22,6 +22,13 @@ config COMMON_CLK menu "Common Clock Framework" depends on COMMON_CLK +config COMMON_CLK_DEBUGFS + bool "Common Clock DebugFS interface" + depends on COMMON_CLK && DEBUG_FS + default y + help + Turns on the DebugFS interface for clock. + config COMMON_CLK_WM831X tristate "Clock driver for WM831x/2x PMICs" depends on MFD_WM831X diff --git a/drivers/clk/clk.c b/drivers/clk/clk.c index 5ecb4c4dc3f5..fe171db91d54 100644 --- a/drivers/clk/clk.c +++ b/drivers/clk/clk.c @@ -73,7 +73,7 @@ struct clk_core { struct hlist_node child_node; struct hlist_head clks; unsigned int notifier_count; -#ifdef CONFIG_DEBUG_FS +#ifdef CONFIG_COMMON_CLK_DEBUGFS struct dentry *dentry; struct hlist_node debug_node; #endif @@ -2617,7 +2617,7 @@ EXPORT_SYMBOL_GPL(clk_is_match); /*** debugfs support ***/ -#ifdef CONFIG_DEBUG_FS +#ifdef CONFIG_COMMON_CLK_DEBUGFS #include static struct dentry *rootdir;