summaryrefslogtreecommitdiff
path: root/include
diff options
context:
space:
mode:
authorSahitya Tummala <stummala@codeaurora.org>2014-01-02 13:27:14 +0530
committerDavid Keitel <dkeitel@codeaurora.org>2016-03-22 10:56:31 -0700
commitaf960ab1545c0e57890d5ceb143e80e4ace087ca (patch)
tree42162b817fd6876c33b8148ec52db81c9b85abe4 /include
parent0c8a317ea9cd7c5cfd541ce49df692d715d50b81 (diff)
scsi: ufs: Add support for clock scaling using devfreq framework
The clocks for UFS device will be managed by generic DVFS (Dynamic Voltage and Frequency Scaling) framework within kernel. This devfreq framework works with different governors to scale the clocks. By default, UFS devices uses simple_ondemand governor which scales the clocks up if the load is more than upthreshold and scales down if the load is less than downthreshold. Change-Id: I1c3944a5b1771b967c1df3e441a75fd584d6e2a5 Signed-off-by: Sahitya Tummala <stummala@codeaurora.org> [gbroner@codeaurora.org: fix usage of devfreq governor data] Signed-off-by: Gilad Broner <gbroner@codeaurora.org> [subhashj@codeaurora.org: resolved merge conflicts, dropped most of the changes as they are already present on baseline] Signed-off-by: Subhash Jadavani <subhashj@codeaurora.org>
Diffstat (limited to 'include')
-rw-r--r--include/trace/events/ufs.h30
1 files changed, 29 insertions, 1 deletions
diff --git a/include/trace/events/ufs.h b/include/trace/events/ufs.h
index 3042ba7680f3..36cd5ac3d43a 100644
--- a/include/trace/events/ufs.h
+++ b/include/trace/events/ufs.h
@@ -1,5 +1,5 @@
/*
- * Copyright (c) 2013, The Linux Foundation. All rights reserved.
+ * Copyright (c) 2013-2014, 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
@@ -39,6 +39,34 @@ TRACE_EVENT(ufshcd_clk_gating,
__get_str(dev_name), __get_str(state))
);
+TRACE_EVENT(ufshcd_clk_scaling,
+
+ TP_PROTO(const char *dev_name, const char *state, const char *clk,
+ u32 prev_state, u32 curr_state),
+
+ TP_ARGS(dev_name, state, clk, prev_state, curr_state),
+
+ TP_STRUCT__entry(
+ __string(dev_name, dev_name)
+ __string(state, state)
+ __string(clk, clk)
+ __field(u32, prev_state)
+ __field(u32, curr_state)
+ ),
+
+ TP_fast_assign(
+ __assign_str(dev_name, dev_name);
+ __assign_str(state, state);
+ __assign_str(clk, clk);
+ __entry->prev_state = prev_state;
+ __entry->curr_state = curr_state;
+ ),
+
+ TP_printk("%s: %s %s from %u to %u Hz",
+ __get_str(dev_name), __get_str(state), __get_str(clk),
+ __entry->prev_state, __entry->curr_state)
+);
+
DECLARE_EVENT_CLASS(ufshcd_template,
TP_PROTO(const char *dev_name, int err, s64 usecs),