1 /* SPDX-License-Identifier: GPL-2.0-only */ << 2 /* 1 /* 3 * Copyright (c) 2014-2015, The Linux Foundati 2 * Copyright (c) 2014-2015, The Linux Foundation. All rights reserved. >> 3 * >> 4 * This software is licensed under the terms of the GNU General Public >> 5 * License version 2, as published by the Free Software Foundation, and >> 6 * may be copied, distributed, and modified under those terms. >> 7 * >> 8 * This program is distributed in the hope that it will be useful, >> 9 * but WITHOUT ANY WARRANTY; without even the implied warranty of >> 10 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the >> 11 * GNU General Public License for more details. 4 */ 12 */ 5 #undef TRACE_SYSTEM 13 #undef TRACE_SYSTEM 6 #define TRACE_SYSTEM clk 14 #define TRACE_SYSTEM clk 7 15 8 #if !defined(_TRACE_CLK_H) || defined(TRACE_HE 16 #if !defined(_TRACE_CLK_H) || defined(TRACE_HEADER_MULTI_READ) 9 #define _TRACE_CLK_H 17 #define _TRACE_CLK_H 10 18 11 #include <linux/tracepoint.h> 19 #include <linux/tracepoint.h> 12 20 13 struct clk_core; 21 struct clk_core; 14 22 15 DECLARE_EVENT_CLASS(clk, 23 DECLARE_EVENT_CLASS(clk, 16 24 17 TP_PROTO(struct clk_core *core), 25 TP_PROTO(struct clk_core *core), 18 26 19 TP_ARGS(core), 27 TP_ARGS(core), 20 28 21 TP_STRUCT__entry( 29 TP_STRUCT__entry( 22 __string( name, 30 __string( name, core->name ) 23 ), 31 ), 24 32 25 TP_fast_assign( 33 TP_fast_assign( 26 __assign_str(name); !! 34 __assign_str(name, core->name); 27 ), 35 ), 28 36 29 TP_printk("%s", __get_str(name)) 37 TP_printk("%s", __get_str(name)) 30 ); 38 ); 31 39 32 DEFINE_EVENT(clk, clk_enable, 40 DEFINE_EVENT(clk, clk_enable, 33 41 34 TP_PROTO(struct clk_core *core), 42 TP_PROTO(struct clk_core *core), 35 43 36 TP_ARGS(core) 44 TP_ARGS(core) 37 ); 45 ); 38 46 39 DEFINE_EVENT(clk, clk_enable_complete, 47 DEFINE_EVENT(clk, clk_enable_complete, 40 48 41 TP_PROTO(struct clk_core *core), 49 TP_PROTO(struct clk_core *core), 42 50 43 TP_ARGS(core) 51 TP_ARGS(core) 44 ); 52 ); 45 53 46 DEFINE_EVENT(clk, clk_disable, 54 DEFINE_EVENT(clk, clk_disable, 47 55 48 TP_PROTO(struct clk_core *core), 56 TP_PROTO(struct clk_core *core), 49 57 50 TP_ARGS(core) 58 TP_ARGS(core) 51 ); 59 ); 52 60 53 DEFINE_EVENT(clk, clk_disable_complete, 61 DEFINE_EVENT(clk, clk_disable_complete, 54 62 55 TP_PROTO(struct clk_core *core), 63 TP_PROTO(struct clk_core *core), 56 64 57 TP_ARGS(core) 65 TP_ARGS(core) 58 ); 66 ); 59 67 60 DEFINE_EVENT(clk, clk_prepare, 68 DEFINE_EVENT(clk, clk_prepare, 61 69 62 TP_PROTO(struct clk_core *core), 70 TP_PROTO(struct clk_core *core), 63 71 64 TP_ARGS(core) 72 TP_ARGS(core) 65 ); 73 ); 66 74 67 DEFINE_EVENT(clk, clk_prepare_complete, 75 DEFINE_EVENT(clk, clk_prepare_complete, 68 76 69 TP_PROTO(struct clk_core *core), 77 TP_PROTO(struct clk_core *core), 70 78 71 TP_ARGS(core) 79 TP_ARGS(core) 72 ); 80 ); 73 81 74 DEFINE_EVENT(clk, clk_unprepare, 82 DEFINE_EVENT(clk, clk_unprepare, 75 83 76 TP_PROTO(struct clk_core *core), 84 TP_PROTO(struct clk_core *core), 77 85 78 TP_ARGS(core) 86 TP_ARGS(core) 79 ); 87 ); 80 88 81 DEFINE_EVENT(clk, clk_unprepare_complete, 89 DEFINE_EVENT(clk, clk_unprepare_complete, 82 90 83 TP_PROTO(struct clk_core *core), 91 TP_PROTO(struct clk_core *core), 84 92 85 TP_ARGS(core) 93 TP_ARGS(core) 86 ); 94 ); 87 95 88 DECLARE_EVENT_CLASS(clk_rate, 96 DECLARE_EVENT_CLASS(clk_rate, 89 97 90 TP_PROTO(struct clk_core *core, unsign 98 TP_PROTO(struct clk_core *core, unsigned long rate), 91 99 92 TP_ARGS(core, rate), 100 TP_ARGS(core, rate), 93 101 94 TP_STRUCT__entry( 102 TP_STRUCT__entry( 95 __string( name, 103 __string( name, core->name ) 96 __field(unsigned long, 104 __field(unsigned long, rate ) 97 ), 105 ), 98 106 99 TP_fast_assign( 107 TP_fast_assign( 100 __assign_str(name); !! 108 __assign_str(name, core->name); 101 __entry->rate = rate; 109 __entry->rate = rate; 102 ), 110 ), 103 111 104 TP_printk("%s %lu", __get_str(name), ( 112 TP_printk("%s %lu", __get_str(name), (unsigned long)__entry->rate) 105 ); 113 ); 106 114 107 DEFINE_EVENT(clk_rate, clk_set_rate, 115 DEFINE_EVENT(clk_rate, clk_set_rate, 108 116 109 TP_PROTO(struct clk_core *core, unsign 117 TP_PROTO(struct clk_core *core, unsigned long rate), 110 118 111 TP_ARGS(core, rate) 119 TP_ARGS(core, rate) 112 ); 120 ); 113 121 114 DEFINE_EVENT(clk_rate, clk_set_rate_complete, 122 DEFINE_EVENT(clk_rate, clk_set_rate_complete, 115 123 116 TP_PROTO(struct clk_core *core, unsign 124 TP_PROTO(struct clk_core *core, unsigned long rate), 117 125 118 TP_ARGS(core, rate) 126 TP_ARGS(core, rate) 119 ); 127 ); 120 128 121 DEFINE_EVENT(clk_rate, clk_set_min_rate, << 122 << 123 TP_PROTO(struct clk_core *core, unsign << 124 << 125 TP_ARGS(core, rate) << 126 ); << 127 << 128 DEFINE_EVENT(clk_rate, clk_set_max_rate, << 129 << 130 TP_PROTO(struct clk_core *core, unsign << 131 << 132 TP_ARGS(core, rate) << 133 ); << 134 << 135 DECLARE_EVENT_CLASS(clk_rate_range, << 136 << 137 TP_PROTO(struct clk_core *core, unsign << 138 << 139 TP_ARGS(core, min, max), << 140 << 141 TP_STRUCT__entry( << 142 __string( name, << 143 __field(unsigned long, << 144 __field(unsigned long, << 145 ), << 146 << 147 TP_fast_assign( << 148 __assign_str(name); << 149 __entry->min = min; << 150 __entry->max = max; << 151 ), << 152 << 153 TP_printk("%s min %lu max %lu", __get_ << 154 (unsigned long)__entry->min, << 155 (unsigned long)__entry->max) << 156 ); << 157 << 158 DEFINE_EVENT(clk_rate_range, clk_set_rate_rang << 159 << 160 TP_PROTO(struct clk_core *core, unsign << 161 << 162 TP_ARGS(core, min, max) << 163 ); << 164 << 165 DECLARE_EVENT_CLASS(clk_parent, 129 DECLARE_EVENT_CLASS(clk_parent, 166 130 167 TP_PROTO(struct clk_core *core, struct 131 TP_PROTO(struct clk_core *core, struct clk_core *parent), 168 132 169 TP_ARGS(core, parent), 133 TP_ARGS(core, parent), 170 134 171 TP_STRUCT__entry( 135 TP_STRUCT__entry( 172 __string( name, 136 __string( name, core->name ) 173 __string( pname, parent !! 137 __string( pname, parent->name ) 174 ), 138 ), 175 139 176 TP_fast_assign( 140 TP_fast_assign( 177 __assign_str(name); !! 141 __assign_str(name, core->name); 178 __assign_str(pname); !! 142 __assign_str(pname, parent->name); 179 ), 143 ), 180 144 181 TP_printk("%s %s", __get_str(name), __ 145 TP_printk("%s %s", __get_str(name), __get_str(pname)) 182 ); 146 ); 183 147 184 DEFINE_EVENT(clk_parent, clk_set_parent, 148 DEFINE_EVENT(clk_parent, clk_set_parent, 185 149 186 TP_PROTO(struct clk_core *core, struct 150 TP_PROTO(struct clk_core *core, struct clk_core *parent), 187 151 188 TP_ARGS(core, parent) 152 TP_ARGS(core, parent) 189 ); 153 ); 190 154 191 DEFINE_EVENT(clk_parent, clk_set_parent_comple 155 DEFINE_EVENT(clk_parent, clk_set_parent_complete, 192 156 193 TP_PROTO(struct clk_core *core, struct 157 TP_PROTO(struct clk_core *core, struct clk_core *parent), 194 158 195 TP_ARGS(core, parent) 159 TP_ARGS(core, parent) 196 ); 160 ); 197 161 198 DECLARE_EVENT_CLASS(clk_phase, 162 DECLARE_EVENT_CLASS(clk_phase, 199 163 200 TP_PROTO(struct clk_core *core, int ph 164 TP_PROTO(struct clk_core *core, int phase), 201 165 202 TP_ARGS(core, phase), 166 TP_ARGS(core, phase), 203 167 204 TP_STRUCT__entry( 168 TP_STRUCT__entry( 205 __string( name, 169 __string( name, core->name ) 206 __field( int, 170 __field( int, phase ) 207 ), 171 ), 208 172 209 TP_fast_assign( 173 TP_fast_assign( 210 __assign_str(name); !! 174 __assign_str(name, core->name); 211 __entry->phase = phase; 175 __entry->phase = phase; 212 ), 176 ), 213 177 214 TP_printk("%s %d", __get_str(name), (i 178 TP_printk("%s %d", __get_str(name), (int)__entry->phase) 215 ); 179 ); 216 180 217 DEFINE_EVENT(clk_phase, clk_set_phase, 181 DEFINE_EVENT(clk_phase, clk_set_phase, 218 182 219 TP_PROTO(struct clk_core *core, int ph 183 TP_PROTO(struct clk_core *core, int phase), 220 184 221 TP_ARGS(core, phase) 185 TP_ARGS(core, phase) 222 ); 186 ); 223 187 224 DEFINE_EVENT(clk_phase, clk_set_phase_complete 188 DEFINE_EVENT(clk_phase, clk_set_phase_complete, 225 189 226 TP_PROTO(struct clk_core *core, int ph 190 TP_PROTO(struct clk_core *core, int phase), 227 191 228 TP_ARGS(core, phase) 192 TP_ARGS(core, phase) 229 ); << 230 << 231 DECLARE_EVENT_CLASS(clk_duty_cycle, << 232 << 233 TP_PROTO(struct clk_core *core, struct << 234 << 235 TP_ARGS(core, duty), << 236 << 237 TP_STRUCT__entry( << 238 __string( name, << 239 __field( unsigned int, << 240 __field( unsigned int, << 241 ), << 242 << 243 TP_fast_assign( << 244 __assign_str(name); << 245 __entry->num = duty->num; << 246 __entry->den = duty->den; << 247 ), << 248 << 249 TP_printk("%s %u/%u", __get_str(name), << 250 (unsigned int)__entry->den) << 251 ); << 252 << 253 DEFINE_EVENT(clk_duty_cycle, clk_set_duty_cycl << 254 << 255 TP_PROTO(struct clk_core *core, struct << 256 << 257 TP_ARGS(core, duty) << 258 ); << 259 << 260 DEFINE_EVENT(clk_duty_cycle, clk_set_duty_cycl << 261 << 262 TP_PROTO(struct clk_core *core, struct << 263 << 264 TP_ARGS(core, duty) << 265 ); << 266 << 267 DECLARE_EVENT_CLASS(clk_rate_request, << 268 << 269 TP_PROTO(struct clk_rate_request *req) << 270 << 271 TP_ARGS(req), << 272 << 273 TP_STRUCT__entry( << 274 __string( name, req->co << 275 __string( pname, req->be << 276 __field(unsigned long, << 277 __field(unsigned long, << 278 __field(unsigned long, << 279 ), << 280 << 281 TP_fast_assign( << 282 __assign_str(name); << 283 __assign_str(pname); << 284 __entry->min = req->min_rate; << 285 __entry->max = req->max_rate; << 286 __entry->prate = req->best_par << 287 ), << 288 << 289 TP_printk("%s min %lu max %lu, parent << 290 (unsigned long)__entry->min, << 291 (unsigned long)__entry->max, << 292 __get_str(pname), << 293 (unsigned long)__entry->prat << 294 ); << 295 << 296 DEFINE_EVENT(clk_rate_request, clk_rate_reques << 297 << 298 TP_PROTO(struct clk_rate_request *req) << 299 << 300 TP_ARGS(req) << 301 ); << 302 << 303 DEFINE_EVENT(clk_rate_request, clk_rate_reques << 304 << 305 TP_PROTO(struct clk_rate_request *req) << 306 << 307 TP_ARGS(req) << 308 ); 193 ); 309 194 310 #endif /* _TRACE_CLK_H */ 195 #endif /* _TRACE_CLK_H */ 311 196 312 /* This part must be outside protection */ 197 /* This part must be outside protection */ 313 #include <trace/define_trace.h> 198 #include <trace/define_trace.h> 314 199
Linux® is a registered trademark of Linus Torvalds in the United States and other countries.
TOMOYO® is a registered trademark of NTT DATA CORPORATION.