-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Blackfin arch: Clean up trace buffer handling, No major functional ch…
…anges. Turns on trace earlier, so crashes at kernel start should print out a trace, making things easier to debug. Signed-off-by: Robin Getz <robin.getz@analog.com> Signed-off-by: Mike Frysinger <michael.frysinger@analog.com> Signed-off-by: Bryan Wu <bryan.wu@analog.com>
- Loading branch information
Robin Getz
authored and
Bryan Wu
committed
Jun 21, 2007
1 parent
29440a2
commit 669b792
Showing
9 changed files
with
97 additions
and
43 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,52 @@ | ||
/* | ||
* Common header file for blackfin family of processors. | ||
* | ||
*/ | ||
|
||
#ifndef _BLACKFIN_TRACE_ | ||
#define _BLACKFIN_TRACE_ | ||
|
||
#ifndef __ASSEMBLY__ | ||
/* Trace Macros for C files */ | ||
|
||
#define trace_buffer_save(x) \ | ||
do { \ | ||
(x) = bfin_read_TBUFCTL(); \ | ||
bfin_write_TBUFCTL((x) & ~TBUFEN); \ | ||
} while (0) | ||
|
||
#define trace_buffer_restore(x) \ | ||
do { \ | ||
bfin_write_TBUFCTL((x)); \ | ||
} while (0) | ||
|
||
#else | ||
/* Trace Macros for Assembly files */ | ||
|
||
#define TRACE_BUFFER_START(preg, dreg) trace_buffer_start(preg, dreg) | ||
#define TRACE_BUFFER_STOP(preg, dreg) trace_buffer_stop(preg, dreg) | ||
|
||
#define trace_buffer_stop(preg, dreg) \ | ||
preg.L = LO(TBUFCTL); \ | ||
preg.H = HI(TBUFCTL); \ | ||
dreg = 0x1; \ | ||
[preg] = dreg; | ||
|
||
#define trace_buffer_start(preg, dreg) \ | ||
preg.L = LO(TBUFCTL); \ | ||
preg.H = HI(TBUFCTL); \ | ||
dreg = 0x13; \ | ||
[preg] = dreg; | ||
|
||
#ifdef CONFIG_DEBUG_BFIN_NO_KERN_HWTRACE | ||
# define DEBUG_START_HWTRACE(preg, dreg) trace_buffer_start(preg, dreg) | ||
# define DEBUG_STOP_HWTRACE(preg, dreg) trace_buffer_stop(preg, dreg) | ||
|
||
#else | ||
# define DEBUG_START_HWTRACE(preg, dreg) | ||
# define DEBUG_STOP_HWTRACE(preg, dreg) | ||
#endif | ||
|
||
#endif /* __ASSEMBLY__ */ | ||
|
||
#endif /* _BLACKFIN_TRACE_ */ |