Commit 7e9be3ea3aad02b576765ed3b21e939666996fd0
Committed by
Tom Rini
1 parent
9508ecfbcb
Exists in
smarc_8mq_lf_v2020.04
and in
11 other branches
iotrace: move record definitons to header file
The header definitions are needed for reading record information in cmd/iotrace.c Signed-off-by: Ramon Fried <ramon.fried@gmail.com> Reviewed-by: Simon Glass <sjg@chromium.org>
Showing 2 changed files with 28 additions and 27 deletions Side-by-side Diff
common/iotrace.c
... | ... | @@ -11,33 +11,6 @@ |
11 | 11 | |
12 | 12 | DECLARE_GLOBAL_DATA_PTR; |
13 | 13 | |
14 | -/* Support up to the machine word length for now */ | |
15 | -typedef ulong iovalue_t; | |
16 | - | |
17 | -enum iotrace_flags { | |
18 | - IOT_8 = 0, | |
19 | - IOT_16, | |
20 | - IOT_32, | |
21 | - | |
22 | - IOT_READ = 0 << 3, | |
23 | - IOT_WRITE = 1 << 3, | |
24 | -}; | |
25 | - | |
26 | -/** | |
27 | - * struct iotrace_record - Holds a single I/O trace record | |
28 | - * | |
29 | - * @flags: I/O access type | |
30 | - * @timestamp: Timestamp of access | |
31 | - * @addr: Address of access | |
32 | - * @value: Value written or read | |
33 | - */ | |
34 | -struct iotrace_record { | |
35 | - enum iotrace_flags flags; | |
36 | - u64 timestamp; | |
37 | - phys_addr_t addr; | |
38 | - iovalue_t value; | |
39 | -}; | |
40 | - | |
41 | 14 | /** |
42 | 15 | * struct iotrace - current trace status and checksum |
43 | 16 | * |
include/iotrace.h
... | ... | @@ -6,7 +6,35 @@ |
6 | 6 | #ifndef __IOTRACE_H |
7 | 7 | #define __IOTRACE_H |
8 | 8 | |
9 | +//#include <common.h> | |
9 | 10 | #include <linux/types.h> |
11 | + | |
12 | +/* Support up to the machine word length for now */ | |
13 | +typedef ulong iovalue_t; | |
14 | + | |
15 | +enum iotrace_flags { | |
16 | + IOT_8 = 0, | |
17 | + IOT_16, | |
18 | + IOT_32, | |
19 | + | |
20 | + IOT_READ = 0 << 3, | |
21 | + IOT_WRITE = 1 << 3, | |
22 | +}; | |
23 | + | |
24 | +/** | |
25 | + * struct iotrace_record - Holds a single I/O trace record | |
26 | + * | |
27 | + * @flags: I/O access type | |
28 | + * @timestamp: Timestamp of access | |
29 | + * @addr: Address of access | |
30 | + * @value: Value written or read | |
31 | + */ | |
32 | +struct iotrace_record { | |
33 | + enum iotrace_flags flags; | |
34 | + u64 timestamp; | |
35 | + phys_addr_t addr; | |
36 | + iovalue_t value; | |
37 | +}; | |
10 | 38 | |
11 | 39 | /* |
12 | 40 | * This file is designed to be included in arch/<arch>/include/asm/io.h. |