2 * Common header file for blackfin family of processors.
6 #ifndef _BLACKFIN_TRACE_
7 #define _BLACKFIN_TRACE_
10 /* Trace Macros for C files */
12 #define trace_buffer_save(x) \
14 (x) = bfin_read_TBUFCTL(); \
15 bfin_write_TBUFCTL((x) & ~TBUFEN); \
18 #define trace_buffer_restore(x) \
20 bfin_write_TBUFCTL((x)); \
24 /* Trace Macros for Assembly files */
26 #define TRACE_BUFFER_START(preg, dreg) trace_buffer_start(preg, dreg)
27 #define TRACE_BUFFER_STOP(preg, dreg) trace_buffer_stop(preg, dreg)
29 #define trace_buffer_stop(preg, dreg) \
30 preg.L = LO(TBUFCTL); \
31 preg.H = HI(TBUFCTL); \
35 #define trace_buffer_start(preg, dreg) \
36 preg.L = LO(TBUFCTL); \
37 preg.H = HI(TBUFCTL); \
41 #ifdef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE
42 # define DEBUG_START_HWTRACE(preg, dreg) trace_buffer_start(preg, dreg)
43 # define DEBUG_STOP_HWTRACE(preg, dreg) trace_buffer_stop(preg, dreg)
46 # define DEBUG_START_HWTRACE(preg, dreg)
47 # define DEBUG_STOP_HWTRACE(preg, dreg)
50 #endif /* __ASSEMBLY__ */
52 #endif /* _BLACKFIN_TRACE_ */