diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-11 13:08:33 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2009-06-11 13:08:33 -0400 |
commit | d3d07d941fd80c173b6d690ded00ee5fb8302e06 (patch) | |
tree | f1a82c956e393df9933c8544bb564ef1735384ee /arch/sh/boards/mach-cayman/panic.c | |
parent | 6cd8e300b49332eb9eeda45816c711c198d31505 (diff) | |
parent | 54ff328b46e58568c4b3350c2fa3223ef862e5a4 (diff) |
Merge git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6
* git://git.kernel.org/pub/scm/linux/kernel/git/lethal/sh-2.6: (266 commits)
sh: Tie sparseirq in to Kconfig.
sh: Wire up sys_rt_tgsigqueueinfo.
sh: Fix sys_pwritev() syscall table entry for sh32.
sh: Fix sh4a llsc-based cmpxchg()
sh: sh7724: Add JPU support
sh: sh7724: INTC setting update
sh: sh7722 clock framework rewrite
sh: sh7366 clock framework rewrite
sh: sh7343 clock framework rewrite
sh: sh7724 clock framework rewrite V3
sh: sh7723 clock framework rewrite V2
sh: add enable()/disable()/set_rate() to div6 code
sh: add AP325RXA mode pin configuration
sh: add Migo-R mode pin configuration
sh: sh7722 mode pin definitions
sh: sh7724 mode pin comments
sh: sh7723 mode pin V2
sh: rework mode pin code
sh: clock div6 helper code
sh: clock div4 frequency table offset fix
...
Diffstat (limited to 'arch/sh/boards/mach-cayman/panic.c')
-rw-r--r-- | arch/sh/boards/mach-cayman/panic.c | 49 |
1 files changed, 49 insertions, 0 deletions
diff --git a/arch/sh/boards/mach-cayman/panic.c b/arch/sh/boards/mach-cayman/panic.c new file mode 100644 index 000000000000..d1e67306d07c --- /dev/null +++ b/arch/sh/boards/mach-cayman/panic.c | |||
@@ -0,0 +1,49 @@ | |||
1 | /* | ||
2 | * Copyright (C) 2003 Richard Curnow, SuperH UK Limited | ||
3 | * | ||
4 | * This file is subject to the terms and conditions of the GNU General Public | ||
5 | * License. See the file "COPYING" in the main directory of this archive | ||
6 | * for more details. | ||
7 | */ | ||
8 | |||
9 | #include <linux/kernel.h> | ||
10 | #include <linux/io.h> | ||
11 | #include <cpu/registers.h> | ||
12 | |||
13 | /* THIS IS A PHYSICAL ADDRESS */ | ||
14 | #define HDSP2534_ADDR (0x04002100) | ||
15 | |||
16 | static void poor_mans_delay(void) | ||
17 | { | ||
18 | int i; | ||
19 | |||
20 | for (i = 0; i < 2500000; i++) | ||
21 | cpu_relax(); | ||
22 | } | ||
23 | |||
24 | static void show_value(unsigned long x) | ||
25 | { | ||
26 | int i; | ||
27 | unsigned nibble; | ||
28 | for (i = 0; i < 8; i++) { | ||
29 | nibble = ((x >> (i * 4)) & 0xf); | ||
30 | |||
31 | __raw_writeb(nibble + ((nibble > 9) ? 55 : 48), | ||
32 | HDSP2534_ADDR + 0xe0 + ((7 - i) << 2)); | ||
33 | } | ||
34 | } | ||
35 | |||
36 | void | ||
37 | panic_handler(unsigned long panicPC, unsigned long panicSSR, | ||
38 | unsigned long panicEXPEVT) | ||
39 | { | ||
40 | while (1) { | ||
41 | /* This piece of code displays the PC on the LED display */ | ||
42 | show_value(panicPC); | ||
43 | poor_mans_delay(); | ||
44 | show_value(panicSSR); | ||
45 | poor_mans_delay(); | ||
46 | show_value(panicEXPEVT); | ||
47 | poor_mans_delay(); | ||
48 | } | ||
49 | } | ||