diff options
author | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-15 22:04:58 -0400 |
---|---|---|
committer | Linus Torvalds <torvalds@linux-foundation.org> | 2008-07-15 22:04:58 -0400 |
commit | 45158894d4d6704afbb4cefe55e5f6ca279fe12a (patch) | |
tree | d57e745e2d0848d75cd4a46ca04178b16f186b50 /arch/ppc/syslib/gen550_kgdb.c | |
parent | 89a93f2f4834f8c126e8d9dd6b368d0b9e21ec3d (diff) | |
parent | 84c3d4aaec3338201b449034beac41635866bddf (diff) |
Merge branch 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc
* 'merge' of git://git.kernel.org/pub/scm/linux/kernel/git/benh/powerpc: (249 commits)
powerpc: Fix pte_update for CONFIG_PTE_64BIT and !PTE_ATOMIC_UPDATES
powerpc: Fix a build problem on ppc32 with new DMA_ATTRs
ibm_newemac: Add MII mode support to the EMAC RGMII bridge.
powerpc: Don't spin on sync instruction at boot time
powerpc: Add VSX load/store alignment exception handler
powerpc: fix giveup_vsx to save registers correctly
powerpc: support for latencytop
powerpc: Remove unnecessary condition when sanity-checking WIMG bits
powerpc: Add PPC_FEATURE_PSERIES_PERFMON_COMPAT
powerpc: Add driver for Barrier Synchronization Register
powerpc: mman.h export fixups
powerpc/fsl: update crypto node definition and device tree instances
powerpc/fsl: Refactor device bindings
powerpc/85xx: Minor fixes for 85xxds and 8536ds board.
powerpc: Add 82xx/83xx/86xx to 6xx Multiplatform
powerpc/85xx: publish of device for cds platforms
powerpc/booke: don't reinitialize time base
powerpc/86xx: Refactor pic init
powerpc/CPM: Add i2c pins to dts and board setup
cpm_uart: Support uart_wait_until_sent()
...
Diffstat (limited to 'arch/ppc/syslib/gen550_kgdb.c')
-rw-r--r-- | arch/ppc/syslib/gen550_kgdb.c | 83 |
1 files changed, 0 insertions, 83 deletions
diff --git a/arch/ppc/syslib/gen550_kgdb.c b/arch/ppc/syslib/gen550_kgdb.c deleted file mode 100644 index 987cc0414e6e..000000000000 --- a/arch/ppc/syslib/gen550_kgdb.c +++ /dev/null | |||
@@ -1,83 +0,0 @@ | |||
1 | /* | ||
2 | * Generic 16550 kgdb support intended to be useful on a variety | ||
3 | * of platforms. To enable this support, it is necessary to set | ||
4 | * the CONFIG_GEN550 option. Any virtual mapping of the serial | ||
5 | * port(s) to be used can be accomplished by setting | ||
6 | * ppc_md.early_serial_map to a platform-specific mapping function. | ||
7 | * | ||
8 | * Adapted from ppc4xx_kgdb.c. | ||
9 | * | ||
10 | * Author: Matt Porter <mporter@kernel.crashing.org> | ||
11 | * | ||
12 | * 2002-2004 (c) MontaVista Software, Inc. This file is licensed under | ||
13 | * the terms of the GNU General Public License version 2. This program | ||
14 | * is licensed "as is" without any warranty of any kind, whether express | ||
15 | * or implied. | ||
16 | */ | ||
17 | |||
18 | #include <linux/types.h> | ||
19 | #include <linux/kernel.h> | ||
20 | |||
21 | #include <asm/machdep.h> | ||
22 | |||
23 | extern unsigned long serial_init(int, void *); | ||
24 | extern unsigned long serial_getc(unsigned long); | ||
25 | extern unsigned long serial_putc(unsigned long, unsigned char); | ||
26 | |||
27 | #if defined(CONFIG_KGDB_TTYS0) | ||
28 | #define KGDB_PORT 0 | ||
29 | #elif defined(CONFIG_KGDB_TTYS1) | ||
30 | #define KGDB_PORT 1 | ||
31 | #elif defined(CONFIG_KGDB_TTYS2) | ||
32 | #define KGDB_PORT 2 | ||
33 | #elif defined(CONFIG_KGDB_TTYS3) | ||
34 | #define KGDB_PORT 3 | ||
35 | #else | ||
36 | #error "invalid kgdb_tty port" | ||
37 | #endif | ||
38 | |||
39 | static volatile unsigned int kgdb_debugport; | ||
40 | |||
41 | void putDebugChar(unsigned char c) | ||
42 | { | ||
43 | if (kgdb_debugport == 0) | ||
44 | kgdb_debugport = serial_init(KGDB_PORT, NULL); | ||
45 | |||
46 | serial_putc(kgdb_debugport, c); | ||
47 | } | ||
48 | |||
49 | int getDebugChar(void) | ||
50 | { | ||
51 | if (kgdb_debugport == 0) | ||
52 | kgdb_debugport = serial_init(KGDB_PORT, NULL); | ||
53 | |||
54 | return(serial_getc(kgdb_debugport)); | ||
55 | } | ||
56 | |||
57 | void kgdb_interruptible(int enable) | ||
58 | { | ||
59 | return; | ||
60 | } | ||
61 | |||
62 | void putDebugString(char* str) | ||
63 | { | ||
64 | while (*str != '\0') { | ||
65 | putDebugChar(*str); | ||
66 | str++; | ||
67 | } | ||
68 | putDebugChar('\r'); | ||
69 | return; | ||
70 | } | ||
71 | |||
72 | /* | ||
73 | * Note: gen550_init() must be called already on the port we are going | ||
74 | * to use. | ||
75 | */ | ||
76 | void | ||
77 | gen550_kgdb_map_scc(void) | ||
78 | { | ||
79 | printk(KERN_DEBUG "kgdb init\n"); | ||
80 | if (ppc_md.early_serial_map) | ||
81 | ppc_md.early_serial_map(); | ||
82 | kgdb_debugport = serial_init(KGDB_PORT, NULL); | ||
83 | } | ||