clk: Move the measure functionality from common clock framework

Common Clock Framework(CCF) already has a clock ops hook `debug_init` which
could be used for the debugfs clock measure functionality. Remove the APIs
from the CCF and update the 'debug_init' clock ops to the clock types which
require the measure functionality.

Change-Id: I0c01f72a9d1d1caa1b1ab73a800401c2cbc3216c
Signed-off-by: Taniya Das <tdas@codeaurora.org>
This commit is contained in:
Taniya Das 2017-02-28 10:48:38 +05:30
parent 76ddd7e95c
commit 947428e547
6 changed files with 13 additions and 8 deletions

View file

@ -2874,8 +2874,6 @@ static int clk_debug_create_one(struct clk_core *core, struct dentry *pdentry)
goto err_out;
}
clk_debug_measure_add(core->hw, core->dentry);
ret = 0;
goto out;
@ -3005,10 +3003,8 @@ static int __init clk_debug_init(void)
return -ENOMEM;
mutex_lock(&clk_debug_lock);
hlist_for_each_entry(core, &clk_debug_list, debug_node) {
clk_register_debug(core->hw);
hlist_for_each_entry(core, &clk_debug_list, debug_node)
clk_debug_create_one(core, rootdir);
}
inited = 1;
mutex_unlock(&clk_debug_lock);

View file

@ -23,8 +23,6 @@ void __clk_free_clk(struct clk *clk);
/* Debugfs API to print the enabled clocks */
void clock_debug_print_enabled(void);
int clk_register_debug(struct clk_hw *hw);
int clk_debug_measure_add(struct clk_hw *hw, struct dentry *dentry);
void clk_debug_print_hw(struct clk_core *clk, struct seq_file *f);
#else

View file

@ -21,6 +21,7 @@
#include <linux/regmap.h>
#include "clk-branch.h"
#include "clk-debug.h"
#include "clk-regmap.h"
#include "common.h"
@ -250,6 +251,7 @@ const struct clk_ops clk_branch2_ops = {
.is_enabled = clk_is_enabled_regmap,
.set_flags = clk_branch_set_flags,
.list_registers = clk_branch2_list_registers,
.debug_init = clk_debug_measure_add,
};
EXPORT_SYMBOL_GPL(clk_branch2_ops);
@ -384,6 +386,7 @@ const struct clk_ops clk_gate2_ops = {
.is_enabled = clk_is_enabled_regmap,
.list_registers = clk_gate2_list_registers,
.set_flags = clk_gate2_set_flags,
.debug_init = clk_debug_measure_add,
};
EXPORT_SYMBOL_GPL(clk_gate2_ops);

View file

@ -39,6 +39,7 @@
#include "common.h"
#include "clk-regmap.h"
#include "clk-rcg.h"
#include "clk-debug.h"
enum {
LMH_LITE_CLK_SRC,
@ -757,6 +758,7 @@ static struct clk_ops clk_ops_cpu_osm = {
.round_rate = clk_osm_round_rate,
.list_rate = clk_osm_list_rate,
.recalc_rate = clk_osm_recalc_rate,
.debug_init = clk_debug_measure_add,
};
static const struct parent_map gcc_parent_map_1[] = {

View file

@ -1,5 +1,5 @@
/*
* Copyright (c) 2016, The Linux Foundation. All rights reserved.
* Copyright (c) 2016-2017, The Linux Foundation. All rights reserved.
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License version 2 and
@ -17,6 +17,8 @@
#include <linux/slab.h>
#include <linux/reset-controller.h>
#include "clk-debug.h"
struct clk_dummy {
struct clk_hw hw;
struct reset_controller_dev reset;
@ -65,6 +67,7 @@ struct clk_ops clk_dummy_ops = {
.round_rate = dummy_clk_round_rate,
.recalc_rate = dummy_clk_recalc_rate,
.set_flags = dummy_clk_set_flags,
.debug_init = clk_debug_measure_add,
};
EXPORT_SYMBOL_GPL(clk_dummy_ops);

View file

@ -30,6 +30,7 @@
#include <dt-bindings/mfd/qcom-rpm.h>
#include "clk-voter.h"
#include "clk-debug.h"
#define QCOM_RPM_KEY_SOFTWARE_ENABLE 0x6e657773
#define QCOM_RPM_KEY_PIN_CTRL_CLK_BUFFER_ENABLE_KEY 0x62636370
@ -463,6 +464,7 @@ static const struct clk_ops clk_smd_rpm_ops = {
.round_rate = clk_smd_rpm_round_rate,
.recalc_rate = clk_smd_rpm_recalc_rate,
.is_enabled = clk_smd_rpm_is_enabled,
.debug_init = clk_debug_measure_add,
};
static const struct clk_ops clk_smd_rpm_branch_ops = {
@ -471,6 +473,7 @@ static const struct clk_ops clk_smd_rpm_branch_ops = {
.round_rate = clk_smd_rpm_round_rate,
.recalc_rate = clk_smd_rpm_recalc_rate,
.is_enabled = clk_smd_rpm_is_enabled,
.debug_init = clk_debug_measure_add,
};
/* msm8916 */